合并分支 '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> <template>
<div class="release"> <div class="release">
<!-- <ul>--> <el-table ref="table"
<!-- <li v-for="item in standardReleaseList" :key="item.id" class="time-title" >--> :data="data"
<!-- <div style="height: 18px;">--> tooltip-effect = "dark"
<!-- <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 border
style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"> :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column <el-table-column
label="分类" prop="classification"
align="center" label="类型"
width="80"> width="150"
</el-table-column> align="center">
<el-table-column </el-table-column>
label="问题描述"> <el-table-column
<template slot-scope="scope"> prop="problemDescription"
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>--> label="问题描述"
</template> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="standName" prop="questioner"
label="提问人" label="提问人"
width="100"> width="150"
<template slot-scope="scope"> align="center">
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>--> </el-table-column>
</template> <el-table-column
</el-table-column> prop="questionTime"
<el-table-column label="提问时间"
width="120" width="150"
label="提问时间"> align="center">
<template slot-scope="scope"> </el-table-column>
<!-- <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>--> </el-table>
</template> <div class="more" v-if="!pageVerify" @click="togo">更多 ⋙</div>
</el-table-column> <loading :loading="loading">加载中...</loading>
</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>
</div> </div>
</template> </template>
@@ -64,73 +44,47 @@ export default {
return { return {
loading: false, loading: false,
pageVerify: false, pageVerify: false,
page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
putTime: '', currentPage: 1,
standardReleaseList: [], //标准问答数据 data: [],
form:{
classification:"", // 类型
problemDescription: "", // 问题描述
},
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
mounted() { mounted() {
this.getDate() this.getDate()
this.getAdvice()
// this.addDate()
}, },
methods: { methods: {
pageChange(page) { togo () {
this.page = page this.$router.push({path:'/releaseQA2'})
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')
}, },
//截取时间 getDate(){
getDate (date) { this.loading = true
return date != null ? date.substring(0, date.indexOf(' ')) : '' let form = this.form
}, form.userId = this.$store.getters.userInfo.account
//获取数据 form.pageSize = this.pageSize
getAdvice() { form.page = this.currentPage
this.loading = true return new Promise((resolve,reject)=>{
// 模拟加载 this.$http.get('lawss/AskQuestions/getAskQuestionsPage', form, {_this: this }, res => {
const timer = setInterval(() => { if(res.data){
this.loading = false const data = res.data
}, 2000) this.data = data.records
console.log(timer) this.total = data.total
// this.$http.get("/lawss/NewsFeed/getNewsFeed", { this.currentPage = data.current
// messageType: 'QYBZFB', this.pageSize = data.size
// page: this.page, }
// pageSize: this.pageSize this.loading = false
// }, { resolve(res)
// _this: this,loading: 'loading' }, e => {
// }, res => { this.loading = false
// this.standardReleaseList = res.data.records reject(e)
// this.total = res.data.total })
// this.loading = false })
// }, e => {
// this.loading = false
// this.standardReleaseList = []
// this.total = 0
// })
}, },
}, },
+197 -157
View File
@@ -1,187 +1,227 @@
<!-- 企标发布 --> <!-- 标准问答 -->
<template> <template>
<div class="release"> <div class="standardAsk">
<!-- <ul>--> <div class="content-wrap">
<!-- <li v-for="item in standardReleaseList" :key="item.id" class="time-title" >--> <div class="search-wrap">
<!-- <div style="height: 18px;">--> <el-form inline :model="form" class="form-inline">
<!-- <a @click="handlePreview(item)" style="color: #333333" class="table-jump">{{ item.standName }}</a>--> <el-form-item label="类型" class="search-item">
<!-- <span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>--> <el-select v-model="form.classification" placeholder="请选择类型">
<!-- </div>--> <el-option
<!-- </li>--> v-for="opt in classificationOption"
<!-- </ul>--> :key="opt.value"
<el-table :value="opt.value"
ref="selection" :label="opt.label"
:data="standardReleaseList" ></el-option>
tooltip-effect="dark" </el-select>
border </el-form-item>
height="90%" <el-form-item label="问题描述" class="search-item">
style="width: 100%; flex: auto;" <el-input v-model="form.problemDescription" placeholder="请输入问题描述" clearable></el-input>
class="drag-table" </el-form-item>
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', <el-form-item class="search-item">
fontWeight: 'bold', height: '48px'}"> <el-button type="primary" @click="onSubmit" size="mini">查询</el-button>
<el-table-column <el-button @click="onClear" size="mini" class="search-btn">清空</el-button>
label="分类" </el-form-item>
align="center" </el-form>
width="80"> </div>
</el-table-column> <main>
<el-table-column <div style="height: calc(100% - 10px)">
label="问题描述"> <div style="height: 100%">
<template slot-scope="scope"> <el-table ref="table"
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>--> :data="data"
</template> tooltip-effect = "dark"
</el-table-column> style="width: 100%"
<el-table-column height="100%"
prop="standName" 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="提问人" label="提问人"
width="100"> width="150"
<template slot-scope="scope"> align="center">
<!-- <span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>--> <template slot-scope="scope">
</template> <a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.questioner }}</a>
</el-table-column> </template>
<el-table-column </el-table-column>
width="120" <el-table-column
label="提问时间"> prop="questionTime"
<template slot-scope="scope"> label="提问时间"
<!-- <span>{{scope.row.releaseDate ? $moment(scope.row.releaseDate).format('YYYY-MM-DD') : '' }}</span>--> width="150"
</template> align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<loading :loading="loading">加载中...</loading> </div>
<pagination </div>
style="position: static;" </main>
:page="page" <footer class="footer">
:total="total" <el-pagination
@pageChange="pageChange" @size-change="sizeChange"
@pageSizeChange="pageSizeChange"></pagination> @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> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'ReleaseQA2', name: 'standardAsk',
components: {},
mixins: [],
data() { data() {
return { return {
form:{
classification:"", // 类型
problemDescription: "", // 问题描述
},
data: [],
total: 0,// 总数
pageSize: this.$store.getters.userInfo.configContent,// 每页条数
currentPage: 1,//当前页
loading: false, loading: false,
pageVerify: false, classificationOption: [
page: 1, {
pageSize: this.$store.getters.userInfo.configContent, value: 'INLAND',
total: 0, label: '国内标准'
putTime: '', },
standardReleaseList: [], //标准问答数据 {
value: 'FOREIGN',
label: '海外标准'
},
{
value: 'BUSINESS_STAND',
label: '企业标准'
},
{
value: 'OTHER',
label: '公共问题'
}
],
} }
}, },
computed: {},
watch: {},
mounted() { mounted() {
this.getDate() this.getDate()
this.getAdvice()
// this.addDate()
}, },
methods: { methods: {
pageChange(page) { getDate(){
this.page = page this.loading = true
this.pageSize = this.$store.getters.userInfo.configContent let form = this.form
this.getAdvice() form.userId = this.$store.getters.userInfo.account
}, form.pageSize = this.pageSize
// 分页每页显示数改变后方法 form.page = this.currentPage
pageSizeChange(pageSize) { return new Promise((resolve,reject)=>{
this.pageSize = this.$store.getters.userInfo.configContent this.$http.get('lawss/AskQuestions/getAskQuestionsPage', form, {_this: this }, res => {
this.getAdvice() if(res.data){
// 此处需要调用接口,修改个人配置 const data = res.data
}, this.data = data.records
togo () { this.total = data.total
if(this.total && this.total > 10){ this.currentPage = data.current
this.pageVerify = true this.pageSize = data.size
this.pageSize = this.$store.getters.userInfo.configContent
}else {
this.pageVerify = false
} }
this.getAdvice() this.loading = false
}, resolve(res)
// 点击查看 }, e => {
handlePreview (item) { this.loading = false
// let routeUrl = this.$router.resolve({ reject(e)
// name: 'OtherBussStandardDetails', })
// params: { })
// id: item.standardId,
// pageType: 'BUSINESS_STAND'
// }
// })
// window.open(routeUrl.href, '_blank')
}, },
//截取时间 onSubmit(){
getDate (date) { this.currentPage = 1
return date != null ? date.substring(0, date.indexOf(' ')) : '' this.getDate()
}, },
//获取数据 onClear(){
getAdvice() { this.form.classification = ''
this.loading = true this.form.problemDescription = ''
// 模拟加载 this.pageSize = this.$store.getters.userInfo.configContent
const timer = setInterval(() => { this.currentPage = 1
this.loading = false this.getDate()
}, 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
// })
}, },
}, sizeChange(pageSize){
this.pageSize = pageSize
this.getDate()
},
currentChange(currentPage){
this.currentPage = currentPage
this.getDate()
},
handlePreview(){}
}
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.release { .standardAsk{
/deep/.el-table th > .cell { width: 100%;
font-size: 15px; height: 100%;
} background-color: #fff;
/deep/.el-table td > .cell{ .content-wrap{
font-size: 13px;
}
/deep/.more {
position: absolute;
right: 0;
bottom: 2px;
font-size: 15px;
float: right;
color: #4788c0;
&:hover {
color: #3a8ee6;
cursor: pointer;
}
}
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; padding: 10px 10px 0;
background-color: #FFF; display: flex;
background-size: 100% 100%; flex-direction: column;
.time-title { justify-content: space-between;
margin: 15px; .search-wrap{
.time { display: flex;
float: right; justify-content: space-between;
color:#333333; .search-item{
} margin: 0 10px 10px 0;
a { /deep/ .el-form-item__label{
color: #ffffff; color: #333;
&:hover { height: 30px;
color: #e9c851; line-height: 30px;
cursor:pointer; }
text-decoration: underline; /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;
} }
} }
} }