From f9e869a92d209ce1ebc06ff391a541d0678ddb3e Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Wed, 21 Jun 2023 16:19:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=AD=97bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 4 +- src/components/360View/index.vue | 4 +- src/components/360View/special/index.vue | 4 +- src/mixins/styeFormSign.js | 121 ++++++++++++++++++ .../views/modules/formList/DrugInjection.vue | 43 +++---- .../modules/formList/InformedConsent.vue | 30 ++--- .../modules/formList/InjectionTherapy.vue | 43 +++---- .../views/modules/formList/MinorOperation.vue | 49 ++++--- .../views/modules/formList/StyeForm.vue | 45 +++---- .../modules/formList/childrenLacrimal.vue | 27 ++-- .../formList/conjunctivalOperation.vue | 43 +++---- .../views/modules/formList/cornealForeign.vue | 43 +++---- .../views/modules/formList/laserSurgery.vue | 4 - .../views/modules/formList/mraForm.vue | 85 ++++++------ .../views/modules/formList/puncture.vue | 45 +++---- .../seeDoctor/CornealReview.vue | 32 ++--- .../seeDoctor/informBook/notice-book.vue | 105 ++++++--------- .../seeDoctor/informBook/rgp-book.vue | 103 ++++++--------- 18 files changed, 426 insertions(+), 404 deletions(-) create mode 100644 src/mixins/styeFormSign.js diff --git a/public/index.html b/public/index.html index 47688a7..e24ae46 100644 --- a/public/index.html +++ b/public/index.html @@ -53,8 +53,8 @@ <% if (process.env.VUE_APP_NODE_ENV === 'prod') { %> <% } %> diff --git a/src/components/360View/index.vue b/src/components/360View/index.vue index 8fff240..980b1f4 100644 --- a/src/components/360View/index.vue +++ b/src/components/360View/index.vue @@ -408,8 +408,8 @@ export default { // 360浏览器 handlePacs() { // const baseUrl = 'http://z1.huimucloud.com:8085' - const baseUrl = 'http://10.80.5.32:8026' - // const baseUrl = 'http://192.168.0.85:8001' + // const baseUrl = 'http://10.80.5.32:8026' + const baseUrl = 'http://192.168.0.85:8001' const href = `${baseUrl}/EXAMINE_Report/InterFace?PatID=${this.patientId}&DoctorID=${this.employeeId}&PatIdKey=&ExamNo=` window.open(href, '_blank') // const { href } = this.$router.resolve({ diff --git a/src/components/360View/special/index.vue b/src/components/360View/special/index.vue index 265c46e..c2b0699 100644 --- a/src/components/360View/special/index.vue +++ b/src/components/360View/special/index.vue @@ -213,8 +213,8 @@ export default { // } // }) // const baseUrl = 'http://z1.huimucloud.com:8085' - const baseUrl = 'http://10.80.5.32:8026' - // const baseUrl = 'http://192.168.0.85:8001' + // const baseUrl = 'http://10.80.5.32:8026' + const baseUrl = 'http://192.168.0.85:8001' const href = `${baseUrl}/EXAMINE_Report/InterFace?PatID=${this.patientId}&DoctorID=${this.employeeId}&PatIdKey=&ExamNo=` window.open(href, '_blank') }, diff --git a/src/mixins/styeFormSign.js b/src/mixins/styeFormSign.js new file mode 100644 index 0000000..b791582 --- /dev/null +++ b/src/mixins/styeFormSign.js @@ -0,0 +1,121 @@ +import { Notification } from 'element-ui' +import emptySign from '@static/js/emptySign' +export default { + data() { + return { + plugin: null, + optomFlag: true, + wearerFlag: true, + guardianFlag: true, + readFlag: true, + currentSignText: '' + } + }, + methods: { + // 销毁签字笔 + destroyPlugin(state) { + console.log(this.plugin) + if (this.plugin) { + console.log('--------3333-------') + this.plugin.DestroyPlugin() + } + }, + initPlugin(text) { + // console.log(JSON.parse(window.sessionStorage.getItem('signPlugin'))) + // if (this.plugin) { + // this.plugin.DestroyPlugin() + // } + this.plugin = new PluginNSV() + // window.sessionStorage.setItem('signPlugin', JSON.stringify(this.plugin)) + const that = this + console.log('plugin', this.plugin) + this.plugin.InitPlugin(function(state) { + if (state === 1) { + // set pen size + that.plugin.setPenSizeRange(1, 5, null) + // set pen color + that.plugin.setPenColor(0, 0, 0, null) + that.plugin.setDisplayMapMode(1, 0, 0, null) + console.log('succeeded') + that.beginSign(text) + } else { + console.log('fails') + } + }) + + /* confirm event*/ + this.plugin.onConfirm = function() { + that.saveSignToBase64() + that.endSign() + } + // /*clear event*/ + this.plugin.onClear = function() { + this.clearSign() + } + /* cancel event*/ + this.plugin.onCancel = function() { + this.endSign() + } + this.plugin.onStateChange = function(state) {} + + this.plugin.onDevNotifyEvent = function(state) { + if (state === 1) { + Notification.success({ + title: '成功', + message: '签字笔已插入', + showClose: false, + duration: 800 + }) + } else { + Notification.error({ + title: '提示', + message: '签字笔已拔出', + showClose: false, + duration: 800 + }) + } + } + }, + beginSign(text) { + const that = this + that.currentSignText = text + console.log(that.plugin) + if (this.plugin) { + console.log(123) + this.plugin.beginSign(function(state, args) { + }) + } + // document.getElementById('img_sign_result').src = ''; + }, + clearSign() { + if (this.plugin) { + this.plugin.clearSign(function(state, args) {}) + } + }, + endSign() { + if (this.plugin) { + /* plugin.endSign(null);*/ + this.plugin.endSign(function(state, args) {}) + } + }, + saveSignToBase64() { + if (this.plugin) { + // Get the plugin's signature image data. + this.plugin.saveSignToBase64(/* 615, 272*/0, 0, (state, args) => { + if (state) { + const img_base64_data = args[0] + const img_base64 = 'data:image/png;base64,' + img_base64_data + this.formListValue[this.currentSignText] = img_base64 + if (this.formListValue[this.currentSignText] === emptySign) { + this.$message.error('签字未成功请重新签字') + } + this.destroyPlugin() + } else { + // debugPrint("saveSignToBase64 error,description:" + args[0]); + } + }) + } + } + } +} + diff --git a/src/page-subspecialty/views/modules/formList/DrugInjection.vue b/src/page-subspecialty/views/modules/formList/DrugInjection.vue index 3f72dc5..3b9c8fb 100644 --- a/src/page-subspecialty/views/modules/formList/DrugInjection.vue +++ b/src/page-subspecialty/views/modules/formList/DrugInjection.vue @@ -88,12 +88,12 @@
患者签名: -
- +
+ - +
@@ -113,12 +113,12 @@
患者授权亲属签名:
-
- +
+ - +
与患者关系 @@ -161,9 +161,11 @@