Преглед изворни кода

Merge branch 'master' of http://47.103.92.60:3003/skyversation/qp_onemap_ui

ximinghao пре 3 недеља
родитељ
комит
4725cc2c79

+ 1 - 1
src/api/count.js

@@ -6,7 +6,7 @@ const dmsPath = systemConfig.dmsDataProxy
 
 const oauthPath = systemConfig.oauthServiceUrl
 
-const multiSearch = "http://127.0.0.1:10081/dms" + "/content/multipleFormsOfJointInvestigation"
+const multiSearch = dmsPath + "/content/multipleFormsOfJointInvestigation"
 
 const oauthCountUser = oauthPath + "/user/countUser"
 const oauthCountPermission = oauthPath + "/permission/countPermission"

+ 8 - 46
src/components/AppVue/Header.vue

@@ -4,10 +4,10 @@
     <div class="menu">
       <ul class="menu_ul">
         <li
-          v-for="(item, index) in menuList"
-          :key="index"
-          :class="{ active: item.isActive }"
-          @click="menuClick(item.index, $event)"
+          v-for="item in $store.state.menuList"
+          :key="item.path"
+          :class="{ active: $route.path == item.path }"
+          @click="$router.push(item.path)"
         >
           {{ item.label }}
         </li>
@@ -19,58 +19,20 @@
 <script>
 export default {
   data() {
-    return {
-      menuList: [
-        { index: 1, path: "/", label: "首页", isActive: true },
-        { index: 2, path: "/sksjgl", label: "时空数据管理", isActive: false },
-        // { index: 3, path: "/skmh/scene", label: "二维GIS引擎", isActive: false },
-        { index: 4, path: "/skmh", label: "时空门户", isActive: false },
-        { index: 5, path: "/wgn", label: "微功能", isActive: false },
-        { index: 6, path: "/yygl", label: "应用管理", isActive: false },
-        { index: 7, path: "/yxgl", label: "运行管理", isActive: false },
-        { index: 8, path: "/taskManger", label: "任务管理", isActive: false },
-      ],
-    };
-  },
-  mounted() {
-    // 初始化判断路径并自动选中菜单
-    let path = this.$route.path;
-    console.log(path);
-    this.menuList.map(function (item) {
-      if (item.path == path) {
-        item.isActive = true;
-      } else {
-        item.isActive = false;
-      }
-    });
-  },
-  methods: {
-    menuClick(index) {
-      let that = this;
-      this.menuList.map(function (item) {
-        if (item.index == index) {
-          item.isActive = true;
-          that.$router.push(item.path);
-        } else {
-          item.isActive = false;
-        }
-      });
-      this.$nextTick(() => {
-        this.$emit("updateScroll");
-      });
-    },
+    return {};
   },
+  mounted() {},
+  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
 #header {
-  width: 100%;
+  width: 100vw;
   height: 70px;
   background: linear-gradient(180deg, #2c2f74, #494d98);
   color: #ffffff;
   margin: 0 auto;
-
   .logo {
     display: inline-block;
     height: 70px;

+ 3 - 3
src/views/skmh/index.vue

@@ -129,12 +129,12 @@
     <!-- 设备综合分析比较 -->
     <div class="comparison-section">
       <div class="chart-card full-width">
-        <div class="chart-title">各委办平台用户分布</div>
+        <div class="chart-title">用户分布</div>
         <!-- <div ref="comparisonChart" class="chart-container"></div> -->
         <el-table :data="tableData" style="width: 100%">
           <el-table-column prop="name" label="委办单位" />
-          <el-table-column prop="number" label="注册用户数" />
-          <el-table-column prop="activity" label="活跃" />
+          <el-table-column prop="number" label="用户名称" />
+          <el-table-column prop="activity" label="活跃天数" />
           <el-table-column prop="server" label="服务使用量" />
         </el-table>
       </div>

+ 23 - 3
src/views/yygl/manage/index.vue

@@ -96,13 +96,25 @@
                 <span class="metric-value">{{ app.buffName }}</span>
               </div>
               <div class="metric-item">
-                <span class="metric-label">状态</span>
+                <span class="metric-label">应用状态</span>
                 <span class="metric-value" :class="`status-${app.appstauts}`">{{ app.appstautName }}</span>
               </div>
               <div class="metric-item">
                 <span class="metric-label">使用单位</span>
                 <span class="metric-value">{{ app.sydw }}</span>
               </div>
+              <div class="metric-item">
+                <span class="metric-label">所属部门</span>
+                <span class="metric-value">{{ app.ssbm }}</span>
+              </div>
+              <div class="metric-item">
+                <span class="metric-label">负责人</span>
+                <span class="metric-value">{{ app.ywfzr }}</span>
+              </div>
+              <div class="metric-item">
+                <span class="metric-label">联系方式</span>
+                <span class="metric-value">{{ app.phone }}</span>
+              </div>
               <div class="metric-item">
                 <span class="metric-label">创建时间</span>
                 <span class="metric-value">{{ app.createTime }}</span>
@@ -249,6 +261,7 @@ export default {
       appCenter.getContentById(requestParams).then((data) => {
           if (data.code === 200) {
             that.contentItem = data.content;
+            that.contentItem.phone = this.formatPhoneNumber(that.contentItem.phone);
             that.isContentShow = true;
             that.isContentView = false;
           }
@@ -385,7 +398,7 @@ export default {
             tags: item.apptags.split(',').map(tag => this.tagOptions.find(info => info.label == tag.trim())?.value || ''),
             createTime: moment(item.create_time).format('YYYY-MM-DD HH:mm:ss'),
             frameTime: moment(item.frame_time).format('YYYY-MM-DD HH:mm:ss'),
-
+            phone: this.formatPhoneNumber(item.phone),
           }))
           this.applications = this.itemApplications;
         }else{
@@ -393,6 +406,10 @@ export default {
           this.applications = [];
         }
       })
+    },
+     formatPhoneNumber(phone) {
+      if (!phone) return '';
+        return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
     }
   }
 }
