瀏覽代碼

宅基地调查异常非空验证、签字图片显示

rongxin_prod
Xyq123* 1 年之前
父節點
當前提交
263e36c724
共有 1 個檔案被更改,包括 41 行新增24 行删除
  1. +41
    -24
      src/views/homesteadSurvey/add4.vue

+ 41
- 24
src/views/homesteadSurvey/add4.vue 查看文件

@@ -98,8 +98,9 @@
<p v-if="permission == 'true'" style="width:32%;border: 1px solid transparent;background: #FA5353;padding: 5px 0;border-radius: 50px;">
<span style="font-size: 14px;color: #fff;margin-left: 5px;" @click="ycbj()">异常标记</span>
</p>
<p v-if="permission == 'true'" style="width:32%;border: 1px solid transparent;background: #22B7F2;padding: 5px 0;border-radius: 50px;">
<span style="font-size: 14px;color: #fff;margin-left: 5px;" @click="qmqr()">签名确认</span>
<p style="width:32%;border: 1px solid transparent;background: #22B7F2;padding: 5px 0;border-radius: 50px;">
<span v-if="permission == 'true'" style="font-size: 14px;color: #fff;margin-left: 5px;" @click="qmqr()">签名确认</span>
<span v-if="permission == 'false'" style="font-size: 14px;color: #fff;margin-left: 5px;" @click="qmqr()">签名图片</span>
</p>
<p v-if = "showDcsh" style="width:32%;border: 1px solid #22B7F2;background: #ffffff;padding: 5px 0;border-radius: 50px;">
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;" @click="dcsh()">调查审核</span>
@@ -135,16 +136,16 @@
<img src="../../assets/images/sunVillage_info/signature_icon_10.png" id="canvasTT" v-if="!signature.resultImg"
style="position:absolute;top: 50%;left: 50%;transform: translate(-50%,-50%)" alt="">
<img :src="signature.resultImg" alt="" width="100%" v-if="signature.resultImg"/>
<div class="signature-footer" v-if="!signature.resultImg">
<div class="signature-footer" v-if="!signature.resultImg && permission == 'true'">
<van-button type="primary" round size="small" @click="handleReset">清空画板</van-button>
<van-button type="primary" round size="small" @click="handleGenerate">保存提交</van-button>
</van-row>
</div>
</van-popup>
<van-dialog v-model="ycbzShow" title="异常标记" show-cancel-button confirmButtonText="保存" cancelButtonText="关闭" @confirm="confirmn" >
<van-dialog v-model="ycbzShow" title="异常标记" show-cancel-button confirmButtonText="保存" cancelButtonText="关闭" confirmButtonColor="#323233" :before-close="onBeforeClose" >
<van-form ref="ycbzForm">
<van-row>
<van-col span="24">
<van-field v-model="zjdzdxx.surveyBz" label="异常备注" placeholder="异常备注" input-align="right" />
<van-field v-model="zjdzdxx.surveyBz" label="异常备注" placeholder="异常备注" input-align="right" :rules="[{ required: true }]" required />
</van-col>
<van-col span="12">
<p style="margin-left: 10%;color: #646566; font-size: 0.373333rem;">备注图片</p>
@@ -153,7 +154,7 @@
<MultiImageUploadComp :value="zjdzdxx.surveyBztp" :uploadDisabled="false" @fileUpdate="fileUpdate"/>
</van-col>
</van-row>
</van-form>

</van-dialog>
<van-popup v-model:show="showImageList" position="bottom" style="height:40vh;padding:50px 10px 0" closeable
@@ -228,7 +229,7 @@ export default {
this.zjdzdxx = JSON.parse(localStorage.getItem("zjdzdxxItem"));
this.permission = localStorage.getItem("executePermission");
let businessLevel = this.$store.state.user.businessLevel;
console.info(this.zjdzdxx);
console.info(this.zjdzdxx.surveySign);
if(this.zjdzdxx.surveySign != null){
this.signature.resultImg = this.$store.getters.baseRoutingUrl+this.zjdzdxx.surveySign;
}
@@ -334,10 +335,10 @@ export default {
param.append('date', this.format(new Date(), 'yyyy-MM-dd')) // 通过append向form对象添加数据
zjddcSign(param, this.zjdzdxx.zjddm).then(response => {
this.$notify({type: 'success', message: '签字成功'});
this.showesign = false;
getZjdzd(this.zjdzdxx.id).then((response) => {
localStorage.setItem("zjdzdxxItem",JSON.stringify(response.data))
location.reload();
this.showesign = false;
});


@@ -400,26 +401,42 @@ export default {
}).catch(() => {});
},
qmqr(){
if(this.zjdzdxx.surveySign != null){
this.signature.resultImg = this.$store.getters.baseRoutingUrl+this.zjdzdxx.surveySign;
}
this.showesign = true;
},
ycbj(){
this.ycbzShow = true;
},
confirmn(){
this.$set(this.zjdzdxx, 'surveyStatus', "2");
updateZjdzd(this.zjdzdxx).then(response => {
localStorage.setItem("zjdzdxxItem",JSON.stringify(this.zjdzdxx));
let _this =this
this.$toast({
icon: 'success', // 找到自己需要的图标
message: '保存成功',
duration:"1000",
onClose:function(){
_this.getList();
_this.$router.push({path:'/homesteadSurvey/add4',query: {zjddm: _this.zjdzdxx.zjddm}});
}
})
});
// van-dialog 点击confirm事件不自动关闭
onBeforeClose(action, done) {
if (action === 'confirm') {
this.$refs.ycbzForm.validate().then(() => {
this.$set(this.zjdzdxx, 'surveyStatus', "2");
updateZjdzd(this.zjdzdxx).then(response => {
localStorage.setItem("zjdzdxxItem",JSON.stringify(this.zjdzdxx));
let _this =this
this.$toast({
icon: 'success', // 找到自己需要的图标
message: '保存成功',
duration:"1000",
onClose:function(){
_this.getList();
}
})
return done(true);
});
}).catch(() => {
return done(false);
});
} else {
return done();
}
},
confirmn(){
console.info(111)

},
dcsh(){
this.dcshShow = true;


Loading…
取消
儲存