Commit adc8c9f9 authored by 刘殿昕's avatar 刘殿昕

问答管理。and so on

parent 90bb7ec1
......@@ -32,7 +32,7 @@
></span>
<a
v-else
class="btn"
class="del_btn_a"
:class="v.class || ''"
:key="'btn_' + index + '_' + i"
@click.stop="v.callback && v.callback(scope.row)"
......@@ -55,7 +55,7 @@
</div>
<div v-else-if="item.type === 'button'" class="row_action">
<a
class="btn warn"
class="btn"
v-text="scope.row[item.prop]"
@click.stop="item.callback && item.callback(scope.row)"
></a>
......@@ -529,4 +529,9 @@ export default {
border-radius: 10px;
background-color: #fff;
}
.del_btn_a {
font-weight: bold;
color: #830f53;
cursor: pointer;
}
</style>
......@@ -19,6 +19,8 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
></el-date-picker>
<el-select
v-if="item.type == 'select'"
......@@ -101,3 +103,24 @@ export default {
width: calc(100% - 220px);
}
</style>
<style>
.from_content1 .el-input__inner {
background-color: #f7f8f9;
}
.el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9;
width: 80px;
}
.el-date-editor.el-range-editor .el-range-separator {
width: 40px;
position: relative;
top: 2px;
}
.el-date-editor.el-range-editor {
width: 260px;
padding: 3px 10px 3px 15px;
}
.el-date-editor .el-range__icon {
margin-right: 8px;
}
</style>
\ No newline at end of file
......@@ -85,11 +85,3 @@ export default {
bottom: -20px;
}
</style>
<style>
.from_content1 .el-input__inner {
background-color: #f7f8f9;
}
.el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9;
}
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<div class="fwgl_container">
<side-nav-bar
v-if="showNavbar"
title="问答中心管理"
:title-icon="require('@/assets/imgs/tool_ic_wenda.png')"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
></side-nav-bar>
<div class="main_container">
<router-view :key="'type_' + $route.params.type"></router-view>
</div>
</div>
</template>
<script>
import sideNavBar from "@/components/side-nav-bar";
export default {
components: {
sideNavBar,
},
data: () => ({
userNav: [
{
name: "提问列表",
path: `/qa/questions`,
},
{
name: "回答列表",
path: `/qa/answers`,
},
],
navList: [],
showNavbar: false,
}),
watch: {
"$route.fullPath"(path) {
this.initNavList();
},
},
methods: {
initNavList() {
this.navList = this.userNav;
},
},
mounted() {
this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
this.$store.commit("userInfofun", data.data);
const userLevel = this.$store.getters.level;
if (userLevel == 0) {
this.$message({
message: `您没有问答中心管理模块的权限.`,
type: "warning",
});
this.$router.push(`/index`);
} else {
this.showNavbar = true;
this.initNavList();
}
}
});
},
};
</script>
<style scoped>
.fwgl_container {
height: calc(100vh - 58px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.side_nav_bar {
width: 180px;
flex-shrink: 0;
}
.main_container {
width: calc(100% - 180px);
flex-grow: 1;
flex-shrink: 1;
background-color: #f6f7fb;
overflow: auto;
}
</style>
......@@ -48,6 +48,26 @@ const user = {
editUserPassword(params) {
return axios.post(`/apaas/backmgt/user/password/${params.id}`, qs.stringify(params.form));
},
// QA
getQuestionList(params) {
return axios.get(`/apaas/support/qa/question/list?search=${params.search}&style=${params.style}&create_user=${params.create_user}&start=${params.start}&end=${params.end}&limit=${params.limit}&page=${params.page}&order=${params.order}`);
},
getAnswerList(params) {
return axios.get(`/apaas/support/qa/answer/list?search=${params.search}&style=${params.style}&create_user=${params.create_user}&start=${params.start}&end=${params.end}&limit=${params.limit}&page=${params.page}`);
},
getDeleteList() {
return axios.get(`/apaas/support/qa/deleted`);
},
delQuestions(params) {
return axios.delete(`/apaas/support/qa/question/delete`, params);
},
delAnswers(params) {
return axios.delete(`/apaas/support/qa/answer/delete`, params);
},
getUserQA() {
return axios.get(`/apaas/support/qa/info`)
}
}
export default user;
export default user;
\ No newline at end of file
......@@ -420,22 +420,30 @@ export default new Router({
component: () => import("@/pages/user/order/order_detail"),
},
{
path: "/user/my_qa", // 我的问答
path: "/qa/my_qa", // 我的问答
name: "myQA",
component: () => import("@/pages/user/questions-answers/my-qa"),
},
],
}, // 个人中心
{
path: "/qa_management", // 问答中心管理
name: "qaManagement",
redirect: "/qa/questions",
component: () => import("@/pages/user/questions-answers/qa"),
children: [
{
path: "/user/questions", // 提问列表
path: "/qa/questions", // 提问列表
name: "questions",
component: () => import("@/pages/user/questions-answers/community"),
},
{
path: "/user/answers", // 回答列表
path: "/qa/answers", // 回答列表
name: "answers",
component: () => import("@/pages/user/questions-answers/community"),
},
],
}, // 个人中心
]
},
{
path: "/authority", // 权限管理
name: "authority",
......
This diff is collapsed.
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