| | |
| | | <box-title title="基础信息"></box-title> |
| | | </view> |
| | | <view class="item"> |
| | | |
| | | <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:" |
| | | :required="isRequired" :disabled="isDisabled" |
| | | prop="buildingCode"> |
| | | <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="场所名称:" required prop="placeName"> |
| | | <u-form-item class="form-item" labelWidth="100" label="场所名称:" |
| | | :required="isRequiredPlace" :disabled="isDisabled" prop="placeName"> |
| | | <u--input border="none" v-model="form.placeName" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="popup" class="form-item" labelWidth="100" label="标签:" required prop="label"> |
| | | <u-form-item @click="popup" class="form-item" labelWidth="100" label="标签:" |
| | | :required="isRequired" :disabled="isDisabled" prop="label"> |
| | | <u--input border="none" disabled disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | |
| | | </view> |
| | | |
| | | <view class="item"> |
| | | <u-form-item class="form-item" labelWidth="100" required label="场所负责人:" prop="username"> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="场所负责人:" prop="username"> |
| | | <u--input border="none" v-model="form.username" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" required label="手机号:" prop="phone"> |
| | | <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled" |
| | | label="手机号:" prop="phone"> |
| | | <u--input border="none" v-model="form.phone" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | |
| | | </view> |
| | | |
| | | <view class="item"> |
| | | <lineItem :dataInfo="publicData.basic"> |
| | | <lineItem :dataInfo="comprehensiveData.basic"> |
| | | </lineItem> |
| | | |
| | | <lineItem :dataInfo="publicData.scene"> |
| | | <lineItem :dataInfo="comprehensiveData.scene"> |
| | | <template v-slot:pic="{scope}"> |
| | | {{scope.value}} |
| | | </template> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | isRequired:false, |
| | | isRequiredPlace:true, |
| | | isDisabled:true, |
| | | showPicker: false, |
| | | pickerLoading: false, |
| | | pickColumns: [], |
| | |
| | | imageUrls: "", |
| | | }, |
| | | rules: { |
| | | // 'buildingCode': { |
| | | // type: 'string', |
| | | // required: true, |
| | | // message: '请选择楼栋', |
| | | // trigger: ['blur', 'change'] |
| | | // }, |
| | | 'buildingCode': { |
| | | type: 'string', |
| | | required: true, |
| | | message: '请选择楼栋', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'placeName': { |
| | | type: 'string', |
| | | required: true, |
| | |
| | | showLabelList: [], |
| | | |
| | | stdId: "", |
| | | buildingData: {}, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | "form.buildingCode": { |
| | | handler(newVal) { |
| | | console.log(newVal) |
| | | |
| | | this.getBuildingDetail({ |
| | | buildingCode: newVal |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | options: { |
| | | styleIsolation: 'shared', // 解除样式隔离 |
| | | }, |
| | | async onLoad(option) { |
| | | onLoad(option) { |
| | | this.stdId = option.stdId |
| | | console.log(this.stdId, "----------") |
| | | if (this.stdId) { |
| | | const data = await this.getBuildingDetail() |
| | | console.log(data, "-----------") |
| | | this.form.buildingCode = data.buildingCode |
| | | |
| | | let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName, |
| | | data.buildingName |
| | | ] |
| | | let arr = buildingNameArr.filter(e => { |
| | | return e != null || e != '' |
| | | }) |
| | | this.form.building = arr.join("") |
| | | this.getBuildingDetail() |
| | | } |
| | | |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | |
| | | buildDataInfo() { |
| | | let basic = [{ |
| | | label: "公安局", |
| | | value: this.buildingData.branchName |
| | | }, |
| | | { |
| | | label: "派出所", |
| | | value: this.buildingData.localPoliceStationName |
| | | }, |
| | | { |
| | | label: "辖区民警", |
| | | value: this.buildingData.policeman |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | value: this.buildingData.policemanPhone |
| | | } |
| | | ] |
| | | this.publicData.basic = basic |
| | | console.log(this.publicData) |
| | | |
| | | }, |
| | | |
| | | async getBuildingDetail(params = {}) { |
| | | |
| | | const res = await getDoorplateAddressDetail(Object.assign(params, { |
| | | getBuildingDetail(params = {}) { |
| | | getDoorplateAddressDetail(Object.assign(params, { |
| | | stdId: this.stdId |
| | | })) |
| | | })).then(res => { |
| | | let data = res.data |
| | | this.form.buildingCode = data.buildingCode |
| | | |
| | | let data = res.data |
| | | this.buildingData = data |
| | | this.buildDataInfo() |
| | | return data |
| | | |
| | | let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName, |
| | | data.buildingName |
| | | ] |
| | | let arr = buildingNameArr.filter(e => { |
| | | return e != null || e != '' |
| | | }) |
| | | this.form.building = arr.join("") |
| | | }) |
| | | }, |
| | | |
| | | //表单提交 |
| | |
| | | success() { |
| | | setTimeout(() => { |
| | | that.$u.func.globalNavigator( |
| | | "/pages/home/index", |
| | | "switchTab") |
| | | "/pages/home/index", "switchTab") |
| | | }, 1000) |
| | | } |
| | | }) |
| | |
| | | const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu") |
| | | picker.setColumnValues(2, streetRu) |
| | | |
| | | const district = await this.getDoorplateAddressList(streetRu[0].code, |
| | | "district") |
| | | const district = await this.getDoorplateAddressList(streetRu[0].code, "district") |
| | | picker.setColumnValues(3, district) |
| | | |
| | | const building = await this.getDoorplateAddressList(district[0].code, |
| | | "building") |
| | | const building = await this.getDoorplateAddressList(district[0].code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | |
| | |
| | | const streetRu = await this.getDoorplateAddressList(item.code, "streetRu") |
| | | picker.setColumnValues(2, streetRu) |
| | | |
| | | const district = await this.getDoorplateAddressList(streetRu[0].code, |
| | | "district") |
| | | const district = await this.getDoorplateAddressList(streetRu[0].code, "district") |
| | | picker.setColumnValues(3, district) |
| | | |
| | | const building = await this.getDoorplateAddressList(district[0].code, |
| | | "building") |
| | | const building = await this.getDoorplateAddressList(district[0].code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | |
| | |
| | | const district = await this.getDoorplateAddressList(item.code, "district") |
| | | picker.setColumnValues(3, district) |
| | | |
| | | const building = await this.getDoorplateAddressList(district[0].code, |
| | | "building") |
| | | const building = await this.getDoorplateAddressList(district[0].code, "building") |
| | | picker.setColumnValues(4, building) |
| | | } |
| | | |
| | |
| | | .form-item { |
| | | background-color: #ffffff; |
| | | padding: 2rpx 10px; |
| | | border-bottom: 1px solid #eff1f3; |
| | | border-bottom: 0.1px solid #eff1f3; |
| | | } |
| | | |
| | | .label { |
| | |
| | | background-color: green; |
| | | border-radius: 0rpx 10rpx 10rpx 0rpx; |
| | | } |
| | | </style> |
| | | </style> |