|
|
|
@ -44,10 +44,10 @@
|
|
|
|
<u-form-item label="工地编号" label-position="top" prop="number">
|
|
|
|
<u-form-item label="工地编号" label-position="top" prop="number">
|
|
|
|
<u-input disabled placeholder="工地编号" v-model="form.number" type="text" :border="true" />
|
|
|
|
<u-input disabled placeholder="工地编号" v-model="form.number" type="text" :border="true" />
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label="建设单位" label-position="top" prop="build_unit">
|
|
|
|
<u-form-item label="建设单位" label-position="top" prop="build_unit" required>
|
|
|
|
<u-input placeholder="请填写建设单位" v-model="form.build_unit" type="text" :border="true" />
|
|
|
|
<u-input required placeholder="请填写建设单位" v-model="form.build_unit" type="text" :border="true" />
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label="施工单位" label-position="top" prop="carry_unit">
|
|
|
|
<u-form-item label="施工单位" label-position="top" prop="carry_unit" required>
|
|
|
|
<u-input placeholder="请填写施工单位" v-model="form.carry_unit" type="text" :border="true" />
|
|
|
|
<u-input placeholder="请填写施工单位" v-model="form.carry_unit" type="text" :border="true" />
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label="工地类型" label-position="top" prop="type">
|
|
|
|
<u-form-item label="工地类型" label-position="top" prop="type">
|
|
|
|
@ -64,6 +64,12 @@
|
|
|
|
</u-radio>
|
|
|
|
</u-radio>
|
|
|
|
</u-radio-group>
|
|
|
|
</u-radio-group>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
<u-form-item label="联系人" label-position="top" prop="link_name" required>
|
|
|
|
|
|
|
|
<u-input required placeholder="请填写联系人" v-model="form.link_name" type="text" :border="true" />
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
<u-form-item label="联系号码" label-position="top" prop="link_mobile">
|
|
|
|
|
|
|
|
<u-input placeholder="请填写联系号码" v-model="form.link_mobile" type="text" :border="true" />
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label="备注" label-position="top" prop="remark">
|
|
|
|
<u-form-item label="备注" label-position="top" prop="remark">
|
|
|
|
<u-input placeholder="请填写备注" v-model="form.remark" type='textarea' height='100' :border="true" />
|
|
|
|
<u-input placeholder="请填写备注" v-model="form.remark" type='textarea' height='100' :border="true" />
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
@ -122,12 +128,14 @@
|
|
|
|
<u-form-item label="巡查开始位置" label-position="top">
|
|
|
|
<u-form-item label="巡查开始位置" label-position="top">
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
<u-input v-model="form.start_address" placeholder='请选择巡查开始位置' disabled type='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-button shape="square" slot='right' size="mini" @click="chooseStartLocation" type="info">重新获取
|
|
|
|
|
|
|
|
</u-button>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label="巡查结束位置" label-position="top">
|
|
|
|
<u-form-item label="巡查结束位置" label-position="top">
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
<!-- <text>{{form.address}}</text> -->
|
|
|
|
<u-input v-model="form.end_address" placeholder='请选择巡查结束位置' disabled type='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-button shape="square" slot='right' size="mini" @click="chooseEndLocation" type="info">重新获取
|
|
|
|
|
|
|
|
</u-button>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</block>
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
|
|
@ -139,8 +147,7 @@
|
|
|
|
<u-select v-model="unusualShow" mode="single-column" value-name="id" label-name="value"
|
|
|
|
<u-select v-model="unusualShow" mode="single-column" value-name="id" label-name="value"
|
|
|
|
:list="rainArr.unusualList" @confirm="confirmUnusualType"></u-select>
|
|
|
|
:list="rainArr.unusualList" @confirm="confirmUnusualType"></u-select>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item label-position="top" label="异常处置建议"
|
|
|
|
<u-form-item label-position="top" label="异常处置建议" prop="tip">
|
|
|
|
prop="tip">
|
|
|
|
|
|
|
|
<u-input v-model="form.tip" type='textarea' height='100' :border="true" />
|
|
|
|
<u-input v-model="form.tip" type='textarea' height='100' :border="true" />
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</block>
|
|
|
|
</block>
|
|
|
|
@ -167,7 +174,7 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</u-form>
|
|
|
|
</u-form>
|
|
|
|
<u-button type="primary" @click="submit">提交</u-button>
|
|
|
|
<u-button type="primary" @click="submit">提交</u-button>
|
|
|
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -292,7 +299,6 @@
|
|
|
|
carry_unit: ""
|
|
|
|
carry_unit: ""
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
apis: {
|
|
|
|
apis: {
|
|
|
|
store: [
|
|
|
|
store: [
|
|
|
|
@ -365,7 +371,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
let _latlog = that.gcoord.transformFromWGSToGCJ(that.form.latitude, that.form.longitude);
|
|
|
|
let _latlog = that.gcoord.transformFromWGSToGCJ(that.form.latitude, that.form.longitude);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const url =
|
|
|
|
const url =
|
|
|
|
"https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location=" +
|
|
|
|
"https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location=" +
|
|
|
|
_latlog.latitude + "," + _latlog.longitude + "&output=jsonp"
|
|
|
|
_latlog.latitude + "," + _latlog.longitude + "&output=jsonp"
|
|
|
|
@ -434,6 +439,8 @@
|
|
|
|
that.form.address = buildinfo.address;
|
|
|
|
that.form.address = buildinfo.address;
|
|
|
|
that.form.build_unit = buildinfo.build_unit
|
|
|
|
that.form.build_unit = buildinfo.build_unit
|
|
|
|
that.form.carry_unit = buildinfo.carry_unit
|
|
|
|
that.form.carry_unit = buildinfo.carry_unit
|
|
|
|
|
|
|
|
that.form.link_name = buildinfo.link_name
|
|
|
|
|
|
|
|
that.form.link_mobile = buildinfo.link_mobile
|
|
|
|
for (var m of that.rainArr.buildTypes) {
|
|
|
|
for (var m of that.rainArr.buildTypes) {
|
|
|
|
if (that.form.type == m.id) {
|
|
|
|
if (that.form.type == m.id) {
|
|
|
|
that.buildtypeName = m.value
|
|
|
|
that.buildtypeName = m.value
|
|
|
|
@ -496,7 +503,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _latlog = that.gcoord.transformFromWGSToGCJ(that.form.latitude, that.form.longitude);
|
|
|
|
let _latlog = that.gcoord.transformFromWGSToGCJ(that.form.latitude, that.form.longitude);
|
|
|
|
|
|
|
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
uni.chooseLocation({
|
|
|
|
longitude: _latlog.longitude,
|
|
|
|
longitude: _latlog.longitude,
|
|
|
|
latitude: _latlog.latitude,
|
|
|
|
latitude: _latlog.latitude,
|
|
|
|
@ -704,7 +710,8 @@
|
|
|
|
that.form = result.rain_equipment_info;
|
|
|
|
that.form = result.rain_equipment_info;
|
|
|
|
that.form.rain_equipment_id = result.rain_equipment_id;
|
|
|
|
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.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
|
|
|
|
that.roadName = result.rain_equipment_info.road ? result.rain_equipment_info
|
|
|
|
.road.name : ""
|
|
|
|
.road.name : ""
|
|
|
|
let _files = [];
|
|
|
|
let _files = [];
|
|
|
|
@ -806,8 +813,26 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
that.form.files_list = list;
|
|
|
|
that.form.files_list = list;
|
|
|
|
that.form.files_end_list = deallist;
|
|
|
|
that.form.files_end_list = deallist;
|
|
|
|
|
|
|
|
if(that.instype==2){
|
|
|
|
|
|
|
|
if(that.form.link_mobile!=""){
|
|
|
|
|
|
|
|
let res = /^1[3456789]\d{9}$/
|
|
|
|
|
|
|
|
if(!res.test(that.form.link_mobile)){
|
|
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
|
|
title: '请填写正确的11位手机号'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(that.form.name==""||that.form.build_unit==""||that.form.carry_unit==""||that.form.link_name==""||that.form.type==""||that.form.status==""){
|
|
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
|
|
title: '请填写完整信息后提交'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
console.log(that.form)
|
|
|
|
console.log(that.form)
|
|
|
|
// return
|
|
|
|
return
|
|
|
|
let api = "";
|
|
|
|
let api = "";
|
|
|
|
if (this.infoId) {
|
|
|
|
if (this.infoId) {
|
|
|
|
api = this.apis.save[this.instype]
|
|
|
|
api = this.apis.save[this.instype]
|
|
|
|
|