mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 07:46:46 +08:00
fix:修改项目编辑的BOEU是否实施
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title">{{ projectInfo.parentId ? '编辑' : '创建' }}项目</span>
|
<span class="title"
|
||||||
|
>{{ projectInfo.parentId ? "编辑" : "创建" }}项目</span
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
@click="backPage"
|
@click="backPage"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@@ -78,9 +80,11 @@
|
|||||||
"
|
"
|
||||||
v-for="(src, index) in projectPic"
|
v-for="(src, index) in projectPic"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="()=>{
|
@click="
|
||||||
projectInfo.picUrl = src
|
() => {
|
||||||
}"
|
projectInfo.picUrl = src;
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
style="
|
style="
|
||||||
@@ -124,8 +128,11 @@
|
|||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<ProjectManager v-model:value="projectInfo.managerId" v-model:name="projectInfo.manager"
|
<ProjectManager
|
||||||
mode="multiple"></ProjectManager>
|
v-model:value="projectInfo.managerId"
|
||||||
|
v-model:name="projectInfo.manager"
|
||||||
|
mode="multiple"
|
||||||
|
></ProjectManager>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -138,7 +145,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<OrgClass v-model:value="projectInfo.sourceBelongId" v-model:name="projectInfo.sourceBelongName"></OrgClass>
|
<OrgClass
|
||||||
|
v-model:value="projectInfo.sourceBelongId"
|
||||||
|
v-model:name="projectInfo.sourceBelongName"
|
||||||
|
></OrgClass>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
@@ -173,7 +183,8 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
"
|
||||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||||
></a-switch>
|
></a-switch
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -206,15 +217,26 @@
|
|||||||
<!-- class="nameimg"-->
|
<!-- class="nameimg"-->
|
||||||
<!-- src="../../assets/images/basicinfo/asterisk.png"-->
|
<!-- 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-switch
|
<!-- <a-switch
|
||||||
v-model:checked="projectInfo.boeFlag"
|
v-model:checked="projectInfo.boeFlag"
|
||||||
:checkedValue="1"
|
:checkedValue="1"
|
||||||
:unCheckedValue="0"
|
:unCheckedValue="0"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
></a-switch>
|
></a-switch> -->
|
||||||
|
<a-radio-group
|
||||||
|
v-model:value="projectInfo.boeFlag"
|
||||||
|
:disabled="viewDetail ? true : false"
|
||||||
|
>
|
||||||
|
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
||||||
|
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,8 +271,7 @@
|
|||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||||
>确定
|
>确定
|
||||||
</a-button
|
</a-button>
|
||||||
>
|
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -276,7 +297,7 @@ export default {
|
|||||||
ProjectLevel,
|
ProjectLevel,
|
||||||
ProjectClass,
|
ProjectClass,
|
||||||
TrainClass,
|
TrainClass,
|
||||||
OrgClass
|
OrgClass,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -295,37 +316,44 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: "",
|
keyWord: "",
|
||||||
},
|
},
|
||||||
classifyList5: []
|
classifyList5: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
state.projectPic = store.state.projectPic.map(e => e.dictValue)
|
state.projectPic = store.state.projectPic.map((e) => e.dictValue);
|
||||||
state.viewDetail = routers.query.viewDetail
|
state.viewDetail = routers.query.viewDetail;
|
||||||
getProjectInfo()
|
getProjectInfo();
|
||||||
getTemplate()
|
getTemplate();
|
||||||
})
|
});
|
||||||
|
|
||||||
watch(routers.query, () => {
|
watch(routers.query, () => {
|
||||||
state.projectInfo.projectId = routers.query.projectId
|
state.projectInfo.projectId = routers.query.projectId;
|
||||||
state.projectInfo.parentName = routers.query.parentName
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
state.projectInfo.parentId = routers.query.parentId
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
function getProjectInfo() {
|
function getProjectInfo() {
|
||||||
if (!routers.query.projectId) {
|
if (!routers.query.projectId) {
|
||||||
state.projectInfo = {parentName: routers.query.parentName, parentId: routers.query.parentId}
|
state.projectInfo = {
|
||||||
return
|
parentName: routers.query.parentName,
|
||||||
|
parentId: routers.query.parentId,
|
||||||
|
};
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
api.getProjectDetail({projectId: routers.query.projectId}).then(res => {
|
api
|
||||||
state.projectInfo = res.data.data.projectInfo
|
.getProjectDetail({ projectId: routers.query.projectId })
|
||||||
state.projectInfo.rangeTime = [state.projectInfo.beginTime, state.projectInfo.endTime]
|
.then((res) => {
|
||||||
state.projectInfo.parentName = routers.query.parentName
|
state.projectInfo = res.data.data.projectInfo;
|
||||||
})
|
state.projectInfo.rangeTime = [
|
||||||
|
state.projectInfo.beginTime,
|
||||||
|
state.projectInfo.endTime,
|
||||||
|
];
|
||||||
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const backPage = () => {
|
const backPage = () => {
|
||||||
router.back()
|
router.back();
|
||||||
};
|
};
|
||||||
|
|
||||||
//选择分类
|
//选择分类
|
||||||
@@ -334,25 +362,24 @@ export default {
|
|||||||
state.projectType = value; //分类选择的id
|
state.projectType = value; //分类选择的id
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const classificationChange5 = (key, option) => {
|
const classificationChange5 = (key, option) => {
|
||||||
state.projectInfo = option
|
state.projectInfo = option;
|
||||||
state.projectInfo.type = 3
|
state.projectInfo.type = 3;
|
||||||
state.projectInfo.rangeTime = [option.beginTime, option.endTime]
|
state.projectInfo.rangeTime = [option.beginTime, option.endTime];
|
||||||
state.projectInfo.parentName = routers.query.parentName
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
state.projectInfo.parentId = routers.query.parentId
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
};
|
};
|
||||||
//获取模版列表
|
//获取模版列表
|
||||||
const getTemplate = () => {
|
const getTemplate = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
status: 1
|
status: 1,
|
||||||
};
|
};
|
||||||
api.getTemplate(obj).then((res) => {
|
api.getTemplate(obj).then((res) => {
|
||||||
state.totalPages = Number(res.data.data.pages);
|
state.totalPages = Number(res.data.data.pages);
|
||||||
state.classifyList5 = res.data.data.rows
|
state.classifyList5 = res.data.data.rows;
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//模版滚动加载模板信息
|
//模版滚动加载模板信息
|
||||||
@@ -378,18 +405,19 @@ export default {
|
|||||||
sourceBelongId: "请选择资源归属",
|
sourceBelongId: "请选择资源归属",
|
||||||
level: "请填写项目级别",
|
level: "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
systemId: "请填写项目培训体系",
|
||||||
|
boeFlag: "请选择是否BOEU实施",
|
||||||
};
|
};
|
||||||
|
|
||||||
function timeChange(e) {
|
function timeChange(e) {
|
||||||
if (e && e.length === 2) {
|
if (e && e.length === 2) {
|
||||||
state.projectInfo.beginTime = e[0]
|
state.projectInfo.beginTime = e[0];
|
||||||
state.projectInfo.endTime = e[1]
|
state.projectInfo.endTime = e[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validate(obj, errorMsgs) {
|
function validate(obj, errorMsgs) {
|
||||||
for (let i in errorMsgs) {
|
for (let i in errorMsgs) {
|
||||||
if (!obj[i]) {
|
if (!obj[i] && obj[i] !== 0) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning(errorMsgs[i]);
|
message.warning(errorMsgs[i]);
|
||||||
return false;
|
return false;
|
||||||
@@ -403,13 +431,12 @@ export default {
|
|||||||
if (!validate(state.projectInfo, errorMsgs)) {
|
if (!validate(state.projectInfo, errorMsgs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.projectInfo.type = 3
|
state.projectInfo.type = 3;
|
||||||
api.createProject(state.projectInfo).then(() => {
|
api.createProject(state.projectInfo).then(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
router.back()
|
router.back();
|
||||||
}
|
});
|
||||||
)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -419,7 +446,7 @@ export default {
|
|||||||
classificationChange5,
|
classificationChange5,
|
||||||
createProject,
|
createProject,
|
||||||
backPage,
|
backPage,
|
||||||
templateScroll
|
templateScroll,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -523,7 +550,6 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 14px;
|
margin-left: 14px;
|
||||||
|
|
||||||
|
|
||||||
.box1 {
|
.box1 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
|||||||
Reference in New Issue
Block a user