Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
@@ -32,40 +32,39 @@
|
|||||||
v-model="searchModel" @search="onSearch"/>
|
v-model="searchModel" @search="onSearch"/>
|
||||||
<div class="drawer-content">
|
<div class="drawer-content">
|
||||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
<!-- <virtualNodeTree-->
|
<virtualNodeTree
|
||||||
<!-- v-if="treeVisible"-->
|
|
||||||
<!-- :keeps="40"-->
|
|
||||||
<!-- show-checkbox-->
|
|
||||||
<!-- v-model="checkboxList"-->
|
|
||||||
<!-- class="treeWrap"-->
|
|
||||||
<!-- :props="{-->
|
|
||||||
<!-- isLeaf: 'leaf'-->
|
|
||||||
<!-- }"-->
|
|
||||||
<!-- :defaultCheckedKeys="defaultCheckedKeys"-->
|
|
||||||
<!-- :defaultExpandAll="defaultExpandAll"-->
|
|
||||||
<!-- :check-strictly="false"-->
|
|
||||||
<!-- node-key="id"-->
|
|
||||||
<!-- @check-change="handleCheckChange"-->
|
|
||||||
<!-- :data.sync="gData">-->
|
|
||||||
<!-- <span slot-scope="{ data }">-->
|
|
||||||
<!-- <span :class="{'active':data.color ? true:false}">-->
|
|
||||||
<!-- {{ data.title }}-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </virtualNodeTree>-->
|
|
||||||
<a-tree
|
|
||||||
style="margin-bottom: 60px;height: 600px"
|
|
||||||
v-if="treeVisible"
|
v-if="treeVisible"
|
||||||
checkable
|
ref="virtualNodeTreeRef"
|
||||||
checkStrictly
|
:keeps="40"
|
||||||
:loading="loading"
|
show-checkbox
|
||||||
:tree-data="gData"
|
v-model="checkboxList"
|
||||||
@check="onCheck"
|
class="treeWrap"
|
||||||
@expand="onExpand"
|
:defaultCheckedKeys="defaultCheckedKeys"
|
||||||
v-model:checkedKeys="defaultCheckedKeys"
|
:defaultExpandAll="defaultExpandAll"
|
||||||
:defaultExpandedKeys="defaultExpandedKeys"
|
:check-strictly="false"
|
||||||
>
|
node-key="id"
|
||||||
</a-tree>
|
@check="handleCheckChange"
|
||||||
|
@check-change="checkChange"
|
||||||
|
:data.sync="gData">
|
||||||
|
<span slot-scope="{ data }">
|
||||||
|
<span :class="{'active':data.color ? true:false}">
|
||||||
|
{{ data.title }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</virtualNodeTree>
|
||||||
|
<!-- <a-tree-->
|
||||||
|
<!-- style="margin-bottom: 60px;height: 600px"-->
|
||||||
|
<!-- v-if="treeVisible"-->
|
||||||
|
<!-- checkable-->
|
||||||
|
<!-- checkStrictly-->
|
||||||
|
<!-- :loading="loading"-->
|
||||||
|
<!-- :tree-data="gData"-->
|
||||||
|
<!-- @check="onCheck"-->
|
||||||
|
<!-- @expand="onExpand"-->
|
||||||
|
<!-- v-model:checkedKeys="defaultCheckedKeys"-->
|
||||||
|
<!-- :defaultExpandedKeys="defaultExpandedKeys"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </a-tree>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||||
@@ -107,109 +106,145 @@
|
|||||||
defaultCheckedKeysName: [],
|
defaultCheckedKeysName: [],
|
||||||
content: [],
|
content: [],
|
||||||
dataList: [],
|
dataList: [],
|
||||||
defaultExpandAll: false
|
defaultExpandAll: false,
|
||||||
|
searchData: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// handleCheckChange(val, checked, indeterminate) {
|
checkChange(val, checked, indeterminate) {
|
||||||
// if (checked) {
|
if (!checked && this.searchData) {
|
||||||
// this.userName.push(val.title)
|
this.userName = this.userName.filter(res => {
|
||||||
// this.userIds.push(val.id)
|
return res != val.title
|
||||||
// } else {
|
})
|
||||||
// for (let i = 0; i < this.userName.length; i++) {
|
this.userIds = this.userIds.filter(res => {
|
||||||
// if (this.userName[i] == val.title) {
|
return res != val.id
|
||||||
// this.userName.splice(i, 1)
|
})
|
||||||
// i--
|
for (let i = 0; i < this.userIds.length; i++) {
|
||||||
// }
|
if (this.userIds[i] == val.parentId) {
|
||||||
// }
|
this.userIds.splice(i, 1)
|
||||||
// for (let i = 0; i < this.userIds.length; i++) {
|
this.userName.splice(i, 1)
|
||||||
// if (this.userIds[i] == val.id) {
|
i--
|
||||||
// this.userIds.splice(i, 1)
|
}
|
||||||
// i--
|
}
|
||||||
// }
|
} else if (checked && this.searchData) {
|
||||||
// }
|
this.userName.push(val.title)
|
||||||
// }
|
this.userIds.push(val.id)
|
||||||
// },
|
}
|
||||||
|
},
|
||||||
|
handleCheckChange(val, data, checked) {
|
||||||
|
if (!this.searchData) {
|
||||||
|
this.userName = []
|
||||||
|
this.userIds = []
|
||||||
|
if (data.checkedNodes && data.checkedNodes.length > 0) {
|
||||||
|
data.checkedNodes.forEach(res => {
|
||||||
|
this.userName.push(res.title)
|
||||||
|
this.userIds.push(res.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
standardClick() {
|
standardClick() {
|
||||||
this.treeVisible = false
|
this.treeVisible = false
|
||||||
this.departId = ''
|
// this.departId = ''
|
||||||
this.searchModel = ''
|
this.searchModel = ''
|
||||||
this.userIds = []
|
this.searchData = ''
|
||||||
this.userName = []
|
// this.userIds = []
|
||||||
this.queryDepartUserTreeList(1)
|
// this.userName = []
|
||||||
|
// this.queryDepartUserTreeList(1)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
// let gData = localStorage.getItem('gData')
|
let gData = localStorage.getItem('gData')
|
||||||
// if (gData) {
|
if (gData) {
|
||||||
// let dataList = JSON.parse(gData)
|
let dataList = JSON.parse(gData)
|
||||||
// if (!this.selectDepartment) {
|
if (!this.selectDepartment) {
|
||||||
// dataList.forEach(res => {
|
dataList.forEach(res => {
|
||||||
// if (res.type == 'Depart') {
|
if (res.type == 'Depart') {
|
||||||
// res.disabled = true
|
res.disabled = true
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// this.dataList = this.toTree(dataList)
|
this.dataList = this.toTree(dataList)
|
||||||
// }
|
}
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// if (gData) {
|
if (gData) {
|
||||||
// this.gData = this.dataList
|
this.gData = this.dataList
|
||||||
// this.gData = [...this.gData]
|
this.gData = [...this.gData]
|
||||||
// // this.treeVisible = true
|
// this.treeVisible = true
|
||||||
// if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||||
// this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
|
||||||
// } else if (this.personneQuery[this.query.db_field_name]) {
|
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||||
// this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
this.userName = this.personneQuery[this.query.db_field_name].split(',')
|
||||||
// } else {
|
} else {
|
||||||
// this.userName = []
|
this.userName = []
|
||||||
// }
|
}
|
||||||
// if (this.personneQuery[this.query.db_field_name + '_id']) {
|
if (this.personneQuery[this.query.db_field_name + '_id']) {
|
||||||
// this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
|
||||||
// } else if (this.personneQuery[this.query.db_field_name]) {
|
} else if (this.personneQuery[this.query.db_field_name]) {
|
||||||
// this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
|
||||||
// } else {
|
} else {
|
||||||
// this.userIds = []
|
this.userIds = []
|
||||||
// }
|
}
|
||||||
// this.defaultCheckedKeys = this.userIds
|
this.defaultCheckedKeys = this.userIds
|
||||||
// this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
// this.defaultExpandAll = false
|
this.defaultExpandAll = false
|
||||||
// this.treeVisible = true
|
this.treeVisible = true
|
||||||
// } else {
|
} else {
|
||||||
// this.queryDepartUserTreeList(1)
|
this.queryDepartUserTreeList(1)
|
||||||
// }
|
}
|
||||||
// }, 200)
|
}, 200)
|
||||||
|
},
|
||||||
|
deleteChildren(value, arr) {
|
||||||
|
let newarr = []
|
||||||
|
arr.forEach(element => {
|
||||||
|
if (element.title.indexOf(value) > -1) { // 判断条件
|
||||||
|
newarr.push(element)
|
||||||
|
} else {
|
||||||
|
if (element.children && element.children.length > 0) {
|
||||||
|
let redata = this.deleteChildren(value, element.children)
|
||||||
|
if (redata && redata.length > 0) {
|
||||||
|
let obj = {
|
||||||
|
...element,
|
||||||
|
children: redata
|
||||||
|
}
|
||||||
|
newarr.push(obj)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return newarr
|
||||||
},
|
},
|
||||||
//将数据拼成树形结构
|
//将数据拼成树形结构
|
||||||
// toTree(config) {
|
toTree(config, num) {
|
||||||
// // 删除 所有 children,以防止多次调用
|
// 删除 所有 children,以防止多次调用
|
||||||
// config.forEach(function(item) {
|
config.forEach(function(item) {
|
||||||
// delete item.children
|
delete item.children
|
||||||
// })
|
})
|
||||||
// // 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||||
// let map = {}
|
let map = {}
|
||||||
// config.forEach((item) => {
|
config.forEach((item) => {
|
||||||
// item.label = item.name
|
item.label = item.name
|
||||||
// item.key = item.id
|
item.key = item.id
|
||||||
//
|
|
||||||
// item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
|
item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
|
||||||
// map[item.id] = item
|
map[item.id] = item
|
||||||
// })
|
})
|
||||||
// let val = []
|
let val = []
|
||||||
// config.forEach((item) => {
|
config.forEach((item) => {
|
||||||
// // 以当前遍历项,的pid,去map对象中找到索引的id
|
// 以当前遍历项,的pid,去map对象中找到索引的id
|
||||||
// let parent = map[item.parentId]
|
let parent = map[item.parentId]
|
||||||
// // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
|
||||||
// if (parent) {
|
// 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
||||||
// (parent.children || (parent.children = [])).push(item)
|
if (parent) {
|
||||||
// } else {
|
(parent.children || (parent.children = [])).push(item)
|
||||||
// //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
} else {
|
||||||
// val.push(item)
|
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
||||||
// }
|
val.push(item)
|
||||||
// })
|
}
|
||||||
// return val
|
})
|
||||||
// },
|
return val
|
||||||
|
},
|
||||||
standardDelete() {
|
standardDelete() {
|
||||||
this.$emit('input', null)
|
this.$emit('input', null)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
@@ -220,61 +255,61 @@
|
|||||||
// this.selectedKey = selectedKeys
|
// this.selectedKey = selectedKeys
|
||||||
// },
|
// },
|
||||||
|
|
||||||
onCheck(checkedKeys, info) {
|
// onCheck(checkedKeys, info) {
|
||||||
this.userIds = checkedKeys.checked
|
// this.userIds = checkedKeys.checked
|
||||||
this.userName = []
|
// this.userName = []
|
||||||
if (this.userIds.length > 0) {
|
// if (this.userIds.length > 0) {
|
||||||
for (let i = 0; i < this.userIds.length; i++) {
|
// for (let i = 0; i < this.userIds.length; i++) {
|
||||||
for (let j = 0; j < this.defaultCheckedKeysName.length; j++) {
|
// for (let j = 0; j < this.defaultCheckedKeysName.length; j++) {
|
||||||
if (this.userIds[i] == this.defaultCheckedKeysName[j].id) {
|
// if (this.userIds[i] == this.defaultCheckedKeysName[j].id) {
|
||||||
this.userName.push(this.defaultCheckedKeysName[j].name)
|
// this.userName.push(this.defaultCheckedKeysName[j].name)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (info.checkedNodes && info.checkedNodes.length > 0) {
|
// if (info.checkedNodes && info.checkedNodes.length > 0) {
|
||||||
info.checkedNodes.forEach(res => {
|
// info.checkedNodes.forEach(res => {
|
||||||
if (res.data.props.dataRef.key) {
|
// if (res.data.props.dataRef.key) {
|
||||||
this.content.push({
|
// this.content.push({
|
||||||
id: res.data.props.dataRef.key,
|
// id: res.data.props.dataRef.key,
|
||||||
title: res.data.props.dataRef.title
|
// title: res.data.props.dataRef.title
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
this.content.push({
|
// this.content.push({
|
||||||
id: res.data.props.id,
|
// id: res.data.props.id,
|
||||||
title: res.data.props.title
|
// title: res.data.props.title
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
if (this.content && this.content.length > 0) {
|
// if (this.content && this.content.length > 0) {
|
||||||
for (let i = 0; i < this.content.length; i++) {
|
// for (let i = 0; i < this.content.length; i++) {
|
||||||
for (let j = i + 1; j < this.content.length; j++) {
|
// for (let j = i + 1; j < this.content.length; j++) {
|
||||||
if (this.content[i].id == this.content[j].id) {
|
// if (this.content[i].id == this.content[j].id) {
|
||||||
this.content.splice(j, 1)
|
// this.content.splice(j, 1)
|
||||||
j--
|
// j--
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
this.userIds.forEach(res => {
|
// this.userIds.forEach(res => {
|
||||||
this.content.forEach(val => {
|
// this.content.forEach(val => {
|
||||||
if (res == val.id) {
|
// if (res == val.id) {
|
||||||
this.userName.push(val.title)
|
// this.userName.push(val.title)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
if (this.userName.length > 0) {
|
// if (this.userName.length > 0) {
|
||||||
for (let i = 0; i < this.userName.length; i++) {
|
// for (let i = 0; i < this.userName.length; i++) {
|
||||||
for (let j = i + 1; j < this.userName.length; j++) {
|
// for (let j = i + 1; j < this.userName.length; j++) {
|
||||||
if (this.userName[i] == this.userName[j]) {
|
// if (this.userName[i] == this.userName[j]) {
|
||||||
this.userName.splice(j, 1)
|
// this.userName.splice(j, 1)
|
||||||
j--
|
// j--
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.treeVisible = false
|
this.treeVisible = false
|
||||||
@@ -289,12 +324,12 @@
|
|||||||
}
|
}
|
||||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||||
// userName = userName.filter(function(item, index) {
|
userName = userName.filter(function(item, index) {
|
||||||
// return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||||
// })
|
})
|
||||||
// userIds = userIds.filter(function(item, index) {
|
userIds = userIds.filter(function(item, index) {
|
||||||
// return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
|
||||||
// })
|
})
|
||||||
this.$emit('input', userName.join(','))
|
this.$emit('input', userName.join(','))
|
||||||
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
@@ -312,116 +347,119 @@
|
|||||||
this.defaultCheckedKeys = []
|
this.defaultCheckedKeys = []
|
||||||
},
|
},
|
||||||
onSearch(e) {
|
onSearch(e) {
|
||||||
// this.loading = true
|
this.treeVisible = false
|
||||||
// this.treeVisible = false
|
let p = new Promise((resolve, reject) => {
|
||||||
// let p = new Promise((resolve, reject) => {
|
resolve()
|
||||||
// resolve()
|
|
||||||
// })
|
|
||||||
// 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)) {
|
|
||||||
// res.color = true
|
|
||||||
// content.push(res)
|
|
||||||
// }
|
|
||||||
// } else if (res.type == 'Depart') {
|
|
||||||
// if (!this.selectDepartment) {
|
|
||||||
// res.disabled = true
|
|
||||||
// }
|
|
||||||
// content.push(res)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// this.defaultExpandAll = true
|
|
||||||
// this.gData = this.toTree(content)
|
|
||||||
// } else {
|
|
||||||
// let content = JSON.parse(gData)
|
|
||||||
// if (!this.selectDepartment) {
|
|
||||||
// content.forEach(res => {
|
|
||||||
// if (res.type == 'Depart') {
|
|
||||||
// res.disabled = true
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// this.gData = this.toTree(content)
|
|
||||||
// this.defaultExpandAll = false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// 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
|
|
||||||
})
|
})
|
||||||
},
|
p.then(() => {
|
||||||
onExpand(selectedKeys, val) {
|
this.searchData = e
|
||||||
if (this.searchModel == '' || !this.searchModel) {
|
let gData = localStorage.getItem('gData')
|
||||||
if (val.expanded) {
|
let content = []
|
||||||
if (this.departId == val.node.value) {
|
if (gData) {
|
||||||
|
if (e) {
|
||||||
|
JSON.parse(gData).forEach(res => {
|
||||||
|
if (res.type == 'User') {
|
||||||
|
if (res.name.includes(e)) {
|
||||||
|
res.color = true
|
||||||
|
content.push(res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// else if(res.type == 'Depart'){
|
||||||
|
// content.push(res)
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
let gDataAdmin = this.toTree(content)
|
||||||
|
this.gData = this.deleteChildren(e, gDataAdmin)
|
||||||
|
this.defaultExpandAll = true
|
||||||
|
this.treeVisible = true
|
||||||
|
this.defaultCheckedKeys = this.userIds
|
||||||
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.departId = val.node.value
|
let content = JSON.parse(gData)
|
||||||
this.queryDepartUserTreeList(2)
|
if (!this.selectDepartment) {
|
||||||
|
content.forEach(res => {
|
||||||
|
if (res.type == 'Depart') {
|
||||||
|
res.disabled = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.gData = this.toTree(content)
|
||||||
|
this.defaultExpandAll = false
|
||||||
|
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) {
|
queryDepartUserTreeList(num) {
|
||||||
let gData = JSON.parse(JSON.stringify(this.gData))
|
// let gData = JSON.parse(JSON.stringify(this.gData))
|
||||||
if (gData && gData.length > 0) {
|
// if (gData && gData.length > 0) {
|
||||||
gData = JSON.stringify(gData)
|
// gData = JSON.stringify(gData)
|
||||||
} else {
|
// } else {
|
||||||
gData = ''
|
// gData = ''
|
||||||
}
|
// }
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
this.loading = true
|
this.loading = true
|
||||||
//queryDepartUserTreeList
|
//queryDepartUserTreeList
|
||||||
//queryUserTreeList
|
//queryUserTreeList
|
||||||
postAction('sys/user/queryDepartUserTreeList', {
|
postAction('sys/user/queryUserTreeList', {
|
||||||
departId: this.departId,
|
// departId: this.departId,
|
||||||
json: gData,
|
// json: gData,
|
||||||
flag: '1'
|
// flag: '1'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
// localStorage.setItem('gData', JSON.stringify(res.result))
|
// localStorage.setItem('gData', JSON.stringify(res.result))
|
||||||
// this.toTree(dataList)
|
// this.toTree(dataList)
|
||||||
// let content = JSON.parse(JSON.stringify(res.result))
|
let content = JSON.parse(JSON.stringify(res.result))
|
||||||
// if (!this.selectDepartment) {
|
if (!this.selectDepartment) {
|
||||||
// res.result.forEach(res => {
|
res.result.forEach(res => {
|
||||||
// if (res.type == 'Depart') {
|
if (res.type == 'Depart') {
|
||||||
// res.disabled = true
|
res.disabled = true
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// localStorage.removeItem('gData')
|
localStorage.removeItem('gData')
|
||||||
// localStorage.setItem('gData', JSON.stringify(content))
|
localStorage.setItem('gData', JSON.stringify(content))
|
||||||
// this.gData = this.toTree(res.result)
|
this.gData = this.toTree(res.result)
|
||||||
this.gData = res.result
|
// this.gData = res.result
|
||||||
this.gData = [...this.gData]
|
this.gData = [...this.gData]
|
||||||
// this.gData[0].isLeaf = false
|
// this.gData[0].isLeaf = false
|
||||||
this.defaultExpandedKeys = [this.departId]
|
// this.defaultExpandedKeys = [this.departId]
|
||||||
if (num == 1) {
|
if (num == 1) {
|
||||||
if (this.userName && this.userName.length == 0) {
|
if (this.userName && this.userName.length == 0) {
|
||||||
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
if (this.personneQuery[this.query.db_field_name + 'Name']) {
|
||||||
@@ -444,14 +482,14 @@
|
|||||||
this.defaultCheckedKeys = this.userIds
|
this.defaultCheckedKeys = this.userIds
|
||||||
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
this.defaultCheckedKeysName = []
|
this.defaultCheckedKeysName = []
|
||||||
if (this.defaultCheckedKeys.length > 0) {
|
// if (this.defaultCheckedKeys.length > 0) {
|
||||||
for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
|
// for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
|
||||||
this.defaultCheckedKeysName.push({
|
// this.defaultCheckedKeysName.push({
|
||||||
id: this.defaultCheckedKeys[i],
|
// id: this.defaultCheckedKeys[i],
|
||||||
name: this.userName[i]
|
// name: this.userName[i]
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
this.defaultExpandAll = false
|
this.defaultExpandAll = false
|
||||||
this.treeVisible = true
|
this.treeVisible = true
|
||||||
|
|||||||
@@ -41,9 +41,8 @@ export default {
|
|||||||
return getNodeKey(this.tree.nodeKey, node.data);
|
return getNodeKey(this.tree.nodeKey, node.data);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSelectChange(checked, indeterminate) {
|
handleSelectChange(checked, indeterminate,source) {
|
||||||
const node = this.node || this.source;
|
const node = this.node || this.source;
|
||||||
|
|
||||||
if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
|
if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
|
||||||
this.tree.$emit('check-change', node.data, checked, indeterminate);
|
this.tree.$emit('check-change', node.data, checked, indeterminate);
|
||||||
}
|
}
|
||||||
@@ -95,7 +94,6 @@ export default {
|
|||||||
|
|
||||||
handleCheckChange(_, ev) {
|
handleCheckChange(_, ev) {
|
||||||
const node = this.node || this.source;
|
const node = this.node || this.source;
|
||||||
|
|
||||||
node.setChecked(ev.target.checked, !this.tree.checkStrictly);
|
node.setChecked(ev.target.checked, !this.tree.checkStrictly);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const store = this.tree.store;
|
const store = this.tree.store;
|
||||||
@@ -103,8 +101,9 @@ export default {
|
|||||||
checkedNodes: store.getCheckedNodes(),
|
checkedNodes: store.getCheckedNodes(),
|
||||||
checkedKeys: store.getCheckedKeys(),
|
checkedKeys: store.getCheckedKeys(),
|
||||||
halfCheckedNodes: store.getHalfCheckedNodes(),
|
halfCheckedNodes: store.getHalfCheckedNodes(),
|
||||||
halfCheckedKeys: store.getHalfCheckedKeys()
|
halfCheckedKeys: store.getHalfCheckedKeys(),
|
||||||
});
|
getCurrentNode:store.getCurrentNode()
|
||||||
|
},this.source.checked);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ export default class TreeStore {
|
|||||||
|
|
||||||
if (node.visible && !node.isLeaf && !lazy) node.expand();
|
if (node.visible && !node.isLeaf && !lazy) node.expand();
|
||||||
};
|
};
|
||||||
|
|
||||||
traverse(this);
|
traverse(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,11 +115,11 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'source.indeterminate'(val) {
|
'source.indeterminate'(val) {
|
||||||
this.handleSelectChange(this.source.checked, val);
|
this.handleSelectChange(this.source.checked, val,this.source);
|
||||||
},
|
},
|
||||||
|
|
||||||
'source.checked'(val) {
|
'source.checked'(val) {
|
||||||
this.handleSelectChange(val, this.source.indeterminate);
|
this.handleSelectChange(val, this.source.indeterminate,this.source);
|
||||||
},
|
},
|
||||||
|
|
||||||
'source.expanded'(val) {
|
'source.expanded'(val) {
|
||||||
|
|||||||
+1
-1
@@ -209,7 +209,7 @@
|
|||||||
actiProcInstId: this.actiProcInstId
|
actiProcInstId: this.actiProcInstId
|
||||||
}
|
}
|
||||||
downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls',
|
downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls',
|
||||||
this.$t('evaluationResults') + '.zip', query)
|
this.$route.query.serialNumber+ ' ' +this.$t('evaluationResults') + '.zip', query)
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
this.formInline = JSON.parse(JSON.stringify(this.$route.query))
|
this.formInline = JSON.parse(JSON.stringify(this.$route.query))
|
||||||
|
|||||||
@@ -193,6 +193,13 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'gatherResultShow'
|
dataIndex: 'gatherResultShow'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('Sponsor'),
|
||||||
|
align: 'center',
|
||||||
|
width: 140,
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: 'createBy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('dateOfInitiation'),
|
title: this.$t('dateOfInitiation'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|||||||
@@ -31,25 +31,29 @@
|
|||||||
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
|
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
|
||||||
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||||
}]">
|
}]">
|
||||||
<a-input class="box-input"
|
<a-textarea :placeholder="$t('PleaseEnter')+$t('relevantSections')"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="item.relatedSection"
|
v-model="item.relatedSection" :rows="4"/>
|
||||||
:placeholder="$t('PleaseEnter')+$t('relevantSections')"/>
|
<!-- <a-input class="box-input"-->
|
||||||
|
<!-- :disabled="disabled"-->
|
||||||
|
<!-- v-model="item.relatedSection"-->
|
||||||
|
<!-- :placeholder="$t('PleaseEnter')+$t('relevantSections')"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
|
<span class="title-text-text" :title="$t('clauseContent')">{{$t('clauseContent')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="accessoryFile">
|
<a-form-model-item class="itemModel"
|
||||||
<a-button type="primary" class="button-text"
|
:prop="'dataList.'+index+'.clauseContent'"
|
||||||
@click="clickButtonToUpload('accessoryFile',index)">
|
:rules="[
|
||||||
{{ (item.accessoryFile === 'null' || item.accessoryFile === '' ||
|
{max: 300,message: $t('clauseContent') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||||
item.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
}]">
|
||||||
}}
|
<a-textarea :placeholder="$t('PleaseEnter')+$t('clauseContent')"
|
||||||
</a-button>
|
:disabled="disabled"
|
||||||
|
v-model="item.clauseContent" :rows="4"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -95,16 +99,15 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('clauseContent')">{{$t('clauseContent')}}</span>
|
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel"
|
<a-form-model-item class="itemModel" prop="accessoryFile">
|
||||||
:prop="'dataList.'+index+'.clauseContent'"
|
<a-button type="primary" class="button-text"
|
||||||
:rules="[
|
@click="clickButtonToUpload('accessoryFile',index)">
|
||||||
{max: 300,message: $t('clauseContent') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
{{ (item.accessoryFile === 'null' || item.accessoryFile === '' ||
|
||||||
}]">
|
item.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
<a-textarea :placeholder="$t('PleaseEnter')+$t('clauseContent')"
|
}}
|
||||||
:disabled="disabled"
|
</a-button>
|
||||||
v-model="item.clauseContent" :rows="4"/>
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
Reference in New Issue
Block a user