合并分支 'dev_20230216' 到 'master'

Dev 20230216

查看合并请求 laws-foton-slrs/foton-laws-system-front!55
This commit is contained in:
高嵩
2023-04-13 17:49:41 +08:00
2 changed files with 257 additions and 263 deletions
+60 -106
View File
@@ -1,57 +1,37 @@
<!-- 企标发布 -->
<!-- 标准问答 -->
<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"
<el-table ref="table"
:data="data"
tooltip-effect = "dark"
border
style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column
label="分类"
align="center"
width="80">
</el-table-column>
<el-table-column
label="问题描述">
<template slot-scope="scope">
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>-->
</template>
</el-table-column>
<el-table-column
prop="standName"
label="提问人"
width="100">
<template slot-scope="scope">
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>-->
</template>
</el-table-column>
<el-table-column
width="120"
label="提问时间">
<template slot-scope="scope">
<!-- <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>-->
</template>
</el-table-column>
</el-table>
<div class="more" v-if="!pageVerify" @click="togo">更多 </div>
<loading :loading="loading">加载中...</loading>
<pagination
v-if="pageVerify"
style="position: static;"
:page="page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
<el-table-column
prop="classification"
label="类型"
width="150"
align="center">
</el-table-column>
<el-table-column
prop="problemDescription"
label="问题描述"
align="center">
</el-table-column>
<el-table-column
prop="questioner"
label="提问人"
width="150"
align="center">
</el-table-column>
<el-table-column
prop="questionTime"
label="提问时间"
width="150"
align="center">
</el-table-column>
</el-table>
<div class="more" v-if="!pageVerify" @click="togo">更多 </div>
<loading :loading="loading">加载中...</loading>
</div>
</template>
@@ -64,73 +44,47 @@ export default {
return {
loading: false,
pageVerify: false,
page: 1,
pageSize: 10,
total: 0,
putTime: '',
standardReleaseList: [], //标准问答数据
currentPage: 1,
data: [],
form:{
classification:"", // 类型
problemDescription: "", // 问题描述
},
}
},
computed: {},
watch: {},
mounted() {
this.getDate()
this.getAdvice()
// this.addDate()
},
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 () {
this.$router.push({path:'/releaseQA2'})
},
// 点击查看
handlePreview (item) {
// let routeUrl = this.$router.resolve({
// name: 'OtherBussStandardDetails',
// params: {
// id: item.standardId,
// pageType: 'BUSINESS_STAND'
// }
// })
// window.open(routeUrl.href, '_blank')
togo () {
this.$router.push({path:'/releaseQA2'})
},
//截取时间
getDate (date) {
return date != null ? date.substring(0, date.indexOf(' ')) : ''
},
//获取数据
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
// })
getDate(){
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', 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)
}, e => {
this.loading = false
reject(e)
})
})
},
},
+197 -157
View File
@@ -1,187 +1,227 @@
<!-- 企标发布 -->
<!-- 标准问答 -->
<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="问题描述">
<template slot-scope="scope">
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>-->
</template>
</el-table-column>
<el-table-column
prop="standName"
<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-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 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: 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="100">
<template slot-scope="scope">
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>-->
</template>
</el-table-column>
<el-table-column
width="120"
label="提问时间">
<template slot-scope="scope">
<!-- <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>-->
</template>
</el-table-column>
</el-table>
<loading :loading="loading">加载中...</loading>
<pagination
style="position: static;"
:page="page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
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">
<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 {
form:{
classification:"", // 类型
problemDescription: "", // 问题描述
},
data: [],
total: 0,// 总数
pageSize: this.$store.getters.userInfo.configContent,// 每页条数
currentPage: 1,//当前页
loading: false,
pageVerify: false,
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
putTime: '',
standardReleaseList: [], //标准问答数据
classificationOption: [
{
value: 'INLAND',
label: '国内标准'
},
{
value: 'FOREIGN',
label: '海外标准'
},
{
value: 'BUSINESS_STAND',
label: '企业标准'
},
{
value: 'OTHER',
label: '公共问题'
}
],
}
},
computed: {},
watch: {},
mounted() {
this.getDate()
this.getAdvice()
// this.addDate()
},
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
getDate(){
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', 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.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(){
this.currentPage = 1
this.getDate()
},
//获取数据
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
// })
onClear(){
this.form.classification = ''
this.form.problemDescription = ''
this.pageSize = this.$store.getters.userInfo.configContent
this.currentPage = 1
this.getDate()
},
},
sizeChange(pageSize){
this.pageSize = pageSize
this.getDate()
},
currentChange(currentPage){
this.currentPage = currentPage
this.getDate()
},
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{
color: #333;
height: 30px;
line-height: 30px;
}
/deep/ .el-form-item__content{
height: 30px;
line-height: 30px;
}
/deep/ .el-input__inner{
width: 165px;
height: 30px;
}
/deep/ .el-input__suffix{
.el-icon-circle-close{
line-height: 32px;
}
}
}
.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;
}
}
}