Commit 1a26e386 by 林家欣

联调常见问题详情页

parent 15cb459e
...@@ -27,15 +27,21 @@ const businessGetDetailById = (params = {}) => { ...@@ -27,15 +27,21 @@ const businessGetDetailById = (params = {}) => {
return POST(`${Prefix}/office/eanupc/api/getDetailById`, params) return POST(`${Prefix}/office/eanupc/api/getDetailById`, params)
} }
// 常见问题 // 常见问题列表
const businessGetFaqListByTypeName = (params = {}) => { const businessGetFaqListByTypeName = (params = {}) => {
return GET(`${Prefix2}/tm/faq/third/getFaqListByTypeName`, params) return GET(`${Prefix2}/tm/faq/third/getFaqListByTypeName`, params)
} }
// 常见问题详情
const businessGetFaqById = (params = {}) => {
return GET(`${Prefix2}/tm/faq/third/getFaqById`, params)
}
export default { export default {
businessDownLoad, businessDownLoad,
businessGetTop4, businessGetTop4,
businessGetEanUpcByCondition, businessGetEanUpcByCondition,
businessGetDetailById, businessGetDetailById,
businessGetFaqListByTypeName, businessGetFaqListByTypeName,
businessGetFaqById,
} }
...@@ -67,7 +67,7 @@ export function checkResponseCodeAuthUnPermitted(resCode) { ...@@ -67,7 +67,7 @@ export function checkResponseCodeAuthUnPermitted(resCode) {
export function handleResponseSuccess(res = {}) { export function handleResponseSuccess(res = {}) {
return { return {
success: true, success: true,
returnCode: res.code || ResponseCode.success, returnCode: res.code || ResponseCode.success[0],
returnMsg: res.msg || "请求成功", returnMsg: res.msg || "请求成功",
data: res.data || res.page || res.member || null data: res.data || res.page || res.member || null
} }
......
...@@ -105,7 +105,8 @@ export default { ...@@ -105,7 +105,8 @@ export default {
// TODO 去dropdown里面精确查找当前的路径 // TODO 去dropdown里面精确查找当前的路径
let result; let result;
result = deepFindBreadcrumb(nav_.children, this.$route.path); result = deepFindBreadcrumb(nav_.children, this.$route.path);
if (!result && Object.keys(this.$route.query).length > 0) { // console.log(this.$route.path, result, 'resultresultresult');
if (result.length === 0 && Object.keys(this.$route.query).length > 0) {
const queryString = Qs.stringify(cleanObject(this.$route.query)); const queryString = Qs.stringify(cleanObject(this.$route.query));
let path = `${this.$route.path}?${queryString}`; let path = `${this.$route.path}?${queryString}`;
result = deepFindBreadcrumb(nav_.children, path); result = deepFindBreadcrumb(nav_.children, path);
......
...@@ -224,6 +224,9 @@ export const nav = [ ...@@ -224,6 +224,9 @@ export const nav = [
name: "条码注册公告", name: "条码注册公告",
index: 2, index: 2,
link: "/Business/Notice?id=zhuce", link: "/Business/Notice?id=zhuce",
query: {
id: 'zhuce'
},
breadcrumb: [ breadcrumb: [
{ name: "业务大厅", path: "/Business" }, { name: "业务大厅", path: "/Business" },
{ name: "我还不是系统成员", path: "/Business/Register" }, { name: "我还不是系统成员", path: "/Business/Register" },
...@@ -235,6 +238,9 @@ export const nav = [ ...@@ -235,6 +238,9 @@ export const nav = [
name: "条码注销公告", name: "条码注销公告",
index: 2, index: 2,
link: "/Business/Notice?id=zhuxiao", link: "/Business/Notice?id=zhuxiao",
query: {
id: 'zhuxiao'
},
breadcrumb: [ breadcrumb: [
{ name: "业务大厅", path: "/Business" }, { name: "业务大厅", path: "/Business" },
{ name: "我还不是系统成员", path: "/Business/Register" }, { name: "我还不是系统成员", path: "/Business/Register" },
...@@ -293,7 +299,7 @@ export const nav = [ ...@@ -293,7 +299,7 @@ export const nav = [
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "常见问题", name: "常见问题",
index: 2, index: 2,
link: "/Business/Guide8", link: "/Business/Faq",
isHiddenMenu: true, isHiddenMenu: true,
breadcrumb: [ breadcrumb: [
{ name: "业务大厅", path: "/Business" }, { name: "业务大厅", path: "/Business" },
...@@ -303,6 +309,18 @@ export const nav = [ ...@@ -303,6 +309,18 @@ export const nav = [
}, },
{ {
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "常见问题详情",
index: 2,
link: "/Business/Faq/Msg",
isHiddenMenu: true,
breadcrumb: [
{ name: "业务大厅", path: "/Business" },
{ name: "操作指南", path: "/Business/Guide" },
{ name: "常见问题详情" },
],
},
{
id: uuid("gs_nav"),
name: "我要续展", name: "我要续展",
index: 2, index: 2,
link: "/Business/Renewal", link: "/Business/Renewal",
...@@ -341,7 +359,7 @@ export const nav = [ ...@@ -341,7 +359,7 @@ export const nav = [
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "条码公告", name: "条码公告",
index: 2, index: 2,
link: "/Business/Msg", link: "/Business/Notice/Msg",
isHiddenMenu: true, isHiddenMenu: true,
breadcrumb: [ breadcrumb: [
{ name: "业务大厅", path: "/Business" }, { name: "业务大厅", path: "/Business" },
......
...@@ -279,13 +279,22 @@ const routes = [ ...@@ -279,13 +279,22 @@ const routes = [
component: () => import("@/views/Business/Code1.vue"), component: () => import("@/views/Business/Code1.vue"),
}, },
{ {
path: "/Business/Guide8", path: "/Business/Faq",
name: "Guide8", name: "Faq",
meta: { meta: {
name: "常见问题", name: "常见问题",
fatherPath: '/Business/Guide', fatherPath: '/Business/Guide',
}, },
component: () => import("@/views/Business/Fap.vue"), component: () => import("@/views/Business/Faq.vue"),
},
{
path: "/Business/Faq/Msg",
name: "FaqMsg",
meta: {
name: "常见问题",
fatherPath: '/Business/Guide',
},
component: () => import("@/views/Business/FaqMsg.vue"),
}, },
{ {
path: "/Business/Corppaynew", path: "/Business/Corppaynew",
...@@ -320,12 +329,12 @@ const routes = [ ...@@ -320,12 +329,12 @@ const routes = [
component: () => import("@/views/Business/Notice.vue"), component: () => import("@/views/Business/Notice.vue"),
}, },
{ {
path: "/Business/Msg", path: "/Business/Notice/Msg",
name: "BusinessMsg", name: "BusinessNoticeMsg",
meta: { meta: {
name: "业务大厅详情", name: "业务大厅详情",
}, },
component: () => import("@/views/Business/Msg.vue"), component: () => import("@/views/Business/NoticeMsg.vue"),
}, },
{ {
path: "/Business/Training", path: "/Business/Training",
......
...@@ -38,9 +38,10 @@ ...@@ -38,9 +38,10 @@
role="tabpanel" role="tabpanel"
:aria-labelledby="tmp.type + '-tab'" :aria-labelledby="tmp.type + '-tab'"
> >
<faqTable :list="tmp.data" /> <faqTable :list="tmp.data" @toTableFather="receiveTableFather"/>
<pages <pages
:currPage="pageParams.currPage" :currPage="pageParams.currPage"
:pageSize="pageParams.pageSize"
:total="pageParams.total" :total="pageParams.total"
@getLimit="receivePagesChild" @getLimit="receivePagesChild"
/> />
...@@ -73,21 +74,20 @@ export default { ...@@ -73,21 +74,20 @@ export default {
pageParams: { pageParams: {
currPage: 1, currPage: 1,
pageSize: 10, pageSize: 10,
pageCount: 5,
total: 0, total: 0,
}, },
list: [ list: [
{ {
type: "qbwt", type: "qbwt",
name: "全部问题", name: "全部问题",
link: "/Business/Guide8", link: "/Business/Faq",
active: "qbwt", active: "qbwt",
data: [], data: [],
}, },
{ {
type: "ywbl", type: "ywbl",
name: "业务办理", name: "业务办理",
link: "/Business/Guide8", link: "/Business/Faq",
active: "ywbl", active: "ywbl",
data: [ data: [
{ {
...@@ -99,42 +99,42 @@ export default { ...@@ -99,42 +99,42 @@ export default {
{ {
type: "cpxxtb", type: "cpxxtb",
name: "产品信息通报", name: "产品信息通报",
link: "/Business/Guide8", link: "/Business/Faq",
active: "cpxxtb", active: "cpxxtb",
data: [], data: [],
}, },
{ {
type: "bmjs", type: "bmjs",
name: "编码技术", name: "编码技术",
link: "/Business/Guide8", link: "/Business/Faq",
active: "bmjs", active: "bmjs",
data: [], data: [],
}, },
{ {
type: "fgybz", type: "fgybz",
name: "法规与标准", name: "法规与标准",
link: "/Business/Guide8", link: "/Business/Faq",
active: "fgybz", active: "fgybz",
data: [], data: [],
}, },
{ {
type: "tmzl", type: "tmzl",
name: "条码质量", name: "条码质量",
link: "/Business/Guide8", link: "/Business/Faq",
active: "tmzl", active: "tmzl",
data: [], data: [],
}, },
{ {
type: "tmjsyy", type: "tmjsyy",
name: "条码技术应用", name: "条码技术应用",
link: "/Business/Guide8", link: "/Business/Faq",
active: "tmjsyy", active: "tmjsyy",
data: [], data: [],
}, },
{ {
type: "other", type: "other",
name: "其他", name: "其他",
link: "/Business/Guide8", link: "/Business/Faq",
active: "other", active: "other",
data: [], data: [],
}, },
...@@ -143,20 +143,19 @@ export default { ...@@ -143,20 +143,19 @@ export default {
}, },
computed: { computed: {
current() { current() {
// console.log(this.$route.query.id, "$route.query.id"); let type;
let id; if (this.$route.query.type) {
if (this.$route.query.id) { type = this.$route.query.type;
id = this.$route.query.id;
} else { } else {
id = "qbwt"; type = "qbwt";
} }
return id; return type;
}, },
}, },
watch: { watch: {
$route: { $route: {
handler(val) { handler(val) {
this.init(val.query.id); this.init(val.query.type);
}, },
deep: true, deep: true,
immediate: true, immediate: true,
...@@ -173,6 +172,17 @@ export default { ...@@ -173,6 +172,17 @@ export default {
this.pageParams.currentPage = val; this.pageParams.currentPage = val;
this.getFaqListByTypeName(); this.getFaqListByTypeName();
}, },
// 接收列表子组件传过来的值
receiveTableFather(msg) {
console.log(msg, '接收列表子组件传过来的值');
this.$router.push({
path: '/Business/Faq/Msg',
query: {
type: this.current,
id: msg.id,
},
});
},
// 常见问题 // 常见问题
async getFaqListByTypeName() { async getFaqListByTypeName() {
const params = { const params = {
...@@ -187,7 +197,7 @@ export default { ...@@ -187,7 +197,7 @@ export default {
console.log(businessGetFaqListByTypeNameRes, "常见问题"); console.log(businessGetFaqListByTypeNameRes, "常见问题");
this.pageParams.total = data.totalRows; this.pageParams.total = data.totalRows;
this.list.forEach((el) => { this.list.forEach((el) => {
if (el.active === this.$route.query.id) { if (el.active === this.$route.query.type) {
el.data = data.rows; el.data = data.rows;
} }
}); });
...@@ -198,7 +208,7 @@ export default { ...@@ -198,7 +208,7 @@ export default {
this.$router.push({ this.$router.push({
path: this.list[i].link, path: this.list[i].link,
query: { query: {
id: this.list[i].active, type: this.list[i].active,
}, },
}); });
}, },
......
<template>
<div class="guide">
<cate :father="lsspCate"></cate>
<div class="guide-msg container">
<p v-html="msg.content">
</p>
</div>
</div>
</template>
<script>
import cate from "../comps/cate.vue";
export default {
components: {
cate,
},
data() {
return {
lsspCate: {
name: "",
ico: "",
},
msg: {},
};
},
created() {
this.businessGetFaqListgetFaqById();
},
methods: {
// 常见问题详情
async businessGetFaqListgetFaqById() {
const params = {
id: this.$route.query.id,
};
const businessGetFaqByIdRes =
await this.$api.business.businessGetFaqById(params);
const { returnCode, data } = businessGetFaqByIdRes;
if (returnCode === 200) {
console.log(businessGetFaqByIdRes, "常见问题详情");
this.lsspCate.name = data.name
this.msg = data;
}
},
},
};
</script>
<style lang="scss" scoped>
.guide {
@include module-box;
.guide-msg {
margin: 20px 0;
font-size: 14px;
.msg-title {
color: #008dbd;
margin: 15px 0;
&.actived {
color: #04408d;
}
}
.paddingBottom10 {
padding-bottom: 10px;
}
img {
max-width: 100%;
}
p {
text-indent: 25px;
font-size: 14px;
color: #454545;
font-weight: 300;
line-height: 24px
}
}
}
</style>
\ No newline at end of file
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
:aria-labelledby="tmp.type + '-tab'" :aria-labelledby="tmp.type + '-tab'"
> >
<list :list="tmp.data" @toListFather="receiveListChild" /> <list :list="tmp.data" @toListFather="receiveListChild" />
<pages :currPage="pageParams.currPage" :total="pageParams.total" @getLimit="receivePagesChild"/> <pages :currPage="pageParams.currPage" :pageSize="pageParams.pageSize" :total="pageParams.total" @getLimit="receivePagesChild"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -82,7 +82,6 @@ export default { ...@@ -82,7 +82,6 @@ export default {
pageParams: { pageParams: {
currPage: 1, currPage: 1,
pageSize: 10, pageSize: 10,
pageCount: 5,
total: 100, total: 100,
}, },
logoutFlag: "1", logoutFlag: "1",
...@@ -118,8 +117,8 @@ export default { ...@@ -118,8 +117,8 @@ export default {
// 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 { success, data } = businessGetEanUpcByConditionRes;
if (returnCode === "0") { if (success) {
console.log(businessGetEanUpcByConditionRes, "条码注册/注销公告"); console.log(businessGetEanUpcByConditionRes, "条码注册/注销公告");
this.pageParams.total = data.totalCount; this.pageParams.total = data.totalCount;
let key; let key;
...@@ -148,14 +147,14 @@ export default { ...@@ -148,14 +147,14 @@ export default {
// 接收列表子组件传过来的值 // 接收列表子组件传过来的值
receiveListChild(obj) { receiveListChild(obj) {
this.$router.push({ this.$router.push({
path: "/Business/Msg", path: "/Business/Notice/Msg",
query: { query: {
id: this.$route.query.id, id: this.$route.query.id,
fId: obj.fid, fId: obj.fid,
code: obj.code, code: obj.code,
}, },
}); });
const result = deepFindBreadcrumb(nav, '/Business/Msg'); const result = deepFindBreadcrumb(nav, '/Business/Notice/Msg');
this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb); this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb);
}, },
jump(i) { jump(i) {
......
...@@ -96,9 +96,9 @@ export default { ...@@ -96,9 +96,9 @@ export default {
}; };
const businessGetDetailByIdRes = const businessGetDetailByIdRes =
await this.$api.business.businessGetDetailById(params); await this.$api.business.businessGetDetailById(params);
const { returnCode, data } = businessGetDetailByIdRes; const { success, data } = businessGetDetailByIdRes;
console.log(businessGetDetailByIdRes, "businessGetDetailByIdRes"); console.log(businessGetDetailByIdRes, "businessGetDetailByIdRes");
if (returnCode === "0") { if (success) {
this.czznCate.name = data.firmName; this.czznCate.name = data.firmName;
data.logoutFlag = data.logoutFlag === '1' ? '已注销' : '有效'; data.logoutFlag = data.logoutFlag === '1' ? '已注销' : '有效';
data.logoutDate = data.logoutDate ? this.$moment(data.logoutDate).format("YYYY年MM月DD") : null; data.logoutDate = data.logoutDate ? this.$moment(data.logoutDate).format("YYYY年MM月DD") : null;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<div class="col-lg-8">标题</div> <div class="col-lg-8">标题</div>
<div class="col-lg-2">类型</div> <div class="col-lg-2">类型</div>
</div> </div>
<div class="fqtbody" v-if="list.length > 0"> <div class="fqtbody">
<div class="row" v-for="(tmp, i) in list" :key="i"> <div class="row" v-for="(tmp, i) in list" :key="i" @click="handelClick(tmp)">
<div class="col-lg-2">{{i+1}}</div> <div class="col-lg-2">{{i+1}}</div>
<div class="col-lg-8">{{tmp.name}}</div> <div class="col-lg-8">{{tmp.name}}</div>
<div class="col-lg-2">{{ tmp.types && tmp.types.name}}</div> <div class="col-lg-2">{{ tmp.types && tmp.types.name}}</div>
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
<script> <script>
export default { export default {
props: ['list'], props: ['list'],
methods: {
handelClick(msg) {
this.$emit('toTableFather', msg);
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -43,6 +48,7 @@ export default { ...@@ -43,6 +48,7 @@ export default {
} }
.fqtbody{ .fqtbody{
.row{ .row{
cursor: pointer;
padding: 20px 0; padding: 20px 0;
margin: 0; margin: 0;
border-bottom: 1px solid #E9E9E9; border-bottom: 1px solid #E9E9E9;
......
...@@ -87,8 +87,8 @@ export default { ...@@ -87,8 +87,8 @@ export default {
}; };
const orgGetBranchDetailRes = const orgGetBranchDetailRes =
await this.$api.org.orgGetBranchDetail(params); await this.$api.org.orgGetBranchDetail(params);
const { returnCode, data } = orgGetBranchDetailRes; const { success, data } = orgGetBranchDetailRes;
if (returnCode === "0") { if (success) {
console.log(orgGetBranchDetailRes, "获取编码机构详情"); console.log(orgGetBranchDetailRes, "获取编码机构详情");
this.msg = data; this.msg = data;
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:class="{ :class="{
active: active:
tmpB.active === currentName || tmpB.active === currentName ||
(tmpB.id && tmpB.id === $route.query.id), hasRouteQuery($route.query, tmpB.query),
}" }"
v-for="(tmpB, ii) in tmpA.children" v-for="(tmpB, ii) in tmpA.children"
:key="ii" :key="ii"
...@@ -71,11 +71,23 @@ export default { ...@@ -71,11 +71,23 @@ export default {
}, },
}, },
created() { created() {
console.log(this.list, "获取当前路由地址"); console.log(this.$route.query, "获取当前路由地址");
let result = deepFindBreadcrumb(nav, ''); let result = deepFindBreadcrumb(nav, "");
console.log(result, 'resultresultresult2'); console.log(result, "resultresultresult2");
}, },
methods: { methods: {
// 当前路由是否包含左侧菜单
hasRouteQuery(routeQuery, query) {
let isHas = false;
if (query) {
Object.keys(routeQuery).forEach((k) => {
if (query.hasOwnProperty(k) && routeQuery[k] === query[k]) {
isHas = true;
}
});
}
return isHas;
},
// 路由跳转 // 路由跳转
jump(el) { jump(el) {
console.log(el, "el"); console.log(el, "el");
...@@ -91,7 +103,7 @@ export default { ...@@ -91,7 +103,7 @@ export default {
} }
this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb); this.$store.commit("system/SET_BREADCRUMB", result.breadcrumb);
} }
if (el.id) { if (el.query) {
let path; let path;
if (type === "redirect") { if (type === "redirect") {
path = el.redirectUrl; path = el.redirectUrl;
...@@ -101,9 +113,7 @@ export default { ...@@ -101,9 +113,7 @@ export default {
console.log(path, "path"); console.log(path, "path");
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: el.query,
id: el.id,
},
}); });
} else { } else {
this.$router.push({ this.$router.push({
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
:current-page="currPage" :current-page="currPage"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
@size-change="changeSize"
@current-change="goPage" @current-change="goPage"
background background
> >
...@@ -66,7 +65,7 @@ export default { ...@@ -66,7 +65,7 @@ export default {
mounted(){ mounted(){
}, },
methods:{ methods:{
changeSize(i){ changeSize(){
this.$emit('getLimit',this.currPage) this.$emit('getLimit',this.currPage)
}, },
goPage(i){ goPage(i){
......
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