| | |
| | | </u-input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | | <u-form-item label="九小场所" labelWidth="100" prop="isNine" :required="isRequired">
|
| | | <u-form-item label="九小场所:" labelWidth="100" prop="isNine" :required="isRequired">
|
| | | <u-radio-group v-model="form.isNine" v-if="!currentId">
|
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
|
| | | :key="index" :label="item.name" :name="item.id">
|
| | |
| | | </u-input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | | <u-form-item v-if="form.isNine == 1" label="阵地" labelWidth="100" prop="isFront"
|
| | | :required="isRequired">
|
| | | <u-form-item label="阵地:" labelWidth="100" prop="isFront" :required="isRequired">
|
| | | <u-radio-group v-model="form.isFront" v-if="!currentId">
|
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
|
| | | :key="index" :label="item.name" :name="item.id">
|
| | |
| | | <view class="address-content f-28" v-if="!form.jwd" style="color: #c0c4cc;">
|
| | | 请选择地址
|
| | | </view>
|
| | | <view class="location-btn c-main f-24" @click="getLocation()" v-if="!currentId">
|
| | | <view class="location-btn c-main f-24" @click="getLocation()"
|
| | | v-if="(!currentId && !isView) || (isView && !form.jwd)">
|
| | | 获取地址
|
| | | </view>
|
| | | </view>
|
| | |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="手机号:" prop="principalPhone">
|
| | | <u--input border="none" type="number" v-model="form.principalPhone" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
|
| | | label="身份证号:" prop="principalIdCard">
|
| | | <u--input border="none" type="idcard" v-model="form.principalIdCard" placeholder="请输入">
|
| | | </u--input>
|
| | | </u-form-item>
|
| | | </view>
|
| | |
| | | minioBaseUrl
|
| | | } from "../../../common/setting";
|
| | | import {
|
| | | bizDictionary
|
| | | bizDictionary,
|
| | | bizDictionaryTree
|
| | | } from '@/api/system/dict.js'
|
| | | export default {
|
| | | mixins: [uploadMixin],
|
| | |
| | | placeName: "",
|
| | | principal: '',
|
| | | principalPhone: '',
|
| | | principalIdCard: '',
|
| | | lat: '',
|
| | | lng: '',
|
| | | location: '',
|
| | |
| | | message: '手机号码不正确',
|
| | | trigger: ['change', 'blur']
|
| | |
|
| | | }
|
| | | ],
|
| | | 'form.principalIdCard': [{
|
| | | type: 'string',
|
| | | required: false,
|
| | | message: '请输入身份证号码',
|
| | | trigger: ['change', 'blur']
|
| | | },
|
| | | {
|
| | | validator: (rule, value, callback) => {
|
| | | const idCardRegex =
|
| | | /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
| | | return idCardRegex.test(value)
|
| | | },
|
| | | message: '身份证号码有误',
|
| | | trigger: ['change', 'blur']
|
| | | }
|
| | | ],
|
| | | },
|
| | |
| | | showNineTypePicker: false,
|
| | | showFrontTypePicker: false,
|
| | | nineTypeValue: "",
|
| | | frontTypeValue: ""
|
| | | frontTypeValue: "",
|
| | | isView: false
|
| | |
|
| | |
|
| | | }
|
| | |
| | | options: {
|
| | | styleIsolation: 'shared', // 解除样式隔离
|
| | | },
|
| | | onLoad(option) {
|
| | | async onLoad(option) {
|
| | | await this.getCategory();
|
| | | await this.getAllBizDict();
|
| | | this.getNineTypeList();
|
| | | const {
|
| | | type
|
| | | } = option
|
| | |
| | | this.form.houseCode = option.houseCode
|
| | | }
|
| | | if (option.id || option.houseCode) {
|
| | | this.isView = true;
|
| | | this.getBuildingDetail()
|
| | | }
|
| | | if (!!type || type != void 0) {
|
| | |
| | | title: '详情'
|
| | | })
|
| | | }
|
| | | this.getCategory();
|
| | | this.getAllBizDict();
|
| | |
|
| | |
|
| | | },
|
| | |
|
| | | watch: {
|
| | |
| | | // },
|
| | | // immediate:true
|
| | | // }
|
| | |
|
| | | },
|
| | | onReady() {
|
| | | this.$refs.form.setRules(this.rules)
|
| | | },
|
| | |
|
| | |
|
| | | onUnload() {
|
| | |
|
| | | },
|
| | |
|
| | |
| | | })
|
| | | })
|
| | | },
|
| | |
|
| | | getNineTypeList() {
|
| | | bizDictionaryTree({
|
| | | code: "nineType"
|
| | | }).then(res => {
|
| | | console.log(res.data);
|
| | | })
|
| | | },
|
| | |
|
| | |
|
| | | navTo(type) {
|
| | | if (type == 1) {
|
| | |
| | | },
|
| | |
|
| | | getBuildingDetail(params = {}) {
|
| | |
|
| | | let idorCodeParams = {}
|
| | | if (this.houseCode) {
|
| | | idorCodeParams = {
|
| | |
| | | id: this.currentId
|
| | | }
|
| | | }
|
| | | uni.showLoading({
|
| | | title: "加载中..."
|
| | | })
|
| | | getPlaceDetail({
|
| | | ...params,
|
| | | ...idorCodeParams
|
| | |
| | | code,
|
| | | data
|
| | | }) => {
|
| | | uni.hideLoading();
|
| | | if (code !== 200) {
|
| | | uni.showToast({
|
| | | title: "数据加载失败",
|
| | |
| | | this.nineTypeValue = name;
|
| | | }
|
| | |
|
| | | if (key == "isFrontType") {
|
| | | if (key == "isFront") {
|
| | | let {
|
| | | index,
|
| | | name
|
| | |
| | | this.frontTypeIndex = index;
|
| | | this.frontTypeValue = name;
|
| | | }
|
| | |
|
| | | })
|
| | |
|
| | | this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
|
| | | this.$set(this.form, "jwd", `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`)
|
| | | this.form.building = arr.join("")
|
| | | let labelList = data.placePoiLabelVOList;
|
| | | let tempLabelList = [];
|
| | |
| | | this.firstId = tempLabelList[0].poiCode;
|
| | | this.categoryValue = tempLabelList[1].labelName;
|
| | | this.form.label = tempLabelList[1].poiCode
|
| | | setTimeout(() => {
|
| | | let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo ==
|
| | | tempLabelList[0].poiCode)
|
| | | let childIndex = this.categoryList[1].findIndex(i => i.categoryNo ==
|
| | | tempLabelList[1].poiCode)
|
| | | this.categoryIndex = [firstIndex, childIndex]
|
| | | }, 500)
|
| | | // setTimeout(() => {
|
| | | let firstIndex = this.categoryList[0].findIndex(i => i.categoryNo ==
|
| | | tempLabelList[0].poiCode)
|
| | | let childIndex = this.categoryList[1].findIndex(i => i.categoryNo ==
|
| | | tempLabelList[1].poiCode)
|
| | | this.categoryIndex = [firstIndex, childIndex]
|
| | | // }, 500)
|
| | |
|
| | |
|
| | | Object.keys(this.comprehensiveData).forEach(key => {
|
| | |
| | | this.$set(this.pickColumns, index, data)
|
| | | },
|
| | |
|
| | | getLocation() {
|
| | | const that = this
|
| | | //获取当前位置信息
|
| | | getCurrentLocation() {
|
| | | uni.getLocation({
|
| | | type: 'wgs84', // 坐标系类型
|
| | | success: function(res) {
|
| | | type: 'gcj02', // 坐标系类型
|
| | | success: (res) => {
|
| | | var latitude = res.latitude; // 维度
|
| | | var longitude = res.longitude; // 经度
|
| | |
|
| | | that.form.lng = longitude
|
| | | that.form.lat = latitude
|
| | | this.form.lng = longitude
|
| | | this.form.lat = latitude
|
| | | this.form.jwd =
|
| | | `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}`
|
| | |
|
| | | that.form.jwd = longitude + "," + latitude
|
| | | },
|
| | | fail: function(res) {
|
| | | console.log('获取定位失败:' + res.errMsg);
|