增加添加弹窗
This commit is contained in:
+59
-164
@@ -15,58 +15,22 @@
|
||||
:model="searchForm"
|
||||
inline
|
||||
class="label-input-form"
|
||||
label-width="33px"
|
||||
label-width="55px"
|
||||
@keyup.enter.native="handleSearch">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xl="6" :lg="8">
|
||||
<el-form-item label="部门" class="search-item">
|
||||
<el-input v-model="searchForm.orgId" v-show="false"/>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
popper-class="user-dept-popper"
|
||||
trigger="click"
|
||||
:value="false"
|
||||
>
|
||||
<el-input
|
||||
@mouseenter.native="handleMouseEnter"
|
||||
@mouseleave.native="handleMouseLeave"
|
||||
slot="reference"
|
||||
v-model="searchForm.orgName"
|
||||
placeholder="根据部门查询"
|
||||
readonly
|
||||
clearable
|
||||
id="orgInput">
|
||||
<i slot="suffix"
|
||||
class="org el-icon-circle-close"
|
||||
@click.stop="handleOrgDel"
|
||||
v-show="visibleOrgClearBtn"></i>
|
||||
</el-input>
|
||||
<div class="api">
|
||||
<laws-tree
|
||||
:zNodes="orgZNodes"
|
||||
ref="orgTree"
|
||||
:editable="false"
|
||||
treeDivId="orgTreeOrgTable"
|
||||
deptSelect
|
||||
@treeDblClick="handleSearchOrgChecked"
|
||||
style="width: 200px;height: 400px;overflow: auto;">
|
||||
</laws-tree>
|
||||
</div>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xl="6" :lg="8">
|
||||
<el-form-item label="姓名" class="search-item">
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="searchForm.uname"-->
|
||||
<!-- placeholder="根据姓名查询"-->
|
||||
<!-- clearable></el-input>-->
|
||||
<search-input :placeholder="'根据姓名查询'" class="search-item" v-model="searchForm.uname"/>
|
||||
<el-input :placeholder="'根据姓名查询'" class="search-item" v-model="searchForm.uname"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="8">
|
||||
<el-form-item label="工号" class="search-item">
|
||||
<search-input :placeholder="'根据工号查询'" class="search-item" v-model="searchForm.workNum"/>
|
||||
<el-input :placeholder="'根据工号查询'" class="search-item" v-model="searchForm.workNum"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xl="6" :lg="24">
|
||||
@@ -123,7 +87,7 @@
|
||||
<el-table-column
|
||||
label="工号"
|
||||
width="120"
|
||||
prop="workNum"
|
||||
prop="ACCOUNT"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
@@ -135,7 +99,7 @@
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="email"
|
||||
prop="EMAIL"
|
||||
label="邮箱"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
@@ -158,15 +122,10 @@
|
||||
label="部门"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.departmentName || row.departName || row.orgName }}
|
||||
<template #default="{ row }">{{ row.departmentName || row.DEPATMENT || row.orgName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组织管理"
|
||||
prop="workingGroupName"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination
|
||||
@@ -373,7 +332,7 @@ export default {
|
||||
tableChecked: null,
|
||||
tableDataSelectedList: [],
|
||||
page: 1,
|
||||
pageSize: this.configContent,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
checkedList: [],
|
||||
loading: {
|
||||
@@ -393,35 +352,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询二级菜单
|
||||
selectMenu () {
|
||||
const url = 'sys/org/getTree'
|
||||
const parmas = {
|
||||
// sorDivide: 'OUT',
|
||||
// cancel: 0 // 作废 1 不作废 0
|
||||
}
|
||||
this.menuTreeLoading = true
|
||||
this.$http.get(url, parmas, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.menuTreeLoading = false
|
||||
const treeNode = []
|
||||
res.data.map((item, index) => {
|
||||
const treeItem = {}
|
||||
for (const key in item) {
|
||||
if (key === 'orgName') {
|
||||
treeItem.name = item[key]
|
||||
} else {
|
||||
treeItem[key] = item[key]
|
||||
}
|
||||
}
|
||||
treeNode[OrgTable] = treeItem
|
||||
})
|
||||
// console.log(treeNode)
|
||||
this.zNodesTree = treeNode
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
|
||||
/** 获取选择体系的数据 进行赋值 */
|
||||
handleEOCheck (checkedList) {
|
||||
@@ -441,9 +371,7 @@ export default {
|
||||
console.log(className, 'pppppiiiii')
|
||||
this.EOCheckList = [treeNode]
|
||||
},
|
||||
handleClick (tab) {
|
||||
tab.name == 'first' ? this.getRoleAndUserByOrgIdPage() : this.selectMenu()
|
||||
},
|
||||
|
||||
handleClose () {
|
||||
this.searchForm = {
|
||||
orgId: '',
|
||||
@@ -462,35 +390,6 @@ export default {
|
||||
handleCancel () {
|
||||
this.isVisible = false
|
||||
},
|
||||
getUser (ids) {
|
||||
this.$http.postData('sys/user/UserViewPage', {
|
||||
pageSize: 1000,
|
||||
orgIds: ids
|
||||
}, {
|
||||
_this: this,
|
||||
loading: 'loadData'
|
||||
},
|
||||
res => {
|
||||
if (res.ok) {
|
||||
this.EOCheckList = res.data.list
|
||||
const orgName = []
|
||||
this.EOCheckList.forEach(item => {
|
||||
if (orgName.indexOf(item.orgName) == -1) {
|
||||
orgName.push(item.orgName)
|
||||
} else {
|
||||
// delete item['orgName']
|
||||
}
|
||||
item.uname = item.uname + '_' + item.account + '_' + (item.departmentName ? item.departmentName : item.orgName)
|
||||
item.USNAME = item.USNAME + '_' + item.account + '_' + (item.departmentName ? item.departmentName : item.orgName)
|
||||
})
|
||||
console.log(this.EOCheckList)
|
||||
// 重新整合数组
|
||||
this.$emit('confirm', this.EOCheckList)
|
||||
}
|
||||
}, e => {
|
||||
|
||||
})
|
||||
},
|
||||
handleConfirm () {
|
||||
if (this.dialogModel) {
|
||||
if (this.maxSelected && this.maxSelected > -1 && this.checkedList.length > this.maxSelected) {
|
||||
@@ -499,29 +398,20 @@ export default {
|
||||
} else {
|
||||
const checkedIdList = []
|
||||
|
||||
if (this.activeName == 'second') {
|
||||
console.log(this.EOCheckList, 'popopop')
|
||||
const ids = []
|
||||
this.EOCheckList.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
this.getUser(ids.join(','))
|
||||
// 如果是按照部门 就渲染
|
||||
} else {
|
||||
this.checkedList.map(chkItem => {
|
||||
checkedIdList.push(chkItem.usid || chkItem.USID || chkItem.id)
|
||||
console.log(chkItem.uname, chkItem)
|
||||
if (chkItem.uname) {
|
||||
chkItem.uname = chkItem.uname + '_' + chkItem.account
|
||||
chkItem.USNAME = chkItem.USNAME + '_' + chkItem.account
|
||||
chkItem.orgName = chkItem.departmentName ? chkItem.departmentName : chkItem.orgName
|
||||
} else if (!chkItem.uname && chkItem.USNAME) {
|
||||
chkItem.uname = chkItem.USNAME
|
||||
chkItem.USNAME = chkItem.USNAME
|
||||
}
|
||||
})
|
||||
this.$emit('confirm', this.checkedList, checkedIdList)
|
||||
}
|
||||
this.checkedList.map(chkItem => {
|
||||
checkedIdList.push(chkItem.usid || chkItem.USID || chkItem.id)
|
||||
console.log(chkItem.uname, chkItem)
|
||||
if (chkItem.uname) {
|
||||
chkItem.uname = chkItem.uname + '_' + chkItem.account
|
||||
chkItem.USNAME = chkItem.USNAME + '_' + chkItem.account
|
||||
chkItem.orgName = chkItem.departmentName ? chkItem.departmentName : chkItem.orgName
|
||||
} else if (!chkItem.uname && chkItem.USNAME) {
|
||||
chkItem.uname = chkItem.USNAME
|
||||
chkItem.USNAME = chkItem.USNAME
|
||||
}
|
||||
})
|
||||
this.$emit('confirm', this.checkedList, checkedIdList)
|
||||
|
||||
this.isVisible = false
|
||||
}
|
||||
} else {
|
||||
@@ -618,15 +508,10 @@ export default {
|
||||
this.searchForm.orgId = this.orgId
|
||||
}
|
||||
}
|
||||
const url = ''
|
||||
const param = {
|
||||
page: this.page,
|
||||
pageNo: this.page,
|
||||
pageSize: this.pageSize,
|
||||
...this.searchForm,
|
||||
roleName: this.roleName,
|
||||
notUserId: this.notUserId.length > 0 ? this.notUserId.toString() : null,
|
||||
idList: this.idList.length > 0 ? this.idList.toString() : null,
|
||||
disableFlag: 0
|
||||
...this.searchForm
|
||||
}
|
||||
// let this.notUserId.length > 0 ? this.notUserId.toString() : null
|
||||
// getRoleAndUserByOrgIdPage(
|
||||
@@ -635,8 +520,7 @@ export default {
|
||||
this.loading.loadData = false
|
||||
this.loading.searching = false
|
||||
if (res.ok) {
|
||||
this.getOrg()
|
||||
this.total = res.data.count
|
||||
this.total = res.data.total
|
||||
this.tableData = res.data.records
|
||||
const checkedRow = []
|
||||
this.tableData.map(dataItem => {
|
||||
@@ -857,32 +741,14 @@ export default {
|
||||
}
|
||||
if (val) {
|
||||
if (this.config.value && this.config.value !== '') {
|
||||
let idListDepartment = []
|
||||
let nameListDepartment = []
|
||||
let idRoleList = []
|
||||
let nameRoleList = []
|
||||
const idList = this.config.value instanceof Array ? this.config.value : (this.config.value === '' ? [] : this.config.value.split(','))
|
||||
const nameList = this.config.valueName instanceof Array ? this.config.valueName.split(',') : (this.config.valueName === '' ? [] : this.config.valueName.split(','))
|
||||
if (this.config.valueDepartment) {
|
||||
idListDepartment = this.config.valueDepartment instanceof Array ? this.config.valueDepartment : (this.config.valueDepartment === '' ? [] : this.config.valueDepartment.split(','))
|
||||
}
|
||||
if (this.config.valueNameDepartment) {
|
||||
nameListDepartment = this.config.valueNameDepartment instanceof Array ? this.config.valueNameDepartment.split(',') : (this.config.valueNameDepartment === '' ? [] : this.config.valueNameDepartment.split(','))
|
||||
}
|
||||
if (this.config.valueRole) {
|
||||
idRoleList = this.config.valueRole instanceof Array ? this.config.valueRole : (this.config.valueRole === '' ? [] : this.config.valueRole.split(','))
|
||||
nameRoleList = this.config.valueNameRole instanceof Array ? this.config.valueNameRole.split(',') : (this.config.valueNameRole === '' ? [] : this.config.valueNameRole.split(','))
|
||||
}
|
||||
this.checkedIdList = idList
|
||||
const checkedList = []
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
USID: id,
|
||||
USNAME: nameList[OrgTable],
|
||||
orgId: idListDepartment[OrgTable],
|
||||
orgName: nameListDepartment[OrgTable],
|
||||
roleId: idRoleList[OrgTable],
|
||||
roleName: nameRoleList[OrgTable]
|
||||
USNAME: nameList[index]
|
||||
})
|
||||
})
|
||||
|
||||
@@ -902,7 +768,6 @@ export default {
|
||||
this.searchForm.orgName = ''
|
||||
}
|
||||
this.getRoleAndUserByOrgIdPage()
|
||||
this.selectMenu()
|
||||
}
|
||||
},
|
||||
isVisible (val) {
|
||||
@@ -937,7 +802,7 @@ export default {
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
USID: id,
|
||||
USNAME: nameList[OrgTable]
|
||||
USNAME: nameList[index]
|
||||
})
|
||||
})
|
||||
this.checkedList = checkedList
|
||||
@@ -1023,4 +888,34 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-new {
|
||||
//width: 100%;
|
||||
background: #FFF;
|
||||
padding: 10px 10px 0;
|
||||
|
||||
.el-button + .el-button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
display: flex;
|
||||
margin-right: 0;
|
||||
|
||||
input.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-form-item__content {
|
||||
//width: 100%;
|
||||
flex: 1;
|
||||
|
||||
.el-select,
|
||||
.el-range-editor {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProcessChooseTree from './ProcessChooseTree'
|
||||
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'ProcessFooter',
|
||||
@@ -230,9 +230,6 @@ export default {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ProcessChooseTree
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isSubmit: false,
|
||||
@@ -243,29 +240,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description: 委托
|
||||
* @date: 2020-12-14 15:51:10
|
||||
* @auth: chenxiaoxi
|
||||
*/
|
||||
changeAssigneeNew (treeNode) {
|
||||
changeAssigneeNew({
|
||||
taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id
|
||||
assignee: treeNode.id, // 被委托人
|
||||
userId: this.$store.getters.userInfo.userId, // 委托人
|
||||
pId: this.$store.getters.getHandleInfo.prcId // 流程实例
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success('委托成功')
|
||||
setTimeout(() => {
|
||||
this.$router.push('/processCenter')
|
||||
}, 100)
|
||||
this.visibleTree = false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOver () {
|
||||
this.$emit('over')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user