jiangbiao 1 ano atrás
pai
commit
ab6b4517f5

+ 3 - 1
cpms-admin/src/main/java/com/cpms/project/file/controller/TFileController.java

@@ -126,7 +126,9 @@ public class TFileController extends BaseController {
                 case "txt":
                     tFile.setType("5");
                     break;
-
+                default:
+                    tFile.setType("7");
+                    break;
             }
             tFile.setpId(pId);
             tFile.setFileSize(String.valueOf(new BigDecimal(file.getSize()).

+ 7 - 3
cpms-admin/src/main/java/com/cpms/project/process/controller/TValveCsocscController.java

@@ -226,12 +226,16 @@ public class TValveCsocscController extends BaseController {
                     } else if (j == 11) {
                         entity.setCheckedBy(cellValue);
                     } else if (j == 12) {
-                        entity.setPidStatus(cellValue);
+                        entity.setCheckBeforeSu(cellValue);
                     } else if (j == 13) {
-                        entity.setRiskLevel(cellValue);
+                        entity.setPidStatus(cellValue);
                     } else if (j == 14) {
-                        entity.setCheckDate(DateUtils.parseDate(cellValue));
+                        entity.setRiskLevel(cellValue);
                     } else if (j == 15) {
+                        entity.setSheReview(cellValue);
+                    } else if (j == 16) {
+                        entity.setCheckDate(DateUtils.parseDate(cellValue));
+                    } else if (j == 17) {
                         entity.setRemarks(cellValue);
                     }
                 }

+ 2 - 2
cpms-admin/src/main/resources/application.yml

@@ -58,9 +58,9 @@ spring:
   servlet:
     multipart:
       # 单个文件大小
-      max-file-size: 10MB
+      max-file-size: 1024MB
       # 设置总上传的文件大小
-      max-request-size: 20MB
+      max-request-size: 2048MB
   # 服务模块
   devtools:
     restart:

BIN
cpms-admin/src/main/resources/static/template/process/csocsc.xlsx


+ 6 - 1
cpms-common/src/main/java/com/cpms/common/utils/file/FileUploadUtils.java

@@ -25,7 +25,7 @@ public class FileUploadUtils
     /**
      * 默认大小 50M
      */
-    public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
+    public static final long DEFAULT_MAX_SIZE = 5120L * 1024 * 1024;
 
     /**
      * 默认的文件名最大长度 100
@@ -188,6 +188,11 @@ public class FileUploadUtils
                 throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
                         fileName);
             }
+            else if (allowedExtension == MimeTypeUtils.COD_EXTENSION)
+            {
+                throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
+                        fileName);
+            }
             else
             {
                 throw new InvalidExtensionException(allowedExtension, extension, fileName);

+ 6 - 1
cpms-common/src/main/java/com/cpms/common/utils/file/MimeTypeUtils.java

@@ -26,6 +26,8 @@ public class MimeTypeUtils
 
     public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
 
+    public static final String[] COD_EXTENSION = { "dwg" };
+
     public static final String[] DEFAULT_ALLOWED_EXTENSION = {
             // 图片
             "bmp", "gif", "jpg", "jpeg", "png",
@@ -36,7 +38,10 @@ public class MimeTypeUtils
             // 视频格式
             "mp4", "avi", "rmvb",
             // pdf
-            "pdf" };
+            "pdf",
+            //cod
+            "dwg"
+    };
 
     public static String getExtension(String prefix)
     {

+ 51 - 34
cpms-ui/src/views/asset/points/index.vue

@@ -321,40 +321,41 @@
           <td>{{ item.leakagePosition }}</td>
           <td>{{ item.leakageMedium }}</td>
           <td>
-            <el-radio-group v-model="item.suspendPlateM" v-if="record.isEdit||!isNotEmpty(item.suspendPlateM)">
-              <el-radio label="是">是</el-radio>
-              <el-radio label="否">否</el-radio>
-            </el-radio-group>
-            <span v-else>
-              {{item.suspendPlateM}}
-              <el-button  class="no-print" type="text" @click="item.suspendPlateM=''">修改</el-button>
-            </span>
+            <el-checkbox-group v-model="item.suspendPlateMTmpl" :disabled="record.isEdit">
+              <el-checkbox label="是"></el-checkbox>
+              <el-checkbox label="否"></el-checkbox>
+            </el-checkbox-group>
           </td>
           <td>
-            <el-radio-group v-model="item.leakageStatusM" v-if="record.isEdit||!isNotEmpty(item.leakageStatusM)">
-              <el-radio label="未检出">未检出</el-radio>
-              <el-radio label="轻微">轻微</el-radio>
-              <el-radio label="严重">严重</el-radio>
-            </el-radio-group>
-            <span v-else>{{item.leakageStatusM}}
-              <el-button  class="no-print" type="text" @click="item.leakageStatusM=''">修改</el-button> </span>
+            <el-checkbox-group v-model="item.leakageStatusMTmpl" :disabled="record.isEdit">
+              <el-checkbox label="未检出"></el-checkbox>
+              <el-checkbox label="轻微"></el-checkbox>
+              <el-checkbox label="严重"></el-checkbox>
+            </el-checkbox-group>
           </td>
           <td>
-            <el-radio-group v-model="item.suspendPlateN" v-if="record.isEdit||!isNotEmpty(item.suspendPlateN)">
-              <el-radio label="是">是</el-radio>
-              <el-radio label="否">否</el-radio>
-            </el-radio-group>
-            <span v-else>{{item.suspendPlateN}}
-              <el-button  class="no-print" type="text" @click="item.suspendPlateN=''">修改</el-button> </span>
+            <el-checkbox-group v-model="item.suspendPlateNTmpl" :disabled="record.isEdit">
+              <el-checkbox label="是"></el-checkbox>
+              <el-checkbox label="否"></el-checkbox>
+            </el-checkbox-group>
           </td>
           <td>
-            <el-radio-group v-model="item.leakageStatusN" v-if="record.isEdit||!isNotEmpty(item.leakageStatusN)">
-              <el-radio label="未检出">未检出</el-radio>
-              <el-radio label="轻微">轻微</el-radio>
-              <el-radio label="严重">严重</el-radio>
-            </el-radio-group>
-            <span v-else>{{item.leakageStatusN}}
-              <el-button  class="no-print" type="text" @click="item.leakageStatusN=''">修改</el-button> </span>
+            <el-checkbox-group v-model="item.leakageStatusNTmpl" :disabled="record.isEdit">
+              <el-checkbox label="未检出"></el-checkbox>
+              <el-checkbox label="轻微"></el-checkbox>
+              <el-checkbox label="严重"></el-checkbox>
+            </el-checkbox-group>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="7">
+            备注:<el-input type="textarea" v-model="record.pointPatrol.remarks"  style="width: 95%"/>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="7" style="text-align: left">
+            ● 根据每日巡检状况在相应处打 “✔”<br>
+            <span class="no-print">● 每日首次打开时请先点击保存按钮</span>
           </td>
         </tr>
       </table>
@@ -546,19 +547,23 @@ export default {
       listPointPatrol(this.record.queryParams).then(response => {
         let list = response.rows;
         if (list.length > 0) {
-          this.record.pointPatrol = list[0]
+          for (let item of list[0].records) {
+            item.suspendPlateMTmpl=item.suspendPlateM==null?[]:item.suspendPlateM.split(",");
+            item.suspendPlateNTmpl=item.suspendPlateN==null?[]:item.suspendPlateN.split(",");
+            item.leakageStatusMTmpl=item.leakageStatusM==null?[]:item.leakageStatusM.split(",");
+            item.leakageStatusNTmpl=item.leakageStatusN==null?[]:item.leakageStatusN.split(",");
+          }
+          this.record.pointPatrol = list[0];
+          console.log(this.record.pointPatrol)
           this.record.isEdit = false
-          getTeams(this.record.queryParams.checkDateM).then(res=>{
-            this.record.pointPatrol.teamM=res.data.teamM;
-            this.record.pointPatrol.teamN=res.data.teamN;
-          })
         } else {
           getTeams(this.record.queryParams.checkDateM).then(res=>{
             this.record.pointPatrol = {};
             this.record.pointPatrol.teamM=res.data.teamM;
             this.record.pointPatrol.teamN=res.data.teamN;
           })
-          this.record.isEdit = true
+          this.record.isEdit = true;
+
         }
       });
     },
@@ -576,6 +581,12 @@ export default {
       this.record.isEdit = false
       this.record.pointPatrol.checkDateM = this.record.queryParams.checkDateM;
       if (this.record.pointPatrol.id != null) {
+        for (let item of this.record.pointPatrol.records) {
+          item.suspendPlateM=item.suspendPlateMTmpl.join(',')
+          item.suspendPlateN=item.suspendPlateNTmpl.join(',')
+          item.leakageStatusM=item.leakageStatusMTmpl.join(',')
+          item.leakageStatusN=item.leakageStatusNTmpl.join(',')
+        }
         updatePointPatrol(this.record.pointPatrol).then(response => {
           this.$modal.msgSuccess("修改成功");
           this.getRecordList();
@@ -767,5 +778,11 @@ table td {
   .no-print {
     display: none;
   }
+  ::v-deep .el-radio__input,
+  ::v-deep .el-checkbox__input{
+    -webkit-print-color-adjust:exact;
+    -moz-print-color-adjust:exact;
+    color-adjust:exact;
+  }
 }
 </style>

+ 1 - 0
cpms-ui/src/views/file/file/uploadFile.vue

@@ -56,6 +56,7 @@
           <svg-icon style="font-size: 200%;" v-else-if="scope.row.type == '4'" iconClass="pdf_1"/>
           <svg-icon style="font-size: 200%;" v-else-if="scope.row.type == '3'" iconClass="word"/>
           <svg-icon style="font-size: 200%;" v-else-if="scope.row.type == '5'" iconClass="txt"/>
+          <svg-icon style="font-size: 200%;" v-else-if="scope.row.type == '7'" iconClass="unknown"/>
           <svg-icon style="font-size: 200%;" v-else-if="scope.row.type == '0'" iconClass="folder"/>
           <el-image
             v-else-if="scope.row.type == '6'"

+ 2 - 2
cpms-ui/src/views/login.vue

@@ -134,8 +134,8 @@ export default {
   justify-content: center;
   align-items: center;
   height: 100%;
-  //background-image: url("../assets/images/login-background.jpg");
-  background-image: url("../assets/images/cpms-test.jpg");
+  background-image: url("../assets/images/login-background.jpg");
+  //background-image: url("../assets/images/cpms-test.jpg");
   background-size: cover;
 }
 .title {

+ 17 - 15
cpms-ui/src/views/plant/staffmgr/index.vue

@@ -154,7 +154,7 @@
     <el-table v-loading="loading" :data="staffmgrList" @selection-change="handleSelectionChange" :height="clientHeight"
               border>
       <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="部门" align="center" prop="unit" fixed="left" width="180">
+      <el-table-column label="部门" align="center" prop="unit" fixed="left" width="160">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.staff_unit" :value="scope.row.unit"/>
         </template>
@@ -163,35 +163,35 @@
                        width="100"/>
       <el-table-column label="员工姓名" align="center" prop="name" :show-overflow-tooltip="true" fixed="left"
                        width="100"/>
-      <el-table-column label="性别" align="center" prop="sex">
+      <el-table-column label="性别" align="center" prop="sex" width="70">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" width="230"/>
+          <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
         </template>
       </el-table-column>
       <el-table-column label="身份证号" align="center" prop="idCard" v-hasPermi="['plant:staffmgr:detail']"
-                       width="230"/>
-      <el-table-column label="联系方式" align="center" prop="contact" :show-overflow-tooltip="true" width="230"/>
-      <el-table-column label="岗位" align="center" prop="actualpost" width="230">
+                       width="180"/>
+      <el-table-column label="联系方式" align="center" prop="contact" :show-overflow-tooltip="true" width="150"/>
+      <el-table-column label="班组" align="center" prop="team" width="60">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.actualpost" :value="scope.row.actualpost"/>
+          <dict-tag :options="dict.type.team_divide" :value="scope.row.team"/>
         </template>
       </el-table-column>
-      <el-table-column label="邮箱" align="center" prop="mail" :show-overflow-tooltip="true" width="230"/>
-      <el-table-column label="班组" align="center" prop="team" width="230">
+      <el-table-column label="岗位" align="center" prop="actualpost" width="150">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.team_divide" :value="scope.row.team"/>
+          <dict-tag :options="dict.type.actualpost" :value="scope.row.actualpost"/>
         </template>
       </el-table-column>
+      <el-table-column label="邮箱" align="center" prop="mail" :show-overflow-tooltip="true" width="230"/>
       <el-table-column label="住址" align="center" prop="address" v-hasPermi="['plant:staffmgr:detail']"
                        :show-overflow-tooltip="true" width="230"/>
-      <el-table-column label="学历" align="center" prop="education" width="230">
+      <el-table-column label="学历" align="center" prop="education" width="120">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.education" :value="scope.row.education"/>
         </template>
       </el-table-column>
       <el-table-column label="专业" align="center" prop="speciality" v-hasPermi="['plant:staffmgr:detail']"
-                       width="230"/>
-      <el-table-column label="特殊职能" align="center" prop="specialDuty" :show-overflow-tooltip="true" width="230">
+                       width="140"/>
+      <el-table-column label="特殊职能" align="center" prop="specialDuty" :show-overflow-tooltip="true" width="130">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.special_duty" :value="scope.row.specialDuty"/>
         </template>
@@ -629,7 +629,7 @@
         </el-col>
       </el-row>
     </el-drawer>
-    <el-dialog :close-on-click-modal="false" :visible.sync="record.open" v-dialogDrag width="60%" append-to-body>
+    <el-dialog :close-on-click-modal="false" :visible.sync="record.open" :title="record.title" v-dialogDrag width="60%" append-to-body>
       <el-row class="mb8">
         <el-button
           size="mini"
@@ -655,7 +655,7 @@
             <span v-else>{{ scope.row.type }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="record.columnName" align="center" prop="change" v-if="record.columnFlag">
+        <el-table-column :label="record.columnName" align="center" prop="change" v-if="record.columnFlag">
           <template slot-scope="scope">
             <el-select v-if="scope.row.isEdit&&scope.row.type=='调班'" v-model="scope.row.change"
                        placeholder="请选择班组">
@@ -755,6 +755,7 @@ export default {
   data() {
     return {
       record: {
+        title:"",
         open: false,
         flag: false,
         recordList: [],
@@ -1066,6 +1067,7 @@ export default {
     },
     openRecord(row, flag) {
       this.record.open = true;
+      this.record.title = row.name+" 岗位调整";
       this.record.flag = flag;
       this.record.staffmgrId = row.id;
       let data = {staffmgrId: row.id}

+ 50 - 48
cpms-ui/src/views/training/roster/index.vue

@@ -106,10 +106,10 @@
           >导出
           </el-button>
           <el-button
-              icon="el-icon-folder"
-              size="mini"
-              type="text"
-              @click="openFileDialog(scope.row)"
+            icon="el-icon-folder"
+            size="mini"
+            type="text"
+            @click="openFileDialog(scope.row)"
           >附件
           </el-button>
           <el-button
@@ -155,9 +155,9 @@
         <el-form-item label="参加培训人员" prop="participants">
           <el-input v-model="form.participants" placeholder="请输入参加培训人员"/>
         </el-form-item>
-        <el-form-item label="培训日期" prop="trainDate">
+        <el-form-item label="培训日期" prop="trainDateTmpl">
           <el-date-picker
-            v-model="trainDate"
+            v-model="form.trainDateTmpl"
             type="daterange"
             align="right"
             unlink-panels
@@ -208,25 +208,25 @@
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
           <el-button
-              icon="el-icon-plus"
-              plain
-              size="mini"
-              type="primary"
-              @click="handleFileAdd"
+            icon="el-icon-plus"
+            plain
+            size="mini"
+            type="primary"
+            @click="handleFileAdd"
           >新增
           </el-button>
         </el-col>
       </el-row>
-      <el-table  :data="file.fileList" :height="clientHeight-100"
-                 border>
+      <el-table :data="file.fileList" :height="clientHeight-100"
+                border>
         <el-table-column align="center" label="附件名称" prop="fileName">
-            <template slot-scope="scope">
-              <el-button
-                  size="mini"
-                  type="text"
-                  @click="previewFile(scope.row.fileUrl)"
-              >{{ scope.row.fileName }}
-              </el-button>
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              @click="previewFile(scope.row.fileUrl)"
+            >{{ scope.row.fileName }}
+            </el-button>
           </template>
         </el-table-column>
         <el-table-column align="center" label="上传时间" prop="uploadDate" width="180">
@@ -239,10 +239,10 @@
         <el-table-column align="center" class-name="small-padding fixed-width" label="操作">
           <template slot-scope="scope">
             <el-button
-                icon="el-icon-delete"
-                size="mini"
-                type="text"
-                @click="handleFileRemove(scope.row)"
+              icon="el-icon-delete"
+              size="mini"
+              type="text"
+              @click="handleFileRemove(scope.row)"
             >删除
             </el-button>
           </template>
@@ -250,24 +250,24 @@
       </el-table>
 
       <pagination
-          v-show="file.total>0"
-          :limit.sync="file.queryParams.pageSize"
-          :page.sync="file.queryParams.pageNum"
-          :total="file.total"
-          @pagination="getFileList"
+        v-show="file.total>0"
+        :limit.sync="file.queryParams.pageSize"
+        :page.sync="file.queryParams.pageNum"
+        :total="file.total"
+        @pagination="getFileList"
       />
     </el-dialog>
     <el-dialog :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="附件上传" width="400px">
       <el-upload
-          ref="doc"
-          :action="doc.url"
-          :auto-upload="false"
-          :file-list="doc.fileList"
-          :headers="doc.headers"
-          :on-progress="handleFileDocProgress"
-          :on-success="handleFileDocSuccess"
-          drag
-          multiple>
+        ref="doc"
+        :action="doc.url"
+        :auto-upload="false"
+        :file-list="doc.fileList"
+        :headers="doc.headers"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        drag
+        multiple>
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
       </el-upload>
@@ -281,7 +281,7 @@
 </template>
 
 <script>
-import {listRoster, getRoster, delRoster, addRoster, updateRoster, wordView} from "@/api/training/roster";
+import {addRoster, delRoster, getRoster, listRoster, updateRoster, wordView} from "@/api/training/roster";
 import {getToken} from "../../../utils/auth";
 import {delFile, listFile} from "../../../api/file/file";
 
@@ -298,7 +298,7 @@ export default {
           linkId: null,
           linkName: 'roster',
         },
-        total:0,
+        total: 0,
       },
       doc: {
         id: null,
@@ -338,7 +338,6 @@ export default {
           }
         }]
       },
-      trainDate: [],
       //字典
       teamOptions: [],
       // 页面高度
@@ -395,6 +394,9 @@ export default {
         participants: [
           {required: true, message: "参加培训人员不能为空", trigger: "blur"}
         ],
+        trainDateTmpl: [
+          {required: true, message: "培训日期不能为空", trigger: "blur"}
+        ],
       }
     };
   },
@@ -409,7 +411,7 @@ export default {
     });
   },
   methods: {
-    previewFile(url){
+    previewFile(url) {
       window.open(process.env.VUE_APP_BASE_API + url);
     },
     submitUpload() {
@@ -475,6 +477,7 @@ export default {
         trainer: null,
         participants: null,
         trainDate: null,
+        trainDateTmpl: null,
         teams: null,
         content: null,
         delFlag: null,
@@ -517,8 +520,9 @@ export default {
         if (response.data.teams) {
           response.data.teams = response.data.teams.split(',');
         }
-        this.trainDate[0] = response.data.trainStartDate;
-        this.trainDate[1] = response.data.trainEndDate;
+        response.data.trainDateTmpl = [];
+        response.data.trainDateTmpl[0] = new Date(response.data.trainStartDate);
+        response.data.trainDateTmpl[1] = new Date(response.data.trainEndDate);
         this.form = response.data;
         this.open = true;
         this.title = "修改培训签字";
@@ -528,10 +532,8 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          if (this.trainDate) {
-            this.form.trainStartDate = this.trainDate[0];
-            this.form.trainEndDate = this.trainDate[1];
-          }
+          this.form.trainStartDate = this.form.trainDateTmpl[0];
+          this.form.trainEndDate = this.form.trainDateTmpl[1];
           if (this.form.teams)
             this.form.teams = this.form.teams.join(',')
           if (this.form.id != null) {