Преглед на файлове

菜单管理及用户活跃度静态页面

lilinfeng преди 2 месеца
родител
ревизия
9a14f58739

+ 4 - 4
src/utils/apiUrl.js

@@ -3,16 +3,16 @@ module.exports = {
   // APIURl: "http://10.0.0.95:30000",
   // APIURl: "http://10.21.12.137:30000",
   // APIURl: "http://192.168.103.104:58080",
-  APIURl: "https://test.api.shidaiyun.net",
-  // APIURl: "https://api.shidaiyun.net",
+  // APIURl: "https://test.api.shidaiyun.net",
+  APIURl: "https://api.shidaiyun.net",
 
 
   //测试
   // minioPath: process.env.NODE_ENV === 'development' ? 'https://oss.shidaiyun.net/' : 'http://192.168.103.105:18000/'
 
   //双活
-  // minioPath: process.env.NODE_ENV === 'development' ? 'https://oss.shidaiyun.net/' : 'http://28.168.105.206:9000/'
+  minioPath: process.env.NODE_ENV === 'development' ? 'https://oss.shidaiyun.net/' : 'http://28.168.105.206:9000/'
 
   //正式
-  minioPath: 'https://oss.shidaiyun.net/'
+  // minioPath: 'https://oss.shidaiyun.net/'
 };

+ 119 - 0
src/views/governmentCloud/officialAccount/menuManagement/index.vue

