master
lion 3 years ago
parent b5cd8b6a78
commit 69cb7acb7e

@ -150,7 +150,7 @@
</div>
<!-- 审核 auditform 办结-->
<div v-if="formType=='auditform'||formType=='endform'">
<div v-if="formType!='showform'">
<el-col :span="24">
<el-form-item label="备注" prop="content">
<el-input type="textarea" v-model="formdetail.content" placeholder="请填写备注"></el-input>
@ -158,7 +158,7 @@
</el-col>
</div>
<div v-if="formType=='endform'">
<div v-if="formType=='endform'||formType=='clueform'">
<el-col :span="24">
<el-form-item label="有无违法转办" prop="end_type">
<el-radio-group v-model="formdetail.end_type">
@ -204,6 +204,17 @@
<el-button v-if="formdetail.end_type!=2" type="danger" v-preventReClick @click="auditForm('formdetail','3')">退
</el-button>
</div>
<div v-if="formType=='clueform'" style="display: inline-block;margin-left:10px">
<el-button v-if="form.status==1" type="primary" v-preventReClick
@click="auditForm('formdetail','2')">办结
</el-button>
<el-button v-if="form.status==1" type="warning" v-preventReClick
@click="auditForm('formdetail','4')">缺陷办结
</el-button>
<el-button v-if="form.status==1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
</template>
</dialogShow>
@ -219,7 +230,10 @@
import {
get,
update
} from '../../../../api/rain/inspection.js'
} from '../../../../api/rain/inspection.js'
import {
storeclue
} from '../../../../api/assess/clue.js'
import dialogShow from '@/components/dialogShow'
export default {
components: {
@ -270,6 +284,16 @@
end_time: "",
remark: "",
// maintain_type:""
},
formclue: {
type: 5,
rain_inspection_id: "",
date: "",
files_list: [],
area_id: "",
address: "",
longitude: "",
latitude: ""
},
rules: {}
@ -308,8 +332,10 @@
that.form.end_time = result.end_time
that.form.remark = result.remark
that.form.end_type = result.end_type
that.form.status = result.status
that.formdetail.end_type = result.end_type
that.form.maintain_type = result.maintain_type
that.form.maintain_type = result.maintain_type
let _files = [];
for (var mod of result.rain_equipment_info.rain_equipment_files) {
let m = Object.assign({}, mod);
@ -328,7 +354,17 @@
m.photoType = "after";
_filesafter.push(m);
}
that.dealFilesList = _filesafter;
that.dealFilesList = _filesafter;
that.formclue.type = 5
that.formclue.rain_inspection_id = result.id
that.formclue.files_list = _files
that.formclue.date = result.created_at
that.formclue.content = that.form.content
that.formclue.address = that.form.address
that.formclue.latitude = that.form.latitude
that.formclue.longitude = that.form.longitude
that.fromclue.area_id = result.area_id ? result.area_id : ""
console.log(that.form)
}).catch(error => {
//reject(error)
@ -338,7 +374,14 @@
auditForm(formname,status) {
var that = this
this.formdetail.status = status
this.formdetail.id = this.infoId
this.formdetail.id = this.infoId
if (that.formdetail.end_type == 1 && that.formdetail.status == 2) {
storeclue(that.formclue).then(response => {
this.$Message.success('新增线索处办成功');
}).catch(error => {
//reject(error)
})
}
update(that.formdetail).then(response => {
this.$Message.success('操作成功');
this.$emit("auditSuccess")

@ -170,7 +170,7 @@
</el-form-item>
</el-col>
</div>
<div v-if="formType=='endform'">
<div v-if="formType=='endform'||formType=='clueform'">
<el-col :span="24">
<el-form-item label="有无违法转办" prop="end_type">
<el-radio-group v-model="formdetail.end_type">
@ -221,6 +221,16 @@
<el-button v-if="formdetail.end_type!=2" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
<div v-if="formType=='clueform'" style="display: inline-block;margin-left:10px">
<el-button v-if="form.status==1" type="primary" v-preventReClick
@click="auditForm('formdetail','2')">办结
</el-button>
<el-button v-if="form.status==1" type="warning" v-preventReClick
@click="auditForm('formdetail','4')">缺陷办结
</el-button>
<el-button v-if="form.status==1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
</template>
</dialogShow>
@ -239,7 +249,10 @@
import {
get,
update
} from '../../../../api/rain/inspection.js'
} from '../../../../api/rain/inspection.js'
import {
storeclue
} from '../../../../api/assess/clue.js'
import {
getparameteritem
} from '../../../../api/system/dictionary.js'
@ -300,6 +313,16 @@
remark: "",
// maintain_type:"",
end_type:0
},
formclue: {
type: 5,
rain_inspection_id: "",
date: "",
files_list: [],
area_id: "",
address: "",
longitude: "",
latitude: ""
},
rules: {}
@ -349,7 +372,8 @@
that.form.roadName = result.building_site_info.road ? result.building_site_info.road.name : ""
that.form.end_time = result.end_time
that.form.remark = result.remark
that.form.end_type = result.end_type
that.form.end_type = result.end_type
that.form.status = result.status
that.formdetail.end_type = result.end_type
let building_site = result.building_site_info.building_site
that.form.address = building_site.address
@ -373,7 +397,16 @@
m.photoType = "before";
site_files.push(m);
}
that.filesList = site_files;
that.filesList = site_files;
that.formclue.type = 5
that.formclue.rain_inspection_id = result.id
that.formclue.files_list = site_files
that.formclue.date = result.created_at
that.formclue.content = that.form.content
that.formclue.address = that.form.address
that.formclue.latitude = that.form.latitude
that.formclue.longitude = that.form.longitude
that.fromclue.area_id = result.area_id ? result.area_id : ""
}).catch(error => {
//reject(error)
})
@ -382,7 +415,14 @@
auditForm(formname,status) {
var that = this
this.formdetail.status = status
this.formdetail.id = this.infoId
this.formdetail.id = this.infoId
if (that.formdetail.end_type == 1 && that.formdetail.status == 2) {
storeclue(that.formclue).then(response => {
this.$Message.success('新增线索处办成功');
}).catch(error => {
//reject(error)
})
}
update(that.formdetail).then(response => {
this.$Message.success('操作成功');
this.$emit("auditSuccess")

@ -62,7 +62,7 @@
<Button v-if="scope.row['status']==2||scope.row['status']==3" ghost size="small"
@click="showInfo(scope.row,'showform')" type="primary" style="margin-left: 10px;">查看</Button>
<Button v-if="scope.row['status']==1&&scope.row['end_type']==2" ghost size="small"
@click="showInfo(scope.row,'endform')" type="primary" style="margin-left: 10px;">办结</Button>
@click="showInfo(scope.row,'clueform')" type="primary" style="margin-left: 10px;">办结</Button>
<Button ghost size="small"
@click="goorder" type="primary" style="margin-left: 10px;">新建工单</Button>
<Button ghost size="small" @click="del(scope.row)" type="error" style="margin-left: 10px;">删除</Button>

@ -151,7 +151,7 @@
</el-form-item>
</el-col>
</div>
<div v-if="formType=='endform'">
<div v-if="formType=='endform'||formType=='clueform'">
<el-col :span="24">
<el-form-item label="有无违法转办" prop="end_type">
<el-radio-group v-model="formdetail.end_type">
@ -204,6 +204,18 @@
<el-button v-if="formdetail.end_type!=1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
<div v-if="formType=='clueform'" style="display: inline-block;margin-left:10px">
<el-button v-if="form.status==1" type="primary" v-preventReClick
@click="auditForm('formdetail','2')">办结
</el-button>
<el-button v-if="form.status==1" type="warning" v-preventReClick
@click="auditForm('formdetail','4')">缺陷办结
</el-button>
<el-button v-if="form.status==1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
</template>
</dialogShow>
@ -222,7 +234,10 @@
import {
get,
update
} from '../../../../api/rain/maintain.js'
} from '../../../../api/rain/maintain.js'
import {
storeclue
} from '../../../../api/assess/clue.js'
import {
getparameteritem
} from '../../../../api/system/dictionary.js'
@ -279,6 +294,16 @@
remark: "",
type:0,
end_type:0
},
formclue: {
type: 6,
rain_maintain_id: "",
date: "",
files_list: [],
area_id: "",
address: "",
longitude: "",
latitude: ""
},
rules: {}
@ -341,7 +366,9 @@
that.form.end_time = result.end_time
that.form.remark = result.remark
that.form.type = result.type
that.formdetail.end_type = result.end_type
that.form.old_type = result.old_type
that.form.status = result.status
// that.formdetail.type = that.form.old_type
let _files = [];
for (var mod of that.form[that.formFile]) {
@ -361,7 +388,18 @@
m.photoType = "after";
_filesafter.push(m);
}
that.dealFilesList = _filesafter;
that.dealFilesList = _filesafter;
that.formclue.type = 6
that.formclue.rain_maintain_id = result.id
that.formclue.files_list = _files
that.formclue.date = result.created_at
that.formclue.content = that.form.content
that.formclue.address = that.form.address
that.formclue.latitude = that.form.latitude
that.formclue.longitude = that.form.longitude
that.fromclue.area_id = result.area_id ? result.area_id : ""
console.log(that.fromclue)
}).catch(error => {
//reject(error)
})
@ -371,7 +409,13 @@
var that = this
this.formdetail.status = status
this.formdetail.id = this.infoId
console.log("that.formdetail",that.formdetail)
if (that.formdetail.end_type == 1 && that.formdetail.status == 2) {
storeclue(that.formclue).then(response => {
this.$Message.success('新增线索处办成功');
}).catch(error => {
//reject(error)
})
}
// return
update(that.formdetail).then(response => {
this.$Message.success('操作成功');

@ -134,7 +134,7 @@
</el-form-item>
</el-col>
</div>
<div v-if="formType=='endform'">
<div v-if="formType=='endform'||formType=='clueform'">
<el-col :span="24">
<el-form-item label="有无违法转办" prop="end_type">
<el-radio-group v-model="formdetail.end_type">
@ -189,6 +189,16 @@
<el-button v-if="formdetail.end_type!=1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
<div v-if="formType=='clueform'" style="display: inline-block;margin-left:10px">
<el-button v-if="form.status==1" type="primary" v-preventReClick
@click="auditForm('formdetail','2')">办结
</el-button>
<el-button v-if="form.status==1" type="warning" v-preventReClick
@click="auditForm('formdetail','4')">缺陷办结
</el-button>
<el-button v-if="form.status==1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
</template>
</dialogShow>
@ -207,7 +217,10 @@
import {
get,
update
} from '../../../../api/rain/maintain.js'
} from '../../../../api/rain/maintain.js'
import {
storeclue
} from '../../../../api/assess/clue.js'
import {
getparameteritem
} from '../../../../api/system/dictionary.js'
@ -260,6 +273,16 @@
remark: "",
type:0,
end_type:0
},
formclue: {
type: 6,
rain_maintain_id: "",
date: "",
files_list: [],
area_id: "",
address: "",
longitude: "",
latitude: ""
},
rules: {}
@ -308,6 +331,8 @@
that.form.remark = result.remark
that.form.type = result.type
that.form.old_type = result.old_type
that.formdetail.end_type = result.end_type
that.form.status = result.status
// that.formdetail.type = that.form.old_type
let _files = [];
for (var mod of that.form['help_discharge_files']) {
@ -327,7 +352,17 @@
m.photoType = "after";
_filesafter.push(m);
}
that.dealFilesList = _filesafter;
that.dealFilesList = _filesafter;
that.formclue.type = 6
that.formclue.rain_maintain_id = result.id
that.formclue.files_list = _files
that.formclue.date = result.created_at
that.formclue.content = that.form.content
that.formclue.address = that.form.address
that.formclue.latitude = that.form.latitude
that.formclue.longitude = that.form.longitude
that.fromclue.area_id = result.area_id ? result.area_id : ""
}).catch(error => {
//reject(error)
})
@ -338,7 +373,14 @@
this.formdetail.status = status
this.formdetail.id = this.infoId
console.log("that.formdetail",that.formdetail)
// return
// return
if (that.formdetail.end_type == 1 && that.formdetail.status == 2) {
storeclue(that.formclue).then(response => {
this.$Message.success('新增线索处办成功');
}).catch(error => {
//reject(error)
})
}
update(that.formdetail).then(response => {
this.$Message.success('操作成功');
this.$emit("auditSuccess")

@ -98,7 +98,7 @@
</el-form-item>
</el-col>
</div>
<div v-if="formType=='endform'">
<div v-if="formType=='endform'||formType=='clueform'">
<el-col :span="24">
<el-form-item label="有无违法转办" prop="end_type">
<el-radio-group v-model="formdetail.end_type">
@ -152,6 +152,16 @@
<el-button v-if="formdetail.end_type!=1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
<div v-else-if="formType=='clueform'" style="display: inline-block;margin-left:10px">
<el-button v-if="form.status==1" type="primary" v-preventReClick
@click="auditForm('formdetail','2')">办结
</el-button>
<el-button v-if="form.status==1" type="warning" v-preventReClick
@click="auditForm('formdetail','4')">缺陷办结
</el-button>
<el-button v-if="form.status==1" type="danger" v-preventReClick
@click="auditForm('formdetail','3')">退回</el-button>
</div>
</template>
</dialogShow>
@ -170,7 +180,10 @@
import {
get,
update
} from '../../../../api/rain/maintain.js'
} from '../../../../api/rain/maintain.js'
import {
storeclue
} from '../../../../api/assess/clue.js'
import {
getparameteritem
} from '../../../../api/system/dictionary.js'
@ -217,13 +230,24 @@
}],
form: {
},
},
formdetail: {
content: "",
end_time: "",
remark: "",
type:0,
end_type:0
},
formclue: {
type: 6,
rain_maintain_id: "",
date: "",
files_list: [],
area_id: "",
address: "",
longitude: "",
latitude: ""
},
rules: {}
@ -234,7 +258,8 @@
this.infoId = val
},
formType(val) {
this.formType = val
this.formType = val
console.log(val)
},
'formdetail.end_type':function(val){
this.formdetail.remark = ""
@ -272,7 +297,8 @@
that.form.remark = result.remark
that.form.type = result.type
that.form.old_type = result.old_type
// that.formdetail.type = that.form.old_type
that.form.status = result.status
that.formdetail.end_type = result.end_type
let _files = [];
for (var mod of that.form['mire_files']) {
let m = Object.assign({}, mod);
@ -283,6 +309,16 @@
}
that.filesList = _files;
that.formclue.type = 6
that.formclue.rain_maintain_id = result.id
that.formclue.files_list = _files
that.formclue.date = result.created_at
that.formclue.content = that.form.content
that.formclue.address = that.form.address
that.formclue.latitude = that.form.latitude
that.formclue.longitude = that.form.longitude
that.fromclue.area_id = result.area_id ? result.area_id : ""
}).catch(error => {
//reject(error)
@ -294,7 +330,14 @@
this.formdetail.status = status
this.formdetail.id = this.infoId
console.log("that.formdetail",that.formdetail)
// return
// return
if (that.formdetail.end_type == 1 && that.formdetail.status == 2) {
storeclue(that.formclue).then(response => {
this.$Message.success('新增线索处办成功');
}).catch(error => {
//reject(error)
})
}
update(that.formdetail).then(response => {
this.$Message.success('操作成功');
this.$emit("auditSuccess")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -77,14 +77,11 @@
<el-tag v-if="scope.row[column.field]==1" type="warning"></el-tag>
<el-tag v-else></el-tag>
</div>
<div v-else-if="column.type=='old_type'">
<el-tag v-if="scope.row[column.field]==1"></el-tag>
<el-tag v-if="scope.row[column.field]==2"></el-tag>
<el-tag v-if="scope.row[column.field]==3"></el-tag>
<el-tag v-if="scope.row[column.field]==4"></el-tag>
<el-tag v-if="scope.row[column.field]==5"></el-tag>
<el-tag v-if="scope.row[column.field]==6"></el-tag>
<el-tag v-if="scope.row[column.field]==7"></el-tag>
<div v-else-if="column.type=='old_type'">
<div v-for="item in selects.typeList">
<el-tag v-if="scope.row[column.field]==item.id">{{item.name}}</el-tag>
</div>
</div>
<div v-else-if="column.type=='status'">
<el-tag v-if="scope.row[column.field]==0"></el-tag>
@ -128,13 +125,13 @@
</div>
<el-dialog title="雨管养护类型选择" :visible.sync="rainTypeVisible" width="60%">
<div class="dialogConcent">
<el-radio v-model="rainType" label="1"></el-radio>
<el-radio v-model="rainType" label="2"></el-radio>
<el-radio v-model="rainType" label="3"></el-radio>
<el-radio v-model="rainType" label="4"></el-radio>
<el-radio v-model="rainType" label="5"></el-radio>
<el-radio v-model="rainType" label="6"></el-radio>
<el-radio v-model="rainType" label="7"></el-radio>
<el-radio v-model="rainType" :label="1"></el-radio>
<el-radio v-model="rainType" :label="2"></el-radio>
<el-radio v-model="rainType" :label="3"></el-radio>
<el-radio v-model="rainType" :label="4"></el-radio>
<el-radio v-model="rainType" :label="5"></el-radio>
<el-radio v-model="rainType" :label="6"></el-radio>
<el-radio v-model="rainType" :label="7"></el-radio>
</div>
<div slot="footer" class="dialog-footer">
@ -233,64 +230,30 @@
},
data() {
return {
reviewFormVisible: false,
reviewList: [],
reviewForm: {
ids: [],
audit_status: 0,
audit_reamrk: ""
return {
tableHeight: 0,
formLabelWidth: "120px",
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
reviewStatusList: [{
id: 0,
value: "待复核"
}, {
id: 1,
value: "已复核"
}],
tableHeight: 0,
rainTypeVisible: false,
rainType: "1",
dialogFormVisible: false,
dialogFormDetailVisible: false,
formLabelWidth: "120px",
dialogImageUrl: "",
dialogVisible: false,
rainTitle: "雨水管道疏挖",
tableData: [],
mapparams: {
zoom: 11,
},
mapform: [],
tableHeight: 0,
rainType: 1,
datesearch: "",
baseurl: "",
searchFields: {
is_export: 0,
is_auth: 1
},
yhtypeList: [{
id: 1,
name: "雨水管道疏挖"
}, {
id: 2,
name: "雨水管道疏通"
}, {
id: 3,
name: "汛期助排"
}, {
id: 4,
name: "污泥外运"
}, {
id: 5,
name: "出水口排查"
}, {
id: 6,
name: "专项处理"
}, {
id: 7,
name: "维修"
}],
baseurl: "",
searchFields: {
is_export: 0,
is_auth: 1
},
roadsList: [],
roadName: "",
roaddisabled: false,
roadloading: false,
selects: {
areasList: [{
id: "",
@ -352,76 +315,26 @@
name: "所有"
}],
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
filesList: [],
dealFilesList: [],
rainMaintainLogs: [],
end_types: 0,
disabled: false,
uploadOther: {
token: ""
},
idname: "",
nowstatus: 0,
maintaninList: [],
form: {
content: "",
title_id: "",
scope: "",
point_name: '',
is_solve: 0,
is_law: 0,
deal_content: "",
deal_result: "",
address: "",
longitude: "",
latitude: "",
files_list: [],
files_deal_list: [],
date: "",
address: "",
road_id: ""
},
allmaintaninList: [{
id: "",
value: "所有"
}],
roadsList: [],
roadName: "",
roaddisabled: false,
roadloading: false,
formdetail: {
status: 0,
end_type: 0,
content: "",
end_time: "",
remark: "",
type: 0
},
wf_type: 0,
titleArr: [],
rules: {
// scope: [{
// required: true,
// message: '',
// trigger: 'blur',
// }],
// point_name: [{
// required: true,
// message: '',
// trigger: 'blur',
// }],
// content: [{
// required: true,
// message: '',
// trigger: 'blur',
// }]
},
reviewFormVisible: false,
reviewList: [],
reviewForm: {
ids: [],
audit_status: 0,
audit_reamrk: ""
},
reviewStatusList: [{
id: 0,
value: "待复核"
}, {
id: 1,
value: "已复核"
}],
columns: [{
field: "address",
title: "地址/排放点",
@ -508,13 +421,6 @@
},
watch: {
mapform(newVal, oldVal) {
this.form.longitude = newVal[0];
this.form.latitude = newVal[1];
// if(this.rainType!=4){
this.form.address = newVal[2];
// }
},
rainType() {
this.roadsList = []
},
@ -529,7 +435,7 @@
},
'searchFields.type': function(val) {
if (val == 1 || val == 2 || val == 5 || val == 6 || val == 7) {
if (val == 1 || val == 2 || val == 3 || val == 5 || val == 6 || val == 7) {
getparameteritem('maintainContent_' + val).then(res => {
for (var m of res.detail) {
this.allmaintaninList.push(m)
@ -543,34 +449,78 @@
}
},
},
methods: {
getUserName(row) {
if (row.admin) {
return row.admin.name;
} else if (row.user) {
return row.user.name;
} else {
return "未知";
}
methods: {
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
var lxHeader_height = 96.5; //
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
that.baseurl = location.host; //process.env.VUE_APP_BASE_API
// this.uploadOther.token = getToken();
listarea({
page: 1,
page_size: 99
}).then(res => {
for (var m of res.data) {
that.selects.areasList.push({
id: m.id,
name: m.name
})
}
})
listmaintain({
page: 1,
page_size: 999,
}).then(response => {
for (var m of response.data) {
this.selects.maintaingroupList.push(m)
}
}).catch(error => {
console.log(error)
reject(error)
});
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
load(is_export) {
listmain({
page: this.paginations.page,
page_size: this.paginations.page_size,
...this.searchFields
}).then(response => {
let tokens = getToken();
if (is_export) {
var url = "/api/admin/rain-maintains/index?token=" + tokens
for (var m in this.searchFields) {
url += "&" + m + "=" + this.searchFields[m]
}
url = this.baseurl + url
console.log(url)
window.open("http://" + url, '_blank')
this.searchFields.is_export = 0
return;
}
this.tableData = response.data;
this.paginations.total = response.total;
}).catch(error => {
console.log(error)
reject(error)
});
},
exportExcel() {
var that = this
that.searchFields.is_export = 1
that.load(true)
},
},
getMaintinName(row) {
if (row.user) {
if (row.user.maintain) {
return row.user.maintain.name;
} else {
return "";
}
} else {
return "";
}
},
exportExcel() {
var that = this
that.searchFields.is_export = 1
that.load(true)
},
handleSelectionChange(val) {
console.log(val)
this.reviewList = val
@ -610,9 +560,6 @@
});
},
chooseRoad(val) {
this.form.road_id = val
},
remoteRoad() {
this.roadsList = []
},
@ -628,227 +575,44 @@
} else {
this.roadsList = []
}
},
resetrainType() {
this.rainType = 1
this.rainTypeVisible = false
},
submitRainType() {
var that = this
this.rainTypeVisible = false
if (that.rainType == 1 || that.rainType == 2 || that.rainType == 3 || that.rainType == 5 || that.rainType ==
6 || that.rainType ==
7) {
this.$refs.editCirculation.rainType = that.rainType
this.$refs.editCirculation.getInfo()
this.$refs.editCirculation.isShow = true
} else if (that.rainType == 4) {
this.$refs.editMire.getInfo()
this.$refs.editMire.isShow = true
}
},
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
var lxHeader_height = 96.5; //
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
that.baseurl = location.host; //process.env.VUE_APP_BASE_API
this.uploadOther.token = getToken();
listarea({
page: 1,
page_size: 99
}).then(res => {
for (var m of res.data) {
that.selects.areasList.push({
id: m.id,
name: m.name
})
}
})
listmaintain({
page: 1,
page_size: 999,
}).then(response => {
for (var m of response.data) {
this.selects.maintaingroupList.push(m)
}
}).catch(error => {
console.log(error)
reject(error)
});
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
load(is_export) {
listmain({
page: this.paginations.page,
page_size: this.paginations.page_size,
...this.searchFields
}).then(response => {
let tokens = getToken();
if (is_export) {
var url = "/api/admin/rain-maintains/index?token=" + tokens
for (var m in this.searchFields) {
url += "&" + m + "=" + this.searchFields[m]
}
url = this.baseurl + url
console.log(url)
window.open("http://" + url, '_blank')
this.searchFields.is_export = 0
return;
}
this.tableData = response.data;
this.paginations.total = response.total;
}).catch(error => {
console.log(error)
reject(error)
});
},
info(obj) {
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.rainType = result.old_type;
that.nowstatus = result.status;
that.formdetail.id = result.id
that.formdetail.end_type = result.end_type
// that.formdetail.type = parseInt(result.type)
that.wf_type = result.end_type
if (result.rain_maintain_logs) {
for (var k of result.rain_maintain_logs) {
k.adminName = k.admin ? k.admin.name : ""
}
}
that.rainMaintainLogs = result.rain_maintain_logs;
that.end_types = result.end_type
if (that.rainType == 1) {
that.rainTitle = "雨水管道疏挖"
} else if (that.rainType == 2) {
that.rainTitle = "雨水管道疏通"
} else if (that.rainType == 3) {
that.rainTitle = "汛期助排"
} else if (that.rainType == 4) {
that.rainTitle = "污泥外运"
} else if (that.rainType == 5) {
that.rainTitle = "出水口排查"
} else if (that.rainType == 6) {
that.rainTitle = "专项处理"
} else if (that.rainType == 7) {
that.rainTitle = "维修"
} else {
that.rainTitle = "雨管养护"
}
switch (result.old_type) {
case 1:
case 2:
case 6:
case 7:
that.form = result.circulation_info;
that.form.circulation_id = result.circulation_id;
that.roaddisabled = true
that.roadName = result.circulation_info.road ? result.circulation_info.road.name : ""
that.idname = "circulation_id"
that.mapform = [result.circulation_info.longitude, result.circulation_info.latitude, result
.circulation_info.address
]
let cir_arrs = result.circulation_info.title_id ? result.circulation_info.title_id.split(",") : []
for (var m of cir_arrs) {
that.titleArr.push(parseInt(m))
}
let _files = [];
for (var mod of result.circulation_info.circulation_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "before";
_files.push(m);
}
that.filesList = _files;
let _filesafter = [];
for (var mod of result.circulation_info.circulation_deal_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "after";
_filesafter.push(m);
}
that.dealFilesList = _filesafter;
break;
case 3:
that.form = result.help_discharge_info;
that.form.help_discharge_id = result.help_discharge_id;
that.roaddisabled = true
that.roadName = result.help_discharge_info.road ? result.help_discharge_info.road.name : ""
that.idname = "help_discharge_id"
that.mapform = [result.help_discharge_info.longitude, result.help_discharge_info.latitude, result
.help_discharge_info.address
]
let discharge_files = [];
for (var mod of result.help_discharge_info.help_discharge_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "before";
discharge_files.push(m);
}
that.filesList = discharge_files;
let discharge_filesafter = [];
for (var mod of result.help_discharge_info.help_discharge_deal_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "after";
discharge_filesafter.push(m);
}
that.dealFilesList = discharge_filesafter;
break;
case 4:
that.form = result.mire_info;
that.form.mire_id = result.mire_id;
that.roaddisabled = true
that.roadName = result.mire_info.road ? result.mire_info.road.name : ""
that.idname = "mire_id";
let mire_files = [];
for (var mod of result.mire_info.mire_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "before";
mire_files.push(m);
}
that.filesList = mire_files;
break;
case 5:
that.form = result.out_water_info;
that.form.out_water_id = result.out_water_id;
that.idname = "out_water_id"
that.roaddisabled = true
that.roadName = result.out_water_info.road ? result.out_water_info.road.name : ""
that.mapform = [result.out_water_info.longitude, result.out_water_info.latitude, result.out_water_info
.address
]
let water_arrs = result.out_water_info.title_id ? result.out_water_info.title_id.split(",") : []
for (var m of water_arrs) {
that.titleArr.push(parseInt(m))
}
let water_files = [];
for (var mod of result.out_water_info.out_water_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "before";
water_files.push(m);
}
that.filesList = water_files;
let water_filesafter = [];
for (var mod of result.out_water_info.out_water_deal_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.photoType = "after";
water_filesafter.push(m);
}
that.dealFilesList = water_filesafter;
break;
}
}).catch(error => {
//reject(error)
})
edit(obj) {
var that = this;
if (obj) {
if (obj.old_type == 1 || obj.old_type == 2 || obj.old_type == 3 || obj.old_type == 5 || obj.old_type == 6 ||
obj.old_type ==
7) {
this.$refs.editCirculation.rainType = obj.old_type
this.$refs.editCirculation.infoId = obj.id
this.$refs.editCirculation.getInfo(obj.id)
this.$refs.editCirculation.isShow = true
} else if (obj.old_type == 4) {
this.$refs.editMire.infoId = obj.id
this.$refs.editMire.getInfo(obj.id)
this.$refs.editMire.isShow = true
}
}else{
this.rainTypeVisible = true
}
},
//
showInfo(obj, formtype) {
@ -869,25 +633,6 @@
this.$refs.showMireInfo.getInfo(obj.id)
}
},
edit(obj) {
var that = this;
if (obj) {
if (obj.old_type == 1 || obj.old_type == 2 || obj.old_type == 3 || obj.old_type == 5 || obj.old_type == 6 ||
obj.old_type ==
7) {
this.$refs.editCirculation.rainType = obj.old_type
this.$refs.editCirculation.infoId = obj.id
this.$refs.editCirculation.getInfo(obj.id)
this.$refs.editCirculation.isShow = true
} else if (obj.old_type == 4) {
this.$refs.editMire.infoId = obj.id
this.$refs.editMire.getInfo(obj.id)
this.$refs.editMire.isShow = true
}
}
},
del(obj) {
var that = this;
if (obj) {
@ -907,282 +652,29 @@
}
});
}
},
getUserName(row) {
if (row.admin) {
return row.admin.name;
} else if (row.user) {
return row.user.name;
} else {
return "未知";
}
},
getMaintinName(row) {
if (row.user) {
if (row.user.maintain) {
return row.user.maintain.name;
} else {
return "";
}
} else {
return "";
}
},
returnTitleId(arr) {
if (arr.length == 0) {
return
}
let getArr = ""
for (var m of arr) {
getArr += m + ","
}
getArr = getArr.substring(0, getArr.length - 1)
return getArr
},
submitForm(formName) {
var that = this;
var listUrlbefore = []
for (var m of this.filesList) {
m.photoType = "before";
if (m.response)
listUrlbefore.push({
"upload_id": m.response.id
});
else
listUrlbefore.push({
"upload_id": m.id
});
}
this.form.files_list = listUrlbefore;
let listUrlafter = [];
for (var m of this.dealFilesList) {
if (m.response)
listUrlafter.push({
"upload_id": m.response.id
});
else
listUrlafter.push({
"upload_id": m.upload_id
});
}
this.form.files_deal_list = listUrlafter
that.form.title_id = this.returnTitleId(that.titleArr)
this.$refs[formName].validate((valid) => {
if (valid) {
that.submitAll(that.rainType, that.form[this.idname])
} else {
this.$Message.error('数据校验失败');
console.log('error submit!!');
return false;
}
});
},
submitFormDetail(formName, status) {
var that = this;
that.formdetail.status = status
console.log(that.formdetail)
// return
update(that.formdetail).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormDetailVisible = false;
}).catch(error => {
//reject(error)
})
},
resetForm(formName) {
var that = this;
that.filesList = [];
that.dealFilesList = [];
that.mapform = ['', '', ''];
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
that.dialogFormDetailVisible = false;
},
resetFormDetail(formName) {
var that = this;
that.filesList = [];
that.dealFilesList = [];
that.mapform = ['', '', ''];
that.form = {};
that.rainMaintainLogs = []
that.end_types = 0;
that.formdetail.type = 0
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
that.dialogFormDetailVisible = false;
},
handleRemove(file) {
if (file.photoType == "before") {
for (var i = 0; i < this.filesList.length; i++) {
if (this.filesList[i].url == file.url) {
this.filesList.splice(i, 1)
}
}
} else if (file.photoType == "after") {
for (var i = 0; i < this.dealFilesList.length; i++) {
if (this.dealFilesList[i].url == file.url) {
this.dealFilesList.splice(i, 1)
}
}
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
handlesuccess(response, file, fileList, index) {
if (index == 1) {
file.photoType = "before"
this.filesList = fileList;
// this.form.files_list = listUrl;
} else {
file.photoType = "after"
this.dealFilesList = fileList
}
this.$message({
message: '上传成功',
type: 'success'
});
},
handleError(err, file, fileList) {
this.$message.error('上传失败,重新上传');
},
resetrainType() {
this.rainTypeVisible = false
},
submitRainType() {
var that = this
if (that.rainType == 1 || that.rainType == 2 || that.rainType == 3 || that.rainType == 5 || that.rainType ==
6 || that.rainType ==
7) {
this.$refs.editCirculation.rainType = that.rainType
this.$refs.editCirculation.getInfo()
this.$refs.editCirculation.isShow = true
} else if (that.rainType == 4) {
this.$refs.editMire.getInfo()
this.$refs.editMire.isShow = true
}
this.rainTypeVisible = false
return
this.rainTypeVisible = false
if (that.rainType == 1 || that.rainType == 2 || that.rainType == 5 || that.rainType == 6 || that.rainType ==
7 || that.rainType == 3) {
if (that.rainType == 1) {
that.rainTitle = "雨水管道疏挖"
} else if (that.rainType == 2) {
that.rainTitle = "雨水管道疏通"
} else if (that.rainType == 5) {
that.rainTitle = "出水口排查"
} else if (that.rainType == 3) {
that.rainTitle = "汛期助排"
} else if (that.rainType == 6) {
that.rainTitle = "专项处理"
} else if (that.rainType == 7) {
that.rainTitle = "维修"
} else {
that.rainTitle = "雨管养护"
}
getparameteritem('maintainContent_' + that.rainType).then(res => {
that.maintaninList = res.detail
})
} else if (that.rainType == 4) {
that.rainTitle = "污泥外运"
that.maintaninList = []
} else {
that.rainTitle = "雨水管道疏挖"
}
this.dialogFormVisible = true;
},
submitAll(type, id) {
var that = this;
// return
that.form.type = type;
console.log(that.form.type)
switch (parseInt(type)) {
case 1:
case 2:
case 6:
case 7:
if (id) {
savecirculation(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
} else {
storecirculation(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
}
break;
case 3:
if (id) {
savedischarge(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
} else {
storedischarge(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
}
break;
case 4:
if (id) {
savemire(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
} else {
storemire(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
}
break;
case 5:
if (id) {
savewater(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
} else {
storewater(that.form).then(response => {
this.$Message.success('操作成功');
that.load();
that.dialogFormVisible = false;
}).catch(error => {
//reject(error)
})
}
break;
}
}
}
}
</script>

@ -110,13 +110,16 @@
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<maintainInfo @update="updeatshow" ref="maintain" :dialogFormDetailVisible='showinfo'></maintainInfo>
<!-- <maintainInfo @update="updeatshow" ref="maintain" :dialogFormDetailVisible='showinfo'></maintainInfo> -->
<!-- // -->
<showRainEquipmentInfo ref="showRainEquipmentInfo"></showRainEquipmentInfo>
<showRainSiteInfo ref="showRainSiteInfo"></showRainSiteInfo>
<!-- 查看 审核 办结 -->
<showCirculationInfo ref="showCirculationInfo" @auditSuccess="load"></showCirculationInfo>
<showDischargeInfo ref="showDischargeInfo" @auditSuccess="load"></showDischargeInfo>
<showMireInfo ref="showMireInfo" @auditSuccess="load"></showMireInfo>
@ -141,13 +144,20 @@
import LxHeader from "@/components/LxHeader/index.vue";
import maintainInfo from '@/views/rain/order/components/maintainInfo'
import showRainEquipmentInfo from '@/views/rain/inspection/components/showRainEquipmentInfo'
import showRainSiteInfo from '@/views/rain/inspection/components/showRainSiteInfo'
import showRainSiteInfo from '@/views/rain/inspection/components/showRainSiteInfo'
import showCirculationInfo from '@/views/rain/maintain/components/showCirculationInfo'
import showDischargeInfo from '@/views/rain/maintain/components/showDischargeInfo'
import showMireInfo from '@/views/rain/maintain/components/showMireInfo'
export default {
components: {
LxHeader,
maintainInfo,
showRainEquipmentInfo,
showRainSiteInfo
showRainSiteInfo,
showCirculationInfo,
showDischargeInfo,
showMireInfo,
},
data() {
return {
@ -438,10 +448,29 @@ updeatshow(e){
this.$refs.showRainSiteInfo.formType = 'showform'
}
}
if(obj.rain_maintain_id){
this.showinfo = true
this.$refs.maintain.info(obj.rain_maintain_id)
}
// if(obj.rain_maintain_id){
// this.showinfo = true
// this.$refs.maintain.info(obj.rain_maintain_id)
// }
if(obj.rain_maintain_id>0){
if (obj.old_type == 1 || obj.old_type == 2 || obj.old_type == 6 || obj.old_type == 7 || obj.old_type == 5) {
this.$refs.showCirculationInfo.isShow = true
this.$refs.showCirculationInfo.infoId = obj.rain_maintain_id
this.$refs.showCirculationInfo.formType = 'showform'
this.$refs.showCirculationInfo.getInfo(obj.rain_maintain_id)
} else if (obj.old_type == 3) {
this.$refs.showDischargeInfo.isShow = true
this.$refs.showDischargeInfo.infoId = obj.rain_maintain_id
this.$refs.showDischargeInfo.formType = 'showform'
this.$refs.showDischargeInfo.getInfo(obj.rain_maintain_id)
} else if (obj.old_type == 4) {
this.$refs.showMireInfo.isShow = true
this.$refs.showMireInfo.infoId = obj.rain_maintain_id
this.$refs.showMireInfo.formType = 'showform'
this.$refs.showMireInfo.getInfo(obj.rain_maintain_id)
}
}
},
edit(obj) {

Loading…
Cancel
Save