From 4f77b7a712833d073f4006f3043468e0cbd9d7ca Mon Sep 17 00:00:00 2001 From: shj <1790240199@qq.com> Date: 星期四, 19 五月 2022 18:29:10 +0800 Subject: [PATCH] Merge branch 'shf' of https://sinanoaq.cn:8888/r/ztqt into shf --- src/views/oneFromanother/index.vue | 55 +++++++++++++++++++++++++++++++++---------------------- 1 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/views/oneFromanother/index.vue b/src/views/oneFromanother/index.vue index a62ce0c..fed5586 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=>{ @@ -319,8 +324,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