|
@@ -10,7 +10,7 @@
|
|
|
clearable
|
|
|
class="item-width-200 "
|
|
|
></el-input>
|
|
|
- <el-select v-model="platformType" size="small" filterable clearable class="item-width-200 ml10" placeholder="请选择平台">
|
|
|
+ <el-select v-model="query.parkId" size="small" filterable clearable class="item-width-200 ml10" placeholder="请选择平台">
|
|
|
<el-option
|
|
|
v-for="item in platformTypeOptions"
|
|
|
:key="item.value"
|
|
@@ -18,7 +18,7 @@
|
|
|
:value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-select v-model="query.regionCode" size="small" filterable clearable class="item-width-200 ml10" placeholder="请选择区域">
|
|
|
+ <el-select v-model="query.regionCode" size="small" no-data-text="无数据,先选择平台" filterable clearable class="item-width-200 ml10" placeholder="请选择区域">
|
|
|
<el-option
|
|
|
v-for="item in cityOptions"
|
|
|
:key="item.value"
|
|
@@ -249,7 +249,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { debounce } from "@/utils/index";
|
|
|
-import { getCityList } from "@/api/common";
|
|
|
+import { getCityList,getChildRegionsList } from "@/api/common";
|
|
|
import { goodsStoreList,setHidden,listAllTypes,upsertProduct} from "@/api/goods";
|
|
|
import guid from "@/utils/guid";
|
|
|
import Upload from "@/components/Upload";
|
|
@@ -261,7 +261,6 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- platformType:'',
|
|
|
platformTypeOptions:[],
|
|
|
title:'',
|
|
|
tableData: [],
|
|
@@ -273,6 +272,7 @@ export default {
|
|
|
btnLoading2: false,
|
|
|
dialogFormVisible2: false,
|
|
|
query: {
|
|
|
+ parkId:'',
|
|
|
regionCode:'',
|
|
|
productType:'',
|
|
|
title:'',
|
|
@@ -376,6 +376,14 @@ export default {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ 'query.parkId'(val) {
|
|
|
+ this.cityOptions = []
|
|
|
+ if(val){
|
|
|
+ this.getChildRegionsList(val)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 图片统一上传
|
|
|
uploadEnd(val) {
|
|
@@ -515,6 +523,22 @@ export default {
|
|
|
type:'Park',
|
|
|
}).then((res) => {
|
|
|
this.loading = false
|
|
|
+ if (res.state == "Success") {
|
|
|
+ this.platformTypeOptions = res.content.content.map(item => {
|
|
|
+ return {
|
|
|
+ value: item.code,
|
|
|
+ label: item.name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getChildRegionsList(parentId){
|
|
|
+ getChildRegionsList({
|
|
|
+ parentId,
|
|
|
+ page:0,
|
|
|
+ size:999
|
|
|
+ }).then((res) => {
|
|
|
if (res.state == "Success") {
|
|
|
this.cityOptions = res.content.content.map(item => {
|
|
|
return {
|
|
@@ -574,6 +598,7 @@ export default {
|
|
|
this.getList();
|
|
|
this.listAllTypes()
|
|
|
this.getCityList()
|
|
|
+
|
|
|
},
|
|
|
};
|
|
|
</script>
|