diff --git a/src/api/config.js b/src/api/config.js index f545226a..e51593fd 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-11-21 15:13:50 + * @LastEditTime: 2022-11-22 20:17:22 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -29,6 +29,7 @@ http.interceptors.request.use( config.headers.token = 123456; //测试1111 } else { console.log("当前请求页面无token,请执行操作!!!"); + // 此处测试默认配置token config.headers.token = "123456"; // config.headers.token = "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2Njg4NjI2MTAsImV4cCI6MTY2ODg2OTgxMCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.defa91ecb2b61d9b20d858db0c2c8d7d80dea4613cb2559a22569b7df36b3f6b"; diff --git a/src/api/index1.js b/src/api/index1.js index 6e5402e5..bc2d71bd 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-04 22:45:31 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-11-21 16:39:08 + * @LastEditTime: 2022-11-22 18:04:47 * @FilePath: /fe-manage/src/api/index1.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -87,6 +87,10 @@ export const billboard = (obj) => http.post('/admin/project/billboard', obj); //获取字典信息 export const getDict = (obj) => http.post('/dict/getList', obj) +//获取组织树 +export const getOrgTree = (obj) => http.post('/admin/router/orgList', obj) + + // 获取组织结构树 export const orgtree = () => http.get('/org/tree'); diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index ce679c18..41e7257d 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -192,8 +192,8 @@ src="../assets/images/navleft/certificate.png" /> - - 证书中心 + 证书中心 +
@@ -202,7 +202,8 @@ src="../assets/images/navleft/system.png" />
- 系统管理 + 系统管理 +
@@ -219,6 +220,9 @@ mode="inline" @click="handleClick" > + + 审核 + 学习 diff --git a/src/components/drawers/OwnPower.vue b/src/components/drawers/OwnPower.vue index 5ca07e8a..a91eace8 100644 --- a/src/components/drawers/OwnPower.vue +++ b/src/components/drawers/OwnPower.vue @@ -6,7 +6,7 @@ width="85%" @after-visible-change="afterVisibleChange" > -
+
归属权
@@ -121,80 +122,30 @@
-
-
已选
- -
-
-
- 全部清除 -
-
-
-
快速选人
-
-
-
- +
+
当前归属:
{{ item.name }}
-
-
-
- 查看更多 - -
-
-
-
- 收起 - -
+
+ 转移归属权
-
@@ -202,8 +153,6 @@
- - @@ -567,7 +516,6 @@ export default { }, ], - //快速选人------------------------------------- valueSelectboe: null, //快速选人的选择组织 choosepeople: [], //总的数组 @@ -576,14 +524,12 @@ export default { showHidden: false, //是否显示收回 selectedRowKeys: [], //表格选中的key //快速选人------------------------------------- - }); const closeDrawer = () => { state.activeKey = "1"; ctx.emit("update:ownpowervisible", false); }; - const afterVisibleChange = (bool) => { console.log("state", bool); }; @@ -690,8 +636,6 @@ export default { // 结束 快速选人------------------------------------------------------------------ - - //全部清除 const deleteAll = () => { //快速选人------------------------------------- @@ -701,10 +645,9 @@ export default { state.showHidden = false; //是否显示收回 state.selectedRowKeys = []; //表格选中的key //快速选人------------------------------------- - }; return { - ...toRefs(state), + ...toRefs(state), afterVisibleChange, closeDrawer, onSelectChange, @@ -715,10 +658,7 @@ export default { morePeopleShow, morePeopleHidden, - - deleteAll, - }; }, }; @@ -726,7 +666,7 @@ export default { diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue index 9958aeb4..9979a4ce 100644 --- a/src/views/projectcenter/ProjectAdd.vue +++ b/src/views/projectcenter/ProjectAdd.vue @@ -307,6 +307,10 @@ @change="classificationChange4" placeholder="请选择培训分类" :disabled="viewDetail ? true : false" + :fieldNames="{ + label: 'dictName', + value: 'dictCode', + }" /> @@ -420,153 +424,17 @@ export default { const store = useStore(); // 编辑页面跳转过来时候,自动填充表格 const routers = useRoute(); - const isEdit = ref(false); - let peojectID = ""; - console.log("store.state.orgtreeList", store.state.orgtreeList); - if (routers.query.projectId) { - storage.set("projectAddId", routers.query.projectId); - isEdit.value = true; - peojectID = routers.query.projectId; - // 需要编辑 - api - .getProjectDetail({ projectId: routers.query.projectId }) - .then((res) => { - if (res.status == 200 && res.data.code == 200) { - let info = res.data.data.projectInfo; - console.log(info); - // projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 * - projectName.value = info.name; - state.classifySelect = classifyList.value[1]; // info.category - imageUrl.value = info.picUrl; - - let start = toDate(info.beginTime / 1000, "YYYY/MM/DD"); - let end = toDate(info.endTime / 1000, "YYYY/MM/DD"); - state.rangevalue = [ - dayjs(start, "YYYY/MM/DD"), - dayjs(end, "YYYY/MM/DD"), - ]; - - let manageName = info.manager.split(","); - let manageValue = info.managerId.split(","); - let optionsManage = []; - for (let i = 0; i < manageName.length; i++) { - let obj = { - label: manageName[i], - value: manageValue[i], - }; - optionsManage.push(obj); - } - console.log(optionsManage); - state.classifySelect1 = optionsManage; - state.classifySelect2 = - classifyList2.value[info.sourceBelongId - 1]; - remark.value = info.remark; - state.checked = info.boeFlag ? info.boeFlag : false; - state.classifySelect3 = classifyList3.value[info.level]; - state.classifySelect4 = classifyList4.value[info.systemId - 1]; - state.checked1 = info.boeFlag ? info.boeFlag : false; - // fileList1.value = info.attach.split(","); - - projectType = 1; - picUrl = info.picUrl; - beginTime = Number(info.beginTime / 1000); - endTime = Number(info.endTime / 1000); - manager = info.manager; - managerId = info.managerId; - sourceBelongIdC = Number(info.sourceBelongId); - courseSyncFlag = info.courseSyncFlag; - levels = info.level; - systemid = info.systemId; - boeFlag = info.boeFlag; - } - }) - .catch((err) => { - console.log(err); - }); - } else { - if (storage.get("projectAddId")) { - isEdit.value = true; - peojectID = storage.get("projectAddId"); - // 需要编辑 - api - .getProjectDetail({ projectId: storage.get("projectAddId") }) - .then((res) => { - if (res.status == 200 && res.data.code == 200) { - let info = res.data.data.projectInfo; - console.log("我是从本地存储获取的id", info); - projectName.value = info.name; - state.classifySelect = classifyList.value[1]; // info.category - imageUrl.value = info.picUrl; - - let start = toDate(info.beginTime / 1000, "YYYY/MM/DD"); - let end = toDate(info.endTime / 1000, "YYYY/MM/DD"); - state.rangevalue = [ - dayjs(start, "YYYY/MM/DD"), - dayjs(end, "YYYY/MM/DD"), - ]; - - let manageName = info.manager.split(","); - let manageValue = info.managerId.split(","); - let optionsManage = []; - for (let i = 0; i < manageName.length; i++) { - let obj = { - label: manageName[i], - value: manageValue[i], - }; - optionsManage.push(obj); - } - console.log(optionsManage); - state.classifySelect1 = optionsManage; - state.classifySelect2 = - classifyList2.value[info.sourceBelongId - 1]; - remark.value = info.remark; - state.checked = info.boeFlag ? info.boeFlag : false; - state.classifySelect3 = classifyList3.value[info.level]; - state.classifySelect4 = classifyList4.value[info.systemId - 1]; - state.checked1 = info.boeFlag ? info.boeFlag : false; - - projectType = 1; - picUrl = info.picUrl; - beginTime = Number(info.beginTime / 1000); - endTime = Number(info.endTime / 1000); - manager = info.manager; - managerId = info.managerId; - sourceBelongIdC = Number(info.sourceBelongId); - courseSyncFlag = info.courseSyncFlag; - levels = info.level; - systemid = info.systemId; - boeFlag = info.boeFlag; - } - }) - .catch((err) => { - console.log(err); - }); - } - } - - const backPage = () => { - storage.remove("projectAddId"); - setTimeout(() => { - router.push({ - path: "/projectmanage", - }); - }, 400); - }; - const router = useRouter(); const state = reactive({ - classifySelect: null, - classifySelectId: null, - checked: false, - checked1: false, - valueE: null, - valueE1: null, - valueE2: null, - classifySelect1: [], - classifySelect2: null, - classifySelect3: [], - classifySelect4: [], - rangevalue: [], + classifySelect: null, //分类选择信息 + projectType: null, //分类选择的id + checked: false, //同步学习记录 + checked1: false, //BOEU实施 + classifySelect1: [], //选中项目经理名称数组 + classifySelect2: null, //选中的资源归属信息 + classifySelect3: null, //选中的项目级别信息 + classifySelect4: null, //选中的培训分类信息 + rangevalue: [], //项目时间 currentPage: 1, //当前页 tableDataTotal: -1, //模版列表总数 @@ -574,10 +442,21 @@ export default { totalPages: 0, //总页数 viewDetail: routers.query.viewDetail ? routers.query.viewDetail : null, }); - - const projectName = ref(""); - //分类 + //分类列表 const classifyList = ref([]); + + //项目封面 + const imageUrl = ref(""); + // 项目级别 + const classifyList3 = ref([ + // { value: 1, label: "集团级" }, + ]); + + // 培训分类 + const classifyList4 = ref([ + // { value: 1, label: "集团级" }, + ]); + //获取分类、封面图、项目级别、培训分类-----------字典配置------------------------------- const getDictList = (param) => { let obj = { pageNo: 1, @@ -595,11 +474,15 @@ export default { if (param === "projectPic") { if (res.data.data.rows.length > 0) { imageUrl.value = res.data.data.rows[0].dictValue; + picUrl = res.data.data.rows[0].dictValue; } } if (param === "projectLevel") { classifyList3.value = res.data.data.rows; } + if (param === "projectSys") { + classifyList4.value = res.data.data.rows; + } } }) .catch((err) => { @@ -609,11 +492,164 @@ export default { getDictList("projectClass"); getDictList("projectPic"); getDictList("projectLevel"); + getDictList("projectSys"); + //获取分类、封面图、项目级别、培训分类---------------字典配置--------------------------- - let projectType = ""; + const isEdit = ref(false); + let peojectID = ""; //项目id + console.log("store.state.orgtreeList", store.state.orgtreeList); + const editProject = () => { + if (routers.query.projectId) { + storage.set("projectAddId", routers.query.projectId); + isEdit.value = true; + peojectID = routers.query.projectId; + // 需要编辑 + api + .getProjectDetail({ projectId: routers.query.projectId }) + .then((res) => { + if (res.status == 200 && res.data.code == 200) { + let info = res.data.data.projectInfo; + console.log( + "classifyList.value.find(item=>item.dictCode===info.category)", + classifyList.value.find((item) => { + if (item.dictCode == 11) { + return item.dictName; + } + // return item.dictName; + }), + classifyList.value, + info.category + ); + + console.log(info); + // projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 * + projectName.value = info.name; //项目名称 + // state.classifySelect =classifyList.value.find(item=>item.dictCode===info.category) ; // info.category 项目分类 + state.projectType = 1; //分类选择的id + + imageUrl.value = info.picUrl; //封面图 + + let start = toDate(info.beginTime / 1000, "YYYY/MM/DD"); //开始时间 + let end = toDate(info.endTime / 1000, "YYYY/MM/DD"); //结束时间 + state.rangevalue = [ + dayjs(start, "YYYY/MM/DD"), + dayjs(end, "YYYY/MM/DD"), + ]; + + let manageName = info.manager.split(","); //项目经理 + let manageValue = info.managerId.split(","); //项目经理id数组 + let optionsManage = []; + for (let i = 0; i < manageName.length; i++) { + let obj = { + label: manageName[i], + value: manageValue[i], + }; + optionsManage.push(obj); + } + console.log(optionsManage); + state.classifySelect1 = optionsManage; + state.classifySelect2 = + classifyList2.value[info.sourceBelongId - 1]; + remark.value = info.remark; + state.checked = info.boeFlag ? info.boeFlag : false; + state.classifySelect3 = classifyList3.value[info.level]; + state.classifySelect4 = classifyList4.value[info.systemId - 1]; + state.checked1 = info.boeFlag ? info.boeFlag : false; + // fileList1.value = info.attach.split(","); + + picUrl = info.picUrl; + beginTime = Number(info.beginTime / 1000); + endTime = Number(info.endTime / 1000); + manager = info.manager; + managerId = info.managerId; + sourceBelongIdC = Number(info.sourceBelongId); + courseSyncFlag = info.courseSyncFlag; + levels = info.level; + systemid = info.systemId; + boeFlag = info.boeFlag; + } + }) + .catch((err) => { + console.log(err); + }); + } else { + if (storage.get("projectAddId")) { + isEdit.value = true; + peojectID = storage.get("projectAddId"); + // 需要编辑 + api + .getProjectDetail({ projectId: storage.get("projectAddId") }) + .then((res) => { + if (res.status == 200 && res.data.code == 200) { + let info = res.data.data.projectInfo; + console.log("我是从本地存储获取的id", info); + projectName.value = info.name; + state.classifySelect = classifyList.value[1]; // info.category 分类选择的信息 + state.projectType = 1; //分类选择的id + imageUrl.value = info.picUrl; + + let start = toDate(info.beginTime / 1000, "YYYY/MM/DD"); + let end = toDate(info.endTime / 1000, "YYYY/MM/DD"); + state.rangevalue = [ + dayjs(start, "YYYY/MM/DD"), + dayjs(end, "YYYY/MM/DD"), + ]; + + let manageName = info.manager.split(","); + let manageValue = info.managerId.split(","); + let optionsManage = []; + for (let i = 0; i < manageName.length; i++) { + let obj = { + label: manageName[i], + value: manageValue[i], + }; + optionsManage.push(obj); + } + console.log(optionsManage); + state.classifySelect1 = optionsManage; + state.classifySelect2 = + classifyList2.value[info.sourceBelongId - 1]; + remark.value = info.remark; + state.checked = info.boeFlag ? info.boeFlag : false; + state.classifySelect3 = classifyList3.value[info.level]; + state.classifySelect4 = classifyList4.value[info.systemId - 1]; + state.checked1 = info.boeFlag ? info.boeFlag : false; + + picUrl = info.picUrl; + beginTime = Number(info.beginTime / 1000); + endTime = Number(info.endTime / 1000); + manager = info.manager; + managerId = info.managerId; + sourceBelongIdC = Number(info.sourceBelongId); + courseSyncFlag = info.courseSyncFlag; + levels = info.level; + systemid = info.systemId; + boeFlag = info.boeFlag; + } + }) + .catch((err) => { + console.log(err); + }); + } + } + }; + editProject(); + + const backPage = () => { + storage.remove("projectAddId"); + setTimeout(() => { + router.push({ + path: "/projectmanage", + }); + }, 400); + }; + + const projectName = ref(""); //项目名称 + + //选择分类 const classificationChange = (value) => { console.log(`selected ${value}`); - projectType = value; + state.projectType = value; //分类选择的id }; function getBase64(img, callback) { @@ -625,8 +661,8 @@ export default { const fileList = ref([]); const fileList1 = ref([]); const loading = ref(false); - const imageUrl = ref(""); - let picUrl = ""; + + let picUrl = ""; //项目封面 const handleChange = (info) => { if (info.file.status === "uploading") { @@ -727,7 +763,6 @@ export default { beginTime = new Date(dateString[0]).getTime() / 1000; endTime = new Date(dateString[1]).getTime() / 1000; }; - // 项目经理 后续接口调用 const classifyList1 = ref([ { value: 1, label: "李俊国" }, @@ -735,6 +770,7 @@ export default { { value: 3, label: "刘孟君" }, ]); + //选择处理项目经理 let manager = ""; let managerId = ""; const classificationChange1 = (key, options) => { @@ -774,28 +810,14 @@ export default { sourceBelongIdC = key; }; - // 项目级别 - const classifyList3 = ref([ - // { value: 1, label: "集团级" }, - // { value: 2, label: "组织级" }, - // { value: 3, label: "现地级" }, - // { value: 4, label: "部门级" }, - ]); - + //选择项目级别 let levels = ""; const classificationChange3 = (key) => { console.log(`selected ${key}`, classifyList3); levels = key; }; - // 培训分类 - const classifyList4 = ref([ - { value: 1, label: "集团级" }, - { value: 2, label: "组织级" }, - { value: 3, label: "现地级" }, - { value: 4, label: "部门级" }, - ]); - + //选择培训分类 let systemid = ""; const classificationChange4 = (key) => { console.log(`selected ${key}`, classifyList4); @@ -824,7 +846,9 @@ export default { console.log(info); // projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 * projectName.value = info.name; - state.classifySelect = classifyList.value[1]; // info.category + state.classifySelect = classifyList.value[1]; // info.category 分类选择的信息 + state.projectType = 1; //分类选择的id + imageUrl.value = info.picUrl; let start = toDate(info.beginTime / 1000, "YYYY/MM/DD"); @@ -855,7 +879,6 @@ export default { state.checked1 = info.boeFlag ? info.boeFlag : false; // fileList1.value = info.attach.split(","); - projectType = 1; picUrl = info.picUrl; beginTime = Number(info.beginTime / 1000); endTime = Number(info.endTime / 1000); @@ -924,19 +947,22 @@ export default { // 项目说明 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; }; - + //同步学习记录------------------------------------ + //BOEU实施-------------------------------------- let boeFlag = 0; const changeChecked1 = () => { console.log(state.checked1); state.checked1 ? (state.checked1 = false) : (state.checked1 = true); boeFlag = state.checked1 ? 1 : 0; }; + //BOEU实施-------------------------------------- const removeFile = (file) => { const index = fileList1.value.indexOf(file); @@ -980,7 +1006,7 @@ export default { let obj = { projectId: Number(peojectID), name: projectName["value"], - category: projectType, + category: state.projectType, //分类选择的id picUrl: picUrl, beginTime: beginTime, endTime: endTime, @@ -1037,7 +1063,7 @@ export default { } else { let obj = { name: projectName["value"], - category: projectType, + category: state.projectType, //分类选择的id picUrl: picUrl, beginTime: beginTime, endTime: endTime, diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index 950929d5..19b9b82e 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -2047,13 +2047,16 @@ export default { customRender: (value) => { return (
- {value.record.status == 0 + {value.record.status == 0 || + value.record.status == 1 || + value.record.status == 2 || + value.record.status == -2 ? "草稿" - : value.record.status == 1 && + : value.record.status == 3 && Number(value.record.beginTime) < Math.ceil(new Date().getTime() / 1000) ? "进行中" - : value.record.status == 1 && + : value.record.status == 3 && Number(value.record.beginTime) > Math.ceil(new Date().getTime() / 1000) && value.record.type !== 1 && @@ -2074,6 +2077,36 @@ export default { width: 100, align: "center", }, + { + title: "是否审核", + dataIndex: "status", + // width: "30%", + key: "status", + width: 100, + align: "center", + customRender: (value) => { + { + console.log("获取项目", value); + } + return ( +
+ {value.record.type !== 3 + ? "-" + : value.record.status == 0 + ? "未审核" + : value.record.status == 1 + ? "审核中" + : value.record.status == 2 || + value.record.status == 3 || + value.record.status == -1 + ? "已审核" + : value.record.status == -2 + ? "未通过" + : "-"} +
+ ); + }, + }, { title: "创建时间", dataIndex: "createTime", @@ -2094,7 +2127,10 @@ export default { customRender: (value) => { // console.log("value", value.record.type, value.record.status); return value.record.type === 1 ? ( - value.record.status === 0 ? ( + value.record.status === 0 || + value.record.status === 1 || + value.record.status === 2 || + value.record.status === -2 ? (
{ @@ -2214,7 +2250,7 @@ export default {
- ) : value.record.status === 1 ? ( + ) : value.record.status === 3 ? (
查看
@@ -2404,7 +2440,10 @@ export default {
) ) : value.record.type === 2 ? ( - value.record.status === 0 ? ( + value.record.status === 0 || + value.record.status === 1 || + value.record.status === 2 || + value.record.status === -2 ? (
{ @@ -2515,7 +2554,7 @@ export default {
- ) : value.record.status === 1 ? ( + ) : value.record.status === 3 ? (
查看
@@ -2812,7 +2851,23 @@ export default {
- {value.record.status === 0 ? ( + {value.record.status === 0 || value.record.status === -2 ? ( + {}} + style="cursor:pointer" + class="operation3" + > + 提交审核 + + ) : value.record.status === 1 ? ( + {}} + style="cursor:pointer" + class="operation3" + > + 撤回审核 + + ) : value.record.status === 2 ? ( { console.log("value.record", value.record); diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 1fe5cce7..756f721e 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -794,7 +794,7 @@