|
@@ -4,13 +4,13 @@
|
|
|
<el-form inline label-width="100px" size="mini">
|
|
|
<el-form-item label="推荐位置:">
|
|
|
<el-select v-model="form.position" placeholder="请选择推荐位置" clearable>
|
|
|
- <el-option v-for="item in dict.type.goods_location" :key="item.value" :label="item.label"
|
|
|
+ <el-option v-for="item in locationOptions" :key="item.value" :label="item.label"
|
|
|
:value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="当前状态:">
|
|
|
<el-select v-model="form.status" placeholder="请选择当前状态" clearable>
|
|
|
- <el-option v-for="item in dict.type.on_off_out" :key="item.value" :label="item.label"
|
|
|
+ <el-option v-for="item in statusOptions" :key="item.value" :label="item.label"
|
|
|
:value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -55,8 +55,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { list, remove } from '@/api/goods/list'
|
|
|
+import { locMixin } from './mixin'
|
|
|
export default {
|
|
|
- dicts: ['goods_location', 'on_off_out'],
|
|
|
+ dicts: ['on_off_out'],
|
|
|
+ mixins: [locMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
@@ -68,7 +70,13 @@ export default {
|
|
|
},
|
|
|
// 列表
|
|
|
tableData: [],
|
|
|
- total: 0
|
|
|
+ total: 0,
|
|
|
+ // 当前状态
|
|
|
+ statusOptions: [
|
|
|
+ { value: 0, label: '进行中' },
|
|
|
+ { value: 1, label: '未开始' },
|
|
|
+ { value: 2, label: '已过期' }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -129,15 +137,12 @@ export default {
|
|
|
|
|
|
// 字典翻译
|
|
|
positionFormatter(row) {
|
|
|
- return this.selectDictLabel(this.dict.type.goods_location, row.position)
|
|
|
+ return this.selectDictLabel(this.locationOptions, row.position)
|
|
|
},
|
|
|
|
|
|
statusFormatter(row) {
|
|
|
- return this.selectDictLabel(this.dict.type.on_off_out, row.status)
|
|
|
+ return this.selectDictLabel(this.statusOptions, row.status)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
-</style>
|
|
|
+</script>
|