diff --git a/src/components/CustomFormComponents/File.vue b/src/components/CustomFormComponents/File.vue index 4dc120d31..f0488b990 100644 --- a/src/components/CustomFormComponents/File.vue +++ b/src/components/CustomFormComponents/File.vue @@ -366,27 +366,39 @@ export default { obj.name = file.response.data.oldFileName obj.response.data = file.response.data this.showFileList.push(obj) - // this.value += res.data.id + ',' - this.$emit('input', this.value ? (this.value + ','+ res.data.id + ',').replaceAll(",,",',') : (this.value+ res.data.id + ',').replaceAll(',,',',')) - this.$emit('success') - this.$message({ - message: '文件上传成功', - type: 'success' - }) - switch (this.config.attrField) { - case 'recordsAttr': - this.$emit('recordsAttrTime', res.data.uploadTime) - break - case 'signAttr': - this.$emit('signAttrTime', res.data.uploadTime) - break - case 'otherAttr': - this.$emit('otherAttrTime', res.data.uploadTime) - break - } - // 国内外标准法规返回文件上传成功状态 - this.$emit('fileSuccess', true) - // this.importModalshowflagtemp = false + let attrIds="" + if(this.value != null && this.value !== ''){ + let attrArray= this.value.split(',') + // 方法二:filter方法 [推荐写法] + let attrIdsArray = attrArray.filter((s) => { + return s && s.trim(); // 注:IE9(不包含IE9)以下的版本没有trim()方法 + }); + attrIdsArray.push(res.data.id); + console.log(attrIdsArray) + attrIds = attrIdsArray.join(',')+"," + }else{ + attrIds =res.data.id+"," + } + this.$emit('input', attrIds) + this.$emit('success') + this.$message({ + message: '文件上传成功', + type: 'success' + }) + switch (this.config.attrField) { + case 'recordsAttr': + this.$emit('recordsAttrTime', res.data.uploadTime) + break + case 'signAttr': + this.$emit('signAttrTime', res.data.uploadTime) + break + case 'otherAttr': + this.$emit('otherAttrTime', res.data.uploadTime) + break + } + // 国内外标准法规返回文件上传成功状态 + this.$emit('fileSuccess', true) + // this.importModalshowflagtemp = false } else { this.$message({ message: res.message, diff --git a/src/pages/config/pages/mechanismManage/pages/mechanism.vue b/src/pages/config/pages/mechanismManage/pages/mechanism.vue index 9c570751a..e2696eecb 100644 --- a/src/pages/config/pages/mechanismManage/pages/mechanism.vue +++ b/src/pages/config/pages/mechanismManage/pages/mechanism.vue @@ -72,6 +72,9 @@ 批量配置岗位 + + 根据部门批量配置岗位 + @@ -186,7 +189,6 @@ 加载中... - 导入中... 确定 取消 + 导入中... @@ -284,9 +288,11 @@ export default { data: [], // table数据 treeLoading: false, Loading: false, + butionLoading: false, id: '', // 批量配置岗位勾选暂存 manageData: [], + configOrgManage:false, drawerTitle: '配置岗位' } }, @@ -301,26 +307,43 @@ export default { }, resetFormPost() { this.modalPost = false + this.postList = [] this.page1 = 1 }, PostSubmit() { + this.butionLoading = true if (this.drawerTitle === '配置岗位') { this.$http.postData('sarUser/user/position', { positionIds: this.$refs.tree2.getCheckedKeys(), userId: this.userId }, {}, res => { if (res.ok) { + this.butionLoading = false this.$message.success('配置岗位成功') this.modalPost = false this.getData() } }) - } else { + } else if(this.configOrgManage){ + //批量配置岗位信息 + this.$http.postData('sarUser/user/positionBatchByOrgId', { + positionIds: this.$refs.tree2.getCheckedKeys(), + orgId: this.id + }, {}, res => { + if (res.ok) { + this.butionLoading = false + this.$message.success('批量配置岗位成功') + this.modalPost = false + this.getData() + } + }) + }else{ this.$http.postData('sarUser/user/positionBatch', { positionIds: this.$refs.tree2.getCheckedKeys(), userId: this.userId }, {}, res => { if (res.ok) { + this.butionLoading = false this.$message.success('配置岗位成功') this.modalPost = false this.getData() @@ -539,6 +562,7 @@ export default { }, selectEdit() { + this.configOrgManage = false this.getTree2() if(this.manageData.length){ this.userId = [] @@ -551,6 +575,13 @@ export default { this.$message.warning('请选择需要批量配置岗位的角色') } }, + selectEditOfOrg() { + this.configOrgManage = true + this.getTree2() + this.drawerTitle = '批量配置岗位' + this.modalPost = true + }, + }, computed: {}, watch: { diff --git a/src/pages/details/otherStandardDetails/index.vue b/src/pages/details/otherStandardDetails/index.vue index 74e5d2ae7..fffd27e88 100644 --- a/src/pages/details/otherStandardDetails/index.vue +++ b/src/pages/details/otherStandardDetails/index.vue @@ -98,11 +98,13 @@ - +

- + + + + + + + + + {{ scope.row.dtbzh }} - - - - - - - - + + + + + - - - + + + + + + + + - - - - - - - - +