From 8c8b846d3da1787a1695eb3de095181d72c260bd Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Fri, 30 Sep 2022 14:46:28 +0800 Subject: [PATCH 1/6] update --- .../modules/project/mapper/xml/LawsComplianceBoardMapper.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml index 247f552ef..6fdb1df82 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml @@ -51,7 +51,8 @@ pti.prehomo_person_charge_feedback as "prehomoPersonChargeFeedback", pti.verify_person_charge_feedback as "verifyPersonChargeFeedback", plb.studio_engineer as "studioEngineer", - plb.target_market as "targetMarket" + plb.target_market as "targetMarket", + pti.id as "projectTaskInventoryId" FROM project_laws_inventory pli LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id ) From cd1a45a373a754e6fb3f4dbe2904fbe0a6a4c0e8 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Fri, 30 Sep 2022 15:15:30 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B8=AD=E5=BF=83--?= =?UTF-8?q?=E5=85=A8=E9=83=A8(=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=87=8D-->?= =?UTF-8?q?=E7=BC=96=E5=8F=B7(10)>=E6=A0=87=E9=A2=98(8)>=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0(5))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DocumentSearchServiceImpl.java | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java index 0e1dd94e8..1be72fe12 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/searchcenter/service/impl/DocumentSearchServiceImpl.java @@ -526,6 +526,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { } JSONObject sort = new JSONObject(); +// JSONObject sort = new JSONObject(new LinkedHashMap<>()); if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){ Map createTime = new HashMap<>(); Map createTime1 = new HashMap<>(); @@ -537,7 +538,12 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { Map score1 = new HashMap<>(); score.put("order","desc"); score1.put("_score",score); +// Map score2 = new HashMap<>(); +// Map score3 = new HashMap<>(); +// score2.put("order","desc"); +// score3.put("_id",score2); sort.putAll(score1); +// sort.putAll(score3); } log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString()); @@ -563,13 +569,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { if("serial_number".equals(field)){ map31.put("boost",10); }else if("title".equals(field)){ - map31.put("boost",10); + map31.put("boost",8); }else if("file_text".equals(field)){ map31.put("boost",0.01); }else if("content".equals(field)){ map31.put("boost",0.01); }else if("file_name".equals(field)){ - map31.put("boost",10); + map31.put("boost",5); } map31.put("value", selectValue); map21.put(field + ".keyword", map31); @@ -583,13 +589,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { if("serial_number".equals(field)){ map32.put("boost",10); }else if("title".equals(field)){ - map32.put("boost",10); + map32.put("boost",8); }else if("file_text".equals(field)){ map32.put("boost",0.01); }else if("content".equals(field)){ map32.put("boost",0.01); }else if("file_name".equals(field)){ - map32.put("boost",10); + map32.put("boost",5); } map32.put("query", selectValue); map22.put(field, map32); @@ -604,13 +610,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { if("serial_number".equals(field)){ map33.put("boost",10); }else if("title".equals(field)){ - map33.put("boost",10); + map33.put("boost",8); }else if("file_text".equals(field)){ map33.put("boost",0.01); }else if("content".equals(field)){ map33.put("boost",0.01); }else if("file_name".equals(field)){ - map33.put("boost",10); + map33.put("boost",5); } map33.put("query", selectValue); map23.put(field, map33); @@ -621,7 +627,21 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService { //情况举例:用户只记得中间那段字 Map map24 = new HashMap<>(); Map map44 = new HashMap<>(); - map24.put(field, "*" + selectValue + "*"); + Map map55 = new HashMap<>(); + map55.put("value","*" + selectValue + "*"); + if("serial_number".equals(field)){ + map55.put("boost",10); + }else if("title".equals(field)){ + map55.put("boost",8); + }else if("file_text".equals(field)){ + map55.put("boost",0.01); + }else if("content".equals(field)){ + map55.put("boost",0.01); + }else if("file_name".equals(field)){ + map55.put("boost",5); + } + + map24.put(field, map55); map44.put("wildcard",map24); queryMapJson.add(map44); } From e0e297081b3fbbc15f1baad81c8904753ed406a1 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Fri, 30 Sep 2022 15:56:20 +0800 Subject: [PATCH 3/6] update --- .../impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java index e4fb88ea4..177e76a01 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java @@ -267,10 +267,10 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl String fileName = ""; if(StringUtils.equals(cut, CutEnum.CN.getValue())){ title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间"; - fileName = "条款评估结果 " + ".xlsx"; + fileName = "条款评估结果" + ".xls"; }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ title = "Item No.,Item Name,Item Content,Assessor,Evaluation method,Name of technical document,Chapter,Compliance Results,Opinion,Enclosure,Feedback Time"; - fileName = "Item Evaluation results " + ".xlsx"; + fileName = "Item Evaluation results" + ".xls"; } OutputStream os = null; From 867d55793a6bb83cbf8ff9bf2ae9c73204704bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Fri, 30 Sep 2022 16:11:17 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=86=85=E5=AE=B9=E5=B7=A6=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/system/PermissionList.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jero-web/src/views/system/PermissionList.vue b/jero-web/src/views/system/PermissionList.vue index 003d28e5a..d87517f89 100644 --- a/jero-web/src/views/system/PermissionList.vue +++ b/jero-web/src/views/system/PermissionList.vue @@ -107,7 +107,7 @@ { title: this.$t('MenuName'), dataIndex: 'name', - align: 'center', + align: 'left', key: 'name', ellipsis: true, width: 180 @@ -115,7 +115,7 @@ { title: this.$t('MenuEnName'), dataIndex: 'menuEn', - align: 'center', + align: 'left', key: 'menuEn', ellipsis: true, width: 180 @@ -123,7 +123,7 @@ { title: 'icon', dataIndex: 'icon', - align: 'center', + align: 'left', key: 'icon', ellipsis: true, width: 180 @@ -131,7 +131,7 @@ { title: this.$t('assembly'), dataIndex: 'component', - align: 'center', + align: 'left', key: 'component', width: 240, ellipsis: true, @@ -140,7 +140,7 @@ { title: this.$t('route'), dataIndex: 'url', - align: 'center', + align: 'left', key: 'url', width: 240, ellipsis: true, @@ -149,7 +149,7 @@ { title: this.$t('sort'), dataIndex: 'sortNo', - align: 'center', + align: 'left', width: 80, ellipsis: true, key: 'sortNo' From 65fa2c9ef9b7e16ea39b2b1a89c9ce32fa3335f0 Mon Sep 17 00:00:00 2001 From: sunFlower <787203167@qq.com> Date: Fri, 30 Sep 2022 16:28:27 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/externalReports/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jero-web/src/views/externalReports/index.vue b/jero-web/src/views/externalReports/index.vue index 43b27c88f..64f59d9b7 100644 --- a/jero-web/src/views/externalReports/index.vue +++ b/jero-web/src/views/externalReports/index.vue @@ -208,6 +208,7 @@ @@ -225,6 +226,7 @@ Date: Fri, 30 Sep 2022 16:28:44 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonnelSelection/index.vue | 311 ++++++++++++------ jero-web/src/store/modules/user.js | 9 + 2 files changed, 215 insertions(+), 105 deletions(-) diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index 755e08ff2..3586254e2 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -31,42 +31,45 @@
- - - - - - - - - - - - - - - - - {{$t('dataLoading')}} + - + :keeps="40" + show-checkbox + v-model="checkboxList" + class="treeWrap" + :props="{ + isLeaf: 'leaf' + }" + :defaultCheckedKeys="defaultCheckedKeys" + :check-strictly="false" + node-key="id" + @check-change="handleCheckChange" + :data.sync="gData"> + + {{ data.title }} + + + + + + + + + + + + + + +
-
{{$t('cancel')}} {{$t('submit')}}
+ @@ -78,13 +81,13 @@ export default { name: 'index', - props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled'], + props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled', 'selectDepartment'], components: { virtualNodeTree }, data() { return { - loading: true, + loading: false, gData: [], autoExpandParent: true, checkboxList: [], @@ -99,7 +102,8 @@ defaultExpandedKeys: [], defaultCheckedKeys: [], defaultCheckedKeysName: [], - content: [] + content: [], + dataList: [] } }, mounted() { @@ -107,23 +111,69 @@ }, methods: { handleCheckChange(val, checked, indeterminate) { - console.log(val) - console.log(this.checkboxList) + if (checked) { + this.userName.push(val.title) + this.userIds.push(val.id) + } else { + for (let i = 0; i < this.userName.length; i++) { + if (this.userName[i] == val.title) { + this.userName.splice(i, 1) + i-- + } + } + for (let i = 0; i < this.userIds.length; i++) { + if (this.userIds[i] == val.id) { + this.userIds.splice(i, 1) + i-- + } + } + } }, standardClick() { + this.visible = true this.treeVisible = false this.departId = '' this.searchModel = '' - this.userIds = [] this.userName = [] + this.userIds = [] let gData = localStorage.getItem('gData') - // if (gData) { - // this.gData = this.toTree(JSON.parse(gData)) - // this.treeVisible = true - // } else { - this.queryDepartUserTreeList(1) - // } - this.visible = true + if (gData) { + let dataList = JSON.parse(gData) + if (!this.selectDepartment) { + dataList.forEach(res => { + if (res.type == 'Depart') { + res.disabled = true + } + }) + } + this.dataList = this.toTree(dataList) + } + setTimeout(() => { + if (gData) { + this.gData = this.dataList + this.gData = [...this.gData] + // this.treeVisible = true + if (this.personneQuery[this.query.db_field_name + 'Name']) { + this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') + } else if (this.personneQuery[this.query.db_field_name]) { + this.userName = this.personneQuery[this.query.db_field_name].split(',') + } else { + this.userName = [] + } + if (this.personneQuery[this.query.db_field_name + '_id']) { + this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',') + } else if (this.personneQuery[this.query.db_field_name]) { + this.userIds = this.personneQuery[this.query.db_field_name].split(',') + } else { + this.userIds = [] + } + this.defaultCheckedKeys = this.userIds + this.defaultCheckedKeys = [...this.defaultCheckedKeys] + this.treeVisible = true + } else { + this.queryDepartUserTreeList(1) + } + }, 200) }, //将数据拼成树形结构 toTree(config) { @@ -233,6 +283,12 @@ } let userIds = JSON.parse(JSON.stringify(this.userIds)) let userName = JSON.parse(JSON.stringify(this.userName)) + userName = userName.filter(function(item, index) { + return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个 + }) + userIds = userIds.filter(function(item, index) { + return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 + }) this.$emit('input', userName.join(',')) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.visible = false @@ -250,88 +306,132 @@ this.defaultCheckedKeys = [] }, onSearch(e) { - this.gData = [] - this.departId = '' - this.visibleTree = false - if (e) { - this.getUserAndDepart() - } else { - this.treeVisible = false - this.queryDepartUserTreeList(2) - } - }, - getUserAndDepart() { - getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { - if (res) { - this.gData = res.filter(ele => ele.flag === 'DEPART') - } else { - this.gData = [] - } - this.visibleTree = true + this.loading = true + // this.treeVisible = false + let p = new Promise((resolve, reject) => { + resolve() }) - }, - onExpand(selectedKeys, val) { - if (this.searchModel == '' || !this.searchModel) { - if (val.expanded) { - if (this.departId == val.node.value) { + p.then(() => { + let gData = localStorage.getItem('gData') + let content = [] + if (gData) { + if (e) { + JSON.parse(gData).forEach(res => { + if (res.type == 'User') { + if (res.name.includes(e)) { + content.push(res) + } + } else if (res.type == 'Depart') { + content.push(res) + } + }) + this.gData = this.toTree(content) } else { - this.departId = val.node.value - this.queryDepartUserTreeList(2) + this.gData = this.toTree(JSON.parse(gData)) } } - } + this.defaultCheckedKeys = this.userIds + this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.treeVisible = true + this.loading = false + }) + // this.gData = [] + // this.departId = '' + // this.visibleTree = false + // if (e) { + // this.getUserAndDepart() + // } else { + // this.treeVisible = false + // this.queryDepartUserTreeList(2) + // } }, + // getUserAndDepart() { + // getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { + // if (res) { + // this.gData = res.filter(ele => ele.flag === 'DEPART') + // } else { + // this.gData = [] + // } + // this.visibleTree = true + // }) + // }, + // onExpand(selectedKeys, val) { + // if (this.searchModel == '' || !this.searchModel) { + // if (val.expanded) { + // if (this.departId == val.node.value) { + // } else { + // this.departId = val.node.value + // this.queryDepartUserTreeList(2) + // } + // } + // } + // }, queryDepartUserTreeList(num) { - let gData = JSON.parse(JSON.stringify(this.gData)) - if (gData && gData.length > 0) { - gData = JSON.stringify(gData) - } else { - gData = '' - } + // let gData = JSON.parse(JSON.stringify(this.gData)) + // if (gData && gData.length > 0) { + // gData = JSON.stringify(gData) + // } else { + // gData = '' + // } this.confirmLoading = true + this.loading = true //queryDepartUserTreeList //queryUserTreeList - postAction('sys/user/queryDepartUserTreeList', { - departId: this.departId, - json: gData, - flag: '1' + getAction('sys/user/queryUserTreeList', { + // departId: this.departId, + // json: gData, + // flag: '1' }).then((res) => { this.confirmLoading = false if (res.success) { this.loading = false // localStorage.setItem('gData', JSON.stringify(res.result)) - this.gData = res.result + // this.toTree(dataList) + let content = JSON.parse(JSON.stringify(res.result)) + if (!this.selectDepartment) { + res.result.forEach(res => { + if (res.type == 'Depart') { + res.disabled = true + } + }) + } + localStorage.removeItem('gData') + localStorage.setItem('gData', JSON.stringify(content)) + this.gData = this.toTree(res.result) + console.log(this.gData) + this.gData = [...this.gData] // this.gData[0].isLeaf = false - this.defaultExpandedKeys = [this.departId] + // this.defaultExpandedKeys = [this.departId] if (num == 1) { - if (this.userName && this.userName.length == 0) { - if (this.personneQuery[this.query.db_field_name + 'Name']) { - this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') - } else if (this.personneQuery[this.query.db_field_name]) { - this.userName = this.personneQuery[this.query.db_field_name].split(',') - } else { - this.userName = [] - } + // if (this.userName && this.userName.length == 0) { + if (this.personneQuery[this.query.db_field_name + 'Name']) { + this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') + } else if (this.personneQuery[this.query.db_field_name]) { + this.userName = this.personneQuery[this.query.db_field_name].split(',') + } else { + this.userName = [] } - if (this.userIds && this.userIds.length == 0) { - if (this.personneQuery[this.query.db_field_name + '_id']) { - this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',') - } else if (this.personneQuery[this.query.db_field_name]) { - this.userIds = this.personneQuery[this.query.db_field_name].split(',') - } else { - this.userIds = [] - } + // } + // if (this.userIds && this.userIds.length == 0) { + if (this.personneQuery[this.query.db_field_name + '_id']) { + this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',') + } else if (this.personneQuery[this.query.db_field_name]) { + this.userIds = this.personneQuery[this.query.db_field_name].split(',') + } else { + this.userIds = [] } + // } this.defaultCheckedKeys = this.userIds - this.defaultCheckedKeysName = [] - if (this.defaultCheckedKeys.length > 0) { - for (let i = 0; i < this.defaultCheckedKeys.length; i++) { - this.defaultCheckedKeysName.push({ - id: this.defaultCheckedKeys[i], - name: this.userName[i] - }) - } - } + this.defaultCheckedKeys = [...this.defaultCheckedKeys] + // this.defaultCheckedKeysName = [] + // if (this.defaultCheckedKeys.length > 0) { + // for (let i = 0; i < this.defaultCheckedKeys.length; i++) { + // this.defaultCheckedKeysName.push({ + // id: this.defaultCheckedKeys[i], + // name: this.userName[i] + // }) + // } + // } } this.treeVisible = true } else { @@ -378,6 +478,7 @@ .drawer-content { height: calc(100% - 60px); overflow: auto; + position: relative; } .my-tree { diff --git a/jero-web/src/store/modules/user.js b/jero-web/src/store/modules/user.js index 81b44fd6b..c59903a89 100644 --- a/jero-web/src/store/modules/user.js +++ b/jero-web/src/store/modules/user.js @@ -142,6 +142,14 @@ const user = { //Vue.ls.set(USER_AUTH,authData); sessionStorage.setItem(USER_AUTH, JSON.stringify(authData)) sessionStorage.setItem(SYS_BUTTON_AUTH, JSON.stringify(allAuthData)) + let gData = localStorage.getItem('gData') + if (!gData) { + getAction('sys/user/queryUserTreeList', {}).then((res) => { + if (res.success) { + localStorage.setItem('gData', JSON.stringify(res.result)) + } + }) + } if (menuData && menuData.length > 0) { //update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------ menuData.forEach((item, index) => { @@ -178,6 +186,7 @@ const user = { Vue.ls.remove(USER_NAME) Vue.ls.remove(UI_CACHE_DB_DICT_DATA) Vue.ls.remove(CACHE_INCLUDED_ROUTES) + localStorage.removeItem('gData') //console.log('logoutToken: '+ logoutToken) logout(logoutToken).then(() => { if (process.env.VUE_APP_SSO == 'true') {