From 7846034cd1a7f19f4f2c7c955542ee4f85bbb14a Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 29 八月 2024 14:47:08 +0800
Subject: [PATCH] 1.工序报工优化

---
 src/views/sopManager/sopDevice.vue |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/views/sopManager/sopDevice.vue b/src/views/sopManager/sopDevice.vue
index 806c4b3..24bf012 100644
--- a/src/views/sopManager/sopDevice.vue
+++ b/src/views/sopManager/sopDevice.vue
@@ -2,7 +2,7 @@
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
       <div class="bodyTopButtonGroup" style="justify-content: space-between;align-items: center">
-        <el-button icon="el-icon-circle-plus-outline" type="primary" @click="add">鏂囦欢涓婁紶</el-button>
+        <el-button v-waves icon="el-icon-circle-plus-outline" type="primary" @click="add">鏂囦欢涓婁紶</el-button>
         <div style="display: flex;align-items: center">
           <el-form
             ref="form"
@@ -19,8 +19,8 @@
               </el-form-item>
             </div>
           </el-form>
-          <el-button type="primary" style="margin-left: 30px" icon="el-icon-search" @click="search">鏌ヨ</el-button>
-          <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
+          <el-button v-waves type="primary" style="margin-left: 30px" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+          <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
         </div>
       </div>
 
@@ -149,6 +149,7 @@
     </div>
 
     <el-dialog
+      v-el-drag-dialog
       title="鏂囦欢涓婁紶"
       :visible.sync="dialogVisible"
       width="800px"
@@ -227,9 +228,10 @@
               :on-exceed="handleExceed"
               :auto-upload="false"
               :multiple="false"
+              accept=".mp4,.pdf,.png,.jpeg,.jpg,.svg,.txt,.xlsx,.xls"
             >
-              <!--              accept=".mp4,.pdf"-->
               <el-button
+                v-waves
                 type="primary"
                 style="width: 200px;display: flex;justify-content: center"
                 icon="el-icon-upload2"
@@ -241,8 +243,9 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
           <el-button
+            v-waves
             type="primary"
             :loading="$store.state.app.buttonIsDisabled"
             :disabled="$store.state.app.buttonIsDisabled"
@@ -260,12 +263,15 @@
 import { DeviceSopAddSeave, DeviceSopDeleteSeave, DeviceSopSearch } from '@/api/SopManager'
 import { DeviceTypeSearch } from '@/api/DeviceManager'
 import { EqpTypecodeSeachEqpPermissions } from '@/api/GeneralBasicData'
+import waves from '@/directive/waves'
+import elDragDialog from '@/directive/el-drag-dialog'
 
 export default {
   name: 'Zzjg',
   components: {
     Pagination
   },
+  directives: { waves, elDragDialog },
   data() {
     return {
       mouseHoverType: 'mouseout',
@@ -362,6 +368,7 @@
     handleExceed() {
       this.$message.info('鏆備笉鏀寔澶氭枃浠朵笂浼狅紒')
     },
+
     async devicetypecodeChange(eqptypecode) {
       const { data: res } = await EqpTypecodeSeachEqpPermissions({ eqptypecode })
       this.deviceArr = res
@@ -426,8 +433,14 @@
     // 瀵硅瘽妗嗙‘璁�
     dialogVisibleConfirm() {
       console.log(this.$refs.uploadFileRef.uploadFiles[0])
+
       if (!this.$refs.uploadFileRef.uploadFiles[0]) {
-        this.$message.info('璇烽�夋嫨鏂囦欢涓婁紶锛�')
+        return this.$message.info('璇烽�夋嫨鏂囦欢涓婁紶锛�')
+      }
+
+      const isLt100M = this.$refs.uploadFileRef.uploadFiles[0].size / 1024 / 1024 <= 1024
+      if (!isLt100M) {
+        return this.$message.info('璇锋鏌ワ紝涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃1024MB!')
       }
 
       this.$refs.dialogForm.validate(valid => {

--
Gitblit v1.9.3