标准问答 更多
This commit is contained in:
@@ -1,187 +1,187 @@
|
||||
<!-- 企标发布 -->
|
||||
<!-- 标准问答 -->
|
||||
<template>
|
||||
<div class="release">
|
||||
<!-- <ul>-->
|
||||
<!-- <li v-for="item in standardReleaseList" :key="item.id" class="time-title" >-->
|
||||
<!-- <div style="height: 18px;">-->
|
||||
<!-- <a @click="handlePreview(item)" style="color: #333333" class="table-jump">{{ item.standName }}</a>-->
|
||||
<!-- <span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ul>-->
|
||||
<el-table
|
||||
ref="selection"
|
||||
:data="standardReleaseList"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
height="90%"
|
||||
style="width: 100%; flex: auto;"
|
||||
class="drag-table"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}">
|
||||
<el-table-column
|
||||
label="分类"
|
||||
align="center"
|
||||
width="80">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="问题描述">
|
||||
<div class="standardAsk">
|
||||
<div class="content-wrap">
|
||||
<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-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>
|
||||
</el-form-item>
|
||||
</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">
|
||||
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>-->
|
||||
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.classification }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
label="提问人"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="problemDescription"
|
||||
label="问题描述"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>-->
|
||||
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.problemDescription }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="120"
|
||||
label="提问时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="questioner"
|
||||
label="提问人"
|
||||
width="150"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>-->
|
||||
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.questioner }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<loading :loading="loading">加载中...</loading>
|
||||
<pagination
|
||||
style="position: static;"
|
||||
:page="page"
|
||||
:total="total"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"></pagination>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="questionTime"
|
||||
label="提问时间"
|
||||
width="150"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<el-pagination
|
||||
@size-change="sizeChange"
|
||||
@current-change="currentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageSize"
|
||||
layout="total, prev, pager, next, sizes, jumper"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</footer>
|
||||
</div>
|
||||
<loading :loading="loading">数据加载中……</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ReleaseQA2',
|
||||
components: {},
|
||||
mixins: [],
|
||||
name: 'standardAsk',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
pageVerify: false,
|
||||
page: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
total: 0,
|
||||
putTime: '',
|
||||
standardReleaseList: [], //标准问答数据
|
||||
form:{
|
||||
classification:"", // 类型
|
||||
problemDescription: "", // 问题描述
|
||||
questioner: "", // 提问人
|
||||
questionTime: "" // 提问时间
|
||||
},
|
||||
data: [],
|
||||
total: 0,// 总数
|
||||
pageSize: this.$store.getters.userInfo.configContent,// 每页条数
|
||||
currentPage: 1,//当前页
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.getDate()
|
||||
this.getAdvice()
|
||||
// this.addDate()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
pageChange(page) {
|
||||
this.page = page
|
||||
this.pageSize = this.$store.getters.userInfo.configContent
|
||||
this.getAdvice()
|
||||
},
|
||||
// 分页每页显示数改变后方法
|
||||
pageSizeChange(pageSize) {
|
||||
this.pageSize = this.$store.getters.userInfo.configContent
|
||||
this.getAdvice()
|
||||
// 此处需要调用接口,修改个人配置
|
||||
},
|
||||
togo () {
|
||||
if(this.total && this.total > 10){
|
||||
this.pageVerify = true
|
||||
this.pageSize = this.$store.getters.userInfo.configContent
|
||||
}else {
|
||||
this.pageVerify = false
|
||||
getData(){
|
||||
this.loading = true
|
||||
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 => {
|
||||
if(res.data){
|
||||
const data = res.data
|
||||
this.data = data.records
|
||||
this.total = data.total
|
||||
}
|
||||
this.getAdvice()
|
||||
},
|
||||
// 点击查看
|
||||
handlePreview (item) {
|
||||
// let routeUrl = this.$router.resolve({
|
||||
// name: 'OtherBussStandardDetails',
|
||||
// params: {
|
||||
// id: item.standardId,
|
||||
// pageType: 'BUSINESS_STAND'
|
||||
// }
|
||||
// })
|
||||
// window.open(routeUrl.href, '_blank')
|
||||
this.loading = false
|
||||
resolve(res)
|
||||
}, e => {
|
||||
this.loading = false
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
//截取时间
|
||||
getDate (date) {
|
||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||
onSubmit(){},
|
||||
onClear(){},
|
||||
sizeChange(pageSize){
|
||||
this.pageSize = pageSize
|
||||
this.getData()
|
||||
},
|
||||
//获取数据
|
||||
getAdvice() {
|
||||
this.loading = true
|
||||
// 模拟加载
|
||||
const timer = setInterval(() => {
|
||||
this.loading = false
|
||||
}, 2000)
|
||||
console.log(timer)
|
||||
// this.$http.get("/lawss/NewsFeed/getNewsFeed", {
|
||||
// messageType: 'QYBZFB',
|
||||
// page: this.page,
|
||||
// pageSize: this.pageSize
|
||||
// }, {
|
||||
// _this: this,loading: 'loading'
|
||||
// }, res => {
|
||||
// this.standardReleaseList = res.data.records
|
||||
// this.total = res.data.total
|
||||
// this.loading = false
|
||||
// }, e => {
|
||||
// this.loading = false
|
||||
// this.standardReleaseList = []
|
||||
// this.total = 0
|
||||
// })
|
||||
currentChange(currentPage){
|
||||
this.currentPage = currentPage
|
||||
this.getData()
|
||||
},
|
||||
},
|
||||
|
||||
handlePreview(){}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.release {
|
||||
/deep/.el-table th > .cell {
|
||||
font-size: 15px;
|
||||
}
|
||||
/deep/.el-table td > .cell{
|
||||
font-size: 13px;
|
||||
}
|
||||
/deep/.more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 2px;
|
||||
font-size: 15px;
|
||||
float: right;
|
||||
color: #4788c0;
|
||||
&:hover {
|
||||
color: #3a8ee6;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.standardAsk{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
.content-wrap{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background-color: #FFF;
|
||||
background-size: 100% 100%;
|
||||
.time-title {
|
||||
margin: 15px;
|
||||
.time {
|
||||
float: right;
|
||||
color:#333333;
|
||||
}
|
||||
a {
|
||||
color: #ffffff;
|
||||
&:hover {
|
||||
color: #e9c851;
|
||||
cursor:pointer;
|
||||
text-decoration: underline;
|
||||
padding: 10px 10px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.search-wrap{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.search-item{
|
||||
margin: 0 10px 10px 0;
|
||||
/deep/ .el-form-item__label{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
/deep/ .el-form-item__content{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
/deep/ .el-input__inner{
|
||||
width: 165px;
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
.search-btn{
|
||||
margin-left: 7px;
|
||||
}
|
||||
}
|
||||
main{
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
height: calc(100% - 10px);
|
||||
}
|
||||
footer{
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #303133;
|
||||
font-weight: 700;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user