hailu
2024-06-26 93c7b159d571632c8127a56e72553e6eef8485a3
推送
3个文件已修改
1个文件已添加
234 ■■■■■ 已修改文件
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/routers.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/diligenceTools/bondfinancing.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/login/newPushDetail.vue 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -191,7 +191,7 @@
      }
    }
  }
  if (to.name == LOGIN_PAGE_NAME || to.name == 'register') {
  if (to.name == LOGIN_PAGE_NAME || to.name == 'register' || to.name == 'newPushDetail') {
    next()
    //   // 未登录且要跳转的页面不是登录页
    //   next({
src/router/routers.js
@@ -38,6 +38,16 @@
        import('@/view/login/register.vue')
},
{
    path: '/newPushDetail',
    name: 'newPushDetail',
    meta: {
        title: '新闻推送',
        hideInMenu: true
    },
    component: () =>
        import('@/view/login/newPushDetail.vue')
},
{
    path: '/',
    name: 'newdiligenceTools',
    redirect: '/newsFlashEx_tool',
src/view/diligenceTools/bondfinancing.vue
@@ -1155,7 +1155,13 @@
    changeExchangetab3(val) {
      this.pageIndex3 = 1
      // if (val === '上交所') {
      if(this.tabName3 === 'tab3-1'){
      this.getBondDebtPage()
      }else {
        this.getBondDebtPageSubsidiary()
      }
      // } else if(val === '深交所') {
      //   this.getBondDebtPage()
      // } else {
@@ -1684,8 +1690,6 @@
    //获取债券公告数据 查看链接
    checkDetailtab3(params) {
      if (this.StockExchangeTab3 == '银行间市场') {
        window.open(params.FileUrl.replace("https://www.chinamoney.com.cn//", 'https://www.chinamoney.com.cn/'))
      } else {
        console.log(params);
@@ -1698,7 +1702,6 @@
    changePageIndexzq3(e) {
      this.pageIndexzq = e
      if (this.StockExchangeTab3 == "银行间市场") {
        this.getPageChinamoneyMkDataBonReport()
      } else {
        this.getPageBondAnnouncement()
@@ -2200,7 +2203,7 @@
        // }
        axios
          .request({
            url: "/bankyj/GetChinamoneyMkdatabondtPage",
            url: "/bankyj/GetChinamoneyMkdatabondtPageSub",
            data,
            method: "post",
          })
src/view/login/newPushDetail.vue
New file
@@ -0,0 +1,211 @@
<template>
    <div id="newPushDetail">
        <header>
            <img src="../../assets/images/homeLogin.png" alt="" srcset="">
        </header>
        <Col v-if="show" class="demo-spin-col" span="24">
        <Spin fix>
            <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
            <div>Loading</div>
        </Spin>
        </Col>
        <main v-else>
            <div class="item" v-for="item in this.arr1">
                <div class="left">{{ item.Name ? item.Name.replace('事件', '').replace('系统', '') + ':' : '--' }}</div>
                <div class="right"> {{ item.Value ? item.Value : '--' }}</div>
            </div>
            <div class="item">
                <div class="left">公司名称:</div>
                <div class="right"> {{ content.CompanyName ? content.CompanyName : '--' }}</div>
            </div>
            <div class="item">
                <div class="left">事件类别:</div>
                <div class="right"> {{ content.EventType ? content.EventType : '--' }}</div>
            </div>
            <div class="item">
                <div class="left">风险等级:</div>
                <div class="right"> {{ content.WarnLevelName ? content.WarnLevelName : '--' }} </div>
            </div>
            <div v-if="this.arr2.length > 0">
                <div v-for="(item, index) in this.arr2" style="display: flex;padding:0 10px 0 0" :key="index">
                    <span style="display: inline-block;white-space: nowrap;font-size: 18px;font-weight: 500;"
                        v-html="item.Name"></span>
                    <span style="display: inline-block;font-size: 18px;font-weight: 500;">:</span>
                    <span style="display: inline-block;line-height: 27px;"
                        v-show="item.Value === '' || item.Value === null">--</span>
                    <span style="display: inline-block;word-break: break-all;line-height: 27px;"
                        v-if="item.Value != '' && item.Value != null"
                        v-html="item.Name.indexOf('元') > -1 || item.Name.indexOf('(元)') > -1 ? CustomMethods.numTo$(item.Value.replace(/\n/g, '<br>').replaceAll(content.CompanyName, `<span style='color:red;'>${content.CompanyName}</span>`)) : item.Value.replace(/\n/g, '<br>').replaceAll(content.CompanyName, `<span style='color:red;'>${content.CompanyName}</span>`)"></span>
                </div>
            </div>
        </main>
    </div>
</template>
<script>
import axios from '@/libs/api.request'
export default {
    name: 'newPushDetail',
    data() {
        return {
            id: 0,
            content: {
                CompanyName: '',
                EventType: '',
                WarnLevelName: '',
                Content: '',
            },
            arr1: [],
            arr2: [],
            show: true,
        }
    },
    created() {
    },
    mounted() {
        // setTimeout(() => {
        // return false
        // }, 1000);
        //
    },
    methods: {
        // EventKg/GetDynamicById(int Id)
        GetDynamicById() {
            this.show = true
            let data = {
                Id: this.id
                // Id: 28616
            }
            axios.request({
                url: '/EventKg/GetDynamicById',
                method: 'post',
                data: data
            }).then(res => {
                if (res.data.Check) {
                    this.content = res.data.Data
                    this.content.Content = JSON.parse(this.content.Content)
                    this.arr1 = this.content.Content.slice(0, 2)
                    this.arr2 = this.content.Content.slice(3)
                    console.log(this.content, this.arr1, this.arr2);
                    this.show = false
                } else {
                    this.content = {}
                    this.arr1 = []
                    this.arr2 = []
                    this.show = false
                }
            }, res => {
                this.content = {}
                this.arr1 = []
                this.arr2 = []
                this.show = false
            })
        }
    },
    watch: {
        $route: {
            handler() {
                if (this.$router.currentRoute.name === 'newPushDetail') {
                    this.id = this.$route.query.Id
                    this.GetDynamicById()
                    return
                }
            },
            immediate: true,
        },
    },
    beforeRouteLeave(to, from, next) {
        // console.log(to, from);
        // if(to.name=='login'){
        //     next()
        // }
    }
}
</script>
<style lang="less" >
body {
    overflow: auto;
}
#newPushDetail {
    overflow: visible !important;
}
#newPushDetail header {
    width: 100vw;
    height: 80px;
    background-color: #123DD6;
    img {
        height: 60px;
        margin-top: 10px;
        position: relative;
        left: ~'calc(50% - 103px)';
    }
}
main {
    width: 100vw;
    padding: 20px 10px;
    .item {
        display: flex;
        .left {
            min-width: 90px;
            // width: 120px;
            font-size: 18px;
            font-weight: 500;
        }
        .right {
            line-height: 27px;
            display: inline-block;
            word-break: break-all;
        }
    }
}
#newPushDetail img {
    max-width: 300px !important;
}
#newPushDetail .demo-spin-col .circular {
    width: 25px;
    height: 25px;
}
#newPushDetail .demo-spin-icon-load {
    animation: ani-demo-spin 1s linear infinite;
}
@keyframes ani-demo-spin {
    from {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    to {
        transform: rotate(360deg);
    }
}
#newPushDetail .demo-spin-col {
    height: 100vh;
    position: relative;
    border: 1px solid #eee;
}
</style>