学习问答

This commit is contained in:
liuye
2023-01-11 15:37:18 +08:00
parent 79eb498a83
commit a1f9f71d31
2 changed files with 39 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
<template> <template>
<ai-detail> <ai-detail>
<template slot="title"> <template slot="title">
<ai-title title="返回学习回答列表" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> <ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title> </ai-title>
</template> </template>
<template slot="content"> <template slot="content">

View File

@@ -4,6 +4,24 @@
<ai-title title="学习问答" isShowBottomBorder></ai-title> <ai-title title="学习问答" isShowBottomBorder></ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<ai-search-bar bottomBorder>
<template #left>
<span class="times">提问时间</span>
<el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd"
range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" @change="getListInit"></el-date-picker>
</template>
<template #right>
<el-input
v-model="search.content"
size="small"
placeholder="请输入问题/提问人员"
clearable
v-throttle="() => {search.current = 1, getList()}"
@clear="search.content = '', getListInit()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table class="ai-table" :tableData="tableData" :col-configs="colConfigs" :total="page.total" <ai-table class="ai-table" :tableData="tableData" :col-configs="colConfigs" :total="page.total"
:current.sync="page.current" :size.sync="page.size" @getList="getList" :dict="dict"> :current.sync="page.current" :size.sync="page.size" @getList="getList" :dict="dict">
<el-table-column slot="index" type="index" width="100px" label="序号" align="center"></el-table-column> <el-table-column slot="index" type="index" width="100px" label="序号" align="center"></el-table-column>
@@ -45,11 +63,12 @@ export default {
total: 0 total: 0
}, },
search: { search: {
name: "", content: "",
companyCategory: "", startTime: "",
concernDegree: "" endTime: ""
}, },
id: "" id: "",
time: []
}; };
}, },
created() { created() {
@@ -58,10 +77,21 @@ export default {
}) })
}, },
methods: { methods: {
getListInit() {
this.page.current = 1
this.getList()
},
getList() { getList() {
this.search.startTime = ''
this.search.endTime = ''
if(this.time.length) {
this.search.startTime = this.time[0]
this.search.endTime = this.time[1]
}
this.instance.post(`/app/applearningquestion/list`, null, { this.instance.post(`/app/applearningquestion/list`, null, {
params: { params: {
...this.page, ...this.page,
...this.search
} }
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
@@ -88,12 +118,6 @@ export default {
}) })
}) })
}, },
reset() {
Object.keys(this.search).forEach(e => {
this.search[e] = ""
})
this.getList()
}
} }
}; };
</script> </script>
@@ -102,5 +126,9 @@ export default {
.list { .list {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.times {
color: #999;
font-size: 14px;
}
} }
</style> </style>