|
|
@@ -108,6 +108,11 @@
|
|
|
<el-cascader
|
|
|
size="small"
|
|
|
class="w100"
|
|
|
+ :props="{
|
|
|
+ value: 'label',
|
|
|
+ label: 'label',
|
|
|
+ children: 'children'
|
|
|
+ }"
|
|
|
v-model="formData.location"
|
|
|
:options="locationOptions"
|
|
|
@change="changeLocation"
|
|
|
@@ -164,7 +169,8 @@
|
|
|
// import selectTree from '@/components/selectTree';
|
|
|
import DeptSelect from '@/components/CommomSelect/new-dept-select.vue';
|
|
|
|
|
|
- import city from '@/assets/js/city';
|
|
|
+ // import city from '@/assets/js/city';
|
|
|
+ import { cityData } from 'ele-admin/packages/utils/regions';
|
|
|
// import user from '@/api/main/user';
|
|
|
|
|
|
export default {
|
|
|
@@ -215,7 +221,7 @@
|
|
|
deptList: [], //部门集合
|
|
|
inventoryTypeList: [],
|
|
|
factoryList: [], //工厂集合
|
|
|
- locationOptions: city,
|
|
|
+ locationOptions: cityData,
|
|
|
loadingVis: false
|
|
|
};
|
|
|
},
|
|
|
@@ -254,6 +260,7 @@
|
|
|
this.type = type;
|
|
|
this.visible = true;
|
|
|
this.init();
|
|
|
+ console.log('locationOptions', this.locationOptions);
|
|
|
if (type === '修改') {
|
|
|
console.log(1);
|
|
|
this.loadingVis = true;
|
|
|
@@ -425,11 +432,11 @@
|
|
|
// this.$forceUpdate();
|
|
|
},
|
|
|
changeLocation(val) {
|
|
|
- console.log(val, '1');
|
|
|
+ console.log(val, '1~~~');
|
|
|
this.$set(this.formData, 'province', val[0]); //省
|
|
|
this.$set(this.formData, 'city', val[1]); //市
|
|
|
this.$set(this.formData, 'area', val[2]); //区
|
|
|
- delete this.formData.location;
|
|
|
+ // delete this.formData.location;
|
|
|
}
|
|
|
}
|
|
|
};
|