Browse Source

修复需求12-19号

coys 1 year ago
parent
commit
0c3f242d5b

+ 6 - 0
src/components/upload/index.vue

@@ -47,6 +47,7 @@
 <script>
 import { imgUrl } from '@/utils'
 import { uploadBase64 } from '@/api/public'
+import { Toast } from 'vant'
 
 import ImageCompressor from 'js-image-compressor'
 import config from '@/config/index'
@@ -104,6 +105,11 @@ export default {
       this.selectCamera = true;
     },
     useCamera(actionType) {
+      if(this.fileList.length==this.maxCount){
+        Toast(`最多只能上传${this.maxCount}张图片`)
+        this.selectCamera=false
+        return
+      }
       this.selectCamera = false;
       window.openCameraCallBack = null
       window.openCameraCallBack = this.openCameraCallBack

+ 2 - 2
src/views/home/works.vue

@@ -174,7 +174,7 @@ export default {
           break
         case 5:
           str = '/px'
-          strName = '待记'
+          strName = '待记'
           path = '/training'
           pathInfo = '/Addtraining/' + id
           break
@@ -238,7 +238,7 @@ export default {
         }
         //教育培训
         if (val == 5 && taskType == 0) {
-          strName = '待记'
+          strName = '待记'
         } else if (val == 5 && taskType == 1) {
           strName = '待签名'
         } else if (val == 5 && taskType == 4) {

+ 1 - 1
src/views/menu/drillStatistics/index.vue

@@ -62,7 +62,7 @@
           >
             <van-icon name="arrow-down" slot="button"
           /></van-field> -->
-          <van-cell title="开始月份" @click="endShowDate = true" is-link arrow-direction="down" :value="endDate" />
+          <van-cell title="结束月份" @click="endShowDate = true" is-link arrow-direction="down" :value="endDate" />
 
           <van-popup v-model="endShowDate" round position="bottom">
             <!-- :columns="yearColumns" -->

+ 8 - 7
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -68,9 +68,9 @@
         show-word-limit
         placeholder="请填写演练地点"
       />
-      <!-- 演练计划资料 -->
+      <!-- 演练文件 -->
       <div class="mainItem mainItemData">
-        <p class="label labelPeople">演练计划资料</p>
+        <p class="label labelPeople">演练文件</p>
         <div>
           <div v-for="item in studyList" :key="item.name">
             <van-tag type="primary" @click="tagHandler(item)" class="tagCls" plain>{{ item.name }}</van-tag>
@@ -156,11 +156,12 @@
         show-word-limit
         placeholder="请填写点评总结"
       />
-      <!-- 参人员 -->
+      <!-- 参人员 -->
 
       <!-- 必填 -->
       <CheckPeople
         ref="checkPeople"
+        :inpitLabel="'参演人员'"
         :userList="userPeopleList"
         :organizationId="trainingData.orgId"
         :isRequired="true"
@@ -235,7 +236,7 @@ export default {
         drillStartTime: '' //开始时间
       },
       trainingData: {},
-      userPeopleList: [], //参人员数组
+      userPeopleList: [], //参人员数组
       lackPeopleList: [], //缺席人员数组
       showPicker: false, //演练类型显示隐藏
       showPickerType: false, //演练类型显示隐藏
@@ -419,7 +420,7 @@ export default {
         return
       }
       if (this.userPeopleList.length == 0) {
-        Toast('参人员不能为空!')
+        Toast('参人员不能为空!')
         this.falg = true
         return
       }
@@ -434,7 +435,7 @@ export default {
           })
         })
         if (isTrue) {
-          Toast('参人员与缺席人员存在同一个人请修正!')
+          Toast('参人员与缺席人员存在同一个人请修正!')
           this.falg = true
         }
       } else {
@@ -447,7 +448,7 @@ export default {
           })
         })
         if (isTrue) {
-          Toast('参人员与缺席人员存在同一个人请修正!')
+          Toast('参人员与缺席人员存在同一个人请修正!')
           this.falg = true
         }
       }

+ 1 - 1
src/views/menu/rehearsalTask/components/dialog.vue