@@ -0,0 +1,119 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center  JNPF-flex-main">
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <el-button type="primary" icon="el-icon-plus" @click="addMenu">
+                        新增
+                    </el-button>
+                    <div class="JNPF-common-head-right">
+                        <el-tooltip effect="dark" content="展开" placement="top">
+                            <el-link v-show="!expands" type="text"
+                                icon="icon-ym icon-ym-btn-expand JNPF-common-head-icon"
+                                :underline="false" @click="toggleExpand()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" content="折叠" placement="top">
+                            <el-link v-show="expands" type="text"
+                                icon="icon-ym icon-ym-btn-collapse JNPF-common-head-icon"
+                                :underline="false" @click="toggleExpand()" />
+                        </el-tooltip>
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="treeList" row-key="id"
+                    v-if="refreshTable" :default-expand-all="expands"
+                    :tree-props="{ children: 'children', hasChildren: '' }">
+                    <el-table-column prop="label" label="名称"> </el-table-column>
+                    <el-table-column prop="level" label="类型" align="center">
+                        <template slot-scope="scope">
+                            <span v-if="scope.row.level == 1">厅局</span>
+                            <span v-else-if="scope.row.level == 2">项目</span>
+                            <span v-else-if="scope.row.level == 3">系统</span>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import {
+    findTreeList,
+    syncOrganizeProjectSystemDict
+} from "@/api/governmentCloud/dictionaryOfProjectSystemsForDepartmentsAndBureaus/dictionaryOfProjectSystemsForDepartmentsAndBureaus";
+export default {
+    name: "menuManagement",
+    components: {},
+    data() {
+        return {
+            listQuery: {
+                keyword: ""
+            },
+            treeList: [],
+            rawData: [],
+            expands: true,
+            refreshTable: true,
+            btnLoading: false,
+            listLoading: true,
+            formVisible: false,
+            depFormVisible: false,
+            checkUserFormVisible: false
+        };
+    },
+    created() {
+        this.initData();
+    },
+    methods: {
+        initData() {
+            this.loading = true;
+            this.listLoading = true;
+            findTreeList(this.listQuery)
+                .then(res => {
+                    this.rawData = res.data;
+                    this.treeList = res.data;
+                    if (this.treeList.length > 0) this.setTableIndex(this.treeList);
+                    this.listLoading = false;
+                    this.btnLoading = false;
+                })
+                .catch(() => {
+                    this.listLoading = false;
+                    this.btnLoading = false;
+                });
+        },
+        addMenu() {
+
+        },
+        // 树形列表index层级,实现方法(可复制直接调用)
+        setTableIndex(arr, index) {
+            arr.forEach((item, key) => {
+                item.index = key + 1;
+                if (index) {
+                    item.index = index + 1;
+                }
+                if (item.children) {
+                    this.setTableIndex(item.children, item.index);
+                }
+            });
+        },
+        toggleExpand() {
+            this.refreshTable = false;
+            this.expands = !this.expands;
+            this.$nextTick(() => {
+                this.refreshTable = true;
+            });
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+.table-icon {
+    vertical-align: bottom;
+    font-size: 16px;
+    margin-right: 6px;
+    line-height: 23px;
+}
+</style>

+ 145 - 0
src/views/governmentCloud/officialAccount/userActivityLevel/index.vue

@@ -0,0 +1,145 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <div class="JNPF-common-layout-main">
+                <div class="form">
+                    <div class="form-item">
+                        <div class="item-title">数据时间</div>
+                        <div class="item-content">
+                            <div class="content-item"
+                                :class="timeNum == item.value ? 'active-content-item' : ''"
+                                v-for="(item,index) in timeList" :key="index"
+                                @click="timeNum = item.value">
+                                {{ item.label }}</div>
+                        </div>
+                    </div>
+                    <div class="form-item">
+                        <div class="item-title">用户选择</div>
+                        <div class="item-content">
+                            <div class="content-item"
+                                :class="peopleNum == item.value ? 'active-content-item' : ''"
+                                v-for="(item,index) in peopleList" :key="index"
+                                @click="peopleNum = item.value">
+                                {{ item.label }}</div>
+                            <JnpfUserSelect style="margin-left: 20px;" v-if="peopleNum == 1"
+                                v-model="query.user" placeholder="请选择用户" />
+                        </div>
+                    </div>
+                </div>
+                <div class="chart">
+                    <div id="echarts1" style="width: 100%;height: 100%;"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            timeNum: 0,
+            timeList: [
+                {
+                    value: 0,
+                    label: '按日查询',
+                },
+                {
+                    value: 1,
+                    label: '按月查询',
+                }
+            ],
+            peopleNum: 0,
+            peopleList: [
+                {
+                    value: 0,
+                    label: '全部用户',
+                },
+                {
+                    value: 1,
+                    label: '单个用户',
+                }
+            ],
+            query: {
+                user: ''
+            }
+        }
+    },
+    mounted() {
+        this.initEcharts1()
+    },
+    methods: {
+        initEcharts1(item) {
+            var chartDom = document.getElementById('echarts1');
+            var myChart = this.$echarts.init(chartDom);
+            var option = {
+                xAxis: {
+                    type: 'category',
+                    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                tooltip: {
+                    trigger: 'axis'
+                },
+                grid: {
+                    left: '2%',
+                    right: '2%',
+                    bottom: '2%',
+                    containLabel: true
+                },
+                series: [
+                    {
+                        data: [150, 230, 224, 218, 135, 147, 260],
+                        type: 'line',
+                        name: '活跃度'
+                    }
+                ]
+            };
+            myChart.setOption(option);
+        }
+    },
+
+}
+</script>
+
+<style lang="scss" scoped>
+.JNPF-common-layout-main {
+    display: flex;
+    flex-direction: column;
+    .form {
+        width: 100%;
+        padding: 10px 20px;
+        .form-item {
+            font-size: 16px;
+            display: flex;
+            align-items: center;
+            margin-bottom: 20px;
+            .item-title {
+                color: #b1b2b3;
+            }
+            .item-content {
+                margin-left: 30px;
+                display: flex;
+                align-items: center;
+                .content-item {
+                    padding: 10px 30px;
+                    cursor: pointer;
+                    border-radius: 20px;
+                    margin-right: 10px;
+                    text-wrap: nowrap;
+                }
+                .active-content-item {
+                    background-color: #d4e8fb;
+                    color: #409eff;
+                }
+            }
+        }
+    }
+    .chart {
+        height: auto;
+        flex: 1;
+    }
+}
+</style>

+ 1 - 1
src/views/login/index.vue

@@ -167,12 +167,12 @@ export default {
                             query: this.otherQuery
                         })
                     }).catch((res) => {
-                        this.$message.error(res.msg)
                         if (this.needCode) {
                             this.changeImg()
                             this.loginForm.code = ''
                         }
                         this.$store.commit('user/SET_LOGIN_LOADING', false)
+                        this.$message.error(res.msg)
                     })
                 } else {
                     return false