mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -43,7 +43,7 @@ export default defineComponent({
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const isLogin = ref(false);
|
const isLogin = ref(false);
|
||||||
// console.log("router", router.getRoutes(), route);
|
// console.log("router", router.getRoutes(), route);
|
||||||
console.log("版本0.9.4------------");
|
console.log("版本0.9.5------------");
|
||||||
const routes = computed(() => {
|
const routes = computed(() => {
|
||||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-21 14:32:52
|
* @Date: 2022-11-21 14:32:52
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-12-07 13:41:47
|
* @LastEditTime: 2022-12-08 08:48:26
|
||||||
* @FilePath: /fe-manage/src/api/config.js
|
* @FilePath: /fe-manage/src/api/config.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
@@ -56,7 +56,7 @@ http.interceptors.response.use(
|
|||||||
return response;
|
return response;
|
||||||
} else {
|
} else {
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
// window.open("https://u-pre.boe.com/web/", '_self');
|
window.open("https://u-pre.boe.com/web/", '_self');
|
||||||
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
||||||
}
|
}
|
||||||
console.log("api %o", msg);
|
console.log("api %o", msg);
|
||||||
|
|||||||
85
src/components/common/BaseUpload.vue
Normal file
85
src/components/common/BaseUpload.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<a-upload
|
||||||
|
:file-list="files"
|
||||||
|
action="/manageApi/file/upload"
|
||||||
|
:show-upload-list="showUploadList"
|
||||||
|
:multiple="multiple"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
@change="handleChange"
|
||||||
|
ref="imageRef"
|
||||||
|
>
|
||||||
|
<template v-for="(_, key, index) in $slots" :key="index" v-slot:[key]>
|
||||||
|
<slot :name="key"></slot>
|
||||||
|
</template>
|
||||||
|
</a-upload>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import {defineProps, defineEmits, defineExpose, ref, watch} from "vue";
|
||||||
|
import {message} from "ant-design-vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
value: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
showUploadList: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
fileType: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits({})
|
||||||
|
|
||||||
|
const files = ref([])
|
||||||
|
const imageRef = ref()
|
||||||
|
|
||||||
|
watch(props, () => {
|
||||||
|
props.value.length !== files.value.length && (files.value = props.value)
|
||||||
|
})
|
||||||
|
|
||||||
|
function handleChange({file, fileList}) {
|
||||||
|
file.response && file.response.code === 200 && (file.url = file.response.data)
|
||||||
|
files.value = fileList
|
||||||
|
emit('update:value', fileList)
|
||||||
|
}
|
||||||
|
|
||||||
|
function beforeUpload(file) {
|
||||||
|
if (!props.fileType.includes(file.name.split(".").slice(-1).join(''))) {
|
||||||
|
message.error(
|
||||||
|
"不支持该格式"
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove(i) {
|
||||||
|
files.value.splice(i, 1)
|
||||||
|
emit('update:value', files.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function reUpload(i) {
|
||||||
|
if (files.value[i].status === 'ready' || files.value[i].status === 'uploading') {
|
||||||
|
imageRef.value.abort(files.value[i].raw)
|
||||||
|
files.value[i].status = 'abort';
|
||||||
|
} else if (files.value[i].status === 'fail' || files.value[i].status === 'abort') {
|
||||||
|
imageRef.value.handleStart(files.value[i].raw)
|
||||||
|
imageRef.value.submit()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function abort(i) {
|
||||||
|
imageRef.value.abort(files.value[i].raw)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({reUpload, remove, abort})
|
||||||
|
|
||||||
|
</script>
|
||||||
202
src/components/common/FJUpload.vue
Normal file
202
src/components/common/FJUpload.vue
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<Upload v-model:value="files" ref="uploadRef" :file-type="fileType">
|
||||||
|
<div class="accessory" style="cursor: pointer">
|
||||||
|
<span class="accessory_icon">
|
||||||
|
<img
|
||||||
|
src="@/assets/images/coursewareManage/enclosure.png"
|
||||||
|
alt="enclosure"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<span style="color: #4ea6ff;margin-left:10px">添加附件</span>
|
||||||
|
</div>
|
||||||
|
</Upload>
|
||||||
|
<div>支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items12" style="margin-left: 0">
|
||||||
|
<div
|
||||||
|
class="i12_box1"
|
||||||
|
v-for="(item, index) in files"
|
||||||
|
style="align-items: flex-end"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<div class="file_img"></div>
|
||||||
|
<div class="file_detail">
|
||||||
|
<div class="file_name">
|
||||||
|
<span style="color: #6f6f6f">{{ item.name }}</span>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="file_size">-->
|
||||||
|
<!-- <span style="color: #999ba3">{{ item.size }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="file_updata">
|
||||||
|
<div class="updatabox">
|
||||||
|
<div
|
||||||
|
:class="`${{uploading: 'updatacolor3', done: 'updatacolor' ,error: 'updatacolor2'}[item.status] || 'updatacolor'}`"
|
||||||
|
:style="{width:`${item.status==='uploading'?parseInt(item.percent):100}%`}"></div>
|
||||||
|
<div v-if="item.status"
|
||||||
|
:class="`${{uploading: 'updataxq1', done: 'updataxq' ,error: 'updataxq2'}[item.status] || 'updataxq'}`">
|
||||||
|
{{ {uploading: '正在上传', done: '上传完成', error: '上传失败'}[item.status] || '' }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="upjd" v-if="item.percent">
|
||||||
|
<span style="margin: auto 5px">{{ item.status === 'uploading' ? parseInt(item.percent) : 100 }}%</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="file_operation" @click="del(index)" style="color: #4ea6ff">
|
||||||
|
删除
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import {defineEmits, defineProps, ref, watch, onMounted} from "vue";
|
||||||
|
import Upload from "./BaseUpload.vue";
|
||||||
|
|
||||||
|
const emit = defineEmits({})
|
||||||
|
const props = defineProps({
|
||||||
|
value: String,
|
||||||
|
})
|
||||||
|
const files = ref([])
|
||||||
|
const uploadRef = ref()
|
||||||
|
|
||||||
|
const fileType = ref([
|
||||||
|
"jpg",
|
||||||
|
"jpeg",
|
||||||
|
"png",
|
||||||
|
"gif",
|
||||||
|
"pdf",
|
||||||
|
"ppt",
|
||||||
|
"pptx",
|
||||||
|
"doc",
|
||||||
|
"docx",
|
||||||
|
"xls",
|
||||||
|
"xlsx",
|
||||||
|
"zip",
|
||||||
|
])
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(files, () => {
|
||||||
|
files.value && files.value.length && emit('update:value', files.value.filter(e => e.url).map(e => e.url).join(','))
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(props, init)
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
if (props.value !== files.value.map(e => e.url).join(',')) {
|
||||||
|
files.value = props.value ? props.value.split(',').map(e => ({name: e, url: e})) : []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function del(i) {
|
||||||
|
uploadRef.value.remove(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.mbl_items12 {
|
||||||
|
width: 440px;
|
||||||
|
margin-left: 100px;
|
||||||
|
|
||||||
|
.i12_box1 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 17px 0px 17px 21px;
|
||||||
|
border: 1px solid #eff4fc;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.file_img {
|
||||||
|
width: 27px;
|
||||||
|
height: 32px;
|
||||||
|
background-image: url(@/assets/images/coursewareManage/imgs.png);
|
||||||
|
margin-right: 22px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_detail {
|
||||||
|
width: 250px;
|
||||||
|
margin-right: 21px;
|
||||||
|
|
||||||
|
.file_updata {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.updatabox {
|
||||||
|
position: relative;
|
||||||
|
width: 230px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: rgba(192, 192, 192, 0.25);
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
.updatacolor {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #57c887;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updatacolor2 {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: 80%;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #ff7474;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updatacolor3 {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: 60%;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #388be1;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updataxq {
|
||||||
|
position: absolute;
|
||||||
|
right: 2px;
|
||||||
|
top: -30px;
|
||||||
|
color: #57c887;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updataxq1 {
|
||||||
|
position: absolute;
|
||||||
|
right: 2px;
|
||||||
|
top: -30px;
|
||||||
|
color: #388be1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updataxq2 {
|
||||||
|
position: absolute;
|
||||||
|
right: 2px;
|
||||||
|
top: -30px;
|
||||||
|
color: #ff7474;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_operation {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.fobox {
|
||||||
|
margin-right: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>12312</div>
|
|
||||||
</template>
|
|
||||||
<script setup>
|
|
||||||
import {reactive} from "vue";
|
|
||||||
|
|
||||||
const options = reactive([]);
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<template v-if="tag">
|
||||||
|
<div>{{ options?.find(e => e.value == id)?.label || '' }}</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
@@ -12,6 +16,7 @@
|
|||||||
@change="change"
|
@change="change"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
||||||
@@ -21,7 +26,11 @@ import {useStore} from "vuex";
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
disabled: String
|
disabled: String,
|
||||||
|
tag: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const id = computed(() => {
|
const id = computed(() => {
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<template v-if="tag">
|
||||||
|
<div>{{ options.find(e => e.value == id)?.label || '' }}</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
@@ -12,6 +16,8 @@
|
|||||||
@change="change"
|
@change="change"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
||||||
@@ -21,7 +27,11 @@ const store = useStore();
|
|||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
disabled: String
|
disabled: String,
|
||||||
|
tag: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const id = computed(() => {
|
const id = computed(() => {
|
||||||
|
|||||||
@@ -269,465 +269,10 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 选择线上还是面授课弹窗 -->
|
<!-- 选择线上还是面授课弹窗 -->
|
||||||
<!-- 确定新建面授课弹窗 -->
|
<!-- 确定新建面授课弹窗 -->
|
||||||
<a-modal
|
<CourseModal
|
||||||
v-model:visible="ft_hs"
|
ref="CourseModalRef"
|
||||||
title="Title"
|
@visibleClose="closeOnlineCoursevisible"
|
||||||
@ok="handlePush"
|
|
||||||
:footer="null"
|
|
||||||
:closable="false"
|
|
||||||
wrapClassName="modalStyle facteachModal"
|
|
||||||
width="80%"
|
|
||||||
@cancel="ft_exit_1"
|
|
||||||
>
|
|
||||||
<div class="modalHeader">
|
|
||||||
<div class="headerLeft">
|
|
||||||
<img
|
|
||||||
style="width: 17px; height: 18px; margin-right: 8px"
|
|
||||||
src="../../assets/images/basicinfo/add.png"
|
|
||||||
/>
|
/>
|
||||||
<span v-if="ft_eidt" class="headerLeftText">编辑面授课</span>
|
|
||||||
<span v-else class="headerLeftText">新建面授课</span>
|
|
||||||
</div>
|
|
||||||
<div style="margin-right: 57px; cursor: pointer">
|
|
||||||
<img
|
|
||||||
@click="ft_exit_1"
|
|
||||||
style="width: 22px; height: 22px"
|
|
||||||
src="../../assets/images/basicinfo/close22.png"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modalMain">
|
|
||||||
<!-- 审核理由 -->
|
|
||||||
<div v-if="statusJuJue" class="statusJuJue">
|
|
||||||
<span>审核意见:</span>
|
|
||||||
<span>{{auditDescription}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="faceteach" :style="{ display: ft_hs ? 'block' : 'none' }">
|
|
||||||
<div class="ft_main">
|
|
||||||
<div class="m_title">课程信息</div>
|
|
||||||
<div class="m_body">
|
|
||||||
<div class="mb_left">
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<div class="asterisk_icon">
|
|
||||||
<img
|
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span style="margin-right: 14px">课程名称</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="i1_input">
|
|
||||||
<a-input
|
|
||||||
v-model:value="qdms_inputV1"
|
|
||||||
maxlength="90"
|
|
||||||
style="width: 440px; height: 40px; border-radius: 8px"
|
|
||||||
placeholder="请输入课程名称"
|
|
||||||
/>
|
|
||||||
<div class="inp_num">
|
|
||||||
<span style="color: #c7cbd2">
|
|
||||||
{{ qdms_inputV1.length }}/90
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="i2_cz">
|
|
||||||
<div class="i2_top">
|
|
||||||
<div class="i2_left">
|
|
||||||
<span style="color: #999ba3">课程命名规则</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="i2_right"
|
|
||||||
@click="hideShow"
|
|
||||||
style="cursor: pointer"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="b_zk"
|
|
||||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
|
||||||
>
|
|
||||||
<span style="color: #4ea6ff">收起</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="b_sq"
|
|
||||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
|
||||||
>
|
|
||||||
<span style="color: #4ea6ff">展开</span>
|
|
||||||
</div>
|
|
||||||
<div class="b_icon"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="i2_detail"
|
|
||||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
|
||||||
>
|
|
||||||
<span style="color: #999ba3">
|
|
||||||
1、课程名称统一不加书名号。<br />
|
|
||||||
2、项目名称、属地等信息如需体现在课程名称中,请放在课程名称信息
|
|
||||||
之后,如“时间管理(GROW180项目)”或“时间管理(B*)”确保首先
|
|
||||||
看到的是课程内容主题。<br />
|
|
||||||
3、同一课程如先后有多个版本,原则上仅开放最新版本,旧版本应停用
|
|
||||||
版本如必须以年份标明,请以“沟通技巧(2022年)”的方式呈现。
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items2">
|
|
||||||
<div class="item_nam">
|
|
||||||
<div class="asterisk_icon">
|
|
||||||
<img
|
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span style="margin-right: 14px">封面图</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<a-select
|
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="feng_mian_1"
|
|
||||||
dropdownClassName="dropdown-style"
|
|
||||||
style="width: 440px"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="optionsUrl"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
></a-select>
|
|
||||||
<img
|
|
||||||
class="i_upload_img"
|
|
||||||
v-if="feng_mian_1"
|
|
||||||
:src="feng_mian_1"
|
|
||||||
alt="avatar"
|
|
||||||
/>
|
|
||||||
<!-- <a-upload
|
|
||||||
name="avatar"
|
|
||||||
list-type="picture-card"
|
|
||||||
class="avatar-uploader"
|
|
||||||
:show-upload-list="false"
|
|
||||||
:before-upload="beforeUpload"
|
|
||||||
disabled
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
class="i_upload_img"
|
|
||||||
v-if="imageUrl"
|
|
||||||
:src="imageUrl"
|
|
||||||
alt="avatar"
|
|
||||||
/>
|
|
||||||
<div class="i_upload" v-else>
|
|
||||||
<div class="addimg">
|
|
||||||
<div class="heng"></div>
|
|
||||||
<div class="shu"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-upload> -->
|
|
||||||
<div class="i_bottom">
|
|
||||||
<span style="color: #999ba3">
|
|
||||||
高宽比为16:9 (如:800*450) png或jpg图片
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<div class="asterisk_icon">
|
|
||||||
<img
|
|
||||||
style="width: 10px; height: 10px"
|
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span style="margin-right: 14px">目标人群</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="i1_input">
|
|
||||||
<a-input
|
|
||||||
v-model:value="qdms_inputV2"
|
|
||||||
maxlength="50"
|
|
||||||
style="width: 440px; height: 40px; border-radius: 8px"
|
|
||||||
placeholder="请输入目标人群"
|
|
||||||
/>
|
|
||||||
<div class="inp_num">
|
|
||||||
<span style="color: #c7cbd2">
|
|
||||||
{{ qdms_inputV2.length }}/50
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<span style="margin-right: 14px">课程价值</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="i1_input">
|
|
||||||
<a-input
|
|
||||||
v-model:value="qdms_inputV3"
|
|
||||||
maxlength="200"
|
|
||||||
style="width: 440px; height: 40px; border-radius: 8px"
|
|
||||||
placeholder="请输入课程价值"
|
|
||||||
/>
|
|
||||||
<div class="inp_num">
|
|
||||||
<span style="color: #c7cbd2">
|
|
||||||
{{ qdms_inputV3.length }}/200
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<div class="asterisk_icon">
|
|
||||||
<img
|
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span style="margin-right: 14px">内容分类</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="select i6_input">
|
|
||||||
<a-select
|
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="fen_lei"
|
|
||||||
dropdownClassName="dropdown-style"
|
|
||||||
style="width: 440px"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options2"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
></a-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<span style="margin-right: 14px">场景</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="select i7_input">
|
|
||||||
<a-select
|
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="chang_jin"
|
|
||||||
dropdownClassName="dropdown-style"
|
|
||||||
style="width: 440px"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options3"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
></a-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<span style="margin-right: 14px">内容标签</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<!-- <a-select
|
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="tags_val"
|
|
||||||
mode="tags"
|
|
||||||
style="width: 440px; height: 40px"
|
|
||||||
placeholder="请输入按回车键创建成功"
|
|
||||||
:options="tagsOptions"
|
|
||||||
></a-select> -->
|
|
||||||
<a-input
|
|
||||||
v-model:value="tags_val_single"
|
|
||||||
placeholder="请输入按回车键创建成功"
|
|
||||||
@pressEnter="handleTagChange"
|
|
||||||
/>
|
|
||||||
<div class="tag-content">
|
|
||||||
<a-tag
|
|
||||||
v-for="(item, index) in tags_val"
|
|
||||||
:key="index"
|
|
||||||
closable
|
|
||||||
@close="handleTagClose(index)"
|
|
||||||
>
|
|
||||||
{{ item }}
|
|
||||||
</a-tag>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mb_right">
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<div class="asterisk_icon">
|
|
||||||
<img
|
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt="asterisk"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<!-- 授课教师1 -->
|
|
||||||
<span style="margin-right: 14px">授课教师</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="i1_input">
|
|
||||||
<ProjectManager
|
|
||||||
v-model:value="member.value"
|
|
||||||
v-model:name="member.name"
|
|
||||||
></ProjectManager>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items2">
|
|
||||||
<div class="item_nam">
|
|
||||||
<span style="margin-right: 14px">课程简介</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<div class="i10_textarea">
|
|
||||||
<a-textarea
|
|
||||||
v-model:value="qdms_inputV6"
|
|
||||||
maxlength="150"
|
|
||||||
style="width: 440px; height: 100px; border-radius: 8px"
|
|
||||||
placeholder="请输入"
|
|
||||||
/>
|
|
||||||
<div class="inp_num">
|
|
||||||
<span style="color: #c7cbd2">
|
|
||||||
{{ qdms_inputV6.length }}/150
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items">
|
|
||||||
<div class="item_nam">
|
|
||||||
<span style="margin-right: 10px">附件</span>
|
|
||||||
</div>
|
|
||||||
<div class="item_inp">
|
|
||||||
<a-upload
|
|
||||||
multiple
|
|
||||||
:show-upload-list="false"
|
|
||||||
:before-upload="beforeUpload2"
|
|
||||||
>
|
|
||||||
<div class="accessory" style="cursor: pointer">
|
|
||||||
<div class="accessory_icon">
|
|
||||||
<img
|
|
||||||
src="@/assets/images/coursewareManage/enclosure.png"
|
|
||||||
alt="enclosure"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span style="color: #4ea6ff">添加附件</span>
|
|
||||||
</div>
|
|
||||||
</a-upload>
|
|
||||||
<span>
|
|
||||||
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mbl_items12">
|
|
||||||
<div
|
|
||||||
class="i12_box1"
|
|
||||||
v-for="(item, index) in imgList"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<div class="file_img"></div>
|
|
||||||
<div class="file_detail">
|
|
||||||
<!-- <div class="file_name">
|
|
||||||
<span style="color: #6f6f6f">{{ item.name }}</span>
|
|
||||||
</div> -->
|
|
||||||
<!-- 条件渲染 s -->
|
|
||||||
<!-- <div class="file_size">
|
|
||||||
<span style="color: #999ba3">{{ item.size }}</span>
|
|
||||||
</div> -->
|
|
||||||
<div class="file_updata">
|
|
||||||
<div class="updatabox">
|
|
||||||
<div class="updatacolor"></div>
|
|
||||||
<div class="updataxq">上传完成</div>
|
|
||||||
<!-- <div class="updatacolor2"></div>
|
|
||||||
<div class="updataxq2">上传失败</div> -->
|
|
||||||
<!-- <div class="updatacolor3"></div>
|
|
||||||
<div class="updataxq3">正在上传</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="upjd">
|
|
||||||
<span style="margin: auto 5px">100%</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 条件渲染 e -->
|
|
||||||
</div>
|
|
||||||
<div class="file_operation">
|
|
||||||
<div class="fobox">
|
|
||||||
<span style="color: #4ea6ff" @click="handleDel(index)">
|
|
||||||
删除
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="fobox">
|
|
||||||
<span style="color: #4ea6ff">重传</span>
|
|
||||||
</div>
|
|
||||||
<div class="fobox">
|
|
||||||
<span style="color: #4ea6ff">取消</span>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="fobox">
|
|
||||||
<span style="color: #4ea6ff; margin-right: 5px">
|
|
||||||
暂停
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="fobox">
|
|
||||||
<span style="color: #4ea6ff">取消</span>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="m_footer">
|
|
||||||
<div class="fotnam">
|
|
||||||
<span>课程大纲</span>
|
|
||||||
</div>
|
|
||||||
<div class="fotarea">
|
|
||||||
<div style="border: 1px solid #ccc">
|
|
||||||
<Toolbar
|
|
||||||
style="border-bottom: 1px solid #ccc"
|
|
||||||
:editor="editorRef"
|
|
||||||
:defaultConfig="toolbarConfig"
|
|
||||||
:mode="mode"
|
|
||||||
/>
|
|
||||||
<Editor
|
|
||||||
style="height: 250px; overflow-y: hidden"
|
|
||||||
v-model="valueHtml"
|
|
||||||
:defaultConfig="editorConfig"
|
|
||||||
:mode="mode"
|
|
||||||
@onCreated="handleCreated"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="m_btn">
|
|
||||||
<div class="btn btn5" @click="ft_exit_1">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="btn btn6" @click="handlePush">
|
|
||||||
<div class="btnText">保存</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="btn btn6"
|
|
||||||
v-if="statusTingQi == 1"
|
|
||||||
@click="reviewClick"
|
|
||||||
>
|
|
||||||
<div class="btnText">提交审核</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 查看面授课弹框 start -->
|
<!-- 查看面授课弹框 start -->
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="lookMs"
|
v-model:visible="lookMs"
|
||||||
@@ -3137,6 +2682,7 @@ import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
|||||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
|
|
||||||
import SeeModal from "./components/seeModal.vue";
|
import SeeModal from "./components/seeModal.vue";
|
||||||
|
import CourseModal from "./courseModal.vue";
|
||||||
import * as moment from "moment";
|
import * as moment from "moment";
|
||||||
|
|
||||||
//列表表格
|
//列表表格
|
||||||
@@ -3643,6 +3189,7 @@ export default defineComponent({
|
|||||||
Editor,
|
Editor,
|
||||||
Toolbar,
|
Toolbar,
|
||||||
SeeModal,
|
SeeModal,
|
||||||
|
CourseModal,
|
||||||
// StuAdd,
|
// StuAdd,
|
||||||
ProjectManager,
|
ProjectManager,
|
||||||
ProjOwnerShip,
|
ProjOwnerShip,
|
||||||
@@ -3655,6 +3202,8 @@ export default defineComponent({
|
|||||||
addOnlineCourse,
|
addOnlineCourse,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const CourseModalRef = ref(null);
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
shipType: 1,
|
shipType: 1,
|
||||||
addLoading: false,
|
addLoading: false,
|
||||||
@@ -3662,7 +3211,7 @@ export default defineComponent({
|
|||||||
teacherId: null,
|
teacherId: null,
|
||||||
teacher: null,
|
teacher: null,
|
||||||
selectedRowKeys7: [],
|
selectedRowKeys7: [],
|
||||||
auditDescription:"",
|
auditDescription: "",
|
||||||
isEdit: 0,
|
isEdit: 0,
|
||||||
member: { name: "", value: "" },
|
member: { name: "", value: "" },
|
||||||
//列表表格
|
//列表表格
|
||||||
@@ -4640,7 +4189,9 @@ export default defineComponent({
|
|||||||
const createft = () => {
|
const createft = () => {
|
||||||
if (state.bs_hs == false && state.valueE1 != "") {
|
if (state.bs_hs == false && state.valueE1 != "") {
|
||||||
state.of_hs = false;
|
state.of_hs = false;
|
||||||
state.ft_hs = true;
|
// state.ft_hs = true;
|
||||||
|
CourseModalRef.value.visibleOpen(null);
|
||||||
|
|
||||||
state.valueE1 = "";
|
state.valueE1 = "";
|
||||||
state.teacher = "";
|
state.teacher = "";
|
||||||
state.teacherName = "";
|
state.teacherName = "";
|
||||||
@@ -4663,12 +4214,13 @@ export default defineComponent({
|
|||||||
return count ? false : true;
|
return count ? false : true;
|
||||||
};
|
};
|
||||||
const ft_exit_0 = () => {
|
const ft_exit_0 = () => {
|
||||||
state.ft_hs = false;
|
// state.ft_hs = false;
|
||||||
|
CourseModalRef.value.visibleClose();
|
||||||
};
|
};
|
||||||
const ft_exit_1 = () => {
|
const ft_exit_1 = () => {
|
||||||
state.ft_hs = false;
|
// state.ft_hs = false;
|
||||||
router.go(0);
|
CourseModalRef.value.visibleClose();
|
||||||
|
// router.go(0);
|
||||||
};
|
};
|
||||||
const ft_exit = () => {
|
const ft_exit = () => {
|
||||||
state.ft_eidt = false;
|
state.ft_eidt = false;
|
||||||
@@ -5280,15 +4832,15 @@ export default defineComponent({
|
|||||||
//编辑面授课
|
//编辑面授课
|
||||||
const handleEdit = async (itm, type) => {
|
const handleEdit = async (itm, type) => {
|
||||||
// auditDescription
|
// auditDescription
|
||||||
let obj={
|
let obj = {
|
||||||
offcourseId:itm.offcourseId,
|
offcourseId: itm.offcourseId,
|
||||||
pageNo:1,
|
pageNo: 1,
|
||||||
pageSize:1,
|
pageSize: 1,
|
||||||
type:2
|
type: 2,
|
||||||
}
|
};
|
||||||
api2.auditList(obj).then((res)=>{
|
api2.auditList(obj).then((res) => {
|
||||||
state.auditDescription =res.data.data.rows[0].description;
|
state.auditDescription = res.data.data.rows[0].description;
|
||||||
})
|
});
|
||||||
|
|
||||||
console.log(45555);
|
console.log(45555);
|
||||||
console.log(itm);
|
console.log(itm);
|
||||||
@@ -5297,50 +4849,51 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
state.offcourseId = itm.offcourseId;
|
state.offcourseId = itm.offcourseId;
|
||||||
|
|
||||||
const item = await detail({
|
// const item = await detail({
|
||||||
offcourseId: Number(state.offcourseId),
|
// offcourseId: Number(state.offcourseId),
|
||||||
}).then((res) => {
|
// }).then((res) => {
|
||||||
if (res.data.code === 200) return res.data.data;
|
// if (res.data.code === 200) return res.data.data;
|
||||||
});
|
// });
|
||||||
|
|
||||||
state.statusJuJue = Number(item.auditStatus) === -1 ? 1 : 0;
|
// state.statusJuJue = Number(item.auditStatus) === -1 ? 1 : 0;
|
||||||
|
|
||||||
if (Number(item.auditStatus) === 2 && Number(item.status) === 1) {
|
// if (Number(item.auditStatus) === 2 && Number(item.status) === 1) {
|
||||||
state.statusTingQi = 1;
|
// state.statusTingQi = 1;
|
||||||
}
|
// }
|
||||||
if (Number(item.auditStatus) === 2 && Number(item.status) === 0) {
|
// if (Number(item.auditStatus) === 2 && Number(item.status) === 0) {
|
||||||
state.statusTingQi = 0;
|
// state.statusTingQi = 0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
state.qdms_inputV1 = item.name;
|
// state.qdms_inputV1 = item.name;
|
||||||
// state.imageUrl = item.picUrl;
|
// // state.imageUrl = item.picUrl;
|
||||||
state.feng_mian_1 = item.picUrl;
|
// state.feng_mian_1 = item.picUrl;
|
||||||
state.qdms_inputV2 = item.targetUser;
|
// state.qdms_inputV2 = item.targetUser;
|
||||||
state.qdms_inputV3 = item.meaning;
|
// state.qdms_inputV3 = item.meaning;
|
||||||
state.fen_lei = String(item.categoryId);
|
// state.fen_lei = String(item.categoryId);
|
||||||
state.chang_jin = String(item.sceneId);
|
// state.chang_jin = String(item.sceneId);
|
||||||
state.tags_val = item.tips ? item.tips.split(",") : [];
|
// state.tags_val = item.tips ? item.tips.split(",") : [];
|
||||||
//state.qdms_inputV5 = item.teacherId;
|
// //state.qdms_inputV5 = item.teacherId;
|
||||||
state.teacher = item.teacher;
|
// state.teacher = item.teacher;
|
||||||
state.teacherId = item.teacherId;
|
// state.teacherId = item.teacherId;
|
||||||
state.qdms_inputV6 = item.intro;
|
// state.qdms_inputV6 = item.intro;
|
||||||
state.member = { value: item.teacherId, name: item.teacher };
|
// state.member = { value: item.teacherId, name: item.teacher };
|
||||||
if (item.attach == "") {
|
// if (item.attach == "") {
|
||||||
state.imgList = [];
|
// state.imgList = [];
|
||||||
} else {
|
// } else {
|
||||||
if (item.attach.indexOf(",")) {
|
// if (item.attach.indexOf(",")) {
|
||||||
const arr = item.attach.split(",");
|
// const arr = item.attach.split(",");
|
||||||
arr.forEach((item) => {
|
// arr.forEach((item) => {
|
||||||
state.imgList.push({ img: item });
|
// state.imgList.push({ img: item });
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
state.imgList = [{ img: item.attach }];
|
// state.imgList = [{ img: item.attach }];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
valueHtml.value = item.outline;
|
// valueHtml.value = item.outline;
|
||||||
|
|
||||||
state.ft_hs = true;
|
// state.ft_hs = true;
|
||||||
|
CourseModalRef.value.visibleOpen(state.offcourseId);
|
||||||
state.ft_eidt = true;
|
state.ft_eidt = true;
|
||||||
getTea();
|
getTea();
|
||||||
};
|
};
|
||||||
@@ -5701,8 +5254,11 @@ export default defineComponent({
|
|||||||
console.log("执行");
|
console.log("执行");
|
||||||
getTableDate();
|
getTableDate();
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
CourseModalRef,
|
||||||
|
|
||||||
getdateToDateFn,
|
getdateToDateFn,
|
||||||
moment,
|
moment,
|
||||||
getdateToTimeFn,
|
getdateToTimeFn,
|
||||||
|
|||||||
8356
src/views/courselibrary/CoursewareManage_Old.vue
Normal file
8356
src/views/courselibrary/CoursewareManage_Old.vue
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -283,33 +283,24 @@
|
|||||||
v-model:checked="checked"
|
v-model:checked="checked"
|
||||||
@click="changeopclo"
|
@click="changeopclo"
|
||||||
/>
|
/>
|
||||||
<div v-if="(checked==true)"
|
<div
|
||||||
class="opclo">
|
class="opclo"
|
||||||
|
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||||
|
>
|
||||||
<span>关闭</span>
|
<span>关闭</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="(checked==false)"
|
<div
|
||||||
class="opclo" >
|
class="opclo"
|
||||||
|
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||||
|
>
|
||||||
<span>开启</span>
|
<span>开启</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="(checked==true)"
|
<div
|
||||||
class="ntc_content">
|
class="ntc_content"
|
||||||
<div class="ntcc_tit">当前公告内容:</div>
|
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||||
<div class="textarea">
|
>
|
||||||
{{noticeContent==""?"暂无公告":noticeContent}}
|
<div class="ntcc_tit">公告内容</div>
|
||||||
<div v-if="(editFlag == false)" class="btnarea" >
|
|
||||||
<div> </div>
|
|
||||||
<div class="area_btn" @click="editNotice">
|
|
||||||
|
|
||||||
<div class="btnText">编辑</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-if="(editFlag==true)">
|
|
||||||
<div> </div>
|
|
||||||
<div class="ntcc_tit" >编辑公告:</div>
|
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="projectInfo.notice"
|
v-model:value="projectInfo.notice"
|
||||||
@@ -325,7 +316,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -845,8 +835,6 @@ export default defineComponent({
|
|||||||
edit: true,
|
edit: true,
|
||||||
fileList:[],
|
fileList:[],
|
||||||
attachSwitch:true,
|
attachSwitch:true,
|
||||||
editFlag:false,
|
|
||||||
noticeContent:"",
|
|
||||||
// 共享文档列表
|
// 共享文档列表
|
||||||
docList: [
|
docList: [
|
||||||
{
|
{
|
||||||
@@ -864,25 +852,29 @@ export default defineComponent({
|
|||||||
],
|
],
|
||||||
isEdit: false, // 是否处于编辑状态
|
isEdit: false, // 是否处于编辑状态
|
||||||
// 基本信息
|
// 基本信息
|
||||||
projectInfo: {},
|
projectInfo: {
|
||||||
|
beginTime: null,
|
||||||
|
endTime: null,
|
||||||
|
name: null,
|
||||||
|
manager: null,
|
||||||
|
notice: null,
|
||||||
|
sourceBelongId: null,
|
||||||
|
remark: "",
|
||||||
|
courseSyncFlag: false,
|
||||||
|
level: null,
|
||||||
|
systemId: null,
|
||||||
|
boeFlag: false,
|
||||||
|
status: null,
|
||||||
|
picUrl: null,
|
||||||
|
noticeFlag: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const value = ref("");
|
const value = ref("");
|
||||||
const textnum = "150";
|
const textnum = "150";
|
||||||
const routered = useRouter();
|
const routered = useRouter();
|
||||||
const changeopclo = () => {
|
const changeopclo = () => {
|
||||||
state.projectInfo.noticeFlag = state.checked?1:0;
|
state.hideshow = !state.hideshow;
|
||||||
api
|
|
||||||
.templateEdit( state.projectInfo)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const editNotice =()=>{
|
|
||||||
state.editFlag = true ;
|
|
||||||
}
|
|
||||||
const changecheck2 = () => {
|
const changecheck2 = () => {
|
||||||
state.checked2 = !state.checked2;
|
state.checked2 = !state.checked2;
|
||||||
};
|
};
|
||||||
@@ -945,13 +937,25 @@ export default defineComponent({
|
|||||||
|
|
||||||
state.taskSyllabus = [];
|
state.taskSyllabus = [];
|
||||||
console.log(res);
|
console.log(res);
|
||||||
state.projectInfo = res.data.data.projectTemplateInfo;
|
state.projectInfo.name = res.data.data.projectTemplateInfo.name;
|
||||||
|
state.projectInfo.beginTime = res.data.data.projectTemplateInfo.beginTime;
|
||||||
state.noticeContent = state.projectInfo.notice;
|
state.projectInfo.endTime = res.data.data.projectTemplateInfo.endTime;
|
||||||
state.checked = state.projectInfo.noticeFlag==1?true:false;
|
state.projectInfo.manager = res.data.data.projectTemplateInfo.manager;
|
||||||
console.log("state.checked", state.checked);
|
state.projectInfo.notice = res.data.data.projectTemplateInfo.notice;
|
||||||
console.log("state.projectInfo",state.projectInfo);
|
state.projectInfo.sourceBelongId = res.data.data.projectTemplateInfo.sourceBelongId;
|
||||||
console.log("res.data.data.projectTemplateInfo",res.data.data.projectTemplateInfo);
|
state.projectInfo.managerId = res.data.data.projectTemplateInfo.managerId;
|
||||||
|
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
|
||||||
|
state.projectInfo.courseSyncFlag = res.data.data.projectTemplateInfo.courseSyncFlag;
|
||||||
|
state.projectInfo.level = res.data.data.projectTemplateInfo.level;
|
||||||
|
state.projectInfo.systemId = res.data.data.projectTemplateInfo.systemId;
|
||||||
|
state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag;
|
||||||
|
state.projectInfo.noticeFlag = res.data.data.projectTemplateInfo.noticeFlag;
|
||||||
|
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
|
||||||
|
state.projectInfo.status = res.data.data.projectTemplateInfo.status;
|
||||||
|
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
||||||
|
state.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
||||||
|
state.projectInfo.attach = res.data.data.projectTemplateInfo.attach;
|
||||||
|
state.projectInfo.category = res.data.data.projectTemplateInfo.category;
|
||||||
try{
|
try{
|
||||||
state.fileList = JSON.parse(res.data.data.projectTemplateInfo.attach);
|
state.fileList = JSON.parse(res.data.data.projectTemplateInfo.attach);
|
||||||
}catch{
|
}catch{
|
||||||
@@ -984,14 +988,29 @@ export default defineComponent({
|
|||||||
|
|
||||||
// 发布公告
|
// 发布公告
|
||||||
const addNotice = () => {
|
const addNotice = () => {
|
||||||
// state.projectInfo.notice=
|
console.log("ok====s");
|
||||||
if(!state.projectInfo.notice){
|
let obj = {
|
||||||
return message.warning("请输入公告内容");
|
name: state.projectInfo.name,
|
||||||
}
|
category: state.projectInfo.category,
|
||||||
|
picUrl: state.projectInfo.picUrl,
|
||||||
|
manager: state.projectInfo.manager,
|
||||||
|
managerId: state.projectInfo.managerId || 0,
|
||||||
|
sourceBelongId: state.projectInfo.sourceBelongId,
|
||||||
|
level: state.projectInfo.level,
|
||||||
|
systemId: state.projectInfo.systemId,
|
||||||
|
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
|
||||||
|
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
|
||||||
|
notice: state.projectInfo.notice,
|
||||||
|
noticeFlag: state.projectInfo.noticeFlag,
|
||||||
|
projectTemplateId: localStorage.getItem("projectTemplateId"),
|
||||||
|
remark: state.projectInfo.remark,
|
||||||
|
status: state.projectInfo.status,
|
||||||
|
attach: state.projectInfo.attach,
|
||||||
|
};
|
||||||
|
console.log("obj======", obj);
|
||||||
api
|
api
|
||||||
.templateEdit( state.projectInfo)
|
.templateEdit(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
state.noticeContent = state.projectInfo.notice;
|
|
||||||
message.success("公告发布成功");
|
message.success("公告发布成功");
|
||||||
console.log(res);
|
console.log(res);
|
||||||
})
|
})
|
||||||
@@ -999,7 +1018,6 @@ export default defineComponent({
|
|||||||
message.error("公告发布失败" + err);
|
message.error("公告发布失败" + err);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
state.editFlag =false;
|
|
||||||
};
|
};
|
||||||
// 删除阶段
|
// 删除阶段
|
||||||
const stateDel = (id) => {
|
const stateDel = (id) => {
|
||||||
@@ -1270,8 +1288,7 @@ export default defineComponent({
|
|||||||
editRule,
|
editRule,
|
||||||
handleChange2,
|
handleChange2,
|
||||||
scoresum,
|
scoresum,
|
||||||
checkedClose,
|
checkedClose
|
||||||
editNotice
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -2200,7 +2217,6 @@ export default defineComponent({
|
|||||||
.ntc_content {
|
.ntc_content {
|
||||||
.ntcc_tit {
|
.ntcc_tit {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
.textarea {
|
.textarea {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -40,71 +40,43 @@
|
|||||||
<div class="inname">分类</div>
|
<div class="inname">分类</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select
|
<ProjectClass v-model:value="projectInfo.category"></ProjectClass>
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="projectInfo.category"
|
|
||||||
style="width: 100%"
|
|
||||||
:options="classifyList"
|
|
||||||
@change="classificationChange"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name" style="align-items: flex-start;">
|
||||||
<div class="namebox">
|
<div class="namebox" style="margin-top: 10px">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="in select" style="flex:1">
|
||||||
class="box"
|
<a-select
|
||||||
style="
|
:getPopupContainer="
|
||||||
width: 100px;
|
(triggerNode) => {
|
||||||
height: 100px;
|
return triggerNode.parentNode || document.body;
|
||||||
border: 1px solid rgba(78, 166, 255, 1);
|
}
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
"
|
"
|
||||||
>
|
v-model:value="projectInfo.picUrl"
|
||||||
<a-upload
|
dropdownClassName="dropdown-style"
|
||||||
v-model:file-list="fileList"
|
style="width: 440px"
|
||||||
name="file"
|
placeholder="请选择"
|
||||||
list-type="picture-card"
|
:options="projectPic"
|
||||||
class="avatar-uploader"
|
@change="handleChangeSelect"
|
||||||
:show-upload-list="false"
|
allowClear
|
||||||
action="/api/file/upload"
|
></a-select>
|
||||||
:before-upload="beforeUpload"
|
|
||||||
@change="handleChange"
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
style="
|
style="width:100px;height:100px;margin-top:20px;border-radius: 8px"
|
||||||
width: 100px;
|
v-if="projectInfo.picUrl"
|
||||||
height: 100px;
|
:src="projectInfo.picUrl"
|
||||||
margin-bottom: 4px;
|
|
||||||
margin-right: 4px;
|
|
||||||
"
|
|
||||||
v-if="imageUrl"
|
|
||||||
:src="imageUrl"
|
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
<div v-else>
|
<div class="i_bottom">
|
||||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
<span style="color: #999ba3">
|
||||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
高宽比为16:9 (如:800*450) png或jpg图片
|
||||||
<div class="box1"></div>
|
</span>
|
||||||
<div class="box2"></div>
|
|
||||||
<!-- <div class="ant-upload-text"></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</a-upload>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -120,9 +92,10 @@
|
|||||||
<a-range-picker
|
<a-range-picker
|
||||||
separator="至"
|
separator="至"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
v-model:value="projectInfo.choosedTime"
|
v-model:value="projectInfo.rangeTime"
|
||||||
format="YYYY-MM-DD"
|
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
|
valueFormat="YYYY-MM-DD HH:mm:ss"
|
||||||
|
@change="timeChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,23 +108,12 @@
|
|||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-select
|
<ProjectManager
|
||||||
:getPopupContainer="
|
v-model:value="projectInfo.managerId"
|
||||||
(triggerNode) => {
|
v-model:name="projectInfo.manager"
|
||||||
return triggerNode.parentNode || document.body;
|
@onChange="managerChange"
|
||||||
}
|
|
||||||
"
|
|
||||||
|
|
||||||
:value="classifySelect1"
|
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
placeholder="请选择项目经理"
|
></ProjectManager>
|
||||||
style="width: 100%"
|
|
||||||
:options="classifyList1"
|
|
||||||
@change="classificationChange1"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -164,17 +126,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select
|
<OrgClass
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="projectInfo.sourceBelongId"
|
v-model:value="projectInfo.sourceBelongId"
|
||||||
placeholder="项目一"
|
v-model:name="projectInfo.sourceBelongName"
|
||||||
:options="classifyList2"
|
></OrgClass>
|
||||||
@change="classificationChange2"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
@@ -196,8 +151,7 @@
|
|||||||
<div class="inname">同步学习记录</div>
|
<div class="inname">同步学习记录</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio
|
<a-checkbox
|
||||||
@click="changeChecked"
|
|
||||||
v-model:checked="projectInfo.courseSyncFlag"
|
v-model:checked="projectInfo.courseSyncFlag"
|
||||||
><span
|
><span
|
||||||
style="
|
style="
|
||||||
@@ -206,7 +160,7 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
"
|
||||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||||
></a-radio
|
></a-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -219,18 +173,7 @@
|
|||||||
<div class="inname">项目级别</div>
|
<div class="inname">项目级别</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select
|
<ProjectLevel v-model:value="projectInfo.level"></ProjectLevel>
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="projectInfo.level"
|
|
||||||
:options="classifyList3"
|
|
||||||
@change="classificationChange3"
|
|
||||||
placeholder="集团级/组织级/现地级/部门级"
|
|
||||||
:disabled="viewDetail ? true : false"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -242,18 +185,7 @@
|
|||||||
<div class="inname">培训体系</div>
|
<div class="inname">培训体系</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select
|
<TrainClass v-model:value="projectInfo.systemId"></TrainClass>
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="projectInfo.systemId"
|
|
||||||
:options="classifyList4"
|
|
||||||
@change="classificationChange4"
|
|
||||||
placeholder="集团级/组织级/现地级/部门级"
|
|
||||||
:disabled="viewDetail ? true : false"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -265,350 +197,77 @@
|
|||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio
|
<a-radio-group
|
||||||
@click="changeChecked1"
|
v-model:value="projectInfo.boeFlag"
|
||||||
v-model:checked="projectInfo.boeFlag"
|
|
||||||
:disabled="viewDetail ? true : false"
|
|
||||||
><span
|
|
||||||
style="
|
|
||||||
width: 100%;
|
|
||||||
color: rgba(109, 117, 132, 1);
|
|
||||||
font-size: 14px;
|
|
||||||
"
|
|
||||||
>BOEU实施</span
|
|
||||||
></a-radio
|
|
||||||
>
|
>
|
||||||
|
<a-radio :value="1">是</a-radio>
|
||||||
|
<a-radio :value="0">否</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="name name2">
|
|
||||||
<div class="namebox" style="margin-top: 8px">
|
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
|
||||||
<div class="inname">附件</div>
|
|
||||||
</div>
|
|
||||||
<div class="filebox">
|
|
||||||
<div>
|
|
||||||
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
|
||||||
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
|
||||||
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
|
||||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
|
||||||
<span v-else class="filetext">上传附件</span>
|
|
||||||
</a-upload>
|
|
||||||
</div>
|
|
||||||
<div class="support">
|
|
||||||
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||||
>确定</a-button
|
>确定
|
||||||
|
</a-button
|
||||||
>
|
>
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script setup>
|
||||||
import { reactive, toRefs, ref,onMounted } from "vue";
|
|
||||||
import { message } from "ant-design-vue";
|
import {useStore} from "vuex";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import {ref, onMounted, watch} from "vue";
|
||||||
// import dayjs from "dayjs";
|
import {message} from "ant-design-vue";
|
||||||
|
import {useRouter, useRoute} from "vue-router";
|
||||||
import * as api from "../../api/indexTemplate";
|
import * as api from "../../api/indexTemplate";
|
||||||
import { storage } from "../../api/storage";
|
import ProjectClass from "@/components/project/ProjectClass";
|
||||||
// import { toDate } from "../../api/method";
|
import TrainClass from "@/components/project/TrainClass";
|
||||||
import dayjs from "dayjs";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
|
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||||
|
|
||||||
export default {
|
const route = useRoute();
|
||||||
name: "projectAdd",
|
const router = useRouter();
|
||||||
setup() {
|
const store = useStore();
|
||||||
// 编辑页面跳转过来时候,自动填充表格
|
const projectInfo = ref({})
|
||||||
const routers = useRoute();
|
const projectPic = ref([])
|
||||||
const isEdit = ref(false);
|
|
||||||
// let peojectID = "";
|
|
||||||
|
|
||||||
if (routers.query.projectId) {
|
onMounted(() => {
|
||||||
storage.set("projectAddId", routers.query.projectId);
|
getDetail()
|
||||||
isEdit.value = true;
|
projectPic.value = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||||
// peojectID = routers.query.projectId;
|
})
|
||||||
} else {
|
|
||||||
if (storage.get("projectAddId")) {
|
|
||||||
isEdit.value = true;
|
|
||||||
// peojectID = storage.get("projectAddId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const backPage = () => {
|
watch(() => route.query.projectTemplateId, () => {
|
||||||
storage.remove("projectAddId");
|
getDetail()
|
||||||
setTimeout(() => {
|
})
|
||||||
router.push({
|
|
||||||
path: "/libraryAdd",
|
|
||||||
});
|
|
||||||
}, 400);
|
|
||||||
};
|
|
||||||
|
|
||||||
const router = useRouter();
|
const getDetail = () => route.query.projectTemplateId && api.templateDetail(route.query.projectTemplateId)
|
||||||
const state = reactive({
|
.then((res) => {
|
||||||
classifySelect: null,
|
projectInfo.value = res.data.data.projectTemplateInfo;
|
||||||
classifySelectId: null,
|
projectInfo.value.rangeTime = [projectInfo.value.beginTime, projectInfo.value.endTime]
|
||||||
checked: false,
|
|
||||||
checked1: false,
|
|
||||||
valueE: null,
|
|
||||||
valueE1: null,
|
|
||||||
valueE2: null,
|
|
||||||
classifySelect1: ['李俊国'],
|
|
||||||
classifySelect2: [],
|
|
||||||
classifySelect3: [],
|
|
||||||
classifySelect4: [],
|
|
||||||
rangevalue: [],
|
|
||||||
|
|
||||||
currentPage: 1, //当前页
|
|
||||||
tableDataTotal: -1, //模版列表总数
|
|
||||||
pageSize: 10, //每页10条数据
|
|
||||||
totalPages: 0, //总页数
|
|
||||||
viewDetail: routers.query.viewDetail ? routers.query.viewDetail : null,
|
|
||||||
projectInfo:{
|
|
||||||
choosedTime:'',
|
|
||||||
name: null,
|
|
||||||
manager: null,
|
|
||||||
notice: null,
|
|
||||||
sourceBelongId: 1,
|
|
||||||
category:1,
|
|
||||||
remark: "",
|
|
||||||
courseSyncFlag: false,
|
|
||||||
level: 1,
|
|
||||||
systemId: 2,
|
|
||||||
boeFlag: false,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const projectName = ref("");
|
|
||||||
|
|
||||||
const classifyList = ref([
|
|
||||||
{ value: 1, label: "管理者" },
|
|
||||||
{ value: 2, label: "领军者" },
|
|
||||||
{ value: 3, label: "产业人" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// let projectType = "";
|
|
||||||
|
|
||||||
const classificationChange = (value) => {
|
|
||||||
console.log(`selected ${value}`);
|
|
||||||
// projectType = value;
|
|
||||||
};
|
|
||||||
|
|
||||||
function getBase64(img, callback) {
|
|
||||||
const reader = new FileReader();
|
|
||||||
reader.addEventListener("load", () => callback(reader.result));
|
|
||||||
reader.readAsDataURL(img);
|
|
||||||
}
|
|
||||||
|
|
||||||
const fileList = ref([]);
|
|
||||||
const fileList1 = ref([]);
|
|
||||||
const loading = ref(false);
|
|
||||||
const imageUrl = ref("");
|
|
||||||
// let picUrl = "";
|
|
||||||
|
|
||||||
const handleChange = (info) => {
|
|
||||||
if (info.file.status === "uploading") {
|
|
||||||
loading.value = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (info.file.status === "done") {
|
|
||||||
console.log("上传图片返回的信息 %o", info);
|
|
||||||
// picUrl = info.file.response.data;
|
|
||||||
// Get this url from response in real world.
|
|
||||||
getBase64(info.file.originFileObj, (base64Url) => {
|
|
||||||
imageUrl.value = base64Url;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (info.file.status === "error") {
|
|
||||||
loading.value = false;
|
|
||||||
message.error("upload error");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let uplodaFileCount = false;
|
|
||||||
|
|
||||||
// let attach = "";
|
|
||||||
let attachData = "";
|
|
||||||
const handleChange1 = (info) => {
|
|
||||||
if (info.file.status === "uploading") {
|
|
||||||
loading.value = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (info.file.status === "done") {
|
|
||||||
console.log(
|
|
||||||
"上传附件返回的信息 %o",
|
|
||||||
info,
|
|
||||||
info.fileList.length,
|
|
||||||
uplodaFileCount
|
|
||||||
);
|
|
||||||
|
|
||||||
let attachStr = "";
|
|
||||||
attachData = info.fileList;
|
|
||||||
for (let i = 0; i < attachData.length; i++) {
|
|
||||||
if (attachData.length - 1 == i) {
|
|
||||||
attachStr += attachData[i].response.data;
|
|
||||||
} else {
|
|
||||||
attachStr += attachData[i].response.data + ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(attachStr);
|
|
||||||
// attach = attachStr;
|
|
||||||
|
|
||||||
if (info.fileList.length > 5) {
|
|
||||||
uplodaFileCount = true;
|
|
||||||
} else {
|
|
||||||
uplodaFileCount = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (info.file.status === "error") {
|
|
||||||
loading.value = false;
|
|
||||||
message.error("upload error");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const beforeUpload = (file) => {
|
|
||||||
const isJpgOrPng =
|
|
||||||
file.type === "image/jpeg" || file.type === "image/png";
|
|
||||||
if (!isJpgOrPng) {
|
|
||||||
message.error("You can only upload JPG file!");
|
|
||||||
}
|
|
||||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
|
||||||
if (!isLt2M) {
|
|
||||||
message.error("Image must smaller than 1MB!");
|
|
||||||
}
|
|
||||||
return isJpgOrPng && isLt2M;
|
|
||||||
};
|
|
||||||
|
|
||||||
const beforeUpload1 = () => {
|
|
||||||
return new Promise((resovle, reject) => {
|
|
||||||
if (uplodaFileCount) {
|
|
||||||
message.warning("上传文件数量已达最大数量");
|
|
||||||
return reject(false);
|
|
||||||
}
|
|
||||||
return resovle(true);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const dateFormatList = ["YYYY/MM/DD"];
|
|
||||||
|
|
||||||
const onRangeChange = (value, dateString) => {
|
|
||||||
console.log("Selected Time: ", value);
|
|
||||||
// 项目时间选择函数
|
|
||||||
console.log("Formatted Selected Time: ", dateString);
|
|
||||||
console.log(
|
|
||||||
"Formatted Selected TimeStamp",
|
|
||||||
new Date(dateString[0]).getTime()
|
|
||||||
);
|
|
||||||
// beginTime = new Date(dateString[0]).getTime() / 1000;
|
|
||||||
// endTime = new Date(dateString[1]).getTime() / 1000;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 项目经理 后续接口调用
|
|
||||||
const classifyList1 = ref([
|
|
||||||
{ value: 1, label: "李俊国" },
|
|
||||||
{ value: 2, label: "将小米" },
|
|
||||||
{ value: 3, label: "刘孟君" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const classificationChange1 = (key, options) => {
|
|
||||||
console.log(`selected ${key}`, options);
|
|
||||||
let mstr = "";
|
|
||||||
let midstr = "";
|
|
||||||
for (let i = 0; i < key.length; i++) {
|
|
||||||
if (key.length - 1 !== i) {
|
|
||||||
midstr += key[i] + ",";
|
|
||||||
mstr += classifyList1.value[i].label + ",";
|
|
||||||
} else {
|
|
||||||
midstr += key[i];
|
|
||||||
mstr += classifyList1.value[i].label;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(mstr, midstr);
|
|
||||||
state.classifySelect1 = options;
|
|
||||||
let newoptions = [];
|
|
||||||
for (let i = 0; i < state.classifySelect1.length; i++) {
|
|
||||||
if (state.classifySelect1[i].value) {
|
|
||||||
newoptions.push(state.classifySelect1[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state.classifySelect1 = newoptions;
|
|
||||||
// manager = mstr;
|
|
||||||
// managerId = midstr;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 资源归属 sourceBelongId 后续给接口
|
|
||||||
const classifyList2 = ref([
|
|
||||||
{ value: 1, label: "项目一" },
|
|
||||||
{ value: 2, label: "项目二" },
|
|
||||||
{ value: 3, label: "项目三" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// let sourceBelongIdC = "";
|
|
||||||
const classificationChange2 = (key) => {
|
|
||||||
console.log(`selected ${key}`, classifyList2);
|
|
||||||
// sourceBelongIdC = key;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 项目级别
|
|
||||||
const classifyList3 = ref([
|
|
||||||
{ value: 1, label: "集团级" },
|
|
||||||
{ value: 2, label: "组织级" },
|
|
||||||
{ value: 3, label: "现地级" },
|
|
||||||
{ value: 4, label: "部门级" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// let levels = "";
|
|
||||||
const classificationChange3 = (key) => {
|
|
||||||
console.log(`selected ${key}`, classifyList3);
|
|
||||||
// levels = key;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 培训体系
|
|
||||||
const classifyList4 = ref([
|
|
||||||
{ value: 1, label: "集团级" },
|
|
||||||
{ value: 2, label: "组织级" },
|
|
||||||
{ value: 3, label: "现地级" },
|
|
||||||
{ value: 4, label: "部门级" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// let systemid = "";
|
|
||||||
const classificationChange4 = (key) => {
|
|
||||||
console.log(`selected ${key}`, classifyList4);
|
|
||||||
// systemid = key;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// const removeFile = (file) => {
|
|
||||||
// const index = fileList1.value.indexOf(file);
|
|
||||||
// const newFileList = fileList1.value.slice();
|
|
||||||
// newFileList.splice(index, 1);
|
|
||||||
// fileList1.value = newFileList;
|
|
||||||
|
|
||||||
// let attachStr = "";
|
|
||||||
// if (newFileList.length == 0) {
|
|
||||||
// attachStr = "";
|
|
||||||
// }
|
|
||||||
// for (let i = 0; i < fileList1["value"].length; i++) {
|
|
||||||
// console.log(fileList1["value"][i].response.data);
|
|
||||||
// if (fileList1["value"].length - 1 == i) {
|
|
||||||
// attachStr += fileList1["value"][i].response.data;
|
|
||||||
// } else {
|
|
||||||
// attachStr += fileList1["value"][i].response.data + ",";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// attach = attachStr;
|
|
||||||
// };
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const errorMsgs = {
|
const backPage = () => {
|
||||||
|
router.back();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleChangeSelect = (value) => {
|
||||||
|
projectInfo.value.picUrl = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function timeChange(e) {
|
||||||
|
if (e && e.length === 2) {
|
||||||
|
projectInfo.value.beginTime = e[0];
|
||||||
|
projectInfo.value.endTime = e[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const errorMsgs = {
|
||||||
name: "请输入模板名称",
|
name: "请输入模板名称",
|
||||||
category: "请选择模板分类",
|
category: "请选择模板分类",
|
||||||
picUrl: "请上传项目封面图",
|
picUrl: "请上传项目封面图",
|
||||||
@@ -620,99 +279,29 @@ export default {
|
|||||||
level: "请填写项目级别",
|
level: "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
systemId: "请填写项目培训体系",
|
||||||
boeFlag: "请选择是否BOE实施",
|
boeFlag: "请选择是否BOE实施",
|
||||||
};
|
};
|
||||||
|
|
||||||
const createProject = () => {
|
|
||||||
console.log("我要编辑项目", isEdit.value);
|
|
||||||
let obj = {
|
|
||||||
"name": state.projectInfo.name,
|
|
||||||
"category": state.projectInfo.category,
|
|
||||||
"picUrl": "x",
|
|
||||||
"beginTime": Number(dayjs(state.projectInfo.choosedTime[0]).format("YYYY-MM-DD")) || 1,
|
|
||||||
"endTime": Number(dayjs(state.projectInfo.choosedTime[1]).format("YYYY-MM-DD")) || 1,
|
|
||||||
"manager": state.classifySelect1.toString(),
|
|
||||||
"managerId": state.projectInfo.managerId || 0,
|
|
||||||
"sourceBelongId": state.projectInfo.sourceBelongId,
|
|
||||||
"level": state.projectInfo.level,
|
|
||||||
"systemId": state.projectInfo.systemId,
|
|
||||||
"boeFlag": state.projectInfo.boeFlag ? 1:0,
|
|
||||||
"courseSyncFlag": state.projectInfo.courseSyncFlag? 1:0,
|
|
||||||
"notice": "",
|
|
||||||
"noticeFlag": 0,
|
|
||||||
"projectTemplateId": localStorage.getItem("projectTemplateId"),
|
|
||||||
"remark": "",
|
|
||||||
"status": 0,
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
console.log(obj);
|
|
||||||
|
|
||||||
|
const createProject = () => {
|
||||||
for (let i in errorMsgs) {
|
for (let i in errorMsgs) {
|
||||||
console.log(obj[i]);
|
if (projectInfo.value[i] === "" || projectInfo.value[i] === undefined) {
|
||||||
if (obj[i] === "" || obj[i] === undefined) {
|
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning(errorMsgs[i]);
|
message.warning(errorMsgs[i]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
api
|
api.templateEdit({...projectInfo.value, courseSyncFlag: projectInfo.value.courseSyncFlag ? 1 : 0}).then(() => {
|
||||||
.templateEdit(obj)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.status == 200 && res.data.code == 200) {
|
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
setTimeout(() => {
|
router.back()
|
||||||
router.push({
|
|
||||||
path: "/projectmanage",
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
} else {
|
|
||||||
message.destroy();
|
|
||||||
message.error("编辑失败,请检查当前网络状态。");
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
message.destroy();
|
|
||||||
message.error("编辑失败,请检查当前网络状态。");
|
|
||||||
});
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
|
||||||
...toRefs(state),
|
|
||||||
projectName,
|
|
||||||
classifyList,
|
|
||||||
classificationChange,
|
|
||||||
classificationChange1,
|
|
||||||
classificationChange2,
|
|
||||||
classificationChange3,
|
|
||||||
classificationChange4,
|
|
||||||
fileList,
|
|
||||||
fileList1,
|
|
||||||
loading,
|
|
||||||
imageUrl,
|
|
||||||
handleChange,
|
|
||||||
handleChange1,
|
|
||||||
beforeUpload,
|
|
||||||
beforeUpload1,
|
|
||||||
onRangeChange,
|
|
||||||
classifyList1,
|
|
||||||
classifyList2,
|
|
||||||
classifyList3,
|
|
||||||
classifyList4,
|
|
||||||
uplodaFileCount,
|
|
||||||
createProject,
|
|
||||||
// removeFile,
|
|
||||||
isEdit,
|
|
||||||
backPage,
|
|
||||||
dateFormatList,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function managerChange(e, l, d) {
|
||||||
|
projectInfo.value.valuesourceBelongId = d
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.projectAdd {
|
.projectAdd {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: inherit;
|
// height: inherit;
|
||||||
|
|||||||
Reference in New Issue
Block a user