|
|
|
|
@ -19,10 +19,17 @@
|
|
|
|
|
|
|
|
|
|
<block v-if="formshow">
|
|
|
|
|
<u-form-item label="养护内容" label-position="top" prop="type" required>
|
|
|
|
|
<u-input placeholder="请选择养护内容" v-model="askName" type="select" :border="true"
|
|
|
|
|
<!-- <u-input placeholder="请选择养护内容" v-model="askName" type="select" :border="true"
|
|
|
|
|
@click="askShow = true" />
|
|
|
|
|
<u-select v-model="askShow" mode="single-column" value-name="id" label-name="value"
|
|
|
|
|
:list="rainArr.askContentList" @confirm="confirmAskType"></u-select>
|
|
|
|
|
:list="rainArr.askContentList" @confirm="confirmAskType"></u-select> -->
|
|
|
|
|
<u-checkbox-group @change="checkboxGroupChange">
|
|
|
|
|
<u-checkbox
|
|
|
|
|
v-for="(item, index) in rainArr.askContentList" :key="index"
|
|
|
|
|
v-model="item.checked"
|
|
|
|
|
:name="item.id"
|
|
|
|
|
>{{item.value}}</u-checkbox>
|
|
|
|
|
</u-checkbox-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="位置" label-position="top" required>
|
|
|
|
|
<u-input v-model="form.address" disabled type='text' />
|
|
|
|
|
@ -95,7 +102,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</u-form>
|
|
|
|
|
<u-button type="primary" @click="submit">提交</u-button>
|
|
|
|
|
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -124,7 +131,8 @@
|
|
|
|
|
hour: true,
|
|
|
|
|
minute: true,
|
|
|
|
|
second: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
askArr:[],
|
|
|
|
|
rainArr: {
|
|
|
|
|
askContentList: [],
|
|
|
|
|
rainTypes: [{
|
|
|
|
|
@ -196,7 +204,8 @@
|
|
|
|
|
point_name: "",
|
|
|
|
|
title_id: "",
|
|
|
|
|
mobile_worksheet_id:""
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
gettype:null,
|
|
|
|
|
rules: {
|
|
|
|
|
// scope: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
@ -243,8 +252,14 @@
|
|
|
|
|
var that = this;
|
|
|
|
|
if (options.id) {
|
|
|
|
|
this.infoId = options.id;
|
|
|
|
|
this.showInfoId = true
|
|
|
|
|
this.showInfo(this.infoId);
|
|
|
|
|
this.showInfoId = true
|
|
|
|
|
this.gettype=options.type
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
that.showInfo(that.infoId);
|
|
|
|
|
},1000)
|
|
|
|
|
that.loadAskContent(that.gettype);
|
|
|
|
|
}else{
|
|
|
|
|
that.loadAskContent(1)
|
|
|
|
|
}
|
|
|
|
|
if (options.roadid) {
|
|
|
|
|
this.form.road_id = options.roadid
|
|
|
|
|
@ -253,9 +268,8 @@
|
|
|
|
|
if(options.orderId){
|
|
|
|
|
this.form.mobile_worksheet_id = options.orderId
|
|
|
|
|
}
|
|
|
|
|
that.loadAskContent();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.rainArr.askContentList = that.rainArr.askContentList_1
|
|
|
|
|
this.action = this.util.HOST + "/api/mobile/upload-file";
|
|
|
|
|
this.otherData.token = uni.getStorageSync("userInfo_token").access_token;
|
|
|
|
|
},
|
|
|
|
|
@ -322,43 +336,57 @@
|
|
|
|
|
this.$refs.uUploaddeal.clear();
|
|
|
|
|
}
|
|
|
|
|
that.form.is_law = 0
|
|
|
|
|
that.form.is_solve = 0
|
|
|
|
|
that.form.is_solve = 0
|
|
|
|
|
that.askArr=[]
|
|
|
|
|
if (val[0].value == 4) {
|
|
|
|
|
that.formshow = false
|
|
|
|
|
that.form.address = ""
|
|
|
|
|
that.form.latitude = ""
|
|
|
|
|
that.form.longitude = ""
|
|
|
|
|
that.form.title_id=""
|
|
|
|
|
|
|
|
|
|
that.askName=""
|
|
|
|
|
}
|
|
|
|
|
if (val[0].value == 3 || val[0].value == 4) {
|
|
|
|
|
that.lawshow = false
|
|
|
|
|
that.aboutShow = true
|
|
|
|
|
that.aboutShow = true
|
|
|
|
|
that.form.title_id=""
|
|
|
|
|
}
|
|
|
|
|
if (val[0].value == 5) {
|
|
|
|
|
that.aboutShow = true
|
|
|
|
|
that.numShow = true
|
|
|
|
|
}
|
|
|
|
|
if(val[0].value !=4){
|
|
|
|
|
that.loadAskContent(val[0].value);
|
|
|
|
|
}
|
|
|
|
|
that.loadAskContent();
|
|
|
|
|
console.log("res", that.form)
|
|
|
|
|
},
|
|
|
|
|
confirmAskType(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.askName = e[0].label
|
|
|
|
|
this.form.title_id = e[0].value
|
|
|
|
|
},
|
|
|
|
|
checkboxGroupChange(val){
|
|
|
|
|
this.askArr = val
|
|
|
|
|
console.log(val)
|
|
|
|
|
},
|
|
|
|
|
loadAskContent() {
|
|
|
|
|
var that = this;
|
|
|
|
|
loadAskContent(type) {
|
|
|
|
|
var that = this;
|
|
|
|
|
type?type:that.form.type
|
|
|
|
|
that.util.request({
|
|
|
|
|
api: '/api/admin/parameter/show',
|
|
|
|
|
method: "get",
|
|
|
|
|
data: {
|
|
|
|
|
number: "maintainContent" + "_" + that.form.type
|
|
|
|
|
number: "maintainContent" + "_" + type
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(result) {
|
|
|
|
|
that.rainArr.askContentList = result.detail
|
|
|
|
|
that.form.title_id = that.rainArr.askContentList[0].id+""
|
|
|
|
|
that.askName = that.rainArr.askContentList[0].value
|
|
|
|
|
that.rainArr["askContentList_"+type] = result.detail
|
|
|
|
|
for(var m of that.rainArr["askContentList_"+type]){
|
|
|
|
|
// m.checked = false
|
|
|
|
|
that.$set(m, 'checked', false)
|
|
|
|
|
}
|
|
|
|
|
console.log(that.gettype)
|
|
|
|
|
if(!that.gettype){
|
|
|
|
|
that.rainArr.askContentList = that.rainArr["askContentList_"+type]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
that.util.alert(res);
|
|
|
|
|
@ -425,15 +453,17 @@
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showInfo(id) {
|
|
|
|
|
var that = this;
|
|
|
|
|
var that = this;
|
|
|
|
|
// await that.loadAskContent(that.gettype)
|
|
|
|
|
that.util.request({
|
|
|
|
|
api: '/api/mobile/rain-maintains/show',
|
|
|
|
|
method: "get",
|
|
|
|
|
data: {
|
|
|
|
|
id: id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(result) {
|
|
|
|
|
|
|
|
|
|
utilSuccess: function(result) {
|
|
|
|
|
|
|
|
|
|
that.rainArr.askContentList = that.rainArr["askContentList_"+result.old_type]
|
|
|
|
|
switch (result.old_type) {
|
|
|
|
|
case 1:
|
|
|
|
|
case 2:
|
|
|
|
|
@ -475,8 +505,20 @@
|
|
|
|
|
_filesafter.push(m);
|
|
|
|
|
}
|
|
|
|
|
that.dealFilesList = _filesafter;
|
|
|
|
|
that.form.type = result.type
|
|
|
|
|
console.log(that.form)
|
|
|
|
|
that.form.type = result.type
|
|
|
|
|
that.form.title_id=that.form.title_id+""
|
|
|
|
|
if(that.form.title_id!=""){
|
|
|
|
|
that.askArr = that.form.title_id.split(",")
|
|
|
|
|
for(var m of that.askArr){
|
|
|
|
|
m = parseInt(m)
|
|
|
|
|
for(var k of that.rainArr.askContentList){
|
|
|
|
|
if(m==k.id){
|
|
|
|
|
console.log(m)
|
|
|
|
|
k.checked = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
that.typeName = "出水口排查"
|
|
|
|
|
@ -507,8 +549,20 @@
|
|
|
|
|
water_filesafter.push(m);
|
|
|
|
|
}
|
|
|
|
|
that.dealFilesList = water_filesafter;
|
|
|
|
|
that.form.type = result.type
|
|
|
|
|
console.log(that.form)
|
|
|
|
|
that.form.type = result.type
|
|
|
|
|
that.form.title_id=that.form.title_id+""
|
|
|
|
|
if(that.form.title_id!=""){
|
|
|
|
|
that.askArr = that.form.title_id.split(",")
|
|
|
|
|
for(var m of that.askArr){
|
|
|
|
|
m = parseInt(m)
|
|
|
|
|
for(var k of that.rainArr.askContentList){
|
|
|
|
|
if(m==k.id){
|
|
|
|
|
console.log(m)
|
|
|
|
|
k.checked = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break
|
|
|
|
|
case 3:
|
|
|
|
|
@ -536,7 +590,20 @@
|
|
|
|
|
discharge_filesafter.push(m);
|
|
|
|
|
}
|
|
|
|
|
that.dealFilesList = discharge_filesafter;
|
|
|
|
|
that.form.type = result.type
|
|
|
|
|
that.form.type = result.type
|
|
|
|
|
that.form.title_id=that.form.title_id+""
|
|
|
|
|
if(that.form.title_id!=""){
|
|
|
|
|
that.askArr = that.form.title_id.split(",")
|
|
|
|
|
for(var m of that.askArr){
|
|
|
|
|
m = parseInt(m)
|
|
|
|
|
for(var k of that.rainArr.askContentList){
|
|
|
|
|
if(m==k.id){
|
|
|
|
|
console.log(m)
|
|
|
|
|
k.checked = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
that.typeName = "污泥外运"
|
|
|
|
|
@ -597,7 +664,26 @@
|
|
|
|
|
api = this.apis.save[this.form.type]
|
|
|
|
|
} else {
|
|
|
|
|
api = this.apis.store[this.form.type]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(that.form.type!=4){
|
|
|
|
|
if(this.askArr.length==0){
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
title: '请选择养护内容'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
console.log(this.askArr)
|
|
|
|
|
let titleContent = ""
|
|
|
|
|
for(var m of this.askArr){
|
|
|
|
|
titleContent+= m+","
|
|
|
|
|
}
|
|
|
|
|
this.form.title_id = titleContent.substring(0,titleContent.length-1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log("forms",this.form)
|
|
|
|
|
console.log("titles",this.form.title_id)
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
|
|
console.log("form", that.form)
|
|
|
|
|
|