From c0490c837ed79269bea3a7c293c67b526af158d2 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 25 Mar 2022 14:43:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=90=9C=E7=B4=A2=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonnelSelection/index.vue | 21 ++++++- .../components/DocumentLibrary.vue | 58 +++++++++++++------ .../searchCenter/components/whole.vue | 7 ++- .../documentTools/searchCenter/index.vue | 7 ++- 4 files changed, 68 insertions(+), 25 deletions(-) diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index 246498a26..a444da6bc 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -24,6 +24,8 @@ :tree-data="gData" @select="onSelect" @check="onCheck" + @expand="onExpand" + :defaultExpandedKeys="defaultExpandedKeys" > @@ -49,6 +51,9 @@ expandedKeys:[], visible: false, confirmLoading:false, + departId:'', + selectedKey: [], + userIds:[], } }, mounted() { @@ -56,13 +61,16 @@ }, methods:{ standardClick() { + this.departId = '' + this.userIds = [] this.visible = true }, onSelect(selectedKeys, info) { - console.log('selected', selectedKeys, info); + this.selectedKey = selectedKeys }, + onCheck(checkedKeys, info) { - console.log('onCheck', checkedKeys, info); + this.userIds = checkedKeys }, handleCancel(){ this.visible = false @@ -75,6 +83,15 @@ }, onChange(){ + }, + onExpand(selectedKeys, val) { + if (val.expanded) { + if (this.departId == val.node.value) { + } else { + this.departId = val.node.value + this.queryDepartUserTreeList() + } + } }, queryDepartUserTreeList() { this.confirmLoading = true diff --git a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue index 9c5840b93..bec81be45 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue @@ -297,7 +297,9 @@ selectModel: '', fileList: [], downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', - queryParamSeach: '' + queryParamSeach: '', + mapOne: {}, + mapTwo: {} } }, watch: { @@ -428,9 +430,20 @@ this.pageNo = 1 this.queryParam = {} this.queryParamSeach = '' - this.getInfoList() + this.getInfoList(1) }, searchQuery() { + this.ParamSeach() + this.pageNo = 1 + this.getInfoList(1) + }, + treeChange(value, text) { + this.queryParam[this.db_field_name + '_name'] = text + }, + treeClick(db_field_name) { + this.db_field_name = db_field_name + }, + ParamSeach() { let queryParam = JSON.parse(JSON.stringify(this.queryParam)) this.queryParamSeach = '' Object.keys(queryParam).forEach(val => { @@ -442,28 +455,25 @@ } }) this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1) - this.pageNo = 1 - this.getInfoList() - }, - treeChange(value, text) { - this.queryParam[this.db_field_name + '_name'] = text - }, - treeClick(db_field_name) { - this.db_field_name = db_field_name }, searchData(data, selectModel) { this.queryParam = { ...this.queryParam, ...data } this.selectModel = selectModel - this.getInfoList() + this.ParamSeach() + this.pageNo = 1 + this.getInfoList(1) }, - searchDataTwo(value) { - this.queryParam.selectValueTwo = value - this.getInfoList() + searchDataTwo(data, selectModel) { + this.queryParam = { ...this.queryParam, ...data } + this.selectModel = selectModel + this.ParamSeach() + this.pageNo = 1 + this.getInfoList(2) }, changeQuery(val, name) { this.queryParam[name + '_name'] = val }, - getInfoList() { + getInfoList(num) { let queryParam = JSON.parse(JSON.stringify(this.queryParam)) Object.keys(queryParam).forEach(val => { if (queryParam[val] instanceof Array) { @@ -473,13 +483,21 @@ delete queryParam[val] } }) + if (num == 1) { + this.mapOne = queryParam + } else if (num == 2) { + this.mapTwo = queryParam + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + this.mapTwo.ids = selectedRowKeys.join(',') + } let query = { pageNo: this.pageNo, pageSize: this.pageSize, - ...queryParam + mapOne: this.mapOne, + mapTwo: this.mapTwo } this.loading = true - getAction(this.url.getInfoList, query).then((res) => { + postAction(this.url.getInfoList, query).then((res) => { if (res.success) { this.dataSource = res.result.records this.dataSource.forEach((val) => { @@ -521,7 +539,11 @@ titleClick(item) { let newUrl = this.$router.resolve({ path: '/docManage/library/detail', - query: item + query: { + id: item.id, + title: item.title, + serial_number: item.serial_number + } }) window.open(newUrl.href, '_blank') } diff --git a/jero-web/src/views/documentTools/searchCenter/components/whole.vue b/jero-web/src/views/documentTools/searchCenter/components/whole.vue index 9324c95e3..dc4f4cc9b 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/whole.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/whole.vue @@ -128,7 +128,6 @@ } }) this.loading = true - console.log(this.checkboxText) let checkboxText = JSON.parse(JSON.stringify(this.checkboxText)) let query = { pageNo: this.pageNo, @@ -149,7 +148,11 @@ titleClick(item) { let newUrl = this.$router.resolve({ path: '/docManage/library/detail', - query: item + query: { + id:item.id, + title:item.title, + serial_number:item.serial_number + } }) window.open(newUrl.href, '_blank') } diff --git a/jero-web/src/views/documentTools/searchCenter/index.vue b/jero-web/src/views/documentTools/searchCenter/index.vue index 05f6542d5..4826a7635 100644 --- a/jero-web/src/views/documentTools/searchCenter/index.vue +++ b/jero-web/src/views/documentTools/searchCenter/index.vue @@ -14,7 +14,7 @@ @@ -97,7 +97,8 @@ if (this.$refs.wholeRef) { this.$refs.wholeRef.searchDataTwo(event) } else if (this.$refs.DocumentLibraryRef) { - this.$refs.DocumentLibraryRef.searchDataTwo(event) + this.queryParam[this.selectModel] = event + this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam,this.selectModel) } }, getCondition() { @@ -183,7 +184,7 @@ } .input-group .ant-select-selection { - width: 88px; + width: 128px; height: 40px; line-height: 40px; padding: 0 0 0 6px;