mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage
This commit is contained in:
43
package-lock.json
generated
43
package-lock.json
generated
@@ -14,8 +14,10 @@
|
||||
"element-plus": "^2.2.17",
|
||||
"jquery": "^3.6.1",
|
||||
"qs": "^6.11.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuex": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -9658,6 +9660,11 @@
|
||||
"websocket-driver": "^0.7.4"
|
||||
}
|
||||
},
|
||||
"node_modules/sortablejs": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
|
||||
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -10601,6 +10608,22 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vuedraggable": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz",
|
||||
"integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
|
||||
"dependencies": {
|
||||
"sortablejs": "1.14.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/vuedraggable/node_modules/sortablejs": {
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz",
|
||||
"integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w=="
|
||||
},
|
||||
"node_modules/vuex": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
|
||||
@@ -18839,6 +18862,11 @@
|
||||
"websocket-driver": "^0.7.4"
|
||||
}
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
|
||||
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -19589,6 +19617,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"vuedraggable": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz",
|
||||
"integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
|
||||
"requires": {
|
||||
"sortablejs": "1.14.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"sortablejs": {
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz",
|
||||
"integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"vuex": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
"element-plus": "^2.2.17",
|
||||
"jquery": "^3.6.1",
|
||||
"qs": "^6.11.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuex": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -75,7 +75,7 @@ export default defineComponent({
|
||||
flex: 1 1 auto;
|
||||
// flex-shrink: 0;
|
||||
display: flex;
|
||||
overflow-y: scroll;
|
||||
overflow-y: auto;
|
||||
// display: flex;
|
||||
// flex: 1 1 auto;
|
||||
width: calc(100% - 40px);
|
||||
|
||||
@@ -59,7 +59,8 @@ export const getRouterDetail = (routerId) => http.get('/admin/router/detail', {
|
||||
routerId: routerId,
|
||||
}
|
||||
});
|
||||
|
||||
//添加学员
|
||||
export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,11 +33,7 @@ import qs from 'qs';
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
// , {
|
||||
// header: {
|
||||
// 'token': '123',
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// 接口-请求
|
||||
|
||||
@@ -48,7 +44,11 @@ export const createEvaluation = (obj) => http.post('/evaluation/createEvaluation
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
||||
|
||||
//删除测评信息
|
||||
export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj })
|
||||
export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }, {
|
||||
header: {
|
||||
'token': '123',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
//根据ID获取测评信息详情
|
||||
|
||||
14
src/api/indexTask.js
Normal file
14
src/api/indexTask.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import http from "./config";
|
||||
|
||||
|
||||
// 获取路径图详情-包含关卡及任务列表
|
||||
export const GetRouterDetail = (routerId) => http.get(`/admin/router/detail?routerId=${routerId}`)
|
||||
|
||||
// 新建或编辑阶段任务
|
||||
export const ProjectEditTask = (obj) => http.post('/admin/project/editTask',obj)
|
||||
// 新建或编辑关卡任务
|
||||
export const RouterEditTask = (obj) => http.post('/admin/router/editTask',obj)
|
||||
// 删除关卡任务
|
||||
export const RouterDeleteTask = (obj) => http.post('/admin/router/deleteTask',obj);
|
||||
// 删除项目任务
|
||||
export const ProjectDeleteTask = (obj) => http.delete('/admin/project/deleteTask',obj);
|
||||
@@ -345,14 +345,14 @@ textarea {
|
||||
.drawerMain {
|
||||
min-width: 700px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
.contentMain {
|
||||
flex: 1;
|
||||
overflow-y: scroll;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -376,7 +376,7 @@ textarea {
|
||||
.drawerMain {
|
||||
min-width: 700px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ textarea {
|
||||
.ant-modal {
|
||||
height: calc(100% - 200px);
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
min-width: 900px;
|
||||
max-width: 1300px;
|
||||
padding: 0;
|
||||
@@ -428,7 +428,7 @@ textarea {
|
||||
.modalMain {
|
||||
height: 0px;
|
||||
flex: 1 1 auto;
|
||||
overflow-y: scroll;
|
||||
overflow-y: auto;
|
||||
margin-top: 7px;
|
||||
margin: 0px 52px;
|
||||
|
||||
|
||||
@@ -1,37 +1,51 @@
|
||||
<template>
|
||||
<div class="openPages">
|
||||
<div
|
||||
v-for="(value, index) in openList"
|
||||
:key="index"
|
||||
style="position: relative"
|
||||
<draggable
|
||||
v-model="openList"
|
||||
chosenClass="chosen"
|
||||
forceFallback="true"
|
||||
group="people"
|
||||
animation="1000"
|
||||
@start="onStart"
|
||||
@end="onEnd"
|
||||
:list="openList"
|
||||
style="display: flex"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div style="position: relative">
|
||||
<router-link
|
||||
:to="value.href"
|
||||
:to="element.href"
|
||||
class="openItems"
|
||||
:style="{ background: value.active ? '#f5f7fa' : '' }"
|
||||
:style="{ background: element.active ? '#f5f7fa' : '' }"
|
||||
>
|
||||
<div
|
||||
:style="{
|
||||
color: value.active
|
||||
color: element.active
|
||||
? 'rgba(64, 158, 255, 1)'
|
||||
: 'rgba(135, 139, 146, 1)',
|
||||
}"
|
||||
>
|
||||
{{ value.pagename }}
|
||||
{{ element.pagename }}
|
||||
</div>
|
||||
</router-link>
|
||||
<div class="close" @click.stop="closePage(value)">
|
||||
<div class="close" @click.stop="closePage(element)">
|
||||
<img src="../assets/images/openPages/close.png" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useRouter } from "vue-router";
|
||||
import draggable from "vuedraggable";
|
||||
export default {
|
||||
name: "OpenPages",
|
||||
components: {
|
||||
draggable,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const $router = useRouter();
|
||||
@@ -69,7 +83,7 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss">
|
||||
.openPages {
|
||||
width: 100%;
|
||||
// height: 50px;
|
||||
|
||||
@@ -709,7 +709,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-x: scroll;
|
||||
// overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<span style="margin-right: 3px">讨论设置:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-checkbox v-model:checked="checkedC1">允许讨论</a-checkbox>
|
||||
<a-checkbox v-model:checked="checkedC1">允许评论</a-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +144,6 @@ export default {
|
||||
message.success("创建成功");
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
}, 1000);
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
@@ -285,4 +284,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</a-upload>
|
||||
<span style="padding-bottom: 20px; color: #878b92"
|
||||
>图片格式为</span
|
||||
>图片格式为JPG/PNG 图片大小不可超过1MB</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -179,9 +179,9 @@ export default {
|
||||
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpeg" || file.type === "image/png";
|
||||
file.type === "image/jpg" || file.type === "image/png";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("You can only upload JPG file!");
|
||||
message.error("You can upload JPG/PNG file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||
if (!isLt2M) {
|
||||
@@ -229,21 +229,21 @@ export default {
|
||||
api
|
||||
.createEvaluation(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
apitaskadd.addTask({
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: "",
|
||||
name: obj.evaluationName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 10,
|
||||
});
|
||||
}, 1000);
|
||||
},
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
import { reactive, ref } from "vue";
|
||||
import {message} from"ant-design-vue";
|
||||
import { createWorkTask, queryWorkDetailById, updateWorkTaskUsing} from "@/api/indexWork";
|
||||
import { ProjectEditTask,RouterEditTask } from "@/api/indexTask"
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const rowSelection = ref({
|
||||
@@ -133,7 +134,15 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
workId: {
|
||||
flag: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
projectTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
routerTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
}
|
||||
@@ -261,19 +270,60 @@ export default {
|
||||
if(id) {
|
||||
updateWorkTaskUsing(obj).then((res) => {
|
||||
console.log(res);
|
||||
message.success(`编辑成功`)
|
||||
closeDrawer();
|
||||
}).catch((err) => {
|
||||
message.error(`编辑失败${err}`)
|
||||
})
|
||||
} else {
|
||||
createWorkTask(obj).then((res)=>{
|
||||
message.success(`添加成功${res}`)
|
||||
closeDrawer();
|
||||
console.log(res);
|
||||
}).catch((err)=>{
|
||||
message.error(`添加失败${err}`)
|
||||
})
|
||||
}
|
||||
if(props.flag == 1) {
|
||||
let editObj = {
|
||||
"courseId": 0,
|
||||
"duration": 0,
|
||||
"flag": true,
|
||||
"name": formState.workName,
|
||||
"projectId": 0,
|
||||
"projectTaskId": props.workId || '',
|
||||
"stageId": 0,
|
||||
"type": 4
|
||||
}
|
||||
// 新增编辑或新增项目任务
|
||||
ProjectEditTask(editObj).then(res => {
|
||||
console.log(` 编辑项目成功的打印 ${res}`);
|
||||
message.success(`${props.workId? '编辑' : '新增'}阶段任务成功`)
|
||||
closeDrawer();
|
||||
}).catch(err => {
|
||||
message.error(`${props.workId? '编辑' : '新增'}阶段任务失败`)
|
||||
console.log(` 编辑项目失败的打印 ${err}`);
|
||||
})
|
||||
} else {
|
||||
let editObj1 = {
|
||||
"chapterId":36,
|
||||
"courseId": 0,
|
||||
"duration": 0,
|
||||
"flag": true,
|
||||
"name": formState.workName,
|
||||
"routerId": 92,
|
||||
"routerTaskId": 0,
|
||||
"type": 4
|
||||
}
|
||||
// 新增编辑或新增关卡任务
|
||||
RouterEditTask(editObj1).then(res => {
|
||||
console.log(` 编辑关卡成功的打印 ${res}`);
|
||||
message.success(`${props.workId? '编辑' : '新增'}关卡任务成功`)
|
||||
closeDrawer();
|
||||
}).catch(err => {
|
||||
message.error(`${props.workId? '编辑' : '新增'}关卡任务失败`)
|
||||
console.log(` 编辑关卡失败的打印 ${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
return {
|
||||
afterVisibleChange,
|
||||
|
||||
@@ -202,21 +202,20 @@ export default {
|
||||
api
|
||||
.createAppraiseMessage(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
apitaskadd.addTask({
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: "",
|
||||
name: obj.appraiseName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 11,
|
||||
});
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
|
||||
@@ -1051,7 +1051,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.main {
|
||||
overflow: scroll;
|
||||
overflow: auto;
|
||||
.minatitl {
|
||||
display: flex;
|
||||
.up1 {
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
|
||||
<a-input
|
||||
v-model:value="formState.examinationDuration"
|
||||
type="number"
|
||||
style="width: 388px; height: 32px;
|
||||
margin-left: 35px;"
|
||||
/>
|
||||
@@ -100,6 +101,7 @@
|
||||
|
||||
<a-input-number
|
||||
:min="-1" :precision="0"
|
||||
type="number"
|
||||
v-model:value="formState.examinationLimit"
|
||||
style="width: 88px; height: 32px;
|
||||
border-radius: 8px;overflow: hidden;"
|
||||
@@ -161,6 +163,7 @@
|
||||
|
||||
<a-input
|
||||
v-model:value="formState.passLine"
|
||||
type="number"
|
||||
style="width: 88px; height: 32px;margin-left: 35px;"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -197,6 +200,8 @@
|
||||
import { reactive, ref } from "vue";
|
||||
import {message} from"ant-design-vue";
|
||||
import {createExamination,queryExaminationDetailById,updateExamination} from "@/api/indexExam"
|
||||
import { ProjectEditTask } from "@/api/indexTask"
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
@@ -225,7 +230,7 @@ export default {
|
||||
},
|
||||
examinationId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
default: -1,
|
||||
}
|
||||
},
|
||||
setup(props, ctx) {
|
||||
@@ -429,21 +434,38 @@ export default {
|
||||
if(id) {
|
||||
updateExamination(obj).then((res)=>{
|
||||
console.log(res);
|
||||
message.success(`编辑成功`)
|
||||
closeDrawer();
|
||||
}).catch(()=>{
|
||||
message.error(`编辑失败`)
|
||||
})
|
||||
} else {
|
||||
createExamination(obj).then((res)=>{
|
||||
message.success(`添加成功${res}`)
|
||||
closeDrawer();
|
||||
createExamination(obj).then(()=>{
|
||||
}).catch((err)=>{
|
||||
message.error(`添加失败${err}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
let editObj = {
|
||||
"courseId": 0,
|
||||
"duration": 0,
|
||||
"flag": true,
|
||||
"name": "",
|
||||
"projectId": 0,
|
||||
"projectTaskId": props.examinationId || '',
|
||||
"stageId": 0,
|
||||
"type": 5
|
||||
}
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj).then(res => {
|
||||
console.log(` 编辑项目成功的打印 ${res}`);
|
||||
message.success(`${props.examinationId? '编辑' : '新增'}阶段任务成功`)
|
||||
closeDrawer();
|
||||
}).catch(err => {
|
||||
message.error(`${props.examinationId? '编辑' : '新增'}阶段任务失败`)
|
||||
console.log(` 编辑项目失败的打印 ${err}`);
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("formState", bool);
|
||||
|
||||
@@ -203,21 +203,20 @@ export default {
|
||||
api
|
||||
.createVote(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
apitaskadd.addTask({
|
||||
apitaskadd
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: "",
|
||||
name: obj.voteName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 12,
|
||||
});
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -223,7 +223,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 400px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-x: scroll;
|
||||
// overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -513,7 +513,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.noticebox {
|
||||
|
||||
@@ -722,7 +722,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -831,7 +831,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -123,7 +123,6 @@
|
||||
<stu-add v-model:Stuvisible="Stuvisible" />
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -280,7 +279,6 @@ export default {
|
||||
state.Stuvisible = true;
|
||||
};
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
@@ -298,7 +296,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
//overflow-x: scroll;
|
||||
//overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -388,7 +386,7 @@ export default {
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409EFF;
|
||||
background: #409eff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
@@ -396,8 +394,8 @@ export default {
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #409EFF;
|
||||
border: 1px solid #409EFF;
|
||||
color: #409eff;
|
||||
border: 1px solid #409eff;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -441,7 +439,7 @@ export default {
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409EFF;
|
||||
background: #409eff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
@@ -449,8 +447,8 @@ export default {
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
margin-right: 20px;
|
||||
color:#409EFF;
|
||||
border: 1px solid #409EFF;
|
||||
color: #409eff;
|
||||
border: 1px solid #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,11 +517,11 @@ export default {
|
||||
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1) !important;
|
||||
color: rgba(0, 0, 0, 0.8500);
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.ant-table-cell {
|
||||
color: rgba(0, 0, 0, 0.6500);
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
.ant-table-selection-column {
|
||||
@@ -545,7 +543,6 @@ export default {
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.ant-table-tbody > tr > td {
|
||||
|
||||
@@ -794,7 +794,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -786,7 +786,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ export default {
|
||||
// overflow: auto;
|
||||
min-width: 500px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
</div>
|
||||
<div class="one second">
|
||||
<span class="left">说明:</span>
|
||||
<span class="right">班级说明,此班级为产品经理班级,其他岗位不要进入请大家按照规定时间进行任务学习</span>
|
||||
<span class="right"
|
||||
>班级说明,此班级为产品经理班级,其他岗位不要进入请大家按照规定时间进行任务学习</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
@@ -30,7 +32,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -77,7 +78,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="添加组织" force-render>
|
||||
@@ -173,7 +172,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
@@ -257,7 +255,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
@@ -789,7 +786,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="添加组织" force-render>
|
||||
@@ -173,7 +172,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
@@ -257,7 +255,6 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
@@ -789,7 +786,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-x: scroll;
|
||||
// overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -786,7 +786,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -786,7 +786,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -71,18 +71,30 @@
|
||||
<div class="mainbox">
|
||||
<a-collapse v-model:activeKey="stageListActive">
|
||||
<template #expandIcon="{ isActive }">
|
||||
<img style="margin-right: 20px"
|
||||
<img
|
||||
style="margin-right: 20px"
|
||||
:src="
|
||||
isActive
|
||||
? require('../../assets/images/studentimg/open.png')
|
||||
: require('../../assets/images/studentimg/close.png')
|
||||
" />
|
||||
"
|
||||
/>
|
||||
<div></div>
|
||||
</template>
|
||||
<a-collapse-panel v-for="(value, index) in stageList" :key="index" :header="value.text">
|
||||
<div class="rowclass" v-for="(item, key) in value.children" :key="key">
|
||||
<a-collapse-panel
|
||||
v-for="(value, index) in stageList"
|
||||
:key="index"
|
||||
:header="value.text"
|
||||
>
|
||||
<div
|
||||
class="rowclass"
|
||||
v-for="(item, key) in value.children"
|
||||
:key="key"
|
||||
>
|
||||
<div class="leftclass">
|
||||
<div><img :src="
|
||||
<div>
|
||||
<img
|
||||
:src="
|
||||
item.course === '在线'
|
||||
? require('../../assets/images/leveladd/zai.png')
|
||||
: item.course === '面授'
|
||||
@@ -108,17 +120,21 @@
|
||||
: item.course === '投票'
|
||||
? require('../../assets/images/leveladd/tou.png')
|
||||
: null
|
||||
" /></div>
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="text1">{{ item.course }}</div>
|
||||
<div class="text2">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img :src="
|
||||
<img
|
||||
:src="
|
||||
item.complete === '已完成'
|
||||
? require('../../assets/images/studentimg/complete.png')
|
||||
: require('../../assets/images/studentimg/notice.png')
|
||||
"/>
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="altext">{{ item.complete }}</div>
|
||||
</div>
|
||||
@@ -259,7 +275,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
@@ -361,7 +377,7 @@ export default {
|
||||
//border: 1px solid rgba(221, 238, 255, 1);
|
||||
//border-radius: 6px;
|
||||
.ant-collapse {
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
border: 0;
|
||||
}
|
||||
.ant-collapse-content > .ant-collapse-content-box {
|
||||
|
||||
@@ -1050,7 +1050,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
<!-- 创建小组抽屉 -->
|
||||
<add-group v-model:Avisible="Avisible" />
|
||||
</a-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -120,7 +119,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -365,7 +365,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 520px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
// overflow-x: scroll;
|
||||
// overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
@@ -318,11 +318,11 @@ export default {
|
||||
// }
|
||||
// }
|
||||
.TimeManage {
|
||||
// overflow-x: scroll;
|
||||
// overflow-x: auto;
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.noticebox {
|
||||
|
||||
@@ -31,19 +31,23 @@
|
||||
</div>
|
||||
<div class="box1" style="margin-left: 64px">
|
||||
<div class="asstype">题干:</div>
|
||||
<div style="color: rgba(153, 153, 153, 1);font-size: 14px">这个课程你觉得对你有用吗?</div>
|
||||
<div style="color: rgba(153, 153, 153, 1); font-size: 14px">
|
||||
这个课程你觉得对你有用吗?
|
||||
</div>
|
||||
</div>
|
||||
<a-radio-group v-model:value="value">
|
||||
<div class="box1" style="margin-left: 55px; margin-top: 20px">
|
||||
<div class="asstype">选择1:</div>
|
||||
<a-radio :value="1">有用</a-radio>
|
||||
</div>
|
||||
<div class="box1" style="margin-left: 55px;margin-top: 20px;margin-bottom: 30px">
|
||||
<div
|
||||
class="box1"
|
||||
style="margin-left: 55px; margin-top: 20px; margin-bottom: 30px"
|
||||
>
|
||||
<div class="asstype">选择2:</div>
|
||||
<a-radio :value="2">没用</a-radio>
|
||||
</div>
|
||||
</a-radio-group>
|
||||
|
||||
</div>
|
||||
<div class="assessbox" style="margin-top: 30px">
|
||||
<div class="box1">
|
||||
@@ -52,11 +56,18 @@
|
||||
</div>
|
||||
<div class="box1" style="margin-left: 64px">
|
||||
<div class="asstype">标题:</div>
|
||||
<div style="color: rgba(153, 153, 153, 1);font-size: 14px">对这个课程有什么建议吗?</div>
|
||||
<div style="color: rgba(153, 153, 153, 1); font-size: 14px">
|
||||
对这个课程有什么建议吗?
|
||||
</div>
|
||||
<div class="box1" style="margin-left: 64px;margin-top: 20px;margin-bottom: 30px">
|
||||
</div>
|
||||
<div
|
||||
class="box1"
|
||||
style="margin-left: 64px; margin-top: 20px; margin-bottom: 30px"
|
||||
>
|
||||
<div class="asstype">描述:</div>
|
||||
<div style="color: rgba(51, 51, 51, 1);font-size: 14px">希望以后这样的课程能够躲开,让我们多多了解!</div>
|
||||
<div style="color: rgba(51, 51, 51, 1); font-size: 14px">
|
||||
希望以后这样的课程能够躲开,让我们多多了解!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="assessbox" style="margin-top: 30px">
|
||||
@@ -66,7 +77,9 @@
|
||||
</div>
|
||||
<div class="box1" style="margin-left: 64px">
|
||||
<div class="asstype">标题:</div>
|
||||
<div style="color: rgba(153, 153, 153, 1);font-size: 14px">请给当前课程打分</div>
|
||||
<div style="color: rgba(153, 153, 153, 1); font-size: 14px">
|
||||
请给当前课程打分
|
||||
</div>
|
||||
</div>
|
||||
<div class="lastbox">
|
||||
<div class="sorcetext">非常不满意</div>
|
||||
@@ -131,7 +144,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
@@ -215,7 +228,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(64, 158, 255, 1);
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
margin: 20px 5px;
|
||||
@@ -228,13 +241,12 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid rgba(151, 151, 151, 0.29);
|
||||
color: rgba(0, 0, 0, 0.6500);
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
margin: 20px 5px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 450px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -486,7 +486,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -6,8 +6,9 @@ export default createStore({
|
||||
pagename: "学习路径",
|
||||
href: "/learningpath",
|
||||
active: true,
|
||||
},]
|
||||
},],
|
||||
|
||||
routerId: null,
|
||||
},
|
||||
getters: {
|
||||
|
||||
@@ -16,7 +17,11 @@ export default createStore({
|
||||
chengeOpenpages(state, list) {
|
||||
// console.log('list', list)
|
||||
state.openpages = list
|
||||
}
|
||||
},
|
||||
chengeRouterId(state, routerId) {
|
||||
// console.log('list', list)
|
||||
state.routerId = routerId
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
|
||||
@@ -20,7 +20,6 @@ export default {
|
||||
name: "TestPage",
|
||||
setup() {
|
||||
const state = reactive({});
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
};
|
||||
@@ -30,14 +29,10 @@ export default {
|
||||
$(document).ready(function () {
|
||||
var range = { x: 0, y: 0 }; //鼠标元素偏移量
|
||||
var lastPos = { x: 0, y: 0, x1: 0, y1: 0 }; //拖拽对象的四个坐标
|
||||
|
||||
var tarPos = { x: 0, y: 0, x1: 0, y1: 0 }; //目标元素对象的坐标初始化
|
||||
|
||||
var theDiv = null,
|
||||
move = false;
|
||||
|
||||
var choose = false; //拖拽对象 拖拽状态 选中状态
|
||||
|
||||
// var theDivId = 0;
|
||||
// var theDivHeight = 0;
|
||||
var theDivHalf = 0;
|
||||
@@ -101,7 +96,6 @@ $(document).ready(function () {
|
||||
if (!choose) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!move) {
|
||||
//恢复对象的初始样式
|
||||
|
||||
|
||||
@@ -1042,36 +1042,36 @@ export default {
|
||||
<div
|
||||
class="jc"
|
||||
onClick={() => {
|
||||
state.out1 = true;
|
||||
state.pathName = text.record.manager;
|
||||
// state.pathBg = "";
|
||||
// state.organizationSelectName = null;
|
||||
// state.organizationSelectId = null;
|
||||
state.pathIntro = text.record.remark;
|
||||
state.editPathId = text.record.id;
|
||||
// state.out1 = true;
|
||||
// state.pathName = text.record.manager;
|
||||
// // state.pathBg = "";
|
||||
// // state.organizationSelectName = null;
|
||||
// // state.organizationSelectId = null;
|
||||
// state.pathIntro = text.record.remark;
|
||||
// state.editPathId = text.record.id;
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{text.record.state === "未发布" ? (
|
||||
<div class="fb">
|
||||
<div
|
||||
style="cursor:pointer"
|
||||
class="jc"
|
||||
onClick={() => {
|
||||
showCopyModal();
|
||||
}}
|
||||
>
|
||||
复制
|
||||
</div>
|
||||
></div>
|
||||
</div>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{
|
||||
// text.record.state === "未发布" ? (
|
||||
// <div class="fb">
|
||||
// <div
|
||||
// style="cursor:pointer"
|
||||
// class="jc"
|
||||
// onClick={() => {
|
||||
// showCopyModal();
|
||||
// }}
|
||||
// >
|
||||
// 复制
|
||||
// </div>
|
||||
// </div>
|
||||
// ) : (
|
||||
// <div></div>
|
||||
// )
|
||||
}
|
||||
</div>
|
||||
<div class="tableSelect">
|
||||
<div
|
||||
@@ -1079,8 +1079,8 @@ export default {
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: "/leveladd",
|
||||
query: { routerId: text.record.id },
|
||||
});
|
||||
localStorage.setItem("routerId", text.record.id);
|
||||
}}
|
||||
>
|
||||
管理
|
||||
@@ -1220,13 +1220,26 @@ export default {
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{text.record.state === "未发布" ? (
|
||||
{text.record.state === "已停用" ? (
|
||||
<div>
|
||||
<a-select
|
||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||
value="更多"
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option
|
||||
value="复制"
|
||||
label="复制"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
showCopyModal();
|
||||
}}
|
||||
>
|
||||
复制
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option
|
||||
value="启用"
|
||||
label="启用"
|
||||
|
||||
@@ -258,7 +258,9 @@
|
||||
</router-link>
|
||||
</div>
|
||||
<!-- 无数据显示快速创建 -->
|
||||
<router-link to="/leveladddetail">
|
||||
<router-link
|
||||
:to="{ path: '/leveladddetail', query: { routerId: routerId } }"
|
||||
>
|
||||
<div
|
||||
class="taskbox"
|
||||
style="background: linear-gradient(180deg, #fef3dd, #fffaf0)"
|
||||
@@ -493,13 +495,10 @@
|
||||
<button class="addd" @click="showImpStu">导入学员</button>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="projectName"
|
||||
style="width: 130px"
|
||||
placeholder="更多操作"
|
||||
value="更多操作"
|
||||
:options="projectNameListt"
|
||||
@change="selectProjectName"
|
||||
allowClear
|
||||
showSearch
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -899,7 +898,8 @@ import TimeManage from "../../components/drawers/TimeManage";
|
||||
import TestManage from "../../components/drawers/TestManage";
|
||||
import FaceManage from "../../components/drawers/FaceManage";
|
||||
import WorkManage from "../../components/drawers/WorkManage";
|
||||
import { useRoute } from "vue-router";
|
||||
// import { useRoute } from "vue-router";
|
||||
// import { useStore } from "vuex";
|
||||
import * as api from "../../api/index1";
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
@@ -916,9 +916,10 @@ export default {
|
||||
},
|
||||
methods: {},
|
||||
setup() {
|
||||
const routers = useRoute();
|
||||
// const routers = useRoute();
|
||||
// const store = useStore();
|
||||
const state = reactive({
|
||||
routerId: routers.query.routerId, //学习路径页面传的学习路径id
|
||||
routerId: localStorage.getItem("routerId"), //学习路径页面传的学习路径id
|
||||
gatename: null, //关卡名称
|
||||
gatenamee: null, //学员管理关卡名称
|
||||
deleteAll: false, //批量删除学员弹窗
|
||||
@@ -1237,6 +1238,7 @@ export default {
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log("store", state.routerId);
|
||||
const selectProjectName = (value, index) => {
|
||||
console.log("value", value, index);
|
||||
if (value === "批量删除") {
|
||||
@@ -1472,6 +1474,7 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
//学员管理------------------------------------------------
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -2839,6 +2842,10 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-select-selection-item {
|
||||
padding-left: 15px;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.talk {
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
> -->
|
||||
<div
|
||||
class="items"
|
||||
:class="isactive == index && isActive == true ? 'active' : ''"
|
||||
:class="isactive == index ? 'active' : ''"
|
||||
@click="changebgc(index)"
|
||||
v-for="(item, index) in level"
|
||||
:key="item.id"
|
||||
:key="item.chapterId"
|
||||
>
|
||||
<div class="items1">
|
||||
<div class="boxs_left">
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="nname">{{ item.name }}</div>
|
||||
</div>
|
||||
<!-- <div class="itemle">
|
||||
<div class="tit">{{ item.tit }}</div>
|
||||
<div class="tit">{{ item.remark }}</div>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
</div> -->
|
||||
</div>
|
||||
@@ -159,20 +159,30 @@
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<div class="img" @click="showDrawerAddHomework">
|
||||
<img src="../../assets/images/leveladd/zuo.png" />
|
||||
</div>
|
||||
<div class="text">作业</div>
|
||||
</div>
|
||||
<!-- 添加作业侧弹窗 -->
|
||||
<div>
|
||||
<add-homework
|
||||
flag=0 routerTaskId=ListChoosedId
|
||||
v-model:addhomeworkVisible="addhomeworkvisible" />
|
||||
</div>
|
||||
<div class="lin"></div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<div class="img" @click="showDrawerAddTest">
|
||||
<img src="../../assets/images/leveladd/kao.png" />
|
||||
</div>
|
||||
<div class="text">考试</div>
|
||||
</div>
|
||||
<!-- 添加考试侧弹窗 -->
|
||||
<div>
|
||||
<add-test v-model:addtestVisible="addtestvisible" />
|
||||
</div>
|
||||
<div class="lin"></div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -512,67 +522,27 @@
|
||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||
import AddStu from "../../components/drawers/AddLevelAddStu";
|
||||
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
||||
import AddHomework from "../../components/drawers/AddHomework.vue";
|
||||
import AddTest from "../../components/drawers/AddTest.vue";
|
||||
import * as api from "../../api/indexLevel";
|
||||
import { GetRouterDetail, RouterDeleteTask } from "../../api/indexTask";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "LevelAddDetail",
|
||||
components: {
|
||||
AddStu,
|
||||
ImpStu,
|
||||
AddHomework,
|
||||
AddTest
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
level: [
|
||||
{
|
||||
id: "1",
|
||||
tit: "关卡1关卡1关卡1关卡1关卡1关卡1",
|
||||
name: "初级产品经理fewfewfwefwefe",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
tit: "关卡2",
|
||||
name: "中级产品经理",
|
||||
},
|
||||
chapterId: "1",
|
||||
remark: "关卡说明",
|
||||
name: "默认关卡",
|
||||
}
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
@@ -586,50 +556,6 @@ export default {
|
||||
checked1: false,
|
||||
checkedd: false,
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
lei: "面授",
|
||||
// state: "草稿",
|
||||
creater: "管理者面授",
|
||||
// pubtime: "2022-07-20 14:00:03",
|
||||
cretime: "20分钟",
|
||||
haspub: true,
|
||||
checked1: false,
|
||||
checkedd: false,
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
lei: "作业",
|
||||
// state: "已停用",
|
||||
creater: "管理者作业",
|
||||
// pubtime: "2022-07-20 14:00:03",
|
||||
cretime: "60分钟",
|
||||
haspub: false,
|
||||
checked1: false,
|
||||
checkedd: false,
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
lei: "考试",
|
||||
// state: "草稿",
|
||||
creater: "管理者考试",
|
||||
// pubtime: "2022-07-20 14:00:03",
|
||||
cretime: "20分钟",
|
||||
haspub: true,
|
||||
checked1: false,
|
||||
checkedd: false,
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
lei: "案例",
|
||||
// state: "草稿",
|
||||
creater: "腾飞班1案例",
|
||||
// pubtime: "2022-07-20 14:00:03",
|
||||
cretime: "-",
|
||||
haspub: true,
|
||||
checked1: true,
|
||||
checkedd: false,
|
||||
},
|
||||
],
|
||||
tableData2: [
|
||||
{
|
||||
@@ -814,10 +740,13 @@ export default {
|
||||
value2: "",
|
||||
selectedRowKeys: [],
|
||||
gqxy_hs: true,
|
||||
isactive: -1,
|
||||
isActive: false,
|
||||
isactive: 0,
|
||||
projectChecked: null, //项目单选框
|
||||
addhomeworkvisible: false,
|
||||
addtestvisible:false,
|
||||
updateChapterID: null, //修改关卡id
|
||||
// 表示当前触发列表的id,用来发送编辑和删除
|
||||
ListChoosedId:0
|
||||
});
|
||||
|
||||
//新建关卡
|
||||
@@ -848,26 +777,67 @@ export default {
|
||||
}
|
||||
|
||||
//编辑关卡
|
||||
const updateChapter = () => {
|
||||
let obj = {
|
||||
chapterId: state.updateChapterID,
|
||||
name: "",
|
||||
remark:"",
|
||||
routerId: 0,
|
||||
};
|
||||
api
|
||||
.updateChapter(obj)
|
||||
.then((res) => {
|
||||
console.log("修改成功",res);
|
||||
message.success("修改成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败",err);
|
||||
})
|
||||
};
|
||||
// const updateChapter = () => {
|
||||
// let obj = {
|
||||
// chapterId: state.updateChapterID,
|
||||
// name: "",
|
||||
// remark:"",
|
||||
// routerId: 0,
|
||||
// };
|
||||
// api
|
||||
// .updateChapter(obj)
|
||||
// .then((res) => {
|
||||
// console.log("修改成功",res);
|
||||
// message.success("修改成功");
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log("修改失败",err);
|
||||
// })
|
||||
// };
|
||||
const showDrawer = () => {
|
||||
state.visible = true;
|
||||
};
|
||||
// 作业和考试的抽屉
|
||||
const showDrawerAddHomework = () => {
|
||||
state.addhomeworkvisible = true;
|
||||
state.ListChoosedId = 0
|
||||
};
|
||||
const showDrawerAddTest = () => {
|
||||
state.addtestvisible = true;
|
||||
state.ListChoosedId = 0
|
||||
};
|
||||
|
||||
// tableData数据赋值方法
|
||||
const dataAssignment = () => {
|
||||
console.log((state.level));
|
||||
state.level[0].taskList.forEach((element,index) => {
|
||||
state.tableData[index] = {
|
||||
key:element.routerTaskId,
|
||||
lei:checkType(element.type),
|
||||
creater:element.name,
|
||||
cretime:element.duration,
|
||||
checked1:element.flag
|
||||
}
|
||||
});
|
||||
}
|
||||
const getDetail = (index) => {
|
||||
GetRouterDetail(92).then((res) => {
|
||||
state.level = res.data.data.chapterList
|
||||
console.log(state.level);
|
||||
if(index == 0) {
|
||||
// state.tableData[1] = {
|
||||
// key: 2,
|
||||
// lei: "在线",
|
||||
// creater: "管理者课程",
|
||||
// cretime: "60",
|
||||
// checked1: true,
|
||||
// }
|
||||
dataAssignment(0)
|
||||
}
|
||||
}).catch((err) => {
|
||||
message.error(err)
|
||||
})
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
state.visible = false;
|
||||
};
|
||||
@@ -994,7 +964,7 @@ export default {
|
||||
编辑
|
||||
</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer" onClick={() => {
|
||||
updateChapter();
|
||||
deleteLevelTask()
|
||||
}}>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1004,6 +974,10 @@ export default {
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
const checkType = (index) => {
|
||||
let typeRules = ["","在线","面授","案例","作业","考试","直播","外链","讨论","测评","评估","投票"];
|
||||
return typeRules[index];
|
||||
}
|
||||
const tableDataFunc2 = () => {
|
||||
const columns = [
|
||||
{
|
||||
@@ -1188,6 +1162,7 @@ export default {
|
||||
document.getElementsByTagName("main")[0].style.background =
|
||||
"rgb(245, 247, 250,1)";
|
||||
document.getElementsByTagName("main")[0].style.boxShadow = "none";
|
||||
getDetail(0)
|
||||
});
|
||||
onUnmounted(() => {
|
||||
document.getElementsByTagName("main")[0].style.background = "#ffffff";
|
||||
@@ -1196,7 +1171,7 @@ export default {
|
||||
});
|
||||
const changebgc = (index) => {
|
||||
state.isactive = index;
|
||||
state.isActive = !state.isActive;
|
||||
dataAssignment(index);
|
||||
};
|
||||
const gqxy_hShow = () => {
|
||||
state.gqxy_hs = !state.gqxy_hs;
|
||||
@@ -1207,6 +1182,15 @@ export default {
|
||||
const delete_exit = () => {
|
||||
state.deleteAll = false;
|
||||
};
|
||||
const deleteLevelTask = () => {
|
||||
RouterDeleteTask(state.listChoosedId).then((res) => {
|
||||
console.log(`删除成功${res}`);
|
||||
message.success('删除成功')
|
||||
}).catch((err) => {
|
||||
console.log(`删除失败${err}`);
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
tableDataFunc,
|
||||
@@ -1226,7 +1210,10 @@ export default {
|
||||
delete_exit,
|
||||
drawertableColumns,
|
||||
editChapter,
|
||||
updateChapter,
|
||||
// updateChapter,
|
||||
showDrawerAddHomework,
|
||||
showDrawerAddTest,
|
||||
deleteLevelTask,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -11,43 +11,72 @@
|
||||
<div class="main">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目归属</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<div style="color: #C7CBD2;font-size: 14px;margin-left: 15px">{{ projectAscription }}</div>
|
||||
<div style="color: #c7cbd2; font-size: 14px; margin-left: 15px">
|
||||
{{ projectAscription }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">班级名称</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="projectName" placeholder="请输入班级名称" show-count :maxlength="30" />
|
||||
<a-input
|
||||
v-model:value="projectName"
|
||||
placeholder="请输入班级名称"
|
||||
show-count
|
||||
:maxlength="30"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">分类</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||
@change="classificationChange" allowClear showSearch>
|
||||
"
|
||||
v-model:value="classifySelect"
|
||||
placeholder="四个养成"
|
||||
style="width: 100%"
|
||||
:options="classifyList"
|
||||
@change="classificationChange"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<div class="box" style="
|
||||
<div
|
||||
class="box"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
@@ -55,15 +84,29 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
">
|
||||
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
||||
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
||||
<img style="
|
||||
"
|
||||
>
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="/api/file/upload"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
"
|
||||
v-if="imageUrl"
|
||||
:src="imageUrl"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div v-else>
|
||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||
@@ -76,43 +119,71 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">子项目时间</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
||||
<a-range-picker
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px"
|
||||
show-time
|
||||
@change="onRangeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">子项目经理</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" :value="classifySelect1" mode="multiple" placeholder="请选择子项目经理" style="width: 100%" :options="classifyList1"
|
||||
@change="classificationChange1" allowClear showSearch>
|
||||
"
|
||||
:value="classifySelect1"
|
||||
mode="multiple"
|
||||
placeholder="请选择子项目经理"
|
||||
style="width: 100%"
|
||||
:options="classifyList1"
|
||||
@change="classificationChange1"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">资源归属</div>
|
||||
</div>
|
||||
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2"
|
||||
@change="classificationChange2" />
|
||||
"
|
||||
v-model:value="classifySelect2"
|
||||
placeholder="自动带出 可修改"
|
||||
:options="classifyList2"
|
||||
@change="classificationChange2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -120,7 +191,13 @@
|
||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
|
||||
<a-textarea
|
||||
v-model:value="remark"
|
||||
style="height: 80px"
|
||||
placeholder="请输入说明"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -128,67 +205,113 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目级别</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
"
|
||||
v-model:value="classifySelect3"
|
||||
:options="classifyList3"
|
||||
@change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">培训体系</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
"
|
||||
v-model:value="classifySelect4"
|
||||
:options="classifyList4"
|
||||
@change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">是否BOEU实施</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">BOEU实施</span></a-radio>
|
||||
"
|
||||
>BOEU实施</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
<div class="namebox" style="margin-top: 8px">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<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">
|
||||
<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"
|
||||
>
|
||||
<!-- <a-button> -->
|
||||
<!-- <upload-outlined></upload-outlined> -->
|
||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||
<span v-if="fileList1.length > 5" class="filetext"
|
||||
>上传数量已经达到最大值</span
|
||||
>
|
||||
<span v-else class="filetext">上传附件</span>
|
||||
<!-- </a-button> -->
|
||||
</a-upload>
|
||||
@@ -203,12 +326,19 @@
|
||||
<div class="name">
|
||||
<div class="inname" style="width: 50px">模版</div>
|
||||
<div class="in select" style="margin-left: 2px">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||
@change="classificationChange5">
|
||||
"
|
||||
v-model:value="classifySelect5"
|
||||
placeholder="请选择模版"
|
||||
:size="size"
|
||||
style="width: 100%"
|
||||
:options="classifyList5"
|
||||
@change="classificationChange5"
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,7 +346,9 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||
>确定</a-button
|
||||
>
|
||||
<a-button class="btn2">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,7 +356,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
|
||||
@@ -242,17 +374,17 @@ export default {
|
||||
valueE1: null,
|
||||
valueE2: null,
|
||||
|
||||
projectAscription: '',
|
||||
projectAscription: "",
|
||||
});
|
||||
|
||||
const projectName = ref('');
|
||||
const projectName = ref("");
|
||||
|
||||
state.projectAscription = routers.query.name;
|
||||
|
||||
const classifyList = ref([
|
||||
{ value: 1, label: '管理者' },
|
||||
{ value: 2, label: '领军者' },
|
||||
{ value: 3, label: '产业人' },
|
||||
{ value: 1, label: "管理者" },
|
||||
{ value: 2, label: "领军者" },
|
||||
{ value: 3, label: "产业人" },
|
||||
]);
|
||||
|
||||
let projectType = "";
|
||||
@@ -264,23 +396,23 @@ export default {
|
||||
|
||||
function getBase64(img, callback) {
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => callback(reader.result));
|
||||
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 imageUrl = ref("");
|
||||
let picUrl = "";
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传图片返回的信息 %o', info)
|
||||
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) => {
|
||||
@@ -288,9 +420,9 @@ export default {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -299,12 +431,17 @@ export default {
|
||||
let attach = "";
|
||||
let attachData = "";
|
||||
const handleChange1 = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传附件返回的信息 %o', info, info.fileList.length, uplodaFileCount)
|
||||
if (info.file.status === "done") {
|
||||
console.log(
|
||||
"上传附件返回的信息 %o",
|
||||
info,
|
||||
info.fileList.length,
|
||||
uplodaFileCount
|
||||
);
|
||||
|
||||
let attachStr = "";
|
||||
attachData = info.fileList;
|
||||
@@ -312,10 +449,10 @@ export default {
|
||||
if (attachData.length - 1 == i) {
|
||||
attachStr += attachData[i].response.data;
|
||||
} else {
|
||||
attachStr += attachData[i].response.data + ',';
|
||||
attachStr += attachData[i].response.data + ",";
|
||||
}
|
||||
}
|
||||
console.log(attachStr)
|
||||
console.log(attachStr);
|
||||
attach = attachStr;
|
||||
|
||||
if (info.fileList.length > 5) {
|
||||
@@ -324,20 +461,21 @@ export default {
|
||||
uplodaFileCount = false;
|
||||
}
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpeg" || file.type === "image/png";
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload JPG file!');
|
||||
message.error("You can only upload JPG file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 1MB!');
|
||||
message.error("Image must smaller than 1MB!");
|
||||
}
|
||||
return isJpgOrPng && isLt2M;
|
||||
};
|
||||
@@ -345,112 +483,114 @@ export default {
|
||||
const beforeUpload1 = () => {
|
||||
return new Promise((resovle, reject) => {
|
||||
if (uplodaFileCount) {
|
||||
message.info("上传文件数量已达最大数量")
|
||||
message.info("上传文件数量已达最大数量");
|
||||
return reject(false);
|
||||
}
|
||||
return resovle(true);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
let beginTime = "";
|
||||
let endTime = "";
|
||||
const onRangeChange = (value, dateString) => {
|
||||
console.log('Selected Time: ', value);
|
||||
console.log("Selected Time: ", value);
|
||||
// 项目时间选择函数
|
||||
console.log('Formatted Selected Time: ', dateString);
|
||||
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
|
||||
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: '刘孟君' },
|
||||
{ value: 1, label: "李俊国" },
|
||||
{ value: 2, label: "将小米" },
|
||||
{ value: 3, label: "刘孟君" },
|
||||
]);
|
||||
|
||||
let manager = "";
|
||||
let managerId = "";
|
||||
const classificationChange1 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList1);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
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 + ',';
|
||||
midstr += key[i] + ",";
|
||||
mstr += classifyList1.value[i].label + ",";
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList1.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
console.log(mstr, midstr);
|
||||
manager = mstr;
|
||||
managerId = midstr;
|
||||
};
|
||||
|
||||
// 资源归属 sourceBelongId 后续给接口
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
{ value: 1, label: "项目一" },
|
||||
{ value: 2, label: "项目二" },
|
||||
{ value: 3, label: "项目三" },
|
||||
]);
|
||||
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList2);
|
||||
}
|
||||
};
|
||||
|
||||
// 项目级别
|
||||
const classifyList3 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
{ value: 1, label: "集团级" },
|
||||
{ value: 2, label: "组织级" },
|
||||
{ value: 3, label: "现地级" },
|
||||
{ value: 4, label: "部门级" },
|
||||
]);
|
||||
const classificationChange3 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList3);
|
||||
}
|
||||
};
|
||||
|
||||
// 培训体系
|
||||
const classifyList4 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
{ value: 1, label: "集团级" },
|
||||
{ value: 2, label: "组织级" },
|
||||
{ value: 3, label: "现地级" },
|
||||
{ value: 4, label: "部门级" },
|
||||
]);
|
||||
const classificationChange4 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList4);
|
||||
}
|
||||
};
|
||||
|
||||
// 模版
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: '模版一' },
|
||||
{ value: 2, label: '模版二' },
|
||||
{ value: 3, label: '模版三' },
|
||||
{ value: 4, label: '模版四' },
|
||||
{ value: 1, label: "模版一" },
|
||||
{ value: 2, label: "模版二" },
|
||||
{ value: 3, label: "模版三" },
|
||||
{ value: 4, label: "模版四" },
|
||||
]);
|
||||
const classificationChange5 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList5);
|
||||
}
|
||||
};
|
||||
|
||||
// 项目说明
|
||||
const remark = ref('');
|
||||
const remark = ref("");
|
||||
|
||||
let courseSyncFlag = 0;
|
||||
const changeChecked = () => {
|
||||
console.log(state.checked)
|
||||
state.checked ? state.checked = false : state.checked = true;
|
||||
console.log(state.checked);
|
||||
state.checked ? (state.checked = false) : (state.checked = true);
|
||||
courseSyncFlag = state.checked ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
let boeFlag = 0;
|
||||
const changeChecked1 = () => {
|
||||
console.log(state.checked1)
|
||||
state.checked1 ? state.checked1 = false : state.checked1 = true;
|
||||
console.log(state.checked1);
|
||||
state.checked1 ? (state.checked1 = false) : (state.checked1 = true);
|
||||
boeFlag = state.checked1 ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
const removeFile = (file) => {
|
||||
const index = fileList1.value.indexOf(file);
|
||||
@@ -463,85 +603,87 @@ export default {
|
||||
attachStr = "";
|
||||
}
|
||||
for (let i = 0; i < fileList1["value"].length; i++) {
|
||||
console.log(fileList1["value"][i].response.data)
|
||||
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 + ',';
|
||||
attachStr += fileList1["value"][i].response.data + ",";
|
||||
}
|
||||
}
|
||||
attach = attachStr;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const errorMsgs = {
|
||||
"name": "请输入项目名称",
|
||||
"category": "请选择项目分类",
|
||||
"picUrl": "请上传项目封面图",
|
||||
"beginTime": "请选择项目开始时间",
|
||||
"endTime": "请选择项目结束时间",
|
||||
"manager": "请选择项目经理",
|
||||
"managerId": "请选择项目经理",
|
||||
"sourceBelongId": "请选择资源归属",
|
||||
"level": "请填写项目级别",
|
||||
"systemId": "请填写项目培训体系",
|
||||
"boeFlag": "请选择是否BOE实施",
|
||||
"attach": "请上传附件"
|
||||
}
|
||||
name: "请输入项目名称",
|
||||
category: "请选择项目分类",
|
||||
picUrl: "请上传项目封面图",
|
||||
beginTime: "请选择项目开始时间",
|
||||
endTime: "请选择项目结束时间",
|
||||
manager: "请选择项目经理",
|
||||
managerId: "请选择项目经理",
|
||||
sourceBelongId: "请选择资源归属",
|
||||
level: "请填写项目级别",
|
||||
systemId: "请填写项目培训体系",
|
||||
boeFlag: "请选择是否BOE实施",
|
||||
attach: "请上传附件",
|
||||
};
|
||||
|
||||
const createProject = () => {
|
||||
let obj = {
|
||||
"name": projectName["value"],
|
||||
"category": projectType,
|
||||
"picUrl": picUrl,
|
||||
"beginTime": beginTime,
|
||||
"endTime": endTime,
|
||||
"manager": manager,
|
||||
"managerId": managerId,
|
||||
"sourceBelongId": 11,
|
||||
"remark": remark["value"],
|
||||
"courseSyncFlag": courseSyncFlag,
|
||||
"level": 3,
|
||||
"systemId": 4,
|
||||
"boeFlag": boeFlag,
|
||||
"attach": attach,
|
||||
"type": 3,
|
||||
"templateId": 10,
|
||||
"parentId": routers.query.projectId,
|
||||
"notice": "",
|
||||
"noticeFlag": 0,
|
||||
"status": 0
|
||||
}
|
||||
console.log('提交的数据格式 %o', obj)
|
||||
name: projectName["value"],
|
||||
category: projectType,
|
||||
picUrl: picUrl,
|
||||
beginTime: beginTime,
|
||||
endTime: endTime,
|
||||
manager: manager,
|
||||
managerId: managerId,
|
||||
sourceBelongId: 11,
|
||||
remark: remark["value"],
|
||||
courseSyncFlag: courseSyncFlag,
|
||||
level: 3,
|
||||
systemId: 4,
|
||||
boeFlag: boeFlag,
|
||||
attach: attach,
|
||||
type: 3,
|
||||
templateId: 10,
|
||||
parentId: routers.query.projectId,
|
||||
notice: "",
|
||||
noticeFlag: 0,
|
||||
status: 0,
|
||||
};
|
||||
console.log("提交的数据格式 %o", obj);
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i])
|
||||
console.log(obj[i]);
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy()
|
||||
message.warning(errorMsgs[i])
|
||||
return
|
||||
message.destroy();
|
||||
message.warning(errorMsgs[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
api.createProject(obj).then(res => {
|
||||
console.log(res)
|
||||
api
|
||||
.createProject(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
message.destroy();
|
||||
message.success("创建成功")
|
||||
message.success("创建成功");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: '/taskpage',
|
||||
query: { id: res.data.data.projectId }
|
||||
path: "/taskpage",
|
||||
query: { id: res.data.data.projectId },
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
message.error("创建失败,请检查当前网络状态。");
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。");
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -573,9 +715,9 @@ export default {
|
||||
changeChecked1,
|
||||
uplodaFileCount,
|
||||
createProject,
|
||||
removeFile
|
||||
removeFile,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -584,7 +726,7 @@ export default {
|
||||
// height: inherit;
|
||||
// flex: 1;
|
||||
// flex-shrink: 0;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
@@ -872,4 +1014,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -11,34 +11,58 @@
|
||||
<div class="main">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目名称</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="projectName" placeholder="请输入项目名称" show-count :maxlength="30" />
|
||||
<a-input
|
||||
v-model:value="projectName"
|
||||
placeholder="请输入项目名称"
|
||||
show-count
|
||||
:maxlength="30"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">分类</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||
@change="classificationChange" allowClear showSearch>
|
||||
"
|
||||
v-model:value="classifySelect"
|
||||
placeholder="四个养成"
|
||||
style="width: 100%"
|
||||
:options="classifyList"
|
||||
@change="classificationChange"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<div class="box" style="
|
||||
<div
|
||||
class="box"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
@@ -46,15 +70,29 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
">
|
||||
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
||||
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
||||
<img style="
|
||||
"
|
||||
>
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="/api/file/upload"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
"
|
||||
v-if="imageUrl"
|
||||
:src="imageUrl"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div v-else>
|
||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||
@@ -67,43 +105,71 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目时间</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
||||
<a-range-picker
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px"
|
||||
show-time
|
||||
@change="onRangeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目经理</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" :value="classifySelect1" mode="multiple" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||
@change="classificationChange1" allowClear showSearch>
|
||||
"
|
||||
:value="classifySelect1"
|
||||
mode="multiple"
|
||||
placeholder="请选择项目经理"
|
||||
style="width: 100%"
|
||||
:options="classifyList1"
|
||||
@change="classificationChange1"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">资源归属</div>
|
||||
</div>
|
||||
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2"
|
||||
@change="classificationChange2" />
|
||||
"
|
||||
v-model:value="classifySelect2"
|
||||
placeholder="自动带出 可修改"
|
||||
:options="classifyList2"
|
||||
@change="classificationChange2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -111,7 +177,13 @@
|
||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
|
||||
<a-textarea
|
||||
v-model:value="remark"
|
||||
style="height: 80px"
|
||||
placeholder="请输入说明"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -119,67 +191,113 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目级别</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
"
|
||||
v-model:value="classifySelect3"
|
||||
:options="classifyList3"
|
||||
@change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">培训体系</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
"
|
||||
v-model:value="classifySelect4"
|
||||
:options="classifyList4"
|
||||
@change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">是否BOEU实施</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">BOEU实施</span></a-radio>
|
||||
"
|
||||
>BOEU实施</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
<div class="namebox" style="margin-top: 8px">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<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">
|
||||
<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"
|
||||
>
|
||||
<!-- <a-button> -->
|
||||
<!-- <upload-outlined></upload-outlined> -->
|
||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||
<span v-if="fileList1.length > 5" class="filetext"
|
||||
>上传数量已经达到最大值</span
|
||||
>
|
||||
<span v-else class="filetext">上传附件</span>
|
||||
<!-- </a-button> -->
|
||||
</a-upload>
|
||||
@@ -194,12 +312,19 @@
|
||||
<div class="name">
|
||||
<div class="inname" style="width: 50px">模版</div>
|
||||
<div class="in select" style="margin-left: 2px">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||
@change="classificationChange5">
|
||||
"
|
||||
v-model:value="classifySelect5"
|
||||
placeholder="请选择模版"
|
||||
:size="size"
|
||||
style="width: 100%"
|
||||
:options="classifyList5"
|
||||
@change="classificationChange5"
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,7 +332,9 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||
>确定</a-button
|
||||
>
|
||||
<a-button class="btn2">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -215,7 +342,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
|
||||
@@ -230,15 +357,15 @@ export default {
|
||||
checked1: false,
|
||||
valueE: null,
|
||||
valueE1: null,
|
||||
valueE2: null
|
||||
valueE2: null,
|
||||
});
|
||||
|
||||
const projectName = ref('');
|
||||
const projectName = ref("");
|
||||
|
||||
const classifyList = ref([
|
||||
{ value: 1, label: '管理者' },
|
||||
{ value: 2, label: '领军者' },
|
||||
{ value: 3, label: '产业人' },
|
||||
{ value: 1, label: "管理者" },
|
||||
{ value: 2, label: "领军者" },
|
||||
{ value: 3, label: "产业人" },
|
||||
]);
|
||||
|
||||
let projectType = "";
|
||||
@@ -250,23 +377,23 @@ export default {
|
||||
|
||||
function getBase64(img, callback) {
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => callback(reader.result));
|
||||
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 imageUrl = ref("");
|
||||
let picUrl = "";
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传图片返回的信息 %o', info)
|
||||
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) => {
|
||||
@@ -274,9 +401,9 @@ export default {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -285,12 +412,17 @@ export default {
|
||||
let attach = "";
|
||||
let attachData = "";
|
||||
const handleChange1 = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传附件返回的信息 %o', info, info.fileList.length, uplodaFileCount)
|
||||
if (info.file.status === "done") {
|
||||
console.log(
|
||||
"上传附件返回的信息 %o",
|
||||
info,
|
||||
info.fileList.length,
|
||||
uplodaFileCount
|
||||
);
|
||||
|
||||
let attachStr = "";
|
||||
attachData = info.fileList;
|
||||
@@ -298,10 +430,10 @@ export default {
|
||||
if (attachData.length - 1 == i) {
|
||||
attachStr += attachData[i].response.data;
|
||||
} else {
|
||||
attachStr += attachData[i].response.data + ',';
|
||||
attachStr += attachData[i].response.data + ",";
|
||||
}
|
||||
}
|
||||
console.log(attachStr)
|
||||
console.log(attachStr);
|
||||
attach = attachStr;
|
||||
|
||||
if (info.fileList.length > 5) {
|
||||
@@ -310,20 +442,21 @@ export default {
|
||||
uplodaFileCount = false;
|
||||
}
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpeg" || file.type === "image/png";
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload JPG file!');
|
||||
message.error("You can only upload JPG file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 1MB!');
|
||||
message.error("Image must smaller than 1MB!");
|
||||
}
|
||||
return isJpgOrPng && isLt2M;
|
||||
};
|
||||
@@ -331,112 +464,114 @@ export default {
|
||||
const beforeUpload1 = () => {
|
||||
return new Promise((resovle, reject) => {
|
||||
if (uplodaFileCount) {
|
||||
message.info("上传文件数量已达最大数量")
|
||||
message.info("上传文件数量已达最大数量");
|
||||
return reject(false);
|
||||
}
|
||||
return resovle(true);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
let beginTime = "";
|
||||
let endTime = "";
|
||||
const onRangeChange = (value, dateString) => {
|
||||
console.log('Selected Time: ', value);
|
||||
console.log("Selected Time: ", value);
|
||||
// 项目时间选择函数
|
||||
console.log('Formatted Selected Time: ', dateString);
|
||||
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
|
||||
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: '刘孟君' },
|
||||
{ value: 1, label: "李俊国" },
|
||||
{ value: 2, label: "将小米" },
|
||||
{ value: 3, label: "刘孟君" },
|
||||
]);
|
||||
|
||||
let manager = "";
|
||||
let managerId = "";
|
||||
const classificationChange1 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList1);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
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 + ',';
|
||||
midstr += key[i] + ",";
|
||||
mstr += classifyList1.value[i].label + ",";
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList1.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
console.log(mstr, midstr);
|
||||
manager = mstr;
|
||||
managerId = midstr;
|
||||
};
|
||||
|
||||
// 资源归属 sourceBelongId 后续给接口
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
{ value: 1, label: "项目一" },
|
||||
{ value: 2, label: "项目二" },
|
||||
{ value: 3, label: "项目三" },
|
||||
]);
|
||||
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList2);
|
||||
}
|
||||
};
|
||||
|
||||
// 项目级别
|
||||
const classifyList3 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
{ value: 1, label: "集团级" },
|
||||
{ value: 2, label: "组织级" },
|
||||
{ value: 3, label: "现地级" },
|
||||
{ value: 4, label: "部门级" },
|
||||
]);
|
||||
const classificationChange3 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList3);
|
||||
}
|
||||
};
|
||||
|
||||
// 培训体系
|
||||
const classifyList4 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
{ value: 1, label: "集团级" },
|
||||
{ value: 2, label: "组织级" },
|
||||
{ value: 3, label: "现地级" },
|
||||
{ value: 4, label: "部门级" },
|
||||
]);
|
||||
const classificationChange4 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList4);
|
||||
}
|
||||
};
|
||||
|
||||
// 模版
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: '模版一' },
|
||||
{ value: 2, label: '模版二' },
|
||||
{ value: 3, label: '模版三' },
|
||||
{ value: 4, label: '模版四' },
|
||||
{ value: 1, label: "模版一" },
|
||||
{ value: 2, label: "模版二" },
|
||||
{ value: 3, label: "模版三" },
|
||||
{ value: 4, label: "模版四" },
|
||||
]);
|
||||
const classificationChange5 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList5);
|
||||
}
|
||||
};
|
||||
|
||||
// 项目说明
|
||||
const remark = ref('');
|
||||
const remark = ref("");
|
||||
|
||||
let courseSyncFlag = 0;
|
||||
const changeChecked = () => {
|
||||
console.log(state.checked)
|
||||
state.checked ? state.checked = false : state.checked = true;
|
||||
console.log(state.checked);
|
||||
state.checked ? (state.checked = false) : (state.checked = true);
|
||||
courseSyncFlag = state.checked ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
let boeFlag = 0;
|
||||
const changeChecked1 = () => {
|
||||
console.log(state.checked1)
|
||||
state.checked1 ? state.checked1 = false : state.checked1 = true;
|
||||
console.log(state.checked1);
|
||||
state.checked1 ? (state.checked1 = false) : (state.checked1 = true);
|
||||
boeFlag = state.checked1 ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
const removeFile = (file) => {
|
||||
const index = fileList1.value.indexOf(file);
|
||||
@@ -449,85 +584,87 @@ export default {
|
||||
attachStr = "";
|
||||
}
|
||||
for (let i = 0; i < fileList1["value"].length; i++) {
|
||||
console.log(fileList1["value"][i].response.data)
|
||||
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 + ',';
|
||||
attachStr += fileList1["value"][i].response.data + ",";
|
||||
}
|
||||
}
|
||||
attach = attachStr;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const errorMsgs = {
|
||||
"name": "请输入项目名称",
|
||||
"category": "请选择项目分类",
|
||||
"picUrl": "请上传项目封面图",
|
||||
"beginTime": "请选择项目开始时间",
|
||||
"endTime": "请选择项目结束时间",
|
||||
"manager": "请选择项目经理",
|
||||
"managerId": "请选择项目经理",
|
||||
"sourceBelongId": "请选择资源归属",
|
||||
"level": "请填写项目级别",
|
||||
"systemId": "请填写项目培训体系",
|
||||
"boeFlag": "请选择是否BOE实施",
|
||||
"attach": "请上传附件"
|
||||
}
|
||||
name: "请输入项目名称",
|
||||
category: "请选择项目分类",
|
||||
picUrl: "请上传项目封面图",
|
||||
beginTime: "请选择项目开始时间",
|
||||
endTime: "请选择项目结束时间",
|
||||
manager: "请选择项目经理",
|
||||
managerId: "请选择项目经理",
|
||||
sourceBelongId: "请选择资源归属",
|
||||
level: "请填写项目级别",
|
||||
systemId: "请填写项目培训体系",
|
||||
boeFlag: "请选择是否BOE实施",
|
||||
attach: "请上传附件",
|
||||
};
|
||||
|
||||
const createProject = () => {
|
||||
let obj = {
|
||||
"name": projectName["value"],
|
||||
"category": projectType,
|
||||
"picUrl": picUrl,
|
||||
"beginTime": beginTime,
|
||||
"endTime": endTime,
|
||||
"manager": manager,
|
||||
"managerId": managerId,
|
||||
"sourceBelongId": 11,
|
||||
"remark": remark["value"],
|
||||
"courseSyncFlag": courseSyncFlag,
|
||||
"level": 3,
|
||||
"systemId": 4,
|
||||
"boeFlag": boeFlag,
|
||||
"attach": attach,
|
||||
"type": 3,
|
||||
"templateId": 10,
|
||||
"parentId": 0,
|
||||
"notice": "",
|
||||
"noticeFlag": 0,
|
||||
"status": 0
|
||||
}
|
||||
console.log('提交的数据格式 %o', obj)
|
||||
name: projectName["value"],
|
||||
category: projectType,
|
||||
picUrl: picUrl,
|
||||
beginTime: beginTime,
|
||||
endTime: endTime,
|
||||
manager: manager,
|
||||
managerId: managerId,
|
||||
sourceBelongId: 11,
|
||||
remark: remark["value"],
|
||||
courseSyncFlag: courseSyncFlag,
|
||||
level: 3,
|
||||
systemId: 4,
|
||||
boeFlag: boeFlag,
|
||||
attach: attach,
|
||||
type: 3,
|
||||
templateId: 10,
|
||||
parentId: 0,
|
||||
notice: "",
|
||||
noticeFlag: 0,
|
||||
status: 0,
|
||||
};
|
||||
console.log("提交的数据格式 %o", obj);
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i])
|
||||
console.log(obj[i]);
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy()
|
||||
message.warning(errorMsgs[i])
|
||||
return
|
||||
message.destroy();
|
||||
message.warning(errorMsgs[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
api.createProject(obj).then(res => {
|
||||
console.log(res)
|
||||
api
|
||||
.createProject(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
message.destroy();
|
||||
message.success("创建成功")
|
||||
message.success("创建成功");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: '/taskpage',
|
||||
query: { id: res.data.data.projectId }
|
||||
path: "/taskpage",
|
||||
query: { id: res.data.data.projectId },
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
message.error("创建失败,请检查当前网络状态。");
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。");
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -559,9 +696,9 @@ export default {
|
||||
changeChecked1,
|
||||
uplodaFileCount,
|
||||
createProject,
|
||||
removeFile
|
||||
removeFile,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -570,7 +707,7 @@ export default {
|
||||
// height: inherit;
|
||||
// flex: 1;
|
||||
// flex-shrink: 0;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,43 +11,72 @@
|
||||
<div class="main">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目归属</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<div style="color: #C7CBD2;font-size: 14px;margin-left: 15px">{{ projectAscription }}</div>
|
||||
<div style="color: #c7cbd2; font-size: 14px; margin-left: 15px">
|
||||
{{ projectAscription }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">子项目名称</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="projectName" placeholder="请输入子项目名称" show-count :maxlength="30" />
|
||||
<a-input
|
||||
v-model:value="projectName"
|
||||
placeholder="请输入子项目名称"
|
||||
show-count
|
||||
:maxlength="30"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">分类</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||
@change="classificationChange" allowClear showSearch>
|
||||
"
|
||||
v-model:value="classifySelect"
|
||||
placeholder="四个养成"
|
||||
style="width: 100%"
|
||||
:options="classifyList"
|
||||
@change="classificationChange"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<div class="box" style="
|
||||
<div
|
||||
class="box"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
@@ -55,15 +84,29 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
">
|
||||
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
||||
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
||||
<img style="
|
||||
"
|
||||
>
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="/api/file/upload"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
"
|
||||
v-if="imageUrl"
|
||||
:src="imageUrl"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div v-else>
|
||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||
@@ -76,43 +119,71 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">子项目时间</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
||||
<a-range-picker
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px"
|
||||
show-time
|
||||
@change="onRangeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">子项目经理</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" :value="classifySelect1" mode="multiple" placeholder="请选择子项目经理" style="width: 100%" :options="classifyList1"
|
||||
@change="classificationChange1" allowClear showSearch>
|
||||
"
|
||||
:value="classifySelect1"
|
||||
mode="multiple"
|
||||
placeholder="请选择子项目经理"
|
||||
style="width: 100%"
|
||||
:options="classifyList1"
|
||||
@change="classificationChange1"
|
||||
allowClear
|
||||
showSearch
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">资源归属</div>
|
||||
</div>
|
||||
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2"
|
||||
@change="classificationChange2" />
|
||||
"
|
||||
v-model:value="classifySelect2"
|
||||
placeholder="自动带出 可修改"
|
||||
:options="classifyList2"
|
||||
@change="classificationChange2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -120,7 +191,13 @@
|
||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
|
||||
<a-textarea
|
||||
v-model:value="remark"
|
||||
style="height: 80px"
|
||||
placeholder="请输入说明"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -128,67 +205,113 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目级别</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
"
|
||||
v-model:value="classifySelect3"
|
||||
:options="classifyList3"
|
||||
@change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">培训体系</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
"
|
||||
v-model:value="classifySelect4"
|
||||
:options="classifyList4"
|
||||
@change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">是否BOEU实施</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">BOEU实施</span></a-radio>
|
||||
"
|
||||
>BOEU实施</span
|
||||
></a-radio
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
<div class="namebox" style="margin-top: 8px">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<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">
|
||||
<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"
|
||||
>
|
||||
<!-- <a-button> -->
|
||||
<!-- <upload-outlined></upload-outlined> -->
|
||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||
<span v-if="fileList1.length > 5" class="filetext"
|
||||
>上传数量已经达到最大值</span
|
||||
>
|
||||
<span v-else class="filetext">上传附件</span>
|
||||
<!-- </a-button> -->
|
||||
</a-upload>
|
||||
@@ -203,12 +326,19 @@
|
||||
<div class="name">
|
||||
<div class="inname" style="width: 50px">模版</div>
|
||||
<div class="in select" style="margin-left: 2px">
|
||||
<a-select :getPopupContainer="
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||
@change="classificationChange5">
|
||||
"
|
||||
v-model:value="classifySelect5"
|
||||
placeholder="请选择模版"
|
||||
:size="size"
|
||||
style="width: 100%"
|
||||
:options="classifyList5"
|
||||
@change="classificationChange5"
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,7 +346,9 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||
>确定</a-button
|
||||
>
|
||||
<a-button class="btn2">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,7 +356,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
|
||||
@@ -242,17 +374,17 @@ export default {
|
||||
valueE1: null,
|
||||
valueE2: null,
|
||||
|
||||
projectAscription:'',
|
||||
projectAscription: "",
|
||||
});
|
||||
|
||||
const projectName = ref('');
|
||||
const projectName = ref("");
|
||||
|
||||
state.projectAscription = routers.query.name;
|
||||
|
||||
const classifyList = ref([
|
||||
{ value: 1, label: '管理者' },
|
||||
{ value: 2, label: '领军者' },
|
||||
{ value: 3, label: '产业人' },
|
||||
{ value: 1, label: "管理者" },
|
||||
{ value: 2, label: "领军者" },
|
||||
{ value: 3, label: "产业人" },
|
||||
]);
|
||||
|
||||
let projectType = "";
|
||||
@@ -264,23 +396,23 @@ export default {
|
||||
|
||||
function getBase64(img, callback) {
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => callback(reader.result));
|
||||
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 imageUrl = ref("");
|
||||
let picUrl = "";
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传图片返回的信息 %o', info)
|
||||
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) => {
|
||||
@@ -288,9 +420,9 @@ export default {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -299,12 +431,17 @@ export default {
|
||||
let attach = "";
|
||||
let attachData = "";
|
||||
const handleChange1 = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
if (info.file.status === "uploading") {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传附件返回的信息 %o', info, info.fileList.length, uplodaFileCount)
|
||||
if (info.file.status === "done") {
|
||||
console.log(
|
||||
"上传附件返回的信息 %o",
|
||||
info,
|
||||
info.fileList.length,
|
||||
uplodaFileCount
|
||||
);
|
||||
|
||||
let attachStr = "";
|
||||
attachData = info.fileList;
|
||||
@@ -312,10 +449,10 @@ export default {
|
||||
if (attachData.length - 1 == i) {
|
||||
attachStr += attachData[i].response.data;
|
||||
} else {
|
||||
attachStr += attachData[i].response.data + ',';
|
||||
attachStr += attachData[i].response.data + ",";
|
||||
}
|
||||
}
|
||||
console.log(attachStr)
|
||||
console.log(attachStr);
|
||||
attach = attachStr;
|
||||
|
||||
if (info.fileList.length > 5) {
|
||||
@@ -324,20 +461,21 @@ export default {
|
||||
uplodaFileCount = false;
|
||||
}
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
if (info.file.status === "error") {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpeg" || file.type === "image/png";
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload JPG file!');
|
||||
message.error("You can only upload JPG file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 1MB!');
|
||||
message.error("Image must smaller than 1MB!");
|
||||
}
|
||||
return isJpgOrPng && isLt2M;
|
||||
};
|
||||
@@ -345,112 +483,114 @@ export default {
|
||||
const beforeUpload1 = () => {
|
||||
return new Promise((resovle, reject) => {
|
||||
if (uplodaFileCount) {
|
||||
message.info("上传文件数量已达最大数量")
|
||||
message.info("上传文件数量已达最大数量");
|
||||
return reject(false);
|
||||
}
|
||||
return resovle(true);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
let beginTime = "";
|
||||
let endTime = "";
|
||||
const onRangeChange = (value, dateString) => {
|
||||
console.log('Selected Time: ', value);
|
||||
console.log("Selected Time: ", value);
|
||||
// 项目时间选择函数
|
||||
console.log('Formatted Selected Time: ', dateString);
|
||||
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
|
||||
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: '刘孟君' },
|
||||
{ value: 1, label: "李俊国" },
|
||||
{ value: 2, label: "将小米" },
|
||||
{ value: 3, label: "刘孟君" },
|
||||
]);
|
||||
|
||||
let manager = "";
|
||||
let managerId = "";
|
||||
const classificationChange1 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList1);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
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 + ',';
|
||||
midstr += key[i] + ",";
|
||||
mstr += classifyList1.value[i].label + ",";
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList1.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
console.log(mstr, midstr);
|
||||
manager = mstr;
|
||||
managerId = midstr;
|
||||
};
|
||||
|
||||
// 资源归属 sourceBelongId 后续给接口
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
{ value: 1, label: "项目一" },
|
||||
{ value: 2, label: "项目二" },
|
||||
{ value: 3, label: "项目三" },
|
||||
]);
|
||||
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList2);
|
||||
}
|
||||
};
|
||||
|
||||
// 项目级别
|
||||
const classifyList3 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
{ value: 1, label: "集团级" },
|
||||
{ value: 2, label: "组织级" },
|
||||
{ value: 3, label: "现地级" },
|
||||
{ value: 4, label: "部门级" },
|
||||
]);
|
||||
const classificationChange3 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList3);
|
||||
}
|
||||
};
|
||||
|
||||
// 培训体系
|
||||
const classifyList4 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
{ value: 1, label: "集团级" },
|
||||
{ value: 2, label: "组织级" },
|
||||
{ value: 3, label: "现地级" },
|
||||
{ value: 4, label: "部门级" },
|
||||
]);
|
||||
const classificationChange4 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList4);
|
||||
}
|
||||
};
|
||||
|
||||
// 模版
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: '模版一' },
|
||||
{ value: 2, label: '模版二' },
|
||||
{ value: 3, label: '模版三' },
|
||||
{ value: 4, label: '模版四' },
|
||||
{ value: 1, label: "模版一" },
|
||||
{ value: 2, label: "模版二" },
|
||||
{ value: 3, label: "模版三" },
|
||||
{ value: 4, label: "模版四" },
|
||||
]);
|
||||
const classificationChange5 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList5);
|
||||
}
|
||||
};
|
||||
|
||||
// 项目说明
|
||||
const remark = ref('');
|
||||
const remark = ref("");
|
||||
|
||||
let courseSyncFlag = 0;
|
||||
const changeChecked = () => {
|
||||
console.log(state.checked)
|
||||
state.checked ? state.checked = false : state.checked = true;
|
||||
console.log(state.checked);
|
||||
state.checked ? (state.checked = false) : (state.checked = true);
|
||||
courseSyncFlag = state.checked ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
let boeFlag = 0;
|
||||
const changeChecked1 = () => {
|
||||
console.log(state.checked1)
|
||||
state.checked1 ? state.checked1 = false : state.checked1 = true;
|
||||
console.log(state.checked1);
|
||||
state.checked1 ? (state.checked1 = false) : (state.checked1 = true);
|
||||
boeFlag = state.checked1 ? 1 : 0;
|
||||
}
|
||||
};
|
||||
|
||||
const removeFile = (file) => {
|
||||
const index = fileList1.value.indexOf(file);
|
||||
@@ -463,85 +603,87 @@ export default {
|
||||
attachStr = "";
|
||||
}
|
||||
for (let i = 0; i < fileList1["value"].length; i++) {
|
||||
console.log(fileList1["value"][i].response.data)
|
||||
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 + ',';
|
||||
attachStr += fileList1["value"][i].response.data + ",";
|
||||
}
|
||||
}
|
||||
attach = attachStr;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const errorMsgs = {
|
||||
"name": "请输入项目名称",
|
||||
"category": "请选择项目分类",
|
||||
"picUrl": "请上传项目封面图",
|
||||
"beginTime": "请选择项目开始时间",
|
||||
"endTime": "请选择项目结束时间",
|
||||
"manager": "请选择项目经理",
|
||||
"managerId": "请选择项目经理",
|
||||
"sourceBelongId": "请选择资源归属",
|
||||
"level": "请填写项目级别",
|
||||
"systemId": "请填写项目培训体系",
|
||||
"boeFlag": "请选择是否BOE实施",
|
||||
"attach": "请上传附件"
|
||||
}
|
||||
name: "请输入项目名称",
|
||||
category: "请选择项目分类",
|
||||
picUrl: "请上传项目封面图",
|
||||
beginTime: "请选择项目开始时间",
|
||||
endTime: "请选择项目结束时间",
|
||||
manager: "请选择项目经理",
|
||||
managerId: "请选择项目经理",
|
||||
sourceBelongId: "请选择资源归属",
|
||||
level: "请填写项目级别",
|
||||
systemId: "请填写项目培训体系",
|
||||
boeFlag: "请选择是否BOE实施",
|
||||
attach: "请上传附件",
|
||||
};
|
||||
|
||||
const createProject = () => {
|
||||
let obj = {
|
||||
"name": projectName["value"],
|
||||
"category": projectType,
|
||||
"picUrl": picUrl,
|
||||
"beginTime": beginTime,
|
||||
"endTime": endTime,
|
||||
"manager": manager,
|
||||
"managerId": managerId,
|
||||
"sourceBelongId": 11,
|
||||
"remark": remark["value"],
|
||||
"courseSyncFlag": courseSyncFlag,
|
||||
"level": 3,
|
||||
"systemId": 4,
|
||||
"boeFlag": boeFlag,
|
||||
"attach": attach,
|
||||
"type": 3,
|
||||
"templateId": 10,
|
||||
"parentId": routers.query.projectId,
|
||||
"notice": "",
|
||||
"noticeFlag": 0,
|
||||
"status": 0
|
||||
}
|
||||
console.log('提交的数据格式 %o', obj)
|
||||
name: projectName["value"],
|
||||
category: projectType,
|
||||
picUrl: picUrl,
|
||||
beginTime: beginTime,
|
||||
endTime: endTime,
|
||||
manager: manager,
|
||||
managerId: managerId,
|
||||
sourceBelongId: 11,
|
||||
remark: remark["value"],
|
||||
courseSyncFlag: courseSyncFlag,
|
||||
level: 3,
|
||||
systemId: 4,
|
||||
boeFlag: boeFlag,
|
||||
attach: attach,
|
||||
type: 3,
|
||||
templateId: 10,
|
||||
parentId: routers.query.projectId,
|
||||
notice: "",
|
||||
noticeFlag: 0,
|
||||
status: 0,
|
||||
};
|
||||
console.log("提交的数据格式 %o", obj);
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i])
|
||||
console.log(obj[i]);
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy()
|
||||
message.warning(errorMsgs[i])
|
||||
return
|
||||
message.destroy();
|
||||
message.warning(errorMsgs[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
api.createProject(obj).then(res => {
|
||||
console.log(res)
|
||||
api
|
||||
.createProject(obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
message.destroy();
|
||||
message.success("创建成功")
|
||||
message.success("创建成功");
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: '/taskpage',
|
||||
query: { id: res.data.data.projectId }
|
||||
path: "/taskpage",
|
||||
query: { id: res.data.data.projectId },
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
message.error("创建失败,请检查当前网络状态。");
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。");
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -573,9 +715,9 @@ export default {
|
||||
changeChecked1,
|
||||
uplodaFileCount,
|
||||
createProject,
|
||||
removeFile
|
||||
removeFile,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -584,7 +726,7 @@ export default {
|
||||
// height: inherit;
|
||||
// flex: 1;
|
||||
// flex-shrink: 0;
|
||||
// overflow-y: scroll;
|
||||
// overflow-y: auto;
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
@@ -872,4 +1014,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -551,6 +551,7 @@ import * as apidiscuss from "../../api/indexDiscuss";
|
||||
import * as apiactivity from "../../api/indexActivity";
|
||||
import * as apieval from "../../api/indexEval";
|
||||
import * as apiinvist from "../../api/indexInvist";
|
||||
import * as apivote from "../../api/indexVote";
|
||||
const drawercolumns = [
|
||||
{
|
||||
title: "项目名称",
|
||||
@@ -872,7 +873,7 @@ export default {
|
||||
deleteInvistID: 4, //评估
|
||||
deleteDiscussID: null, //删除讨论id
|
||||
deleteActivityID: null, //删除活动id
|
||||
deleteID: "", //删除任务的taskID
|
||||
deleteID: "",
|
||||
});
|
||||
|
||||
const selectProjectName = (value, index) => {
|
||||
@@ -1214,8 +1215,8 @@ export default {
|
||||
//删除测评测试
|
||||
const deleteEvalText = () => {
|
||||
let obj = {
|
||||
evaluationId: state.deleteEvalID,
|
||||
token: "",
|
||||
evaluationId: "",
|
||||
token: 123,
|
||||
};
|
||||
apieval
|
||||
.deleteEvaluationById(obj)
|
||||
@@ -1390,6 +1391,59 @@ export default {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
|
||||
//删除投票信息
|
||||
const deleteVoteText = () => {
|
||||
let obj = {
|
||||
voteId: "",
|
||||
};
|
||||
apivote
|
||||
.deleteVoteMessage(obj)
|
||||
.then((res) => {
|
||||
console.log("删除成功", res);
|
||||
message.success("删除成功");
|
||||
//重新获取列表
|
||||
getTask();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("删除失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
//编辑投票信息
|
||||
const editVotePath = () => {
|
||||
let obj = {
|
||||
baseVote: "",
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
stem: "",
|
||||
stemId: 0,
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
voteEndTime: "",
|
||||
voteExplain: "",
|
||||
voteFlag: "",
|
||||
voteId: 0,
|
||||
voteName: "",
|
||||
voteStartTime: "",
|
||||
voteTag: "",
|
||||
};
|
||||
apivote
|
||||
.editVote(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("修改成功", res);
|
||||
message.success("修改成功");
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败", err);
|
||||
// state.createLoading = false;
|
||||
//重新获取列表
|
||||
getTask();
|
||||
});
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
@@ -1530,12 +1584,14 @@ export default {
|
||||
deleteEvalText,
|
||||
deleteExternalChain,
|
||||
deleteActivity,
|
||||
deleteVoteText,
|
||||
editActivity,
|
||||
editEvalPath,
|
||||
deleteInvistText,
|
||||
editLiveBroadcast,
|
||||
editExternal,
|
||||
editInvistPath,
|
||||
editVotePath,
|
||||
getTableData,
|
||||
deleteTask,
|
||||
};
|
||||
@@ -1795,7 +1851,7 @@ export default {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
|
||||
@@ -62,6 +62,22 @@
|
||||
>
|
||||
跳转
|
||||
</div>
|
||||
<draggable
|
||||
v-model="draggableList"
|
||||
chosenClass="chosen"
|
||||
forceFallback="true"
|
||||
group="people"
|
||||
animation="1000"
|
||||
@start="onStart"
|
||||
@end="onEnd"
|
||||
:list="draggableList"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div class="item" :key="element.id">
|
||||
{{ element.name }}
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -76,12 +92,14 @@ import * as api from "../../api/index1";
|
||||
// reader.readAsDataURL(img);
|
||||
// }
|
||||
import { useRouter } from "vue-router";
|
||||
import draggable from "vuedraggable";
|
||||
export default {
|
||||
name: "SystemManage",
|
||||
components: {
|
||||
AddVote,
|
||||
// LoadingOutlined,
|
||||
// PlusOutlined,
|
||||
draggable,
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
@@ -91,38 +109,30 @@ export default {
|
||||
loading: false,
|
||||
fileList: [],
|
||||
|
||||
voteList: [
|
||||
draggableList: [
|
||||
{
|
||||
id: 1,
|
||||
stem: "题干一", //题干
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
option: "选项一",
|
||||
imgUrl: "",
|
||||
name: "拖拽一",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
option: "选项二",
|
||||
imgUrl: "",
|
||||
},
|
||||
],
|
||||
name: "拖拽二",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
stem: "题干二", //题干
|
||||
options: [
|
||||
{
|
||||
id: 1,
|
||||
option: "选项一",
|
||||
imgUrl: "",
|
||||
id: 3,
|
||||
name: "拖拽三",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
option: "选项二",
|
||||
imgUrl: "",
|
||||
id: 4,
|
||||
name: "拖拽四",
|
||||
},
|
||||
],
|
||||
{
|
||||
id: 5,
|
||||
name: "拖拽五",
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "拖拽六",
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -226,6 +236,12 @@ export default {
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
.item {
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
background-color: pink;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
}
|
||||
.drawerStyle {
|
||||
.drawerMain {
|
||||
|
||||
Reference in New Issue
Block a user