Forráskód Böngészése

feat: 5426 移动端外来人员登记,增加查看生物安全告知书和保密协议功能

johnsen 4 hónapja
szülő
commit
dabe181526
2 módosított fájl, 86 hozzáadás és 5 törlés
  1. 4 2
      .env.development
  2. 82 3
      src/views/platform/bpmn/alienRegistration/index.vue

+ 4 - 2
.env.development

@@ -26,6 +26,8 @@ VUE_APP_BASE_API_2_0_DEV2 = http://dev2.local/ibps
 VUE_APP_BASE_API_2_0_DEMO1 = http://demo1.local/ibps
 VUE_APP_BASE_API_2_0_DEMO2 = http://demo2.local/ibps
 VUE_APP_BASE_API_2_0_DEMO4 = http://demo4.local/ibps
+# ---川北
+VUE_APP_BASE_API_2_0_DEMO12 = http://192.168.2.212:5100/ibps
 # ---本地环境1
 VUE_APP_BASE_API_1_0_134WY = http://192.168.2.134:5100/ibps
 # ---本地环境2
@@ -41,7 +43,7 @@ VUE_APP_BASE_API_2_0_SZJYXT = https://www.szjyxt.com/ibps
 # # ---测试环境
 # VUE_APP_BASE_API_0_0_TEST=http://dev1.local/ibps
 # # ---后端开发环境
-# VUE_APP_BASE_API_1_0_DEV=http://192.168.2.7:5100/ibps 
+# VUE_APP_BASE_API_1_0_DEV=http://192.168.2.7:5100/ibps
 # # ---前端开发环境
 # VUE_APP_BASE_API_2_0_FRONT=http://dev1.local/ibps
 # # ---集成环境
@@ -55,4 +57,4 @@ VUE_APP_BASE_API_2_0_SZJYXT = https://www.szjyxt.com/ibps
 # # ---多域名环境
 # VUE_APP_BASE_API_7_0_DOMAIN=http://{DOMAIN}.bpmhome0.cn:15100/ibps
 
-# VUE_APP_BASE_API_8_1_gzl=http://192.168.2.247:5100/ibps 
+# VUE_APP_BASE_API_8_1_gzl=http://192.168.2.247:5100/ibps

+ 82 - 3
src/views/platform/bpmn/alienRegistration/index.vue

@@ -99,8 +99,24 @@
           label-width="7em"
           clearable
         />
+        <div v-if="showSaveRead" class="agree-content">
+          <van-checkbox
+            v-model="isAgree"
+            icon-size="16px"
+            class="small"
+            shape="square"
+          ></van-checkbox>
+          <span style="font-size: 14px; margin-left: 6px"
+            >已阅读并同意<a class="link" @click="openFileHandler(firstFile)"
+              >《{{ firstFile.fileName }}》</a
+            >和<a class="link" @click="openFileHandler(secondFile)"
+              >《{{ secondFile.fileName }}》</a
+            ></span
+          >
+        </div>
         <div class="qdBtn">
           <van-button
+            :disabled="showSaveRead && !isAgree"
             type="success"
             class="btn btn-back-color"
             @click="onSubmit"
@@ -147,16 +163,26 @@
           size="10rem"
         />
         <div class="content">{{ promptObj.promptontent }}</div>
-        <div class="nowTime">{{ this.getNowTime() }}</div>
+        <div class="nowTime">{{ getNowTime() }}</div>
         <!-- <div class="btn"><van-button :type="promptObj.buttonColor" @click="quding()">{{promptObj.buttonName}}</van-button></div> -->
       </div>
     </van-popup>
+    <!--预览 -->
+    <ibps-file-preview
+      v-model="showPreviewPopup"
+      :file="currentFile"
+      @close="close"
+    />
   </div>
 </template>
 <script>
 import { query, save } from '@/api/platform/feature/alienRegistration'
+import IbpsFilePreview from '@/components/ibps-file-preview'
 import ActionUtils from '@/utils/action'
 export default {
+  components: {
+    IbpsFilePreview
+  },
   data() {
     const { userInfo } = this.$store.getters
     return {
@@ -182,13 +208,19 @@ export default {
         '其他'
       ],
       promptShow: false,
+      isAgree: false,
       promptObj: {
         iconName: 'passed',
         promptontent: '来访登记成功',
         color: '#1989fa',
         buttonColor: 'info',
         buttonName: '确定'
-      }
+      },
+      currentFile: null,
+      firstFile: {},
+      secondFile: {},
+      showPreviewPopup: false,
+      showSaveRead: false
     }
   },
   created() {
@@ -231,7 +263,13 @@ export default {
       this.jinRuYuanYin = value
       this.showPicker = false
     },
-
+    close() {
+      this.showPreviewPopup = false
+    },
+    openFileHandler(file) {
+      this.currentFile = file
+      this.showPreviewPopup = true
+    },
     getQdInfo() {
       console.log(this.$route.query)
       // type: 1.登记进入,2.登记离开
@@ -257,6 +295,33 @@ export default {
         // 无type
         this.statusCode = '0'
       }
+      const sql = `select * from ibps_file_attachment where ID_ in (select first_file_name from t_wlrydjfjsc union select second_file_name from t_wlrydjfjsc)`
+      this.$common
+        .request('sql', sql)
+        .then((res) => {
+          const result = res.variables.data
+          if (!result || result.length === 0) {
+            this.showSaveRead = false
+            return
+          }
+          const [first, second] = result
+          this.firstFile = {
+            ext: first.EXT_,
+            fileName: first.FILE_NAME_,
+            totalBytes: first.TOTAL_BYTES_,
+            id: first.ID_
+          }
+          this.secondFile = {
+            ext: second.EXT_,
+            fileName: second.FILE_NAME_,
+            totalBytes: second.TOTAL_BYTES_,
+            id: second.ID_
+          }
+          this.showSaveRead = true
+        })
+        .catch((err) => {
+          this.showSaveRead = false
+        })
     },
     // getAlreadyQD() {
     //     const paramWhere1 = {
@@ -636,6 +701,20 @@ export default {
 .alienRegistrationRootClass20241028::-webkit-scrollbar {
   width: 0;
 }
+.small {
+  font-size: 14px;
+}
+.agree-content {
+  margin-top: 12px;
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.link {
+  color: #1989fa;
+  cursor: pointer;
+}
 .promptStyle {
   width: 100%;
   margin-top: 50%;