@@ -78,7 +78,7 @@ export default {
 
     inpitLabel: {
       type: String,
-      default: '参人员'
+      default: '参人员'
     },
     fieldNames: {
       //树行配置映射项

+ 37 - 43
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar  />
+    <NavBar />
     <div class="bigbox">
       <div class="mainItem">
         <van-row>
@@ -60,7 +60,7 @@
       <div class="mainItem">
         <van-row>
           <van-col :span="8" class="label">
-            <div>演练计划资料</div>
+            <div>演练文件</div>
           </van-col>
           <van-col :span="16" class="zl">
             <div v-for="item in studyList" :key="item.name">
@@ -124,7 +124,7 @@
       <div class="mainItem">
         <van-row>
           <van-col :span="8" class="label">
-            <div>参人员</div>
+            <div>参人员</div>
           </van-col>
           <van-col :span="16">
             <div>{{ taskUserList }}</div>
@@ -161,23 +161,24 @@
       <div class="mainItem" v-if="peopleShow">
         <van-row>
           <van-col :span="8" class="label">
-            <div>参与人员签名图片</div>
+            <div>参演人员签字图片</div>
           </van-col>
           <van-col :span="16">
             <!-- signUserList -->
+            
             <template v-for="item in signUserList">
               <imgCom
+              v-if="item.signImage"
                 :width="'100'"
-                v-if="item.signImage"
                 :list="signUserListMap"
                 :key="item.userId"
                 :height="'100'"
+               
                 :src="item.signImage"
               ></imgCom>
             </template>
           </van-col>
         </van-row>
-
       </div>
       <div class="mainItem" v-if="evaluate">
         <van-row>
@@ -188,7 +189,6 @@
             <van-rate :disabled="disabledShow" v-model="value" :count="10" />
           </van-col>
         </van-row>
-
       </div>
 
       <div class="mainItem" v-if="disabledShow">
@@ -196,11 +196,8 @@
           <van-col :span="8" class="label">
             <div>评分</div>
           </van-col>
-          <van-col :span="16">
-            {{ value }}分
-          </van-col>
+          <van-col :span="16"> {{ value }}分 </van-col>
         </van-row>
-       
       </div>
 
       <div class="mainItem" v-if="islearning">
@@ -208,31 +205,25 @@
           <van-col :span="8" class="label">
             <div>评优状态</div>
           </van-col>
-          <van-col :span="16">
-            {{ trainingData.recStatusText }}分
-          </van-col>
+          <van-col :span="16"> {{ trainingData.recStatusText }}分 </van-col>
         </van-row>
-     
       </div>
       <div class="mainItem" v-if="$route.params.id.split('_')[1] === 'comment'">
-        <van-row >
-          <van-col :span="24" class="label bgc" >
-            
+        <van-row>
+          <van-col :span="24" class="label bgc">
             <van-checkbox-group v-model="result" direction="horizontal" @change="clickChekcBox($event)">
-            <van-checkbox
-              v-for="item in resultList"
-              :key="item.value"
-              :disabled="item.disabled"
-              shape="square"
-              :checked="item.checked"
-              :name="item.value"
-              >{{ item.name }}</van-checkbox
-            >
-          </van-checkbox-group>
-          </van-col>
-         
+              <van-checkbox
+                v-for="item in resultList"
+                :key="item.value"
+                :disabled="item.disabled"
+                shape="square"
+                :checked="item.checked"
+                :name="item.value"
+                >{{ item.name }}</van-checkbox
+              >
+            </van-checkbox-group>
+          </van-col>
         </van-row>
-       
       </div>
     </div>
     <van-row>
@@ -291,11 +282,14 @@ export default {
       this_window: window,
       show: false,
       resultList: [],
-      taskUserList: [], //参人员
+      taskUserList: [], //参人员
       qsUserList: [], //缺席人员
-      imgList: [], //图片数组
-      signUserList: [], //参与人员签名数组
-      signUserListMap: [], //参与人员签名数组Map
+      imgList: [
+      
+      ], //图片数组
+      signUserList: [
+      ], //参演人员签名数组
+      signUserListMap: [], //参演人员签名数组Map
       studyList: [], //学习资料数组
       trainingData: {} //详情数据
     }
@@ -303,7 +297,7 @@ export default {
   computed: {
     goBack() {
       this.$router.go(-1)
-     
+
       // if (
       //   this.$route.params.id.split('_')[1] === 'evaluate' ||
       //   this.$route.params.id.split('_')[1] === 'edit' ||
@@ -609,7 +603,6 @@ export default {
 .mainItem {
   font-size: 28px;
   width: 100%;
- 
 }
 .mainItemData {
   justify-content: end;
@@ -646,12 +639,12 @@ export default {
     justify-content: center;
     align-items: center;
     padding: 10px;
-    background-color: rgb(230, 230, 230,0.4);
+    background-color: rgb(230, 230, 230, 0.4);
     opacity: 1;
   }
-  .van-col{
+  .van-col {
     text-align: justify;
-  white-space: pre-wrap;
+    white-space: pre-wrap;
   }
   .zl {
     display: block !important;
@@ -665,13 +658,14 @@ export default {
     padding-left: 10px;
     background-color: #fff;
     padding: 10px;
-    
-    opacity: 0.9;
+    flex-flow: wrap;
+
+    // opacity: 0.9;
   }
   .tagCls {
     margin-top: 10px;
   }
-  .bgc{
+  .bgc {
     background-color: #fff;
     padding: 10px;
   }

+ 3 - 3
src/views/menu/rehearsalTask/index.vue

@@ -37,7 +37,7 @@
           >
             <van-icon name="arrow-down" slot="button"
           /></van-field> -->
-          <van-cell title="份" @click="showDate = true" is-link arrow-direction="down" :value="currentDate" />
+          <van-cell title="份" @click="showDate = true" is-link arrow-direction="down" :value="currentDate" />
 
           <van-popup v-model="showDate" round position="bottom">
             <!-- :columns="yearColumns" -->
@@ -148,7 +148,7 @@ export default {
       loading: false, //加载状态
       finished: false, //是否全部加载完毕
       participationList: {
-        list: [], // 参人员
+        list: [], // 参人员
         num: 0 //人数
       },
       yearColumns: [],
@@ -501,7 +501,7 @@ export default {
     //关闭弹框
     beforeClose() {
       ;(this.participationList = {
-        list: [], // 参人员
+        list: [], // 参人员
         num: 0 //人数
       }),
         (this.absenceList = {

+ 1 - 1
src/views/menu/rehearsalTask/optimal.vue

@@ -76,7 +76,7 @@
           >
             <van-icon name="arrow-down" slot="button"
           /></van-field> -->
-          <van-cell title="开始月份" @click="endShowDate = true" is-link arrow-direction="down" :value="endDate" />
+          <van-cell title="结束月份" @click="endShowDate = true" is-link arrow-direction="down" :value="endDate" />
 
           <van-popup v-model="endShowDate" round position="bottom">
             <!-- :columns="yearColumns" -->

+ 1 - 1
src/views/menu/training/components/addTraining.vue

@@ -129,7 +129,7 @@
       <!-- 上传 -->
       <van-field readonly required clickable name="uploader" label="上传图片">
         <template #input>
-          <Upload v-model="form.imageList" :multiple="true" :maxCount="5" @input="listHandler"></Upload>
+          <Upload v-model="form.imageList" :multiple="true" :maxCount="2" @input="listHandler"></Upload>
         </template>
       </van-field>
       <div class="btns" v-show="isBtn">

+ 15 - 19
src/views/menu/training/components/personnelSignature.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar  />
+    <NavBar />
     <div class="bigbox">
       <div class="mainItem">
         <van-row>
@@ -9,8 +9,6 @@
           </van-col>
           <van-col :span="16">
             <div>{{ trainingData.title }}</div>
-           
-           
           </van-col>
         </van-row>
       </div>
@@ -173,7 +171,7 @@
       <div class="mainItem" v-if="this.$route.params.id.split('_')[1] === 'info'">
         <van-row>
           <van-col :span="8" class="label">
-            <div>参人员签名图片</div>
+            <div>参人员签名图片</div>
           </van-col>
           <van-col :span="16">
             <template v-for="item in signUserList">
@@ -203,13 +201,7 @@
     </div>
     <van-row v-if="this.$route.params.id.split('_')[1] === 'edit'">
       <van-col span="24" class="btns">
-        <van-button
-          type="info"
-          class="btn"
-         
-          @click="signatureHandler"
-          >签名</van-button
-        >
+        <van-button type="info" class="btn" @click="signatureHandler">签名</van-button>
       </van-col>
     </van-row>
     <van-action-sheet v-model="show" title="签署名字" class="sheet">
@@ -287,7 +279,10 @@ export default {
           })
         }
         if (this.trainingData.imageList) {
-          this.imgList = this.trainingData.imageList.split(',') || []
+          // this.imgList = this.trainingData.imageList.split(',') || []
+          this.imgList = [
+            
+          ]
         }
       }
     })
@@ -376,10 +371,10 @@ export default {
   box-shadow: 0 8px 12px #ebedf0;
   background-color: #fff;
 }
-.van-col{
-    text-align: justify;
+.van-col {
+  text-align: justify;
   white-space: pre-wrap;
-  }
+}
 .btns {
   background-color: #fff;
   width: 100%;
@@ -393,16 +388,16 @@ export default {
 .van-row {
   // margin-top: -1px;
   border-bottom: 1px solid #ccc;
- 
+  background-color: #f0f0f0;
   display: flex;
   align-items: center;
-  
+
   .van-col--8 {
     min-height: 100px;
     display: flex;
     justify-content: center;
     align-items: center;
-    background-color: rgb(230, 230, 230,0.4);
+    background-color: rgb(230, 230, 230, 0.4);
     opacity: 1;
     padding: 10px;
   }
@@ -417,9 +412,10 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 10px;
+    
     background-color: #fff;
     padding: 10px;
- 
+    flex-flow: wrap;
     opacity: 0.9;
   }
   .tagCls {

+ 1 - 1
src/views/menu/training/index.vue

@@ -195,7 +195,7 @@ export default {
       showDate: false, //月份显示隐藏
       fieldValue: '全部', //状态名称
       statusValue: ' ', //状态值
-      columns: ['全部', '待培训', '待提交', '待签名', '已逾期', '已完成'], //状态数组
+      columns: ['全部', '待登记', '待提交', '待签名', '已逾期', '已完成'], //状态数组
       typeColumns: ['全部', '每月安全培训教育', '专项安全培训教育'], //类型数组
       currentDate: newDateMonth(), //月份值
       conditionShow: false //机构弹框显示隐藏

+ 2 - 2
vue.config.js

@@ -116,9 +116,9 @@ module.exports = defineConfig({
         }
       },
       '/dev': {
-        // target: "http://47.92.229.224:8080",
+        target: "http://47.92.229.224:8080",
         // target: "http://10.87.21.103:8080",
-        target: "http://10.87.23.62:8080",
+        // target: "http://10.87.23.62:8080",
         // ws:true,
         changOrigin:true,
         pathRewrite:{