From 1477a1353e96b5620a29c78e2b08647a1a2bc5b7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 15 十月 2024 19:07:25 +0800
Subject: [PATCH] ll

---
 admin/src/views/index.vue                              |   65 ++++++++-------
 admin/src/views/meeting/components/common/FileLink.vue |   44 +++++-----
 admin/src/api/platform/platform.js                     |    4 +
 admin/src/views/platform/LogisticsRecord/subscribe.vue |   23 +++++
 admin/src/views/platform/set/index.vue                 |   15 ++-
 admin/src/views/platform/index.vue                     |    2 
 admin/src/components/base/BaseTable.vue                |    2 
 admin/src/components/common/MenuSelect.vue             |   19 ++--
 admin/src/views/meeting/components/selectMember.vue    |   54 ++++++------
 9 files changed, 127 insertions(+), 101 deletions(-)

diff --git a/admin/src/api/platform/platform.js b/admin/src/api/platform/platform.js
index db0773e..c258903 100644
--- a/admin/src/api/platform/platform.js
+++ b/admin/src/api/platform/platform.js
@@ -51,3 +51,7 @@
     }
   })
 }
+// 鏌ヨ鍙绾﹂噺
+export function checkSurplusNum (data) {
+  return request.post('/visitsAdmin/cloudService/business/platformBooks/checkSurplusNum', data)
+}
\ No newline at end of file
diff --git a/admin/src/components/base/BaseTable.vue b/admin/src/components/base/BaseTable.vue
index 7aea229..5b96868 100644
--- a/admin/src/components/base/BaseTable.vue
+++ b/admin/src/components/base/BaseTable.vue
@@ -220,4 +220,4 @@
     }
   }
 }
-</script>
+</script>
\ No newline at end of file
diff --git a/admin/src/components/common/MenuSelect.vue b/admin/src/components/common/MenuSelect.vue
index 3471617..b01748f 100644
--- a/admin/src/components/common/MenuSelect.vue
+++ b/admin/src/components/common/MenuSelect.vue
@@ -12,7 +12,8 @@
 
 <script>
 import TreeSelect from './TreeSelect'
