|
@@ -3,7 +3,6 @@
|
|
<div class="cityList app-container">
|
|
<div class="cityList app-container">
|
|
<div class="search">
|
|
<div class="search">
|
|
<div>
|
|
<div>
|
|
-
|
|
|
|
<el-input
|
|
<el-input
|
|
v-model="query.title"
|
|
v-model="query.title"
|
|
size="small"
|
|
size="small"
|
|
@@ -11,6 +10,22 @@
|
|
clearable
|
|
clearable
|
|
class="item-width-200 "
|
|
class="item-width-200 "
|
|
></el-input>
|
|
></el-input>
|
|
|
|
+ <el-select v-model="query.regionCode" size="small" filterable clearable class="item-width-200 ml10" placeholder="请选择区域">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in cityOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select v-model="query.productType" size="small" filterable clearable class="item-width-200 ml10" placeholder="请选择类型">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item,key) in productType"
|
|
|
|
+ :key="key"
|
|
|
|
+ :label="item"
|
|
|
|
+ :value="key">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
<el-button
|
|
<el-button
|
|
class="ml10"
|
|
class="ml10"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -49,7 +64,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="info">
|
|
<div class="info">
|
|
<el-image
|
|
<el-image
|
|
- v-if="scope.row.cover.length"
|
|
|
|
|
|
+ v-if="scope.row.cover&&scope.row.cover.length"
|
|
:src="scope.row.cover[0]"
|
|
:src="scope.row.cover[0]"
|
|
class="small-img"
|
|
class="small-img"
|
|
style="width: 40px; height: 40px;"
|
|
style="width: 40px; height: 40px;"
|
|
@@ -225,6 +240,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { debounce } from "@/utils/index";
|
|
import { debounce } from "@/utils/index";
|
|
|
|
+import { getCityList } from "@/api/common";
|
|
import { goodsStoreList,setHidden,listAllTypes,upsertProduct} from "@/api/goods";
|
|
import { goodsStoreList,setHidden,listAllTypes,upsertProduct} from "@/api/goods";
|
|
import guid from "@/utils/guid";
|
|
import guid from "@/utils/guid";
|
|
import Upload from "@/components/Upload";
|
|
import Upload from "@/components/Upload";
|
|
@@ -246,7 +262,8 @@ export default {
|
|
btnLoading2: false,
|
|
btnLoading2: false,
|
|
dialogFormVisible2: false,
|
|
dialogFormVisible2: false,
|
|
query: {
|
|
query: {
|
|
- regionCode:'520101',
|
|
|
|
|
|
+ regionCode:'',
|
|
|
|
+ productType:'',
|
|
title:'',
|
|
title:'',
|
|
page: 1,
|
|
page: 1,
|
|
size: 10,
|
|
size: 10,
|
|
@@ -329,7 +346,8 @@ export default {
|
|
'PetrolStation'
|
|
'PetrolStation'
|
|
:'加油站',
|
|
:'加油站',
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ cityOptions:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -343,10 +361,7 @@ export default {
|
|
return this.typeOptions
|
|
return this.typeOptions
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- return this.data
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -480,6 +495,22 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getCityList() {
|
|
|
|
+ this.loading = true
|
|
|
|
+ getCityList({name:'',
|
|
|
|
+ page: 0,
|
|
|
|
+ size: 999,}).then((res) => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ if (res.state == "Success") {
|
|
|
|
+ this.cityOptions = res.content.content.map(item => {
|
|
|
|
+ return {
|
|
|
|
+ value: item.code,
|
|
|
|
+ label: item.name
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
save(){
|
|
save(){
|
|
this.$refs.setQuery.validate((v) => {
|
|
this.$refs.setQuery.validate((v) => {
|
|
if (v) {
|
|
if (v) {
|
|
@@ -507,6 +538,7 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
this.listAllTypes()
|
|
this.listAllTypes()
|
|
|
|
+ this.getCityList()
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|