From 2a8099cf8cd907c6e14a9ac4300a05544c345b0d Mon Sep 17 00:00:00 2001
From: jiale <631455805@qq.com>
Date: 星期二, 24 五月 2022 15:51:03 +0800
Subject: [PATCH] 隐患图标分析修改
---
src/views/oneFromanother/index.vue | 57 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/src/views/oneFromanother/index.vue b/src/views/oneFromanother/index.vue
index a62ce0c..185420c 100644
--- a/src/views/oneFromanother/index.vue
+++ b/src/views/oneFromanother/index.vue
@@ -15,7 +15,7 @@
<el-input v-model="listQuery.form.ht_community" style="width:202px"></el-input>
</el-form-item>
<el-form-item label="隐患类别">
- <el-select v-model="listQuery.form.checktype" placeholder="请选择">
+ <el-select v-model="listQuery.form.ht_typesub" placeholder="请选择">
<el-option
v-for="item in YHLBList"
:key="item.value"
@@ -38,7 +38,7 @@
<el-input v-model="listQuery.form.address" style="width:202px" placeholder="请输入内容"></el-input>
</el-form-item>
<el-form-item label="检查类别">
- <el-select v-model="listQuery.form.ht_typesub" placeholder="请选择">
+ <el-select v-model="listQuery.form.checktype" placeholder="请选择">
<el-option
v-for="item in JCLBList"
:key="item.value"
@@ -124,7 +124,7 @@
>
</el-pagination>
</div>
- <el-dialog title="填写自查结果" :visible.sync="selfInspectVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px">
+ <el-dialog :title="selfTitle" :visible.sync="selfInspectVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px">
<el-form ref="selfInspectForm" :rules="selfInspectFormRules" :model="selfInspectForm" label-position="right" label-width="80px">
<el-form-item label="自查人" prop="markUserName">
<el-input v-model="selfInspectForm.markUserName" class="analyseUnit_input"></el-input>
@@ -140,16 +140,16 @@
<el-input v-model="selfInspectForm.remark" type="textarea" rows="5" class="analyseUnit_input"></el-input>
</el-form-item>
</el-form>
- <div align="right">
- <el-button @click="selfInspectVisible = false">取消</el-button>
- <el-button type="primary" @click="submitSelfInspect()">确认</el-button>
+ <div align="center">
+ <el-button type="primary" v-if="listQuery.type == '0'" @click="submitSelfInspect()">确认</el-button>
+ <el-button @click="selfInspectVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
- import { getPageList, noExistSave, revoke, analogy_export_do} from "@/api/sgyhpczl/oneFromanother"
+ import { getPageList, noExistSave,selfCheckNotInfo, revoke, analogy_export_do} from "@/api/sgyhpczl/oneFromanother"
import {initJCBM, initYHLX, initJCLB, initYHJB} from "@/api/sgyhpczl/initSelect";
export default{
@@ -179,6 +179,7 @@
markDate:'',
remark:'',
},
+ selfTitle: '',
selfInspectFormRules:{
markUserName: [{ required: true, message: '自查人不能为空', trigger: 'blur' }],
markDate: [{ required: true, message: '自查时间不能为空', trigger: 'blur' }]
@@ -219,34 +220,38 @@
})
},
handleClick(data,val){
- if(!val){
- this.$router.push({
- path:'/exist',
- query: {
- data: data,
- type: this.listQuery.type
- }
- })
- return
- }
if(val=='不存在'){
this.$nextTick(() =>{
this.$refs["selfInspectForm"].clearValidate()
})
+ this.selfInspectForm={}
this.selfInspectVisible = true
- this.selfInspectForm.id = data.id
if (this.listQuery.type == '1'){
- initYHLX().then(res=>{
+ let params = {
+ id: data.id,
+ type: 0,
+ }
+ selfCheckNotInfo(params).then(res=>{
if (res.data.ok==1){
- this.selfInspectForm.remark=res.data.data[0].value
+ this.selfInspectForm=res.data.data[0]
} else{
this.$message({type:'error', message:res.data.msg, duration:3000})
}
})
}
-
-
+ return
}
+ let puType = '0';
+ if (this.listQuery.type=='1' && data.jyfsFlag=='0'){
+ puType = '1';
+ }
+ this.$router.push({
+ path:'/exist',
+ query: {
+ data: data,
+ type: puType
+ }
+ })
},
initXFDW(){
initJCBM(1).then(res=>{
@@ -306,7 +311,9 @@
getPageList(){
this.listQuery.page=1
this.checkTime()
+ this.listLoading = true
getPageList(this.listQuery).then(res=>{
+ this.listLoading = false
if (res.data.ok==1) {
this.tableData = res.data.data.items
this.recordTotal=res.data.data.total
@@ -319,8 +326,14 @@
this.listQuery.form={};
this.getPageList()
},
+ //自查切换
radioChange(val){
this.listQuery.type = val;
+ if (val == '0'){
+ this.selfTitle = '填写自查结果'
+ }else {
+ this.selfTitle = '查看自查结果'
+ }
this.getPageList()
},
changeBox(val){
--
Gitblit v1.9.2