From 1e9fa82cb2fe2c15f46bd1dd73f5c878c74b83b8 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 04 八月 2022 15:35:50 +0800
Subject: [PATCH] 1.系统多账号登录问题2.采购订单页面样式修改及数据渲染

---
 src/views/jcsz/jsqd.vue |   67 +++++++++++++++++++++++----------
 1 files changed, 47 insertions(+), 20 deletions(-)

diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 743c65e..dec57fa 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -47,14 +47,13 @@
       <div style="margin-left: 10px;display: flex">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
         <el-button type="primary" icon="el-icon-setting" @click="settingButton">璁剧疆</el-button>
-        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
+        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
       </div>
       <el-divider />
       <div class="elTableDiv">
         <el-table
           :data="tableData"
           border
-
           stripe
           :height="tableHeight+'px'"
           :style="{width: 100+'%',height:tableHeight+'px'}"
@@ -72,24 +71,29 @@
             prop="RowNum"
             width="50"
             label="搴忓彿"
+            fixed
           />
           <el-table-column
             prop="role_code"
             label="瑙掕壊缂栫爜"
             sortable="custom"
+            min-width="110"
           />
           <el-table-column
             prop="role_name"
             label="瑙掕壊鍚嶇О"
             sortable="custom"
+            min-width="110"
           />
           <el-table-column
             prop="roletype_name"
             label="瑙掕壊绫诲瀷"
             sortable="custom"
+            min-width="110"
           />
           <el-table-column
             prop="description"
+            min-width="160"
             label="瑙掕壊鎻忚堪"
             sortable="custom"
           />
@@ -97,10 +101,12 @@
             prop="lm_user"
             label="鍒涘缓浜哄憳"
             sortable="custom"
+            width="110"
           />
           <el-table-column
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
+            min-width="160"
             sortable="custom"
           />
           <el-table-column
@@ -111,7 +117,7 @@
           >
             <template slot-scope="{row}">
               <i v-if="row.is_user==='Y'" class="el-icon-user-solid" @click="userClick(row)" />
-              <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: #E4E7ED" @click="userClick(row)" />
+              <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: rgb(180 ,181, 185)" @click="userClick(row)" />
             </template>
           </el-table-column>
           <el-table-column
@@ -122,11 +128,12 @@
           >
             <template slot-scope="{row}">
               <i v-if="row.is_right==='Y'" class="el-icon-share" @click="rightClick(row)" />
-              <i v-if="row.is_right==='N'" class="el-icon-share" style="color: #E4E7ED" @click="rightClick(row)" />
+              <i v-if="row.is_right==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="rightClick(row)" />
             </template>
           </el-table-column>
           <el-table-column
             label="鎿嶄綔"
+            fixed="right"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
@@ -497,11 +504,16 @@
         </div>
       </span>
     </el-dialog>
+
+    <!--瀵煎叆缁勪欢-->
+    <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
+
   </div>
 </template>
 
 <script>
 import Pagination from '@/components/Pagination'
+import ImportPicker from '@/components/ImportPicker'
 import {
   AddUpdateRole,
   DeleteRole, RoleAssociationRight,
@@ -517,7 +529,7 @@
 export default {
   name: 'JSQD',
   components: {
-    Pagination
+    Pagination, ImportPicker
   },
   data() {
     const validateName = (rule, value, callback) => {
@@ -531,13 +543,6 @@
         }
       }
     }
-    // const validateTypeCode = (rule, value, callback) => {
-    //   if (!value) {
-    //     return callback(new Error('璇烽�夋嫨涓婄骇'))
-    //   } else {
-    //     callback()
-    //   }
-    // }
     return {
       isFullscreen: false,
       mainHeight: 0,
@@ -635,24 +640,42 @@
         value: 'code'
       },
       PCTrue: false, // 鏄惁灞曠ず
-      APPTrue: false// 鏄惁灞曠ず
+      APPTrue: false, // 鏄惁灞曠ず
+
+      title_value: '鏁版嵁瀵煎叆 / 瑙掕壊娓呭崟',
+      code: '1',
+      shows: false
+    }
+  },
+  watch: {
+    shows() {
+      if (!this.shows) {
+        this.getRoleSearch()
+      }
     }
   },
   created() {
-    this.getRoleSearch()
-    this.getRoleTypeSearch2()
-    this.getUserOrganization()
+    this.handleRequest()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    handleRequest() {
+      this.getRoleSearch().then(res => {
+        if (res.code === '200') {
+          this.getRoleTypeSearch2()
+          this.getUserOrganization()
+        }
+      })
+    },
     // 鑾峰彇瑙掕壊娓呭崟
     async getRoleSearch() {
       const res = await RoleSearch(this.form)
       this.tableData = res.data
       this.total = res.count
+      return { code: res.code }
     },
     // 鑾峰彇鐢ㄦ埛绫诲瀷
     async getRoleTypeSearch() {
@@ -700,10 +723,6 @@
       this.formSetting.order = order
       this.formSetting.prop = prop
       this.getRoleTypeSearch()
-    },
-
-    upload() {
-
     },
     // 鏌ヨ
     search() {
@@ -1423,6 +1442,14 @@
           this.dialogFormRight.rightAPPArrSelected = ['APP']
         }
       }
+    },
+    // 瀵煎叆鎸夐挳
+    upload() {
+      this.shows = true
+      this.$refs.importPickerFunc.newDataFunc()
+    },
+    colos() {
+      this.shows = false
     }
 
   }

--
Gitblit v1.9.3