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