|
|
@@ -11,25 +11,26 @@
|
|
|
:auto-expand-parent="true"
|
|
|
:expanded-keys="expandedKeys"
|
|
|
@update:expandedKeys="expandedKeys = $event"
|
|
|
+ v-model:selectedKeys="selectedKeys"
|
|
|
ref="jigou_tree">
|
|
|
<template #title="{ dataRef }">
|
|
|
<span v-if="!dataRef" style="display:flex; align-items:center;"></span>
|
|
|
<span v-else style="display:flex; align-items:center; justify-content:space-between; width:100%;">
|
|
|
<span style="display:flex; align-items:center; min-width:0; flex:1;">
|
|
|
- <span v-if="dataRef.id && dataRef.id.length >= 12 && userInThisGroup(dataRef)" style="flex-shrink:0;">
|
|
|
+ <span v-if="dataRef.id && dataRef.id.length >= 12 && userInThisGroup(dataRef) && ownPriv('manage')" style="flex-shrink:0;">
|
|
|
<img src="../../../assets/images/choucha.png" v-if="dataRef.chkType == '0'" style="width:25px; height:20px;"/>
|
|
|
<img src="../../../assets/images/zicha.png" v-if="dataRef.chkType=='1'" style="width:25px; height:20px;"/>
|
|
|
</span>
|
|
|
<span v-if="orgType == '1110'" :style="{color: dataRef.colour, overflow:'hidden', textOverflow:'ellipsis', whiteSpace:'nowrap'}">{{ dataRef.pnm ? (dataRef.pnm.length > 12 ? (dataRef.pnm.substring(0, 10)) + '...' : dataRef.pnm) : '' }}</span>
|
|
|
<span v-else style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">{{ dataRef.pnm ? (dataRef.pnm.length > 12 ? (dataRef.pnm.substring(0, 10)) + '...' : dataRef.pnm) : '' }}</span>
|
|
|
<a-button
|
|
|
- v-if="dataRef.id && dataRef.id.length > 6 && userInThisGroup(dataRef)"
|
|
|
+ v-if="dataRef.id && dataRef.id.length > 6 && userInThisGroup(dataRef) && ownPriv('manage')"
|
|
|
type="danger"
|
|
|
ghost
|
|
|
size="small"
|
|
|
shape="circle"
|
|
|
@click="() => deletePICI(dataRef)"
|
|
|
- style="border:0; margin-left:4px; flex-shrink:0;"></a-button>
|
|
|
+ style="border:0; margin-left:4px; flex-shrink:0;"><CloseCircleOutlined /></a-button>
|
|
|
</span>
|
|
|
<span style="display:flex; align-items:center; gap:4px; flex-shrink:0; margin-left:8px;">
|
|
|
<a-button
|
|
|
@@ -84,18 +85,20 @@
|
|
|
<script>
|
|
|
import moment from 'moment';
|
|
|
import request from '@/utils/gw_ajax_request';
|
|
|
+import { Modal } from 'ant-design-vue';
|
|
|
import { dateFormat } from '@/utils/gw_date';
|
|
|
import { getTrees } from '@/utils/gw_formatTree';
|
|
|
-import { EditOutlined, ClockCircleOutlined } from '@ant-design/icons-vue';
|
|
|
+import { EditOutlined, ClockCircleOutlined, CloseCircleOutlined } from '@ant-design/icons-vue';
|
|
|
export default {
|
|
|
emits: ['sendCurrentNodeinfo'],
|
|
|
props: ['orgType'],
|
|
|
- components: { EditOutlined, ClockCircleOutlined },
|
|
|
+ components: { EditOutlined, ClockCircleOutlined, CloseCircleOutlined },
|
|
|
data() {
|
|
|
return {
|
|
|
treeHeight: window.innerHeight - 190,
|
|
|
treeData: [],
|
|
|
expandedKeys: [],
|
|
|
+ selectedKeys: [],
|
|
|
treeInfoOrigin: null, // 原始后台返回的树数据结构
|
|
|
currentSelectTreeNode: {
|
|
|
currentSelectTreeNodeName: '',
|
|
|
@@ -142,7 +145,7 @@ export default {
|
|
|
: '';
|
|
|
},
|
|
|
currentSelectTreeNodeId() {
|
|
|
- return this.currentSelectTreeNode.currentSelectTreeNodeId;
|
|
|
+ return this.currentSelectTreeNode.currentSelectTreeNodeId;
|
|
|
},
|
|
|
},
|
|
|
created() {},
|
|
|
@@ -216,7 +219,7 @@ export default {
|
|
|
this.expandedKeys.push(data[0].id);
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodeId =
|
|
|
this.treeData[0].id;
|
|
|
- this.$emit('sendCurrentNodeinfo', this.currentSelectTreeNode);
|
|
|
+ this.$emit('sendCurrentNodeinfo', { ...this.currentSelectTreeNode });
|
|
|
});
|
|
|
},
|
|
|
userInThisGroup(item) {
|
|
|
@@ -251,7 +254,7 @@ export default {
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodeType = data.type;
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodeId = data.id;
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodePsn = data.psn;
|
|
|
- this.$emit('sendCurrentNodeinfo', this.currentSelectTreeNode);
|
|
|
+ this.$emit('sendCurrentNodeinfo', { ...this.currentSelectTreeNode });
|
|
|
if (data.type == '3') {
|
|
|
this.plnaTreeCode = data.code;
|
|
|
this.plnaTreeName = data.name;
|
|
|
@@ -264,7 +267,7 @@ export default {
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodeCode = data.code;
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodeType = data.type;
|
|
|
this.currentSelectTreeNode.currentSelectTreeNodeId = data.id;
|
|
|
- this.$emit('sendCurrentNodeinfo', this.currentSelectTreeNode);
|
|
|
+ this.$emit('sendCurrentNodeinfo', { ...this.currentSelectTreeNode });
|
|
|
if (data.type == '3') {
|
|
|
this.plnaTreeCode = data.code;
|
|
|
this.plnaTreeName = data.name;
|
|
|
@@ -273,7 +276,7 @@ export default {
|
|
|
},
|
|
|
deletePICI(data) {
|
|
|
this.deleteFlag = true;
|
|
|
- this.$confirm({
|
|
|
+ Modal.confirm({
|
|
|
title: '提示',
|
|
|
content: '是否删除批次' + data.pnm + '及关联督查组?',
|
|
|
okType: 'info',
|
|
|
@@ -283,12 +286,12 @@ export default {
|
|
|
if (res.message == '请先删除人员或对象') {
|
|
|
this.$message.warning('请先删除组内人员、对象及区域!');
|
|
|
} else {
|
|
|
- // this.searchOption(data, this.treeData)
|
|
|
this.$message.success('删除成功!');
|
|
|
this.getLeftTreeData();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ return Promise.resolve();
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
this.$message.info('已取消删除');
|
|
|
@@ -476,7 +479,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang='less' scoped>
|
|
|
+<style scoped>
|
|
|
.tree_group{
|
|
|
.custom-tree-node{
|
|
|
flex: 1;
|
|
|
@@ -487,4 +490,10 @@ export default {
|
|
|
padding-right: 8px;
|
|
|
}
|
|
|
}
|
|
|
+::v-deep .ant-tree-node-content-wrapper.ant-tree-node-selected {
|
|
|
+ background-color: #e6f7ff !important;
|
|
|
+}
|
|
|
+::v-deep .ant-tree-treenode-selected {
|
|
|
+ background-color: #e6f7ff !important;
|
|
|
+}
|
|
|
</style>
|