From 9b825939b7f0a7439d704b379812362dd95697fc Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 11 七月 2022 17:49:26 +0800
Subject: [PATCH] 1.优化代码2.修改实施部提出的bug3.生产开报工外协列表自动弹窗实现部分

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

diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 40bbad5..3c2a826 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -23,6 +23,7 @@
                 filterable
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
+                @focus="getRoleTypeSearch2"
               >
                 <el-option
                   v-for="item in RoleTypeCodeArr2"
@@ -53,8 +54,9 @@
         <el-table
           :data="tableData"
           border
+
           stripe
-          :height="tableHeight"
+          :height="tableHeight+'px'"
           :style="{width: 100+'%',height:tableHeight+'px'}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
@@ -150,7 +152,7 @@
     <el-dialog
       :title="operation==='add'?'鏂板':'缂栬緫'"
       :visible.sync="dialogVisible"
-      width="65%"
+      width="800px"
       top="15vh"
       :close-on-click-modal="false"
       @closed="handleClose"
@@ -194,7 +196,7 @@
     <el-dialog
       title="璁剧疆"
       :visible.sync="settingDialogVisible"
-      width="50%"
+      width="800px"
       top="15vh"
       :close-on-click-modal="false"
       class="settingDialogVisible"
@@ -276,7 +278,7 @@
     <el-dialog
       title="瑙掕壊鍏宠仈鐢ㄦ埛"
       :visible.sync="userDialogVisible"
-      width="80%"
+      width="1500px"
       :close-on-click-modal="false"
       top="15vh"
       :fullscreen="isFullscreen"
@@ -309,6 +311,7 @@
               :options="StuOrgArr"
               :props="defaultProps"
               style="width: 200px;"
+              @focus="getUserOrganization"
               @change="dialogCascaderChange"
             />
 
@@ -419,7 +422,7 @@
     <el-dialog
       title="瑙掕壊鍏宠仈鏉冮檺"
       :visible.sync="dialogVisibleRight"
-      width="50%"
+      width="800px"
       top="15vh"
       :fullscreen="isFullscreen"
       :close-on-click-modal="false"
@@ -509,7 +512,7 @@
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
-  name: 'Zzjg',
+  name: 'JSQD',
   components: {
     Pagination
   },
@@ -632,8 +635,8 @@
   },
   created() {
     this.getRoleSearch()
-    this.getRoleTypeSearch2()
-    this.getUserOrganization()
+    // this.getRoleTypeSearch2()
+    // this.getUserOrganization()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
@@ -790,7 +793,7 @@
         console.log(window.innerHeight)
         this.mainHeight = window.innerHeight - 250
         this.tableHeight = this.mainHeight - 100
-        this.isFullscreen = window.innerHeight < 800
+        // this.isFullscreen = window.innerHeight < 800
       })
     },
     /* 璁剧疆妯″潡*/
@@ -813,7 +816,7 @@
     // 娣诲姞鎸夐挳
     addSetting() {
       let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
-      number = number === 0 ? Math.random() * Math.random() : number
+      number = number === 0 ? (10 + Math.random()) : number
       const data = { roletype_code: '', roletype_name: '', isVisible: 1, number: number }
       this.RoleTypeCodeArr.unshift(data)
     },
@@ -990,7 +993,7 @@
         pcIsSelected2 = true
 
         const interval = setInterval(() => {
-          if ($('input:checkbox').length > 0) {
+          if ($("input[name='PC']").length > 0) {
             waitFlag = true
           }
           if (waitFlag) {
@@ -1010,7 +1013,7 @@
         appIsSelected2 = true
 
         const interval = setInterval(() => {
-          if ($('input:checkbox').length > 0) {
+          if ($("input[name='APP']").length > 0) {
             waitFlag = true
           }
           if (waitFlag) {
@@ -1031,7 +1034,7 @@
         appIsSelected2 = true
 
         const interval = setInterval(() => {
-          if ($('input:checkbox').length > 0) {
+          if ($("input[name='PC']").length > 0) {
             waitFlag = true
           }
           if (waitFlag) {
@@ -1250,12 +1253,20 @@
       const currentCode = this.dialogFormRight.rightCurrentCode// 鏉冮檺鎿嶄綔绔痗ode
       // 1.绗竴绉嶆儏鍐�  鍗婂彾涓洪浂  鍏ㄥ彾涓洪浂
       if (checkedKeys.length === 0 && halfCheckedKeys.length === 0) {
-        console.log('1.绗竴绉嶆儏鍐�  鍗婂彾涓洪浂  鍏ㄥ彾涓洪浂')
+        console.log('1.绗竴绉嶆儏鍐�  鍗婂彾涓洪浂  鍏ㄥ彾涓洪浂1111')
         this.dialogFormRight.rightOperationArr.forEach((item, index) => {
           if (item.code === currentCode) {
             item.isSelected2 = false
+
             this.$nextTick(() => {
-              $('input:checkbox').eq(index).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+              if (item.name === 'PC') {
+                $("input[name='PC']").eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+              }
+              if (item.name === 'APP') {
+                $("input[name='APP']").eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+              }
+              // $("input[name='APP']").eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+              // $('input:checkbox').eq(index).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
             })
           }
         })
@@ -1274,7 +1285,13 @@
           if (item.code === currentCode) {
             item.isSelected2 = true
             this.$nextTick(() => {
-              $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              if (item.name === 'PC') {
+                $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              }
+              if (item.name === 'APP') {
+                $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              }
+              // $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
             })
           }
         })
@@ -1294,7 +1311,13 @@
           if (item.code === currentCode) {
             item.isSelected2 = true
             this.$nextTick(() => {
-              $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              if (item.name === 'PC') {
+                $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              }
+              if (item.name === 'APP') {
+                $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              }
+              // $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
             })
           }
         })
@@ -1362,9 +1385,9 @@
   color: #606266;
 }
 
-//::v-deep .el-dialog__body {
-//  padding: 20px 100px !important;
-//}
+::v-deep .el-dialog__body {
+  padding: 20px 100px !important;
+}
 
 .settingDialogVisible, .userDialogVisible, .dialogVisibleRight {
   ::v-deep .el-dialog__body {

--
Gitblit v1.9.3