首页展示资料中心

This commit is contained in:
zyx.net
2022-11-14 14:05:42 +08:00
parent f493b725a4
commit c98706e0d3
8 changed files with 2885 additions and 21 deletions
@@ -0,0 +1,179 @@
<!-- 企标发布 -->
<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">
</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">
</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: 10,
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(' ')) : ''
},
//获取数据
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>
+6
View File
@@ -27,6 +27,10 @@
<span slot="label"><i class="el-icon-s-promotion"></i> 企业标准发布</span>
<releaseBuss></releaseBuss>
</el-tab-pane>
<el-tab-pane name="releaseZL" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-chat-line-round"></i> 标准化动态</span>
<releaseZL></releaseZL>
</el-tab-pane>
<el-tab-pane name="releaseQA" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-chat-line-round"></i> 标准问答</span>
<releaseQA></releaseQA>
@@ -52,6 +56,7 @@ import release from './components/release'
import releaseUs from './components/releaseUs'
import releaseBuss from './components/releaseBuss'
import releaseQA from './components/releaseQA'
import releaseZL from './components/releaseZL'
import solicitOpinions from './components/solicitopinions'
import navMenu from './components/navMenu'
import todoList from './components/todoList'
@@ -65,6 +70,7 @@ export default {
releaseUs,
releaseBuss,
releaseQA,
releaseZL,
navMenu,
todoList,
Empennage,