Commit 444cd7d3 authored by zhangjianqian's avatar zhangjianqian

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

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