parent
4a314fc646
commit
6304bcfceb
|
@ -37,6 +37,7 @@
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="zhenggaiupload"
|
ref="zhenggaiupload"
|
||||||
:class="{hide:hideUpload}"
|
:class="{hide:hideUpload}"
|
||||||
|
:file-list="rectify_files"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-change="handleChangeIMG"
|
:on-change="handleChangeIMG"
|
||||||
:limit="4"
|
:limit="4"
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
<img :src="dialogImageUrl" width="100%" alt="">
|
<img :src="dialogImageUrl" width="100%" alt="">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
||||||
<div v-if="pd.ISCONFIRM=='0'">
|
<div v-if="pd.ISCONFIRM=='0'">
|
||||||
<div class="form-flex">
|
<div class="form-flex">
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
|
@ -199,6 +201,7 @@ export default {
|
||||||
dialogImageVisible: false, // 放大照片的显示和隐藏
|
dialogImageVisible: false, // 放大照片的显示和隐藏
|
||||||
dialogImageUrl: '', // 照片的地址
|
dialogImageUrl: '', // 照片的地址
|
||||||
scheme_files: [], // 整改方案图片
|
scheme_files: [], // 整改方案图片
|
||||||
|
temporaryFilePath: '',
|
||||||
formRule: {
|
formRule: {
|
||||||
RECTIFICATIONDEPT: [{ required: true, message: '请选择整改部门', trigger: 'blur' }],
|
RECTIFICATIONDEPT: [{ required: true, message: '请选择整改部门', trigger: 'blur' }],
|
||||||
RECTIFICATIONOR: [{ required: true, message: '请选择整改人', trigger: 'blur' }],
|
RECTIFICATIONOR: [{ required: true, message: '请选择整改人', trigger: 'blur' }],
|
||||||
|
@ -603,6 +606,7 @@ export default {
|
||||||
}
|
}
|
||||||
todata.append('FOREIGN_KEY', this.HIDDEN_ID)
|
todata.append('FOREIGN_KEY', this.HIDDEN_ID)
|
||||||
todata.append('TYPE', 8)
|
todata.append('TYPE', 8)
|
||||||
|
todata.append('temporaryFilePath', this.temporaryFilePath)
|
||||||
upload(
|
upload(
|
||||||
'/imgfiles/add',
|
'/imgfiles/add',
|
||||||
todata
|
todata
|
||||||
|
@ -684,6 +688,39 @@ export default {
|
||||||
this.scheme_files.push(file)
|
this.scheme_files.push(file)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
submitUpload() {
|
||||||
|
var _this = this
|
||||||
|
this.$refs.zhenggaiupload.submit()
|
||||||
|
var todata = new FormData()
|
||||||
|
for (var i = 0; i < _this.rectify_files.length; i++) {
|
||||||
|
if (_this.rectify_files[i]) {
|
||||||
|
todata.append('FFILE', _this.rectify_files[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(todata)
|
||||||
|
upload(
|
||||||
|
'/mfolder/upLoadTemporary',
|
||||||
|
todata
|
||||||
|
).then((data) => {
|
||||||
|
if (data.result == 'success') {
|
||||||
|
this.$message({
|
||||||
|
message: '保存成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
this.temporaryFilePath = data.temporaryFilePath
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.exception,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$parent.activeName = 'List'
|
this.$parent.activeName = 'List'
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,20 +27,23 @@
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="企业监督部门" class="is-required" prop="DEPARTMENT_ID">
|
<el-form-item label="企业监督部门" class="is-required" prop="DEPARTMENT_ID">
|
||||||
<Treeselect
|
<Treeselect
|
||||||
|
v-if="updateSuperviseValue"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
:flat="true"
|
:flat="true"
|
||||||
:default-expand-level="1"
|
:default-expand-level="1"
|
||||||
:options="treeDataDept"
|
:options="treeDataDept"
|
||||||
:normalizer="normalizer2"
|
:normalizer="normalizer"
|
||||||
v-model="form.DEPARTMENT_ID"
|
v-model="form.DEPARTMENT_ID"
|
||||||
placeholder="请选择部门"
|
placeholder="请选择部门"
|
||||||
no-options-text="暂无数据"
|
no-options-text="暂无数据"
|
||||||
no-children-text="暂无数据"
|
no-children-text="暂无数据"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
@select="handleSuperviseSelect"
|
||||||
|
@deselect="handleSuperviseRemove"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="COMPETENT_DEPT_ID" label="企业主管部门:">
|
<el-form-item prop="COMPETENT_DEPT_ID" label="企业主管部门:">
|
||||||
<SelectTree
|
<SelectTree
|
||||||
|
@ -261,6 +264,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
updateValue: true,
|
updateValue: true,
|
||||||
|
updateSuperviseValue: true,
|
||||||
selectUsers: [], // 防止报错,参数无用
|
selectUsers: [], // 防止报错,参数无用
|
||||||
chooseUserList: [],
|
chooseUserList: [],
|
||||||
punishThePerson: [],
|
punishThePerson: [],
|
||||||
|
@ -1205,8 +1209,51 @@ export default {
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
pullSelectedSuperviseNodes(selectedItems) {
|
||||||
|
if (selectedItems.nodes && selectedItems.nodes.length > 0) {
|
||||||
|
for (let i = 0; i < selectedItems.nodes.length; i++) {
|
||||||
|
if (!this.form.DEPARTMENT_ID.includes(selectedItems.nodes[i].id)) {
|
||||||
|
this.form.DEPARTMENT_ID.push(selectedItems.nodes[i].id)
|
||||||
|
}
|
||||||
|
this.pullSelectedSuperviseNodes(selectedItems.nodes[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('this.form.DEPARTMENT_ID====' + this.form.DEPARTMENT_ID)
|
||||||
|
},
|
||||||
|
handleSuperviseSelect(selectedItems) {
|
||||||
|
// 选择父节点时同时勾选全部子节点
|
||||||
|
if (!this.form.DEPARTMENT_ID.includes(selectedItems.id)) {
|
||||||
|
this.form.DEPARTMENT_ID.push(selectedItems.id)
|
||||||
|
}
|
||||||
|
this.pullSelectedSuperviseNodes(selectedItems)
|
||||||
|
this.onClickSupervise()
|
||||||
|
console.log('this.form.DEPARTMENT_ID==2==' + this.form.DEPARTMENT_ID)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 将选中项的子节点全部移除
|
||||||
|
removeSuperviseSelectedNodes(selectedItems) {
|
||||||
|
if (selectedItems.nodes && selectedItems.nodes.length > 0) {
|
||||||
|
for (let i = 0; i < selectedItems.nodes.length; i++) {
|
||||||
|
if (this.form.DEPARTMENT_ID.includes(selectedItems.nodes[i].id)) {
|
||||||
|
this.form.DEPARTMENT_ID.splice(this.form.DEPARTMENT_ID.indexOf(selectedItems.nodes[i].id), 1)
|
||||||
|
}
|
||||||
|
this.removeSuperviseSelectedNodes(selectedItems.nodes[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 移除选中项时触发的事件
|
||||||
|
handleSuperviseRemove(selectedItems) {
|
||||||
|
// 移除选中项时同时移除全部子节点
|
||||||
|
if (this.form.DEPARTMENT_ID.includes(selectedItems.id)) {
|
||||||
|
this.form.DEPARTMENT_ID.splice(this.form.DEPARTMENT_ID.indexOf(selectedItems.id), 1)
|
||||||
|
}
|
||||||
|
this.removeSuperviseSelectedNodes(selectedItems)
|
||||||
|
this.onClickSupervise()
|
||||||
|
},
|
||||||
|
|
||||||
// 将树节点的子节点全部添加到数组中
|
// 将树节点的子节点全部添加到数组中
|
||||||
pullSelectedNodes(selectedItems) {
|
pullSelectedNodes(selectedItems) {
|
||||||
|
console.log(selectedItems)
|
||||||
if (selectedItems.nodes && selectedItems.nodes.length > 0) {
|
if (selectedItems.nodes && selectedItems.nodes.length > 0) {
|
||||||
for (let i = 0; i < selectedItems.nodes.length; i++) {
|
for (let i = 0; i < selectedItems.nodes.length; i++) {
|
||||||
if (!this.form.INVOLVING_CORPS_DEPART_ID.includes(selectedItems.nodes[i].id)) {
|
if (!this.form.INVOLVING_CORPS_DEPART_ID.includes(selectedItems.nodes[i].id)) {
|
||||||
|
@ -1215,6 +1262,7 @@ export default {
|
||||||
this.pullSelectedNodes(selectedItems.nodes[i])
|
this.pullSelectedNodes(selectedItems.nodes[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.info('this.form.INVOLVING_CORPS_DEPART_ID========' + this.form.INVOLVING_CORPS_DEPART_ID)
|
||||||
},
|
},
|
||||||
// 选择项时触发的事件
|
// 选择项时触发的事件
|
||||||
handleSelect(selectedItems) {
|
handleSelect(selectedItems) {
|
||||||
|
@ -1250,6 +1298,12 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.updateValue = true
|
this.updateValue = true
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
onClickSupervise() {
|
||||||
|
this.updateSuperviseValue = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.updateSuperviseValue = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -595,7 +595,7 @@ export default {
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
requestFN(
|
requestFN(
|
||||||
'/safetyenvironmental/V2/finalcheck',
|
'/safetyenvironmental/finalcheck',
|
||||||
{
|
{
|
||||||
HIDDEN_ID: this.HIDDEN_ID,
|
HIDDEN_ID: this.HIDDEN_ID,
|
||||||
FINAL_CHECKDESCR: this.form.FINAL_CHECKDESCR,
|
FINAL_CHECKDESCR: this.form.FINAL_CHECKDESCR,
|
||||||
|
|
|
@ -330,7 +330,7 @@ export default {
|
||||||
hiddenCount(INSPECTION_ID) {
|
hiddenCount(INSPECTION_ID) {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
requestFN(
|
requestFN(
|
||||||
'/safetyenvironmental/V2/hiddencount',
|
'/safetyenvironmental/hiddencount',
|
||||||
{
|
{
|
||||||
INSPECTION_ID: INSPECTION_ID
|
INSPECTION_ID: INSPECTION_ID
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,7 @@ export default {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
requestFN(
|
requestFN(
|
||||||
'/safetyenvironmental/V2/hide',
|
'/safetyenvironmental/hide',
|
||||||
{
|
{
|
||||||
INSPECTION_ID: id,
|
INSPECTION_ID: id,
|
||||||
hide: '1'
|
hide: '1'
|
||||||
|
|
Loading…
Reference in New Issue