cnhis-design-vue 3.2.5-beta.15 → 3.2.5-beta.16
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/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as a}from"lodash-es";import{ensureUID2IdCard as t}from"./utils/ensureUID2IdCard.js";import{TRANS_CMD as e,defaultInsuranceParams as s}from"./constants/index.js";import r from"./insuranceSDK.js";import{ReadHealthCard as n}from"./utils/readHealthCard.js";let i=null;const c=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new n,i)return i;i=this,this.insurance=new r}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new c(a)}static destroy(){null==i||i.destroy(),i=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={},s){await this.checkLoading();const r=this.createParams(e.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}}),n=await this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r));return(null==n?void 0:n.cardinfo)&&s&&await t(n.cardinfo,s),n}async readMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async writeMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async readInsuranceCard(a={}){var t,r;await this.checkLoading();const n=this.createParams(e.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",...a,transdata:{...a.transdata,iar1:{...s.iar1,...null==(t=a.transdata)?void 0:t.iar1},personinfo:{...s.personinfo,...null==(r=a.transdata)?void 0:r.personinfo}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(n))}async getCardType(){await this.checkLoading();const a=this.createParams(e.CARD_TYPE_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(a))}async generalRequest(a={}){await this.checkLoading();const t=this.createParams(e.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}};let o=c;o.version=1,o.TRANS_CMD=e;export{o as default};
|
|
1
|
+
import{isFunction as a}from"lodash-es";import{ensureUID2IdCard as t}from"./utils/ensureUID2IdCard.js";import{TRANS_CMD as e,defaultInsuranceParams as s}from"./constants/index.js";import r from"./insuranceSDK.js";import{ReadHealthCard as n}from"./utils/readHealthCard.js";let i=null;const c=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new n,i)return i;i=this,this.insurance=new r({selfWindow:a.selfWindow})}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new c(a)}static destroy(){null==i||i.destroy(),i=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={},s){await this.checkLoading();const r=this.createParams(e.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}}),n=await this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r));return(null==n?void 0:n.cardinfo)&&s&&await t(n.cardinfo,s),n}async readMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async writeMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async readInsuranceCard(a={}){var t,r;await this.checkLoading();const n=this.createParams(e.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",...a,transdata:{...a.transdata,iar1:{...s.iar1,...null==(t=a.transdata)?void 0:t.iar1},personinfo:{...s.personinfo,...null==(r=a.transdata)?void 0:r.personinfo}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(n))}async getCardType(){await this.checkLoading();const a=this.createParams(e.CARD_TYPE_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(a))}async generalRequest(a={}){await this.checkLoading();const t=this.createParams(e.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}};let o=c;o.version=1,o.TRANS_CMD=e;export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as l,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as
|
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as l,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as v,assignValueBindKey as p}from"../../utils/schema.js";import{connect as d,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=d(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:v}){const p=o(),d=t(!1),{field:c,fieldKey:h}=m(),f=i((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),y=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),w=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),j=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},k=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},C=i({get:()=>e.value===y.value,set(o){if(!f.value||"SWITCH"!==e.showMode||o)return v("update:value",o?y.value:w.value);d.value=!0}});function D(){v("update:value",w.value)}return()=>"SWITCH"===e.showMode?[l(n,r({value:C.value,"onUpdate:value":e=>C.value=e},p),{checked:j,unchecked:k}),f.value?l(a,{show:d.value,"onUpdate:show":e=>d.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:f.value,onPositiveClick:D},null):null]:l(s,{checked:C.value,"onUpdate:checked":e=>C.value=e},{default:j})}}),c(v,p));export{h as SWITCH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as u,onMounted as d}from"vue";import{traverse as o}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{last as n,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as
|
|
1
|
+
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as u,onMounted as d}from"vue";import{traverse as o}from"../../../../shared/utils/index.js";import{promiseTimeout as a}from"@vueuse/shared";import{last as n,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as c,InjectionIhoTableXeInstance as h}from"../constants/index.js";import{mergeVxeStyle as v,useUUIDMap as g,mergeVxeClass as m}from"../utils/index.js";import{defineTablePlugin as x}from"../hooks/useTablePlugin.js";function b(){const b="stickyFixedPlugin";return x({name:b,apply(x){x.configHooks.config.tap(b,((e,{$table:l})=>{var t;if(null==(t=e.stickyFixedConfig)?void 0:t.enable){const t=e=>{if(!l.value)return{left:0,right:0};return{left:l.value.getColumns().slice(0,e).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0),right:l.value.getColumns().slice(e+1).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0)}};e.cellStyle=v((({_columnIndex:e})=>({"--iho-table-fixed-left":t(e).left,"--iho-table-fixed-right":t(e).right})),e.cellStyle),e.headerCellStyle=v((({_columnIndex:e})=>({"--iho-table-fixed-left":t(e).left,"--iho-table-fixed-right":t(e).right})),e.headerCellStyle)}return e}));const{getItemFromUUID:p,removeItemFromUUID:y}=g((()=>({left:[],noFixed:[],right:[]}))),{getItemFromUUID:B,removeItemFromUUID:H}=g((()=>({tableBody:null,tableHeader:null,leftEle:null,leftBorderEle:null,rightEle:null,rightBorderEle:null})),!1);function k(e){const l=B(e),{leftEle:t,rightEle:i,tableBody:r}=l;r&&(t&&(r.scrollLeft>0?t.classList.add("scrolling--middle"):null==t||t.classList.remove("scrolling--middle")),i&&(Math.ceil(r.scrollLeft)<r.scrollWidth-r.clientWidth?i.classList.add("scrolling--middle"):null==i||i.classList.remove("scrolling--middle")))}function E(e){var l,t;const i=B(e);if(!i.tableBody||!i.tableHeader)return;const{leftEle:r,rightBorderEle:u,rightEle:d,leftBorderEle:o,tableHeader:a}=i;if(r){const e=n(null==(l=i.tableHeader)?void 0:l.querySelectorAll("th.iho-table--fixed-left"));e&&(r.style.width=e.offsetLeft+e.clientWidth-e.scrollLeft+"px",o.style.width=r.style.width)}if(d){const e=s(null==(t=i.tableHeader)?void 0:t.querySelectorAll("th.iho-table--fixed-right"));if(e){const l=i.tableBody.scrollHeight>i.tableBody.clientHeight;d.style.width=i.tableBody.clientWidth-e.offsetLeft+e.scrollLeft-(l?0:10)+"px",u.style.width=d.style.width}}}x.fieldHooks.fieldList.tap({name:b,stage:f},((e,l)=>{var t;if(!(null==(t=l.stickyFixedConfig)?void 0:t.enable)||!l.uuid)return e;const i=p(l.uuid);return i.left=[],i.noFixed=[],i.right=[],o(e,(e=>{e.fixed?(i[e.fixed].push(e),e.className=m(e.className,`iho-table--fixed-${e.fixed}`),e.headerClassName=m(e.headerClassName,`iho-table--fixed-${e.fixed}`)):i.noFixed.push(e),e.fixed=void 0})),[...i.left||[],...i.noFixed||[],...i.right||[]]})),x.setupHooks.setup.tap(b,(l=>{e((()=>{var e;(null==(e=l.value)?void 0:e.uuid)&&(H(l.value.uuid),y(l.value.uuid))}))})),x.dataHooks.dataEnd.tap(b,(async e=>{var l;(null==(l=e.stickyFixedConfig)?void 0:l.enable)&&e.uuid&&(await a(100),E(e.uuid))})),x.eventHooks.onScroll.tap(b,(({isX:e},l)=>{var t;e&&(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&k(l.uuid)})),x.eventHooks.onResizableChange.tap(b,((e,l)=>{var t;(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&k(l.uuid)}));const F=t({setup(){const e=i(c),t=i(h),o=r((()=>{const l=p(e.value.uuid);return!(!l.left||!l.left.length)})),n=r((()=>{const l=p(e.value.uuid);return!(!l.right||!l.right.length)})),s=l=>{B(e.value.uuid).leftEle=l},f=l=>{B(e.value.uuid).leftBorderEle=l},v=l=>{B(e.value.uuid).rightEle=l},g=l=>{B(e.value.uuid).rightBorderEle=l};function m(){if(!t.value||!e.value.uuid)return;const{refTableBody:l,refTableHeader:i}=t.value.getRefMaps();if(!l.value)return;const r=B(e.value.uuid);r.tableBody=l.value.$el,r.tableHeader=i.value.$el,k(e.value.uuid),E(e.value.uuid)}return u([()=>p(e.value.uuid).left,()=>p(e.value.uuid).right],m),d((async()=>{await a(100),m()})),()=>[o.value?[l("div",{class:"iho-table__fixedLeftWrapper",ref:s},null),l("div",{class:"iho-table__fixedLeftTopBorder",ref:f},null)]:null,n.value?[l("div",{class:"iho-table__fixedRightWrapper",ref:v},null),l("div",{class:"iho-table__fixedRightTopBorder",ref:g},null)]:null]}}),C=t({setup(){const e=i(c);return()=>{var t,i;return(null==(i=null==(t=e.value)?void 0:t.stickyFixedConfig)?void 0:i.enable)?l(F,null,null):null}}});x.domInsertHooks.header.tap(b,(e=>(e.push(l(C,null,null)),e)))}})}export{b as stickyFixedPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.5-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.5-beta.16",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.2.5-beta.16",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.2.5-beta.
|
|
3
|
+
"version": "3.2.5-beta.16",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "a485eeb20581c715529f3763e1674c84e120d1a9"
|
|
75
75
|
}
|