diff --git a/src/views/productsMsg/components/cosmeticsArchives.vue b/src/views/productsMsg/components/cosmeticsArchives.vue index cb17c9b..f502369 100644 --- a/src/views/productsMsg/components/cosmeticsArchives.vue +++ b/src/views/productsMsg/components/cosmeticsArchives.vue @@ -137,23 +137,23 @@ export default { A1: "产品名称", A2: "备案编码", A3: "生产企业", - types: 1, + types: '1', total: 0, options: [ { - value: 1, + value: '1', label: "国产化妆品", }, { - value: 2, + value: '2', label: "国产特殊化妆品", }, { - value: 3, + value: '3', label: "进口化妆品", }, { - value: 4, + value: '4', label: "进口特殊化妆品", }, ], @@ -169,26 +169,26 @@ export default { }, mounted() {}, created() { - this.changeType(1); + this.changeType('1'); }, methods: { //去内嵌页面 toDetail(e) { let data = ""; - if (this.types == 1) { + if (this.types == '1') { data = e.bah; - } else if (this.types == 2) { + } else if (this.types == '2') { data = e.zczh; - } else if (this.types == 3) { + } else if (this.types == '3') { data = e.bah; - } else if (this.types == 4) { + } else if (this.types == '4') { data = e.zczh; } //利用type区分三种档案 //利用flag区分四种化妆品详情 然后分别调用不同的详情接口 this.$router.push({ path: `/cosmeticsDetail`, - query: { type: 1, flag: this.types, data }, + query: { type: '1', flag: this.types, data }, }); }, //搜索 @@ -253,19 +253,19 @@ export default { this.loading = false; }, async getData(e) { - if (e == 1) { + if (e == '1') { this.A2 = "备案编码"; this.A3 = "生产企业"; this.chinaCosmetics(); - } else if (e == 2) { + } else if (e == '2') { this.A2 = "批准日期"; this.A3 = "省份"; this.chinaSpecialCosmetics(); - } else if (e == 3) { + } else if (e == '3') { this.A2 = "备案编码"; this.A3 = "生产企业"; this.importCosmetics(); - } else if (e == 4) { + } else if (e == '4') { this.A2 = "批准日期"; this.A3 = "省份"; this.importSpecialCosmetics(); diff --git a/src/views/productsMsg/components/health.vue b/src/views/productsMsg/components/health.vue index 99f98d7..557dd81 100644 --- a/src/views/productsMsg/components/health.vue +++ b/src/views/productsMsg/components/health.vue @@ -138,7 +138,10 @@ export default { methods: { //去内嵌页面 toDetail(e) { - console.log(e); + this.$router.push({ + path: `/cosmeticsDetail`, + query: { type: '3', data:e.zczh }, + }); }, //搜索 searchList() { diff --git a/src/views/productsMsg/index.vue b/src/views/productsMsg/index.vue index 4379ec4..6d44651 100644 --- a/src/views/productsMsg/index.vue +++ b/src/views/productsMsg/index.vue @@ -156,7 +156,7 @@ export default { toDetail(e) { this.$router.push({ path: `/cosmeticsDetail`, - query: { type: 2, data:e.yppzwh }, + query: { type: '2', data:e.yppzwh }, }); }, //搜索