From d45ee8d81f4ce6dacc008c343dde68d8de5f6914 Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Thu, 7 Sep 2023 15:27:19 +0800
Subject: [PATCH] =?UTF-8?q?[add]=20=E6=B7=BB=E5=8A=A0=E4=BC=81=E6=A0=87?=
=?UTF-8?q?=E7=BA=A7=E5=88=AB=E6=98=A0=E5=B0=84=E6=A8=A1=E5=9D=97=E5=92=8C?=
=?UTF-8?q?=E5=8F=8B=E6=83=85=E9=93=BE=E6=8E=A5=E6=A8=A1=E5=9D=97=EF=BC=8C?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E5=86=85=E9=83=A8=E5=B7=A5=E4=BD=9C=E7=BB=84?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=B0=81=E8=A3=85?=
=?UTF-8?q?=E7=9A=84Search=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/api.js | 7 +-
src/assets/less/common.less | 9 +
src/common/lang/system/en.js | 35 +++-
src/common/lang/system/zh.js | 15 ++
src/components/customField/Search.vue | 128 ++++++------
.../EnterpriseLevelMapList.vue | 85 ++++++++
.../modules/EnterpriseMapModal.vue | 147 ++++++++++++++
.../FriendshipLinkList.vue | 182 ++++++++++++++++++
.../modules/FriendshipLinkModal.vue | 116 +++++++++++
.../internalWorkGroup/WorkingGroupList.vue | 142 ++++++++------
10 files changed, 732 insertions(+), 134 deletions(-)
create mode 100644 src/views/system/enterpriseLevelMapManage/EnterpriseLevelMapList.vue
create mode 100644 src/views/system/enterpriseLevelMapManage/modules/EnterpriseMapModal.vue
create mode 100644 src/views/system/firendshipLinkManage/FriendshipLinkList.vue
create mode 100644 src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue
diff --git a/src/api/api.js b/src/api/api.js
index e788aa25..e2c3be78 100644
--- a/src/api/api.js
+++ b/src/api/api.js
@@ -124,6 +124,9 @@ const getStandardList = (params) => getAction('', params)
// 内部工作组,左侧树查询
const getWorkGroupTreeList = (params) => getAction('/sys/lawsWorkingGroup/list', params)
+// 企业级别映射管理,获取列表
+const getEnterpriseLevelMapList = (params) => getAction('/sys/lawsGrade/list', params)
+
export {
addRole,
editRole,
@@ -194,5 +197,7 @@ export {
getStandardList,
- getWorkGroupTreeList
+ getWorkGroupTreeList,
+
+ getEnterpriseLevelMapList
}
diff --git a/src/assets/less/common.less b/src/assets/less/common.less
index 36dfc7a8..aa42f07c 100644
--- a/src/assets/less/common.less
+++ b/src/assets/less/common.less
@@ -103,6 +103,15 @@
}
}
+/*表格操作栏只有两个按钮时的按钮间距*/
+.action-span-cell > a {
+ margin-left: 8px;
+}
+
+.action-span-cell > a:first-child {
+ margin-left: 0;
+}
+
/*列表页面弹出modal*/
.ant-modal-cust-warp {
height: 100%
diff --git a/src/common/lang/system/en.js b/src/common/lang/system/en.js
index f99016e5..7111b24a 100644
--- a/src/common/lang/system/en.js
+++ b/src/common/lang/system/en.js
@@ -50,15 +50,30 @@ module.exports = {
},
// 内部工作组
internalWorkGroup: {
- treeSearchPlaceholder: '输入树状图体系',
- name: '姓名',
- workNo: '工号',
- role: '角色',
- post: '职位',
- templateName: '内部工作组表模板',
- exportName: '内部工作组表',
- nodeName: '节点名称',
- user: '用户',
- pleaseSelectASystem: '请选择左侧体系'
+ treeSearchPlaceholder: 'Please enter the tree system',
+ name: 'Name',
+ workNo: 'Job Number',
+ role: 'Role',
+ post: 'Position',
+ templateName: 'Internal workgroup table template',
+ exportName: 'Internal workgroup table',
+ nodeName: 'Node Name',
+ user: 'User',
+ pleaseSelectASystem: 'Please select the left system'
+ },
+ // 企标级别映射
+ enterpriseLevelMap: {
+ levelCategory: 'Grade classification of enterprise standard',
+ canLookDepart: 'Viewable department',
+ remark: 'Remarks'
+ },
+ // 友情练级管理
+ friendshipLink: {
+ name: 'Link Name',
+ shelfStatus: 'Shelf Status',
+ linkName: 'Link Name',
+ link: 'Link',
+ isShelf: 'Shelf Or Not',
+ sort: 'Sort'
}
}
diff --git a/src/common/lang/system/zh.js b/src/common/lang/system/zh.js
index 187e1826..79c34ae2 100644
--- a/src/common/lang/system/zh.js
+++ b/src/common/lang/system/zh.js
@@ -63,5 +63,20 @@ module.exports = {
nodeName: '节点名称',
user: '用户',
pleaseSelectASystem: '请选择左侧体系'
+ },
+ // 企标级别映射
+ enterpriseLevelMap: {
+ levelCategory: '企标等级分类',
+ canLookDepart: '可查看部门',
+ remark: '备注'
+ },
+ // 友情练级管理
+ friendshipLink: {
+ name: '链接名称',
+ shelfStatus: '上架状态',
+ linkName: '链接名称',
+ link: '链接',
+ isShelf: '是否上架',
+ sort: '排序'
}
}
diff --git a/src/components/customField/Search.vue b/src/components/customField/Search.vue
index c13b5ef9..3661c43a 100644
--- a/src/components/customField/Search.vue
+++ b/src/components/customField/Search.vue
@@ -1,7 +1,7 @@
-
+
@@ -60,76 +60,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/system/enterpriseLevelMapManage/EnterpriseLevelMapList.vue b/src/views/system/enterpriseLevelMapManage/EnterpriseLevelMapList.vue
new file mode 100644
index 00000000..f49809e1
--- /dev/null
+++ b/src/views/system/enterpriseLevelMapManage/EnterpriseLevelMapList.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/enterpriseLevelMapManage/modules/EnterpriseMapModal.vue b/src/views/system/enterpriseLevelMapManage/modules/EnterpriseMapModal.vue
new file mode 100644
index 00000000..27236dc4
--- /dev/null
+++ b/src/views/system/enterpriseLevelMapManage/modules/EnterpriseMapModal.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+ 请选择
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/firendshipLinkManage/FriendshipLinkList.vue b/src/views/system/firendshipLinkManage/FriendshipLinkList.vue
new file mode 100644
index 00000000..58eeca33
--- /dev/null
+++ b/src/views/system/firendshipLinkManage/FriendshipLinkList.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ $t('query') }}
+
{{ $t('reset') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue b/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue
new file mode 100644
index 00000000..15e0cc37
--- /dev/null
+++ b/src/views/system/firendshipLinkManage/modules/FriendshipLinkModal.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/internalWorkGroup/WorkingGroupList.vue b/src/views/system/internalWorkGroup/WorkingGroupList.vue
index 83d05896..5343c7b4 100644
--- a/src/views/system/internalWorkGroup/WorkingGroupList.vue
+++ b/src/views/system/internalWorkGroup/WorkingGroupList.vue
@@ -2,13 +2,16 @@
+ @change="handleTreeChange" />
@@ -29,7 +32,12 @@
{{ name }}
- {{ name }}
+
+ {{ name.substr(0, name.indexOf(treeInput)) }}
+ {{ treeInput }}
+ {{ name.substr(name.indexOf(treeInput) + treeInput.length) }}
+
+ {{ name }}
@@ -48,7 +56,12 @@
{{ name }}
- {{ name }}
+
+ {{ name.substr(0, name.indexOf(treeInput)) }}
+ {{ treeInput }}
+ {{ name.substr(name.indexOf(treeInput) + treeInput.length) }}
+
+ {{ name }}
@@ -70,37 +83,36 @@
-
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
{{ $t('query') }}
-
{{ $t('reset') }}
-
+
@@ -171,6 +183,9 @@ export default {
return {
treeInput: null, // 树查询绑定值
treeData: [],
+ treeDataList: [], // 左侧树的数组结构,用于搜索
+ expandedKeys: [],
+ autoExpandParent: true,
currentTreeNode: null, // 当前选中的树节点
mouseInNodeKey: null, // 鼠标悬浮的节点key值
columns: [
@@ -178,25 +193,29 @@ export default {
title: this.$t('system.internalWorkGroup.name'),
align: 'center',
width: 180,
- dataIndex: 'userName'
+ dataIndex: 'userName',
+ scopedSlots: { customRender: 'text' }
},
{
title: this.$t('system.internalWorkGroup.workNo'),
align: 'center',
width: 180,
- dataIndex: 'userWorkNo'
+ dataIndex: 'userWorkNo',
+ scopedSlots: { customRender: 'text' }
},
{
title: this.$t('system.internalWorkGroup.role'),
align: 'center',
width: 180,
- dataIndex: 'userRoleName'
+ dataIndex: 'userRoleName',
+ scopedSlots: { customRender: 'text' }
},
{
title: this.$t('system.internalWorkGroup.post'),
align: 'center',
width: 180,
- dataIndex: 'userPostName'
+ dataIndex: 'userPostName',
+ scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
@@ -206,12 +225,10 @@ export default {
}
],
labelCol: {
- xs: { span: 24 },
- sm: { span: 6 }
+ span: 4
},
wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 }
+ span: 18
},
url: {
treeNodeDelete: '/sys/lawsWorkingGroup/delete',
@@ -228,12 +245,13 @@ export default {
},
methods: {
// 获取左侧树数据
- initTreeData () {
- getWorkGroupTreeList().then(res => {
+ initTreeData (params) {
+ getWorkGroupTreeList(params).then(res => {
if (res.success) {
this.treeData = this.dealTreeData(res.result)
// this.treeData = res.result
this.treeData[0].scopedSlots = { title: 'customNoDelete' }
+ this.generateList(this.treeData)
} else {
this.treeData = []
}
@@ -248,33 +266,36 @@ export default {
}
return item
})
- // return treeData.map(item => {
- // if (item.child && item.child.length > 0) {
- // item.scopedSlots = { title: 'iconCustom' }
- // item.children = this.dealTreeData(item.child)
- // } else {
- // item.scopedSlots = { title: 'custom' }
- // }
- // return item
- // })
},
- // 根据key去树结构中找到节点
- // getNodeByKey (key, treeData) {
- // for (const item of treeData) {
- // if (item.key === key) {
- // return item
- // } else {
- // if (item.child && item.child.length > 0) {
- // const res = this.getNodeByKey(key, item.child)
- // return res
- // }
- // }
- // }
- // },
- // 左侧树搜索
- handleTreeSearch () {
- console.log(this.treeInput)
- this.initTreeData()
+ // 获取左侧树的数组结构(非树结构)
+ generateList (data) {
+ for (let i = 0; i < data.length; i++) {
+ const node = data[i]
+ const id = node.id
+ this.treeDataList.push({ id, name: node.name, pid: node.pid })
+ if (node.subset) {
+ this.generateList(node.subset)
+ }
+ }
+ },
+ // 左侧树搜索框改变
+ handleTreeChange (e) {
+ const value = e.target.value
+ const expandedKeys = this.treeDataList
+ .map(item => {
+ if (item.name.indexOf(value) > -1) {
+ return item.pid
+ }
+ return null
+ })
+ .filter((item, i, self) => item && self.indexOf(item) === i)
+ this.expandedKeys = expandedKeys
+ this.autoExpandParent = true
+ },
+ // 左侧树点击展开
+ treeExpand (expandedKeys) {
+ this.expandedKeys = expandedKeys
+ this.autoExpandParent = false
},
// 左侧树鼠标移入
handleTreeMouseover (key) {
@@ -322,15 +343,25 @@ export default {
// 左侧树点击选中
treeSelect (selectedKeys) {
this.currentTreeNode = selectedKeys
+ this.queryParam.workingGroupId = selectedKeys[0]
+ this.loadData()
},
+ // 右侧新增
handleAdd () {
console.log(this.currentTreeNode)
if (!this.currentTreeNode || this.currentTreeNode.length <= 0) {
- this.$message.warning(this.$t('pleaseSelectASystem'))
+ this.$message.warning(this.$t('system.internalWorkGroup.pleaseSelectASystem'))
return
}
this.$refs.modalForm.add(this.currentTreeNode[0])
this.$refs.modalForm.title = this.$t('newlyAdded')
+ },
+ // 清空
+ searchReset () {
+ this.queryParam = {}
+ this.currentTreeNode = null
+ this.initTreeData()
+ this.loadData(1)
}
}
@@ -338,11 +369,6 @@ export default {