194 lines
5.2 KiB
Vue
194 lines
5.2 KiB
Vue
<!-- 企标发布 -->
|
|
<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
|
|
style="cursor:pointer;"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
|
|
<el-table-column
|
|
type="index"
|
|
width="55"
|
|
label="序号"
|
|
align="center">
|
|
<template slot-scope="{scope, column, $index}">
|
|
{{ ($index + 1) + (page - 1) * pageSize }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="dataType"
|
|
width="250"
|
|
label="类型"
|
|
:show-overflow-tooltip="true"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="dataTitle"
|
|
min-width="250"
|
|
label="资料标题"
|
|
:show-overflow-tooltip="true"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span @click.stop="toDetail(scope.row)" style="cursor:pointer;color: #409eff">{{ scope.row.dataTitle }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="dataUploadTime"
|
|
width="250"
|
|
label="上传时间"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ $moment(scope.row.dataUploadTime).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>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'ReleaseQA',
|
|
components: {},
|
|
mixins: [],
|
|
data() {
|
|
return {
|
|
loading: false,
|
|
pageVerify: false,
|
|
page: 1,
|
|
pageSize: this.$store.getters.userInfo.configContent,
|
|
total: 0,
|
|
putTime: '',
|
|
standardReleaseList: [], //标准问答数据
|
|
}
|
|
},
|
|
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:'/dataCenter'})
|
|
},
|
|
// 点击查看
|
|
handlePreview (item) {
|
|
// let routeUrl = this.$router.resolve({
|
|
// name: 'OtherBussStandardDetails',
|
|
// params: {
|
|
// id: item.standardId,
|
|
// pageType: 'BUSINESS_STAND'
|
|
// }
|
|
// })
|
|
// window.open(routeUrl.href, '_blank')
|
|
},
|
|
//截取时间
|
|
getDate (date) {
|
|
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
|
},
|
|
toDetail(row){
|
|
this.$router.push({
|
|
name: "dataCenterDetail",
|
|
query: {
|
|
id: row.id
|
|
}
|
|
});
|
|
},
|
|
//获取数据
|
|
getAdvice() {
|
|
this.loading = true
|
|
// 模拟加载
|
|
const timer = setInterval(() => {
|
|
this.loading = false
|
|
}, 2000)
|
|
console.log(timer)
|
|
let userInfo = JSON.parse(localStorage.getItem('userInfo'));
|
|
this.$http.get("fileMaterialCenter/file-material/getFileMaterialIndex", {
|
|
userId: userInfo.userId,
|
|
}, {
|
|
_this: this,loading: 'loading'
|
|
}, res => {
|
|
this.standardReleaseList = res.data
|
|
this.total = res.data.total
|
|
this.loading = false
|
|
}, e => {
|
|
this.loading = false
|
|
this.standardReleaseList = []
|
|
this.total = 0
|
|
})
|
|
},
|
|
},
|
|
|
|
}
|
|
</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;
|
|
}
|
|
}
|
|
width: 100%;
|
|
.time-title {
|
|
margin: 15px;
|
|
.time {
|
|
float: right;
|
|
color:#333333;
|
|
}
|
|
a {
|
|
color: #ffffff;
|
|
&:hover {
|
|
color: #e9c851;
|
|
cursor:pointer;
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|