Commit 1a26e386 by 林家欣

联调常见问题详情页

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