Explorar o código

Merge branch 'x_jy' into dev

谢杰标 %!s(int64=2) %!d(string=hai) anos
pai
achega
e889b836a5
Modificáronse 7 ficheiros con 129 adicións e 73 borrados
  1. 1 2
      common/api.js
  2. 1 1
      common/config.js
  3. 7 1
      common/httpList/course.js
  4. 0 5
      common/httpList/order.js
  5. 15 0
      pages/learn/index.vue
  6. 1 1
      pages/wd/index.vue
  7. 104 63
      pages2/verify/input.vue

+ 1 - 2
common/api.js

@@ -22,7 +22,6 @@ import exam from './httpList/exam.js'
 import profileStamp from './httpList/profileStamp.js'
 import lock from './httpList/lock.js'
 import mock from './httpList/mock.js'
-
 export default {
 	...mock,
 	...login,
@@ -47,5 +46,5 @@ export default {
 	...note,
 	...exam,
 	...profileStamp,
-	...lock
+	...lock,
 }

+ 1 - 1
common/config.js

@@ -1,6 +1,6 @@
 // test 测试环境
 const test = {
-  BASE_URL: "http://120.79.166.78:19012",
+  BASE_URL: "http://192.168.1.7:5055",
   BASE_IMG_URL: "https://file-dev.xyyxt.net/",
   domain: "h.xyyxt.net",
   tenantId: "867735392558919680", //详粤云学堂

+ 7 - 1
common/httpList/course.js

@@ -150,7 +150,13 @@ export default {
 			data: data
 		})
 	},
-
+    updateCommitment(data) {
+		return myRequest({
+			url: '/base/profile/tp/commitment/upload',
+			method: 'post',
+			data: data
+		})
+	},
 	facCertificationImageRecognition(data) {
 		return myRequest({
 			url: '/face/certification/ImageRecognition',

+ 0 - 5
common/httpList/order.js

@@ -124,9 +124,4 @@ export default {
 			data: data
 		})
 	}
-	
-	
-	
-
-
 }

+ 15 - 0
pages/learn/index.vue

@@ -355,6 +355,13 @@
             </view>
             <!-- 按钮 -->
             <view class="study_btns">
+              <view
+                v-if="item.userProfile == 1"
+                class="box_appoint"
+                @click="toInput(item)"
+              >
+                <view class="exam_word intos">学习资料</view>
+              </view>
               <template
                 v-if="
                   item.gradeStatus == 1 &&
@@ -1143,6 +1150,14 @@ export default {
         }
       });
     },
