标准问答-列表

This commit is contained in:
zyn
2023-04-13 16:19:36 +08:00
parent 3795182249
commit d51c214430
+92 -55
View File
@@ -5,14 +5,18 @@
<div class="search-wrap">
<el-form inline :model="form" class="form-inline">
<el-form-item label="类型" class="search-item">
<el-input v-model="form.classification" placeholder="请输入类型" clearable></el-input>
<el-select v-model="form.classification" placeholder="请选择类型">
<el-option
v-for="opt in classificationOption"
:key="opt.value"
:value="opt.value"
:label="opt.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="问题描述" class="search-item">
<el-input v-model="form.problemDescription" placeholder="请输入问题描述" clearable></el-input>
</el-form-item>
<el-form-item label="提问人" class="search-item">
<el-input v-model="form.questioner" placeholder="请输入提问人" clearable></el-input>
</el-form-item>
<el-form-item class="search-item">
<el-button type="primary" @click="onSubmit" size="mini">查询</el-button>
<el-button @click="onClear" size="mini" class="search-btn">清空</el-button>
@@ -20,46 +24,49 @@
</el-form>
</div>
<main>
<div style="height: 100%">
<el-table ref="table"
:data="data"
tooltip-effect = "dark"
style="width: 100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column
prop="classification"
label="类型"
width="150"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.classification }}</a>
</template>
</el-table-column>
<el-table-column
prop="problemDescription"
label="问题描述"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.problemDescription }}</a>
</template>
</el-table-column>
<el-table-column
prop="questioner"
label="提问人"
width="150"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.questioner }}</a>
</template>
</el-table-column>
<el-table-column
prop="questionTime"
label="提问时间"
width="150"
align="center">
</el-table-column>
</el-table>
<div style="height: calc(100% - 10px)">
<div style="height: 100%">
<el-table ref="table"
:data="data"
tooltip-effect = "dark"
style="width: 100%"
height="100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column
prop="classification"
label="类型"
width="150"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.classification }}</a>
</template>
</el-table-column>
<el-table-column
prop="problemDescription"
label="问题描述"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.problemDescription }}</a>
</template>
</el-table-column>
<el-table-column
prop="questioner"
label="提问人"
width="150"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.questioner }}</a>
</template>
</el-table-column>
<el-table-column
prop="questionTime"
label="提问时间"
width="150"
align="center">
</el-table-column>
</el-table>
</div>
</div>
</main>
<footer class="footer">
@@ -86,14 +93,30 @@ export default {
form:{
classification:"", // 类型
problemDescription: "", // 问题描述
questioner: "", // 提问人
questionTime: "" // 提问时间
},
data: [],
total: 0,// 总数
pageSize: this.$store.getters.userInfo.configContent,// 每页条数
currentPage: 1,//当前页
loading: false
loading: false,
classificationOption: [
{
value: 'INLAND',
label: '国内标准'
},
{
value: 'FOREIGN',
label: '海外标准'
},
{
value: 'BUSINESS_STAND',
label: '企业标准'
},
{
value: 'OTHER',
label: '公共问题'
}
],
}
},
mounted() {
@@ -102,16 +125,18 @@ export default {
methods: {
getData(){
this.loading = true
let form = this.form
form.userId = this.$store.getters.userInfo.account
form.pageSize = this.pageSize
form.page = this.currentPage
return new Promise((resolve,reject)=>{
this.$http.get('lawss/AskQuestions/getAskQuestionsPage', {
userId: this.$store.getters.userInfo.account,
pageSize : this.pageSize,
page : this.currentPage
}, {_this: this }, res => {
this.$http.get('lawss/AskQuestions/getAskQuestionsPage', form, {_this: this }, res => {
if(res.data){
const data = res.data
this.data = data.records
this.total = data.total
this.currentPage = data.current
this.pageSize = data.size
}
this.loading = false
resolve(res)
@@ -121,8 +146,14 @@ export default {
})
})
},
onSubmit(){},
onClear(){},
onSubmit(){
this.getData()
},
onClear(){
this.form.classification = ''
this.form.problemDescription = ''
this.getData()
},
sizeChange(pageSize){
this.pageSize = pageSize
this.getData()
@@ -154,6 +185,7 @@ export default {
.search-item{
margin: 0 10px 10px 0;
/deep/ .el-form-item__label{
color: #333;
height: 30px;
line-height: 30px;
}
@@ -165,6 +197,11 @@ export default {
width: 165px;
height: 30px;
}
/deep/ .el-input__suffix{
.el-icon-circle-close{
line-height: 32px;
}
}
}
.search-btn{
margin-left: 7px;
@@ -173,7 +210,7 @@ export default {
main{
flex: 1;
overflow: auto;
height: calc(100% - 10px);
//height: calc(100% - 10px);
}
footer{
height: 56px;