cnhis-design-vue 3.1.47-beta.23 → 3.1.47-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +6 -0
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/constants/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/constants/index.js +1 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
- package/es/components/card-reader-sdk/src/utils/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/utils/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -4,6 +4,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
6
|
}, {
|
|
7
|
+
props: {
|
|
8
|
+
show: boolean;
|
|
9
|
+
};
|
|
10
|
+
inputRef: import("vue").Ref<{
|
|
11
|
+
focus: () => void;
|
|
12
|
+
} | undefined>;
|
|
7
13
|
valueRef: import("vue").Ref<string>;
|
|
8
14
|
emit: (event: "close" | "update:show" | "confirm", ...args: any[]) => void;
|
|
9
15
|
onClose: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,watch as o,nextTick as t,ref as a,openBlock as s,createBlock as l,unref as i,withCtx as n,createVNode as u}from"vue";import{NModal as r,NInput as c}from"naive-ui";var p=e({__name:"readCardDialog",props:{show:{type:Boolean}},emits:["update:show","confirm","close"],setup(e,{emit:p}){const v=e;o((()=>v.show),(async e=>{var o;e&&(await t(),null==(o=f.value)||o.focus())}));const f=a(),m=a("");function w(){p("update:show",!1),p("close")}function d(){p("confirm",m.value)}return(o,t)=>(s(),l(i(r),{preset:"dialog",title:"扫码电子健康卡",show:e.show,"close-on-esc":!1,"show-icon":!1,"positive-text":"确认",onClose:w,onPositiveClick:d},{default:n((()=>[u(i(c),{value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),ref_key:"inputRef",ref:f},null,8,["value"])])),_:1},8,["show"]))}});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=Object.freeze({sk:100210,ghdj:100401,ghqx:100403,mzjs:100407,beforemzjs:100406,mztf:100408,zyjs:100613,qxzyjs:100614,zydj:100601,qxzydj:100603,zydjzzf:100605,mzghconfirm:100415,ghdjcg:100411,ghdjsb:100412,mzjscg:100409,mzjssb:100410,mztfcg:100413,mztfsb:100414,newdhyk:110021,newdsfz:110041,fastReport:1e5,pos:1e5,yjjrefund:100622,ybxxcx:100212,ybdz:100209}),r=Object.freeze({msgindex:"",checkoutinfo:"",parmsJson:{transtime:"",transtype:"YB0000",interfaceid:"0",serialnumber:"",operatorcode:"10086",operatorname:"赵",transcmd:"",transdata:{iar1:{acf01:"0",iar01:"",vaa01:"",vaa07:"",iaa01:"",iab02:"",iak04:"",iak05:"",iak06:"",iar10:"",iar11:"",iar12:"",iar13:"",iar14:"",iar15:"",iar16:"",iar17:"",iar18:"",iar19:"",iar20:"",iar21:"",iar22:"",iai03:"",iar24:"",iar25:"",iar26:"",iar27:"",iar28:"",iar29:"",iar30:"",iar31:"",iar32:"",iar33:"",iar34:"",iar35:"",iac02:"",iac03:"",iad03:"",iad04:"",iar40:"",iar41:"",iak22:"0",iar43:"",iar44:"",iar45:"",cli_iai03:"",iar46:"",iar47:"",iar48:"",iar49:"",iar50:"",iar51:"",iar52:"",iar53:"",iar54:"",iar55:"",iar56:"",iar57:"",iar58:"",iar59:"",iar60:"",iar61:"",iar62:"",iar63:"",iar64:"",iar65:"",iar66:"",iar67:"",iar68:"",iar69:"",iar70:"",iar71:"",iar72:"",iar73:"",iar74:"",iar75:""},personinfo:{location:0,ptname:"",sex:"",birthday:"",age:"",idnumber:"",folk:"",address:"",pttype:"",ownpay:"0"}},transsystem:"12",transchannel:"100",verifycode:""},error:!0,catch:!0,loading:!1}),i=Object.freeze({type:"sk",location:null,vaa01:"",vaa07:"",iaa01:null,iar1Json:{},personinfo:{},parmsKey:"VAC01",money:"",interfaceid:"0",operatorname:"",operatorcode:"",newhoinsurance:"",message:"",transdata:{},transtype:"SYSTEM",transchannel:"100",transsystem:"12",loginCode:"7777",needLogin:!1,returncodes:["0","1"]}),e="http://127.0.0.1:8031/HOInterfaceSvr";var n=(a=>(a.ID_CARD="newdsfz",a.HOSPITAL_CARD="sk",a.HEALTH_CARD="djkk",a.VISIT_CARD="
|
|
1
|
+
const a=Object.freeze({sk:100210,ghdj:100401,ghqx:100403,mzjs:100407,beforemzjs:100406,mztf:100408,zyjs:100613,qxzyjs:100614,zydj:100601,qxzydj:100603,zydjzzf:100605,mzghconfirm:100415,ghdjcg:100411,ghdjsb:100412,mzjscg:100409,mzjssb:100410,mztfcg:100413,mztfsb:100414,newdhyk:110021,newdsfz:110041,fastReport:1e5,pos:1e5,yjjrefund:100622,ybxxcx:100212,ybdz:100209}),r=Object.freeze({msgindex:"",checkoutinfo:"",parmsJson:{transtime:"",transtype:"YB0000",interfaceid:"0",serialnumber:"",operatorcode:"10086",operatorname:"赵",transcmd:"",transdata:{iar1:{acf01:"0",iar01:"",vaa01:"",vaa07:"",iaa01:"",iab02:"",iak04:"",iak05:"",iak06:"",iar10:"",iar11:"",iar12:"",iar13:"",iar14:"",iar15:"",iar16:"",iar17:"",iar18:"",iar19:"",iar20:"",iar21:"",iar22:"",iai03:"",iar24:"",iar25:"",iar26:"",iar27:"",iar28:"",iar29:"",iar30:"",iar31:"",iar32:"",iar33:"",iar34:"",iar35:"",iac02:"",iac03:"",iad03:"",iad04:"",iar40:"",iar41:"",iak22:"0",iar43:"",iar44:"",iar45:"",cli_iai03:"",iar46:"",iar47:"",iar48:"",iar49:"",iar50:"",iar51:"",iar52:"",iar53:"",iar54:"",iar55:"",iar56:"",iar57:"",iar58:"",iar59:"",iar60:"",iar61:"",iar62:"",iar63:"",iar64:"",iar65:"",iar66:"",iar67:"",iar68:"",iar69:"",iar70:"",iar71:"",iar72:"",iar73:"",iar74:"",iar75:""},personinfo:{location:0,ptname:"",sex:"",birthday:"",age:"",idnumber:"",folk:"",address:"",pttype:"",ownpay:"0"}},transsystem:"12",transchannel:"100",verifycode:""},error:!0,catch:!0,loading:!1}),i=Object.freeze({type:"sk",location:null,vaa01:"",vaa07:"",iaa01:null,iar1Json:{},personinfo:{},parmsKey:"VAC01",money:"",interfaceid:"0",operatorname:"",operatorcode:"",newhoinsurance:"",message:"",transdata:{},transtype:"SYSTEM",transchannel:"100",transsystem:"12",loginCode:"7777",needLogin:!1,returncodes:["0","1"]}),e="http://127.0.0.1:8031/HOInterfaceSvr";var n=(a=>(a.ID_CARD="newdsfz",a.HOSPITAL_CARD="sk",a.HEALTH_CARD="djkk",a.VISIT_CARD="newdhyk",a))(n||{});export{n as CARD_TYPE,i as CONFIG_MAP,r as HIS_INSURANCE_PARAMS,e as INSURANCE_URL,a as transcmdMapping};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsonParse as s}from"../../../shared/utils/index.js";import{isString as e}from"lodash-es";import{insuranceLog as t,getDataMessageByData as a,getErrorMessageByType as n,getTranstime as r,getSerialNumber as i}from"./utils/index.js";import{INSURANCE_URL as o,CONFIG_MAP as c,transcmdMapping as d,HIS_INSURANCE_PARAMS as m}from"./constants/index.js";import h from"axios";var l;class p{constructor(s){var e,t;this.webview=null==(l=window.chrome)?void 0:l.webview,this.configMap=null,this.initParamsMap=new Map([[["newdhyk","newdsfz"],s=>this.getDhykParams(s)],[["sk"],s=>this.getSkParams(s)]]),this.currentMessageHandler=null,this.messageHandlerQueue=[],(null==s?void 0:s.selfWindow)&&(this.webview=null==(t=null==(e=null==s?void 0:s.selfWindow)?void 0:e.chrome)?void 0:t.webview),this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler))}messageHandler(a){const n=e(a.data)?s(a.data)||{}:a.data;if(!
|
|
1
|
+
import{jsonParse as s}from"../../../shared/utils/index.js";import{isString as e}from"lodash-es";import{insuranceLog as t,getDataMessageByData as a,getErrorMessageByType as n,getTranstime as r,getSerialNumber as i}from"./utils/index.js";import{INSURANCE_URL as o,CONFIG_MAP as c,transcmdMapping as d,HIS_INSURANCE_PARAMS as m}from"./constants/index.js";import h from"axios";var l;class p{constructor(s){var e,t;this.webview=null==(l=window.chrome)?void 0:l.webview,this.configMap=null,this.initParamsMap=new Map([[["newdhyk","newdsfz"],s=>this.getDhykParams(s)],[["sk"],s=>this.getSkParams(s)]]),this.currentMessageHandler=null,this.messageHandlerQueue=[],(null==s?void 0:s.selfWindow)&&(this.webview=null==(t=null==(e=null==s?void 0:s.selfWindow)?void 0:e.chrome)?void 0:t.webview),this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler))}messageHandler(a){const n=this.messageHandlerQueue[0];if(!n)return Promise.reject(t("当前回执",a,"没有可用的handler"));const{resolve:r,reject:i,transcmd:o}=n,c=e(a.data)?s(a.data)||{}:a.data;if(!c||!["hisyb","login"].includes(c.exec))return i(t("当前回执不是hisyb消息"));const{transcmd:d}=c.res||{};if(o&&d&&`${o}`!=`${d}`)return i(t("交易命令不相等,当前transcmd",o,"返回transcmd",d));this.messageHandlerQueue.shift(),r(c)}async postMessage(e){return this.webview&&e?new Promise(((t,a)=>{var n;this.messageHandlerQueue.push({resolve:t,reject:a,transcmd:null==(n=s(e.data))?void 0:n.transcmd}),this.webview.postMessage(e)})).then((s=>s&&s.result&&s.exec===e.exec?s:Promise.reject())):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=null)}login(){const{loginCode:s=""}=this.configMap||{};return this.postMessage({exec:"login",data:s})}async HOInterfaceSvr(s){const{type:e,needLogin:t}=this.configMap||{};try{if(this.webview){t&&await this.login();return(await this.postMessage({exec:"hisyb",data:JSON.stringify(s.parmsJson)})).res}const e=await h.post(o,JSON.stringify(s.parmsJson));return a(e.data)}catch(s){return Promise.reject(n(e))}}initConfig(s){this.configMap=Object.assign({},c,s)}initParams(){const{type:s,transtype:e,interfaceid:t}=this.configMap||{},a=this.getHisInsuranceParams();Object.assign(a.parmsJson,{transcmd:s&&d[s]||s,interfaceid:t,transtype:e});const n=[...this.initParamsMap].find((([e])=>e.includes(s)));if(n){const[,s]=n;s(a)}else Object.assign(a.parmsJson,{transdata:this.configMap&&this.configMap.transdata});return a}getInsuranceInfoPromise(s){return this.initConfig(s),this.HOInterfaceSvr(this.initParams())}getInsuranceInfo(s,e,t){this.getInsuranceInfoPromise(s).then((s=>e&&e(s)),(s=>t&&t(s)))}getDhykParams(s){const{type:e}=this.configMap||{};s.parmsJson={...s.parmsJson,transtype:"IDCARD",interfaceid:"0",transdata:{...s.parmsJson.transdata,readtype:"newdhyk"===e?"1":"2"}}}getSkParams(s){const{iar1Json:e,personinfo:t}=this.configMap||{};s.parmsJson={...s.parmsJson,transdata:{...s.parmsJson.transdata,iar1:{...s.parmsJson.transdata.iar1,...e},personinfo:{...s.parmsJson.transdata.personinfo,...t}}}}getHisInsuranceParams(){const{operatorcode:s,operatorname:e,location:t,transchannel:a,transsystem:n}=this.configMap||{};return{...m,parmsJson:{...m.parmsJson,transtime:r(),serialnumber:i(),operatorcode:s,operatorname:e,location:t,transchannel:a,transsystem:n}}}}export{p as default};
|
|
@@ -4,6 +4,6 @@ export declare function getSerialNumber(): string;
|
|
|
4
4
|
export declare function getTranstime(): string;
|
|
5
5
|
export declare function pad2(n: number): string | number;
|
|
6
6
|
export declare function generateTimeRequestNumber(): string;
|
|
7
|
-
export declare function insuranceLog(...messages: any[]):
|
|
7
|
+
export declare function insuranceLog(...messages: any[]): any;
|
|
8
8
|
export declare function getErrorMessageByType(type?: string): string;
|
|
9
9
|
export declare function getDataMessageByData(_data: string | AnyObject, configMap?: typeof CONFIG_MAP): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isString as e}from"lodash-es";function n(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function t(){return o()+parseInt(1e3*Math.random()+"")}function r(e){return e<10?"0"+e:e}function o(){const e=new Date;return e.getFullYear().toString()+r(e.getMonth()+1)+r(e.getDate())+r(e.getHours())+r(e.getMinutes())+r(e.getSeconds())}function a(...e){return console.log("[INSURANCE-SDK]: ",...e)}const d={fastReport:"打印服务异常",newdsfz:"身份证读卡接口服务异常",newdhyk:"会员读卡接口服务异常",pos:"pos接口服务异常"};function u(e){return e&&d[e]||"请检查医保服务是否正常"}function s(n,t){var r;e(n)&&(n=JSON.parse(n));const o=n,{type:a="",returncodes:d=[]}=t||{};if(d.includes(null!=(r=o.returncode)?r:"")){if("newdhyk"===a)return o.returndata.cardinfo&&o.returndata.cardinfo.cardno?o.returndata.cardinfo:Promise.reject("未获取到卡号");if("newdsfz"===a){let n=null,t=null;return e(o.returndata)?(n=JSON.parse(o.returndata),t=n.cardinfo):t=o.returndata.cardinfo,t={...t,Sex:t.sex,Sex_Code:t.sex_code,Name:t.name,Age:t.age,Age_Code:t.age_code,Age_Name:t.age_name,BirthDate:t.birthdate,Nation_Name:t.nation_name,Nation_Code:t.nation_code,Address:t.address,CardNo:t.cardno,HasPhoto:t.hasphoto},t}return o}return Promise.reject(a+"--"+o.returnmsg)}export{o as generateTimeRequestNumber,s as getDataMessageByData,u as getErrorMessageByType,n as getSerialNumber,t as getTranstime,a as insuranceLog,r as pad2};
|
|
1
|
+
import{isString as e}from"lodash-es";function n(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function t(){return o()+parseInt(1e3*Math.random()+"")}function r(e){return e<10?"0"+e:e}function o(){const e=new Date;return e.getFullYear().toString()+r(e.getMonth()+1)+r(e.getDate())+r(e.getHours())+r(e.getMinutes())+r(e.getSeconds())}function a(...e){return console.log("[INSURANCE-SDK]: ",...e),e.reduce(((e,n)=>e+n))}const d={fastReport:"打印服务异常",newdsfz:"身份证读卡接口服务异常",newdhyk:"会员读卡接口服务异常",pos:"pos接口服务异常"};function u(e){return e&&d[e]||"请检查医保服务是否正常"}function s(n,t){var r;e(n)&&(n=JSON.parse(n));const o=n,{type:a="",returncodes:d=[]}=t||{};if(d.includes(null!=(r=o.returncode)?r:"")){if("newdhyk"===a)return o.returndata.cardinfo&&o.returndata.cardinfo.cardno?o.returndata.cardinfo:Promise.reject("未获取到卡号");if("newdsfz"===a){let n=null,t=null;return e(o.returndata)?(n=JSON.parse(o.returndata),t=n.cardinfo):t=o.returndata.cardinfo,t={...t,Sex:t.sex,Sex_Code:t.sex_code,Name:t.name,Age:t.age,Age_Code:t.age_code,Age_Name:t.age_name,BirthDate:t.birthdate,Nation_Name:t.nation_name,Nation_Code:t.nation_code,Address:t.address,CardNo:t.cardno,HasPhoto:t.hasphoto},t}return o}return Promise.reject(a+"--"+o.returnmsg)}export{o as generateTimeRequestNumber,s as getDataMessageByData,u as getErrorMessageByType,n as getSerialNumber,t as getTranstime,a as insuranceLog,r as pad2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.47-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.47-beta.24",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.47-beta.24",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.47-beta.
|
|
3
|
+
"version": "3.1.47-beta.24",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "0ec5184322b7267b36e41d330175d9b0fdf9feb7"
|
|
67
67
|
}
|