From 42dd0b698e74d2fde172bb4e57d086fdcf739285 Mon Sep 17 00:00:00 2001
From: sunFlower <787203167@qq.com>
Date: Wed, 28 Sep 2022 15:47:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E6=9C=9F=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/PersonnelSelection/index.vue | 163 +++-
.../components/problemKnowledgeBaseList.vue | 523 +++++++++++--
.../problemKnowledgeBaseListView.vue | 707 ++++++++++++++++++
.../components/TermInformation.vue | 9 +-
4 files changed, 1329 insertions(+), 73 deletions(-)
create mode 100644 jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue
diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue
index 49b1d73c5..0ed9c5187 100644
--- a/jero-web/src/components/PersonnelSelection/index.vue
+++ b/jero-web/src/components/PersonnelSelection/index.vue
@@ -31,11 +31,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import { getAction, postAction } from '@/api/manage'
+ import XEUtils from 'xe-utils'
+ import VXETable from 'vxe-table'
export default {
name: 'index',
@@ -65,6 +95,7 @@
loading: true,
gData: [],
autoExpandParent: true,
+ checkboxList: [],
expandedKeys: [],
visible: false,
treeVisible: false,
@@ -83,15 +114,94 @@
},
methods: {
+ // loadTree(size) {
+ // this.loading = true
+ // setTimeout(() => {
+ // const trerData = JSON.parse(JSON.stringify(this.gData))
+ // // 将树结构拍平,构建列表树结构
+ // XEUtils.eachTree(trerData, (item, index, items, paths, parent, nodes) => {
+ // // 层级
+ // item._LEVEL = nodes.length - 1
+ // // 是否展开
+ // item._EXPAND = false
+ // // 是否可视
+ // item._VISIBLE = !item._LEVEL
+ // // 是否有子节点
+ // item._HAS_CHILDREN = item.children && item.children.length > 0
+ // // 是否叶子节点
+ // item._IS_LEAF = !item._HAS_CHILDREN
+ // })
+ // this.tree = trerData
+ // this.refreshTree()
+ // this.loading = false
+ // }, 200)
+ // },
+ // // 切换树节点的展开、收缩
+ // toggleTreeNode(row) {
+ // if (row._HAS_CHILDREN) {
+ // this.setTreeExpand(row, !row._EXPAND)
+ // }
+ // },
+ // setTreeExpand(row, isExpand) {
+ // const matchObj = XEUtils.findTree(this.tree, item => item === row)
+ // row._EXPAND = isExpand
+ // if (matchObj) {
+ // XEUtils.eachTree(matchObj.item.children, (item, index, items, path, parent) => {
+ // item._VISIBLE = parent ? parent._EXPAND && parent._VISIBLE : isExpand
+ // })
+ // }
+ // this.refreshTree()
+ // },
+ // refreshTree() {
+ // const treeList = XEUtils.toTreeArray(this.tree)
+ // this.fullList = treeList
+ // this.gData = treeList.filter(item => item._VISIBLE)
+ // },
standardClick() {
this.treeVisible = false
this.departId = ''
this.searchModel = ''
this.userIds = []
this.userName = []
- this.queryDepartUserTreeList(1)
+ // let gData = localStorage.getItem('gData')
+ // if (gData) {
+ // this.gData = this.toTree(JSON.parse(gData))
+ // this.treeVisible = true
+ // this.loadTree()
+ // } else {
+ this.queryDepartUserTreeList(1)
+ // }
this.visible = true
},
+ //将数据拼成树形结构
+ toTree(config) {
+ // 删除 所有 children,以防止多次调用
+ config.forEach(function(item) {
+ delete item.children
+ })
+ // 将数据存储为 以 id 为 KEY 的 map 索引数据列
+ let map = {}
+ config.forEach((item) => {
+ item.label = item.name
+ item.key = item.id
+
+ item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
+ map[item.id] = item
+ })
+ let val = []
+ config.forEach((item) => {
+ // 以当前遍历项,的pid,去map对象中找到索引的id
+ let parent = map[item.parentId]
+ // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
+ if (parent) {
+ (parent.children || (parent.children = [])).push(item)
+ } else {
+ //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
+ val.push(item)
+ }
+ })
+ return val
+ },
standardDelete() {
this.$emit('input', null)
this.$forceUpdate()
@@ -103,7 +213,7 @@
// },
onCheck(checkedKeys, info) {
- this.userIds = checkedKeys.checked
+ this.userIds = checkedKeys
this.userName = []
if (this.userIds.length > 0) {
for (let i = 0; i < this.userIds.length; i++) {
@@ -227,6 +337,8 @@
gData = ''
}
this.confirmLoading = true
+ //queryDepartUserTreeList
+ //queryUserTreeList
postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId,
json: gData,
@@ -234,7 +346,10 @@
}).then((res) => {
this.confirmLoading = false
if (res.success) {
+ this.loading = false
+ // localStorage.setItem('gData', JSON.stringify(res.result))
this.gData = res.result
+ // this.gData[0].isLeaf = false
this.defaultExpandedKeys = [this.departId]
if (num == 1) {
if (this.userName && this.userName.length == 0) {
@@ -312,4 +427,46 @@
height: calc(100% - 60px);
overflow: auto;
}
+
+ .my-tree {
+ padding: 0 10px;
+ /*border: 1px solid #e8eaec;*/
+ }
+
+ .my-tree .my-tree-item {
+ height: 32px;
+ line-height: 32px;
+ }
+
+ .my-tree .my-tree-item.has-child .tree-icon {
+ visibility: visible;
+ transition: all 0.3s;
+ }
+
+ .my-tree .my-tree-item.is-expand .tree-icon {
+ transform: rotate(90deg);
+ }
+
+ .my-tree .tree-icon {
+ cursor: pointer;
+ width: 20px;
+ line-height: 20px;
+ text-align: center;
+ visibility: hidden;
+ user-select: none;
+ }
+
+ .caret-right {
+ margin-right: 4px;
+ font-size: 14px;
+ }
+
+ .checkbox {
+ margin-right: 8px;
+ }
+
+ ::v-deep .ant-checkbox-group {
+ width: 100%;
+ height: 600px;
+ }
\ No newline at end of file
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue
index d22898423..a73a4a075 100644
--- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue
+++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue
@@ -1,20 +1,8 @@
-
-
-
- {{$t('searchContent')}}
-
-
-
{{$t('query')}}
-
{{$t('reset')}}
-
-
-
-
+
{{$t('classification')}}:
-
-
+
+
{{$t('classificationMaintenance')}}
-
-
- {{$t('managePublishing')}}
+
+
+
-
-
- {{$t('newlyAdded')}}
+
+
+
+
+
+
+
+
+
+
+
+ {{$t('managePublishing')}}
+
+
+
+ {{$t('newlyAdded')}}
+
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue
index 6d44acfc8..2a792a313 100644
--- a/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue
+++ b/jero-web/src/views/businessSupport/technologyAssessment/components/TermInformation.vue
@@ -261,16 +261,23 @@
itemId: res.id,
itemNum: res.items_num,
itemName: res.items_name,
- itemContent: res.iterms_conditions
+ itemContent: res.iterms_conditions,
+ zhan3_shi4_shun4_xu4: res.zhan3_shi4_shun4_xu4 || ''
})
})
}
this.dataList = this.ImportFileData.concat(this.dataListData)
+ this.dataList.sort((a, b) => {
+ a.zhan3_shi4_shun4_xu4 - b.zhan3_shi4_shun4_xu4
+ })
this.dataList = [...this.dataList]
},
getPersonnelList(res) {
this.ImportFileData = this.ImportFileData.concat(res)
this.dataList = this.dataListData.concat(this.ImportFileData)
+ this.dataList.sort((a, b) => {
+ a.zhan3_shi4_shun4_xu4 - b.zhan3_shi4_shun4_xu4
+ })
this.dataList = [...this.dataList]
},
getUUID() {