Преглед изворни кода

fix: 新增接口getRegistrationOutsidersFileConfig放权接口查询外来登记配置

johnsen пре 4 месеци
родитељ
комит
a7e2dd598a

+ 4 - 3
.env.development

@@ -25,10 +25,11 @@ VUE_APP_BASE_API_0_0_DEV = ${VUE_APP_BASE_API}
 VUE_APP_BASE_API_2_0_DEV2 = http://dev2.local/ibps
 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_DEMO1 = http://demo1.local/ibps
 VUE_APP_BASE_API_2_0_DEMO2 = http://demo2.local/ibps
 VUE_APP_BASE_API_2_0_DEMO2 = http://demo2.local/ibps
+VUE_APP_BASE_API_2_0_DEMO12 = http://192.168.2.212:5100/ibps
 # ---本地环境1
 # ---本地环境1
 VUE_APP_BASE_API_1_0_134WY = http://192.168.2.134:5100/ibps
 VUE_APP_BASE_API_1_0_134WY = http://192.168.2.134:5100/ibps
 # ---本地环境2
 # ---本地环境2
-VUE_APP_BASE_API_2_0_8GZL = http://192.168.2.8:5100/ibps
+VUE_APP_BASE_API_2_0_8ZJH = http://192.168.2.8:5100/ibps
 VUE_APP_BASE_API_2_0_7XXH = http://192.168.2.7:5100/ibps
 VUE_APP_BASE_API_2_0_7XXH = http://192.168.2.7:5100/ibps
 # ---演示环境
 # ---演示环境
 VUE_APP_BASE_API_2_0_9LY = http://192.168.2.9:5100/ibps
 VUE_APP_BASE_API_2_0_9LY = http://192.168.2.9:5100/ibps
@@ -40,7 +41,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_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
 # VUE_APP_BASE_API_2_0_FRONT=http://dev1.local/ibps
 # # ---集成环境
 # # ---集成环境
@@ -54,4 +55,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_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

+ 12 - 0
src/api/platform/feature/alienRegistration.js

@@ -11,6 +11,18 @@ export function query(params) {
     data: params
     data: params
   })
   })
 }
 }
