| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <template>
- <div style="width: 100%; background-color: white" >
- <sticky class-name="sub-navbar2">
- <div class="top-wrapper">
- <div style="margin-top: 5px; float: left;">
- <router-link to="/">
- <img src="../assets/img/title_gongfang.png" style="height:35px;" />
- </router-link>
- </div>
- <div style="float: right;">
- <router-link :to="'/login'">
- <el-button type="info" size="small" round>登录系统</el-button>
- </router-link>
- </div>
- </div>
- </sticky>
- <div style="background-color: white;">
- <el-table :data="noticeList"
- border
- size="mini"
- style="width: 1500px;margin-right: auto; margin-left: auto;">
- <el-table-column prop="Name"
- align="center"
- label="通知">
- <template slot-scope="scope">
- <el-link :href="getDownloadFile(scope.row.FileURL)"
- target="_blank"
- type="primary">{{ scope.row.Name }}</el-link>
- </template>
- </el-table-column>
- <el-table-column prop="CreateOn"
- label="发布时间"
- width="141">
- <template slot-scope="scope">{{ jstimehandle(scope.row.CreateOn+'') }}</template>
- </el-table-column>
- </el-table>
- </div>
- <div>
- <footer class="login-footer1">
- <div class="foot-wrapper" style="height: 30px; background-color: transparent; color:#A9A9A9; padding-top: 10px; text-align: right">
- ©企业法规处 版权所有
- </div>
- </footer>
- </div>
- </div>
- </template>
- <script>
- import Vue from 'vue'
- import Component from 'class-component'
- import Sticky from '@/components/Sticky'
- import axios from 'axios'
- @Component({
- data () {
- var check = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请输入验证码'));
- } else {
- this.isPass=false
- }
- };
- return {
- activeIndex: '1',
- isVisual: false,
- isCodePass:true,
- isPass:true,
- noticeList: [], // 文档列表
- formData: {
- UserName:'',
- Telephone: '', //用户手机号
- yzCode: '', //验证码
- UserPass: '',
- UserPass2: ''
- },
- rules: {
- UserName: [
- { required: true, message: '请输入用户名', trigger: 'change' }
- ],
- Telephone: [
- { required: true, message: '请输入手机号', trigger: 'change' }
- ],
- yzCode: [
- { required: true, validator: check, trigger: 'change' }
- ],
- UserPass: [
- { required: true, message: '请输入密码', trigger: 'change' }
- ],
- UserPass2: [
- { required: true,
- message: '请确认密码',
- trigger: 'change'
- }
- ],
- }
- }
- },
- created () {
- this.initNoticeListData()
- },
- components: {
- Sticky
- },
- methods: {
- initNoticeListData () {
- let _this = this
- // 传递列名
- const params = {
- colName: 'NoticeTab',
- RangeType: '1,3'
- }
- _this.$axios
- .get('/document/getdocumentnameandtime', { params })
- .then(function (response) {
- _this.noticeList = response.data
- })
- .catch(function (error) {
- console.log(error)
- })
- },
- // 下载文件
- DownloadFile (row) {
- let val = row.FileURL
- let urlArr = val.split('|')
- location.href = 'http://' + urlArr[0]
- },
- getDownloadFile (val) {
- let urlArr = val.split('|')
- let retUrl = urlArr[0]
- // 内网服务器专用
- if (process.client && retUrl.indexOf('/upfile') === 0) {
- const myDomain = window.location.host
- retUrl = myDomain + '/' + retUrl
- }
- return 'http://' + retUrl
- },
- // 格式化时间
- jstimehandle (val) {
- if (val === '') {
- return '----'
- } else if (val === '0001-01-01T08:00:00+08:00') {
- return '----'
- } else if (val === '5000-01-01T23:59:59+08:00') {
- return '永久'
- } else {
- val = val.replace('T', ' ')
- return val.substring(0, 10)
- }
- },
- handleSelect (key, keyPath) {
- this.activeIndex = key
- }
- }
- })
- export default class Register extends Vue {
- layout() {
- return 'empty'
- }
- }
- </script>
- <style lang="scss">
- @import '../assets/styles/base/variables';
- body {
- overflow: auto;
- }
- .top-wrapper {
- margin: 0px auto;
- width: 1004px;
- /*text-align: right;
- alignment: right;*/
- flex-direction: row;
- }
- .home-wrapper{
- margin:0px auto;
- width: 1004px;
- flex-direction: column;
- margin-bottom: 45px;
- background-color: white;
- overflow: auto;
- }
- .foot-wrapper{
- margin:0px auto;
- width: 1004px;
- display: flex;
- // alignment: center;
- align-items: center;
- flex-direction: column;
- }
- .back-width1 {
- background-color: #2F79F6;
- margin: 0px auto;
- left: 0;
- right: 0;
- top: 20px;
- width: 1004px;
- }
- .login-footer1 {
- position: fixed;
- background-color: #34393D;
- font-size: 10px;
- clear: both;
- display: block;
- text-align: center;
- margin: 0px auto;
- bottom: 0px;
- width: 100%;
- }
- .time {
- font-size: 13px;
- color: #999;
- }
- .bottom {
- margin-top: 13px;
- line-height: 12px;
- }
- .button {
- padding: 0;
- float: right;
- }
- .image {
- width: 100%;
- display: block;
- }
- .clearfix:before,
- .clearfix:after {
- display: table;
- content: "";
- }
- .clearfix:after {
- clear: both
- }
- </style>
|