1
lzhe
2024-06-03 0ea5706a4917edcd9f2f020d7418ece30c6a0915
1
已修改4个文件
150 ■■■■ 文件已修改
src/utils/request.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/console/authority/apiscope.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/realtime-status/index.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/notification/notice/newsmail.vue 97 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js
@@ -118,7 +118,14 @@
            }).then((response) => {
                resolve(response.data);
            }).catch((error) => {
                reject(error);
                if (error?.status == 400) {
                    ElMessage({
                        message: error.data.msg,
                        type: 'warning',
                    })
                } else {
                    reject(error);
                }
            })
        })
    },
src/views/console/authority/apiscope.vue
@@ -14,8 +14,8 @@
        </div>
        <div class="aposcope-right">
            <div>
                <!-- <el-button type="primary" @click="addData">+ 添加</el-button> -->
                <!-- <el-button type="danger" plain @click="delData">删除</el-button> -->
                <el-button type="primary" @click="addData">+ 添加</el-button>
                <el-button type="danger" plain @click="delData">删除</el-button>
            </div>
            <div class="right-content" v-if="searchDataList.length == 0">
                <img src="./quesheng.bd026700.png" />
@@ -34,19 +34,19 @@
            </el-table>
        </div>
        <el-drawer :title="'当前选中菜单路径'+drawerPath" v-model="drawer" :direction="direction" :before-close="handleClose" size="780" class="drawerClass">
            <el-form :inline="true" :model="drawerSearchData" label-width="120px">
            <el-form :inline="true" :model="drawerSearchData" label-width="110px">
                <el-form-item label="接口模块">
                    <el-select v-model="drawerSearchData.moduleCode" style="width: 100%">
                    <el-select v-model="drawerSearchData.moduleCode" style="width: 100%" size="small">
                        <el-option v-for="item in aList" :key="item.id" :label="item.title" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item label="接口Controller">
                    <el-select v-model="drawerSearchData.controllerCode" style="width: 100%">
                    <el-select v-model="drawerSearchData.controllerCode" style="width: 100%" size="small">
                        <el-option v-for="item in aList" :key="item.id" :label="item.title" :value="item.id"/>
                    </el-select>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="drawerSearchclick">搜索</el-button>
                    <el-button type="primary" @click="drawerSearchclick" size="small">搜索</el-button>
                </el-form-item>
            </el-form>
            <div>
src/views/mdc/realtime-status/index.vue
@@ -36,7 +36,7 @@
              <div class="status-next" @click="next">
                  <el-icon><ArrowRight /></el-icon>
              </div>
              <div class="status-content-cardp" v-for="item in timestatus" style="width: 33.3333%; height: 50%;">
              <div class="status-content-cardp" v-for="item in timestatus" :style="{'width': (100/column) + '%'}">
                  <div class="status-card-box" style="border-color: #ccc;">
                      <div class="status-card-top">
                          <div class="status-card-detail">
