添加 消防检查记录打回功能

dev-shanao
shanao 2024-11-06 14:59:48 +08:00
parent ca9ae7aa8b
commit e558432295
1 changed files with 55 additions and 1 deletions

View File

@ -77,6 +77,7 @@
<th>检查情况</th>
<th>点位检查照片</th>
<!-- <th>点位合格照片</th>-->
<th>操作</th>
</tr>
<template v-if="varList.length !== 0">
<tr v-for="(data,index) in varList" :key="index">
@ -108,6 +109,10 @@
<a style="text-decoration: underline" @click="qualified(data.EQUIPMENT_POINT_ID,14)"></a>
</td>
</template>
<template>
<td v-if="data.ISCHECKED !== 2" class="text-center" ><a style="text-decoration: underline" @click="hitBackFunction(data.EQUIPMENT_RECORD_ID)"></a></td>
<td v-else class="text-center" >已打回</td>
</template>
<!-- <template>-->
<!-- <td v-if="data.INDEX_F == '1'" :rowspan="data.ROWSPAN" class="text-center">-->
<!-- <a style="text-decoration: underline" @click="qualified(data.QUALIFIED_PHOTOS_ID,115)"></a>-->
@ -201,6 +206,18 @@
<el-button @click="dialogImgVisible = false"> </el-button>
</div>
</el-dialog>
<!-- 打回 -->
<el-dialog :visible.sync="hitBack" title="打回" width="80%">
<el-form>
<el-form-item label="说明" >
<el-input v-model="hitBackReason" autocomplete="off"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="hitBack = false"> </el-button>
<el-button type="primary" @click="hitBackOK"> </el-button>
</div>
</el-dialog>
<information ref="information"/>
<div v-html="styleText" />
</div>
@ -228,6 +245,12 @@ export default {
qualifiedImgs: [],
qualifiedFiles: [],
dialogImgVisible: false,
//
hitBack: false,
// id
EQUIPMENT_POINT_ID: '',
//
hitBackReason: '',
defaultProps: {
value: 'id',
children: 'nodes',
@ -349,8 +372,39 @@ export default {
}).catch((e) => {
this.listLoading = false
})
},
hitBackFunction(id) {
console.log(id)
this.EQUIPMENT_POINT_ID = id
this.hitBack = true
},
hitBackOK() {
this.$confirm('确定要打回吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/fireRecord/cancel',
{
id: this.EQUIPMENT_POINT_ID,
reason: this.hitBackReason
}
).then((data) => {
this.listLoading = false
//
}).catch((e) => {
this.listLoading = false
})
this.FIRE_CHECK_ID = this.$parent.FIRE_CHECK_ID
this.FIRE_RECORD_ID = this.$parent.FIRE_RECORD_ID
this.SHOW_OR_EDIT = this.$parent.SHOW_OR_EDIT
this.recordBase = Object.assign({}, this.$parent.row)
this.getData()
this.getSignImgs(this.FIRE_RECORD_ID)
})
this.hitBack = false
}
}
}
</script>