+    toInput(item) {
+      this.$navTo.togo("/pages2/verify/input", {
+        id: item.goodsId,
+        orderGoodsId: item.orderGoodsId,
+        gradeId: item.gradeId,
+        type: 1,
+      });
+    },
     /**
      * @param {Object} goodsId 商品id
      * 查询商品重修状态

+ 1 - 1
pages/wd/index.vue

@@ -354,7 +354,7 @@ page {
 }
 .loginBox {
   position: relative;
-  padding: 0 30rpx 150rpx 30rpx;
+  padding: 0 30rpx 200rpx 30rpx;
   top: 430rpx;
   width: 100%;
   margin-top: 30rpx;

+ 104 - 63
pages2/verify/input.vue

@@ -36,7 +36,7 @@
             >
               <u-input
                 v-model="form.name"
-                :disabled="disName"
+                :disabled="disable || disName"
                 :placeholder="`请输入${item.fieldName}`"
               />
             </u-form-item>
@@ -49,7 +49,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <u-input
-                :disabled="disCard"
+                :disabled="disable || disCard"
                 v-model="form.idcard"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -78,6 +78,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <u-input
+                :disabled="disable"
                 v-model="form.school"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -91,6 +92,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <u-input
+                :disabled="disable"
                 v-model="form.work_unit"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -104,6 +106,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <u-input
+                :disabled="disable"
                 v-model="form.unit_contact"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -117,24 +120,11 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <u-input
+                :disabled="disable"
                 v-model="form.unit_tel"
                 :placeholder="`请输入${item.fieldName}`"
               />
             </u-form-item>
-            <u-form-item
-              :key="index"
-              v-if="item.fieldKey == 'apply_post'"
-              :label="item.fieldName"
-              :required="item.required"
-              :label-width="auto"
-              :prop="item.required ? item.fieldKey : ''"
-            >
-              <u-input
-                v-model="form.apply_post"
-                :disabled="apply_post_disabled"
-                :placeholder="`请输入${item.fieldName}`"
-              />
-            </u-form-item>
             <u-form-item
               :key="index"
               v-if="item.fieldKey == 'major'"
@@ -144,6 +134,7 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <u-input
+                :disabled="disable"
                 v-model="form.major"
                 :placeholder="`请输入${item.fieldName}`"
               />
@@ -157,6 +148,8 @@
               :prop="item.required ? item.fieldKey : ''"
             >
               <picker
+                :disabled="disable"
+                :key="item.fieldKey"
                 @change="bindPickerChange(item.fieldKey, $event)"
                 :value="form[item.fieldKey]"
                 :range="getarrays(item.fieldKey)"
@@ -190,6 +183,7 @@
                 mode="date"
                 :value="form[item.fieldKey]"
                 @change="bindDateChange(item.fieldKey, $event)"
+                :disabled="disable"
               >
                 <view class="picker">
                   {{ getTimes(item.fieldKey) }}
@@ -258,6 +252,7 @@
                 @on-list-change="changePhotoListHeader($event, item.fieldKey)"
                 :auto-upload="false"
                 :custom-btn="true"
+                :deletable="!disable"
                 action="#"
                 :file-list="
                   item.fieldKey === 'recent_photos'
@@ -338,7 +333,7 @@
                 <div style="width: 100%">
                   <view class="dis_stys">
                     <text style="color: #999999">请在下方签名区进行签名</text>
-                    <text @click="retDraw" mode="">清空</text>
+                    <text @click="retDraw" mode="" v-if="!disable">清空</text>
                   </view>
                   <view class="handCenter">
                     <canvas
@@ -417,7 +412,9 @@
                     :src="$method.splitImgHost(form[item.fieldKey])"
                     style="width: 100%; height: 100%"
                     mode="aspectFit"
-                    @click="seePhotos(form[item.fieldKey])"
+                    @click="
+                      seePhotos($method.splitImgHost(form[item.fieldKey]))
+                    "
                   ></image>
                   <u-icon
                     name="close-circle-fill"
@@ -432,7 +429,7 @@
           </template>
         </u-form>
       </view>
-      <view @click="submits" class="submit_btn">提交资料</view>
+      <view v-if="!disable" @click="submits" class="submit_btn">提交资料</view>
     </view>
 
     <u-popup
@@ -505,7 +502,7 @@ export default {
       showTableDown: false,
       gradeId: 0,
       errorType: ["message"],
-      agreementModal: true,
+      agreementModal: false,
       goodsData: {},
       itemStyle: {
         marginTop: "20px",
@@ -659,8 +656,8 @@ export default {
         apply_post: [
           {
             required: true,
-            message: "请输入报名岗位",
-            trigger: ["change", "blur"],
+            message: "请选择报名岗位",
+            trigger: "change",
           },
         ],
         major: [
@@ -719,6 +716,8 @@ export default {
       disName: false, // 姓名是否禁止输入
       disCard: false, // 身份证是否禁止输入
       auto: "180rpx",
+      dictList: [],
+      isDetail: undefined,
     };
   },
   created() {
@@ -728,6 +727,7 @@ export default {
     this.orderGoodsId = Number(option.orderGoodsId);
     this.goodsId = Number(option.id);
     this.gradeId = Number(option.gradeId);
+    this.isDetail = option.type;
     !this.userInfo && this.$api.refreshUserInfo();
     await this.getGoodsDetail();
     await this.getInfo();
@@ -740,7 +740,12 @@ export default {
     });
     this.$refs.uForm.setRules(this.rules);
   },
-  computed: { ...mapGetters(["dictObj", "userInfo"]) },
+  computed: {
+    ...mapGetters(["dictObj", "userInfo"]),
+    disable() {
+      return this.isDetail == 1;
+    },
+  },
   watch: {
     userInfo(val, oldVal) {
       //普通的watch监听
@@ -777,6 +782,7 @@ export default {
       this.showTableDown = true;
     },
     seePhotos(url) {
+      console.log(url, 798);
       uni.previewImage({
         urls: [url],
       });
@@ -899,13 +905,16 @@ export default {
           })
           .then((res) => {
             this.goodsData = res.data.data;
-            if (this.goodsData.categoryName) {
-              this.$set(this.form, "apply_post", this.goodsData.categoryName);
-              console.log(this.form);
-              if (this.goodsData.categoryName) {
-                this.apply_post_disabled = true;
-              }
-            }
+            console.log(
+              "🚀 ~ file: input.vue:908 ~ .then ~ goodsData:",
+              this.goodsData
+            );
+            // if (this.goodsData.categoryName) {
+            //   this.$set(this.form, "apply_post", this.goodsData.categoryName);
+            //   if (this.goodsData.categoryName) {
+            //     this.apply_post_disabled = true;
+            //   }
+            // }
             if (this.userInfo && this.userInfo.companyName) {
               this.$set(this.form, "work_unit", this.userInfo.companyName);
             }
@@ -921,23 +930,6 @@ export default {
           if (res.tempFiles[0].size > 2097152) {
             this.$method.showToast("上传图片不得大于2M");
             return;
-            // this.$method.showToast("上传图片不得大于2M");
-            // 需要压缩
-            let canvasId = "zipCanvas";
-            let imagePath = res.tempFiles[0].path; //原图的路径
-            let limitSize = 2048; //大小限制2048kb
-            let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
-            getLessLimitSizeImage(
-              canvasId,
-              imagePath,
-              limitSize,
-              drawWidth,
-              async (resPath) => {
-                //resPath就是压缩后图片的路径
-                this.uploadImgsChild(resPath);
-              }
-            );
-            return;
           } else {
             // this.uploadImgsChild(res.tempFiles[0].path);
             // #ifdef MP-WEIXIN
@@ -951,6 +943,22 @@ export default {
               return;
             }
             this.$set(this.form, "commitment_seal", res.tempFiles[0].path);
+            // 查看 职能修改承诺书
+            if (this.disable) {
+              this.$method
+                .uploadFile(res.tempFiles[0].path, 0)
+                .then((imageUrl) => {
+                  this.$api
+                    .updateCommitment({ imageUrl, id: this.id })
+                    .then((res) => {
+                      if (res.data.code == 200) {
+                        this.$method.showToast("上传承诺书成功");
+                      } else {
+                        this.$method.showToast(res.data.msg);
+                      }
+                    });
+                });
+            }
             this.$nextTick(() => {
               this.resultForm();
             });
@@ -1021,6 +1029,9 @@ export default {
     },
     //清除按钮
     clearWatch(key) {
+      if (this.disable) {
+        return false;
+      }
       if (this.form[key]) {
         return true;
       } else {
@@ -1093,7 +1104,6 @@ export default {
                   orderGoodsId: this.orderGoodsId,
                   keyValue: JSON.stringify(arsty),
                 };
-                console.log(datas, "datas0");
                 // this.isUploading = false;
                 // return;
                 this.$api.editbaseprofiletp(datas).then((res) => {
@@ -1132,8 +1142,6 @@ export default {
                   orderGoodsId: this.orderGoodsId,
                   keyValue: JSON.stringify(objs),
                 };
-
-                console.log(data, "datas");
                 // this.isUploading = false;
                 // return;
                 this.$api.addbaseprofiletp(datas).then((res) => {
@@ -1508,6 +1516,9 @@ export default {
     },
     getarrays(key) {
       if (!this.dictObj) return;
+      if (key === "apply_post") {
+        return this.dictObj["apply_post"];
+      }
       if (key === "sex") {
         return this.dictObj["sys_user_sex"];
       }
@@ -1520,6 +1531,13 @@ export default {
     },
     returnName(key) {
       if (!this.dictObj) return;
+      if (key === "apply_post") {
+        if (this.form[key]) {
+          return this.form[key];
+        } else {
+          return "请选择报名岗位";
+        }
+      }
       if (key === "sex") {
         if (this.form[key]) {
           return this.dictObj["sys_user_sex"][Number(this.form[key])];
@@ -1552,7 +1570,7 @@ export default {
           self.listData = JSON.parse(res.data.data.keyValue);
           var ast = JSON.parse(res.data.data.keyValue2);
           self.listData = [...self.listData, ...ast];
-          self.listData.forEach((item) => {
+          self.listData.forEach((item, index) => {
             if (item.fieldKey == "idcard") {
               this.form.idcard = this.userInfo.idCard;
               this.disCard = this.form.idcard ? true : false;
@@ -1569,15 +1587,21 @@ export default {
           self.isRequired = self.listData.every((ims) => {
             return ims.required === false;
           });
-          this.$nextTick(() => {
-            this.agreementModal = true;
-          });
+          if (!this.disable) {
+            this.$nextTick(() => {
+              this.agreementModal = true;
+            });
+          }
           self.$api
             .getbaseprofiletpgetInfo({
               goodsId: self.goodsId,
               orderGoodsId: self.orderGoodsId,
             })
             .then((result) => {
+              console.log(
+                "🚀 ~ file: input.vue:1592 ~ .then ~ result:",
+                result
+              );
               if (result.data.code === 200) {
                 if (!result.data.data) {
                   self.$api
@@ -1611,7 +1635,7 @@ export default {
                                 if (ajson[k].value) {
                                   self.fileList1 = [
                                     {
-                                      url: baseUrls + ajson[k].value,
+                                      url: self.baseUrls + ajson[k].value,
                                     },
                                   ];
                                 }
@@ -1620,7 +1644,7 @@ export default {
                                 if (ajson[k].value) {
                                   self.fileList2 = [
                                     {
-                                      url: baseUrls + ajson[k].value,
+                                      url: self.baseUrls + ajson[k].value,
                                     },
                                   ];
                                 }
@@ -1629,7 +1653,7 @@ export default {
                                 if (ajson[k].value) {
                                   self.fileList3 = [
                                     {
-                                      url: baseUrls + ajson[k].value,
+                                      url: self.baseUrls + ajson[k].value,
                                     },
                                   ];
                                 }
@@ -1667,7 +1691,10 @@ export default {
                       }
                     });
                 }
-                if (result.data.data && result.data.data.status === 3) {
+                if (
+                  self.disable ||
+                  (result.data.data && result.data.data.status === 3)
+                ) {
                   self.remark = result.data.data.text;
                   self.remarkStatus = true;
                   self.id = result.data.data.id;
@@ -1701,17 +1728,23 @@ export default {
                     } else if (k === "recent_photos") {
                       self.$set(self.form, k, arrays[k].value);
                       if (arrays[k].value) {
-                        self.fileList1 = [{ url: baseUrls + arrays[k].value }];
+                        self.fileList1 = [
+                          { url: self.baseUrls + arrays[k].value },
+                        ];
                       }
                     } else if (k === "idcard_face_photo") {
                       self.$set(self.form, k, arrays[k].value);
                       if (arrays[k].value) {
-                        self.fileList2 = [{ url: baseUrls + arrays[k].value }];
+                        self.fileList2 = [
+                          { url: self.baseUrls + arrays[k].value },
+                        ];
                       }
                     } else if (k === "idcard_national_photo") {
                       self.$set(self.form, k, arrays[k].value);
                       if (arrays[k].value) {
-                        self.fileList3 = [{ url: baseUrls + arrays[k].value }];
+                        self.fileList3 = [
+                          { url: self.baseUrls + arrays[k].value },
+                        ];
                       }
                     } else if (k === "name") {
                       self.$set(
@@ -1762,7 +1795,11 @@ export default {
       });
     },
     bindPickerChange(key, e) {
-      this.$set(this.form, key, e.detail.value + "");
+      let value = e.detail.value + "";
+      if (key === "apply_post") {
+        value = this.dictObj["apply_post"][value];
+      }
+      this.$set(this.form, key, value);
       this.openVerify = false;
       this.$nextTick(function () {
         this.resultForm();
@@ -1857,6 +1894,11 @@ page {
   position: relative;
   border: 2rpx solid #eee;
   border-radius: 8rpx;
+  .optionsAbs {
+    position: absolute;
+    right: 5px;
+    top: 5px;
+  }
 }
 .handWriting {
   width: 100%;
@@ -1953,7 +1995,6 @@ input {
   padding: 0 20rpx;
   font-size: 24rpx;
 }
-
 .modal {
   .agreement {
     width: 640rpx;