mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
feat:合并
This commit is contained in:
@@ -37,11 +37,8 @@ import http from "./config";
|
||||
|
||||
// 接口-请求
|
||||
|
||||
// 创建编辑单层项目
|
||||
// 创建编辑单层项目(type=3)/ 多层项目(type=1)/ 多层子项目(type=2)
|
||||
export const createProject = (obj) => http.post('/admin/project/edit', obj)
|
||||
|
||||
// 创建多层项目
|
||||
export const createStoreyProject = (obj) => http.post('/admin/project/edit', obj)
|
||||
|
||||
// 获取项目列表
|
||||
export const getProjectList = (obj) => http.post('/admin/project/list', obj)
|
||||
@@ -10,4 +10,4 @@ export const getDiscussDetail = (obj) => http.post('/discuss/getDiscussDetail',
|
||||
export const deleteDiscuss = (obj) => http.post('/discuss/deleteDiscuss', { params: obj });
|
||||
|
||||
//修改讨论接口
|
||||
export const updateDiscuss = (obj) => http.post('/discuss/updateDiscuss', { params: obj });
|
||||
export const updateDiscuss = (obj) => http.post('/discuss/updateDiscuss', obj );
|
||||
@@ -1,5 +1,5 @@
|
||||
import http from "./config";
|
||||
// import qs from 'qs';
|
||||
import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
@@ -33,15 +33,19 @@ import http from "./config";
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
// , {
|
||||
// header: {
|
||||
// 'token': '123',
|
||||
// }
|
||||
// }
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建测评
|
||||
export const createEvaluation = (obj) => http.post('/evaluation/createEvaluation', obj,);
|
||||
export const createEvaluation = (obj) => http.post('/evaluation/createEvaluation', obj);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj,);
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
||||
|
||||
//删除测评信息
|
||||
export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj })
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import http from "./config";
|
||||
|
||||
//新建或编辑关卡
|
||||
//新建关卡
|
||||
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
});
|
||||
//编辑关卡
|
||||
export const updateChapter = (obj) => http.post('/admin/router/editChapter', obj, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,75 @@
|
||||
import http from "./config";
|
||||
import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
// , {
|
||||
// header: {
|
||||
// 'token': '123',
|
||||
// }
|
||||
// }
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//基础票数上传接口
|
||||
// export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj)
|
||||
|
||||
//创建题干信息接口
|
||||
export const createOptionMessage = (obj) => http.post('/vote/createOptionMessage', obj)
|
||||
|
||||
//投票信息创建接口
|
||||
export const createVote = (obj) => http.post('/vote/createVote', obj)
|
||||
|
||||
//删除投票信息
|
||||
export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj })
|
||||
|
||||
//修改投票信息接口
|
||||
export const editVote = (obj) => http.post('/vote/editVote', obj)
|
||||
|
||||
//根据题干ID获取题干信息
|
||||
export const queryStemByStemId = (obj) => http.post('/vote/queryStemByStemId', { params: obj })
|
||||
|
||||
//修改题干信息接口
|
||||
export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
||||
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
|
||||
@@ -71,6 +71,12 @@
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">活动时间:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
@@ -284,8 +290,9 @@ export default {
|
||||
//创建活动
|
||||
const createActivity = () => {
|
||||
if(!state.inputV1) return message.warning("请输入活动名称");
|
||||
if(!state.inputV2) return message.warning("请输入活动时长");
|
||||
if(!state.textV1) return message.warning("请输入活动公告");
|
||||
if(!state.time) return message.warning("请输入活动时间");
|
||||
if(!state.inputV2) return message.warning("请输入活动时长");
|
||||
if(!state.inputV3) return message.warning("请输入活动地址");
|
||||
let startTime = toDate(new Date(state.time[0].$d).getTime() / 1000, "Y-M-D");
|
||||
let endTime = toDate(new Date(state.time[1].$d).getTime() / 1000, "Y-M-D");
|
||||
|
||||
@@ -120,8 +120,8 @@ export default {
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
inputV1: '',
|
||||
inputV2: '',
|
||||
time: undefined,
|
||||
endTimes : "",
|
||||
startTimes: "",
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
evaluationEndTime: state.endTimes,
|
||||
evaluationFlag: "",
|
||||
evaluationId: "",
|
||||
evaluationPictureAddress: state.picUrl,
|
||||
evaluationPictureAddress: "",
|
||||
evaluationStartTime: state.startTimes,
|
||||
evaluationTag: "",
|
||||
evaluationTypeId: 0,
|
||||
|
||||
@@ -18,70 +18,79 @@
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="box" @click="showDrawerCreVote">
|
||||
<button class="cjtpbtn">创建标题</button>
|
||||
<button class="cjtpbtn" @click="addQue()">创建题干</button>
|
||||
</div>
|
||||
<div class="queBox" v-for="(q, index) in questions" :key="index">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">题干:</span>
|
||||
<span style="margin-right: 3px">题干</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
v-model:value="q.inputV"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入题干"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="option" v-for="(o, index) in q.options" :key="index">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">选项1:</span>
|
||||
<span style="margin-right: 3px">{{ o.title }}</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV2"
|
||||
v-model:value="o.opvalue"
|
||||
style="width: 424px; height: 32px"
|
||||
/>
|
||||
<a-button type="link">+ 上传图片</a-button>
|
||||
<a-button v-if="o.opvalue == ''" type="link"
|
||||
>+ 上传图片</a-button
|
||||
>
|
||||
<a-button v-else type="link">删除</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span style="margin-right: 3px">选项2:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV3"
|
||||
style="width: 424px; height: 32px"
|
||||
/>
|
||||
<a-button type="link">+ 上传图片</a-button>
|
||||
<a-button type="link">删除</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<div class="btnbox" @click="addOpt(q.options)">
|
||||
<div class="tjxxbtn"><div class="btntext">添加选项</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button
|
||||
class="btn2"
|
||||
onclick="{()=> {
|
||||
createVoteText()
|
||||
}}"
|
||||
>
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import * as api from "../../api/indexVote";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method";
|
||||
const router = useRouter();
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -113,18 +122,109 @@ export default {
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
inputV3: "",
|
||||
time: undefined,
|
||||
endTimes: "",
|
||||
startTimes: "",
|
||||
questions: [
|
||||
{
|
||||
inputV: "",
|
||||
options: [
|
||||
{
|
||||
title: "选项1",
|
||||
opvalue: "",
|
||||
},
|
||||
{
|
||||
title: "选项2",
|
||||
opvalue: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const addQue = () => {
|
||||
state.questions.push({
|
||||
inputV: "",
|
||||
options: [
|
||||
{
|
||||
title: "选项1",
|
||||
opvalue: "",
|
||||
},
|
||||
{
|
||||
title: "选项2",
|
||||
opvalue: "",
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
const addOpt = (value) => {
|
||||
console.log(value);
|
||||
value.push({
|
||||
title: "选项" + (value.length + 1 * 1),
|
||||
opvalue: "",
|
||||
});
|
||||
};
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:crevoteVisible", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
//创建投票信息
|
||||
const createVoteText = () => {
|
||||
if (!state.inputV1) return message.info("请输入投票名称");
|
||||
if (state.time != undefined) {
|
||||
state.endTimes = toDate(
|
||||
new Date(state.time[0].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
state.startTimes = toDate(
|
||||
new Date(state.time[1].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
}
|
||||
|
||||
let obj = {
|
||||
baseVote: "",
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
stem: "",
|
||||
stemId: 0,
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
voteEndTime: state.endTimes,
|
||||
voteExplain: "",
|
||||
voteFlag: "",
|
||||
voteId: 0,
|
||||
voteName: state.inputV1,
|
||||
voteStartTime: state.startTimes,
|
||||
voteTag: "",
|
||||
};
|
||||
api
|
||||
.createVote(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
// state.createLoading = false;
|
||||
router.push("/leveladd");
|
||||
// getLearnPath();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
createVoteText,
|
||||
addQue,
|
||||
addOpt,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
:visible="Provisible"
|
||||
class="drawerStyle promess"
|
||||
placement="right"
|
||||
width="50%"
|
||||
width="70%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.drawerMain {
|
||||
min-width: 434px;
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
display: flex;
|
||||
|
||||
@@ -69,178 +69,74 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mainbox">
|
||||
<div class="rowtitle" @click="changeDown">
|
||||
<div class="titleimg">
|
||||
<img
|
||||
<a-collapse v-model:activeKey="stageListActive" >
|
||||
<template #expandIcon="{ isActive }">
|
||||
<img style="margin-right: 20px"
|
||||
:src="
|
||||
showDown
|
||||
isActive
|
||||
? require('../../assets/images/studentimg/open.png')
|
||||
: require('../../assets/images/studentimg/close.png')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="titletext">阶段1 腾飞班阶段1</div>
|
||||
</div>
|
||||
<div :style="{ display: showDown ? 'block' : 'none' }">
|
||||
<div class="rowclass">
|
||||
" />
|
||||
<div></div>
|
||||
</template>
|
||||
<a-collapse-panel v-for="(value, index) in stageList" :key="index" :header="value.text">
|
||||
<div class="rowclass" v-for="(item, key) in value.children" :key="key">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zai.png" /></div>
|
||||
<div class="text1">在线</div>
|
||||
<div class="text2">如何成为一个产品经理</div>
|
||||
<div><img :src="
|
||||
item.course === '在线'
|
||||
? require('../../assets/images/leveladd/zai.png')
|
||||
: item.course === '面授'
|
||||
? require('../../assets/images/leveladd/mian.png')
|
||||
: item.course === '案例'
|
||||
? require('../../assets/images/leveladd/an.png')
|
||||
: item.course === '作业'
|
||||
? require('../../assets/images/leveladd/zuo.png')
|
||||
: item.course === '考试'
|
||||
? require('../../assets/images/leveladd/kao.png')
|
||||
: item.course === '直播'
|
||||
? require('../../assets/images/leveladd/zhi.png')
|
||||
: item.course === '外链'
|
||||
? require('../../assets/images/leveladd/wai.png')
|
||||
: item.course === '讨论'
|
||||
? require('../../assets/images/leveladd/tao.png')
|
||||
: item.course === '活动'
|
||||
? require('../../assets/images/leveladd/huo.png')
|
||||
: item.course === '测评'
|
||||
? require('../../assets/images/leveladd/ce.png')
|
||||
: item.course === '调研'
|
||||
? require('../../assets/images/leveladd/diao.png')
|
||||
: item.course === '投票'
|
||||
? require('../../assets/images/leveladd/tou.png')
|
||||
: null
|
||||
" /></div>
|
||||
<div class="text1">{{item.course}}</div>
|
||||
<div class="text2">{{item.name}}</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/complete.png" />
|
||||
</div>
|
||||
<div class="altext">已完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zhi.png" /></div>
|
||||
<div class="text1">直播</div>
|
||||
<div class="text2">管理者播课</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/complete.png" />
|
||||
</div>
|
||||
<div class="altext">已完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/mian.png" /></div>
|
||||
<div class="text1">面授</div>
|
||||
<div class="text2">管理面授课</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/notice.png" />
|
||||
</div>
|
||||
<div class="altext">未完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/huo.png" /></div>
|
||||
<div class="text1">活动</div>
|
||||
<div class="text2">管理者活动</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/notice.png" />
|
||||
</div>
|
||||
<div class="altext">未完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zuo.png" /></div>
|
||||
<div class="text1">作业</div>
|
||||
<div class="text2">管理者作业</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/notice.png" />
|
||||
</div>
|
||||
<div class="altext">未完成</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mainbox">
|
||||
<div class="rowtitle" @click="changeDown1">
|
||||
<div class="titleimg">
|
||||
<img
|
||||
:src="
|
||||
showDown1
|
||||
? require('../../assets/images/studentimg/open.png')
|
||||
: require('../../assets/images/studentimg/close.png')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="titletext">阶段2 腾飞班阶段2</div>
|
||||
</div>
|
||||
<div :style="{ display: showDown1 ? 'block' : 'none' }">
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zai.png" /></div>
|
||||
<div class="text1">在线</div>
|
||||
<div class="text2">如何成为一个产品经理</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/complete.png" />
|
||||
</div>
|
||||
<div class="altext">已完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zhi.png" /></div>
|
||||
<div class="text1">直播</div>
|
||||
<div class="text2">管理者播课</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/complete.png" />
|
||||
</div>
|
||||
<div class="altext">已完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/mian.png" /></div>
|
||||
<div class="text1">面授</div>
|
||||
<div class="text2">管理面授课</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/notice.png" />
|
||||
</div>
|
||||
<div class="altext">未完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/huo.png" /></div>
|
||||
<div class="text1">活动</div>
|
||||
<div class="text2">管理者活动</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/notice.png" />
|
||||
</div>
|
||||
<div class="altext">未完成</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zuo.png" /></div>
|
||||
<div class="text1">作业</div>
|
||||
<div class="text2">管理者作业</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/notice.png" />
|
||||
</div>
|
||||
<div class="altext">未完成</div>
|
||||
<img :src="
|
||||
item.complete === '已完成'
|
||||
? require('../../assets/images/studentimg/complete.png')
|
||||
: require('../../assets/images/studentimg/notice.png')
|
||||
"/>
|
||||
</div>
|
||||
<div class="altext">{{item.complete}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-collapse-panel>
|
||||
</a-collapse>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<pro-mess v-model:Provisible="Provisible" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { reactive, toRefs} from "vue";
|
||||
import ProMess from "./ProMess.vue";
|
||||
export default {
|
||||
name: "SeeStu",
|
||||
@@ -256,6 +152,69 @@ export default {
|
||||
Provisible: false,
|
||||
showDown: true,
|
||||
showDown1: false,
|
||||
stageList: [
|
||||
{
|
||||
text: "阶段1腾飞班阶段1",
|
||||
children: [
|
||||
{
|
||||
course: "在线",
|
||||
name: "如何成为一个产品经理",
|
||||
complete: "已完成",
|
||||
},
|
||||
{
|
||||
course: "直播",
|
||||
name: "管理直播课",
|
||||
complete: "已完成",
|
||||
},
|
||||
{
|
||||
course: "面授",
|
||||
name: "管理面授课",
|
||||
complete: "未完成",
|
||||
},
|
||||
{
|
||||
course: "活动",
|
||||
name: "管理活动",
|
||||
complete: "未完成",
|
||||
},
|
||||
{
|
||||
course: "作业",
|
||||
name: "管理者作业",
|
||||
complete: "未完成",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "阶段2腾飞班阶段2",
|
||||
children: [
|
||||
{
|
||||
course: "考试",
|
||||
name: "如何成为一个产品经理",
|
||||
complete: "已完成",
|
||||
},
|
||||
{
|
||||
course: "案例",
|
||||
name: "如何成为一个产品经理",
|
||||
complete: "已完成",
|
||||
},
|
||||
{
|
||||
course: "外链",
|
||||
name: "如何成为一个产品经理",
|
||||
complete: "已完成",
|
||||
},
|
||||
{
|
||||
course: "讨论",
|
||||
name: "如何成为一个产品经理",
|
||||
complete: "未完成",
|
||||
},
|
||||
{
|
||||
course: "测评",
|
||||
name: "如何成为一个产品经理",
|
||||
complete: "未完成",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
stageListActive: 0,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Seevisible", false);
|
||||
@@ -286,7 +245,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss" >
|
||||
<style lang="scss" >
|
||||
.seestu {
|
||||
.ant-drawer-content-wrapper {
|
||||
// max-width: 1000px;
|
||||
@@ -399,24 +358,33 @@ export default {
|
||||
// height: 463px;
|
||||
margin-right: 37px;
|
||||
margin-top: 32px;
|
||||
//border: 1px solid rgba(221, 238, 255, 1);
|
||||
//border-radius: 6px;
|
||||
.ant-collapse {
|
||||
background-color: #FFFFFF;
|
||||
border: 0;
|
||||
}
|
||||
.ant-collapse-content > .ant-collapse-content-box {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
.ant-collapse > .ant-collapse-item {
|
||||
border: 1px solid rgba(221, 238, 255, 1);
|
||||
border-radius: 6px;
|
||||
.rowtitle {
|
||||
height: 56px;
|
||||
background: rgba(240, 246, 252, 1);
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
.ant-collapse-content {
|
||||
border-top: 0;
|
||||
}
|
||||
.ant-collapse-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.titleimg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-left: 23px;
|
||||
}
|
||||
.titletext {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
height: 56px;
|
||||
background-color: rgba(240, 246, 252, 1);
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 500;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
.rowclass {
|
||||
height: 81px;
|
||||
|
||||
@@ -817,9 +817,10 @@ export default {
|
||||
isactive: -1,
|
||||
isActive: false,
|
||||
projectChecked: null, //项目单选框
|
||||
updateChapterID: null, //修改关卡id
|
||||
});
|
||||
|
||||
//新建或编辑关卡
|
||||
//新建关卡
|
||||
const editChapter = () => {
|
||||
if(!state.value1) return message.warning("请输入关卡名称");
|
||||
let obj = {
|
||||
@@ -845,6 +846,25 @@ export default {
|
||||
console.log("创建失败", err);
|
||||
});
|
||||
}
|
||||
|
||||
//编辑关卡
|
||||
const updateChapter = () => {
|
||||
let obj = {
|
||||
chapterId: state.updateChapterID,
|
||||
name: "",
|
||||
remark:"",
|
||||
routerId: 0,
|
||||
};
|
||||
api
|
||||
.updateChapter(obj)
|
||||
.then((res) => {
|
||||
console.log("修改成功",res);
|
||||
message.success("修改成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败",err);
|
||||
})
|
||||
};
|
||||
const showDrawer = () => {
|
||||
state.visible = true;
|
||||
};
|
||||
@@ -973,7 +993,9 @@ export default {
|
||||
<span style="color:#4EA6FF;margin-right:25px;cursor:pointer">
|
||||
编辑
|
||||
</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer">删除</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer" onClick={() => {
|
||||
updateChapter();
|
||||
}}>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -1204,6 +1226,7 @@ export default {
|
||||
delete_exit,
|
||||
drawertableColumns,
|
||||
editChapter,
|
||||
updateChapter,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -81,12 +81,12 @@
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">项目经理</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<div class="in">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||
" :value="classifySelect1" mode="multiple" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||
@change="classificationChange1" allowClear showSearch>
|
||||
</a-select>
|
||||
</div>
|
||||
@@ -97,8 +97,13 @@
|
||||
<div class="inname">资源归属</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-input v-model:value="valueE" placeholder="自动带出 可修改" />
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2"
|
||||
@change="classificationChange2" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -126,8 +131,13 @@
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">项目级别</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="valueE1" placeholder="集团级/组织级/现地级/部门级" />
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -135,8 +145,13 @@
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">培训体系</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="valueE2" placeholder="集团级/组织级/现地级/部门级" />
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -177,9 +192,14 @@
|
||||
</div>
|
||||
<div class="template">
|
||||
<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">
|
||||
<a-select v-model:value="value1" placeholder="请选择模板" :size="size" style="width: 100%" :options="options">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||
@change="classificationChange5">
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -340,13 +360,66 @@ export default {
|
||||
let manager = "";
|
||||
let managerId = "";
|
||||
const classificationChange1 = (key) => {
|
||||
console.log(`selected ${key}`);
|
||||
console.log(classifyList1.value[key - 1].label)
|
||||
manager = String(classifyList1.value[key - 1].label)
|
||||
managerId = String(key)
|
||||
console.log(`selected ${key}`, classifyList1);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
for (let i = 0; i < key.length; i++) {
|
||||
if (key.length - 1 !== i) {
|
||||
midstr += key[i] + ',';
|
||||
mstr += classifyList1.value[i].label + ',';
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList1.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
manager = mstr;
|
||||
managerId = midstr;
|
||||
};
|
||||
|
||||
// 资源归属 sourceBelongId 后续给接口
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
]);
|
||||
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList2);
|
||||
}
|
||||
|
||||
// 项目级别
|
||||
const classifyList3 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
]);
|
||||
const classificationChange3 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList3);
|
||||
}
|
||||
|
||||
// 培训体系
|
||||
const classifyList4 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
]);
|
||||
const classificationChange4 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList4);
|
||||
}
|
||||
|
||||
// 模版
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: '模版一' },
|
||||
{ value: 2, label: '模版二' },
|
||||
{ value: 3, label: '模版三' },
|
||||
{ value: 4, label: '模版四' },
|
||||
]);
|
||||
const classificationChange5 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList5);
|
||||
}
|
||||
|
||||
// 项目说明
|
||||
const remark = ref('');
|
||||
@@ -438,10 +511,14 @@ export default {
|
||||
api.createProject(obj).then(res => {
|
||||
console.log(res)
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
message.destroy();
|
||||
message.success("创建成功")
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: '/taskpage',
|
||||
query: { id: res.data.data.projectId }
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
@@ -459,6 +536,10 @@ export default {
|
||||
classifyList,
|
||||
classificationChange,
|
||||
classificationChange1,
|
||||
classificationChange2,
|
||||
classificationChange3,
|
||||
classificationChange4,
|
||||
classificationChange5,
|
||||
fileList,
|
||||
fileList1,
|
||||
loading,
|
||||
@@ -469,6 +550,10 @@ export default {
|
||||
beforeUpload1,
|
||||
onRangeChange,
|
||||
classifyList1,
|
||||
classifyList2,
|
||||
classifyList3,
|
||||
classifyList4,
|
||||
classifyList5,
|
||||
remark,
|
||||
changeChecked,
|
||||
changeChecked1,
|
||||
|
||||
@@ -5,28 +5,31 @@
|
||||
<div class="filter">
|
||||
<div class="filterItems">
|
||||
<div class="select">
|
||||
<a-select v-model:value="projectName" style="width: 270px" placeholder="请输入项目名称" :options="projectNameList"
|
||||
@change="selectProjectName" allowClear showSearch></a-select>
|
||||
<a-input v-model:value="sProjectName" style="width: 270px; height: 40px; border-radius: 8px;"
|
||||
placeholder="请输入项目名称" @change="sProjectNameChange" allowClear showSearch>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select v-model:value="projectName" style="width: 270px" placeholder="请输入项目经理" :options="projectNameList"
|
||||
@change="selectProjectName" allowClear showSearch></a-select>
|
||||
<a-input v-model:value="sProjectOrder" style="width: 270px; height: 40px; border-radius: 8px;"
|
||||
placeholder="请输入项目经理" @change="sProjectOrderChange" allowClear showSearch>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select v-model:value="projectName" style="width: 270px" placeholder="请选择状态" :options="projectNameList"
|
||||
@change="selectProjectName" allowClear showSearch></a-select>
|
||||
<a-select v-model:value="sProjectState" style="width: 270px" placeholder="请选择状态" :options="sProjectStateList"
|
||||
@change="sProjectStateChange" allowClear showSearch></a-select>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-date-picker v-model="selectTime" type="date" placeholder="创建时间" style="width: 270px" />
|
||||
<a-date-picker v-model:value="sProjectTime" @change="sProjectTimeChange" type="date" placeholder="创建时间"
|
||||
style="width: 270px" />
|
||||
</div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div class="btnn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
<div class="btnText" v-on:click="searchSubmit">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
<div class="btnText" v-on:click="searchReset">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,7 +106,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
<router-link to="/sonproject" class="taskbox" style="
|
||||
<div @click="createChildProject" class="taskbox" style="
|
||||
margin-right: 24px;
|
||||
background: linear-gradient(180deg, #ddeaff 0%, #f0f8fe 100%);
|
||||
">
|
||||
@@ -119,7 +122,7 @@
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
单层子项目
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="taskbox" @click="showModal3" style="
|
||||
background: linear-gradient(180deg, #fef3dd 0%, #fffaf0 100%);
|
||||
">
|
||||
@@ -240,7 +243,7 @@
|
||||
<img style="width: 10px; height: 10px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<div class="inname">分类:</div>
|
||||
<div class="in">
|
||||
<div class="in select">
|
||||
<a-select v-model:value="value2" placeholder="四个养成" :options="classifyList" @change="classificationChange"
|
||||
style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
@@ -251,7 +254,7 @@
|
||||
</div>
|
||||
<div class="inname">项目经理:</div>
|
||||
<div class="in">
|
||||
<a-select v-model:value="value3" placeholder="请选择项目经理" :options="classifyList1"
|
||||
<a-select v-model:value="value3" mode="multiple" placeholder="请选择项目经理" :options="classifyList1"
|
||||
@change="classificationChange1" style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -260,8 +263,9 @@
|
||||
<img style="width: 10px; height: 10px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<div class="inname">资源归属:</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="value5" style="border-radius: 8px; height: 40px" />
|
||||
<div class="in select">
|
||||
<a-select v-model:value="value5" placeholder="请选择资源归属" :options="classifyList5"
|
||||
@change="classificationChange5" style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="pubtn">
|
||||
@@ -293,7 +297,7 @@
|
||||
<div class="modalMain">
|
||||
<div style="margin-left: 40px; margin-top: 40px">
|
||||
<span style="color: #000000; font-size: 14px">项目归属:</span>
|
||||
<span style="color: #999999; font-size: 14px; margin-left: 10px">管理者进阶</span>
|
||||
<span style="color: #999999; font-size: 14px; margin-left: 10px">{{ currentProjectName }}</span>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="star" style="margin-top: -4px">
|
||||
@@ -301,7 +305,7 @@
|
||||
</div>
|
||||
<div class="inname">子项目名称:</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="value5" placeholder="请输入项目名称" style="border-radius: 8px; height: 40px" />
|
||||
<a-input v-model:value="value6" placeholder="请输入项目名称" style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -309,8 +313,9 @@
|
||||
<img style="width: 10px; height: 10px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<div class="inname">分类:</div>
|
||||
<div class="in">
|
||||
<a-select v-model:value="value6" placeholder="四个养成" style="border-radius: 8px; height: 40px" />
|
||||
<div class="in select">
|
||||
<a-select v-model:value="value7" @change="classificationChange2" :options="classifyList2"
|
||||
placeholder="四个养成" style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -319,7 +324,8 @@
|
||||
</div>
|
||||
<div class="inname">子项目经理:</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="value7" placeholder="自动带出 可编辑" style="border-radius: 8px; height: 40px" />
|
||||
<a-select v-model:value="value8" mode="multiple" @change="classificationChange3" :options="classifyList3"
|
||||
placeholder="自动带出 可编辑" style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -327,13 +333,14 @@
|
||||
<img style="width: 10px; height: 10px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
</div>
|
||||
<div class="inname">资源归属:</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="value8" style="border-radius: 8px; height: 40px" />
|
||||
<div class="in select">
|
||||
<a-select v-model:value="value9" @change="classificationChange4" :options="classifyList4"
|
||||
placeholder="请选择资源归属" style="border-radius: 8px; height: 40px" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="pubtn">
|
||||
<a-button class="pubtn1" @click="closeModal3">取消</a-button>
|
||||
<a-button class="pubtn2" @click="closeModal3">确定</a-button>
|
||||
<a-button class="pubtn2" @click="createChildsProject">确定</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
@@ -477,6 +484,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, ref } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useRouter } from "vue-router";
|
||||
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
@@ -534,8 +543,95 @@ export default {
|
||||
ProjPvisible: false,
|
||||
ProjCheckvisible: false,
|
||||
ProjManagevisible: false,
|
||||
|
||||
currentProjectId: '',
|
||||
currentProjectName: '',
|
||||
|
||||
});
|
||||
// 数据接入 - start -
|
||||
const router = useRouter();
|
||||
// 搜索数据
|
||||
const sProjectName = ref('');
|
||||
const sProjectOrder = ref('');
|
||||
const sProjectState = ref('');
|
||||
const sProjectTime = ref('');
|
||||
|
||||
const sProjectStateList = ref([
|
||||
{ value: 0, label: '草稿' },
|
||||
{ value: 1, label: '进行中' },
|
||||
{ value: 2, label: '未开始' },
|
||||
{ value: 3, label: '已结束' },
|
||||
]);
|
||||
|
||||
let name = '';
|
||||
const sProjectNameChange = (key) => {
|
||||
console.log('项目名称', key.target.value)
|
||||
name = key.target.value
|
||||
}
|
||||
let managerid = '';
|
||||
const sProjectOrderChange = (key) => {
|
||||
console.log('项目经理', key.target.value)
|
||||
managerid = key.target.value;
|
||||
}
|
||||
let status = '';
|
||||
const sProjectStateChange = (key) => {
|
||||
console.log('项目状态', key)
|
||||
status = key;
|
||||
}
|
||||
|
||||
let beginTime = '';
|
||||
let endTime = '';
|
||||
const sProjectTimeChange = (key, value) => {
|
||||
console.log('项目时间', key)
|
||||
console.log('项目时间', value)
|
||||
console.log(new Date('2019-10-08 18:22:37').getTime())
|
||||
beginTime = Math.ceil(new Date(value + ' ' + '00:00:00').getTime() / 1000);
|
||||
endTime = Math.ceil(new Date(value + ' ' + '23:59:59').getTime() / 1000);
|
||||
}
|
||||
|
||||
const searchReset = () => {
|
||||
sProjectName.value = "";
|
||||
sProjectOrder.value = "";
|
||||
sProjectState.value = null;
|
||||
sProjectTime.value = null;
|
||||
name = "";
|
||||
beginTime = "";
|
||||
endTime = "";
|
||||
status = null;
|
||||
managerid = "";
|
||||
getTableDate();
|
||||
}
|
||||
|
||||
const searchSubmit = () => {
|
||||
const obj = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
beginTime: beginTime,
|
||||
endTime: endTime,
|
||||
status: status,
|
||||
name: name,
|
||||
manager: managerid
|
||||
}
|
||||
let searchList = [];
|
||||
for (let i in obj) {
|
||||
if (obj[i] !== "") {
|
||||
if (obj[i] !== null) {
|
||||
searchList.push(1);
|
||||
} else {
|
||||
searchList.push(0);
|
||||
}
|
||||
} else {
|
||||
searchList.push(0);
|
||||
}
|
||||
}
|
||||
if (searchList.toString().indexOf("1") == -1) {
|
||||
message.destroy();
|
||||
message.warning("请输入搜索条件后进行搜索");
|
||||
}
|
||||
console.log('搜索的数据筛选条件', obj, searchList.toString())
|
||||
|
||||
getTableDate(obj);
|
||||
}
|
||||
|
||||
// 项目分类
|
||||
const classifyList = ref([
|
||||
@@ -551,10 +647,22 @@ export default {
|
||||
]);
|
||||
|
||||
const value1 = ref("");
|
||||
const value2 = ref("");
|
||||
const value3 = ref("");
|
||||
const value2 = ref([]);
|
||||
const value3 = ref([]);
|
||||
const value4 = ref("");
|
||||
const value5 = ref("");
|
||||
const value5 = ref([]);
|
||||
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
]);
|
||||
|
||||
let sourceBelongId = '';
|
||||
const classificationChange5 = (key) => {
|
||||
console.log(`selected ${key}`);
|
||||
sourceBelongId = key;
|
||||
}
|
||||
|
||||
let type = "";
|
||||
const classificationChange = (key) => {
|
||||
@@ -567,27 +675,203 @@ export default {
|
||||
let managerId = "";
|
||||
|
||||
const classificationChange1 = (key) => {
|
||||
console.log(`selected ${key}`);
|
||||
console.log(classifyList1.value[key - 1].label);
|
||||
manager = classifyList1.value[key - 1].label;
|
||||
managerId = key;
|
||||
console.log(`selected ${key}`, classifyList1);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
for (let i = 0; i < key.length; i++) {
|
||||
if (key.length - 1 !== i) {
|
||||
midstr += key[i] + ',';
|
||||
mstr += classifyList1.value[i].label + ',';
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList1.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
manager = mstr;
|
||||
managerId = midstr;
|
||||
};
|
||||
|
||||
// 创建多层项目
|
||||
const createStoreyProject = () => {
|
||||
// 接口需要传递的参数信息
|
||||
const errorMsgs = {
|
||||
"name": "请输入项目名称",
|
||||
"category": "请选择项目分类",
|
||||
"manager": "请选择项目经理",
|
||||
"sourceBelongId": "请选择资源归属"
|
||||
}
|
||||
|
||||
let obj = {
|
||||
name: value1.value,
|
||||
type: type,
|
||||
type: 1,
|
||||
category: type,
|
||||
manager: manager,
|
||||
managerId: managerId,
|
||||
sourceBelongId: value5.value,
|
||||
sourceBelongId: sourceBelongId,
|
||||
};
|
||||
console.log(obj);
|
||||
console.log('创建多层项目提交的数据格式', obj);
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i])
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy()
|
||||
message.warning(errorMsgs[i])
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
api.createProject(obj).then(res => {
|
||||
console.log(res)
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
// 创建成功 隐藏弹出框
|
||||
value1.value = "";
|
||||
type = "";
|
||||
manager = "";
|
||||
managerId = "";
|
||||
sourceBelongId = "";
|
||||
value2.value = [];
|
||||
value3.value = [];
|
||||
value4.value = "";
|
||||
value5.value = [];
|
||||
state.doublepro = false;
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
};
|
||||
// 取消按钮 清空输入的数据
|
||||
const closeModal2 = () => {
|
||||
value1.value = "";
|
||||
type = "";
|
||||
manager = "";
|
||||
managerId = "";
|
||||
sourceBelongId = "";
|
||||
value2.value = [];
|
||||
value3.value = [];
|
||||
value4.value = "";
|
||||
value5.value = [];
|
||||
state.doublepro = false;
|
||||
};
|
||||
|
||||
// 创建单层子项目 (需要传入多层项目的ProjectID)
|
||||
const createChildProject = () => {
|
||||
console.log(state.currentProjectId)
|
||||
router.push({
|
||||
path: '/sonproject',
|
||||
query: { projectId: state.currentProjectId, name: state.currentProjectName }
|
||||
});
|
||||
}
|
||||
|
||||
// 创建多层子项目
|
||||
const value6 = ref("");
|
||||
const value7 = ref([]);
|
||||
const value8 = ref([]);
|
||||
const value9 = ref([]);
|
||||
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: '管理者' },
|
||||
{ value: 2, label: '领军者' },
|
||||
{ value: 3, label: '产业人' },
|
||||
]);
|
||||
|
||||
let categoryT = '';
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`);
|
||||
categoryT = key;
|
||||
};
|
||||
|
||||
const classifyList3 = ref([
|
||||
{ value: 1, label: '李俊国' },
|
||||
{ value: 2, label: '将小米' },
|
||||
{ value: 3, label: '刘孟君' },
|
||||
]);
|
||||
|
||||
let managerT = '';
|
||||
let managerIdT = '';
|
||||
const classificationChange3 = (key) => {
|
||||
console.log(`selected ${key}`);
|
||||
console.log(`selected ${key}`, classifyList3);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
for (let i = 0; i < key.length; i++) {
|
||||
if (key.length - 1 !== i) {
|
||||
midstr += key[i] + ',';
|
||||
mstr += classifyList3.value[i].label + ',';
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList3.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
managerT = mstr;
|
||||
managerIdT = midstr;
|
||||
};
|
||||
|
||||
const classifyList4 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
]);
|
||||
|
||||
let sourceBelongIdT = '';
|
||||
const classificationChange4 = (key) => {
|
||||
console.log(`selected ${key}`);
|
||||
sourceBelongIdT = key;
|
||||
};
|
||||
|
||||
// 取消按钮 清空数据
|
||||
const closeModal3 = () => {
|
||||
value6.value = "";
|
||||
categoryT = "";
|
||||
managerT = "";
|
||||
managerIdT = "";
|
||||
sourceBelongIdT = "";
|
||||
value7.value = [];
|
||||
value8.value = [];
|
||||
value9.value = [];
|
||||
state.doublesonpro = false;
|
||||
};
|
||||
|
||||
const createChildsProject = () => {
|
||||
|
||||
const errorMsgs = {
|
||||
"name": "请输入子项目名称",
|
||||
"category": "请选择子项目分类",
|
||||
"manager": "请选择子项目经理",
|
||||
"sourceBelongId": "请选择资源归属"
|
||||
}
|
||||
|
||||
let obj = {
|
||||
name: value6.value,
|
||||
type: 2,
|
||||
category: categoryT,
|
||||
manager: managerT,
|
||||
managerId: managerIdT,
|
||||
sourceBelongId: sourceBelongIdT,
|
||||
};
|
||||
|
||||
console.log('创建多层子项目提交的数据格式', obj);
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i])
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy()
|
||||
message.warning(errorMsgs[i])
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
value6.value = "";
|
||||
categoryT = "";
|
||||
managerT = "";
|
||||
managerIdT = "";
|
||||
sourceBelongIdT = "";
|
||||
value7.value = [];
|
||||
value8.value = [];
|
||||
value9.value = [];
|
||||
state.doublesonpro = false;
|
||||
}
|
||||
|
||||
|
||||
// 数据接入 - end -
|
||||
|
||||
onMounted(() => {
|
||||
@@ -635,6 +919,20 @@ export default {
|
||||
key: "status",
|
||||
width: 100,
|
||||
align: "center",
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
value.record.status == 0 ?
|
||||
"草稿" :
|
||||
value.record.status == 1 ?
|
||||
"进行中" :
|
||||
value.record.status == 2 ?
|
||||
"未开始" : "已结束"
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
@@ -720,6 +1018,8 @@ export default {
|
||||
class="operation3"
|
||||
style="cursor: pointer"
|
||||
onClick={() => {
|
||||
state.currentProjectId = value.record.projectId;
|
||||
state.currentProjectName = value.record.name;
|
||||
state.sonproject = true;
|
||||
}}
|
||||
>
|
||||
@@ -1313,13 +1613,13 @@ export default {
|
||||
},
|
||||
]);
|
||||
|
||||
const getTableDate = () => {
|
||||
const getTableDate = (pagedata) => {
|
||||
let obj = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
api
|
||||
.getProjectList(obj)
|
||||
.getProjectList(pagedata ? pagedata : obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
@@ -1328,7 +1628,9 @@ export default {
|
||||
// let data = state.tableData;
|
||||
console.log("1266", data);
|
||||
data.map((value) => {
|
||||
console.log("map-value", value);
|
||||
value.children = value.subList;
|
||||
value.key = value.projectId;
|
||||
console.log("map-value", value.subList, value.children,);
|
||||
// if (value.subList.length !== 0) {
|
||||
// //多层项目
|
||||
// value.operation =
|
||||
@@ -2841,6 +3143,11 @@ export default {
|
||||
const changePagination = (page) => {
|
||||
console.log(page)
|
||||
currentPage.value = page;
|
||||
let pagedata = {
|
||||
pageNo: page,
|
||||
pageSize: 10,
|
||||
}
|
||||
getTableDate(pagedata);
|
||||
// getLearnPath();
|
||||
};
|
||||
|
||||
@@ -2862,17 +3169,12 @@ export default {
|
||||
state.doublepro = true;
|
||||
state.estabish = false;
|
||||
};
|
||||
const closeModal2 = () => {
|
||||
state.doublepro = false;
|
||||
};
|
||||
|
||||
|
||||
const showModal3 = () => {
|
||||
state.doublesonpro = true;
|
||||
state.sonproject = false;
|
||||
};
|
||||
const closeModal3 = () => {
|
||||
state.doublesonpro = false;
|
||||
};
|
||||
const showCopyModal = () => {
|
||||
state.copyModal = true;
|
||||
};
|
||||
@@ -2951,14 +3253,40 @@ export default {
|
||||
createStoreyProject,
|
||||
classifyList,
|
||||
classifyList1,
|
||||
classifyList2,
|
||||
classifyList3,
|
||||
classifyList4,
|
||||
classifyList5,
|
||||
classificationChange,
|
||||
classificationChange1,
|
||||
classificationChange2,
|
||||
classificationChange3,
|
||||
classificationChange4,
|
||||
classificationChange5,
|
||||
changePagination,
|
||||
value1,
|
||||
value2,
|
||||
value3,
|
||||
value4,
|
||||
value5,
|
||||
value6,
|
||||
value7,
|
||||
value8,
|
||||
value9,
|
||||
|
||||
sProjectName,
|
||||
sProjectOrder,
|
||||
sProjectState,
|
||||
sProjectTime,
|
||||
sProjectStateList,
|
||||
sProjectNameChange,
|
||||
sProjectOrderChange,
|
||||
sProjectStateChange,
|
||||
sProjectTimeChange,
|
||||
searchReset,
|
||||
searchSubmit,
|
||||
createChildProject,
|
||||
createChildsProject
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4,124 +4,115 @@
|
||||
<div class="header">
|
||||
<span class="title">创建/编辑单层子项目</span>
|
||||
<router-link to="/projectmanage" class="goback">
|
||||
<span class="return"></span
|
||||
><span class="returntext">返回</span></router-link
|
||||
>
|
||||
<span class="return"></span><span class="returntext">返回</span>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="main">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">项目归属</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<div style="color: #C7CBD2;font-size: 14px;margin-left: 15px">HRBP2.0</div>
|
||||
<div style="color: #C7CBD2;font-size: 14px;margin-left: 15px">{{ projectAscription }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">子项目名称</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<div style="color: #C7CBD2;font-size: 14px;margin-left: 15px">HRBP2.0-band</div>
|
||||
<a-input v-model:value="projectName" placeholder="请输入子项目名称" show-count :maxlength="30" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">分类</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select
|
||||
:value="classifySelect"
|
||||
placeholder="四个养成"
|
||||
style="width: 100%"
|
||||
:options="classifyList"
|
||||
allowClear
|
||||
showSearch
|
||||
></a-select>
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||
@change="classificationChange" allowClear showSearch>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<div
|
||||
class="box"
|
||||
style="
|
||||
<div class="box" style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
"
|
||||
>
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
">
|
||||
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
||||
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
||||
<img style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
<div v-else>
|
||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||
<div class="box1"></div>
|
||||
<div class="box2"></div>
|
||||
<!-- <div class="ant-upload-text"></div> -->
|
||||
</div>
|
||||
</a-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目时间</div>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">子项目时间</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-range-picker
|
||||
separator="至"
|
||||
style="width: 100%; height: 40px; border-radius: 5px"
|
||||
show-time
|
||||
/>
|
||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
||||
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目经理</div>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">子项目经理</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
<a-select
|
||||
:value="classifySelect"
|
||||
placeholder="请选择项目经理"
|
||||
style="width: 100%"
|
||||
:options="classifyList"
|
||||
allowClear
|
||||
showSearch
|
||||
></a-select>
|
||||
<div class="in">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" :value="classifySelect1" mode="multiple" placeholder="请选择子项目经理" style="width: 100%" :options="classifyList1"
|
||||
@change="classificationChange1" allowClear showSearch>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">资源归属</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-input v-model:value="valueE" placeholder="自动带出 可修改" />
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect2" placeholder="自动带出 可修改" :options="classifyList2"
|
||||
@change="classificationChange2" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -129,12 +120,7 @@
|
||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-textarea
|
||||
v-model:value="valuei"
|
||||
style="height: 80px"
|
||||
placeholder="请输入项目说明"
|
||||
show-count :maxlength="200"
|
||||
/>
|
||||
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -142,84 +128,70 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio v-model:checked="checked"
|
||||
><span
|
||||
style="
|
||||
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-radio
|
||||
>
|
||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">项目级别</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
v-model:value="valueE"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect3" :options="classifyList3" @change="classificationChange3"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">培训体系</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
v-model:value="valueE"
|
||||
placeholder="集团级/组织级/现地级/部门级"
|
||||
/>
|
||||
<div class="in select">
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect4" :options="classifyList4" @change="classificationChange4"
|
||||
placeholder="集团级/组织级/现地级/部门级" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">是否BOEU实施</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio v-model:checked="checked"
|
||||
><span
|
||||
style="
|
||||
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
"
|
||||
>BOEU实施</span
|
||||
></a-radio
|
||||
>
|
||||
">BOEU实施</span></a-radio>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
<div class="namebox" style="margin-top: 8px">
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">附件</div>
|
||||
</div>
|
||||
<div class="filebox">
|
||||
<div style="cursor: pointer">
|
||||
<img
|
||||
class="fileimg"
|
||||
src="../../assets/images/projectadd/enclosure.png"
|
||||
/>
|
||||
<span class="filetext">上传附件</span>
|
||||
<div>
|
||||
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
||||
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
||||
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
||||
<!-- <a-button> -->
|
||||
<!-- <upload-outlined></upload-outlined> -->
|
||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||
<span v-else class="filetext">上传附件</span>
|
||||
<!-- </a-button> -->
|
||||
</a-upload>
|
||||
</div>
|
||||
<div class="support">
|
||||
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
||||
@@ -229,76 +201,381 @@
|
||||
</div>
|
||||
<div class="template">
|
||||
<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">
|
||||
<a-select
|
||||
v-model:value="value1"
|
||||
placeholder="请选择模板"
|
||||
:size="size"
|
||||
style="width: 100%"
|
||||
:options="options"
|
||||
></a-select>
|
||||
<a-select :getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||
@change="classificationChange5">
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button
|
||||
type="primary"
|
||||
style="width: 100px; height: 40px; border-radius: 8px"
|
||||
>确认</a-button
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-left: 14px;
|
||||
border-radius: 8px;
|
||||
"
|
||||
>取消</a-button
|
||||
>
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
||||
<a-button class="btn2">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
|
||||
export default {
|
||||
name: "sonProject",
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const routers = useRoute();
|
||||
const state = reactive({
|
||||
classifyList: [
|
||||
{
|
||||
id: 1,
|
||||
name: "分类一",
|
||||
label: "分类一",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "分类二",
|
||||
label: "分类二",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "分类三",
|
||||
label: "分类三",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "分类四",
|
||||
label: "分类四",
|
||||
},
|
||||
],
|
||||
classifySelect: null,
|
||||
classifySelectId: null,
|
||||
checked: false,
|
||||
checked1: false,
|
||||
valueE: null,
|
||||
valueE1: null,
|
||||
valueE2: null,
|
||||
|
||||
projectAscription:'',
|
||||
});
|
||||
|
||||
const projectName = ref('');
|
||||
|
||||
state.projectAscription = routers.query.name;
|
||||
|
||||
const classifyList = ref([
|
||||
{ value: 1, label: '管理者' },
|
||||
{ value: 2, label: '领军者' },
|
||||
{ value: 3, label: '产业人' },
|
||||
]);
|
||||
|
||||
let projectType = "";
|
||||
|
||||
const classificationChange = (value) => {
|
||||
console.log(`selected ${value}`);
|
||||
projectType = value;
|
||||
};
|
||||
|
||||
function getBase64(img, callback) {
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => callback(reader.result));
|
||||
reader.readAsDataURL(img);
|
||||
}
|
||||
|
||||
const fileList = ref([]);
|
||||
const fileList1 = ref([]);
|
||||
const loading = ref(false);
|
||||
const imageUrl = ref('');
|
||||
let picUrl = '';
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传图片返回的信息 %o', info)
|
||||
picUrl = info.file.response.data;
|
||||
// Get this url from response in real world.
|
||||
getBase64(info.file.originFileObj, (base64Url) => {
|
||||
imageUrl.value = base64Url;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
}
|
||||
};
|
||||
|
||||
let uplodaFileCount = false;
|
||||
|
||||
let attach = "";
|
||||
let attachData = "";
|
||||
const handleChange1 = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
loading.value = true;
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
console.log('上传附件返回的信息 %o', info, info.fileList.length, uplodaFileCount)
|
||||
|
||||
let attachStr = "";
|
||||
attachData = info.fileList;
|
||||
for (let i = 0; i < attachData.length; i++) {
|
||||
if (attachData.length - 1 == i) {
|
||||
attachStr += attachData[i].response.data;
|
||||
} else {
|
||||
attachStr += attachData[i].response.data + ',';
|
||||
}
|
||||
}
|
||||
console.log(attachStr)
|
||||
attach = attachStr;
|
||||
|
||||
if (info.fileList.length > 5) {
|
||||
uplodaFileCount = true;
|
||||
} else {
|
||||
uplodaFileCount = false;
|
||||
}
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
loading.value = false;
|
||||
message.error('upload error');
|
||||
}
|
||||
};
|
||||
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload JPG file!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 1MB!');
|
||||
}
|
||||
return isJpgOrPng && isLt2M;
|
||||
};
|
||||
|
||||
const beforeUpload1 = () => {
|
||||
return new Promise((resovle, reject) => {
|
||||
if (uplodaFileCount) {
|
||||
message.info("上传文件数量已达最大数量")
|
||||
return reject(false);
|
||||
}
|
||||
return resovle(true);
|
||||
})
|
||||
};
|
||||
|
||||
let beginTime = "";
|
||||
let endTime = "";
|
||||
const onRangeChange = (value, dateString) => {
|
||||
console.log('Selected Time: ', value);
|
||||
// 项目时间选择函数
|
||||
console.log('Formatted Selected Time: ', dateString);
|
||||
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
|
||||
beginTime = new Date(dateString[0]).getTime() / 1000;
|
||||
endTime = new Date(dateString[1]).getTime() / 1000;
|
||||
};
|
||||
|
||||
|
||||
// 项目经理 后续接口调用
|
||||
const classifyList1 = ref([
|
||||
{ value: 1, label: '李俊国' },
|
||||
{ value: 2, label: '将小米' },
|
||||
{ value: 3, label: '刘孟君' },
|
||||
]);
|
||||
|
||||
let manager = "";
|
||||
let managerId = "";
|
||||
const classificationChange1 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList1);
|
||||
let mstr = '';
|
||||
let midstr = '';
|
||||
for (let i = 0; i < key.length; i++) {
|
||||
if (key.length - 1 !== i) {
|
||||
midstr += key[i] + ',';
|
||||
mstr += classifyList1.value[i].label + ',';
|
||||
} else {
|
||||
midstr += key[i];
|
||||
mstr += classifyList1.value[i].label;
|
||||
}
|
||||
}
|
||||
console.log(mstr, midstr)
|
||||
manager = mstr;
|
||||
managerId = midstr;
|
||||
};
|
||||
|
||||
// 资源归属 sourceBelongId 后续给接口
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: '项目一' },
|
||||
{ value: 2, label: '项目二' },
|
||||
{ value: 3, label: '项目三' },
|
||||
]);
|
||||
|
||||
const classificationChange2 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList2);
|
||||
}
|
||||
|
||||
// 项目级别
|
||||
const classifyList3 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
]);
|
||||
const classificationChange3 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList3);
|
||||
}
|
||||
|
||||
// 培训体系
|
||||
const classifyList4 = ref([
|
||||
{ value: 1, label: '集团级' },
|
||||
{ value: 2, label: '组织级' },
|
||||
{ value: 3, label: '现地级' },
|
||||
{ value: 4, label: '部门级' },
|
||||
]);
|
||||
const classificationChange4 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList4);
|
||||
}
|
||||
|
||||
// 模版
|
||||
const classifyList5 = ref([
|
||||
{ value: 1, label: '模版一' },
|
||||
{ value: 2, label: '模版二' },
|
||||
{ value: 3, label: '模版三' },
|
||||
{ value: 4, label: '模版四' },
|
||||
]);
|
||||
const classificationChange5 = (key) => {
|
||||
console.log(`selected ${key}`, classifyList5);
|
||||
}
|
||||
|
||||
// 项目说明
|
||||
const remark = ref('');
|
||||
|
||||
let courseSyncFlag = 0;
|
||||
const changeChecked = () => {
|
||||
console.log(state.checked)
|
||||
state.checked ? state.checked = false : state.checked = true;
|
||||
courseSyncFlag = state.checked ? 1 : 0;
|
||||
}
|
||||
|
||||
let boeFlag = 0;
|
||||
const changeChecked1 = () => {
|
||||
console.log(state.checked1)
|
||||
state.checked1 ? state.checked1 = false : state.checked1 = true;
|
||||
boeFlag = state.checked1 ? 1 : 0;
|
||||
}
|
||||
|
||||
const removeFile = (file) => {
|
||||
const index = fileList1.value.indexOf(file);
|
||||
const newFileList = fileList1.value.slice();
|
||||
newFileList.splice(index, 1);
|
||||
fileList1.value = newFileList;
|
||||
|
||||
let attachStr = "";
|
||||
if (newFileList.length == 0) {
|
||||
attachStr = "";
|
||||
}
|
||||
for (let i = 0; i < fileList1["value"].length; i++) {
|
||||
console.log(fileList1["value"][i].response.data)
|
||||
if (fileList1["value"].length - 1 == i) {
|
||||
attachStr += fileList1["value"][i].response.data;
|
||||
} else {
|
||||
attachStr += fileList1["value"][i].response.data + ',';
|
||||
}
|
||||
}
|
||||
attach = attachStr;
|
||||
}
|
||||
|
||||
|
||||
const errorMsgs = {
|
||||
"name": "请输入项目名称",
|
||||
"category": "请选择项目分类",
|
||||
"picUrl": "请上传项目封面图",
|
||||
"beginTime": "请选择项目开始时间",
|
||||
"endTime": "请选择项目结束时间",
|
||||
"manager": "请选择项目经理",
|
||||
"managerId": "请选择项目经理",
|
||||
"sourceBelongId": "请选择资源归属",
|
||||
"level": "请填写项目级别",
|
||||
"systemId": "请填写项目培训体系",
|
||||
"boeFlag": "请选择是否BOE实施",
|
||||
"attach": "请上传附件"
|
||||
}
|
||||
|
||||
const createProject = () => {
|
||||
let obj = {
|
||||
"name": projectName["value"],
|
||||
"category": projectType,
|
||||
"picUrl": picUrl,
|
||||
"beginTime": beginTime,
|
||||
"endTime": endTime,
|
||||
"manager": manager,
|
||||
"managerId": managerId,
|
||||
"sourceBelongId": 11,
|
||||
"remark": remark["value"],
|
||||
"courseSyncFlag": courseSyncFlag,
|
||||
"level": 3,
|
||||
"systemId": 4,
|
||||
"boeFlag": boeFlag,
|
||||
"attach": attach,
|
||||
"type": 3,
|
||||
"templateId": 10,
|
||||
"parentId": routers.query.projectId,
|
||||
"notice": "",
|
||||
"noticeFlag": 0,
|
||||
"status": 0
|
||||
}
|
||||
console.log('提交的数据格式 %o', obj)
|
||||
for (let i in errorMsgs) {
|
||||
console.log(obj[i])
|
||||
if (obj[i] === "" || obj[i] === undefined) {
|
||||
message.destroy()
|
||||
message.warning(errorMsgs[i])
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
api.createProject(obj).then(res => {
|
||||
console.log(res)
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
message.destroy();
|
||||
message.success("创建成功")
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: '/taskpage',
|
||||
query: { id: res.data.data.projectId }
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
message.destroy();
|
||||
message.error("创建失败,请检查当前网络状态。")
|
||||
})
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
projectName,
|
||||
classifyList,
|
||||
classificationChange,
|
||||
classificationChange1,
|
||||
classificationChange2,
|
||||
classificationChange3,
|
||||
classificationChange4,
|
||||
classificationChange5,
|
||||
fileList,
|
||||
fileList1,
|
||||
loading,
|
||||
imageUrl,
|
||||
handleChange,
|
||||
handleChange1,
|
||||
beforeUpload,
|
||||
beforeUpload1,
|
||||
onRangeChange,
|
||||
classifyList1,
|
||||
classifyList2,
|
||||
classifyList3,
|
||||
classifyList4,
|
||||
classifyList5,
|
||||
remark,
|
||||
changeChecked,
|
||||
changeChecked1,
|
||||
uplodaFileCount,
|
||||
createProject,
|
||||
removeFile
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -313,6 +590,7 @@ export default {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 18px;
|
||||
@@ -321,10 +599,12 @@ export default {
|
||||
padding-left: 37px;
|
||||
//font-weight: 500;
|
||||
}
|
||||
|
||||
.goback {
|
||||
padding-right: 70px;
|
||||
//padding-top: 37px;
|
||||
position: relative;
|
||||
|
||||
.return {
|
||||
display: inline-block;
|
||||
width: 42px;
|
||||
@@ -333,6 +613,7 @@ export default {
|
||||
margin-right: 10px;
|
||||
background-image: url("../../assets/images/projectadd/return.png");
|
||||
}
|
||||
|
||||
.returntext {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
@@ -342,8 +623,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 修改 antd upload 样式
|
||||
.ant-upload {
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
|
||||
.main {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
@@ -352,12 +640,14 @@ export default {
|
||||
//justify-content: center;
|
||||
float: left;
|
||||
border-right: 1px solid rgba(153, 155, 163, 0.3);
|
||||
|
||||
.name {
|
||||
width: 78%;
|
||||
// background-color: lightcoral;
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
|
||||
//height: 40px;
|
||||
// border: 1px solid black;
|
||||
.namebox {
|
||||
@@ -366,19 +656,23 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
|
||||
.nameimg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.d {
|
||||
margin-top: 8px;
|
||||
font-size: 25px;
|
||||
color: #ff4e4e;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: relative;
|
||||
margin-left: 14px;
|
||||
|
||||
.box1 {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -388,6 +682,7 @@ export default {
|
||||
margin-top: -5px;
|
||||
border-top: 2px solid rgba(78, 166, 255, 1);
|
||||
}
|
||||
|
||||
.box2 {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -398,31 +693,42 @@ export default {
|
||||
border-left: 2px solid rgba(78, 166, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.inname {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
flex: 1;
|
||||
|
||||
// .ant-radio-wrapper {
|
||||
// }
|
||||
.ant-input-textarea-show-count {
|
||||
position: relative;
|
||||
height: 88px;
|
||||
}
|
||||
|
||||
.ant-input-textarea-show-count::after {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
border-radius: 8px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.ant-input-affix-wrapper {
|
||||
padding: 0 11px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.ant-select-selector {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
@@ -430,33 +736,39 @@ export default {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.filebox {
|
||||
margin-left: 14px;
|
||||
flex: 1;
|
||||
|
||||
.fileimg {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.filetext {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.support {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #999ba3;
|
||||
line-height: 36px;
|
||||
//margin-top: 8px;
|
||||
margin-top: 8px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
.ant-input-textarea {
|
||||
.ant-input {
|
||||
height: 88px;
|
||||
@@ -464,6 +776,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.template {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
@@ -471,6 +784,7 @@ export default {
|
||||
align-items: center;
|
||||
//justify-content: center;
|
||||
float: right;
|
||||
|
||||
.name {
|
||||
width: 78%;
|
||||
// background-color: lightcoral;
|
||||
@@ -478,27 +792,32 @@ export default {
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
|
||||
// border: 1px solid black;
|
||||
.d {
|
||||
margin-top: 8px;
|
||||
font-size: 25px;
|
||||
color: #ff4e4e;
|
||||
}
|
||||
|
||||
.inname {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
margin-left: 7px;
|
||||
width: 65px;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
width: 81%;
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.ant-select-selector {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
@@ -509,15 +828,42 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
margin-top: 31px;
|
||||
margin-bottom: 14px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.btn1 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background: #409eff;
|
||||
color: #ffffff;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #409eff;
|
||||
background: #ffffff;
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: rgba(153, 155, 163, 1);
|
||||
font-size: 14px;
|
||||
@@ -526,3 +872,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -862,7 +862,7 @@ export default {
|
||||
deleteLiveID: null, //删除直播id
|
||||
deleteExternalID: null, //删除外链id
|
||||
deleteEvalID: null, //测评
|
||||
deleteInvistID: null, //评估
|
||||
deleteInvistID: 4, //评估
|
||||
deleteDiscussID: null, //删除讨论id
|
||||
deleteActivityID: null, //删除活动id
|
||||
});
|
||||
@@ -973,19 +973,26 @@ export default {
|
||||
// width: 100,
|
||||
align: "center",
|
||||
scopedSlots: { customRender: "action" },
|
||||
customRender: () => {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="opa">
|
||||
<div class="opacation">
|
||||
<span
|
||||
onClick={() => {
|
||||
state.editonlinevisible = true;
|
||||
console.log(text, "编辑text");
|
||||
editInvistPath();
|
||||
}}
|
||||
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
>
|
||||
编辑
|
||||
</span>
|
||||
<span style="color:#4EA6FF;cursor:pointer" onClick={() => {}}>
|
||||
<span
|
||||
style="color:#4EA6FF;cursor:pointer"
|
||||
onClick={() => {
|
||||
showDelete();
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</span>
|
||||
</div>
|
||||
@@ -1006,7 +1013,7 @@ export default {
|
||||
.getTask(obj)
|
||||
.then((res) => {
|
||||
if (res.status == 200) {
|
||||
console.log(res.data.data.stageList, 22222);
|
||||
console.log("22222", res.data.data.stageList);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -1066,6 +1073,31 @@ export default {
|
||||
console.log("删除失败", err);
|
||||
});
|
||||
};
|
||||
//编辑讨论
|
||||
const editDiscuss = () => {
|
||||
let obj = {
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
discussExplain: "",
|
||||
discussFlag: "",
|
||||
discussId: 0,
|
||||
discussName: "",
|
||||
discussSettings: "",
|
||||
discussTag: "",
|
||||
projectId: 0,
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
apidiscuss
|
||||
.updateDiscuss(obj)
|
||||
.then((res) => {
|
||||
console.log("更新成功", res);
|
||||
message.success("更新成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("更新失败", err);
|
||||
});
|
||||
};
|
||||
//删除活动
|
||||
const deleteActivity = () => {
|
||||
let obj = {
|
||||
@@ -1084,6 +1116,38 @@ export default {
|
||||
console.log("删除失败", err);
|
||||
});
|
||||
};
|
||||
//编辑活动
|
||||
const editActivity = () => {
|
||||
let obj = {
|
||||
activityAddress: "",
|
||||
activityDuration: "",
|
||||
activityEndTime: "",
|
||||
activityExplain: "",
|
||||
activityFlag: "",
|
||||
activityId: 0,
|
||||
activityName: "",
|
||||
activityNotice: "",
|
||||
activityStartTime: "",
|
||||
activityTag: "",
|
||||
afterSignIn: "",
|
||||
beforeSignIn: "",
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
signOutTime: "",
|
||||
standardSettings: "",
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
apiactivity
|
||||
.updateActivity(obj)
|
||||
.then((res) => {
|
||||
console.log("更新成功", res);
|
||||
message.success("更新成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("更新失败", err);
|
||||
});
|
||||
};
|
||||
//删除测评测试
|
||||
const deleteEvalText = () => {
|
||||
let obj = {
|
||||
@@ -1104,9 +1168,6 @@ export default {
|
||||
|
||||
//编辑测评信息
|
||||
const editEvalPath = () => {
|
||||
// if (!state.inputV1) return message.info("请输入测评名称");
|
||||
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
||||
// state.createLoading = true;
|
||||
let obj = {
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
@@ -1128,15 +1189,13 @@ export default {
|
||||
setTimeout(() => {
|
||||
console.log("修改成功", res);
|
||||
message.success("修改成功");
|
||||
// state.createLoading = false;
|
||||
// state.currentPage = 1;
|
||||
// router.push("/leveladd");
|
||||
// getLearnPath();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败", err);
|
||||
// state.createLoading = false;
|
||||
//重新获取列表
|
||||
getTask();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1221,6 +1280,39 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
//编辑评估信息
|
||||
const editInvistPath = () => {
|
||||
let obj = {
|
||||
appraiseEndTime: "",
|
||||
appraiseExplain: "",
|
||||
appraiseFlag: "",
|
||||
appraiseId: 0,
|
||||
appraiseName: "",
|
||||
appraiseStartTime: "",
|
||||
appraiseTag: "",
|
||||
createTime: "",
|
||||
createUser: 0,
|
||||
researchId: 0,
|
||||
researchName: "",
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
apiinvist
|
||||
.updateAppraiseMessage(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("修改成功", res);
|
||||
message.success("修改成功");
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败", err);
|
||||
// state.createLoading = false;
|
||||
//重新获取列表
|
||||
getTask();
|
||||
});
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
@@ -1349,13 +1441,16 @@ export default {
|
||||
getTask,
|
||||
deleteLiveBroadcast,
|
||||
deleteDiscuss,
|
||||
editDiscuss,
|
||||
deleteEvalText,
|
||||
deleteExternalChain,
|
||||
deleteActivity,
|
||||
editActivity,
|
||||
editEvalPath,
|
||||
deleteInvistText,
|
||||
editLiveBroadcast,
|
||||
editExternal,
|
||||
editInvistPath,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user