From 8ab31157536e116dba27e942a05a20e3caaa4812 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 28 八月 2024 09:22:52 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit

---
 admin/src/views/platform/index.vue |  197 +++++++++++++++----------------------------------
 1 files changed, 60 insertions(+), 137 deletions(-)

diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index 7da33b8..7bc61bf 100644
--- a/admin/src/views/platform/index.vue
+++ b/admin/src/views/platform/index.vue
@@ -1,10 +1,9 @@
 <template>
   <div class="main_app">
-    <div class="main_head mb20">
-      <el-tabs v-model="currentPlatform" class="tabs">
-        <!-- <el-tab-pane label="鐢ㄦ埛绠$悊" name="first" v-for="item in platformList" :key="item.id"></el-tab-pane> -->
-        <el-tab-pane label="鐢ㄦ埛绠$悊" name="first"></el-tab-pane>
-      </el-tabs>
+    <div class="mb20">
+      <el-select v-model="platformId" @change="getList()">
+        <el-option v-for="item in PlatformList" :key="item.id" :value="item.id" :label="item.name" />
+      </el-select>
       <el-button type="primary" class="ml20" @click="handleSet"
         >閰嶇疆鏈堝彴</el-button
       >
@@ -26,7 +25,7 @@
               <span class="placeholder9">浣滀笟锛�</span><span class="red">1</span>
             </div>
           </div>
-          <el-button type="primary">鍙彿</el-button>
+          <el-button type="primary" @click="handleQueuing()">鍙彿</el-button>
         </div>
         <div class="list">
           <div class="info" v-for="j in 3">
@@ -64,7 +63,7 @@
             </div>
             <div class="line">
               <div class="left">
-                <span class="primaryColor pointer" @click="isShowDetail = true"
+                <span class="primaryColor pointer" @click="handleDetail"
                   >杩愬崟璇︽儏</span
                 >
               </div>
@@ -113,83 +112,85 @@
       </span>
     </el-dialog>
     <!-- 杩愬崟璇︽儏 -->
-    <el-dialog
-      title="杩愬崟璇︽儏"
-      center
-      :visible.sync="isShowDetail"
-      width="420px"
-    >
-      <div class="detail_modal">
-        <div class="head">
-          <div class="plate">鐨朅12122</div>
-          <div class="list">
-            <div class="item">
-              <span>杩愯緭鍗曞彿锛�</span>
-              <span>22222</span>
-            </div>
-            <div class="item">
-              <span>鎬昏繍杈撻噺锛�</span>
-              <span>22222</span>
-            </div>
-            <div class="item">
-              <span>椹鹃┒鍛橈細</span>
-              <span>22222</span>
-            </div>
-          </div>
-        </div>
-        <div class="title">鍚堝悓鍒楄〃</div>
-        <div class="content">
-          <div class="item">
-            <div class="contract">鍚堝悓鍙凤細1292992</div>
-            <div class="placeholder6">鏀惰揣鍦帮細address</div>
-            <div class="list">
-              <div class="line">
-                <div class="left"><span>鐗╂枡鍚嶇О锛�</span><span>榛勫北</span></div>
-                <div class="right"><span>鏁伴噺锛�</span><span>100</span></div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="isShowDetail = false">鍏抽棴</el-button>
-      </span>
-    </el-dialog>
+    <!--  -->
+    <!-- 鍙彿 -->
+    <PlatformQueuing ref="PlatformQueuingRef" v-if="isShowQueuing" @success="getList" @close="isShowQueuing = false" />
+    <WaybillDetail ref="WaybillDetailRef" v-if="isShowDetail" @success="getList" @close="isShowDetail = false" />
   </div>
 </template>
 
 <script>
+import { getPlatform, getPlatformJob } from '@/api'
+import PlatformQueuing from './components/PlatformQueuing.vue'
+import WaybillDetail from './components/WaybillDetail.vue'
 export default {
-  data() {
+  components: {
+    PlatformQueuing,
+    WaybillDetail
+  },
+  data () {
     return {
-      currentPlatform: '',
-      platformList: [],
+      platformId: '',
+      PlatformList: [],
+      dataList: [],
 
       isShowSet: false, // 鏈堝彴閰嶇疆
       setParam: {},
       isShowDetail: false, // 杩愬崟璇︽儏
-      detail: {}
+      detail: {},
+      isShowQueuing: false
     }
   },
+  created () {
+    this.getPlatList()
+    this.getList()
+  },
   methods: {
-
-    handleFinish(item) {
+    handleQueuing (row) {
+      this.isShowQueuing = true
+      this.$nextTick(() => {
+        this.$refs.PlatformQueuingRef.isShowModal = true
+      })
+    },
+    handleDetail () {
+      this.isShowDetail = true
+      this.$nextTick(() => {
+        this.$refs.WaybillDetailRef.isShowModal = true
+      })
+    },
+    getList () {
+      const { platformId } = this
+      getPlatformJob({
+        model: { platformId }
+      }).then(res => {
+        this.dataList = res.records
+      })
+    },
+    handleFinish (item) {
       this.$confirm('楂樻灦搴�6鍙锋湀鍙� 鐨朅12345 浣滀笟缁撴潫', '娓╅Θ鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       })
     },
-    handleSet() {
+    getPlatList () {
+      getPlatform({
+        model: {}
+      }).then(res => {
+        this.PlatformList = res.records
+      })
+    },
+    handleSet () {
       this.isShowSet = true
     },
-    setReset() { },
-    setSub() { }
+    setReset () { },
+    setSub () { }
   }
 }
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/style/variables.scss";
 .platform_list {
   .item {
     /* padding: 16px 24px; */
@@ -313,83 +314,5 @@
   }
 }
 /*  */
-.detail_modal {
-  font-size: 12px;
-  color: #282828;
-  .head {
-    background: rgba(39, 155, 170, 0.05);
-    border-radius: 4px;
-    border: 1px solid #dfe2e8;
-    padding: 16px;
-    .plate {
-      width: 90px;
-      text-align: center;
-      font-size: 15px;
-      color: #111111;
-      padding: 4px 5px;
-      font-weight: 700;
-      border: 1px solid #279baa;
-      background-color: #fff;
-    }
-    .list {
-      display: flex;
-      flex-wrap: wrap;
-      margin-top: 16px;
-      .item {
-        width: 50%;
-        margin-bottom: 8px;
-        span {
-          &:nth-child(1) {
-            color: #666666;
-          }
-        }
-      }
-    }
-  }
-  .title {
-    margin: 16px 0;
-    font-weight: 500;
-    font-size: 16px;
-    color: #222222;
-  }
-  .content {
-    .item {
-      border-radius: 4px;
-      border: 1px solid #dfe2e8;
-      padding: 16px;
-      .list {
-        background: #f7f7f7;
-        border-radius: 4px;
-        padding: 12px 16px;
-        margin-top: 10px;
-      }
-      .contract {
-        font-weight: 500;
-        font-size: 15px;
-        color: #279baa;
-        margin-bottom: 4px;
-      }
-      .line {
-        display: flex;
-        margin-bottom: 8px;
-        &:nth-last-child(1){
-          margin: 0;
-        }
-        div {
-          span {
-            &:nth-child(1) {
-              color: #666666;
-            }
-          }
-        }
-        .left {
-          flex: 6;
-        }
-        .right {
-          flex: 4;
-        }
-      }
-    }
-  }
-}
+/*  */
 </style>

--
Gitblit v1.9.3