diff --git a/src/permission.js b/src/permission.js
index ca1135b..8c608de 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -23,6 +23,7 @@ NProgress.configure({ showSpinner: false });
router.beforeEach((to, from, next) => {
NProgress.start();
let token = localStorage.getItem('MSSM-LIAONING__TOKEN')
+ console.log(to.path);
if (whiteList.indexOf(to.path) !== -1) {
if (token) {
if (store.state.myselfPermission.routerList.length > 0) {
@@ -33,7 +34,7 @@ router.beforeEach((to, from, next) => {
next();
} else {
//根据参数判断是否可以跳
- if (to.query.id && to.path == '/cosmeticsDetail') {
+ if (to.query.type && to.path == '/cosmeticsDetail') {
next();
} else {
Message.error("无权限访问!");
diff --git a/src/router/index.js b/src/router/index.js
index 61a8009..56764ed 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -85,7 +85,7 @@ export const constantRoutes = [
path: "/cosmeticsDetail",
name: "cosmeticsDetail",
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 9e3e459..cb17c9b 100644
--- a/src/views/productsMsg/components/cosmeticsArchives.vue
+++ b/src/views/productsMsg/components/cosmeticsArchives.vue
@@ -73,9 +73,14 @@
:stripe="false"
>
-
+
-
+
{{ scope.row.mc || scope.row.cpmc }}
@@ -84,7 +89,7 @@
{{ scope.row.bah || scope.row.pzrq }}
-
+
{{ scope.row.qy || scope.row.sf }}
@@ -169,9 +174,22 @@ export default {
methods: {
//去内嵌页面
toDetail(e) {
- // console.log(e);
- this.$router.push({ path: `/cosmeticsDetail`, query: { id: 23423 } });
- // this.$router.push({ path: `/drugArchives`,query:{id:23423} });
+ let data = "";
+ if (this.types == 1) {
+ data = e.bah;
+ } else if (this.types == 2) {
+ data = e.zczh;
+ } else if (this.types == 3) {
+ data = e.bah;
+ } else if (this.types == 4) {
+ data = e.zczh;
+ }
+ //利用type区分三种档案
+ //利用flag区分四种化妆品详情 然后分别调用不同的详情接口
+ this.$router.push({
+ path: `/cosmeticsDetail`,
+ query: { type: 1, flag: this.types, data },
+ });
},
//搜索
searchList() {
diff --git a/src/views/productsMsg/components/productInfo.vue b/src/views/productsMsg/components/productInfo.vue
index dcf663c..2d3c840 100644
--- a/src/views/productsMsg/components/productInfo.vue
+++ b/src/views/productsMsg/components/productInfo.vue
@@ -12,11 +12,15 @@ export default {
iframViewStyle:{
height:"",
},
- url:`http://localhost:80/productinformation?b=${2}&token=${'UT:27da0d51-6ec8-4688-8a7e-5ecfb6daf716'}`
+ url:''
}
},
+ created(){
+ this.url = `http://localhost:80/productinformation?type=${this.$route.query.type}&flag=${this.$route.query.flag || ''}&data=${this.$route.query.data || ''}`
+ },
methods:{
},
+
mounted() {
this.$nextTick(()=>{
let dom = document.getElementsByClassName('ifram-view');