mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
feat:增加待审核项目修改记录页面
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
<template>
|
||||
<a-drawer :visible="ProjAuditvisible" class="drawerStyle ProjectAudit" placement="right" width="60%"
|
||||
@after-visible-change="afterVisibleChange">
|
||||
<a-drawer
|
||||
:visible="ProjAuditvisible"
|
||||
class="drawerStyle ProjectAudit"
|
||||
placement="right"
|
||||
width="60%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">审核项目</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"/>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main" style="padding-right: 10px">
|
||||
<a-tabs v-model:activeKey="activeSetKey">
|
||||
@@ -21,65 +29,88 @@
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>封面图:</span></div>
|
||||
<div class="setc_main">
|
||||
<img style="width: 151px; height: 84px" :src="projectInfo.picUrl" alt=""/>
|
||||
<img
|
||||
style="width: 151px; height: 84px"
|
||||
:src="projectInfo.picUrl"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目时间:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ projectInfo.beginTime }} ~ {{ projectInfo.endTime }}</span>
|
||||
<span style="color: #999999"
|
||||
>{{ projectInfo.beginTime }} ~
|
||||
{{ projectInfo.endTime }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目经理:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ projectInfo.manager }}</span>
|
||||
<span style="color: #999999">{{
|
||||
projectInfo.manager
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>资源归属:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ (projectInfo.sourceBelongFullName || '')+projectInfo.sourceBelongName }}</span>
|
||||
<span style="color: #999999">{{
|
||||
(projectInfo.sourceBelongFullName || "") +
|
||||
projectInfo.sourceBelongName
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目级别:</span></div>
|
||||
<div class="setc_main">
|
||||
<ProjectLevel v-model:value="projectInfo.level" :tag="true"></ProjectLevel>
|
||||
<ProjectLevel
|
||||
v-model:value="projectInfo.level"
|
||||
:tag="true"
|
||||
></ProjectLevel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>培训体系:</span></div>
|
||||
<div class="setc_main">
|
||||
<TrainClass v-model:value="projectInfo.systemId" :tag="true"></TrainClass>
|
||||
<TrainClass
|
||||
v-model:value="projectInfo.systemId"
|
||||
:tag="true"
|
||||
></TrainClass>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>同步学习记录:</span></div>
|
||||
<div class="setc_main">
|
||||
<a-switch
|
||||
v-model:checked="projectInfo.courseSyncFlag"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="true"
|
||||
><span
|
||||
style="width: 100%;color: rgba(109, 117, 132, 1);font-size: 14px;"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-switch>
|
||||
v-model:checked="projectInfo.courseSyncFlag"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="true"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-switch
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content" v-if="projectInfo.boeFlag">
|
||||
<div class="setc_name"><span>是否BOEU实施:</span></div>
|
||||
<div class="setc_main">
|
||||
<a-switch
|
||||
v-model:checked="projectInfo.boeFlag"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="true"
|
||||
v-model:checked="projectInfo.boeFlag"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="true"
|
||||
></a-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content" v-if="projectInfo.remark ">
|
||||
<div class="set_content" v-if="projectInfo.remark">
|
||||
<div class="setc_name"><span>项目说明:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ projectInfo.remark }}</span>
|
||||
@@ -94,7 +125,70 @@
|
||||
</button>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<!-- <a-tab-pane key="2" tab="修改记录"></a-tab-pane> -->
|
||||
<a-tab-pane key="2" tab="修改记录" class="record">
|
||||
<div
|
||||
class="tableBox"
|
||||
v-if="showRecord"
|
||||
style="
|
||||
margin-top: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
"
|
||||
>
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #expandedRowRender="{ record }">
|
||||
<div class="reworkTitle">
|
||||
<div style="width: 20%; text-align: center">内容</div>
|
||||
<div style="width: 40%; text-align: center">修改前</div>
|
||||
<div style="width: 40%; text-align: center">修改后</div>
|
||||
</div>
|
||||
<div
|
||||
v-for="(elem, index) in record.data"
|
||||
:key="index"
|
||||
class="reworkCon"
|
||||
>
|
||||
<div style="width: 20%; text-align: center">
|
||||
{{ elem.content }}
|
||||
</div>
|
||||
<div style="width: 40%; text-align: center">
|
||||
{{ elem.before }}
|
||||
</div>
|
||||
<div style="width: 40%; text-align: center">
|
||||
{{ elem.after }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="pa" style="margin-top: 20px">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="handelChangePage"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detaile">
|
||||
<button class="debtn" @click="changeRe">
|
||||
详情{{ showDetail ? "折叠" : "展开" }}
|
||||
</button>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="audit">
|
||||
<div class="set_content">
|
||||
@@ -107,31 +201,35 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="sign" style="position:relative;left:70px;top:-3px;">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
|
||||
<div class="sign" style="position: relative; left: 70px; top: -3px">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<div class="setc_name"><span>审核意见:</span></div>
|
||||
<div class="setc_main">
|
||||
<a-textarea v-model:value="valueSuggest" :rows="4" show-count
|
||||
:maxlength="20"/>
|
||||
<a-textarea
|
||||
v-model:value="valueSuggest"
|
||||
:rows="4"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detaile">
|
||||
<button class="can" @click="closeDrawer">取消</button>
|
||||
<button class="debtn" @click="subMit">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {toRefs, reactive, onMounted} from "vue";
|
||||
import {getTask} from "../../api/indexTaskadd";
|
||||
import {toDate} from "../../api/method";
|
||||
import {auditView} from "../../api/indexAudit";
|
||||
import {message} from "ant-design-vue";
|
||||
import { toRefs, reactive, onMounted } from "vue";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
import { auditView } from "../../api/indexAudit";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api1 from "@/api/index1";
|
||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||
import TrainClass from "@/components/project/TrainClass";
|
||||
@@ -161,8 +259,8 @@ export default {
|
||||
},
|
||||
finishdFun: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
@@ -171,6 +269,7 @@ export default {
|
||||
checkedBOEU: false, //是否BOEU实施
|
||||
checkedSty: false, //同步学习记录
|
||||
showDetail: false,
|
||||
showRecord: false, //修改记录
|
||||
valuePass: "1",
|
||||
valueSuggest: null,
|
||||
//基本信息
|
||||
@@ -201,13 +300,102 @@ export default {
|
||||
attach: null,
|
||||
calssifyList: [],
|
||||
faceclassScene: [],
|
||||
projectInfo: {}
|
||||
projectInfo: {},
|
||||
|
||||
tableDataTotal: 20,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableData: [
|
||||
{
|
||||
key: 1,
|
||||
people: "张三",
|
||||
time: "2023-01-13",
|
||||
data: [
|
||||
{
|
||||
content: "项目归属",
|
||||
before: "产品部",
|
||||
after: "研发部",
|
||||
},
|
||||
{
|
||||
content: "项目时间",
|
||||
before: "2022-10-31 23:00~2022-11-10 23:00",
|
||||
after: "2022-11-11 23:00~2022-11-30 23:00",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
people: "张三",
|
||||
time: "2023-01-13",
|
||||
data: [
|
||||
{
|
||||
content: "项目归属",
|
||||
before: "产品部",
|
||||
after: "研发部",
|
||||
},
|
||||
{
|
||||
content: "项目时间",
|
||||
before: "2022-10-31 23:00~2022-11-10 23:00",
|
||||
after: "2022-11-11 23:00~2022-11-30 23:00",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: "修改人",
|
||||
dataIndex: "people",
|
||||
key: "people",
|
||||
align: "center",
|
||||
className: "h",
|
||||
width: "40%",
|
||||
},
|
||||
{
|
||||
title: "修改时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
align: "center",
|
||||
className: "h",
|
||||
width: "40%",
|
||||
},
|
||||
],
|
||||
|
||||
tableData2: [
|
||||
{
|
||||
key: 1,
|
||||
people: "张三",
|
||||
time: "2023-01-13",
|
||||
},
|
||||
],
|
||||
columns2: [
|
||||
{
|
||||
title: "内容",
|
||||
dataIndex: "people",
|
||||
key: "people",
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "修改前",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "修改后",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:ProjAuditvisible", false);
|
||||
console.log(props.finishdFun)
|
||||
props.finishdFun && props.finishdFun()
|
||||
console.log(props.finishdFun);
|
||||
props.finishdFun && props.finishdFun();
|
||||
state.valueSuggest = null;
|
||||
state.valuePass = "1";
|
||||
};
|
||||
@@ -232,26 +420,26 @@ export default {
|
||||
state.manager = info.manager;
|
||||
state.remark = info.remark;
|
||||
state.level =
|
||||
info.level == 1
|
||||
? "集团级"
|
||||
: info.level == 2
|
||||
? "组织级"
|
||||
: info.level == 3
|
||||
? "现地级"
|
||||
: info.level == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
info.level == 1
|
||||
? "集团级"
|
||||
: info.level == 2
|
||||
? "组织级"
|
||||
: info.level == 3
|
||||
? "现地级"
|
||||
: info.level == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
state.tlevel = info.level;
|
||||
state.systemId =
|
||||
info.systemId == 1
|
||||
? "集团级"
|
||||
: info.systemId == 2
|
||||
? "组织级"
|
||||
: info.systemId == 3
|
||||
? "现地级"
|
||||
: info.systemId == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
info.systemId == 1
|
||||
? "集团级"
|
||||
: info.systemId == 2
|
||||
? "组织级"
|
||||
: info.systemId == 3
|
||||
? "现地级"
|
||||
: info.systemId == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
state.tsystemId = info.systemId;
|
||||
state.checkedSty = info.courseSyncFlag == 1 ? true : false;
|
||||
state.courseSyncFlag = info.courseSyncFlag;
|
||||
@@ -267,13 +455,13 @@ export default {
|
||||
// state.attach = info.attach;
|
||||
// state.templateId = info.templateId;
|
||||
state.sourceBelong =
|
||||
info.sourceBelongId == 1
|
||||
? "项目一"
|
||||
: info.sourceBelongId == 2
|
||||
? "项目二"
|
||||
: info.sourceBelongId == 3
|
||||
? "项目三"
|
||||
: "-";
|
||||
info.sourceBelongId == 1
|
||||
? "项目一"
|
||||
: info.sourceBelongId == 2
|
||||
? "项目二"
|
||||
: info.sourceBelongId == 3
|
||||
? "项目三"
|
||||
: "-";
|
||||
});
|
||||
};
|
||||
|
||||
@@ -283,10 +471,14 @@ export default {
|
||||
const changeDe = () => {
|
||||
state.showDetail = !state.showDetail;
|
||||
};
|
||||
const changeRe = () => {
|
||||
state.showRecord = !state.showRecord;
|
||||
};
|
||||
|
||||
const subMit = () => {
|
||||
if (!state.valueSuggest) {
|
||||
message.error(`请输入审核意见!`);
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
auditView({
|
||||
@@ -296,25 +488,34 @@ export default {
|
||||
pass: state.valuePass == "1" ? 1 : -1,
|
||||
projectId: props.chooseProject,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("提交成功", res);
|
||||
message.destroy();
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.warning("提交失败");
|
||||
});
|
||||
.then((res) => {
|
||||
console.log("提交成功", res);
|
||||
message.destroy();
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.warning("提交失败");
|
||||
});
|
||||
};
|
||||
const getDictList = async (param) => api1.getDict({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
setCode: param
|
||||
}).then((res) => res.data.data.rows)
|
||||
const getDictList = async (param) =>
|
||||
api1
|
||||
.getDict({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
setCode: param,
|
||||
})
|
||||
.then((res) => res.data.data.rows);
|
||||
onMounted(async () => {
|
||||
state.calssifyList = (await getDictList("faceclassClass")).map(e => ({label: e.dictName, value: e.dictCode})) //内容
|
||||
state.faceclassScene = (await getDictList("faceclassScene")).map(e => ({label: e.dictName, value: e.dictCode})) //场景
|
||||
state.calssifyList = (await getDictList("faceclassClass")).map((e) => ({
|
||||
label: e.dictName,
|
||||
value: e.dictCode,
|
||||
})); //内容
|
||||
state.faceclassScene = (await getDictList("faceclassScene")).map((e) => ({
|
||||
label: e.dictName,
|
||||
value: e.dictCode,
|
||||
})); //场景
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -322,6 +523,7 @@ export default {
|
||||
afterVisibleChange,
|
||||
getTaskInfo,
|
||||
changeDe,
|
||||
changeRe,
|
||||
subMit,
|
||||
};
|
||||
},
|
||||
@@ -486,6 +688,56 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.record {
|
||||
.reworkTitle {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.reworkCon {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #f0f6fc;
|
||||
background-color: #fff;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background: #f0f6fc;
|
||||
}
|
||||
tr.ant-table-expanded-row > td,
|
||||
tr.ant-table-expanded-row:hover > td {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user