若干bug修改

pull/10/head
liujun 2024-01-22 15:23:02 +08:00
parent bc89c09958
commit b8331f9ad7
1 changed files with 53 additions and 15 deletions

View File

@ -12,7 +12,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item v-if="form.STATUS === '1'" prop="APPOINT_DEPARTMENT_ID" label="指定监管部门:"> <el-form-item v-if="form.STATUS === '1' && isShow" prop="APPOINT_DEPARTMENT_ID" label="指定监管部门:">
<Treeselect <Treeselect
:options="departmentTree" :options="departmentTree"
:normalizer="normalizer" :normalizer="normalizer"
@ -32,7 +32,7 @@
<el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/> <el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.STATUS === '1'" :span="12"> <el-col v-if="form.STATUS === '1' && isShow" :span="12">
<el-form-item v-if="form.STATUS === '1'" prop="APPOINT_USER_ID" label="指定监管部门审批人:"> <el-form-item v-if="form.STATUS === '1'" prop="APPOINT_USER_ID" label="指定监管部门审批人:">
<el-select v-model="form.user" style="width: 300px" placeholder="请选择" @change="chooseUser"> <el-select v-model="form.user" style="width: 300px" placeholder="请选择" @change="chooseUser">
<el-option v-for="item in peopleList" :key="item.USER_ID" :value="JSON.stringify(item)" :label="item.NAME"/> <el-option v-for="item in peopleList" :key="item.USER_ID" :value="JSON.stringify(item)" :label="item.NAME"/>
@ -78,7 +78,9 @@ export default {
OPINION: '', OPINION: '',
user: '', user: '',
tm: new Date().getTime(), tm: new Date().getTime(),
list: [] list: [],
isShow: true,
info: {}
}, },
rules: { rules: {
STATUS: [ STATUS: [
@ -110,12 +112,23 @@ export default {
}, },
methods: { methods: {
async init(e) { async init(e) {
console.log(JSON.parse(sessionStorage.getItem('user'))) console.log(e)
this.loading = true this.loading = true
this.visible = true this.visible = true
this.heirloom = JSON.stringify(e) this.heirloom = JSON.stringify(e)
this.form.list = JSON.stringify(e) this.form.list = JSON.stringify(e)
await this.getDepartmentTree() this.info = e[0]
if (this.info.FLOWS_TYPE === '0') {
if (this.info.FLOWS_STEP === 0) {
this.isShow = true
await this.getDepartmentTree()
} else {
this.isShow = false
}
} else {
this.isShow = true
await this.getCorpDepartmentTree()
}
this.loading = false this.loading = false
}, },
sendMessage(e) { sendMessage(e) {
@ -147,18 +160,43 @@ export default {
}) })
}) })
}, },
getCorpDepartmentTree() {
return new Promise(resolve => {
requestFN(
'/openApi/corpDepartment/listTree',
{}
).then((data) => {
this.departmentTree = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
resolve(true)
}).catch((e) => {
})
})
},
getPeopleList(e) { getPeopleList(e) {
this.form.APPOINT_DEPARTMENT_NAME = e.name this.form.APPOINT_DEPARTMENT_NAME = e.name
requestFN( if (this.info.FLOWS_TYPE === '0') {
'/user/listAll', requestFN(
{ '/user/listAll',
DEPARTMENT_ID: e.id {
} DEPARTMENT_ID: e.id
).then((data) => { }
this.peopleList = data.userList ).then((data) => {
}).catch((e) => { this.peopleList = data.userList
console.log(e) }).catch((e) => {
}) console.log(e)
})
} else {
requestFN(
'/user/listAllManageAndCorp',
{
DEPARTMENT_ID: e.id
}
).then((data) => {
this.peopleList = data.userList
}).catch((e) => {
console.log(e)
})
}
}, },
chooseUser(e) { chooseUser(e) {
const entity = JSON.parse(e) const entity = JSON.parse(e)