163 lines
6.6 KiB
PHP
163 lines
6.6 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="renderer" content="webkit">
|
|
<?php if($this->params['site_image']):?>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo $this->params['site_image'];?>" />
|
|
<?php else:?>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?=Yii::$app->request->baseUrl?>/web/favicon.ico" />
|
|
<?php endif;?>
|
|
<title><?php if($this->params['site_title']):?>
|
|
<?php echo $this->params['site_title']; ?>
|
|
<?php else:?>
|
|
应用管理后台
|
|
<?php endif;?>-官方公告</title>
|
|
<link rel="stylesheet" type="text/css" href="<?=Yii::$app->request->baseUrl?>/web/static/css/globle.css"/>
|
|
<script src="<?=Yii::$app->request->baseUrl?>/web/static/js/config.js" type="text/javascript" charset="utf-8"></script>
|
|
</head>
|
|
<style>
|
|
|
|
.tjpt .el-button {
|
|
width: 130px;
|
|
height: 38px;
|
|
}
|
|
|
|
.dots {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: #1989fa;
|
|
}
|
|
|
|
</style>
|
|
<body>
|
|
<div class="pHead">
|
|
<div class="publicHeader"><?php echo $this->render('@app/views/admin/public/publicHeader.html');?></div>
|
|
</div>
|
|
<div class="pLeft">
|
|
<div class="publicAside hei"><?php echo $this->render('@app/views/admin/public/publicAside.html');?></div>
|
|
</div>
|
|
<div class="yb_body">
|
|
<div class="layout" id="platformList">
|
|
<el-container>
|
|
<el-container>
|
|
<el-main>
|
|
<div class="main" style="min-width: 800px">
|
|
<!-- <div class="main_search pad_30 ba_f bor_rad5">
|
|
<div class="main_search_tit t_l fon_16 wei">官方公告</div>
|
|
</div> -->
|
|
<div class="main-tab ba_f bor_rad5 pad_tb_30">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tab-pane label="官方公告" name="1">官方公告</el-tab-pane>
|
|
<el-tab-pane label="更新公告" name="2">更新公告</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
<div class="main-table pad_30 ba_f bor_rad5">
|
|
<div class="fon_14 color_3">
|
|
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark"
|
|
style="width: 100%">
|
|
<el-table-column label="标题 " prop="image">
|
|
<template slot-scope="scope">
|
|
<div class="flex pad_tb_10">
|
|
<div class="dots"></div>
|
|
<div class="flex-col mar_l10">{{scope.row.notice_title}}</div>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="starDate" label="发布时间"
|
|
show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
{{scope.row.dt_operdate}}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作">
|
|
<template slot-scope="scope">
|
|
<div class="textbutton">
|
|
<el-button type="text" class="fon_14" @click="edit(scope.row.id,1)" v-if="activeName=='1'">查看详情</el-button>
|
|
<el-button type="text" class="fon_14" @click="edit(scope.row.id,2)" v-else>查看详情</el-button>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<div class="t_l">
|
|
<el-pagination background layout="prev, pager, next" :total="total"
|
|
:page-size="pagesize"
|
|
@current-change="current_change">
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-main>
|
|
</el-container>
|
|
</el-container>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
$(".slimScrollDiv ul .main-nav-li a").eq(10).addClass("menu_active");
|
|
$(".main-nav .main-nav-li .submenu").eq(4).addClass("block");
|
|
$(".main-nav .main-nav-li .submenu").children().children().eq(16).addClass("menu_active2")
|
|
|
|
});
|
|
</script>
|
|
<script>
|
|
new Vue({
|
|
el: '#platformList',
|
|
created() {
|
|
const activeName = utils.GetQueryString("activeName")
|
|
if(activeName){
|
|
this.activeName = activeName
|
|
}
|
|
this.getNoticeList()
|
|
},
|
|
data: function () {
|
|
return {
|
|
activeName: '1',
|
|
formInline: {
|
|
type: '',
|
|
time: '',
|
|
name: '',
|
|
tel: '',
|
|
data: '',
|
|
},
|
|
checked: true,
|
|
tableData: [],
|
|
total: 100,
|
|
pagesize: 10,
|
|
currentPage: 1,
|
|
}
|
|
},
|
|
methods: {
|
|
//切换分页
|
|
current_change: function (currentPage) {
|
|
this.currentPage = currentPage;
|
|
this.getNoticeList()
|
|
},
|
|
edit(id,type) {
|
|
location.href = "<?= Yii::$app->urlManager->createUrl('admin/site/site_noticedetail');?>"+"?id="+id+"&type="+type;
|
|
},
|
|
handleClick(){
|
|
this.getNoticeList()
|
|
},
|
|
async getNoticeList(){
|
|
let params = {
|
|
page: this.currentPage,
|
|
type:this.activeName,
|
|
}
|
|
res = await utils.requestPost({data: params, url: "admin/site/get-notice-list"},this)
|
|
if (res.code == 1) {
|
|
this.cardLoading= false
|
|
this.tableData = res.data.data
|
|
this.total = res.data.count
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|