master
feijinping 3 years ago
parent 22afb0ad54
commit ae0d0debf4

@ -6,20 +6,23 @@
import {mapGetters} from "vuex";
export default {
props: ["value", "propName"],
props: ["value", "propName", 'options'],
computed: {
...mapGetters(['dictMap']),
options() {
options1() {
if (this.options) {
return this.options;
}
if (!this.propName) {
return [];
}
return this.dictMap[this.propName] || []
},
valueLabel() {
return this.options.find(it => it.value == this.value)?.label;
return this.options1.find(it => it.value === this.value || it.value == this.value)?.label;
},
valueType() {
return this.options.find(it => it.value == this.value)?.listClass;
return this.options1.find(it => it.value === this.value || it.value == this.value)?.listClass;
}
},
};

@ -2,5 +2,5 @@ export const dict_types = ["sys_user_sex",
"sys_show_hide", "sys_normal_disable", "sys_job_status", "sys_job_group", "sys_yes_no", "sys_notice_type", "sys_notice_status",
"sys_oper_type", "sys_common_status", "wms_item_type", "wms_carrier_level", "wms_supplier_level", "wms_receipt_type", "wms_receipt_status",
"wms_shipment_type", "wms_shipment_status", "wms_movement_type", "wms_movement_status",
"pms_publish_status", 'sku_sort_list'
"pms_publish_status", 'sku_sort_list', 'sys_show_status'
];

@ -4,7 +4,7 @@
class="ry_form">
<el-form-item label="状态" prop="showStatus">
<DictRadio v-model="queryParams.showStatus" @change="handleQuery" size="small"
:radioData="dict.type.sys_normal_disable" :showAll="'all'"/>
:radioData="dict.type.sys_show_status" :showAll="'all'"/>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input
@ -15,7 +15,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item class="flex_one tr">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -50,7 +50,7 @@
<el-table-column label="排序" align="center" prop="sort"/>
<el-table-column label="状态" align="center" prop="showStatus">
<template v-slot="{ row }">
<dict-tag :value="row.showStatus" prop-name="sys_normal_disable"></dict-tag>
<dict-tag :value="row.showStatus" prop-name="sys_show_status"></dict-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -84,7 +84,7 @@
</el-form-item>
<el-form-item label="状态">
<DictRadio v-model="form.showStatus" size="small"
:radioData="dict.type.sys_normal_disable"/>
:radioData="dict.type.sys_show_status"/>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" placeholder="排序"/>
@ -117,7 +117,7 @@ import ProductCategorySelect from "@/views/components/ProductCategorySelect";
export default {
name: "PmsProductCategory",
dicts: ['sys_normal_disable'],
dicts: ['sys_show_status'],
components: {ProductCategorySelect},
data() {
return {

Loading…
Cancel
Save