+
+/**
+ * 获取二维码数据
+ * @param {*} params
+ */
+export function getRegistrationOutsidersFileConfig() {
+  return request({
+    url: '/business/v3/employee/registrationOutsiders/getRegistrationOutsidersFileConfig',
+    method: 'get',
+    params: {}
+  })
+}
 /**
 /**
  * 获取签到数据
  * 获取签到数据
  * @param {*} params
  * @param {*} params

+ 88 - 88
src/components/ibps-file-preview/viewFile/index.vue

@@ -11,96 +11,96 @@ import { showView } from '@/api/platform/file/attachment'
 import { getToken } from '@/utils/auth'
 import { getToken } from '@/utils/auth'
 
 
 export default {
 export default {
-    name: 'editor',
-    props: {
-        option: {
-            type: Object
+  name: 'editor',
+  props: {
+    option: {
+      type: Object
+    }
+
+  },
+  data() {
+    return {
+      doctype: '',
+      newId: '',
+      timer: '',
+      configKey: ''
+    }
+  },
+  watch: {
+    option: {
+      handler: function(n, o) {
+        this.setEditor(n)
+        this.doctype = handleDocType(n.fileType)
+      },
+      deep: true
+    }
+  },
+  mounted() {
+    // this.option = this.$route.query
+
+    /* 调用初始化方法 ,渲染wps*/
+    if (this.option.url) {
+      this.setEditor(this.option)
+    }
+  },
+  methods: {
+    setEditor(option) {
+      console.log(option, 'document.bodydocument.body', option.url)
+      this.doctype = handleDocType(option.fileType)
+      const url = option.url + '&access_token=' + getToken()
+      console.log(option, 'urq:' + url)
+      const config = {
+        type: 'mobile',
+        document: {
+          fileType: option.fileType,
+          key: option.key,
+          title: option.title,
+          permissions: {
+            comment: true,
+            copy: true,
+            download: false,
+            modifyContentControl: true,
+            modifyFilter: true,
+            print: false,
+            edit: true,
+            fillForms: true,
+            review: true
+          },
+          url: url
         },
         },
-    
-    },
-    data () {
-        return {
-            doctype: '',
-            newId: '',
-            timer: '',
-            configKey: '',
-        }
-    },
-    watch: {
-        option: {
-            handler: function (n, o) {
-                this.setEditor(n)
-                this.doctype = handleDocType(n.fileType)
+        documentType: this.doctype,
+        editorConfig: {
+          callbackUrl: option.editUrl,
+          lang: 'zh',
+          canHistoryRestore: true,
+          canUseHistory: true,
+          customization: {
+            commentAuthorOnly: false,
+            comments: true,
+            compactHeader: false,
+            compactToolbar: true,
+            plugins: true,
+            feedback: {
+              // 隐藏反馈按钮
+              visible: false
             },
             },
-            deep: true
-        }
-    },
-    mounted () {
-        // this.option = this.$route.query
-        
-        /* 调用初始化方法 ,渲染wps*/
-        if (this.option.url) {
-            this.setEditor(this.option)
-        }
-    },
-    methods: {
-        setEditor (option) {
-            console.log(option,'document.bodydocument.body')
-            this.doctype = handleDocType(option.fileType)
-            const url = option.url + '&access_token=' + getToken()
-            console.log(option,'urq:' + url)
-            const config = {
-                type: 'mobile',
-                document: {
-                    fileType: option.fileType,
-                    key: option.key,
-                    title: option.title,
-                    permissions: {
-                        comment: true,
-                        copy: true,
-                        download: false,
-                        modifyContentControl: true,
-                        modifyFilter: true,
-                        print: false,
-                        edit: true,
-                        fillForms: true,
-                        review: true
-                    },
-                    url: url
-                },
-                documentType: this.doctype,
-                editorConfig: {
-                    callbackUrl: option.editUrl,
-                    lang: 'zh',
-                    canHistoryRestore: true,
-                    canUseHistory: true,
-                    customization: {
-                        commentAuthorOnly: false,
-                        comments: true,
-                        compactHeader: false,
-                        compactToolbar: true,
-                        plugins: true,
-                        feedback: {
-                            // 隐藏反馈按钮
-                            visible: false
-                        },
-                        // true 表示强制文件保存请求添加到回调处理程序
-                        forcesave: true,
-                        // 取消强制保存,进行手动保存
-                        atuosave: false
-                    },
-                    user: {
-                        id: this.$store.getters.userId,
-                        name: this.$store.getters.name
-                    },
-                    mode: option.mode
-                },
-                width: '100%',
-                height: window.innerHeight - 46 + 'px'
-            }
-            const docEditor = new DocsAPI.DocEditor('editorDiv', config)
-            this.configKey = config.document.key
-        }
+            // true 表示强制文件保存请求添加到回调处理程序
+            forcesave: true,
+            // 取消强制保存,进行手动保存
+            atuosave: false
+          },
+          user: {
+            id: this.$store.getters.userId,
+            name: this.$store.getters.name
+          },
+          mode: option.mode
+        },
+        width: '100%',
+        height: window.innerHeight - 46 + 'px'
+      }
+      const docEditor = new DocsAPI.DocEditor('editorDiv', config)
+      this.configKey = config.document.key
     }
     }
+  }
 }
 }
 </script>
 </script>

+ 25 - 27
src/views/platform/bpmn/alienRegistration/index.vue

@@ -107,7 +107,7 @@
             shape="square"
             shape="square"
           ></van-checkbox>
           ></van-checkbox>
           <span
           <span
-style="font-size: 14px; margin-left: 6px"
+style="font-size: 3.5vw; margin-left: 6px"
             >已阅读并同意<a
             >已阅读并同意<a
 class="link"
 class="link"
 @click="openFileHandler(firstFile)"
 @click="openFileHandler(firstFile)"
@@ -181,7 +181,7 @@ class="link"
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { query, save } from '@/api/platform/feature/alienRegistration'
+import { query, save, getRegistrationOutsidersFileConfig } from '@/api/platform/feature/alienRegistration'
 import IbpsFilePreview from '@/components/ibps-file-preview'
 import IbpsFilePreview from '@/components/ibps-file-preview'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 export default {
 export default {
@@ -303,30 +303,28 @@ export default {
         // 无type
         // 无type
         this.statusCode = '0'
         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
-        })
+      // 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)`
+      getRegistrationOutsidersFileConfig().then((res) => {
+        const result = res.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) => {
         .catch((err) => {
           this.showSaveRead = false
           this.showSaveRead = false
         })
         })
@@ -710,7 +708,7 @@ export default {
   width: 0;
   width: 0;
 }
 }
 .small {
 .small {
-  font-size: 14px;
+  font-size: 12vw;
 }
 }
 .agree-content {
 .agree-content {
   margin-top: 12px;
   margin-top: 12px;