diff --git a/src/common/myFun.js b/src/common/myFun.js new file mode 100644 index 000000000..0a34d4ae9 --- /dev/null +++ b/src/common/myFun.js @@ -0,0 +1,17 @@ +function getTreeItem(tree, id){ + let result = {} + tree.map(item => { + if(item.id === id){ + result = item + }else{ + if(item.children.length > 0){ + getTreeItem(item.children) + } + } + }) + return result +} + +export { + getTreeItem +} diff --git a/src/components/abc/selectTree/selectTree.vue b/src/components/abc/selectTree/selectTree.vue new file mode 100644 index 000000000..ccca7a5eb --- /dev/null +++ b/src/components/abc/selectTree/selectTree.vue @@ -0,0 +1,215 @@ + + + + + diff --git a/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue b/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue index ade3fe271..b3cb8d26f 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue @@ -533,13 +533,14 @@ clearable :maxlength="100"> - - - + + 0){ this.replaceLawsNumForm.issueTimeStart = this.replaceLawsNumForm.issueTimeArr[0] || null this.replaceLawsNumForm.issueTimeEnd = this.replaceLawsNumForm.issueTimeArr[1] || null @@ -978,6 +989,10 @@ export default { }) }, getReplaceLawsNumRowFirst () { + this.replaceLawsNumForm.userId = this.$store.getters.userInfo.userId + let currentTreeItem = getTreeItem(this.selectTreeList, this.replaceLawsNumForm.menuId) + this.replaceLawsNumForm.treeType = currentTreeItem.treeType + this.replaceLawsNumForm.page = 1 this.replacePage = 1 if(this.replaceLawsNumForm.issueTimeArr && this.replaceLawsNumForm.issueTimeArr.length > 0){ @@ -1058,9 +1073,40 @@ export default { handleTabs(name) { this.active = name; }, - choiceShow(){ + async choiceShow(){ this.getReplaceLawsNumRow() this.replaceLawsNumModel = true; + // 标准类别树 + const list1 = await this.getMenuListOne() + const list2 = await this.getMenuListTwo() + this.selectTreeList = list1.concat(list2) + }, + // 企业标准树 + getMenuListOne() { + return new Promise((resolve, reject) => { + this.$http._getData('sarResource/ts-resource/getListStandLimitData', { + sorDivide: 'BUSINESS_STAND', + userId: this.$store.getters.userInfo.userId + }).then(res=>{ + if(res && res.data) + resolve(res.data) + }).catch(e=>{ + console.log(e) + }) + }) + }, + // 技术体系树 + getMenuListTwo() { + return new Promise((resolve, reject) => { + this.$http._getData('lawss/sarMenuStandardLimit/getListStandLimit', { + dicId: '9m4qqqaansxmox5e82zm' + }).then(res=>{ + if(res && res.data) + resolve(res.data) + }).catch(e=>{ + console.log(e) + }) + }) }, getStandDataBtns(){ this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',{ diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue index 6f649b5b1..ff9e11d62 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue @@ -1509,13 +1509,14 @@ clearable :maxlength="100"> - - - + + { + this.$http._getData('sarResource/ts-resource/getListStandLimitData', { + sorDivide: 'BUSINESS_STAND', + userId: this.$store.getters.userInfo.userId + }).then(res=>{ + if(res && res.data) + resolve(res.data) + }).catch(e=>{ + console.log(e) + }) + }) + }, + // 技术体系树 + getMenuListTwo() { + return new Promise((resolve, reject) => { + this.$http._getData('lawss/sarMenuStandardLimit/getListStandLimit', { + dicId: '9m4qqqaansxmox5e82zm' + }).then(res=>{ + if(res && res.data) + resolve(res.data) + }).catch(e=>{ + console.log(e) + }) + }) }, replaceLawsNumModelCancel () { // this.replaceLawsNumModel = false @@ -2690,11 +2726,16 @@ export default { total: 0, validFlag: '0', QCDW: '', - menuId: '' + // menuId: '' } + this.$refs.selectTreeRef.clear() this.getReplaceLawsNumRow() }, getReplaceLawsNumRow () { + this.replaceLawsNumForm.userId = this.$store.getters.userInfo.userId + let currentTreeItem = getTreeItem(this.selectTreeList, this.replaceLawsNumForm.menuId) + this.replaceLawsNumForm.treeType = currentTreeItem.treeType + if(this.replaceLawsNumForm.issueTimeArr && this.replaceLawsNumForm.issueTimeArr.length > 0){ this.replaceLawsNumForm.issueTimeStart = this.replaceLawsNumForm.issueTimeArr[0] || null this.replaceLawsNumForm.issueTimeEnd = this.replaceLawsNumForm.issueTimeArr[1] || null @@ -2728,6 +2769,10 @@ export default { }) }, getReplaceLawsNumRowFirst () { + this.replaceLawsNumForm.userId = this.$store.getters.userInfo.userId + let currentTreeItem = getTreeItem(this.selectTreeList, this.replaceLawsNumForm.menuId) + this.replaceLawsNumForm.treeType = currentTreeItem.treeType + this.replaceLawsNumForm.page = 1 this.replacePage = 1 if(this.replaceLawsNumForm.issueTimeArr && this.replaceLawsNumForm.issueTimeArr.length > 0){ @@ -5456,6 +5501,9 @@ export default { } }, watch: { + // selectTreeFilterText (val) { + // this.$refs.selectTree.filter(val); + // }, 'sarBussionessStandEO.standSort':{ handler:function(val){ this.QCBFC = !!(val && val.indexOf("QCBFC") !== -1); @@ -5850,4 +5898,23 @@ export default { /deep/.el-table__fixed-body-wrapper .el-table__body { padding-bottom: 20px; } +// +//.sel-input { +// width: 96%; +// margin: 5px; +// height: 30px; +// /deep/ .el-input__inner{ +// height: 30px; +// line-height: 30px; +// } +//} +//.sel-option { +// width: 100%; +// height: 200px; +// overflow: auto; +// background-color: #fff; +// cursor: pointer; +// font-weight: normal!important; +// padding: 0 5px; +//}