diff --git a/src/pages/config/pages/mechanismManage/index.vue b/src/pages/config/pages/mechanismManage/index.vue index 5b17d5bd9..b6d7808e3 100644 --- a/src/pages/config/pages/mechanismManage/index.vue +++ b/src/pages/config/pages/mechanismManage/index.vue @@ -107,6 +107,7 @@ ref="tree2" node-key="id" class="filter-tree" + style="height: 100%; overflow: auto;" v-if="modalPost" :props="props" :data="postList" diff --git a/src/pages/config/pages/postManage/index.vue b/src/pages/config/pages/postManage/index.vue index 36915c846..0f19d2965 100644 --- a/src/pages/config/pages/postManage/index.vue +++ b/src/pages/config/pages/postManage/index.vue @@ -102,6 +102,7 @@ ref="tree" node-key="id" class="filter-tree" + style="height: 100%; overflow: auto;" v-if="modalRole" :props="props" :data="roleList" diff --git a/src/pages/config/pages/roleManage/index.vue b/src/pages/config/pages/roleManage/index.vue index 19718aa73..fb7287909 100644 --- a/src/pages/config/pages/roleManage/index.vue +++ b/src/pages/config/pages/roleManage/index.vue @@ -206,6 +206,7 @@ class="filter-tree1" :data="treeData" :props="defaultProps" + style="height: 100%; overflow: auto;" default-expand-all check-strictly node-key="id" diff --git a/src/pages/config/pages/standLawsAttrManage/pages/standLawsAttrTreeDetails.vue b/src/pages/config/pages/standLawsAttrManage/pages/standLawsAttrTreeDetails.vue index bd935548b..1fe595291 100644 --- a/src/pages/config/pages/standLawsAttrManage/pages/standLawsAttrTreeDetails.vue +++ b/src/pages/config/pages/standLawsAttrManage/pages/standLawsAttrTreeDetails.vue @@ -45,9 +45,8 @@ class="filter-tree" :props="props" :data="data" - show-checkbox default-expand-all - :expand-on-click-node="false"> + > {{ node.label}} @@ -1174,7 +1173,6 @@ } this.productModelAdd.parentId = res.data.id this.productModelAdd.parentIdsName = idsName - console.log(this.productModelAdd.parentIdsName) this.$forceUpdate() }else { this.productModelAdd = res.data diff --git a/src/pages/details/otherStandardDetails/index.vue b/src/pages/details/otherStandardDetails/index.vue index 1e9df0481..867093e59 100644 --- a/src/pages/details/otherStandardDetails/index.vue +++ b/src/pages/details/otherStandardDetails/index.vue @@ -15,8 +15,8 @@ 更新记录 - 标准问答 - 标准分解单 + +
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 0b4e6b7a6..214dd7983 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -90,6 +90,7 @@ export default { let userInfoStr = Base64.decode(res.data) let userInfo2 = decodeURIComponent(userInfoStr) let userInfoObj = JSON.parse(userInfo2) + userInfoObj.userId = userInfoObj.usid this.setToken(userInfoObj.usid) // vuex存储token this.getByUserInfoCode(userInfoObj.usid).then((userInfo) => { if (userInfo !== '' && userInfo !== null) { diff --git a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue index ac4673fd0..94e7d8975 100644 --- a/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzqdfb/step1.vue @@ -563,7 +563,7 @@ size="800px"> + + {{ node.label}} + + + 新增 + + + 编辑 + + + 删除 + + +
@@ -227,7 +253,8 @@ 取消 - 提交 + 提交 @@ -821,6 +848,64 @@ 取消
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +

@@ -905,7 +990,7 @@ }" @confirm="isTreeOk" > - 导入中... + 导入中... @@ -956,20 +1041,70 @@ export default { children: 'children' }, treeList: [], + exportLoading : false, visibleOrgTable: false, orgTableVal: '', orgTableValName: '', twoOptions: [], threeOptions: [], sarType: 'STAND', + productModal: false, // 模态框是否打开 + modalType: '', + productTitle: '', // 模态框标题 // 收藏标准 personCollect: { collectResId: '', collectTitle: '', collectType: '' }, + // 规范 + productRules: { + menuName: [ + {required: true, message: '一级菜单不能为空', trigger: 'blur'}, + {type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'} + ], + displaySeq: [ + {type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'}, + {type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'} + ], + remarks: [ + {type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'} + ], + dicTypeName: [ + {required: true, message: '选项不能为空', trigger: 'blur'}, + {type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'} + ], + showIndex: [ + {type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'}, + {type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'} + ], + describes: [ + {type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'} + ] + }, + productModelAdd: { + id : "", + sorDivide : null, + menuName : "", + parentId : null, + parentIds : null, + parentIdsName : "", + displaySeq : "", + validFlag : "", + creationTime : "", + modifyTime : "", + remarks : "", + children : [], + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: "" + }, loading: false, - exportLoading: false, + importLoading: false, isCollapse: true, sideClose: false, // 边栏收展状态 isAdvancedSearch: false, // 高级检索窗口是否打开 @@ -1463,6 +1598,71 @@ export default { } }, methods: { + closeModal () { + this.productModal = false + this.closeDrawer() + }, + // 提交新增/修改 + saveProduct (name) { + this.$refs[name].validate((valid) => { + if (valid) { + if (this.modalType === 1) { + this.$http.postData('sarResource/ts-resource/add', this.productModelAdd, { + _this: this + }, res => { + if (res.ok) { + this.selectMenu() + this.productModal = false + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: this.$route.params.id + } + } else { + this.productModal = true + } + }, e => {}) + } else if (this.modalType === 2) { + this.$http.putData('sarResource/ts-resource', this.productModelAdd, { + _this: this + }, res => { + this.selectMenu() + this.productModal = false + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: this.$route.params.id + } + }, e => { + }) + } + } else { + } + }) + }, + closeDrawer () { + this.$nextTick(() => { + this.$refs['productModelAdd'].resetFields() + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: this.$route.params.id + } + }) + this.productModal = false + }, // 树点击 isTreeOk (checkedList) { this.shareStandardSelect = [] @@ -1688,7 +1888,114 @@ export default { }) } }, + // 查询二级菜单 + selectChildMenu (row) { + this.$http.get('sarResource/ts-resource/getMenuById', { + menuId: row.id + }, {}, res => { + if (res.ok) { + if(this.modalType === 1){ + let idsName = "" + if(row.parentIds !== null){ + if(row.parentIds.indexOf(res.data.id) != -1){ + this.productModelAdd.parentIds = row.parentIds + }else { + this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id + idsName = row.parentIdsName + ',' + res.data.menuName + } + }else { + this.productModelAdd.parentIds = res.data.id + idsName = res.data.menuName; + } + this.productModelAdd.parentId = res.data.id + this.productModelAdd.parentIdsName = idsName + this.$forceUpdate() + }else { + this.productModelAdd = res.data + } + } + }) + }, + update(data) { + this.modalType = 2 + this.selectChildMenu(data) + this.productModal = true + // 取消所有的选中效果 + this.handleSelectAll(false) + this.productTitle = '编辑信息' + // const newChild = { id: this.id++, label: 'testtest', children: [] }; + // if (!data.children) { + // this.$set(data, 'children', []); + // } + // data.children.push(newChild); + }, + + append(data) { + this.modalType = 1 + this.selectChildMenu(data) + this.productModal = true + // 取消所有的选中效果 + this.handleSelectAll(false) + this.productTitle = '新增下级菜单信息' + this.productModelAdd.dicTypeCode = '' + // const newChild = { id: this.id++, label: 'testtest', children: [] }; + // if (!data.children) { + // this.$set(data, 'children', []); + // } + // data.children.push(newChild); + }, + + remove(node, data) { + this.$confirm('是否删除菜单?', '提示', { + confirmButtonText: '确定', + confirmButtonClass: 'common-button-primary', + cancelButtonText: '取消', + roundButton: true, + type: 'warning' + }).then(() => { + this.$http.delete("sarResource/ts-resource", { + menuId: data.id + }, res => { + }, e => { + if(e.ok){ + this.$message({ + type: 'success', + message: "删除成功" + }) + this.selectMenu() + }else { + this.$message({ + type: 'warning', + message: e.message + }) + } + }) + }).catch(() => { + this.$refs.selections.clearSelection() + this.$message({ + type: 'info', + message: '已取消删除' + }) + }) + // const parent = node.parent; + // const children = parent.data.children || parent.data; + // const index = children.findIndex(d => d.id === data.id); + // children.splice(index, 1); + }, + // 树节点鼠标移入移出 + mouseenter(data){ + console.log(data) + this.$set(data, 'show', true) + if(data.parentId !== null){ + this.$set(data, 'showDel', true) + } + }, + mouseleave(data){ + this.$set(data, 'show', false) + this.$set(data, 'showDel', false) + }, treeClick (treeNode) { + this.selectSarMenu = treeNode this.standCommonlySearch.menuId = treeNode.id this.sarStandardsSearch.menuId = treeNode.id // 将当前二级菜单的id传回后台做标准的条件查询 this.sarStandardsSearch.page = 1 @@ -1958,20 +2265,61 @@ export default { }, // 导出确定功能 exportTestItem () { - if (this.saveExportType === 'apart') { + this.exportLoading = true + + if (this.saveExportType === 'apart') { + // const param = { + // exportType : this.saveExportType, + // exportContent : this.selectedList.join(','), + // exportName : this.exportName, + // standType : this.standType + // } if (this.selectedList != null && this.selectedList !== '') { - const exportURL = interfaceUrl + 'sarStandardsInfo/sar-standards-info/exportStandardsInfoExcel?' + - 'exportType' + this.saveExportType + '&exportContent=' + this.selectedList.join(',') + '&exportName=' + this.exportName + '&standType=' + this.standType - window.open(exportURL) - this.$message.success('导出信息成功') + // + // this.$http.post('sarStandardsInfo/sar-standards-info/exportStandardsInfoExcel', param, { + // _this: this + // }, res => { + // }, e => { + // }) + // this.$message.success('导出信息成功') + + + const exportURL = interfaceUrl + 'sarStandardsInfo/sar-standards-info/exportStandardsInfoExcel?' + + 'exportType=' + this.saveExportType + '&exportContent=' + this.selectedList.join(',') + '&exportName=' + this.exportName + '&standType=' + this.standType + window.open(exportURL) + this.$message.success('导出信息成功') + this.exportLoading = false } } else if (this.saveExportType === 'all') { let exportEOStr = JSON.stringify(this.SarExportSearchEo) - exportEOStr = exportEOStr.replace(/""/g, null) + + // const paramAll = { + // exportType : this.saveExportType, + // exportContent : exportEOStr, + // exportName : this.exportName, + // standType : this.standType + // } + // this.$http.post('sarStandardsInfo/sar-standards-info/exportStandardsInfoExcel', paramAll, { + // _this: this,responseType: 'blob', + // }, res => { + // console.log(res) + // this.exportLoading = false + // let url = window.URL.createObjectURL(new Blob([res])) + // let link = document.createElement('a') + // link.style.display = 'none' + // link.href = url + // link.setAttribute('download', 'excel.xlsx') + // document.body.appendChild(link) + // link.click() + // }, e => { + // }) + // this.$message.success('导出信息成功') + // window.open(interfaceUrl + 'sarStandardsInfo/sar-standards-info/exportStandardsInfoExcel?' + - 'exportType' + this.saveExportType + '&exportContent=' + exportEOStr + '&exportName=' + this.exportName + '&standType=' + this.standType) + 'exportType=' + this.saveExportType + '&exportContent=' + exportEOStr + '&exportName=' + this.exportName + '&standType=' + this.standType) this.$message.success('导出信息成功') - } + this.exportLoading = false + } this.exportModelFlag = false }, // 导出取消按钮关闭模态、置空 @@ -3524,7 +3872,7 @@ export default { position: relative; .tree-content { background: #fff; - width: 16%; + width: 20%; position: relative; .tree { width: calc(~'100% - 15px');