Selaa lähdekoodia

-修改:5s管理页面

jiangbiao 2 vuotta sitten
vanhempi
commit
f7a76197c6

+ 0 - 5
master/src/main/java/com/ruoyi/project/invoice/controller/TInvoiceBookingworkticketController.java

@@ -1089,8 +1089,3 @@ public class TInvoiceBookingworkticketController extends BaseController {
         return pathName;
     }
 }
-//1:地面无杂物
-//2:物品定置摆放
-//3:公共设施及安全设施完好
-//4:门保持常开
-//5:消防实施完好

+ 21 - 8
master/src/main/java/com/ruoyi/project/production/controller/TFivesRegionController.java

@@ -25,6 +25,7 @@ import javax.imageio.ImageIO;
 import java.awt.image.BufferedImage;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Files;
 import java.nio.file.Paths;
@@ -138,7 +139,7 @@ public class TFivesRegionController extends BaseController {
             int flag;
             if (tFivesRegion.getPosition().contains("打印")) {
                 flag = 1;
-            } else if (tFivesRegion.getPosition().contains("洗手间") || tFivesRegion.getPosition().contains("更衣室") || tFivesRegion.getPosition().contains("浴室") || tFivesRegion.getPosition().contains("厕")) {
+            } else if (tFivesRegion.getPosition().contains("餐厅") || tFivesRegion.getPosition().contains("休息室") || tFivesRegion.getPosition().contains("洗手间") || tFivesRegion.getPosition().contains("更衣室") || tFivesRegion.getPosition().contains("浴室") || tFivesRegion.getPosition().contains("厕")) {
                 flag = 2;
             } else if (tFivesRegion.getPosition().contains("吸烟室")) {
                 flag = 3;
@@ -170,10 +171,14 @@ public class TFivesRegionController extends BaseController {
                         }
                     }
                     if (i == 5 && j == 0) {
-                        cell.setCellValue("1:无杂物及灰尘");
+                        if (flag != 3 && flag != 5)
+                            cell.setCellValue("1:无杂物及灰尘");
+                        else {
+                            cell.setCellValue("1:地面无杂物");
+                        }
                     }
                     if (i == 6 && j == 0) {
-                        if (flag == 1 || flag == 2) {
+                        if (flag != 6) {
                             cell.setCellValue("2:物品定置摆放");
                         } else {
                             cell.setCellValue("2:仅限必要列具物品");
@@ -182,7 +187,7 @@ public class TFivesRegionController extends BaseController {
                     if (i == 7 && j == 0) {
                         if (flag == 1) {
                             cell.setCellValue("3:标准化文档管理");
-                        } else if (flag == 2) {
+                        } else if (flag != 6) {
                             cell.setCellValue("3:公共设施及安全设施完好");
                         } else {
                             cell.setCellValue("3:办公室物品定置摆放");
@@ -191,7 +196,9 @@ public class TFivesRegionController extends BaseController {
                     if (i == 8 && j == 0) {
                         if (flag == 1) {
                             cell.setCellValue("4:公共设施及安全设施完好");
-                        } else if (flag == 2) {
+                        } else if (flag == 3) {
+                            cell.setCellValue("4:门保持常开");
+                        } else if (flag != 6) {
                             cell.setCellValue("4:门保持常闭");
                         } else {
                             cell.setCellValue("4:流程设置合理有效");
@@ -200,6 +207,10 @@ public class TFivesRegionController extends BaseController {
                     if (i == 9 && j == 0) {
                         if (flag == 1 || flag == 2) {
                             cell.setCellValue("5:保持空调系统运行正常");
+                        } else if (flag == 4) {
+                            cell.setCellValue("5:危废及保护标识清晰");
+                        } else if (flag != 6) {
+                            cell.setCellValue("5:消防实施完好");
                         } else {
                             cell.setCellValue("5:办公设施良好");
                         }
@@ -207,7 +218,7 @@ public class TFivesRegionController extends BaseController {
                     if (i == 10 && j == 0) {
                         if (flag == 1) {
                             cell.setCellValue("6:严格遵守公司信息保密规定");
-                        } else if (flag == 2) {
+                        } else if (flag != 6) {
                             cell.setCellValue("");
                         } else {
                             cell.setCellValue("6:标准化文档管理,遵守公司信息保密规定");
@@ -216,7 +227,7 @@ public class TFivesRegionController extends BaseController {
                     if (i == 11 && j == 0) {
                         if (flag == 1) {
                             cell.setCellValue("7:定期巡检");
-                        } else if (flag == 2) {
+                        } else if (flag != 6) {
                             cell.setCellValue("");
                         } else {
                             cell.setCellValue("7:无纸化与节俭办公");
@@ -225,7 +236,7 @@ public class TFivesRegionController extends BaseController {
                     if (i == 12 && j == 0) {
                         if (flag == 1) {
                             cell.setCellValue("");
-                        } else if (flag == 2) {
+                        } else if (flag != 6) {
                             cell.setCellValue("");
                         } else {
                             cell.setCellValue("8:热情工作文明礼仪");
@@ -335,6 +346,8 @@ public class TFivesRegionController extends BaseController {
             wb.close();
             String pathFileName = FileUploadUtils.getPathFileName(filePath, fileName);
             return AjaxResult.success(pathFileName);
+        } catch (IOException e) {
+            return AjaxResult.error("读取文件失败!");
         } catch (Exception e) {
             throw new RuntimeException(e);
         }

+ 12 - 2
ui/src/views/production/record/index.vue

@@ -102,7 +102,7 @@
                 v-hasPermi="['production:record:edit']"
               >导入
               </el-button>
-            </el-col>-->
+            </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -112,7 +112,7 @@
           v-hasPermi="['production:record:export']"
         >导出
         </el-button>
-      </el-col>
+      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -235,6 +235,8 @@
             :on-progress="handleFileDocProgress"
             :on-success="handleFileDocSuccess"
             :auto-upload="true"
+            :limit="4"
+            :on-exceed="exceedFile"
             accept=".jpg,.png"
             :multiple="true"
             :file-list="fileList"
@@ -275,6 +277,8 @@
             :on-progress="handleFileDocProgress"
             :on-success="handleFileDocSuccess2"
             :auto-upload="true"
+            :limit="4"
+            :on-exceed="exceedFile"
             accept=".jpg,.png"
             :multiple="true"
             :file-list="fileList"
@@ -516,6 +520,12 @@ export default {
     this.getRegion();
   },
   methods: {
+    // 文件超出个数限制时的钩子
+    exceedFile(files, fileList) {
+      this.$message.warning(
+        `最多支持4个文件导入,共选择了 ${files.length + fileList.length} 个文件`
+      );
+    },
     getRegion() {
       listAllRegion({}).then(res => {
         this.regionList = res.data;

+ 31 - 21
ui/src/views/production/region/index.vue

@@ -76,26 +76,26 @@
         >删除
         </el-button>
       </el-col>
-      <!--      <el-col :span="1.5">-->
-      <!--        <el-button-->
-      <!--          type="info"-->
-      <!--          icon="el-icon-upload2"-->
-      <!--          size="mini"-->
-      <!--          @click="handleImport"-->
-      <!--          v-hasPermi="['production:region:edit']"-->
-      <!--        >导入-->
-      <!--        </el-button>-->
-      <!--      </el-col>-->
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['production:region:export']"
-        >导出
-        </el-button>
-      </el-col>
+      <!--      <el-col :span="1.5">
+              <el-button
+                type="info"
+                icon="el-icon-upload2"
+                size="mini"
+                @click="handleImport"
+                v-hasPermi="['production:region:edit']"
+              >导入
+              </el-button>
+            </el-col>
+            <el-col :span="1.5">
+              <el-button
+                type="warning"
+                icon="el-icon-download"
+                size="mini"
+                @click="handleExport"
+                v-hasPermi="['production:region:export']"
+              >导出
+              </el-button>
+            </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -171,6 +171,8 @@
             :auto-upload="true"
             accept=".jpg,.png"
             :multiple="true"
+            :limit="4"
+            :on-exceed="exceedFile"
             :file-list="fileList"
             list-type="picture-card"
           >
@@ -200,6 +202,8 @@
             :auto-upload="true"
             accept=".jpg,.png"
             :multiple="true"
+            :limit="4"
+            :on-exceed="exceedFile"
             :file-list="fileList"
             list-type="picture-card"
           >
@@ -399,6 +403,12 @@ export default {
     this.getStaff();
   },
   methods: {
+    // 文件超出个数限制时的钩子
+    exceedFile(files, fileList) {
+      this.$message.warning(
+        `最多支持4个文件导入,共选择了 ${files.length + fileList.length} 个文件`
+      );
+    },
     generateExcel(row) {
       console.log(row.id)
       this.$confirm('确认下载当前数据项?', "警告", {
@@ -409,7 +419,7 @@ export default {
         return generateExcel(row.id);
       }).then(response => {
         var name = response.msg;
-        name = name.substring(name.lastIndexOf('/'),name.length);
+        name = name.substring(name.lastIndexOf('/'), name.length);
         var url = response.msg;
         var suffix = url.substring(url.lastIndexOf("."), url.length);
         const a = document.createElement('a')