From c14c2ae5a4f015113df112635355e517d4868560 Mon Sep 17 00:00:00 2001 From: Lvtf Date: Mon, 7 Aug 2023 13:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 6 +- src/views/cosmeticsFile/detail.vue | 61 ------------------- .../components/cosmeticsArchives.vue | 30 +++++---- src/views/productsMsg/components/health.vue | 18 +++--- .../productsMsg/components/productInfo.vue | 20 +++++- src/views/productsMsg/index.vue | 3 +- 6 files changed, 51 insertions(+), 87 deletions(-) delete mode 100644 src/views/cosmeticsFile/detail.vue diff --git a/src/router/index.js b/src/router/index.js index e84a183..3d73b30 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -83,10 +83,10 @@ export const constantRoutes = [ meta: { title: "化妆品档案", flag: true }, }, { - path: "/cosmeticsDetail", - name: "cosmeticsDetail", + path: "/productInfo", + name: "productInfo", icon: require("@/assets/images/tree4.svg"), - component: () => import("@/views/cosmeticsFile/detail.vue"), + component: () => import("@/views/productsMsg/components/productInfo.vue"), meta: { title: "详情", }, }, { diff --git a/src/views/cosmeticsFile/detail.vue b/src/views/cosmeticsFile/detail.vue deleted file mode 100644 index 7bc3b43..0000000 --- a/src/views/cosmeticsFile/detail.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/productsMsg/components/cosmeticsArchives.vue b/src/views/productsMsg/components/cosmeticsArchives.vue index 3151570..cc8611f 100644 --- a/src/views/productsMsg/components/cosmeticsArchives.vue +++ b/src/views/productsMsg/components/cosmeticsArchives.vue @@ -53,19 +53,19 @@
产品列表
-
+
- + @@ -118,7 +117,6 @@ export default { components: {}, data() { return { - //=========== loading: false, tableData: [], A1: "产品名称", @@ -159,8 +157,15 @@ export default { methods: { //去内嵌页面 toDetail(e) { - // console.log(e); - this.$router.push(`/cosmeticsDetail`) + if(this.types == 1) { + this.$router.push({name:'productInfo',query:{'bah':e.bah,'cosmeticsType':this.types}}) + } else if(this.types == 2) { + this.$router.push({name:'productInfo',query:{'zczh':e.zczh,'cosmeticsType':this.types}}) + } else if(this.types == 3) { + this.$router.push({name:'productInfo',query:{'bah':e.bah,'cosmeticsType':this.types}}) + } else if(this.types == 4) { + this.$router.push({name:'productInfo',query:{'zczh':e.zczh,'cosmeticsType':this.types}}) + } }, //搜索 searchList() { @@ -204,6 +209,7 @@ export default { //进口化妆品 async importCosmetics() { this.loading = true; + console.log(this.form1) let msg1 = await this.$api.cosmetics.importList(this.form1); this.tableData = msg1.data.records; this.total = msg1.data.total; @@ -302,11 +308,11 @@ export default { background: white; } } -.exportBtn { - padding: 10px 20px; -} +// .exportBtn { +// padding: 10px 20px; +// } .table-box { - padding: 0 20px; + padding: 10px 20px; .table-item { } } diff --git a/src/views/productsMsg/components/health.vue b/src/views/productsMsg/components/health.vue index 2ecf0ec..81ad33d 100644 --- a/src/views/productsMsg/components/health.vue +++ b/src/views/productsMsg/components/health.vue @@ -43,18 +43,18 @@
产品列表
-
+
- + @@ -73,7 +73,6 @@ @click="toDetail(scope.row)" >详情 - 编辑 @@ -126,6 +125,7 @@ export default { //去内嵌页面 toDetail(e) { console.log(e); + this.$router.push({name:'productInfo',query:{'qxzczh':e.zczh}}) }, //搜索 searchList() { @@ -212,11 +212,11 @@ export default { background: white; } } -.exportBtn { - padding: 10px 20px; -} +// .exportBtn { +// padding: 10px 20px; +// } .table-box { - padding: 0 20px; + padding: 10px 20px; .table-item { } } diff --git a/src/views/productsMsg/components/productInfo.vue b/src/views/productsMsg/components/productInfo.vue index dcf663c..eceaf06 100644 --- a/src/views/productsMsg/components/productInfo.vue +++ b/src/views/productsMsg/components/productInfo.vue @@ -12,12 +12,30 @@ export default { iframViewStyle:{ height:"", }, - url:`http://localhost:80/productinformation?b=${2}&token=${'UT:27da0d51-6ec8-4688-8a7e-5ecfb6daf716'}` + url:`http://localhost:83/productinformation?b=${2}&token=${'UT:27da0d51-6ec8-4688-8a7e-5ecfb6daf716'}` } }, methods:{ }, mounted() { + // console.log(this.$route.query) + // let query = this.$route.query.toString(); + // console.log(query) + if(this.$route.query.yppzwh){ + // 药品 + this.url = `http://localhost:82/productinformation?b=${2}&token=${localStorage.getItem('MSSM-LIAONING__TOKEN')}&yppzwh=${this.$route.query.yppzwh}` + } else if(this.$route.query.qxzczh){ + // 医疗器械 + this.url = `http://localhost:82/productinformation?b=${2}&token=${localStorage.getItem('MSSM-LIAONING__TOKEN')}&qxzczh=${this.$route.query.qxzczh}` + } else if(this.$route.query.cosmeticsType == '1'){ + this.url = `http://localhost:82/productinformation?b=${2}&token=${localStorage.getItem('MSSM-LIAONING__TOKEN')}&bah=${this.$route.query.bah}&cosmeticsType=1` + } else if(this.$route.query.cosmeticsType == '2'){ + this.url = `http://localhost:82/productinformation?b=${2}&token=${localStorage.getItem('MSSM-LIAONING__TOKEN')}&zczh=${this.$route.query.zczh}&cosmeticsType=2` + } else if(this.$route.query.cosmeticsType == '3'){ + this.url = `http://localhost:82/productinformation?b=${2}&token=${localStorage.getItem('MSSM-LIAONING__TOKEN')}&bah=${this.$route.query.bah}&cosmeticsType=3` + } else if(this.$route.query.cosmeticsType == '4'){ + this.url = `http://localhost:82/productinformation?b=${2}&token=${localStorage.getItem('MSSM-LIAONING__TOKEN')}&zczh=${this.$route.query.zczh}&cosmeticsType=4` + } this.$nextTick(()=>{ let dom = document.getElementsByClassName('ifram-view'); let height = dom[0].getBoundingClientRect(); diff --git a/src/views/productsMsg/index.vue b/src/views/productsMsg/index.vue index 7e6cc36..f0baffe 100644 --- a/src/views/productsMsg/index.vue +++ b/src/views/productsMsg/index.vue @@ -155,6 +155,7 @@ export default { //去内嵌页面 toDetail(e) { console.log(e); + this.$router.push({name:'productInfo',query:{'yppzwh':e.yppzwh}}) }, //搜索 searchList() { @@ -176,7 +177,7 @@ export default { current: 1, }; }, - //国产化妆品 + // 药品 async chinaCosmetics() { this.loading = true; let msg1 = await this.$api.cosmetics.vRdgYpwhGxwz(this.form1);