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