吕天方 2 years ago
commit 18ccfda6f7

@ -20,23 +20,29 @@ export default {
}, },
}; };
}, },
mounted() { mounted() {
// // //
var queryString = window.location.search; // var queryString = window.location.search;
// URLSearchParams // // URLSearchParams
var params = new URLSearchParams(queryString); // var params = new URLSearchParams(queryString);
// JSON // // JSON
// var obj = {};
// // JSON
// params.forEach(function (value, key) {
// //
// var decodedValue = decodeURIComponent(value);
// obj[key] = decodedValue;
// });
var obj = {}; var obj = {};
// JSON window.addEventListener("message", function (event) {
params.forEach(function (value, key) { console.log(event);
// obj = event.data.data;
var decodedValue = decodeURIComponent(value); console.log(obj);
obj[key] = decodedValue;
});
if (obj.token) { if (obj.token) {
localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token); localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token);
} else { } else {
this.$alert("暂无token",'提示', { this.$alert("token不能为空", "提示", {
confirmButtonText: "返回", confirmButtonText: "返回",
callback: (action) => { callback: (action) => {
this.$router.go(-1); this.$router.go(-1);
@ -44,6 +50,7 @@ export default {
}); });
} }
this.$store.commit("app/URLChange", obj); this.$store.commit("app/URLChange", obj);
});
}, },
}; };
</script> </script>

@ -12,18 +12,8 @@ import axios from "axios";
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });
const whiteList = ["/login", "/register"]; const whiteList = ["/login", "/register"];
router.beforeEach(async (to, from, next) => { router.beforeEach((to, from, next) => {
let token = localStorage.getItem('MSSM-LIAONING__TOKEN')
if (token) {
next() next()
} else {
this.$alert("暂无token",'提示', {
confirmButtonText: "返回",
callback: (action) => {
this.$router.go(-1);
},
});
}
}) })
router.afterEach(() => { router.afterEach(() => {
NProgress.done(); NProgress.done();

@ -554,10 +554,8 @@ export default {
this.value = ""; this.value = "";
}, },
getPagination(e) { getPagination(e) {
console.log(e);
this.form1.current = e.page; this.form1.current = e.page;
this.form1.size = e.limit; this.form1.size = e.limit;
this.chinaCosmetics();
this.listyp(); this.listyp();
}, },
filterLevel(e) { filterLevel(e) {

@ -125,7 +125,7 @@
<i class="el-icon-s-marketing"></i> <i class="el-icon-s-marketing"></i>
</span> </span>
<div>A项目检验报告.doc</div> <div>A项目检验报告.doc</div>
<div class="file-icon"> <div class="file-icon" @click="uploadBG">
<!-- cpjsyqlj --> <!-- cpjsyqlj -->
<i class="el-icon-download"></i> <i class="el-icon-download"></i>
下载 下载
@ -761,6 +761,17 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
uploadBG() {
// let baseUrl =
// process.env.VUE_APP_BASE_API +
// `/common/downloadmino/download?filename=2023/5/16/40289e5688225c0b018822745173000e.pdf`;
// const link = document.createElement("a");
// link.href = baseUrl;
// link.style.display = "none";
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
},
// //
async yiliao(e) { async yiliao(e) {
this.loading = true; this.loading = true;

@ -12,8 +12,7 @@
</div> </div>
</div> </div>
<div> <div>
<el-button v-if="goback" type="primary" plain size="mini" @click="goBack"></el-button> <el-button type="primary" plain size="mini" @click="goBack"></el-button>
<i v-else class="el-icon-close close" @click="goBack"></i>
</div> </div>
</div> </div>
<div class="drugInfo-bottom"> <div class="drugInfo-bottom">
@ -94,7 +93,6 @@ export default {
height:'', height:'',
}, },
// isOne:false, // isOne:false,
goback:true,
id:null, id:null,
token:null, token:null,
// //
@ -198,27 +196,27 @@ export default {
// console.log(this.$route.params) // console.log(this.$route.params)
// this.row = JSON.parse(this.$route.params.row) // this.row = JSON.parse(this.$route.params.row)
// this.row = this.$route.params.row; // this.row = this.$route.params.row;
let search = window.location.search.slice(1); // let search = window.location.search.slice(1);
let params = search.split('&'); // let params = search.split('&');
let paramsLabel = params[2].split('=')[0] // let paramsLabel = params[2].split('=')[0]
this.id = params[0].split('=')[1]; // this.id = params[0].split('=')[1];
this.token = params[1].split('=')[1]; // this.token = params[1].split('=')[1];
if (paramsLabel == 'yppzwh') { // if (paramsLabel == 'yppzwh') {
this.isYppzwh = true; // this.isYppzwh = true;
this.getVRdgYpwhGxwz(params[2].split('=')[1]); // this.getVRdgYpwhGxwz(params[2].split('=')[1]);
} else if(paramsLabel == 'qxzczh') { // } else if(paramsLabel == 'qxzczh') {
this.ylqxJnyelcp(params[2].split('=')[1]); // this.ylqxJnyelcp(params[2].split('=')[1]);
} // }
// X // // X
if(this.id == '1') { // if(this.id == '1') {
this.goback = true; // this.goback = true;
} else { // } else {
this.goback = false; // this.goback = false;
} // }
this.$nextTick(()=>{ // this.$nextTick(()=>{
this.getHeight(); // this.getHeight();
}) // })
} }
} }
</script> </script>

Loading…
Cancel
Save