diff --git a/dist.zip b/dist.zip
index 920a8e2..4dbe189 100644
Binary files a/dist.zip and b/dist.zip differ
diff --git a/src/components/LeftNav/LeftNav.vue b/src/components/LeftNav/LeftNav.vue
index 8ec15a1..944e424 100644
--- a/src/components/LeftNav/LeftNav.vue
+++ b/src/components/LeftNav/LeftNav.vue
@@ -63,13 +63,22 @@ export default {
childCode = item.children[0].code;
}
if (!url) {
- const path = window.location.href.split('?');
+ // const path = window.location.href.split('?');
+ const path = this.$route.path;
if (this.code && code !== this.code) {
- window.location.href = path[0] + `?code=${childCode}`;
+ // window.location.href = path[0] + `?code=${childCode}`;
+ this.$router.push({
+ path: path,
+ query: { code: childCode },
+ });
this.$emit('changeCode', code);
this.childCode = code;
} else if (code === this.code) {
- window.location.href = path[0] + `?code=${code}`;
+ // window.location.href = path[0] + `?code=${code}`;
+ this.$router.push({
+ path: path,
+ query: { code },
+ });
}
} else {
if (url === '/') {
diff --git a/src/components/Location/Location.vue b/src/components/Location/Location.vue
index 0e19f45..4f1f253 100644
--- a/src/components/Location/Location.vue
+++ b/src/components/Location/Location.vue
@@ -8,8 +8,8 @@
您当前位置:
首页
- > {{ titleName }}
- > {{ titleTwo }}
+ > {{ titleName }}
+ > {{ titleTwo }}
> {{ titleThree }}
@@ -948,15 +948,18 @@ export default {
titleName: '',
titleTwo: '',
titleThree: '',
+ code: '',
};
},
watch: {
'$route.query.code'() {
+ this.code = this.$route.query.code;
this.getLocal();
},
},
created() {
this.getLocal();
+ this.code = this.$route.query.code;
},
methods: {
getLocal() {
@@ -995,29 +998,49 @@ export default {
if (item.children && item.children.length) {
for (let k = 0; k < item.children.length; k++) {
const itemC = item.children[k];
-
if (itemC.children && itemC.children.length) {
for (let m = 0; m < itemC.children.length; m++) {
const itemD = itemC.children[m];
- if (this.title === itemD.title && m !== 0) {
- const path = window.location.href.split('?');
- window.location.href = path[0] + `?code=${itemC.children[0].code}`;
- return;
+ if (itemD.code === this.code && m !== 0) {
+ console.log('itemC: ', itemC);
+ this.$router.push({
+ path: item.url,
+ query: { code: itemC.children[0].code },
+ });
}
}
}
-
- if (this.title === itemC.title && k !== 0) {
- this.$router.push({
- path: this.tabList[i].url,
- query: { code: item.children[0].code },
- });
- return;
- }
}
}
}
},
+ backTitleOne() {
+ const path = this.$route.path;
+ let titleObj = {};
+ let lists = [];
+ for (let i = 0; i < this.tabList.length; i++) {
+ console.log('111111111');
+ if (this.tabList[i].url === path) {
+ titleObj = { ...this.tabList[i] };
+ lists = [...this.tabList[i].children];
+ }
+ }
+ if (lists[0].children && lists[0].children.length) {
+ console.log('2222222222');
+ this.$router.push({
+ path: titleObj.url,
+ query: { code: lists[0].children[0].code },
+ });
+ // this.code = lists[0].children[0].code;
+ } else {
+ console.log('333333333333');
+ this.$router.push({
+ path: titleObj.url,
+ query: { code: lists[0].code },
+ });
+ // this.code = lists[0].code;
+ }
+ },
},
};
diff --git a/src/views/CompanyProfile/CompanyProfile.vue b/src/views/CompanyProfile/CompanyProfile.vue
index 8cb5605..0d2cacb 100644
--- a/src/views/CompanyProfile/CompanyProfile.vue
+++ b/src/views/CompanyProfile/CompanyProfile.vue
@@ -67,6 +67,12 @@ export default {
this.getData(this.code);
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDefaultTitle(this.code);
+ this.getData(this.code);
+ }
+ },
},
created() {
this.code = this.$route.query.code;
diff --git a/src/views/NewPages/NewPages.vue b/src/views/NewPages/NewPages.vue
index caeeb3b..8be459d 100644
--- a/src/views/NewPages/NewPages.vue
+++ b/src/views/NewPages/NewPages.vue
@@ -125,6 +125,20 @@ export default {
this.introContent = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getType(this.code);
+ this.getDetault(this.code);
+ if (this.code === '0204') {
+ this.getContentData('0201');
+ this.getContentData('0202');
+ this.getContentData('0203');
+ } else {
+ this.getContentData();
+ }
+ this.introContent = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -194,6 +208,7 @@ export default {
}
} else {
data = await this.getContent(param);
+ this.introId = '';
this.showLoading = false;
this.content = data;
}
diff --git a/src/views/OtherPages/Department.vue b/src/views/OtherPages/Department.vue
index 13224b1..4c5f917 100644
--- a/src/views/OtherPages/Department.vue
+++ b/src/views/OtherPages/Department.vue
@@ -677,6 +677,23 @@ export default {
this.content = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ if (
+ this.code.length === 6 &&
+ (this.code.split('')[5] === '4' ||
+ this.code.split('')[5] === '6' ||
+ this.code.split('')[5] === '7' ||
+ this.code.split('')[5] === '8')
+ ) {
+ this.getContentData(this.code);
+ } else {
+ this.getData(this.code);
+ }
+ this.content = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -755,6 +772,7 @@ export default {
pageSize: 10,
};
const data = await this.getContent(params);
+ this.introId = '';
this.content = data || {};
} catch (error) {}
},
diff --git a/src/views/OtherPages/Information.vue b/src/views/OtherPages/Information.vue
index d0c4f9d..42fe43e 100644
--- a/src/views/OtherPages/Information.vue
+++ b/src/views/OtherPages/Information.vue
@@ -120,6 +120,17 @@ export default {
this.content = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ if (this.code.length === 6 && (this.code === '060101' || this.code === '060503')) {
+ this.getData(this.code);
+ } else {
+ this.getContentData(this.code);
+ }
+ this.content = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
diff --git a/src/views/OtherPages/NoticeNotice.vue b/src/views/OtherPages/NoticeNotice.vue
index 485782d..11d506a 100644
--- a/src/views/OtherPages/NoticeNotice.vue
+++ b/src/views/OtherPages/NoticeNotice.vue
@@ -75,6 +75,13 @@ export default {
this.introContent = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ this.getContentData();
+ this.introContent = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -106,6 +113,7 @@ export default {
pageSize: 10,
};
const data = await this.getContent(param);
+ this.introId = '';
this.content = data;
} catch (error) {}
},
diff --git a/src/views/OtherPages/PartyBuilding.vue b/src/views/OtherPages/PartyBuilding.vue
index dab6cf4..ef22a7a 100644
--- a/src/views/OtherPages/PartyBuilding.vue
+++ b/src/views/OtherPages/PartyBuilding.vue
@@ -79,6 +79,13 @@ export default {
this.introContent = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ this.getContentData();
+ this.introContent = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -110,6 +117,7 @@ export default {
pageSize: 10,
};
const data = await this.getContent(param);
+ this.introId = '';
this.content = data;
} catch (error) {}
},
diff --git a/src/views/OtherPages/PilePages.vue b/src/views/OtherPages/PilePages.vue
index aede800..e52e073 100644
--- a/src/views/OtherPages/PilePages.vue
+++ b/src/views/OtherPages/PilePages.vue
@@ -63,6 +63,13 @@ export default {
this.introContent = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ this.getContentData();
+ this.introContent = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -94,6 +101,7 @@ export default {
pageSize: 10,
};
const data = await this.getContent(param);
+ this.introId = '';
this.content = data;
} catch (error) {}
},
diff --git a/src/views/OtherPages/SafeProduction.vue b/src/views/OtherPages/SafeProduction.vue
index 93a7367..6ac7dbf 100644
--- a/src/views/OtherPages/SafeProduction.vue
+++ b/src/views/OtherPages/SafeProduction.vue
@@ -75,6 +75,13 @@ export default {
this.introContent = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ this.getContentData();
+ this.introContent = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -106,6 +113,7 @@ export default {
pageSize: 10,
};
const data = await this.getContent(param);
+ this.introId = '';
this.content = data;
} catch (error) {}
},
diff --git a/src/views/OtherPages/Search.vue b/src/views/OtherPages/Search.vue
index 1eb4816..67e3500 100644
--- a/src/views/OtherPages/Search.vue
+++ b/src/views/OtherPages/Search.vue
@@ -110,6 +110,7 @@ export default {
title: this.title || '',
};
const res = await this.getContent(param);
+ this.introId = '';
this.content = res;
} catch (error) {}
},
diff --git a/src/views/OtherPages/System.vue b/src/views/OtherPages/System.vue
index dbd0b8c..84c6a91 100644
--- a/src/views/OtherPages/System.vue
+++ b/src/views/OtherPages/System.vue
@@ -87,6 +87,13 @@ export default {
this.introContent = {};
}
},
+ '$route.query.introId'() {
+ if (this.$route.path === this.list.url) {
+ this.getDetault(this.code);
+ this.getContentData(this.code);
+ this.introContent = {};
+ }
+ },
},
created() {
this.code = this.$route.query.code;
@@ -135,6 +142,7 @@ export default {
pageSize: 10,
};
const data = await this.getContent(param);
+ this.introId = '';
this.content = data;
} catch (error) {}
},