Commit 444cd7d3 authored by zhangjianqian's avatar zhangjianqian

增加燃气停用, 到访不遇,拒绝安检,燃气停用安检详情里只展示图片

parent c2a4e613
......@@ -22,7 +22,7 @@ public class UserTaskInspect {
private String streetName;
@Excel(name="所属村庄/小区")
private String villageName;
@Excel(name="通气状态",readConverterExp = "-1=未安检,0=到访不遇,1=拒绝安检,2=已安检,3=表前已安检")
@Excel(name="通气状态",readConverterExp = "-1=未安检,0=到访不遇,1=拒绝安检,2=已安检,3=燃气停用")
private Integer inspectStatus;
@Excel(name="不遇次数")
......
......@@ -283,7 +283,7 @@
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 2"
>已安检</span
>
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 3">表前已安检</span>
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 3">燃气停用</span>
</template>
</el-table-column>
<el-table-column label="安检人" align="center" prop="nickName" />
......@@ -415,7 +415,7 @@ export default {
},
{
id: 3,
name: "表前已安检",
name: "燃气停用",
},
],
itemDataA: [
......
......@@ -245,7 +245,7 @@
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 2"
>已安检</span
>
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 3">表前已安检</span>
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 3">燃气停用</span>
</template>
</el-table-column>
<el-table-column label="不遇次数" align="center" prop="missNum" />
......@@ -418,7 +418,7 @@ export default {
},
{
id: 3,
name: "表前已安检",
name: "燃气停用",
},
],
//
......@@ -462,7 +462,7 @@ export default {
color: "#E22121",
},
{
label: "表前已安检",
label: "燃气停用",
val: 0,
src: imgA,
color: "#2167E5",
......
......@@ -301,7 +301,7 @@
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.status != 0"
v-if="scope.row.status == 2"
@click="handleDetail(scope.row)"
>检查表</el-button
>
......@@ -328,7 +328,7 @@
<el-button
size="mini"
type="text"
v-if="scope.row.status == 2 || scope.row.status == 3"
v-if="scope.row.status == 1 ||scope.row.status == 2 || scope.row.status == 3"
@click="handleCover(scope.row)"
>图片</el-button
>
......@@ -483,7 +483,7 @@ export default {
},
{
id: 3,
name: "表前已检测",
name: "燃气停用",
},
],
dangerDetailOpen: false,
......@@ -823,8 +823,9 @@ export default {
},
//表封照片
handleCover(row) {
if (!row.meterImg) return this.$message.error("未查询到图片");
this.$refs.cover.viewCoverPhoto(row.meterImg);
if (!row.meterImg&&!row.meterData) return this.$message.error("未查询到图片");
this.$refs.cover.viewCoverPhoto(row.meterImg?row.meterImg:row.meterData);
},
},
};
......
......@@ -101,7 +101,7 @@
<el-option label="到访不遇" value="0" />
<el-option label="拒绝安检" value="1" />
<el-option label="已安检" value="2" />
<el-option label="表前已安检" value="3" />
<el-option label="燃气停用" value="3" />
</el-select>
</el-form-item>
......@@ -180,7 +180,7 @@
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 2"
>已安检</span
>
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 3">表前已安检</span>
<span style="color: #1ab394" v-if="scope.row.inspectStatus == 3">燃气停用</span>
</template>
</el-table-column>
<el-table-column
......@@ -295,7 +295,7 @@ export default {
color: "#E22121",
},
{
label: "表前已安检",
label: "燃气停用",
val: 4,
src: imgA,
color: "#2167E5",
......
......@@ -18,7 +18,7 @@
<div class="flex flex-w bb">
<div class="item" v-for="photo in meterImg" :key="photo.key">
<div class="view-label">
{{ photo.label }}
{{ photo.label?photo.label:photo.name }}
</div>
<div v-if="photo.img">
<MyImage
......@@ -28,6 +28,14 @@
>
</MyImage>
</div>
<div v-else-if="photo.src">
<MyImage
class="view-img"
:src="photo.src.split(',')[0]"
:previewSrcList="photo.src.split(',')"
>
</MyImage>
</div>
<div class="error" v-else>暂无图片</div>
</div>
</div>
......
......@@ -202,7 +202,7 @@
},
{
id: 3,
name: "表前已安检",
name: "燃气停用",
},
],
ustatusOptions: [],
......
......@@ -306,7 +306,16 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="已选区域" >
<el-select v-model="oldcommunity" multiple disabled >
<el-option
v-for="item in communityData2"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-row>
<el-form-item label="所属区域" prop="community">
<!-- <el-col :span="6">
......@@ -332,7 +341,7 @@
</el-col>-->
<el-col :span="6" style="padding-left: 8px" >
<el-select v-model="form.street" placeholder="所属乡镇" @change="steetChange">
<el-select v-model="form.street" placeholder="所属乡镇" @change="steetChange" >
<el-option
v-for="item in streeData"
:key="item.id"
......@@ -343,7 +352,7 @@
</el-col>
<el-col :span="6" style="padding-left: 8px">
<el-select v-model="form.community" multiple @change="$forceUpdate()" placeholder="所属小区(村)">
<el-select v-model="form.community" multiple @change="$forceUpdate()" placeholder="所属小区(村)">
<el-option
v-for="item in communityData"
:key="item.id"
......@@ -465,6 +474,7 @@ export default {
status: null,
},
taskId: "",
oldcommunity: [],
// 表单参数
form: {
community: [],
......@@ -499,6 +509,7 @@ export default {
countyData: [],
streeData: [],
communityData: [],
communityData2: [],
groupList: [],
};
},
......@@ -597,8 +608,8 @@ export default {
if(this.form.relationInfoList){
let community = this.form.relationInfoList.filter(item => item.type == "1").map(item => item.relationId);
if(community) {
this.form.community = [...community];
const area = this.communityData.find(item => item.id == community[0]);
this.oldcommunity = [...community];
const area = this.communityData2.find(item => item.id == community[0]);
if(area){
this.form.city = area.city;
this.form.county = area.county;
......@@ -613,6 +624,7 @@ export default {
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
//this.form.community = this.form.community.concat(this.oldcommunity);
this.addRelationInfo();
if (this.form.id != null) {
updateTask(this.form).then((response) => {
......@@ -631,8 +643,9 @@ export default {
});
},
addRelationInfo(){
var arr = this.form.community.concat(this.oldcommunity);
this.form.relationInfoList = [];
this.form.community.forEach(item =>{
arr.forEach(item =>{
const relationInfo = {
type: "1",
relationId: item,
......@@ -780,7 +793,16 @@ export default {
communityList({street: this.form.street}).then(res =>{
if(res.code == 200){
this.communityData = res.data;
if (!this.form.street) this.getRelationInfo();
if (!this.form.street) {
this.communityData2 = res.data;
this.getRelationInfo();
}
for (let i = 0; i < this.oldcommunity.length; i++) {
console.log(this.oldcommunity[i])
var cid = this.oldcommunity[i];
this.communityData = this.communityData.filter(item => item.id != cid);
}
}
})
},
......
......@@ -29,7 +29,7 @@
<el-option label="到访不遇" value="0"/>
<el-option label="拒绝安检" value="1"/>
<el-option label="已安检" value="2"/>
<el-option label="表前已安检" value="3"/>
<el-option label="燃气停用" value="3"/>
</el-select>
</el-form-item>
......
......@@ -7,7 +7,7 @@
<span v-if="scope.row.status == 0">到访不遇</span>
<span v-if="scope.row.status == 1">拒绝安检</span>
<span v-if="scope.row.status == 2">已安检</span>
<span v-if="scope.row.status == 3">表前已安检</span>
<span v-if="scope.row.status == 3">燃气停用</span>
</template>
</el-table-column>
<el-table-column label="有无隐患" align="center" prop="danger" :show-overflow-tooltip="true">
......
......@@ -29,7 +29,7 @@
<el-option label="到访不遇" value="0"/>
<el-option label="拒绝安检" value="1"/>
<el-option label="已检测" value="2"/>
<el-option label="表前已检测" value="3"/>
<el-option label="燃气停用" value="3"/>
</el-select>
</el-form-item>
......
......@@ -29,7 +29,7 @@
<el-option label="到访不遇" value="0"/>
<el-option label="拒绝安检" value="1"/>
<el-option label="已安检" value="2"/>
<el-option label="表前已安检" value="3"/>
<el-option label="燃气停用" value="3"/>
</el-select>
</el-form-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment