Merge remote-tracking branch 'origin/dev_20231013_ZC' into dev_20230829_change

# Conflicts:
#	src/pages/home2/components/todoList/index.vue
#	src/pages/processCenter/pages/components/ProcessMixin.vue
#	src/pages/processCenter/pages/processDetail/index.vue
#	src/pages/processCenter/pages/processList/tabComponents/newProcess/index.vue
#	src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue
#	src/pages/processCenter/pages/processList/tabComponents/taskDraft/index.vue
#	src/router/index.js
This commit is contained in:
zyn
2023-10-31 14:10:22 +08:00
30 changed files with 6156 additions and 171 deletions
+10 -10
View File
@@ -443,16 +443,16 @@
// path: '/DynamicInformations',
// menuId: '3C87BSHJUF'
// },
// // {
// // title: '流程分类管理',
// // path: '/processClassificationManage',
// // menuId: 'N323F2UB9FTUV5SD3GTD'
// // },
// // {
// // title: '流程管理',
// // path: '/processManage',
// // menuId: 'K5KXSS3X9CF7CS8AMFJ5'
// // },
{
title: '流程分类管理',
path: '/processClassificationManage',
// menuId: 'N323F2UB9FTUV5SD3GTD'
},
{
title: '流程管理',
path: '/processManage',
// menuId: 'K5KXSS3X9CF7CS8AMFJ5'
},
// {
// title: 'SVPPS',
// path: '/svpps',
+160 -135
View File
@@ -1,12 +1,13 @@
<template>
<div class="roleTree">
<el-drawer
:title="isTitle"
:visible.sync="visible"
:wrapperClosable="false"
@close="handleTreeDrawerCancel"
append-to-body
size="460px">
:title="isTitle"
v-if="visible"
:visible.sync="visible"
:wrapperClosable="false"
@close="handleTreeDrawerCancel"
append-to-body
size="460px">
<el-form
ref="attributeEO"
class="label-input-form"
@@ -15,16 +16,16 @@
>
<el-form-item class="form-item-disabled" style="margin: 10px;">
<el-input
v-model="filterText"
placeholder="请输入姓名"
@keyup.enter.native="searchChange"
v-model="filterText"
placeholder="请输入姓名"
@keyup.enter.native="searchChange"
></el-input>
</el-form-item>
<el-form-item class="form-item-disabled" style="margin-top: 10px;">
<el-button size="medium " type="primary" @click="searchChange">
查询
</el-button>
</el-form-item>
<el-form-item class="form-item-disabled" style="margin-top: 10px;">
<el-button size="medium " type="primary" @click="searchChange">
查询
</el-button>
</el-form-item>
</el-form>
<div class="divTree">
<!-- 当前tree展示全部人员 -->
@@ -72,7 +73,7 @@
ref="tree"
:lazy="false"
:key="treeKey"
>
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span>
@@ -90,13 +91,19 @@
closable>
{{tag.name}}
</el-tag>
<el-tag v-show="delList.length > 0 && !checkBox" type="danger" closable size="mini" @close="handleCloseAll()">全部删除</el-tag>
<el-tag v-show="delList.length > 0 && !checkBox" type="danger" closable size="mini"
@close="handleCloseAll()">全部删除
</el-tag>
</div>
</div>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" :loading="subLoading" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary"
:loading="subLoading" @click="saveUserInfo">确定
</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" :loading="subLoading" @click="handleTreeDrawerCancel">取消</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" :loading="subLoading"
@click="handleTreeDrawerCancel">取消
</el-button>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
</el-drawer>
@@ -104,15 +111,16 @@
</template>
<script>
function debounce(func, wait = 500){
function debounce(func, wait = 500) {
let timeout;
return function(event){
return function (event) {
clearTimeout(timeout)
timeout = setTimeout(()=>{
timeout = setTimeout(() => {
func.call(this, event)
},wait)
}, wait)
}
}
export default {
name: "roleTree",
props: {
@@ -134,13 +142,13 @@
}
},
type: {
type: Number,
default: 0
type: Number,
default: 0
}
},
data () {
data() {
return {
treeKey:1,
treeKey: 1,
defaultKey: [],//默认展开的节点的 key 的数组
visible: false,
selectList: [],
@@ -161,13 +169,13 @@
}
},
methods: {
nameJoinAccount(treeData1){
treeData1.forEach(item=>{
if(item.account) item.name = `${item.name}(${item.account})`
if(item.children) this.nameJoinAccount(item.children)
})
},
handleClose (tag) {
nameJoinAccount(treeData1) {
treeData1.forEach(item => {
if (item.account) item.name = `${item.name}(${item.account})`
if (item.children) this.nameJoinAccount(item.children)
})
},
handleClose(tag) {
let arr = []
for (let a = 0; a < this.delList.length; a++) {
if (tag.id === this.delList[a].id) {
@@ -189,7 +197,7 @@
}
}
},
handleCloseAll () {
handleCloseAll() {
this.$msgbox({
title: '提示',
message: '是否删除当前选中人员',
@@ -209,41 +217,41 @@
}
)
},
searchChange(){
// 查询
if (this.filterText.length) {
this.open1 = false // 显示第二个tree
this.treeLoading = true
this.defaultKey = []
this.$http.get('SarInstitution/institution/getNextTwo', {
userName: this.filterText
}, {}, res => {
this.treeData1 = res
this.treeData1.forEach(item => {
this.defaultKey.push(item.id)
})
this.nameJoinAccount(this.treeData1)
this.treeLoading = false
})
// this.treeKey++
searchChange() {
// 查询
if (this.filterText.length) {
this.open1 = false // 显示第二个tree
this.treeLoading = true
this.defaultKey = []
this.$http.get('SarInstitution/institution/getNextTwo', {
userName: this.filterText
}, {}, res => {
this.treeData1 = res
this.treeData1.forEach(item => {
this.defaultKey.push(item.id)
})
this.nameJoinAccount(this.treeData1)
this.treeLoading = false
})
// this.treeKey++
// this.$http.get('SarInstitution/institution/institutionAndUser', {
// userName: this.filterText
// }, {}, res => {
// this.treeData1 = res.data
// this.treeData1.forEach(item => {
// this.defaultKey.push(item.id)
// })
// console.log(1);
// this.getChildren()
// this.treeLoading = false
// })
} else {
this.open1 = true
}
},
changeInput:debounce(function (val) {
// this.$http.get('SarInstitution/institution/institutionAndUser', {
// userName: this.filterText
// }, {}, res => {
// this.treeData1 = res.data
// this.treeData1.forEach(item => {
// this.defaultKey.push(item.id)
// })
// console.log(1);
// this.getChildren()
// this.treeLoading = false
// })
} else {
this.open1 = true
}
},
changeInput: debounce(function (val) {
if (val.length) {
this.open1 = false
this.treeLoading = true
@@ -257,28 +265,7 @@
this.open1 = true
}
}),
checkChange2 (row, type, c) {
if (this.checkBox) {
} else {
if (type) {
this.nodeList2.push(row.id)
this.delList.push(row)
} else {
for (let a = 0; a < this.nodeList2.length; a ++) {
if (row.id === this.nodeList2[a]) {
this.nodeList2.splice(a, 1)
}
}
for (let b = 0; b < this.delList.length; b++) {
if (row.id === this.delList[b].id) {
this.delList.splice(b, 1)
}
}
}
}
},
checkChange (row, type, c) {
//节点选中状态发生变化时的回调(传递给 data 属性的数组中该节点所对应的对象、节点本身是否被选中、节点的子树中是否有被选中的节点)
checkChange2(row, type, c) {
if (this.checkBox) {
} else {
if (type) {
@@ -298,14 +285,35 @@
}
}
},
handleTreeDrawerCancel () {
checkChange(row, type, c) {
//节点选中状态发生变化时的回调(传递给 data 属性的数组中该节点所对应的对象、节点本身是否被选中、节点的子树中是否有被选中的节点)
if (this.checkBox) {
} else {
if (type) {
this.nodeList2.push(row.id)
this.delList.push(row)
} else {
for (let a = 0; a < this.nodeList2.length; a++) {
if (row.id === this.nodeList2[a]) {
this.nodeList2.splice(a, 1)
}
}
for (let b = 0; b < this.delList.length; b++) {
if (row.id === this.delList[b].id) {
this.delList.splice(b, 1)
}
}
}
}
},
handleTreeDrawerCancel() {
this.filterText = ''
this.open1 = true
this.visible = false
},
saveUserInfo () {
if(this.roleList.length === 0){
this.roleList.push({id:"",name:""});
saveUserInfo() {
if (this.roleList.length === 0) {
this.roleList.push({id: "", name: ""});
}
if (this.checkBox) {
this.$emit('checkedRole', this.roleList)
@@ -342,9 +350,9 @@
}
this.open1 = true
},
drawerCheck (data) {
//当复选框被点击的时候触发
//共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性
drawerCheck(data) {
//当复选框被点击的时候触发
//共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性
if (this.checkBox) { // 单选
// 单选判断
let getlist = this.$refs.tree.getCheckedNodes()
@@ -361,31 +369,31 @@
this.delList = [data]
}
} else { // 多选
if (this.roleList.length === 0) {
this.roleList.push(data)
} else {
let delFlag = true
this.roleList.forEach((item, index) => {
if (item.id === data.id) {
this.roleList.splice(index, 1)
delFlag = false
}
})
if (delFlag) {
this.roleList.push(data)
if (this.roleList.length === 0) {
this.roleList.push(data)
} else {
let delFlag = true
this.roleList.forEach((item, index) => {
if (item.id === data.id) {
this.roleList.splice(index, 1)
delFlag = false
}
})
if (delFlag) {
this.roleList.push(data)
}
}
}
// this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
// this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
}
},
loadNode(node, resolve) {
//加载子树数据的方法,仅当 lazy 属性为true 时生效
//加载子树数据的方法,仅当 lazy 属性为true 时生效
if (node.level === 0) {
return resolve(this.treeData);
}
this.getChildren(node, resolve)
},
getChildren (node, resolve) {
getChildren(node, resolve) {
this.$http.get('SarInstitution/institution/getNext', {
institutionId: node.key,
userName: this.filterText
@@ -393,16 +401,16 @@
resolve(res)
})
},
getTree () {
getTree() {
this.treeLoading = true
this.$http.get('SarInstitution/institution/getFirstInstitution', {}, {}, res=> {
this.$http.get('SarInstitution/institution/getFirstInstitution', {}, {}, res => {
this.treeData = res
this.treeLoading = false
})
}
},
watch: {
isVisible (val) {
isVisible(val) {
this.visible = val
if (val) {
this.nodeList2 = this.nodeList
@@ -434,7 +442,7 @@
this.$emit('update:isVisible', val)
}
},
mounted () {
mounted() {
this.getTree()
}
}
@@ -445,12 +453,15 @@
overflow: auto;
height: calc(~'100% - 300px');
}
.divDel {
border-top: 1px solid #000;
height: 300px;
.divDel_title {
margin: 10px;
}
.divDel_box {
height: 266px;
padding: 0px 0 10px;
@@ -458,50 +469,59 @@
flex-wrap: wrap;
overflow: auto;
margin: 10px;
align-content: flex-start;
align-content: flex-start;
span {
margin: 0px 5px 5px 0;
}
}
}
/deep/ .icon-tree {
margin: 0 5px 0 10px;
position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png');
background-size: 100% 100%;
}
/deep/.el-tree-node__content {
margin: 0 5px 0 10px;
position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png');
background-size: 100% 100%;
}
/deep/ .el-tree-node__content {
padding-left: 0px !important;
}
/deep/ .is-leaf{
background-image:none;
background-size:100% 100%;
/deep/ .is-leaf {
background-image: none;
background-size: 100% 100%;
}
/deep/ .is-leaf-none{
/deep/ .is-leaf-none {
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background:url('~@/assets/images/shangqi/img/personnel.png');
background-size:100% 100%;
background: url('~@/assets/images/shangqi/img/personnel.png');
background-size: 100% 100%;
}
/deep/ .is-show{
/deep/ .is-show {
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background:url('~@/assets/images/shangqi/img/mechanism.png');
background-size:100% 100%;
background: url('~@/assets/images/shangqi/img/mechanism.png');
background-size: 100% 100%;
}
/deep/.tree-line{
/deep/ .tree-line {
.el-tree-node {
position: relative;
padding-left: 0px; // 缩进量
line-height: 30px;
}
.el-tree-node__children {
padding-left: 16px; // 缩进量
}
// 竖线
.el-tree-node::before {
content: "";
@@ -513,10 +533,12 @@
border-width: 1px;
border-left: 1px dashed #858990e0;
}
// 当前层最后一个节点的竖线高度固定
.el-tree-node:last-child::before {
height: 38px; // 可以自己调节到合适数值
}
// 横线
.el-tree-node::after {
content: "";
@@ -528,18 +550,21 @@
border-width: 1px;
border-top: 1px dashed #858990e0;
}
// 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
& > .el-tree-node::after {
border-top: none;
}
& > .el-tree-node::before {
border-left: none;
}
// 展开关闭的icon
.el-tree-node__expand-icon{
.el-tree-node__expand-icon {
font-size: 16px;
// 叶子节点(无子节点)
&.is-leaf{
&.is-leaf {
color: transparent;
// display: none; // 也可以去掉
}