From afd772052d483f43c6796216c5dc026251916370 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 29 Mar 2022 15:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E7=AD=89?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/info1.png | Bin 0 -> 14558 bytes src/assets/img/info2.png | Bin 0 -> 15525 bytes src/assets/img/info3.png | Bin 0 -> 14623 bytes src/assets/img/trash.png | Bin 0 -> 244 bytes src/router/index.js | 2 +- src/utils/api.js | 3 +- src/views/serve/projectAdd.vue | 46 +- src/views/serve/projectList.vue | 1 + src/views/setting/index.vue | 123 +++++ src/views/setting/info.vue | 943 ++++++++++++++++++++++++++++++++ src/views/system/staff.vue | 67 ++- 11 files changed, 1131 insertions(+), 54 deletions(-) create mode 100644 src/assets/img/info1.png create mode 100644 src/assets/img/info2.png create mode 100644 src/assets/img/info3.png create mode 100644 src/assets/img/trash.png create mode 100644 src/views/setting/index.vue create mode 100644 src/views/setting/info.vue diff --git a/src/assets/img/info1.png b/src/assets/img/info1.png new file mode 100644 index 0000000000000000000000000000000000000000..164b91ad0c52c42981da830ba9c16350154523e6 GIT binary patch literal 14558 zcmeI3J8a}c7{?t>$0O(}3PLK&CnOMfXS|PWYarDJ)2nBwSBht z)=9;qLZZ3~0TnbfoM;geRCF}7&>%r`G?ah@3gbt--@Y;&x^h<9-EU|9|L+_B=CN-4 z{?7KzYm3W^f*@Sm+HCF8@1^AZvJlsA6^5>Fh`Q z?N>F+>z7R1J0zvJ?^CrP=xecWS|=nD56O|^Hl*Lb{#FtlyCL1GwQ<{Tl4ED{EFgPl z+a2rd#8Pc(%~;f9jV9=m$Q0v#&keP>A*FdW8Yj(25>rWZ(va4Zg5rLAM{Ifl5o@KI zY+v@V%VHTT6@)8DsmMxM!>Xp##QY^0i!{;$yQ}TCZsg_YuZDCSMZSj6 za5yXtDb9OmgCyqFnm!*lj_k_j}noV z84;t5>FU8187mzHYn7^o%P-+o4P%fbQ%>Y)d$!X(oyt+ws&!4lFb7ah=Ac{0HY4*t zWr13d$F{Vt7xc}@aQfyELB4yWqfsMJ77I#idOa_o!y-mSN3)uND_vyTmK#Qj~?HApr}p4xuM z)WANK`nABJhn(31nq>43TVh6`6Zw-jC zQma*JI+|>rbnG}W>Fu{1x^=^3L6)nzXR>3a@nD`2bmYcts=%LkI+Ix|y+xpRC#bkR z8K2~04?N;vbVZLiF-*scKpM=L<6r3({c592XN26mVRS1~cZk zn24Z&uA$@4k-dqky8dx!V?mv*!ij?e_%XuXFnSKoADB z@3-56pnWI^&wBUX`tAnR8e6UPPWk literal 0 HcmV?d00001 diff --git a/src/assets/img/info2.png b/src/assets/img/info2.png new file mode 100644 index 0000000000000000000000000000000000000000..c988e0d607ed5a1c304852893f5f12ec57292226 GIT binary patch literal 15525 zcmeI3TZkJ~7=TBm;%2E73$0fe(^@R;WX@cYY{n$LY}(CYvt4&ry89sQ$;`>_u*poE znQgL*h`snw@kK#VEBNA@qSO|Z_CXW{FCexks2~V}(pAt0MWrozCX>tTNph^TB83yk zO#buV&V2tl|4bg{*!bAU>d5U8j^kF3=5rJHe5?Px=|+6~wwCz=p9ZS=8JFV**ZSY< zxEEf;7WW-Br>4E>!X8bxD=}!;MHH)7s@R(2(%b4)sLvyhFQQq~%0z!Y^G=jEjZAc3 zyZ{Q-VKisvmmD;?G&ZF#&Fd*6x-AX~RGu7-d6!(xX5XRmw}{+KoKQHkYo*{G%3zEKhbOi|4KVX zNt?*+Zl=RhCOYSNRZSFYwOXvE#B66)lv1gb2xL)~1#BU>in*bN8HYrP4FC>+L#-5j2tZ^mL~dt4N$cuD#&s zXxBk}DI0oSy=Rs>#aR)_*Yuq`s+)b>d`;liSPDUf()e1nVFy9acBX8*oDEjlcncvv zJj~y_&$JA?=59`lq;;p%oj@oDJ(QIJU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zi{Po38d z&1^bPXZU_~cdEOIa6xf#P7=uK5#munEQ^91PsoDwj4&Y!0!R`l`*IXbO|Nbq%8`&0 zDLE;^96;HhgKQm5ah3m+1!_SaO_i&rU02+kURPEzZyBo@zS{_todqT5&6;VGVc}dn z!w+f(E`O29bB5z8hKlD3Inof*bxl^%2}w&R>FA0QuSUlw5-U+Nwjr z{r^s2kRRBG*J!R`nBk%#f&zvM(xAo+7Zni{FkFxZHDIYL5&$MDk3OgxF8K`%y3Z=K>@=BX;5Q^i;4&e7%oVI8Z%r}L{PwRK^oMU z;i4jf0)`9HpvDXr6%iCLT#yDeX1J(`pn&0mG^jDdMMVS!3>Tz9jTtT~A}Cz`8B=Q`L;{%l2-va zb+%MQXzOu=F20V?Kl|kRGeQjkpQbR&O>32fQtYXOqw(aD0QfiRTZd*za+>nn4#XG%ID|p`RBJRiC0!&SE=0b04SB>>Eal| zaXp!VNzVBpGmpT5Z~yC=I?Vp^vmWI6YVfSQ&D|?t!SMqHoQE#4YE5fDQSXxO_UHe7 zuGG90|IhKJYMrQ0StM2L_0Qbj;IdrO$8?3u@`wH~r4%{N;C6^B5@TT!W@BUc=#`z+ TB6?34Xdi>8tDnm{r-UW|Ns?T~ literal 0 HcmV?d00001 diff --git a/src/router/index.js b/src/router/index.js index 80b4c40..6260d6b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -129,7 +129,7 @@ let router = new Router({ }, { path: '/person', - component: () => import('../views/setting/Person.vue'), + component: () => import('../views/setting'), // meta: { title: '个人中心' } }, { diff --git a/src/utils/api.js b/src/utils/api.js index aa615c5..95225d6 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,7 +1,7 @@ import Setting from "@/setting"; const uploadURL = Setting.uploadURL -const host1 = 'http://192.168.31.137:9000/' +const host1 = 'http://39.108.250.202:9000/' export default { @@ -92,6 +92,7 @@ export default { queryProjectManage: `occupationlab/projectManage/queryProjectManage`, // 项目管理列表(分页、筛选) updateIsOpen: `occupationlab/projectManage/updateIsOpen`, // 更新开启状态 getProjectDetail: `occupationlab/projectManage/getProjectDetail`, // 根据项目id查询详情 + saveProjectDraft: `occupationlab/projectManage/saveProjectDraft`, // 新增项目管理 addProjectManage: `occupationlab/projectManage/addProjectManage`, // 新增项目管理 updateProjectManage: `occupationlab/projectManage/updateProjectManage`, // 修改项目管理 copyProjectManage: `occupationlab/projectManage/copyProjectManage`, // 复制项目管理 diff --git a/src/views/serve/projectAdd.vue b/src/views/serve/projectAdd.vue index c456feb..f6141d9 100644 --- a/src/views/serve/projectAdd.vue +++ b/src/views/serve/projectAdd.vue @@ -257,6 +257,7 @@ export default { selectedJudgment: [], // 选中的判分点 rowKey: "", // 判分点行数据的 Key projectNameRepeat: false, // 项目名称是否重复 + originName: '', flag: false, //判分点表格分数是否禁用 avgValuelist: [], //取得判分点平均分的数组 @@ -365,19 +366,18 @@ export default { } }, projectNameExistis() { // 项目管理名称判重 - if (this.projectManage.projectName) { - this.$post(this.api.queryNameIsExist, { projectName: this.projectManage.projectName }).then(res => { - if (res.status === 200) { - this.projectNameRepeat = false; - } else { - this.projectNameRepeat = true; - } - }).catch(err => { - this.projectNameRepeat = true; - }); - } else { - this.projectNameRepeat = false; - } + const { projectName } = this.projectManage + if (this.originName === projectName) { + this.projectNameRepeat = false + } else { + this.$post(this.api.queryNameIsExist, { projectName }).then(res => { + if (res.status === 200) { + this.projectNameRepeat = false + } + }).catch(err => { + this.projectNameRepeat = true + }) + } }, systemChange() { // 切换系统 if (this.projectJudgmentData.length) { @@ -392,6 +392,10 @@ export default { }); } }, + // 去除空白标签 + removeTag(val) { + return val.replace('


', '') + }, judgmentRelease(state) { //判断能否成功发布 let { projectName, @@ -409,14 +413,11 @@ export default { return false; } if (state) { - let reg = /<\/?.+?\/?>/g - let experimentTargets = experimentTarget.replace(reg, '') - if (!experimentTargets) { + if (!experimentTarget || !this.removeTag(experimentTarget)) { this.$message.warning("请输入实验目标"); return false; } - let experimentDescriptions = experimentDescription.replace(reg, '') - if (!experimentDescriptions) { + if (!experimentDescription || !this.removeTag(experimentDescription)) { this.$message.warning("请输入案例描述"); return false; } @@ -432,8 +433,7 @@ export default { this.$message.warning("判分点分数已超过100"); return false; } - let experimentHints = experimentHint.replace(reg, '') - if (!experimentHints && hintOpen == 0) { + if ((!experimentHint || !this.removeTag(experimentHint)) && hintOpen == 0) { this.$message.warning("请输入实验提示"); return false; } @@ -497,7 +497,7 @@ export default { }); }, addProject(params) { // 添加项目 - this.$post(`${this.api.addProjectManage}`, params).then(res => { + this.$post(this.api[params.projectManage.state ? 'addProjectManage' : 'saveProjectDraft'], params).then(res => { if (res.status === 200) { this.$message.success("添加实验项目成功"); this.$router.back(); @@ -609,7 +609,7 @@ export default { this.judgementData = result; } }).catch(err => { - console.log(err); + this.visibleLoading = false }); }, getProgrammingClassData(params) { // 获取编程类判分点列表数据 @@ -626,7 +626,7 @@ export default { this.judgementData = result; } }).catch(err => { - console.log(err); + this.visibleLoading = false }); }, handleSelectionJudgment(val) { // 处理多选判分点 diff --git a/src/views/serve/projectList.vue b/src/views/serve/projectList.vue index 6da7fd7..869b36f 100644 --- a/src/views/serve/projectList.vue +++ b/src/views/serve/projectList.vue @@ -97,6 +97,7 @@ 复制 +
+
+
+
+ + + 点击更换头像 + +
+ + +
+
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/src/views/setting/info.vue b/src/views/setting/info.vue new file mode 100644 index 0000000..5827e80 --- /dev/null +++ b/src/views/setting/info.vue @@ -0,0 +1,943 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/staff.vue b/src/views/system/staff.vue index 5be3839..d426915 100644 --- a/src/views/system/staff.vue +++ b/src/views/system/staff.vue @@ -35,16 +35,19 @@ {{ node.label }} @@ -94,8 +97,8 @@
- 新增员工 - 批量导入 + 新增员工 + 批量导入
@@ -105,14 +108,14 @@ - - + + @@ -168,9 +171,10 @@
- 模板下载 + 模板下载
上传文件 @@ -383,7 +388,8 @@ export default { }, // 组织类别筛选回调 changeType() { - this.initData(true) + this.$refs.orgTree.setCurrentKey(null) + this.initData() }, // 添加部门 addOrg(node, data) { @@ -479,11 +485,10 @@ export default { this.getOrg() }, // 员工列表 - getStaff(fromType) { - const orgId = this.$refs.orgTree.getCurrentKey() || '' + getStaff() { this.$post(this.api.staffList, { type: this.studentType || 1, - staffArchitectureId: fromType ? '' : orgId, + staffArchitectureId: this.$refs.orgTree.getCurrentKey() || '', keyWord: this.keyWord, pageNum: this.page, pageSize: this.pageSize @@ -500,10 +505,10 @@ export default { handleSelectionChange(val) { // 多选 this.multipleSelection = val }, - initData(fromType) { + initData() { this.$refs.table.clearSelection() this.page = 1 - this.getStaff(fromType) + this.getStaff() }, // 删除 delStaff(row) { @@ -518,8 +523,9 @@ export default { }, // 重置密码 resetPassword(row) { - this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, "提示", { type: "warning" }).then(() => { - this.$get(`${this.api.resetPassword}?userId=${row.userId}&newPwd=111aaa`).then(res => { + const newPwd = Setting.initialPassword + this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => { + this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => { util.successMsg("重置成功") }).catch(res => {}) }).catch(() => {}) @@ -626,7 +632,6 @@ export default { submitStaff() { this.$refs.form.validate((valid) => { if (valid) { - debugger if (this.submiting) return false if (this.accountReapeat) return util.warningMsg("该账号已存在") if (this.workNumberReapeat) return util.warningMsg("该工号已存在") @@ -635,7 +640,7 @@ export default { this.submiting = true const form = JSON.parse(JSON.stringify(this.form)) const ids = form.staffArchitectureId - form.staffArchitectureId = ids.map(e => e[e.length - 1]) + if (ids) form.staffArchitectureId = ids.map(e => e[e.length - 1]) if (form.accountId) { this.$post(this.api.modifyStaff, form).then(res => { util.successMsg("编辑成功!") @@ -667,7 +672,6 @@ export default { }, // 关闭新增员工对话框 closeStaff() { - this.$refs.form.clearValidate() this.form = { accountId: '', userName: '', @@ -678,9 +682,8 @@ export default { email: '', staffArchitectureId: [], roleList: [] - }; + } this.isDetail = false - this.staffVisible = false this.getStaff() }, // 批量导入 @@ -690,7 +693,7 @@ export default { this.uploadFaild = false }, // 模板下载 - downLoad() { + download() { location.href = this.api.staffTemplate }, // 上传文件 @@ -703,15 +706,24 @@ export default { showFaild() { location.href = `${this.api.exportFailure}?exportCode=${this.exportCode}` }, + // 上传成功后重置渲染 + importSuccess() { + this.importVisible = false + this.studentType = 1 + this.keyWord = '' + this.$refs.orgTree.setCurrentKey(null) + this.getOrg() + }, uploadSuccess(res, file, fileList) { this.uploadFaild = false if (res.status === 200) { if (res.data.exportCode) { this.exportCode = res.data.exportCode this.uploadFaild = true + util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) + } else { + this.importSuccess() } - util.successMsg(`上传成功${res.data.successNum},上传失败${res.data.failureNum}`) - util.successMsg(`本次上传有${res.data.failureNum}个错误信息录入`) } else { res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据") } @@ -731,10 +743,7 @@ export default { this.uploadFaild = false }, uploadSure() { - this.importVisible = false - this.studentType = 1 - this.keyWord = '' - this.initData() + this.uploadFaild ? this.importSuccess() : this.$refs.importStaff.submit() } } };