【修改】修改部门
This commit is contained in:
+30
-30
@@ -22,7 +22,7 @@
|
||||
<el-col :xl="8" :lg="8">
|
||||
<el-form-item label="部门名称" class="search-item">
|
||||
<!-- <el-input :placeholder="'根据角色名查询'" class="search-item" v-model="searchForm.roleName"/>-->
|
||||
<el-input v-model="searchForm.orgName" maxlength="50" placeholder="请输入部门名称"></el-input>
|
||||
<el-input v-model="searchForm.longName" maxlength="50" placeholder="请输入部门名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xl="8" :lg="8">
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- v-model="searchForm.uname"-->
|
||||
<!-- placeholder="根据姓名查询"-->
|
||||
<!-- clearable></el-input>-->
|
||||
<el-input :placeholder="'请输入部门编码'" v-model="searchForm.orgCode"/>
|
||||
<el-input :placeholder="'请输入部门编码'" v-model="searchForm.departmentCode"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xl="8" :lg="24">
|
||||
@@ -71,7 +71,7 @@
|
||||
<el-table-column v-if="maxSelected && maxSelected == 1" label="" width="35" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-radio class="tableRadio" v-model="tableChecked" @change="radioChange(scope.row)"
|
||||
:label="scope.row.orgCode">{{ null }}
|
||||
:label="scope.row.id">{{ null }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -85,18 +85,18 @@
|
||||
<!-- v-if="workNumFlag"-->
|
||||
<el-table-column
|
||||
label="部门名称"
|
||||
prop="orgName"
|
||||
prop="longName"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="部门编码"
|
||||
prop="orgCode"
|
||||
prop="departmentCode"
|
||||
align="center"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orgLevel"
|
||||
prop="leveL"
|
||||
width="120"
|
||||
label="部门级别"
|
||||
align="center"
|
||||
@@ -124,8 +124,8 @@
|
||||
size="medium"
|
||||
closable
|
||||
v-for="item in checkedList"
|
||||
:key="item.usid || item.USID || item.id || item.orgCode"
|
||||
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name || item.orgName}}
|
||||
:key="item.usid || item.USID || item.id "
|
||||
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name || item.longName}}
|
||||
</el-tag>
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -489,7 +489,7 @@ export default {
|
||||
visibleOrgClearBtn: false,
|
||||
searchForm: {
|
||||
orgId: '',
|
||||
orgName: '',
|
||||
longName: '',
|
||||
USNAME: '',
|
||||
uname: '',
|
||||
roleName: '',
|
||||
@@ -541,7 +541,7 @@ export default {
|
||||
handleClose () {
|
||||
this.searchForm = {
|
||||
orgId: '',
|
||||
orgName: '',
|
||||
longName: '',
|
||||
USNAME: '',
|
||||
uname: '',
|
||||
roleId: '',
|
||||
@@ -570,12 +570,12 @@ export default {
|
||||
if (chkItem.uname) {
|
||||
chkItem.uname = chkItem.uname + '_' + chkItem.account
|
||||
chkItem.USNAME = chkItem.USNAME + '_' + chkItem.account
|
||||
chkItem.orgName = chkItem.departmentName ? chkItem.departmentName : chkItem.orgName
|
||||
chkItem.longName = chkItem.departmentName ? chkItem.departmentName : chkItem.longName
|
||||
} else if (!chkItem.uname && chkItem.USNAME) {
|
||||
chkItem.uname = chkItem.USNAME
|
||||
chkItem.USNAME = chkItem.USNAME
|
||||
}else{
|
||||
chkItem.orgName = chkItem.orgName
|
||||
chkItem.longName = chkItem.longName
|
||||
}
|
||||
})
|
||||
this.$emit('confirm', this.checkedList, checkedIdList)
|
||||
@@ -593,8 +593,8 @@ export default {
|
||||
this.$message.warning(`${this.config.attrName} 只能选择一个用户`)
|
||||
} else {
|
||||
const dataItem = this.checkedList[0]
|
||||
this.checkedName = dataItem.uname || dataItem.USNAME || dataItem.orgName
|
||||
const id = dataItem.id || dataItem.USID || dataItem.usid || dataItem.orgCode
|
||||
this.checkedName = dataItem.uname || dataItem.USNAME || dataItem.longName
|
||||
const id = dataItem.id || dataItem.USID || dataItem.usid || dataItem.id
|
||||
this.$emit('input', id)
|
||||
this.$emit('on-checked', this.checkedName)
|
||||
this.$emit('on-dept', dataItem.pOrgId, dataItem.pOrgName)
|
||||
@@ -626,7 +626,7 @@ export default {
|
||||
this.page = 1
|
||||
this.searchForm = {
|
||||
orgId: '',
|
||||
orgName: '',
|
||||
longName: '',
|
||||
USNAME: '',
|
||||
uname: '',
|
||||
account: '',
|
||||
@@ -637,7 +637,7 @@ export default {
|
||||
|
||||
handleSearchOrgChecked (treeId, treeNode) {
|
||||
this.searchForm.orgId = treeNode.id
|
||||
this.searchForm.orgName = treeNode.oldname || treeNode.name
|
||||
this.searchForm.longName = treeNode.oldname || treeNode.name
|
||||
$('#orgInput').click()
|
||||
},
|
||||
|
||||
@@ -651,7 +651,7 @@ export default {
|
||||
res => {
|
||||
if (res.ok) {
|
||||
res.data.map(item => {
|
||||
item.name = item.orgName
|
||||
item.name = item.longName
|
||||
// item.icon = 'static/images/dept.png'
|
||||
})
|
||||
this.orgZNodes = res.data
|
||||
@@ -744,7 +744,7 @@ export default {
|
||||
const selected = selection.length && selection.indexOf(row) !== -1 // 为true时选中,为 0 时(false)未选中
|
||||
if (selected) {
|
||||
selection.map(selItem => {
|
||||
const id = selItem.USID || selItem.orgCode
|
||||
const id = selItem.USID || selItem.id
|
||||
if (!this.checkedIdList.includes(id)) {
|
||||
this.checkedIdList.push(id)
|
||||
this.checkedList.push(row)
|
||||
@@ -757,7 +757,7 @@ export default {
|
||||
selectionRowAll (selection) {
|
||||
if (selection.length > 0) {
|
||||
selection.map(selItem => {
|
||||
const id = selItem.USID || selItem.orgCode
|
||||
const id = selItem.USID || selItem.id
|
||||
if (!this.checkedIdList.includes(id)) {
|
||||
this.checkedIdList.push(id)
|
||||
this.checkedList.push(selItem)
|
||||
@@ -809,7 +809,7 @@ export default {
|
||||
|
||||
handleOrgDel () {
|
||||
this.searchForm.orgId = ''
|
||||
this.searchForm.orgName = ''
|
||||
this.searchForm.longName = ''
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -826,7 +826,7 @@ export default {
|
||||
if (this.tableData[i].USID == row.USID && !this.isOrg) {
|
||||
// console.log(this.tableData[i], '666')
|
||||
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i])
|
||||
}else if (this.tableData[i].orgCode == row.orgCode&& this.isOrg){
|
||||
}else if (this.tableData[i].id == row.id&& this.isOrg){
|
||||
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i])
|
||||
|
||||
}
|
||||
@@ -865,7 +865,7 @@ export default {
|
||||
},
|
||||
|
||||
handleMouseEnter () {
|
||||
if (this.searchForm.orgName !== '') {
|
||||
if (this.searchForm.longName !== '') {
|
||||
this.visibleOrgClearBtn = true
|
||||
}
|
||||
},
|
||||
@@ -945,8 +945,8 @@ export default {
|
||||
if(this.isOrg){
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
orgCode:id,
|
||||
orgName:nameList[index]
|
||||
id:id,
|
||||
longName:nameList[index]
|
||||
})
|
||||
})
|
||||
}else{
|
||||
@@ -968,10 +968,10 @@ export default {
|
||||
}
|
||||
if (this.searchVal && this.searchVal.type == 'qcrbm') {
|
||||
this.searchForm.orgId = this.searchVal.OrgId
|
||||
this.searchForm.orgName = this.searchVal.orgName
|
||||
this.searchForm.longName = this.searchVal.longName
|
||||
} else {
|
||||
this.searchForm.orgId = ''
|
||||
this.searchForm.orgName = ''
|
||||
this.searchForm.longName = ''
|
||||
}
|
||||
this.getRoleAndUserByOrgIdPage()
|
||||
}
|
||||
@@ -996,8 +996,8 @@ export default {
|
||||
if (this.config.value !== '') {
|
||||
if(this.isOrg){
|
||||
this.checkedList = [{
|
||||
orgCode: this.config.value,
|
||||
orgName: this.config.valueName
|
||||
id: this.config.value,
|
||||
longName: this.config.valueName
|
||||
}]
|
||||
}else{
|
||||
this.checkedList = [{
|
||||
@@ -1017,8 +1017,8 @@ export default {
|
||||
if(this.isOrg){
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
orgCode: id,
|
||||
orgName: nameList[index]
|
||||
id: id,
|
||||
longName: nameList[index]
|
||||
})
|
||||
})
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user