|
|
|
|
@ -25,11 +25,11 @@
|
|
|
|
|
<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="260" prop="scope" label="覆盖范围(米)" label-position="left" required>
|
|
|
|
|
<u-input type="number" v-model="form.scope" placeholder="请填写覆盖范围"/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<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 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="260" prop="point_name" label="点位名称" label-position="left" required>
|
|
|
|
|
<u-input v-model="form.point_name" type='text' placeholder="请填写点位名称"/>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
</block>
|
|
|
|
|
<view v-if="!formshow">
|
|
|
|
|
@ -43,12 +43,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="build_unit" required>
|
|
|
|
|
<u-input required placeholder="请填写建设单位" v-model="form.build_unit" type="text" :border="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="施工单位" label-position="top" prop="carry_unit" required>
|
|
|
|
|
<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"
|
|
|
|
|
@ -63,6 +63,12 @@
|
|
|
|
|
{{item.name}}
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</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-input placeholder="请填写备注" v-model="form.remark" type='textarea' height='100' :border="true" />
|
|
|
|
|
@ -79,7 +85,7 @@
|
|
|
|
|
</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"
|
|
|
|
|
@ -104,9 +110,9 @@
|
|
|
|
|
<!-- <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>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
@ -117,34 +123,35 @@
|
|
|
|
|
{{item.name}}
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<block v-if="form.is_unusual==0">
|
|
|
|
|
</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>
|
|
|
|
|
<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="260" label-position="left" label="是否现场处理">
|
|
|
|
|
<u-radio-group v-model="form.is_scene">
|
|
|
|
|
@ -167,7 +174,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</u-form>
|
|
|
|
|
<u-button type="primary" @click="submit">提交</u-button>
|
|
|
|
|
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -182,8 +189,8 @@
|
|
|
|
|
roadName: "",
|
|
|
|
|
instype: 1,
|
|
|
|
|
typeShow: false,
|
|
|
|
|
askShow: false,
|
|
|
|
|
unusualShow:false,
|
|
|
|
|
askShow: false,
|
|
|
|
|
unusualShow: false,
|
|
|
|
|
formshow: true,
|
|
|
|
|
lawshow: false,
|
|
|
|
|
showInfoId: false,
|
|
|
|
|
@ -192,8 +199,8 @@
|
|
|
|
|
buildtypeName: "",
|
|
|
|
|
typeName: "日常雨水设施",
|
|
|
|
|
askName: "",
|
|
|
|
|
lawName: "",
|
|
|
|
|
unusualName:"",
|
|
|
|
|
lawName: "",
|
|
|
|
|
unusualName: "",
|
|
|
|
|
buildName: "",
|
|
|
|
|
confirmText: "确认",
|
|
|
|
|
dateparams: {
|
|
|
|
|
@ -208,50 +215,50 @@
|
|
|
|
|
buildTypes: [],
|
|
|
|
|
buildList: [],
|
|
|
|
|
lawTypes: [],
|
|
|
|
|
askContentList: [],
|
|
|
|
|
unusualList:[],
|
|
|
|
|
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,
|
|
|
|
|
id: 1,
|
|
|
|
|
name: "是"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
@ -270,12 +277,12 @@
|
|
|
|
|
tip: "",
|
|
|
|
|
address: "",
|
|
|
|
|
longitude: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
start_address:"",
|
|
|
|
|
start_longitude: "",
|
|
|
|
|
start_latitude: "",
|
|
|
|
|
end_address: "",
|
|
|
|
|
end_longitude: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
start_address: "",
|
|
|
|
|
start_longitude: "",
|
|
|
|
|
start_latitude: "",
|
|
|
|
|
end_address: "",
|
|
|
|
|
end_longitude: "",
|
|
|
|
|
end_latitude: "",
|
|
|
|
|
files_list: [],
|
|
|
|
|
files_end_list: [],
|
|
|
|
|
@ -286,13 +293,12 @@
|
|
|
|
|
status: "",
|
|
|
|
|
remark: "",
|
|
|
|
|
is_law: "",
|
|
|
|
|
break_id: "",
|
|
|
|
|
mobile_worksheet_id:"",
|
|
|
|
|
build_unit:"",
|
|
|
|
|
carry_unit:""
|
|
|
|
|
break_id: "",
|
|
|
|
|
mobile_worksheet_id: "",
|
|
|
|
|
build_unit: "",
|
|
|
|
|
carry_unit: ""
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
apis: {
|
|
|
|
|
store: [
|
|
|
|
|
@ -311,7 +317,7 @@
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.loadAskContent();
|
|
|
|
|
this.loadLawTypes();
|
|
|
|
|
this.loadLawTypes();
|
|
|
|
|
this.loadUnusualContent();
|
|
|
|
|
// this.loadBuild();
|
|
|
|
|
this.loadBuildType();
|
|
|
|
|
@ -347,24 +353,23 @@
|
|
|
|
|
}
|
|
|
|
|
if (loc) {
|
|
|
|
|
that.form.latitude = JSON.parse(loc).lat;
|
|
|
|
|
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.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.start_latitude = res.latitude;
|
|
|
|
|
that.form.start_longitude = res.longitude;
|
|
|
|
|
that.form.end_latitude = res.latitude;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _latlog= that.gcoord.transformFromWGSToGCJ(that.form.latitude,that.form.longitude);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _latlog = that.gcoord.transformFromWGSToGCJ(that.form.latitude, that.form.longitude);
|
|
|
|
|
|
|
|
|
|
const url =
|
|
|
|
|
"https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location=" +
|
|
|
|
|
@ -372,8 +377,8 @@
|
|
|
|
|
that.$jsonp(
|
|
|
|
|
url
|
|
|
|
|
).then(re => {
|
|
|
|
|
that.form.address = re.result.formatted_addresses.recommend
|
|
|
|
|
that.form.start_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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -431,9 +436,11 @@
|
|
|
|
|
that.form.remark = buildinfo.remark
|
|
|
|
|
that.form.latitude = buildinfo.latitude;
|
|
|
|
|
that.form.longitude = buildinfo.longitude;
|
|
|
|
|
that.form.address = buildinfo.address;
|
|
|
|
|
that.form.build_unit = buildinfo.build_unit
|
|
|
|
|
that.form.carry_unit = buildinfo.carry_unit
|
|
|
|
|
that.form.address = buildinfo.address;
|
|
|
|
|
that.form.build_unit = buildinfo.build_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) {
|
|
|
|
|
if (that.form.type == m.id) {
|
|
|
|
|
that.buildtypeName = m.value
|
|
|
|
|
@ -446,11 +453,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
|
|
|
|
|
},
|
|
|
|
|
confirmUnusualType(val) {
|
|
|
|
|
var that = this
|
|
|
|
|
that.unusualName = val[0].label
|
|
|
|
|
that.form.unusual_type_id = val[0].value
|
|
|
|
|
},
|
|
|
|
|
confirmLawType(val) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
@ -476,27 +483,26 @@
|
|
|
|
|
that.form.is_law = 0
|
|
|
|
|
if (val[0].value == 2) {
|
|
|
|
|
that.formshow = 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=""
|
|
|
|
|
that.form.ask_content_id=""
|
|
|
|
|
that.askName=""
|
|
|
|
|
}
|
|
|
|
|
if (val[0].value == 1) {
|
|
|
|
|
that.loadAskContent()
|
|
|
|
|
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 = ""
|
|
|
|
|
that.form.ask_content_id = ""
|
|
|
|
|
that.askName = ""
|
|
|
|
|
}
|
|
|
|
|
if (val[0].value == 1) {
|
|
|
|
|
that.loadAskContent()
|
|
|
|
|
}
|
|
|
|
|
console.log("res", that.form)
|
|
|
|
|
},
|
|
|
|
|
chooseLocation(e) { //打开地图选择位置
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _latlog= that.gcoord.transformFromWGSToGCJ(that.form.latitude,that.form.longitude);
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _latlog = that.gcoord.transformFromWGSToGCJ(that.form.latitude, that.form.longitude);
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: _latlog.longitude,
|
|
|
|
|
latitude: _latlog.latitude,
|
|
|
|
|
@ -506,45 +512,45 @@
|
|
|
|
|
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;
|
|
|
|
|
let s_latlog= that.gcoord.transformFromWGSToGCJ(that.form.start_latitude,that.form.start_longitude);
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: s_latlog.longitude,
|
|
|
|
|
latitude: s_latlog.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;
|
|
|
|
|
let e_latlog= that.gcoord.transformFromWGSToGCJ(that.form.end_latitude,that.form.end_longitude);
|
|
|
|
|
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: e_latlog.end_longitude,
|
|
|
|
|
latitude: e_latlog.end_latitude,
|
|
|
|
|
success: res => {
|
|
|
|
|
that.form.end_address = res.name;
|
|
|
|
|
that.form.end_longitude = res.longitude;
|
|
|
|
|
that.form.end_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;
|
|
|
|
|
let s_latlog = that.gcoord.transformFromWGSToGCJ(that.form.start_latitude, that.form.start_longitude);
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: s_latlog.longitude,
|
|
|
|
|
latitude: s_latlog.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;
|
|
|
|
|
let e_latlog = that.gcoord.transformFromWGSToGCJ(that.form.end_latitude, that.form.end_longitude);
|
|
|
|
|
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
longitude: e_latlog.end_longitude,
|
|
|
|
|
latitude: e_latlog.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") {
|
|
|
|
|
@ -661,30 +667,30 @@
|
|
|
|
|
number: "equiementList"
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(result) {
|
|
|
|
|
that.rainArr.askContentList = result.detail
|
|
|
|
|
that.form.ask_content_id = that.rainArr.askContentList[0].id+""
|
|
|
|
|
that.rainArr.askContentList = result.detail
|
|
|
|
|
that.form.ask_content_id = that.rainArr.askContentList[0].id + ""
|
|
|
|
|
that.askName = that.rainArr.askContentList[0].value
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
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) {
|
|
|
|
|
@ -703,8 +709,9 @@
|
|
|
|
|
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.unusualName = result.rain_equipment_info.unusual_type_detail?result.rain_equipment_info.unusual_type_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 = [];
|
|
|
|
|
@ -736,8 +743,8 @@
|
|
|
|
|
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.build_unit = result.building_site_info.building_site.build_unit
|
|
|
|
|
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
|
|
|
|
|
@ -805,9 +812,27 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
|
// return
|
|
|
|
|
return
|
|
|
|
|
let api = "";
|
|
|
|
|
if (this.infoId) {
|
|
|
|
|
api = this.apis.save[this.instype]
|
|
|
|
|
@ -882,4 +907,4 @@
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 20rpx 30rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|