From ae0d0debf43e9f7751d73784a5706a91abb88765 Mon Sep 17 00:00:00 2001 From: feijinping Date: Mon, 27 Feb 2023 18:30:23 +0800 Subject: [PATCH] =?UTF-8?q?tag=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/index.vue | 11 +++++++---- src/config/business.js | 2 +- src/views/pms/productCategory/index.vue | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index e301ef9..5e3e7df 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -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; } }, }; diff --git a/src/config/business.js b/src/config/business.js index 97e9405..969a9fb 100644 --- a/src/config/business.js +++ b/src/config/business.js @@ -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' ]; diff --git a/src/views/pms/productCategory/index.vue b/src/views/pms/productCategory/index.vue index 9c67951..d7e2969 100644 --- a/src/views/pms/productCategory/index.vue +++ b/src/views/pms/productCategory/index.vue @@ -4,7 +4,7 @@ class="ry_form"> + :radioData="dict.type.sys_show_status" :showAll="'all'"/> - + 搜索 重置 @@ -50,7 +50,7 @@ @@ -84,7 +84,7 @@ + :radioData="dict.type.sys_show_status"/> @@ -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 {