@@ -461,7 +478,7 @@ export default {
   display: flex;
   justify-content: space-between;
   align-items: center;
-  margin-bottom: 5px;
+  margin: 0px 10px 5px 10px;
 }
 
 .total-count {
@@ -483,6 +500,7 @@ export default {
   margin-bottom: 20px;
   height: 500px;
   overflow: auto;
+  padding: 0px 10px 0px 10px;
 }
 
 .application-item {
@@ -561,6 +579,7 @@ export default {
   gap: 40px;
   flex: 1;
   justify-content: space-around;
+  padding-right: 20px;
 }
 
 .metric-item {
@@ -619,6 +638,7 @@ export default {
   display: flex;
   justify-content: space-between;
   align-items: center;
+  margin: 0px 15px 0px 10px;
   // padding-top: 15px;
   // border-top: 1px solid rgba(255, 255, 255, 0.1);
 }

+ 104 - 23
src/views/yygl/monitor/index.vue

@@ -4,7 +4,18 @@
     <div class="main-content">
       <!-- 应用统计卡片 -->
       <div class="stats-cards">
-        <div class="stat-card">
+        <div class="stat-card" v-for="(item) in getLimitedList()" :key="item.name" >
+          <div class="stat-icon approved">
+            <el-icon><CircleCheckFilled /></el-icon>
+          </div>
+          <div class="stat-content">
+            <div class="stat-label">{{ item.name }}</div>
+            <div class="stat-number">
+              {{ item.value }} 个
+            </div>
+          </div>
+        </div>
+        <!-- <div class="stat-card">
           <div class="stat-icon approved">
             <el-icon><CircleCheckFilled /></el-icon>
           </div>
@@ -39,7 +50,7 @@
             <div class="stat-label">已下架应用</div>
             <div class="stat-number">20个</div>
           </div>
-        </div>
+        </div> -->
       </div>
 
       <!-- 内容模块 -->
@@ -74,13 +85,13 @@
         <div class="module">
           <div class="module-header">
             <h3 class="module-title">应用上新</h3>
-            <a href="#" class="module-more">更多</a>
+            <!-- <a href="#" class="module-more">更多</a> -->
           </div>
           <div class="module-content">
-            <div class="new-app" v-for="(app, index) in newApps" :key="index">
+            <div class="new-app" v-for="(app, index) in applications" :key="index">
               <div class="app-info">
-                <span class="app-name">{{ app.name }}</span>
-                <span class="app-date">{{ app.date }}</span>
+                <span class="app-name">{{ app.title }}</span>
+                <span class="app-date">{{ app.createTime }}</span>
               </div>
             </div>
           </div>
@@ -114,12 +125,26 @@
 </template>
 
 <script>
+
 import * as echarts from 'echarts'
+import appCenter from "@/api/appCenter";
+import moment from 'moment';
+import CountUp from 'vue-countup-v3'
 export default {
   name: "ApplicationMonitor",
+  components: {
+    CountUp
+  },
   data() {
     return {
       statusChart: null,
+      itemApplications: [],
+      applications: [],
+      statusOptions: [],
+      buffOptions: [],
+      tagOptions: [],
+      typeArrs: [],
+
       // 快捷应用数据
       quickApps: [
         { name: '农产品安全管控示范应用场', type: 'green' },
@@ -127,15 +152,6 @@ export default {
         { name: '数字孪生黄浦', type: 'blue' }
       ],
       
-      // 应用上新数据
-      newApps: [
-        { name: '水系综合管理系统', date: '2023-10-29' },
-        { name: '虹口历史文脉管理系统开发', date: '2023-09-15' },
-        { name: '虹口智慧环卫监管平台', date: '2023-09-15' },
-        { name: '上海虹口区一网统管平台', date: '2023-09-15' },
-        { name: '上海公共交通服务保障', date: '2023-09-15' }
-      ],
-      
       // 应用热度排行数据
       hotApps: [
         { name: '崇明区乡村振兴一张图', count: 128, percentage: 100 },
@@ -147,7 +163,7 @@ export default {
     }
   },
    mounted() {
-    this.initCharts()
+    this.initData()
     window.addEventListener('resize', this.handleResize)
   },
   beforeUnmount() {
@@ -155,8 +171,11 @@ export default {
     this.destroyCharts()
   },
   methods: {
-    initCharts() {
-      this.initStatusChart()
+    initData() {
+      this.getDmsCNameAType('applevel');
+      this.getDmsCNameAType('appstatus');
+      this.getDmsCNameAType('tag');
+      this.getDmsDataList()
     },
     handleResize() {
       if (this.statusChart) this.statusChart.resize()
@@ -167,7 +186,71 @@ export default {
         this.statusChart = null
       }
     },
+    getLimitedList() {
+      return this.typeArrs.slice(0, 4); // 获取前四个元素
+    },
+    getDmsCNameAType(param) {
+      let requestParams = {
+        cName: param,
+        type: 0
+      };
+      appCenter.getDmsCNameAType(requestParams).then(res => {
+        if (res.code === 200 && res.content) {
+            let option = res.content.map(item => ({
+              label: item.index,
+              value: item.name
+            }));
+            if(param === 'applevel'){
+              this.buffOptions = option;
+            }else if(param === 'appstatus'){
+              this.statusOptions = option;
+            }else if(param === 'tag'){
+              this.tagOptions = option;
+            }
+        }
+      })
+    },
+    getDmsDataList() {
+      let requestParams = {
+        columnId: 1659,
+        states: 0,
+        orderBy: JSON.stringify([{"field":"create_time","orderByType":2}]),
+        pageSize: 9999,
+        page: 0
+      };
+      appCenter.getDmsDataList(requestParams).then(res => {
+        if (res.code === 200) {
+          this.itemApplications = res.content.data.map(item => ({
+            ...item,
+            status: item.status === 0 ? '待审核' : item.status === 1 ? '待发布' : item.status === 2 ? '未完成' : '已完成',
+            buffName: this.buffOptions.find(info => info.label == item.appbuff.trim())?.value || '',
+            appstautName: this.statusOptions.find(info => info.label == item.appstauts.trim())?.value || '',
+            tags: item.apptags.split(',').map(tag => this.tagOptions.find(info => info.label == tag.trim())?.value || ''),
+            createTime: moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')
+          }))
+          this.applications = this.itemApplications;
+          this.getTypeArrs();
+        }else{
+          this.applications = [];
+        }
+      })
+    },
+    getTypeArrs() {
+      let that = this;
+      that.statusOptions.forEach(item => {
+          let arr = this.applications.filter(info => info.appstauts == item.label);
+          let name = item.value,length = arr.length;
+          let str = {name: name,value: length};
+          that.typeArrs.push(str);
+      })
+      this.initStatusChart()
+    },
     initStatusChart() {
+      let colors = ['#52C41A','#FAAD14','#F5222D','#1E90FF'];
+      let seriesData = this.typeArrs.map((item,index) => ({
+        // value: item.value, name: item.name, itemStyle: { color: colors[index] }  //自定义颜色
+        value: item.value, name: item.name // 随机颜色
+      }))
       this.statusChart = echarts.init(this.$refs.statusChart)
       const option = {
         tooltip: {
@@ -211,11 +294,7 @@ export default {
             labelLine: {
               show: false
             },
-            data: [
-              { value: 400, name: '在维', itemStyle: { color: '#52C41A' } },
-              { value: 300, name: '在筹', itemStyle: { color: '#FAAD14' } },
-              { value: 200, name: '停用', itemStyle: { color: '#F5222D' } }
-            ]
+            data: seriesData
           }
         ]
       }
@@ -362,6 +441,8 @@ export default {
 
 .module-content {
   padding: 20px;
+  height: 320px;
+  overflow: auto;
 }
 
 /* 应用状态分布图 */

+ 74 - 60
src/views/yygl/overview/index.vue

@@ -2,21 +2,31 @@
   <div class="application-overview">
     <!-- 右侧主内容区 -->
     <div class="main-content">
-      <div style="display: flex; justify-content: space-between">
-        <!-- 搜索栏 -->
-        <div class="search-bar">
-          <el-input
-            placeholder="请输入应用名称关键字"
-            v-model="searchKeyword"
-            class="search-input"
-          >
-            <!-- <template #append>
+        <div style="display: flex;justify-content: space-between;padding-right: 30px;">
+            <!-- 搜索栏 -->
+            <div class="search-bar">
+                <el-input
+                    placeholder="请输入应用名称关键字"
+                    v-model="searchKeyword"
+                    class="search-input"
+                    >
+                    <!-- <template #append>
                         <el-button type="primary" class="search-btn">搜索</el-button>
                     </template> -->
-          </el-input>
-          <el-button type="primary" class="search-btn" @click="getDmsDataList"
-            >搜索</el-button
-          >
+                    
+                </el-input>
+                <el-button type="primary" class="search-btn" @click="getDmsDataList">搜索</el-button>
+            </div>
+            
+
+            <!-- 应用范围过滤 -->
+            <div class="filter-tabs">
+                <el-radio-group v-model="activeTab" size="medium" @change="handleTabChange" v-for="item in buffOptions" :key="item.value">
+                    <el-radio-button :label="item.label">{{ item.value }}</el-radio-button>
+                    <!-- <el-radio-button label="1">区级</el-radio-button>
+                    <el-radio-button label="2">街镇</el-radio-button> -->
+                </el-radio-group>
+            </div>
         </div>
 
         <!-- 应用范围过滤 -->
@@ -33,7 +43,7 @@
                     <el-radio-button label="2">街镇</el-radio-button> -->
           </el-radio-group>
         </div>
-      </div>
+    
       <!-- 应用卡片网格 -->
       <div class="app-content">
         <div class="applications-grid">
@@ -44,10 +54,11 @@
             <div class="card-content">
               <div class="app-header">
                 <h3 class="app-name">{{ app.title }}</h3>
-                <span class="app-level">{{ app.levelName }}</span>
+                <!-- <span class="app-level">{{ app.buffName }}</span> -->
                 <span class="app-version">{{ app.version }}</span>
               </div>
               <div class="app-tags">
+                <el-tag size="small" type="success">{{ app.buffName }}</el-tag>
                 <!-- <el-tag size="small" type="success">{{ app.status }}</el-tag> -->
                 <el-tag size="small" v-for="tag in app.tags" :key="tag">{{ tag }}</el-tag>
               </div>
@@ -81,10 +92,10 @@ export default {
   name: "ApplicationOverview",
   data() {
     return {
-      searchKeyword: "",
-      activeTab: "all",
-      curUrl: systemConfig.dmsDataProxy,
-      levelOptions: [],
+      searchKeyword: '',
+      activeTab: 'all',
+      curUrl:systemConfig.dmsDataProxy,
+      buffOptions: [],
       tagOptions: [],
       applications: [],
       itemApplications: [],
@@ -95,12 +106,11 @@ export default {
   },
   methods: {
     handleTabChange() {
-      if (this.activeTab == "all") {
+      console.log(this.activeTab);
+      if (this.activeTab == 'all') {
         this.applications = this.itemApplications;
       } else {
-        this.applications = this.itemApplications.filter(
-          (item) => item.level == this.activeTab
-        );
+        this.applications = this.itemApplications.filter(item => item.appbuff == this.activeTab);
       }
     },
     initData() {
@@ -144,24 +154,42 @@ export default {
 
       appCenter.getDmsCNameAType(requestParams).then((res) => {
         if (res.code === 200) {
-          this.levelOptions = res.content.map((item) => ({
-            label: item.index,
-            value: item.name,
-          }));
-          let allOption = {
-            label: "all",
-            value: "全部",
-          };
-          this.levelOptions.unshift(allOption);
+            this.buffOptions = res.content.map(item => ({
+              label: item.index,
+              value: item.name
+            }));
+            let allOption = {
+              label: 'all',
+              value: '全部'
+            }
+            this.buffOptions.unshift(allOption);
+            
         }
       });
     },
     getDmsDataList() {
-      let requestParams = {
-        columnId: 1658,
+      // let requestParams = {
+      //   columnId: 1658,
+      //   states: 0,
+      //   pageSize: 999,
+      //   page: 0
+      // };
+      // if (this.searchKeyword) {
+      //   requestParams.search = JSON.stringify([
+      //     {
+      //       field: "title",
+      //       searchType: 2,
+      //       content: { value: "%" + this.searchKeyword + "%" },
+      //     },
+      //   ]);
+      // }
+
+       let requestParams = {
+        columnId: 1659,
         states: 0,
-        pageSize: 999,
-        page: 0,
+        orderBy: JSON.stringify([{"field":"frame_time","orderByType":2}]),
+        pageSize: 9999,
+        page: 0
       };
       if (this.searchKeyword) {
         requestParams.search = JSON.stringify([
@@ -176,26 +204,11 @@ export default {
         if (res.code === 200) {
           this.itemApplications = res.content.data.map((item) => ({
             ...item,
-            status:
-              item.status === 0
-                ? "待审核"
-                : item.status === 1
-                ? "待发布"
-                : item.status === 2
-                ? "未完成"
-                : "已完成",
-            // levelName: item.level == 0 ? '区级' : item.level == 1 ? '街镇' : item.level == 2 ? '社区' : '',
-            levelName:
-              this.levelOptions.find((info) => info.label == item.level.trim())?.value ||
-              "",
-            tags: item.tag
-              .split(",")
-              .map(
-                (tag) =>
-                  this.tagOptions.find((info) => info.label == tag.trim())?.value || ""
-              ),
-            createTime: moment(item.create_time).format("YYYY-MM-DD HH:mm:ss"),
-          }));
+            status: item.status === 0 ? '待审核' : item.status === 1 ? '待发布' : item.status === 2 ? '未完成' : '已完成',
+            buffName: this.buffOptions.find(info => info.label == item.appbuff.trim())?.value || '',
+            tags: item.apptags.split(',').map(tag => this.tagOptions.find(info => info.label == tag.trim())?.value || ''),
+            createTime: moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')
+          }))
           this.applications = this.itemApplications;
           this.handleTabChange();
         } else {
@@ -282,10 +295,11 @@ export default {
     }
   }
 }
-.app-content {
-  // height: 640px;
-  height: calc(100vh - 266px);
-  overflow: auto;
+.app-content{
+    // height: 640px;
+    height: calc(100vh - 266px);
+    overflow: auto;
+    padding-right: 20px;
 }
 
 /* 应用卡片网格样式 */