feat: There is no way the, 动态消息库

This commit is contained in:
super_liu
2022-06-02 16:47:18 +08:00
parent 40eb5276e4
commit 7a3afc0975
7 changed files with 227 additions and 73 deletions
+86 -20
View File
@@ -16,7 +16,6 @@
border
style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
style="width: 100%">
<el-table-column
label="序号"
type="index"
@@ -24,20 +23,36 @@
width="55">
</el-table-column>
<el-table-column
prop="standName"
label="名称">
prop="standard"
label="标准编号">
<template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standName }}</span>
<span @click="handlePreview(scope.row)">{{ scope.row.standard }}</span>
</template>
</el-table-column>
<el-table-column
prop="standardName"
label="标准名称">
<template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>
</template>
</el-table-column>
<el-table-column
width="120"
label="发布时间">
label="文本状态">
<template slot-scope="scope">
<span>{{scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span>
<span>{{ textStatusMap[scope.row.textState] }}</span>
</template>
</el-table-column>
</el-table>
<div class="more" @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>
@@ -48,25 +63,65 @@ export default {
mixins: [],
data() {
return {
loading: false,
pageVerify: false,
page: 1,
pageSize: 10,
total: 0,
putTime: '',
standardReleaseList: [], //标准发布数据
textStatusMap: {} // 文本状态id与name对应
}
},
computed: {},
watch: {},
mounted() {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
if (res.data.WBZTCLASS !== undefined && res.data.WBZTCLASS !== null){
this.setMap(res.data.WBZTCLASS) // 文本状态
}
}, e => {
})
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()
},
// 将文本状态的id与name对应
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: item.standType + '_STAND'
id: item.standardId,
pageType: item.resourceType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
@@ -77,23 +132,22 @@ export default {
},
//获取数据
getAdvice() {
let obj = {}
obj.limit = 10
this.loading = true
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
messageType: 'ZYBZFG',
page: 1,
paeSize: 10
page: this.page,
pageSize: this.pageSize
}, {
_this: this
_this: this,loading: 'loading'
}, res => {
let arr = res.data
arr.forEach(item => {
if(item.standName !== ""){
this.standardReleaseList.push(item)
}
this.standardReleaseList = res.data.records
this.total = res.data.total
this.loading = false
}, e => {
this.loading = false
this.standardReleaseList = []
this.total = 0
})
}, e => {
})
},
},
@@ -108,6 +162,18 @@ export default {
/deep/.el-table td > .cell{
font-size: 13px;
}
/deep/.more {
position: absolute;
right: 0;
bottom: 2px;
font-size: 12px;
float: right;
color: #4788c0;
&:hover {
color: #3a8ee6;
cursor: pointer;
}
}
width: 100%;
.time-title {
margin: 15px;