Commit 4682f556 authored by 刘殿昕's avatar 刘殿昕

问答中心

parent 6f4c83f9
......@@ -400,6 +400,7 @@ export default {
font-size: 14px;
display: none;
z-index: 1;
text-align: center;
}
.shop_menu {
width: 280px;
......@@ -435,7 +436,7 @@ export default {
height: 44px;
line-height: 44px;
padding: 0 30px;
text-align: left;
text-align: center;
color: #0d1847;
}
.user_menu div:hover {
......
......@@ -246,6 +246,11 @@ export default {
{ length: this.data.length },
(item, index) => (item = 0)
);
let self = this;
window.gotodetail = (val) => {
console.log(val)
self.$emit("gotodetail", val)
}
},
methods: {
toggleSelection(rows) {
......@@ -348,6 +353,10 @@ export default {
this.$refs.multipleTable.clearSelection();
this.$emit("selectnum", { select: [], rows: [] });
},
gotodetail(val) {
console.log(val)
this.$emit("gotodetail", val)
}
},
};
</script>
......
......@@ -31,6 +31,7 @@
v-if="tableData.length"
:data="tableData"
:header="table_header"
@gotodetail="gotodeta"
></apass-table>
<list-pagination
v-if="tableData.length"
......@@ -145,6 +146,9 @@ export default {
watch: {
$route(to, from) {
this.now_state = to.path;
this.currentPage = 1;
this.currentlimit = 10;
this.total_list = 0;
this.changeState(this.now_state);
},
},
......@@ -284,7 +288,11 @@ export default {
}
});
},
gotodeta(val) {
this.$router.push("/technical_support/answer_center/detail/" + val);
},
changeState(val) {
this.tableData = [];
this.table_header = [];
if (val == "/qa/questions") {
this.form_data[1].label = "发布人搜索";
......@@ -296,7 +304,7 @@ export default {
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">${str.title}</span>`;
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;" title="${str.title}" onclick="gotodetail(${str.question_id})">${str.title}</span>`;
},
},
{
......@@ -368,7 +376,7 @@ export default {
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">${str.title}</span>`;
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;" title="${str.title}" onclick="gotodetail(${str.question_id})">${str.title}</span>`;
},
},
{
......
......@@ -70,7 +70,10 @@
<p v-if="activeName == 1" class="cell_answer">
{{ item.answer }}
</p>
<p :class="activeName == 0 ? 'cell_title' : 'cell_ans_title'">
<p
@click="gotodeta(item.question_id)"
:class="activeName == 0 ? 'cell_title' : 'cell_ans_title'"
>
{{ item.title }}
</p>
<p class="cell_cont">
......@@ -189,21 +192,7 @@ export default {
label: "50",
},
],
data_list: [
{
id: 1,
title: "平台的流程引擎怎么样", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"/apaas/static/docs/image/image/blob_18f512d3-ee8f-4112-89a9-b2e7bfdfdec1.blob", // 头像
},
],
data_list: [],
user_info: {
user_name: "",
role: "",
......@@ -240,12 +229,12 @@ export default {
},
refreshData() {
if (this.activeName == "0") {
this.getQList();
} else if (this.activeName == "1") {
this.getAList();
} else if (this.activeName == "2") {
this.getDeleteList();
}
this.getQList();
} else if (this.activeName == "1") {
this.getAList();
} else if (this.activeName == "2") {
this.getDeleteList();
}
},
pageResize() {
let listWidth = this.$refs.commodityCardIn.clientWidth;
......@@ -310,6 +299,9 @@ export default {
}
});
},
gotodeta(val) {
this.$router.push("/technical_support/answer_center/detail/" + val);
},
cancelDel() {
this.diaDelItem = false;
},
......@@ -349,7 +341,7 @@ export default {
},
mounted() {
this.getUserQA();
// this.getQList();
this.getQList();
},
};
</script>
......
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