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

View File

@ -408,9 +408,15 @@ export default {
{
PROMISE_ID: this.$parent.PROMISE_ID
}
).then((data) => {
).then(async(data) => {
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
for (let i = 0; i < data.people.length; i++) {
this.form.people.push({
@ -426,15 +432,15 @@ export default {
for (let j = 0; j < this.form.people.length; j++) {
if (this.form.DISTRIBUTIONOBJECT === '1') {
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.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 {
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.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++) {
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.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) {
if (type !== 'created') {
let flag = false
for (let i = 0; i < this.form[list].length; i++) {
if (this.form[list][i].POST_ID === POST_ID) {
flag = true
break
return new Promise((resolve) => {
if (type !== 'created') {
let flag = false
for (let i = 0; i < this.form[list].length; i++) {
if (this.form[list][i].POST_ID === POST_ID) {
flag = true
break
}
}
if (flag) {
this.$message.warning('不能选择相同的岗位')
return
} else {
this.form[list][index].POST_ID = POST_ID
}
}
if (flag) {
this.$message.warning('不能选择相同的岗位')
return
} else {
this.form[list][index].POST_ID = POST_ID
}
}
requestFN(
'/corppromise/userlistAll',
{
DEPARTMENT_ID,
POST_ID
}
).then((data) => {
this.form[list][index].userList = data.userList
if (type !== 'created') {
this.form[list][index].USER_ID = ''
}
}).catch((e) => {
requestFN(
'/corppromise/userlistAll',
{
DEPARTMENT_ID,
POST_ID
}
).then((data) => {
this.form[list][index].userList = data.userList
if (type !== 'created') {
this.form[list][index].USER_ID = ''
}
resolve()
}).catch((e) => {
})
})
},
//
getUserList1({ id: DEPARTMENT_ID }, index, type, list) {
if (type !== 'created') {
let flag = false
for (let i = 0; i < this.form[list].length; i++) {
if (this.form[list][i].DEPARTMENT_ID === DEPARTMENT_ID) {
flag = true
break
return new Promise((resolve) => {
if (type !== 'created') {
let flag = false
for (let i = 0; i < this.form[list].length; i++) {
if (this.form[list][i].DEPARTMENT_ID === DEPARTMENT_ID) {
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) {
this.$message.warning('不能选择相同的部门')
this.$refs.Treeselect[index].clear()
return
} else {
this.form[list][index].DEPARTMENT_ID = DEPARTMENT_ID
}
}
requestFN(
'/user/listAll',
{
DEPARTMENT_ID
}
).then((data) => {
this.form[list][index].userList = data.userList
if (type !== 'created') {
this.form[list][index].USER_ID = ''
}
}).catch((e) => {
requestFN(
'/user/listAll',
{
DEPARTMENT_ID
}
).then((data) => {
this.form[list][index].userList = data.userList
if (type !== 'created') {
this.form[list][index].USER_ID = ''
}
resolve()
}).catch((e) => {
})
})
},
addPeople() {

View File

@ -23,7 +23,8 @@
<td>{{ form.PROMISE_TERM_END }}</td>
</tr>
</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">
<tr v-for="(item,index) in form.people" :key="item.id">
<td v-if="form.RELEASE_PLATFORM === '1'" class="bbg">{{ '' + (index + 1) }}</td>
@ -36,7 +37,8 @@
<td>{{ item.USERNAME && item.USERNAME.join('、') }}</td>
</tr>
</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">
<tr v-for="(item,index) in form.coverpeople" :key="item.id">
<td class="bbg">{{ '部门' + (index + 1) }}</td>
@ -45,7 +47,8 @@
<td>{{ item.USERNAME && item.USERNAME.join('、') }}</td>
</tr>
</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">
<tr>
<td class="bbg">正文</td>