| | |
| | | }; |
| | | |
| | | |
| | | |
| | | // 标准地址 |
| | | export const getPlaceAddressList = (params) => { |
| | | return request({ |
| | | url: "/api/blade-doorplateAddress/doorplateAddress/getPlaceList", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | }; |
| | | |
| | | |
| | |
| | | <div class="content-box"> |
| | | <box-title class="m10" :classVal="9" :title="'基本信息'"></box-title> |
| | | <avue-form v-if="baseShow" ref="baseForm" :option="option" v-model="form"> |
| | | <template slot-scope="{ row, size, index }" slot="houseCodeBinds"> |
| | | <el-select v-model="form.houseCodeBinds" filterable remote multiple :remote-method="onRemoteMethod" |
| | | @change="onSelectChange" placeholder="请选择标准地址" reserve-keyword> |
| | | <el-option v-for="item in standardAddressList" :key="item.addressCode" :label="item.addressName" :value="item.addressCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </avue-form> |
| | | |
| | | |
| | |
| | | getHoldList, |
| | | update, |
| | | updatePlaceExt, |
| | | getPlaceAddressList |
| | | } from "@/api/place/place" |
| | | import { |
| | | getPlaceList |
| | |
| | | span: 12 |
| | | }, |
| | | |
| | | // { |
| | | // width: 160, |
| | | // overHidden: true, |
| | | // slot: true, |
| | | // label: "标准地址", |
| | | // prop: "houseCodeBinds", |
| | | // span: 24, |
| | | // type: 'select', |
| | | // labelWidth:120, |
| | | // dataType: "object", |
| | | // remote: true, |
| | | // multiple: true, |
| | | // hide: true, |
| | | // display: false, |
| | | // filterable:true, |
| | | // dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`, |
| | | // props: { |
| | | // label: 'addressName', |
| | | // value: 'addressCode', |
| | | // }, |
| | | // dicData: [], |
| | | // rules: [{ |
| | | // required: false, |
| | | // message: "请选择标准地址", |
| | | // trigger: "blur", |
| | | // }, ] |
| | | // }, |
| | | { |
| | | width: 160, |
| | | overHidden: true, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "houseCodeBinds", |
| | | slot: true, |
| | | label: "标准地址", |
| | | prop: "houseCodeBinds", |
| | | span: 24, |
| | | type: 'tree', |
| | | labelWidth:120, |
| | | dataType: "object", |
| | | remote: true, |
| | | multiple: true, |
| | | hide: true, |
| | | display: false, |
| | | dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList?addressName={{addressName}}`, |
| | | props: { |
| | | label: 'addressName', |
| | | value: 'addressCode', |
| | | |
| | | }, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择标准地址", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | |
| | | |
| | | ], |
| | | }, |
| | | |
| | | standardAddressList:[] , //标准地址数据 |
| | | standardAddress:"", |
| | | standardAddressSearchKey:"" |
| | | } |
| | | }, |
| | | |
| | |
| | | }), getPlaceList()]) |
| | | .then( |
| | | that.$axios.spread(function(baseInfo, restInfo) { |
| | | console.log("houseCodeBinds===>",baseInfo.data.data.houseCodeBinds) |
| | | that.form = baseInfo.data.data |
| | | that.form.addressName = that.form.location; |
| | | that.form.location = [ |
| | |
| | | that.form.lat, |
| | | that.form.location, |
| | | ].join(",") |
| | | if(baseInfo.data.data.houseCodeBinds){ |
| | | that.standardAddressList = baseInfo.data.data.houseBindList; |
| | | that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",") |
| | | } |
| | | |
| | | if (that.form.imageUrls && that.form.imageUrls.length) { |
| | | that.form.imageUrls = that.form.imageUrls |
| | |
| | | |
| | | that.baseShow = true |
| | | const data = restInfo.data.data |
| | | |
| | | |
| | | |
| | | |
| | | if (data) { |
| | | let imageUrls = data.imageUrls |
| | |
| | | that.restShow = true |
| | | }) |
| | | ) |
| | | |
| | | that.getPlaceAddressListRequest() |
| | | }, |
| | | |
| | | locationDispose(data) { |
| | |
| | | this.restShow = false |
| | | this.roleBox = false |
| | | }, |
| | | |
| | | getPlaceAddressListRequest(query){ |
| | | getPlaceAddressList({ |
| | | addressName:query |
| | | }).then(res=>{ |
| | | this.standardAddressList = res.data.data; |
| | | }) |
| | | }, |
| | | |
| | | onSelectChange(e){ |
| | | console.log("selectChange===>",e); |
| | | // this.getPlaceAddressListRequest() |
| | | }, |
| | | |
| | | onRemoteMethod(query){ |
| | | console.log("remote===>",query) |
| | | this.getPlaceAddressListRequest(query) |
| | | }, |
| | | |
| | | |
| | | |
| | | }, |
| | | } |
| | | </script> |