@@ -104,17 +104,32 @@
                stationlabel: "",
                stationlabelList: [],
                current: "1",
                size: "9",
                total: 0,
                deviceStatus: [],
                workStationGroupIdList: []
                workStationGroupIdList: [],
                line: "",
                column: ""
            }
        },
        mounted() {
            this.getdevicestatus();  //获取顶部title
            this.getstationlabelList();  //获取标签视图下的list
            this.setIntervalTime();   //十秒增加时间
            this.getSetting(); //设置几行几列
        },
        methods: {
            getSetting() {
                this.$HTTP.get(`/api/blade-system/param/detail?paramKey=mdc.realtime.setting`).then(res=> {
                    if(res.code == 200) {
                        var paramValue = JSON.parse(res.data.paramValue);
                        this.line = paramValue.line==0?1:paramValue.line;
                        this.column = paramValue.column;
                        this.current = "1";
                        this.size = this.line * this.column;
                        this.getdevicestatus();  //获取顶部title/具体数据
                    }
                })
            },
            setIntervalTime() {
                function addTime(timeStr) {
                    var increaseByMilliseconds = 10 * 1000; // 10秒转换为毫秒  
@@ -205,9 +220,10 @@
                this.gettimestatus();
            },
            next() {
                if((this.total/9 - this.current) < 0) return;
                this.current = Number(this.current) + 1;
                this.gettimestatus();
                if((this.current * this.line) < this.total/this.column) {
                    this.current = Number(this.current) + 1;
                    this.gettimestatus();
                }
            },
            goSet() {
                this.$router.push('/mdc/configuration');
@@ -246,7 +262,7 @@
                    workStationGroupIdList: this.workStationGroupIdList
                }
                this.timestatus = [];
                this.$HTTP.post(`/api/blade-cps/workstation/real-time-status?current=${this.current}&size=9`,obj).then(res=> {
                this.$HTTP.post(`/api/blade-cps/workstation/real-time-status?current=${this.current}&size=${this.size}`,obj).then(res=> {
                    if(res.code == 200) {
                        var ids = [];
                        res.data.records.forEach(item=> {
@@ -422,7 +438,7 @@
        display: block;
    }
    .status-content-cardp {
        min-width: 266px;
        height: 50%;
        min-height: 170px;
        margin: 0;
        padding: 4px;
src/views/notification/notice/newsmail.vue
@@ -9,25 +9,45 @@
<template>
    <div class="newsmail-main">
        <el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick">
            <el-tab-pane label="全部公告" name="A">
                <el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef">
                    <el-table-column prop="categoryName" label="title"></el-table-column>
                    <el-table-column prop="businessName" label="content"></el-table-column>
                    <el-table-column prop="notifyTime" label="date"></el-table-column>
                    <el-table-column fixed="right" label="操作">
                        <template #default="scope">
                            <el-button text type="primary" size="small" @click="table_view(scope.row, scope.$index)">查看更多&gt&gt</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-tab-pane>
            <el-tab-pane label="发布公告" name="B">Config</el-tab-pane>
            <el-tab-pane label="任免公告" name="C">Role</el-tab-pane>
            <el-tab-pane label="转发公告" name="D">Task</el-tab-pane>
            <el-tab-pane label="指示公告" name="E">Task</el-tab-pane>
            <el-tab-pane label="事务公告" name="F">Task</el-tab-pane>
            <el-tab-pane label="全部公告" name="A"></el-tab-pane>
            <el-tab-pane label="发布公告" name="B"></el-tab-pane>
            <el-tab-pane label="任免公告" name="C"></el-tab-pane>
            <el-tab-pane label="转发公告" name="D"></el-tab-pane>
            <el-tab-pane label="指示公告" name="E"></el-tab-pane>
            <el-tab-pane label="事务公告" name="F"></el-tab-pane>
        </el-tabs>
        <el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef">
            <el-table-column prop="categoryName" label="title">
                <template #default="scope">
                    <span class="spanDot" :style="{'background-color': scope.row.status != 1?'red':''}"></span>
                    <span>{{scope.row.categoryName}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="businessName" label="content"></el-table-column>
            <el-table-column prop="notifyTime" label="date"></el-table-column>
            <el-table-column fixed="right" label="操作">
                <template #default="scope">
                    <el-button text type="primary" size="small" @click="table_view(scope.row, scope.$index)">查看更多&gt&gt</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
    <el-dialog title="详情" v-model="visible" :width="500" destroy-on-close>
        <el-row>
            <el-col :span="24" style="margin-bottom:12px;">
                <span style="font-weight: bold;">{{detailForm.businessName}}</span>
            </el-col>
            <el-col :span="24" style="margin-bottom:12px;font-size: 12px;color: #666;">
                <span>{{detailForm.notifyTime}}</span>
            </el-col>
            <el-col :span="24">
                <span v-html="detailForm.message"></span>
            </el-col>
        </el-row>
        <template #footer>
            <el-button @click="visible=false" >关闭</el-button>
        </template>
    </el-dialog>
</template>
<script>
    export default {
@@ -35,7 +55,13 @@
        data(){
            return {
                tableData: [],
                activeName: "A"
                activeName: "A",
                visible: false,
                detailForm: {
                    businessName: "",
                    notifyTime: "",
                    message: ""
                }
            }
        },
        created(){
@@ -48,14 +74,33 @@
            
        },
        methods: {
            table_view() {
            table_view(row) {
                this.$HTTP.get(`/api/blade-notify/notify-system/get/${row.id}`).then(res=> {
                    if(res.code == 200) {
                        this.detailForm = res.data;
                        this.visible = true;
                    }
                })
            },
            handleClick(TabPaneName) {
                this.getcategoryList();
            },
            getcategoryList() {
                this.$HTTP.get(`/api/blade-notify/notify-system/page?size=10&notifyType=2&current=1`).then(res=> {
                if(this.activeName == "A") {
                    var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&current=1`;
                }else if(this.activeName == "B") {
                    var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=1&current=1`;
                }else if(this.activeName == "C") {
                    var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=5&current=1`;
                }else if(this.activeName == "D") {
                    var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=3&current=1`;
                }else if(this.activeName == "E") {
                    var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=4&current=1`;
                }else if(this.activeName == "F") {
                    var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=6&current=1`;
                }
                this.$HTTP.get(url).then(res=> {
                    if(res.code == 200) {
                        this.tableData = res.data.records;
                    }
@@ -75,4 +120,12 @@
.multipleTableRef /deep/ .el-table__header-wrapper{
    display: none;
}
.spanDot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    display: inline-block;
    margin-right:12px;
    font-size: 14px;
}
</style>