监管端bug修复:13754、13714

2024年1月24日测试
limingyu 2024-01-31 10:30:24 +08:00
parent e71ba80f39
commit ca1d5df750
3 changed files with 172 additions and 134 deletions

View File

@ -2,78 +2,93 @@
<div class="app-container"> <div class="app-container">
<el-form label-width="100px"> <el-form label-width="100px">
<el-row> <el-row>
<el-col :span="4"> <el-row>
<el-form-item label="隐患来源"> <el-col :span="4">
<el-select v-model="form.SOURCE" placeholder="隐患来源" clearable style="width: 100%"> <el-form-item label="隐患来源">
<el-option :value="1" label="隐患快报"/> <el-select v-model="form.SOURCE" placeholder="隐患来源" clearable style="width: 100%">
<el-option :value="2" label="清单排查"/> <el-option :value="1" label="隐患快报"/>
<el-option :value="4" label="安全环保检查(监管端)"/> <el-option :value="2" label="清单排查"/>
<el-option :value="5" label="安全环保检查(企业端)"/> <el-option :value="4" label="安全环保检查(监管端)"/>
</el-select> <el-option :value="5" label="安全环保检查(企业端)"/>
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="4"> </el-col>
<el-form-item label="隐患描述"> <el-col :span="4">
<el-input v-model="form.HIDDENDESCR"/> <el-form-item label="隐患描述">
</el-form-item> <el-input v-model="form.HIDDENDESCR"/>
</el-col> </el-form-item>
<el-col :span="4"> </el-col>
<el-form-item label="隐患发现人"> <el-col :span="4">
<el-input v-model="form.HIDDENFIND_NAME"/> <el-form-item label="隐患发现人">
</el-form-item> <el-input v-model="form.HIDDENFIND_NAME"/>
</el-col> </el-form-item>
<el-col :span="4"> </el-col>
<el-form-item label="隐患部位"> <el-col :span="4">
<SelectTree <el-form-item label="隐患部位">
ref="deptTree_Select" <SelectTree
:clearable="false" ref="deptTree_Select"
:options="hiddenPartList" :clearable="false"
:props="defaultProps" :options="hiddenPartList"
v-model="form.HIDDENPART" :props="defaultProps"
style="width: 100%;" v-model="form.HIDDENPART"
placeholder="请选择" /> style="width: 100%;"
</el-form-item> placeholder="请选择" />
</el-col> </el-form-item>
<el-col :span="4"> </el-col>
<el-form-item label="隐患级别"> <el-col :span="4">
<el-select v-model="form.HIDDENLEVEL" placeholder="请选择" style="width: 100%;"> <el-form-item label="隐患级别">
<el-option <el-select v-model="form.HIDDENLEVEL" placeholder="请选择" style="width: 100%;">
v-for="item in hiddenlevelList" <el-option
:key="item.value" v-for="item in hiddenlevelList"
:label="item.label" :key="item.value"
:value="item.value" :label="item.label"
/> :value="item.value"
</el-select> />
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="4"> </el-col>
<el-form-item label="隐患状态"> </el-row>
<el-select v-model="form.HIDDEN_STATUS" placeholder="隐患状态" clearable style="width: 100%"> <el-row>
<el-option :value="1" label="未整改"/> <el-col :span="4">
<el-option :value="2" label="已整改"/> <el-form-item label="隐患状态">
<el-option :value="4" label="已验收"/> <el-select v-model="form.HIDDEN_STATUS" placeholder="隐患状态" clearable style="width: 100%">
<el-option :value="-1" label="已过期"/> <el-option :value="1" label="未整改"/>
<el-option :value="-2" label="待确认"/> <el-option :value="2" label="已整改"/>
<el-option :value="16" label="确认打回"/> <el-option :value="4" label="已验收"/>
<el-option :value="10" label="验收打回"/> <el-option :value="-1" label="已过期"/>
</el-select> <el-option :value="-2" label="待确认"/>
</el-form-item> <el-option :value="16" label="确认打回"/>
</el-col> <el-option :value="10" label="验收打回"/>
<el-col :span="4"> </el-select>
<el-form-item label="确认人"> </el-form-item>
<el-input v-model="form.CONFIRM_USER"/> </el-col>
</el-form-item> <el-col :span="4">
</el-col> <el-form-item label="确认人">
<el-col :span="4"> <el-input v-model="form.CONFIRM_USER"/>
<el-form-item label="整改负责人"> </el-form-item>
<el-input v-model="form.RECTIFICATION_USER"/> </el-col>
</el-form-item> <el-col :span="4">
</el-col> <el-form-item label="隐患类型" prop="HIDDENTYPE">
<el-col :span="4"> <el-cascader
<el-form-item label="验收人"> ref="deptTree_Select3"
<el-input v-model="form.CHECK_USER"/> :options="hiddenTypeList"
</el-form-item> :props="defaultProps2"
</el-col> v-model="form.HIDDEN_TYPE"
collapse-tags
clearable/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="整改负责人">
<el-input v-model="form.RECTIFICATION_USER"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="验收人">
<el-input v-model="form.CHECK_USER"/>
</el-form-item>
</el-col>
</el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="隐患发现时间"> <el-form-item label="隐患发现时间">
<el-date-picker <el-date-picker
@ -209,7 +224,7 @@ export default {
varList: [], varList: [],
treeData: [], treeData: [],
hiddenPartList: [], hiddenPartList: [],
hiddenTypeList: [], hiddenTypeList: [],//
hiddenlevelList: [ hiddenlevelList: [
{ {
value: 'hiddenLevel1004', value: 'hiddenLevel1004',
@ -230,6 +245,13 @@ export default {
children: 'nodes', children: 'nodes',
label: 'name' label: 'name'
}, },
defaultProps2: {
value: 'id',
children: 'nodes',
label: 'name',
multiple: true,
emitPath: false
},
form: { form: {
SOURCE: undefined, SOURCE: undefined,
HIDDENDESCR: '', HIDDENDESCR: '',
@ -243,6 +265,7 @@ export default {
CONFIRM_USER: '', CONFIRM_USER: '',
HIDDENFIND_NAME: '', HIDDENFIND_NAME: '',
CORPINFO_ID: '', CORPINFO_ID: '',
HIDDEN_TYPE: '',
HIDDEN_STATUS: undefined HIDDEN_STATUS: undefined
} }
} }

View File

@ -408,9 +408,15 @@ export default {
{ {
PROMISE_ID: this.$parent.PROMISE_ID PROMISE_ID: this.$parent.PROMISE_ID
} }
).then((data) => { ).then(async(data) => {
const DETAIL = data.promistDetail.map(item => ({ value: item.COLLATERAL, id: item.PROMISEDETAIL_ID })) const DETAIL = data.promistDetail.map(item => ({ value: item.COLLATERAL, id: item.PROMISEDETAIL_ID }))
this.form = { ...data.varList, DISTRIBUTIONOBJECT: data.varList.RELEASE_PLATFORM, DETAIL, people: [], coverpeople: [] } this.form = {
...data.varList,
DISTRIBUTIONOBJECT: data.varList.RELEASE_PLATFORM,
DETAIL,
people: [],
coverpeople: []
}
this.isSelectTemplate = true this.isSelectTemplate = true
for (let i = 0; i < data.people.length; i++) { for (let i = 0; i < data.people.length; i++) {
this.form.people.push({ this.form.people.push({
@ -426,15 +432,15 @@ export default {
for (let j = 0; j < this.form.people.length; j++) { for (let j = 0; j < this.form.people.length; j++) {
if (this.form.DISTRIBUTIONOBJECT === '1') { if (this.form.DISTRIBUTIONOBJECT === '1') {
if (data.people[i].POST_ID === this.form.people[j].POST_ID) { if (data.people[i].POST_ID === this.form.people[j].POST_ID) {
this.form.people[j].USER_ID.push(data.people[i].USER_ID) this.form.people[j].USER_ID = data.people[i].USER_ID
this.form.people.splice(j + 1, 1) this.form.people.splice(j + 1, 1)
this.getUserList(this.form.people[j].DEPARTMENT_ID, this.form.people[j].POST_ID, j, 'created', 'people') await this.getUserList(this.form.people[j].DEPARTMENT_ID, this.form.people[j].POST_ID, j, 'created', 'people')
} }
} else { } else {
if (data.people[i].DEPARTMENT_ID === this.form.people[j].DEPARTMENT_ID) { if (data.people[i].DEPARTMENT_ID === this.form.people[j].DEPARTMENT_ID) {
this.form.people[j].USER_ID.push(data.people[i].USER_ID) this.form.people[j].USER_ID = data.people[i].USER_ID
this.form.people.splice(j + 1, 1) this.form.people.splice(j + 1, 1)
this.getUserList1({ id: this.form.people[j].DEPARTMENT_ID }, j, 'created', 'people') await this.getUserList1({ id: this.form.people[j].DEPARTMENT_ID }, j, 'created', 'people')
} }
} }
} }
@ -458,9 +464,9 @@ export default {
}) })
for (let j = 0; j < this.form.coverpeople.length; j++) { for (let j = 0; j < this.form.coverpeople.length; j++) {
if (data.coverpeople[i].DEPARTMENT_ID === this.form.coverpeople[j].DEPARTMENT_ID) { if (data.coverpeople[i].DEPARTMENT_ID === this.form.coverpeople[j].DEPARTMENT_ID) {
this.form.coverpeople[j].USER_ID.push(data.coverpeople[i].USER_ID) this.form.coverpeople[j].USER_ID = data.coverpeople[i].USER_ID
this.form.coverpeople.splice(j + 1, 1) this.form.coverpeople.splice(j + 1, 1)
this.getUserList1({ id: this.form.coverpeople[j].DEPARTMENT_ID }, j, 'created', 'coverpeople') await this.getUserList1({ id: this.form.coverpeople[j].DEPARTMENT_ID }, j, 'created', 'coverpeople')
} }
} }
} }
@ -517,64 +523,70 @@ export default {
}, },
// //
getUserList(DEPARTMENT_ID, POST_ID, index, type, list) { getUserList(DEPARTMENT_ID, POST_ID, index, type, list) {
if (type !== 'created') { return new Promise((resolve) => {
let flag = false if (type !== 'created') {
for (let i = 0; i < this.form[list].length; i++) { let flag = false
if (this.form[list][i].POST_ID === POST_ID) { for (let i = 0; i < this.form[list].length; i++) {
flag = true if (this.form[list][i].POST_ID === POST_ID) {
break flag = true
break
}
}
if (flag) {
this.$message.warning('不能选择相同的岗位')
return
} else {
this.form[list][index].POST_ID = POST_ID
} }
} }
if (flag) { requestFN(
this.$message.warning('不能选择相同的岗位') '/corppromise/userlistAll',
return {
} else { DEPARTMENT_ID,
this.form[list][index].POST_ID = POST_ID POST_ID
} }
} ).then((data) => {
requestFN( this.form[list][index].userList = data.userList
'/corppromise/userlistAll', if (type !== 'created') {
{ this.form[list][index].USER_ID = ''
DEPARTMENT_ID, }
POST_ID resolve()
} }).catch((e) => {
).then((data) => { })
this.form[list][index].userList = data.userList
if (type !== 'created') {
this.form[list][index].USER_ID = ''
}
}).catch((e) => {
}) })
}, },
// //
getUserList1({ id: DEPARTMENT_ID }, index, type, list) { getUserList1({ id: DEPARTMENT_ID }, index, type, list) {
if (type !== 'created') { return new Promise((resolve) => {
let flag = false if (type !== 'created') {
for (let i = 0; i < this.form[list].length; i++) { let flag = false
if (this.form[list][i].DEPARTMENT_ID === DEPARTMENT_ID) { for (let i = 0; i < this.form[list].length; i++) {
flag = true if (this.form[list][i].DEPARTMENT_ID === DEPARTMENT_ID) {
break flag = true
break
}
}
if (flag) {
this.$message.warning('不能选择相同的部门')
this.$refs.Treeselect[index].clear()
return
} else {
this.form[list][index].DEPARTMENT_ID = DEPARTMENT_ID
} }
} }
if (flag) { requestFN(
this.$message.warning('不能选择相同的部门') '/user/listAll',
this.$refs.Treeselect[index].clear() {
return DEPARTMENT_ID
} else { }
this.form[list][index].DEPARTMENT_ID = DEPARTMENT_ID ).then((data) => {
} this.form[list][index].userList = data.userList
} if (type !== 'created') {
requestFN( this.form[list][index].USER_ID = ''
'/user/listAll', }
{ resolve()
DEPARTMENT_ID }).catch((e) => {
} })
).then((data) => {
this.form[list][index].userList = data.userList
if (type !== 'created') {
this.form[list][index].USER_ID = ''
}
}).catch((e) => {
}) })
}, },
addPeople() { addPeople() {

View File

@ -23,7 +23,8 @@
<td>{{ form.PROMISE_TERM_END }}</td> <td>{{ form.PROMISE_TERM_END }}</td>
</tr> </tr>
</table> </table>
<el-divider content-position="left">承诺人</el-divider> <el-divider v-if="form.TYPE != '1'" content-position="left"></el-divider>
<el-divider v-if="form.TYPE == '1'" content-position="left"></el-divider>
<table class="table-ui"> <table class="table-ui">
<tr v-for="(item,index) in form.people" :key="item.id"> <tr v-for="(item,index) in form.people" :key="item.id">
<td v-if="form.RELEASE_PLATFORM === '1'" class="bbg">{{ '' + (index + 1) }}</td> <td v-if="form.RELEASE_PLATFORM === '1'" class="bbg">{{ '' + (index + 1) }}</td>
@ -36,7 +37,8 @@
<td>{{ item.USERNAME && item.USERNAME.join('、') }}</td> <td>{{ item.USERNAME && item.USERNAME.join('、') }}</td>
</tr> </tr>
</table> </table>
<el-divider content-position="left">被承诺人</el-divider> <el-divider v-if="form.TYPE != '1'" content-position="left"></el-divider>
<el-divider v-if="form.TYPE == '1'" content-position="left"></el-divider>
<table class="table-ui"> <table class="table-ui">
<tr v-for="(item,index) in form.coverpeople" :key="item.id"> <tr v-for="(item,index) in form.coverpeople" :key="item.id">
<td class="bbg">{{ '部门' + (index + 1) }}</td> <td class="bbg">{{ '部门' + (index + 1) }}</td>
@ -45,7 +47,8 @@
<td>{{ item.USERNAME && item.USERNAME.join('、') }}</td> <td>{{ item.USERNAME && item.USERNAME.join('、') }}</td>
</tr> </tr>
</table> </table>
<el-divider content-position="left">承诺内容</el-divider> <el-divider v-if="form.TYPE != '1'" content-position="left"></el-divider>
<el-divider v-if="form.TYPE == '1'" content-position="left"></el-divider>
<table class="table-ui"> <table class="table-ui">
<tr> <tr>
<td class="bbg">正文</td> <td class="bbg">正文</td>