Files
foton-laws-system-front/src/pages/home2/components/release2/index.vue
T

184 lines
5.0 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
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="序号"
type="index"
align="center"
width="55">
</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="标准名称">
<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>
</div>
</template>
<script>
export default {
name: 'Release',
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 () {
if(this.total && this.total > 10){
this.pageVerify = true
this.pageSize = this.$store.getters.userInfo.configContent
}else {
this.pageVerify = false
}
this.getAdvice()
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standardId,
pageType: item.resourceType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
//截取时间
getDate (date) {
return date != null ? date.substring(0, date.indexOf(' ')) : ''
},
//获取数据
getAdvice() {
this.loading = true
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
messageType: 'GNWBZFG',
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
})
},
},
}
</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%;
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;
}
}
}
}
</style>