|
|
|
|
@ -24,12 +24,12 @@
|
|
|
|
|
<u-select v-model="askShow" mode="single-column" value-name="id" label-name="value"
|
|
|
|
|
:list="rainArr.askContentList" @confirm="confirmAskType"></u-select>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item labelWidth="180" prop="scope" label="覆盖范围(米)" label-position="left" required>
|
|
|
|
|
<!-- <u-form-item labelWidth="260" prop="scope" label="覆盖范围(米)" label-position="left" required>
|
|
|
|
|
<u-input type="number" v-model="form.scope" placeholder="请填写覆盖范围"/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item labelWidth="180" prop="point_name" label="点位名称" label-position="left" required>
|
|
|
|
|
<u-form-item labelWidth="260" prop="point_name" label="点位名称" label-position="left" required>
|
|
|
|
|
<u-input v-model="form.point_name" type='text' placeholder="请填写点位名称"/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
</block>
|
|
|
|
|
<view v-if="!formshow">
|
|
|
|
|
<u-form-item label="工地名称" label-position="top" prop="type" required>
|
|
|
|
|
@ -42,6 +42,12 @@
|
|
|
|
|
|
|
|
|
|
<u-form-item label="工地编号" label-position="top" prop="number">
|
|
|
|
|
<u-input disabled placeholder="工地编号" v-model="form.number" type="text" :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="建设单位" label-position="top" prop="build_unit">
|
|
|
|
|
<u-input placeholder="请填写建设单位" v-model="form.build_unit" type="text" :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="施工单位" label-position="top" prop="carry_unit">
|
|
|
|
|
<u-input placeholder="请填写施工单位" v-model="form.carry_unit" type="text" :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="工地类型" label-position="top" prop="type">
|
|
|
|
|
<u-input placeholder="请选择工地类型" v-model="buildtypeName" type="select" :border="true"
|
|
|
|
|
@ -65,16 +71,14 @@
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-form-item label="位置" label-position="top" required>
|
|
|
|
|
<u-form-item label="所在位置" label-position="top" required>
|
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
|
<u-input v-model="form.address" disabled type='text' />
|
|
|
|
|
<u-button shape="square" slot='right' size="mini" @click="chooseLocation" type="info">重新获取</u-button>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-form-item label-position="top" label="描述" prop="content" required>
|
|
|
|
|
<u-input v-model="form.content" type='textarea' height='100' :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
<u-form-item label-position="top" label="现场照片">
|
|
|
|
|
<u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text="选择附件"
|
|
|
|
|
:previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="filesList"
|
|
|
|
|
@ -98,23 +102,49 @@
|
|
|
|
|
<!-- <u-picker :show="typeShow" keyName="name" :columns="rainArr.rainTypes" @confirm="confirmType"></u-picker> -->
|
|
|
|
|
<u-select v-model="lawshow" mode="single-column" value-name="id" label-name="value"
|
|
|
|
|
:list="rainArr.lawTypes" @confirm="confirmLawType"></u-select>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item v-if='form.is_law==1' label-position="top" label="描述" prop="content">
|
|
|
|
|
<u-input v-model="form.content" type='textarea' height='100' :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view v-if="formshow">
|
|
|
|
|
<u-form-item labelWidth="180" label-position="left" label="是否异常">
|
|
|
|
|
<u-radio-group v-model="form.is_unusual">
|
|
|
|
|
<u-radio-group v-model="form.is_unusual" @change="unusualchange">
|
|
|
|
|
<u-radio v-for="(item, index) in rainArr.unusuals" :key="index" :name="item.id">
|
|
|
|
|
{{item.name}}
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item v-if="form.is_unusual==1||form.is_unusual==2" label-position="top" label="异常处置建议"
|
|
|
|
|
prop="tip">
|
|
|
|
|
<u-input v-model="form.tip" type='textarea' height='100' :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<block v-if="form.is_unusual==0">
|
|
|
|
|
<u-form-item label="巡查开始位置" label-position="top">
|
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
|
<u-input v-model="form.start_address" placeholder='请选择巡查开始位置' disabled type='text' />
|
|
|
|
|
<u-button shape="square" slot='right' size="mini" @click="chooseStartLocation" type="info">重新获取</u-button>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="巡查结束位置" label-position="top">
|
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
|
<u-input v-model="form.end_address" placeholder='请选择巡查结束位置' disabled type='text' />
|
|
|
|
|
<u-button shape="square" slot='right' size="mini" @click="chooseEndLocation" type="info">重新获取</u-button>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<block v-if="form.is_unusual==1">
|
|
|
|
|
<u-form-item label="异常类型" label-position="top" prop="type" required>
|
|
|
|
|
<u-input placeholder="请选择异常类型" v-model="unusualName" type="select" :border="true"
|
|
|
|
|
@click="unusualShow = true" />
|
|
|
|
|
<!-- <u-picker :show="typeShow" keyName="name" :columns="rainArr.rainTypes" @confirm="confirmType"></u-picker> -->
|
|
|
|
|
<u-select v-model="unusualShow" mode="single-column" value-name="id" label-name="value"
|
|
|
|
|
:list="rainArr.unusualList" @confirm="confirmUnusualType"></u-select>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label-position="top" label="异常处置建议"
|
|
|
|
|
prop="tip">
|
|
|
|
|
<u-input v-model="form.tip" type='textarea' height='100' :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-form-item labelWidth="180" label-position="left" label="是否现场处理">
|
|
|
|
|
<u-form-item labelWidth="260" label-position="left" label="是否现场处理">
|
|
|
|
|
<u-radio-group v-model="form.is_scene">
|
|
|
|
|
<u-radio v-for="(item, index) in rainArr.scenes" :key="index" :name="item.id">
|
|
|
|
|
{{item.name}}
|
|
|
|
|
@ -149,7 +179,8 @@
|
|
|
|
|
roadName: "",
|
|
|
|
|
instype: 1,
|
|
|
|
|
typeShow: false,
|
|
|
|
|
askShow: false,
|
|
|
|
|
askShow: false,
|
|
|
|
|
unusualShow:false,
|
|
|
|
|
formshow: true,
|
|
|
|
|
lawshow: false,
|
|
|
|
|
showInfoId: false,
|
|
|
|
|
@ -158,7 +189,8 @@
|
|
|
|
|
buildtypeName: "",
|
|
|
|
|
typeName: "日常雨水设施",
|
|
|
|
|
askName: "",
|
|
|
|
|
lawName: "",
|
|
|
|
|
lawName: "",
|
|
|
|
|
unusualName:"",
|
|
|
|
|
buildName: "",
|
|
|
|
|
confirmText: "确认",
|
|
|
|
|
dateparams: {
|
|
|
|
|
@ -173,54 +205,51 @@
|
|
|
|
|
buildTypes: [],
|
|
|
|
|
buildList: [],
|
|
|
|
|
lawTypes: [],
|
|
|
|
|
askContentList: [],
|
|
|
|
|
askContentList: [],
|
|
|
|
|
unusualList:[],
|
|
|
|
|
statuss: [{
|
|
|
|
|
id: 1,
|
|
|
|
|
id:1,
|
|
|
|
|
name: "在建"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
id:2,
|
|
|
|
|
name: "完工"
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
rainTypes: [{
|
|
|
|
|
id: 1,
|
|
|
|
|
id:1,
|
|
|
|
|
name: "日常雨水设施"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
id:2,
|
|
|
|
|
name: "在建工地"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
scenes: [{
|
|
|
|
|
id: 0,
|
|
|
|
|
id:0,
|
|
|
|
|
name: "否"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
id:1,
|
|
|
|
|
name: "是"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
laws: [{
|
|
|
|
|
id: 0,
|
|
|
|
|
id:0,
|
|
|
|
|
name: "否"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
id:1,
|
|
|
|
|
name: "是"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
unusuals: [{
|
|
|
|
|
id: 0,
|
|
|
|
|
id:0,
|
|
|
|
|
name: "否"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
name: "丢失"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
name: "破损"
|
|
|
|
|
id:1,
|
|
|
|
|
name: "是"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
@ -238,7 +267,13 @@
|
|
|
|
|
tip: "",
|
|
|
|
|
address: "",
|
|
|
|
|
longitude: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
start_address:"",
|
|
|
|
|
start_longitude: "",
|
|
|
|
|
start_latitude: "",
|
|
|
|
|
end_address: "",
|
|
|
|
|
end_longitude: "",
|
|
|
|
|
end_latitude: "",
|
|
|
|
|
files_list: [],
|
|
|
|
|
files_end_list: [],
|
|
|
|
|
building_site_id: "",
|
|
|
|
|
@ -249,24 +284,12 @@
|
|
|
|
|
remark: "",
|
|
|
|
|
is_law: "",
|
|
|
|
|
break_id: "",
|
|
|
|
|
mobile_worksheet_id:""
|
|
|
|
|
mobile_worksheet_id:"",
|
|
|
|
|
build_unit:"",
|
|
|
|
|
carry_unit:""
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
scope: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填写覆盖范围',
|
|
|
|
|
trigger: ['blur'],
|
|
|
|
|
}],
|
|
|
|
|
point_name: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填写点位名称',
|
|
|
|
|
trigger: ['blur'],
|
|
|
|
|
}],
|
|
|
|
|
content: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填写描述',
|
|
|
|
|
trigger: ['blur'],
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
apis: {
|
|
|
|
|
@ -286,7 +309,8 @@
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.loadAskContent();
|
|
|
|
|
this.loadLawTypes();
|
|
|
|
|
this.loadLawTypes();
|
|
|
|
|
this.loadUnusualContent();
|
|
|
|
|
// this.loadBuild();
|
|
|
|
|
this.loadBuildType();
|
|
|
|
|
if (options.id) {
|
|
|
|
|
@ -321,10 +345,18 @@
|
|
|
|
|
}
|
|
|
|
|
if (loc) {
|
|
|
|
|
that.form.latitude = JSON.parse(loc).lat;
|
|
|
|
|
that.form.longitude = JSON.parse(loc).lon;
|
|
|
|
|
that.form.longitude = JSON.parse(loc).lon;
|
|
|
|
|
that.form.start_latitude = JSON.parse(loc).lat;
|
|
|
|
|
that.form.start_longitude = JSON.parse(loc).lon;
|
|
|
|
|
that.form.end_latitude = JSON.parse(loc).lat;
|
|
|
|
|
that.form.end_longitude = JSON.parse(loc).lon;
|
|
|
|
|
} else {
|
|
|
|
|
that.form.latitude = res.latitude;
|
|
|
|
|
that.form.longitude = res.longitude;
|
|
|
|
|
that.form.longitude = res.longitude;
|
|
|
|
|
that.form.start_latitude = res.latitude;
|
|
|
|
|
that.form.start_longitude = res.longitude;
|
|
|
|
|
that.form.end_latitude = res.latitude;
|
|
|
|
|
that.form.end_longitude = res.longitude;
|
|
|
|
|
}
|
|
|
|
|
const url =
|
|
|
|
|
"https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location=" +
|
|
|
|
|
@ -332,7 +364,9 @@
|
|
|
|
|
that.$jsonp(
|
|
|
|
|
url
|
|
|
|
|
).then(re => {
|
|
|
|
|
that.form.address = re.result.formatted_addresses.recommend
|
|
|
|
|
that.form.address = re.result.formatted_addresses.recommend
|
|
|
|
|
that.form.start_address = re.result.formatted_addresses.recommend
|
|
|
|
|
that.form.end_address = re.result.formatted_addresses.recommend
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -350,7 +384,6 @@
|
|
|
|
|
var that = this
|
|
|
|
|
// that.rainArr.buildList = []
|
|
|
|
|
that.loadBuild()
|
|
|
|
|
console.log("123", that.rainArr.buildList)
|
|
|
|
|
// if(that.rainArr.buildList){
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
@ -390,7 +423,9 @@
|
|
|
|
|
that.form.remark = buildinfo.remark
|
|
|
|
|
that.form.latitude = buildinfo.latitude;
|
|
|
|
|
that.form.longitude = buildinfo.longitude;
|
|
|
|
|
that.form.address = buildinfo.address;
|
|
|
|
|
that.form.address = buildinfo.address;
|
|
|
|
|
that.form.build_unit = buildinfo.build_unit
|
|
|
|
|
that.form.carry_unit = buildinfo.carry_unit
|
|
|
|
|
for (var m of that.rainArr.buildTypes) {
|
|
|
|
|
if (that.form.type == m.id) {
|
|
|
|
|
that.buildtypeName = m.value
|
|
|
|
|
@ -403,6 +438,11 @@
|
|
|
|
|
var that = this
|
|
|
|
|
that.askName = val[0].label
|
|
|
|
|
that.form.ask_content_id = val[0].value
|
|
|
|
|
},
|
|
|
|
|
confirmUnusualType(val) {
|
|
|
|
|
var that = this
|
|
|
|
|
that.unusualName = val[0].label
|
|
|
|
|
that.form.unusual_type_id = val[0].value
|
|
|
|
|
},
|
|
|
|
|
confirmLawType(val) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
@ -428,7 +468,13 @@
|
|
|
|
|
that.form.is_law = 0
|
|
|
|
|
if (val[0].value == 2) {
|
|
|
|
|
that.formshow = false
|
|
|
|
|
that.lawshow = false
|
|
|
|
|
that.lawshow = false
|
|
|
|
|
that.form.start_address=""
|
|
|
|
|
that.form.start_longitude=""
|
|
|
|
|
that.form.start_latitude=""
|
|
|
|
|
that.form.end_address=""
|
|
|
|
|
that.form.end_longitude=""
|
|
|
|
|
that.form.end_latitude=""
|
|
|
|
|
}
|
|
|
|
|
console.log("res", that.form)
|
|
|
|
|
},
|
|
|
|
|
@ -443,6 +489,42 @@
|
|
|
|
|
that.form.latitude = res.latitude;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
unusualchange(val){
|
|
|
|
|
console.log(val)
|
|
|
|
|
var that = this
|
|
|
|
|
if(val==1){
|
|
|
|
|
that.form.start_address = "";
|
|
|
|
|
that.form.start_longitude = "";
|
|
|
|
|
that.form.start_latitude = "";
|
|
|
|
|
that.form.end_address = "";
|
|
|
|
|
that.form.end_longitude = "";
|
|
|
|
|
that.form.end_latitude = "";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
chooseStartLocation(e) { //打开地图选择位置
|
|
|
|
|
var that = this;
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: that.form.start_longitude,
|
|
|
|
|
latitude: that.form.start_latitude,
|
|
|
|
|
success: res => {
|
|
|
|
|
that.form.start_address = res.name;
|
|
|
|
|
that.form.start_longitude = res.longitude;
|
|
|
|
|
that.form.start_latitude = res.latitude;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
chooseEndLocation(e) { //打开地图选择位置
|
|
|
|
|
var that = this;
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: that.form.end_longitude,
|
|
|
|
|
latitude: that.form.end_latitude,
|
|
|
|
|
success: res => {
|
|
|
|
|
that.form.end_address = res.name;
|
|
|
|
|
that.form.end_longitude = res.longitude;
|
|
|
|
|
that.form.end_latitude = res.latitude;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
toremove(index, lists, name, whatfile) {
|
|
|
|
|
if (whatfile == "filesList") {
|
|
|
|
|
@ -565,6 +647,22 @@
|
|
|
|
|
that.util.alert(res);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
loadUnusualContent() {
|
|
|
|
|
var that = this;
|
|
|
|
|
that.util.request({
|
|
|
|
|
api: '/api/admin/parameter/show',
|
|
|
|
|
method: "get",
|
|
|
|
|
data: {
|
|
|
|
|
number: "unusualList"
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(result) {
|
|
|
|
|
that.rainArr.unusualList = result.detail
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
that.util.alert(res);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showInfo(id) {
|
|
|
|
|
@ -583,7 +681,8 @@
|
|
|
|
|
that.instype = 1
|
|
|
|
|
that.form = result.rain_equipment_info;
|
|
|
|
|
that.form.rain_equipment_id = result.rain_equipment_id;
|
|
|
|
|
that.askName = result.rain_equipment_info.ask_content_detail.value
|
|
|
|
|
that.askName = result.rain_equipment_info.ask_content_detail.value
|
|
|
|
|
that.unusualName = result.rain_equipment_info.unusual_type_detail?result.rain_equipment_info.unusual_type_detail.value:""
|
|
|
|
|
that.roadName = result.rain_equipment_info.road ? result.rain_equipment_info
|
|
|
|
|
.road.name : ""
|
|
|
|
|
let _files = [];
|
|
|
|
|
@ -615,7 +714,9 @@
|
|
|
|
|
that.form.building_site_content_id = result.building_site_content_id;
|
|
|
|
|
that.buildName = result.building_site_info.building_site.name
|
|
|
|
|
that.form.building_site_id = result.building_site_info.building_site.id
|
|
|
|
|
that.form.name = result.building_site_info.building_site.name
|
|
|
|
|
that.form.name = result.building_site_info.building_site.name
|
|
|
|
|
that.form.build_unit = result.building_site_info.building_site.build_unit
|
|
|
|
|
that.form.carry_unit = result.building_site_info.building_site.carry_unit
|
|
|
|
|
that.form.number = result.building_site_info.building_site.number
|
|
|
|
|
that.form.type = result.building_site_info.building_site.type
|
|
|
|
|
that.form.status = result.building_site_info.building_site.status
|
|
|
|
|
|