-import { fetchTree, fetchTree1 } from '@/api/system/menu'
+// import { fetchTree, fetchTree1 } from '@/api/system/menu'
+import { fetchTree } from '@/api/system/menu'
 export default {
   name: 'MenuSelect',
   components: { TreeSelect },
@@ -51,14 +52,14 @@
     // 鑾峰彇鎵�鏈夎彍鍗�
     fetchData () {
       if (this.type === '1') {
-        fetchTree1()
-          .then(records => {
-            this.data = []
-            this.__fillData(this.data, records)
-          })
-          .catch(e => {
-            this.$tip.apiFailed(e)
-          })
+        // fetchTree1()
+        //   .then(records => {
+        //     this.data = []
+        //     this.__fillData(this.data, records)
+        //   })
+        //   .catch(e => {
+        //     this.$tip.apiFailed(e)
+        //   })
       } else {
         fetchTree()
           .then(records => {
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index e223287..c96cdaa 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -89,21 +89,10 @@
                   <div class="echart" id="echart1"></div>
                 </div>
                 <div class="list">
-                  <div class="item">
-                    <div class="icon"></div>
-                    <div class="text">璁垮</div>
-                    <div class="num">{{ headerData.inParkVisitUserNum }}</div>
-                  </div>
-                  <div class="item">
-                    <div :style="{ background: colors[0] }" class="icon"></div>
-                    <div class="text">鍐呴儴鍛樺伐</div>
-                    <div class="num">{{ headerData.todayInParkUserNum - headerData.inParkLwUserNum -
-                      headerData.inParkVisitUserNum }}</div>
-                  </div>
-                  <div class="item">
-                    <div :style="{ background: colors[1] }" class="icon"></div>
-                    <div class="text">闀挎湡鐩稿叧鏂�</div>
-                    <div class="num">{{ headerData.inParkLwUserNum }}</div>
+                  <div class="item" v-for="item, i in manningRatio" :key="i">
+                    <div :style="{ background: colors[i] }" class="icon"></div>
+                    <div class="text">{{ item.name }}</div>
+                    <div class="num">{{ item.value }}</div>
                   </div>
                 </div>
               </div>
@@ -189,7 +178,7 @@
                 <div class="btn" @click="departure(item.id)">绂诲満</div>
               </div>
             </div>
-          </div>  
+          </div>
           <div v-if="warningList.length == 0" class="empty">
             <img src="@/assets/images/default_nodata.png" alt="">
           </div>
@@ -243,6 +232,7 @@
       nowWeek: '',
       headerData: {},
       staticData: {},
+      manningRatio: [],
       taskList: [],
       taskTotal: 0,
       warningList: [],
@@ -320,6 +310,12 @@
     getWorkHead() {
       getWorkbenchData({ queryType: 1 }).then(res => {
         this.headerData = res || {}
+        let arr = []
+        arr.push({ name: '璁垮', value: this.headerData.inParkVisitUserNum })
+        arr.push({ name: '鍐呴儴鍛樺伐', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum })
+        arr.push({ name: '闀挎湡鐩稿叧鏂�', value: this.headerData.inParkLwUserNum })
+        arr.sort((a, b) => b.value - a.value)
+        this.manningRatio = arr
         this.initEchart1()
       })
     },
@@ -340,7 +336,7 @@
 
       })
     },
-    handleDetail (row) {
+    handleDetail(row) {
       if (row.objType === 2) {
         this.$refs.OperaDetailsWindow.open('鍏姟杞︾敵璇疯鎯�', { ...row, id: row.objId })
         return
@@ -386,6 +382,9 @@
       let that = this
 
       const option = {
+        tooltip: {
+          trigger: 'item'
+        },
         series: [
           {
             type: 'pie',
@@ -398,11 +397,12 @@
             labelLine: {
               show: false
             },
-            data: [
-              { value: that.headerData.inParkVisitUserNum, name: '璁垮' },
-              { value: that.headerData.todayInParkUserNum - that.headerData.inParkVisitUserNum - that.headerData.inParkLwUserNum, name: '鍐呴儴鍛樺伐' },
-              { value: that.headerData.inParkLwUserNum, name: '闀挎湡鐩稿叧鏂�' }
-            ]
+            data: that.manningRatio
+            // data: [
+            //   { value: that.headerData.inParkVisitUserNum, name: '璁垮' },
+            //   { value: that.headerData.todayInParkUserNum - that.headerData.inParkVisitUserNum - that.headerData.inParkLwUserNum, name: '鍐呴儴鍛樺伐' },
+            //   { value: that.headerData.inParkLwUserNum, name: '闀挎湡鐩稿叧鏂�' }
+            // ]
           }
         ]
       }
@@ -929,19 +929,21 @@
         }
       }
     }
-    .more{
+
+    .more {
       cursor: pointer;
     }
-    .empty {
-        height: 300px;
-        display: flex;
-        justify-content: center;
-        align-items: center;
 
-        img {
-          width: 140px;
-        }
+    .empty {
+      height: 300px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      img {
+        width: 140px;
       }
+    }
   }
 
   .static_wrap {
@@ -979,6 +981,7 @@
         display: flex;
         justify-content: center;
         align-items: center;
+        height: 100%;
 
         .echart_wrap {
           position: relative;
diff --git a/admin/src/views/meeting/components/common/FileLink.vue b/admin/src/views/meeting/components/common/FileLink.vue
index 75124d7..08a1485 100644
--- a/admin/src/views/meeting/components/common/FileLink.vue
+++ b/admin/src/views/meeting/components/common/FileLink.vue
@@ -21,7 +21,7 @@
 </template>
 
 <script>
-import { fileType } from '@/utils/util';
+// import { fileType } from '@/utils/util';
 import FileLinkItem from './FileLinkItem.vue';
 import PDFPreview from './PDFPreview'
 import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
@@ -52,12 +52,12 @@
   },
   computed: {
     // 鍥剧墖鍦板潃
-    srcList() {
-      return this.links.filter(item => {
-        let link = item[this.linkName]
-        return fileType(link) == 1
-      }).map(item => item[this.linkName])
-    }
+    // srcList() {
+    //   return this.links.filter(item => {
+    //     let link = item[this.linkName]
+    //     return fileType(link) == 1
+    //   }).map(item => item[this.linkName])
+    // }
   },
   methods: {
     deleteFile(index) {
@@ -68,21 +68,21 @@
     },
     showFile(url) {
       debugger
-      let type = fileType(url)
-      switch (type) {
-        case 1:
-          this.tempIndex = this.srcList.findIndex(item => item == url)
-          this.showViewer = true
-          break;
-        case 2:
-          this.$refs.PDFPreview.open('', { url })
-          break;
-        case 3:
-          window.open(url, '_blank')
-          break;
-        default:
-          break;
-      }
+      // let type = fileType(url)
+      // switch (type) {
+      //   case 1:
+      //     this.tempIndex = this.srcList.findIndex(item => item == url)
+      //     this.showViewer = true
+      //     break;
+      //   case 2:
+      //     this.$refs.PDFPreview.open('', { url })
+      //     break;
+      //   case 3:
+      //     window.open(url, '_blank')
+      //     break;
+      //   default:
+      //     break;
+      // }
     },
     close() {
       this.showViewer = false
diff --git a/admin/src/views/meeting/components/selectMember.vue b/admin/src/views/meeting/components/selectMember.vue
index 44e11f3..5fae9db 100644
--- a/admin/src/views/meeting/components/selectMember.vue
+++ b/admin/src/views/meeting/components/selectMember.vue
@@ -51,7 +51,7 @@
 <script>
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalAlertWindow from '@/components/common/GlobalAlertWindow'
-import { findTreeUser } from '@/api/system/department'
+// import { findTreeUser } from '@/api/system/department'
 import { fetchList as userList } from '@/api/system/user'
 export default {
   name: 'selectMember',
@@ -133,34 +133,34 @@
       } else {
         parentId = node.data.id
       }
-      findTreeUser({parentId})
-        .then(res => {
-          // this.data = [res]
-          if (!parentId) {
-            resolve([res])
-          } else {
-            let resolveList = []
-            if (res.userList) {
-              res.userList.forEach(item => {
-                let index = this.selectList.findIndex(sel => sel.id == item.id)
-                resolveList.push({
-                  ...item,
-                  name: item.realname,
-                  isUser: true,
-                  isSelect: index !== -1
-                })
-              });
-            }
-            if (res.children) {
-              res.children.forEach(item => {
-                resolveList.push(item)
-              })
-            }
+      // findTreeUser({parentId})
+      //   .then(res => {
+      //     // this.data = [res]
+      //     if (!parentId) {
+      //       resolve([res])
+      //     } else {
+      //       let resolveList = []
+      //       if (res.userList) {
+      //         res.userList.forEach(item => {
+      //           let index = this.selectList.findIndex(sel => sel.id == item.id)
+      //           resolveList.push({
+      //             ...item,
+      //             name: item.realname,
+      //             isUser: true,
+      //             isSelect: index !== -1
+      //           })
+      //         });
+      //       }
+      //       if (res.children) {
+      //         res.children.forEach(item => {
+      //           resolveList.push(item)
+      //         })
+      //       }
 
-            resolve(resolveList)
-          }
+      //       resolve(resolveList)
+      //     }
 
-        })
+      //   })
     },
     inputAction() {
       if (!this.filterText) {
diff --git a/admin/src/views/platform/LogisticsRecord/subscribe.vue b/admin/src/views/platform/LogisticsRecord/subscribe.vue
index c39c1c6..4c2a070 100644
--- a/admin/src/views/platform/LogisticsRecord/subscribe.vue
+++ b/admin/src/views/platform/LogisticsRecord/subscribe.vue
@@ -53,7 +53,7 @@
       <el-form :model="param" :rules="rules" ref="ruleForm" label-width="100px">
         <div class="param_title">杩愯緭淇℃伅</div>
         <el-form-item label="鍏ュ洯鍘熷洜" prop="reasonId">
-          <el-select v-model="param.reasonId" class="w300" placeholder="璇烽�夋嫨">
+          <el-select v-model="param.reasonId" @change="checkSurplus" class="w300" placeholder="璇烽�夋嫨">
             <el-option v-for="item in reasonList" :key="item.id" :label="item.reason" :value="item.id">
             </el-option>
           </el-select>
@@ -62,7 +62,7 @@
           <el-input v-model="param.contractNum" class="w300" placeholder="璇疯緭鍏ュ悎鍚屽彿"></el-input>
         </el-form-item>
         <el-form-item label="鍒板満鏃堕棿" prop="arriveDate">
-          <el-date-picker v-model="param.arriveDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" class="w300"
+          <el-date-picker v-model="param.arriveDate" @change="checkSurplus" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" class="w300"
             placeholder="璇烽�夋嫨">
           </el-date-picker>
         </el-form-item>
@@ -73,7 +73,7 @@
           </div>
         </el-form-item>
         <el-form-item label="鎬昏繍杈撻噺" prop="totalNum">
-          <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 10)" v-model="param.totalNum" placeholder="璇疯緭鍏�" class="w300"></el-input>
+          <el-input @blur="checkSurplus" oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 10)" v-model="param.totalNum" placeholder="璇疯緭鍏�" class="w300"></el-input>
           <span class="ml10">涓囨敮</span>
         </el-form-item>
         <el-form-item label="鍑嗚繍璇佺収鐗�" prop="transportImg">
@@ -105,9 +105,11 @@
 import Pagination from '@/components/common/Pagination'
 import QueryForm from '@/components/common/QueryForm'
 import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api'
+import { checkSurplusNum } from '@/api/platform/platform' 
 import DriverDetail from "@/views/task/driverDetail"
 import GlobalWindow from '@/components/common/GlobalWindow'
 import UploadAvatarImage from '@/components/common/UploadAvatarImage'
+import { Message } from 'element-ui'
 import dayjs from 'dayjs'
 export default {
   components: {
@@ -203,6 +205,21 @@
     this.getList()
   },
   methods: {
+    checkSurplus() {
+      const { arriveDate, reasonId, totalNum } = this.param
+      if(!arriveDate || !reasonId || !totalNum) return
+      checkSurplusNum({
+        arriveDate,
+        reasonId,
+        totalNum
+      }).then(res => {
+        console.log('res', res);
+        
+        if( res == 0 ||  res < Number(totalNum)){
+          Message.error(`褰撴棩鍓╀綑鍙绾︿綔涓氶噺${res}涓囨敮涓嶈冻璇烽�夋嫨鍏朵粬鍒板満鏃ユ湡`)
+        }
+      })
+    },
     changeRadio (day) {
       const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59']
       this.$set(this.filters, 'selDate', arr)
diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index 8ecaeba..6e75cf5 100644
--- a/admin/src/views/platform/index.vue
+++ b/admin/src/views/platform/index.vue
@@ -86,7 +86,7 @@
                 <span>杩愯緭鍏徃锛�</span>
                 <span>{{ task.carrierName }}</span>
               </div>
-              <div class="ite"></div>
+              <!-- <div class="ite"></div> -->
             </div>
             <div class="line">
               <div class="left">
diff --git a/admin/src/views/platform/set/index.vue b/admin/src/views/platform/set/index.vue
index 106df34..824cbcf 100644
--- a/admin/src/views/platform/set/index.vue
+++ b/admin/src/views/platform/set/index.vue
@@ -162,7 +162,8 @@
 import Pagination from '@/components/common/Pagination'
 import QueryForm from '@/components/common/QueryForm'
 import GlobalWindow from '@/components/common/GlobalWindow'
-import { getPlatform, PlatformEdit, PlatformDel } from '@/api'
+// import { getPlatform, PlatformEdit, PlatformDel } from '@/api'
+import { PlatformEdit, PlatformDel } from '@/api'
 export default {
   components: {
     Pagination,
@@ -202,12 +203,12 @@
     getList (page) {
       const { filters, pagination } = this
       pagination.page = page || pagination.page
-      getPlatform({
-        model: { ...filters },
-        ...pagination
-      }).then(res => {
-        this.dataList = res.records
-      })
+      // getPlatform({
+      //   model: { ...filters },
+      //   ...pagination
+      // }).then(res => {
+      //   this.dataList = res.records
+      // })
     },
     handleDel (item) {
       this.$confirm('纭畾鍒犻櫎璇ユ湀鍙板悧, 鏄惁缁х画?', '鎻愮ず', {

--
Gitblit v1.9.3