若干bug修改

pull/10/head
liujun 2024-01-22 14:39:38 +08:00
parent cdf082b956
commit bc89c09958
2 changed files with 45 additions and 16 deletions

View File

@ -42,7 +42,7 @@
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button>
<el-button type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])"></el-button> <el-button v-if="row.power_flag === '1'" type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])"></el-button>
<el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)"></el-button> <el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<el-dialog v-loading = "loading" :visible.sync="visible" :append-to-body="appendToBody" :before-close="beforeClose" title="审批" width="1200px" destroy-on-close> <el-dialog v-loading = "loading" :visible.sync="visible" :append-to-body="appendToBody" :before-close="beforeClose" title="审批" width="1200px" destroy-on-close>
<el-form label-width="200px" label-position="right" type="flex"> <el-form ref="form" :model="form" :rules="rules" label-width="200px" label-position="right" type="flex">
<el-row :gutter="12"> <el-row :gutter="12">
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="TERRITORIALITY" label="是否通过: "> <el-form-item prop="STATUS" label="是否通过: ">
<el-select v-model="form.STATUS" style="width: 300px" placeholder="请选择"> <el-select v-model="form.STATUS" style="width: 300px" placeholder="请选择">
<el-option label="是" value="1"/> <el-option label="是" value="1"/>
<el-option label="否" value="0"/> <el-option label="否" value="0"/>
@ -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 prop="TERRITORIALITY" label="指定监管部门:"> <el-form-item v-if="form.STATUS === '1'" prop="APPOINT_DEPARTMENT_ID" label="指定监管部门:">
<Treeselect <Treeselect
:options="departmentTree" :options="departmentTree"
:normalizer="normalizer" :normalizer="normalizer"
@ -27,8 +27,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col v-if="form.STATUS === '0'" :span="12">
<el-form-item prop="TERRITORIALITY" label="指定监管部门审批人:"> <el-form-item v-if="form.STATUS === '0'" prop="OPINION" label="打回原因:">
<el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/>
</el-form-item>
</el-col>
<el-col v-if="form.STATUS === '1'" :span="12">
<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"/>
</el-select> </el-select>
@ -39,7 +44,7 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button> <el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="sendMessage()"> </el-button> <el-button type="primary" @click="sendMessage('1')"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -70,10 +75,25 @@ export default {
APPOINT_DEPARTMENT_NAME: '', APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: null, APPOINT_USER_ID: null,
APPOINT_USER_NAME: '', APPOINT_USER_NAME: '',
OPINION: '',
user: '', user: '',
tm: new Date().getTime(), tm: new Date().getTime(),
list: [] list: []
}, },
rules: {
STATUS: [
{ required: true, message: '请选择是否通过', trigger: 'change' }
],
APPOINT_DEPARTMENT_ID: [
{ required: true, message: '请选择指定监管部门', trigger: 'change' }
],
APPOINT_USER_ID: [
{ required: true, message: '请选择指定监管部门审批人', trigger: 'change' }
],
OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' }
]
},
heirloom: {}, heirloom: {},
normalizer(node) { normalizer(node) {
@ -98,13 +118,22 @@ export default {
await this.getDepartmentTree() await this.getDepartmentTree()
this.loading = false this.loading = false
}, },
sendMessage() { sendMessage(e) {
requestFN('/xgf/user/approve', this.form) this.$refs.form.validate((valid) => {
.then((data) => { if (!valid) {
this.$message.success('推送成功') this.$message.error('请填写完整信息')
this.visible = false } else {
this.$emit('refresh', '') requestFN('/xgf/user/approve', this.form)
}) .then((data) => {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
})
.catch((e) => {
console.log(e)
})
}
})
}, },
getDepartmentTree() { getDepartmentTree() {
return new Promise(resolve => { return new Promise(resolve => {
@ -140,7 +169,7 @@ export default {
handleClose() { handleClose() {
this.form = { this.form = {
STATUS: '', STATUS: '',
APPOINT_DEPARTMENT_ID: '', APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '', APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '', APPOINT_USER_ID: '',
APPOINT_USER_NAME: '', APPOINT_USER_NAME: '',
@ -154,7 +183,7 @@ export default {
this.visible = false this.visible = false
this.form = { this.form = {
STATUS: '', STATUS: '',
APPOINT_DEPARTMENT_ID: '', APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '', APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '', APPOINT_USER_ID: '',
APPOINT_USER_NAME: '', APPOINT_USER_NAME: '',