Commit ae41b34f by 林家欣

fix: 修改条码公共详情页高亮左侧菜单

parent f6156f62
...@@ -4,14 +4,6 @@ ...@@ -4,14 +4,6 @@
</div> </div>
</template> </template>
<script>
export default {
created() {
console.log(process.env, 'process.env');
},
};
</script>
<style> <style>
.container-fluid { .container-fluid {
padding: 0 !important; padding: 0 !important;
......
...@@ -20,7 +20,7 @@ import { ...@@ -20,7 +20,7 @@ import {
const baseUrl = process.env.VUE_APP_API_URL; const baseUrl = process.env.VUE_APP_API_URL;
console.log(process.env, baseUrl, 'baseUrl'); // console.log(process.env, baseUrl, 'baseUrl');
function fetch(options) { function fetch(options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const instance = axios.create({ const instance = axios.create({
...@@ -57,12 +57,12 @@ function fetch(options) { ...@@ -57,12 +57,12 @@ function fetch(options) {
} }
}) //响应数据的拦截 }) //响应数据的拦截
instance().then(res => { instance().then(res => {
console.log(res, '响应数据的拦截'); // console.log(res, '响应数据的拦截');
const resData = res.data; const resData = res.data;
const code = String(resData.code) const code = String(resData.code)
console.log(resData, ResponseCode.success, 'ResponseCode.success'); // console.log(resData, ResponseCode.success, 'ResponseCode.success');
if (code === ResponseCode.success) { if (code === ResponseCode.success) {
console.log(resData, '响应数据的拦截2'); // console.log(resData, '响应数据的拦截2');
resolve(resData) resolve(resData)
} else if (checkResponseCodeTokenError(code)) { } else if (checkResponseCodeTokenError(code)) {
if (getToken()) { if (getToken()) {
......
...@@ -72,6 +72,10 @@ ...@@ -72,6 +72,10 @@
import HeaderBtn from "./HeaderBtn.vue"; import HeaderBtn from "./HeaderBtn.vue";
import HeaderDropdown from "./HeaderDropdown.vue"; import HeaderDropdown from "./HeaderDropdown.vue";
import {nav} from "./mock"; import {nav} from "./mock";
import Qs from "qs"
import {
cleanObject,
} from "@/axios/parameter"
export default { export default {
components: {HeaderBtn, HeaderDropdown}, components: {HeaderBtn, HeaderDropdown},
...@@ -94,14 +98,19 @@ export default { ...@@ -94,14 +98,19 @@ export default {
// nav_.children && // nav_.children &&
// nav_.children.length > 0 && // nav_.children.length > 0 &&
// this.$store.commit("system/SET_SUB_NAV", nav_.children); // this.$store.commit("system/SET_SUB_NAV", nav_.children);
console.log(nav_, this.$route, 'this.$route.path'); // console.log(nav_, this.$route, 'this.$route.path');
if (nav_.link === this.$route.path) { if (nav_.link === this.$route.path) {
nav_.breadcrumb && nav_.breadcrumb &&
this.$store.commit("system/SET_BREADCRUMB", nav_.breadcrumb); this.$store.commit("system/SET_BREADCRUMB", nav_.breadcrumb);
} else { } else {
// TODO 去dropdown里面精确查找当前的路径 // TODO 去dropdown里面精确查找当前的路径
const result = this.comparePath(nav_.children, this.$route.path); let result;
// console.log(result); result = this.comparePath(nav_.children, this.$route.path);
if (!result && Object.keys(this.$route.query).length > 0) {
const queryString = Qs.stringify(cleanObject(this.$route.query));
let path = `${this.$route.path}?${queryString}`;
result = this.comparePath(nav_.children, path);
}
result && result &&
result.breadcrumb && result.breadcrumb &&
this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb); this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb);
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
>{{msg.logoutFlag}}</span> >{{msg.logoutFlag}}</span>
</td> </td>
</tr> </tr>
<tr v-if="this.$route.query.type"> <tr v-if="this.$route.query.id === 'zhuxiao'">
<th>注销时间:</th> <th>注销时间:</th>
<td> <td>
<span <span
......
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
limit: this.pageParams.pageSize, limit: this.pageParams.pageSize,
logoutFlag: this.logoutFlag, logoutFlag: this.logoutFlag,
}; };
console.log(params, "params"); // console.log(params, "params");
const businessGetEanUpcByConditionRes = const businessGetEanUpcByConditionRes =
await this.$api.business.businessGetEanUpcByCondition(params); await this.$api.business.businessGetEanUpcByCondition(params);
const { returnCode, data } = businessGetEanUpcByConditionRes; const { returnCode, data } = businessGetEanUpcByConditionRes;
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
} }
}); });
this.list[key].data = data.list; this.list[key].data = data.list;
console.log(this.list, "this.list"); // console.log(this.list, "this.list");
} }
}, },
// 接收分页子组件传过来的值 // 接收分页子组件传过来的值
...@@ -146,16 +146,10 @@ export default { ...@@ -146,16 +146,10 @@ export default {
}, },
// 接收列表子组件传过来的值 // 接收列表子组件传过来的值
receiveListChild(obj) { receiveListChild(obj) {
let type;
if (this.$route.query.id === "zhuxiao") {
type = false;
} else {
type = true;
}
this.$router.push({ this.$router.push({
path: "/Business/Msg", path: "/Business/Msg",
query: { query: {
type, id: this.$route.query.id,
fId: obj.fid, fId: obj.fid,
code: obj.code, code: obj.code,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment