cnhis-design-vue 3.2.17-beta.2 → 3.2.17-release.0
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/base-search/style/index.css +1 -1
- package/es/components/card-reader-sdk-cn/index.d.ts +18 -0
- package/es/components/card-reader-sdk-cn/index.js +1 -0
- package/es/components/card-reader-sdk-cn/src/henan/index.d.ts +17 -0
- package/es/components/card-reader-sdk-cn/src/henan/index.js +1 -0
- package/es/components/classification/index.d.ts +9 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +9 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +9 -0
- package/es/components/classification/src/index.vue.d.ts +9 -0
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/index.css +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +7 -7
- package/es/components/select-label/index.d.ts +7 -7
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts +5 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts +7 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.d.ts +5 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -1
- package/es/components/select-label/src/index.vue.d.ts +7 -7
- package/es/components/select-label/src/types/index.d.ts +4 -1
- package/es/components/select-label/style/index.css +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +9 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +8 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +9 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +9 -0
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +2 -7
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +8 -0
- package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +11 -7
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +11 -7
- package/es/components/table-filter/src/types/index.d.ts +3 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
@font-face{font-family:base-search-iconfont;src:url(base-search-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:base-search-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;flex-wrap:nowrap}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px;white-space:nowrap}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.select-dynamic-popover .n-base-select-menu__empty{justify-content:left;padding:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options{background:#fff;box-shadow:0 0 6px rgba(0,0,0,.2);display:flex;flex-direction:column;justify-content:left}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .n-empty{padding:12px 32px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .mixins-options-active{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header .name{align-items:center;display:flex;flex:1;font-weight:700;height:34px;padding:0 12px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content{list-style:none;margin:0;max-height:250px;outline:none;overflow:auto;padding-left:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li{color:rgba(0,0,0,.65);cursor:pointer;display:flex;font-size:14px;line-height:22px;text-overflow:ellipsis;transition:background .3s ease;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li.actived{color:#5585f5}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li:hover{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li .content{flex:1;overflow:hidden;padding:5px 12px;text-overflow:ellipsis;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination{width:100%}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group .n-button{flex:1}.classify-fieldkey-popover{width:200px}.base-search-block .base-container{display:flex;justify-content:space-between;text-align:left}.base-search-block .base-container .bease-left{align-items:flex-start;display:flex;flex:1;justify-content:flex-start}.base-search-block .base-container .bease-left .base-ul{align-items:center;display:flex;flex-wrap:wrap;margin-top:0}.base-search-block .base-container .bease-left .base-ul .baseli{display:flex;margin-bottom:8px;margin-right:8px}.base-search-block .base-container .bease-left .base-ul .baseli .base-row{align-items:center;display:flex}.base-search-block .base-container .bease-left .base-ul .baseli .base-row .title{padding-left:4px;white-space:nowrap}.base-search-block .base-container .bease-left .base-ul .baseli .search-default{height:32px;line-height:32px}
|
1
|
+
@font-face{font-family:base-search-iconfont;src:url(base-search-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:base-search-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;flex-wrap:nowrap}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px;white-space:nowrap}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .edit-f-content .label-f-content .label-img{border:1px solid #e0e0e6;box-sizing:border-box;cursor:pointer;display:block;margin:0 8px 8px 0;max-height:32px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.select-dynamic-popover .n-base-select-menu__empty{justify-content:left;padding:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options{background:#fff;box-shadow:0 0 6px rgba(0,0,0,.2);display:flex;flex-direction:column;justify-content:left}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .n-empty{padding:12px 32px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .mixins-options-active{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-header .name{align-items:center;display:flex;flex:1;font-weight:700;height:34px;padding:0 12px}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content{list-style:none;margin:0;max-height:250px;outline:none;overflow:auto;padding-left:0}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li{color:rgba(0,0,0,.65);cursor:pointer;display:flex;font-size:14px;line-height:22px;text-overflow:ellipsis;transition:background .3s ease;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li.actived{color:#5585f5}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li:hover{background:#f1f1f1}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-content li .content{flex:1;overflow:hidden;padding:5px 12px;text-overflow:ellipsis;white-space:nowrap}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination{width:100%}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group{display:flex}.select-dynamic-popover .n-base-select-menu__empty .select-dynamic-options .dynamic-pagination .n-button-group .n-button{flex:1}.classify-fieldkey-popover{width:200px}.base-search-block .base-container{display:flex;justify-content:space-between;text-align:left}.base-search-block .base-container .bease-left{align-items:flex-start;display:flex;flex:1;justify-content:flex-start}.base-search-block .base-container .bease-left .base-ul{align-items:center;display:flex;flex-wrap:wrap;margin-top:0}.base-search-block .base-container .bease-left .base-ul .baseli{display:flex;margin-bottom:8px;margin-right:8px}.base-search-block .base-container .bease-left .base-ul .baseli .base-row{align-items:center;display:flex}.base-search-block .base-container .bease-left .base-ul .baseli .base-row .title{padding-left:4px;white-space:nowrap}.base-search-block .base-container .bease-left .base-ul .baseli .search-default{height:32px;line-height:32px}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare const CCardReaderCN: Readonly<{
|
2
|
+
readonly henan: Readonly<{
|
3
|
+
readonly duration: 5000;
|
4
|
+
readonly iType: "1";
|
5
|
+
readonly checkEnv: () => boolean;
|
6
|
+
readonly connect: () => Promise<unknown>;
|
7
|
+
readonly disconnect: () => void;
|
8
|
+
readonly sendMessage: (data: import("../../shared/types").AnyObject) => Promise<unknown>;
|
9
|
+
readonly iGetDevUID: () => Promise<unknown>;
|
10
|
+
readonly iReadCardBas: () => Promise<unknown>;
|
11
|
+
readonly iReadCard: () => Promise<unknown>;
|
12
|
+
readonly iVerifyPIN: () => Promise<unknown>;
|
13
|
+
readonly iChangePIN: () => Promise<unknown>;
|
14
|
+
readonly iReloadPIN: () => Promise<unknown>;
|
15
|
+
readonly iUnblockPIN: () => Promise<unknown>;
|
16
|
+
readonly iReadCertInfo: () => Promise<unknown>;
|
17
|
+
}>;
|
18
|
+
}>;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{CardReaderCN_henan as e}from"./src/henan/index.js";const n=Object.freeze({henan:e});export{n as CCardReaderCN};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { AnyObject } from '../../../../shared/types';
|
2
|
+
export declare const CardReaderCN_henan: Readonly<{
|
3
|
+
readonly duration: 5000;
|
4
|
+
readonly iType: "1";
|
5
|
+
readonly checkEnv: () => boolean;
|
6
|
+
readonly connect: () => Promise<unknown>;
|
7
|
+
readonly disconnect: () => void;
|
8
|
+
readonly sendMessage: (data: AnyObject) => Promise<unknown>;
|
9
|
+
readonly iGetDevUID: () => Promise<unknown>;
|
10
|
+
readonly iReadCardBas: () => Promise<unknown>;
|
11
|
+
readonly iReadCard: () => Promise<unknown>;
|
12
|
+
readonly iVerifyPIN: () => Promise<unknown>;
|
13
|
+
readonly iChangePIN: () => Promise<unknown>;
|
14
|
+
readonly iReloadPIN: () => Promise<unknown>;
|
15
|
+
readonly iUnblockPIN: () => Promise<unknown>;
|
16
|
+
readonly iReadCertInfo: () => Promise<unknown>;
|
17
|
+
}>;
|
@@ -0,0 +1 @@
|
|
1
|
+
let e=null,t=null;const i=Object.freeze({duration:5e3,iType:"1",checkEnv:()=>window.navigator.userAgent.toLowerCase().includes("linux"),async connect(){if(e){if(e.readyState===WebSocket.OPEN)return Promise.resolve();if(e.readyState===WebSocket.CONNECTING)return new Promise(((t,i)=>{e.addEventListener("open",t),e.addEventListener("close",i)}));if(e.readyState===WebSocket.CLOSING)return Promise.reject("websocket正在关闭中");e.readyState===WebSocket.CLOSED&&(e=null)}try{e=await new Promise(((e,i)=>{const s=new WebSocket("ws://localhost:18880");s.onopen=()=>{e(s)},s.onclose=()=>{i()},s.onmessage=e=>{var i;t&&(null==t||t(JSON.parse(null!=(i=e.data)?i:"")),t=null)},s.onerror=()=>{i("websocket服务器连接失败")}}))}catch(e){return Promise.reject(e)}},disconnect(){e&&(e.close(),e=null)},async sendMessage(i){return await this.connect(),new Promise(((s,n)=>{var o;return e?t?n("请等待上一个请求完成"):(t=s,setTimeout((()=>{n("请求超时"),t=null}),null!=(o=this.duration)?o:3e3),void e.send(JSON.stringify(i))):n("websocket连接失败")}))},iGetDevUID(){return this.sendMessage({bizcode:"1001",body:""})},iReadCardBas(){return this.sendMessage({bizcode:"1002",body:{iType:this.iType,pDevInfo:""}})},iReadCard(){return this.sendMessage({bizcode:"1003",body:{iType:this.iType,iAuthType:this.iType,pCardInfo:"",pFileAddr:""}})},iVerifyPIN(){return this.sendMessage({bizcode:"1005",body:{iType:this.iType}})},iChangePIN(){return this.sendMessage({bizcode:"1006",body:{iType:this.iType}})},iReloadPIN(){return this.sendMessage({bizcode:"1007",body:{iType:this.iType,pCardInfo:""}})},iUnblockPIN(){return this.sendMessage({bizcode:"1008",body:{iType:this.iType,pCardInfo:""}})},iReadCertInfo(){return this.sendMessage({bizcode:"1201",body:{iType:this.iType,pPhotoPath:""}})}});export{i as CardReaderCN_henan};
|
@@ -1726,6 +1726,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
1726
1726
|
valueCp: import("vue").WritableComputedRef<string[]>;
|
1727
1727
|
optionList: import("vue").ComputedRef<import("naive-ui").SelectOption[]>;
|
1728
1728
|
initTagList: () => Promise<void>;
|
1729
|
+
renderOption: ({ node, option }: {
|
1730
|
+
node: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1731
|
+
[key: string]: any;
|
1732
|
+
}>;
|
1733
|
+
option: import("naive-ui").SelectOption;
|
1734
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1735
|
+
[key: string]: any;
|
1736
|
+
}>;
|
1737
|
+
renderLabel: (option: any) => any;
|
1729
1738
|
NSelect: any;
|
1730
1739
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1731
1740
|
paramCfg: {
|
@@ -1189,6 +1189,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1189
1189
|
valueCp: import("vue").WritableComputedRef<string[]>;
|
1190
1190
|
optionList: import("vue").ComputedRef<import("naive-ui").SelectOption[]>;
|
1191
1191
|
initTagList: () => Promise<void>;
|
1192
|
+
renderOption: ({ node, option }: {
|
1193
|
+
node: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1194
|
+
[key: string]: any;
|
1195
|
+
}>;
|
1196
|
+
option: import("naive-ui").SelectOption;
|
1197
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1198
|
+
[key: string]: any;
|
1199
|
+
}>;
|
1200
|
+
renderLabel: (option: any) => any;
|
1192
1201
|
NSelect: any;
|
1193
1202
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1194
1203
|
paramCfg: {
|
@@ -1483,6 +1483,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1483
1483
|
valueCp: import("vue").WritableComputedRef<string[]>;
|
1484
1484
|
optionList: import("vue").ComputedRef<import("naive-ui").SelectOption[]>;
|
1485
1485
|
initTagList: () => Promise<void>;
|
1486
|
+
renderOption: ({ node, option }: {
|
1487
|
+
node: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1488
|
+
[key: string]: any;
|
1489
|
+
}>;
|
1490
|
+
option: import("naive-ui").SelectOption;
|
1491
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1492
|
+
[key: string]: any;
|
1493
|
+
}>;
|
1494
|
+
renderLabel: (option: any) => any;
|
1486
1495
|
NSelect: any;
|
1487
1496
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1488
1497
|
paramCfg: {
|
@@ -1728,6 +1728,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1728
1728
|
valueCp: import("vue").WritableComputedRef<string[]>;
|
1729
1729
|
optionList: import("vue").ComputedRef<import("naive-ui").SelectOption[]>;
|
1730
1730
|
initTagList: () => Promise<void>;
|
1731
|
+
renderOption: ({ node, option }: {
|
1732
|
+
node: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1733
|
+
[key: string]: any;
|
1734
|
+
}>;
|
1735
|
+
option: import("naive-ui").SelectOption;
|
1736
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
1737
|
+
[key: string]: any;
|
1738
|
+
}>;
|
1739
|
+
renderLabel: (option: any) => any;
|
1731
1740
|
NSelect: any;
|
1732
1741
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1733
1742
|
paramCfg: {
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as i,drawPoint as n,defaultStyle as o,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import"../useShadow.js";import{getScaleInfo as d,drawScaleNumber as h,drawScaleLine as f}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as b,isString as w,last as j,range as k}from"lodash-es";import"../../constants/index.js";import"@vueuse/shared";import{format as x}from"date-fns";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";function S(S,C,A,E,O){const{computedX:P,computedY:X,getXValue:L,getYValue:M}=u(C),{getEqualXTypes:Y,handleAddPrevent:T,isGridLimit:H,setPrevAndNextPoint:I,getPointEventProps:D}=p(S,A,C),{xAxis:B,grid:G,originX:N,originY:W,xCellWidth:V,endY:F,startTime:R,leftAddAreaWidth:$,leftScales:q,rightScales:z,yCellHeight:J,endX:K,scaleValues:Q,canvasWidth:U,borderStyle:Z,rightAddAreaWidth:_,event:ee,originYCervix:te,other:ie,canvasHeight:ne,scalebarBorder:oe,padding:re}=C,le=b(Q),se=new Set;function ae(){le.filter((({showData:e=!0})=>e)).forEach(((e,s)=>{var a;const c=[],u=[],d=[],{pointAttr:h={},lineAttr:f={},title:p="",key:g,type:v="circle",childbirthStyle:m={},surgicalDeliveryStyle:y={},dystociaStyle:b={}}=e;function j(r,l,s,a){if(l[s]){const{type:c="circle",style:u={},arrowStyle:h={}}=e[s+"Style"],p=P(l[s]),g=t([...r,p,r[1]],{...f,strokeDashArray:[4,2],...o}),v="dystocia"===s&&r[1]-W>=J?r[1]-J:r[1],m=n(c,{left:p,top:v,...u,...o}),y=v+m.height/2,b="dystocia"===s?i([p,y+J,y],f,"up"):null;g&&(d.push(g),a[s+"Line"]={obj:g,type:"line",left:p-r[0]}),m&&(d.push(m),a[s]={obj:m,left:p-r[0]}),b&&(d.push(b),a[s+"Arrow"]={obj:b,left:p-r[0],moveHide:!0})}}null==(a=e.data)||a.forEach(((a,y)=>{!function(a,y,b){let k,C;const O=e.data[b+1],P=fe(O,e);if(a&&P&&!y.breakpoint)C=t([...a,...P],{...f});else if(a&&!P&&!y.breakpoint){const i=fe(O,e);C=i?t([...a,...i],{...f}):null}const X={};if(["fetalPresentation","cervix"].includes(g)){let e,t;if(y.childbirth){const{type:s="arrow",style:c={},textStyle:u={}}=m;if("arrow"===s){const t=a[1]+J;e=i([a[0],a[1],t],c)}else e=n(s,{left:a[0],top:a[1],...c,...o,hoverCursor:"default"});t=w(y.childbirth)?r([a[0]+V/2,a[1]+J/2],{value:String(y.childbirth),...l,originX:"left",originY:"center",...u}):null,e&&(d.push(e),Object.assign(X,{childbirthIcon:{obj:e,type:s}})),t&&(d.push(t),Object.assign(X,{childbirthText:{obj:t,left:V/2,top:J/2}}))}}"fetalPresentation"===g&&(j(a,y,"surgicalDelivery",X),j(a,y,"dystocia",X));const Y=u[b-1],T={origin:{data:y,title:p,key:g||"",dataIndex:s,index:b},leftLine:Y,rightLine:C,otherObj:X,...h,...D()};a&&(Y||(T.leftLine=null),k=n(v,{left:a[0],top:a[1],...T}));C&&u.push(C),k&&(!function(e){ee.hovered&&(e.on("mouseover",(()=>{he(e,"hover")})),e.on("mouseout",(()=>{E.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{de(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,top:n=0,left:o=0,type:r="",moveHide:l}=t||{};i&&("line"===r?i.setCoords().set({x1:e.left,y1:e.top,x2:e.left+o,y2:e.top}):i.setCoords().set({left:e.left+o,top:e.top+n}),l&&(S.value.remove(i),delete e.otherObj.obj))}))}(e),ee.hovered&&he(e)})),e.on("mouseup",(t=>{if(E.show=!1,1===t.button){const{key:t}=e.origin,i={...e.origin,data:{...e.origin.data,time:L(e.left),value:M(t,e.top)}};["surgicalDelivery","dystocia"].some((t=>{var n;(null==(n=e.otherObj[t])?void 0:n.obj)&&(i.data[t]=x(new Date(L(e.left+e.otherObj[t].left)),"yyyy-MM-dd HH:mm"))})),S.value.discardActiveObject(),A("change",i),ce(i,"change")}}))}(k),c.push(k),se.add(k))}(fe(a,e),a,y)})),I(c),S.value.add(...u,...d,...c),c.forEach((e=>{null==e||e.bringToFront();const{childbirthIcon:t}=e.otherObj||{};(null==t?void 0:t.obj)&&"arrow"!==(null==t?void 0:t.type)&&t.obj.bringToFront()}))}))}function ce(e,t="add"){const{dataIndex:i,data:n,index:o,key:r}=e,l=le.find((e=>e.key===r));switch(t){case"remove":l.data.splice(o,1);break;case"change":l.data[o]=n;break;default:{const e=g(n.time,l.data);l.data.splice(e,0,n);break}}ue()}function ue(){var e;se.size&&(null==(e=S.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...se]))),se.clear(),ae()}function de(e){const t=e.prevPoint?e.prevPoint.left:N,i=e.nextPoint?e.nextPoint.left:K;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<te&&e.set("top",te),e.top<W&&e.set("top",W),e.top>F&&e.set("top",F),e.left<t&&e.set("left",t),e.left>i&&e.set("left",i)}function he(e,t="moving"){const{title:i,key:n,data:o}=e.origin;E.point={x:e.left,y:e.top},E.list=[`${i} ${"hover"===t?o.value:M(n,e.top)}`,`时间 ${L(e.left).slice(-5)}`],E.show=!0}function fe(e,t){if(v(e)&&function(e){const t=R+864e5,i=m(e);return i>=R&&i<=t}(e.time)){const i=P(e.time),n=X(t.key,t.range,e.value);return[i,n<W?W:n>F?F:n]}}function pe(e,t){return e+1>t[1]?t[0]:e+1}return c(S,C),function(){const t=oe?{width:U-$-_-1,left:$}:{width:K-N-(z.length?0:1),left:N},i=new e.Rect({...Z,height:F-re[0]-1,top:re[0],fill:"transparent",...t});S.value.add(i)}(),function(){function t(t,i="left"){let n="left"===i?$:K;t.forEach(((t,i)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:v,position:m="center",spaceGridNumber:b=1,showNumber:w=!0,showMaxMinNumber:j=!0,showName:k=!0}=t,x=[],C=[],A=n+u/2,E=y(s,c),O=E.length,{lineXMain:P,lineXSub:X,textLeft:L}=d(m,n,u);E.forEach(((e,i)=>{const n=F-i*J*b,o=0===i?F-8:i!==E.length-1||!re[0]||te&&"FHR"!==v?n:W+8;!w||(0===i||i===O-1)&&!j||x.push(h(String(e),t,L,o)),C.push(...f(t,i,P,X,n,J,W,O,1))}));const M=[],Y=oe?new e.Rect({...a,strokeWidth:.5,width:u,height:F-re[0],left:A,top:re[0]+(F-re[0])/2}):null;if(Y&&M.push(Y),k){const e=r([A,W-re[0]>0?W-J/2:J/2],{value:String(p),...l,...g});e&&M.push(e)}const T=new e.Group([...C,...x,...M],{objectCaching:!1,...o});S.value.add(T),T.sendToBack(),n+=u}))}t(q),t(z,"right")}(),function(){const{show:t,startTime:i,range:n=[0,23],position:s="top",style:a}=B.time,{show:c,range:u=[0,23],position:d,style:h={}}=B.processTime;if(t||c){const f=[],p=k(u[0],u[1]+1),g=[],v=[],m=J/2;for(let e=0;e<G.mainXCell;e++){if(t){const{textAlign:t="center"}=a,o=N+("center"===t?V/2:0),c=0===e&&"center"!==t?o+5:o,u=0===e?+i.slice(11,13):pe(j(f),n);f.push(u);const d="top"===s?W-m:F+m;g.push(r([c+e*V,d],{value:String(u),...l,...a})),e===G.mainXCell-1&&"center"!==t&&g.push(r([K-1,d],{value:String(pe(j(f),n)),...l,...a,originX:"center"!==t?"right":"center"}))}if(c&&e<=p.length){const{textAlign:t="center"}=h,i=N+("center"===t?V/2:0),n=0===e&&"center"!==t?i+5:i,o="top"===d?m:ne-m;v.push(r([n+e*V,o],{value:String(p[e]),...l,...h})),e===G.mainXCell-1&&"center"!==t&&v.push(r([K-1,o],{value:String(j(p)),...l,...a,originX:"center"!==t?"right":"center"}))}}const y=new e.Group([...g,...v],{objectCaching:!1,...o});S.value.add(y),S.value.sendToBack(y)}}(),function(){var e;const i=Object.values(ie),n=[],o={},r=le.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:i,range:n}=r||{},o=X(i,n,10),l=[0,t],s=[-t/e,0],a=[(F-o-t)/e,F-o],c=[K-N,e*(K-N)+t];let u=[],d=[];function h([i,n]){return Math.abs(n-e*i-t)<=1}function f([e,t]){const[i,n]=[...p([e,t])];return i>=N&&i<=K&&n>=o&&n<=F}function p([e,t]){return[N+e,F-t]}return h(l)&&f(l)&&(u=p(l)),h(s)&&f(s)&&(u=p(s)),h(a)&&f(a)&&(d=p(a)),h(c)&&f(c)&&(d=p(c)),[...u,...d]}i.forEach((e=>{if(!e.show)return;const{key:i}=e;switch(i){case"fetalPresentation":{const{range:o,show:r}=le.find((e=>e.key===i));if(r){const r=X(i,o,0);n.push(t([N,r,K,r],{...e}))}break}case"alert":if(l){const{key:i,range:a}=r||{},c=216e5,u={time:x(new Date(m(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[d,h]=[P(l.time)-N,F-X(i,a,l.value)],[f,p]=[P(u.time)-N,F-X(i,a,u.value)],g=(p-h)/(f-d),v=h-d*g,y=s(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(o,{k:g,b:v}))}break;case"handling":if(l){const{k:i,b:r}=o,a=144e5,c=s(i,r-(P(x(new Date(m(l.time)+a),"yyyy-MM-dd HH:mm"))-P(l.time))*i);c.length>0&&n.push(t(c,{...e}))}}})),S.value.add(...n)}(),ae(),function(){function e(e,t){const i=le.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:i,key:e.key},pointer:t}}C.event.evented&&S.value.on("mouse:up",(t=>{var i,n;if(3===t.button){const{x:o=0,y:r=0}=t.pointer||{};o>=N&&o<=K&&r>=W&&r<=F&&(O.point={x:o,y:r},O.show=!0,t.target?(O.target=t.target,O.list=[(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.220"))||"删除节点"],[...se].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&O.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(O.target=null,O.list=[(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.219"))||"新增节点"],le.filter((e=>e.show)).forEach((i=>{if(!Y([...se],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&r<te)return;O.list.push(e(i,t.pointer))}})),1===O.list.length&&(O.show=!1,T("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=U-_/2;function t(e,t){if(!e.length)return;let n=W;const o=[];e.forEach((e=>{const i=(e.alias||e.title).split("").join("\n"),a=Q.findIndex((t=>t.key===e.key));if(e.alias){const s=r([t,n],{value:i,...l,originY:"top",...e.titleStyle});i&&(n+=s.height+15,o.push(s))}else{const{text:r,icon:l}=s(i,e,{text:{originX:"center",originY:"top",left:t,top:n},icon:{left:t,topY:n,originX:"center",originY:"top",origin:{type:e.type,dataIndex:a},...C.event}},"vertical");n+=r.height+l.height+15,(c=l).on("moving",(()=>{c.set("originY","center"),H(c)?(de(c),he(c)):E.show=!1})),c.on("mouseup:before",(e=>{if(E.show=!1,0===e.e.button&&H(c))if(Y([...se],c.left,"key").includes(c.origin.key))T("repeat");else{const e={data:{time:L(c.left),value:M(c.origin.key,c.top)},...c.origin};A("add",e),ce(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(c)})),o.push(r,l)}var c})),i(o),S.value.add(...o)}function i(e){const t=j(e),i=(F-W)/2,n=(t.height+t.top-W)/2;e.forEach((e=>{const t=e.top+i-n;e.set({top:t,originTop:t})}))}t(q,$/2),t(z,e)}(),{clickMenu:function({item:e,target:t}){const i={...e.origin};"remove"===e.mode?(A("remove",i),ce(i,"remove")):(Object.assign(i,{data:{time:L(e.pointer.x),value:M(e.origin.key,e.pointer.y)}}),A("add",i),ce(i))},redrawPoints:ue}}export{S as useBirthProcess};
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawPoint as i,defaultStyle as n,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import"../useShadow.js";import{getScaleInfo as d,drawScaleNumber as h,drawScaleLine as f}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as b,isString as j,last as k,range as w}from"lodash-es";import"../../constants/index.js";import"@vueuse/shared";import{format as x}from"date-fns";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";function S(S,C,O,Y,A){const{computedX:E,computedY:P,getXValue:X,getYValue:L}=u(C),{getEqualXTypes:M,handleAddPrevent:I,isGridLimit:T,setPrevAndNextPoint:H,getPointEventProps:D}=p(S,O,C),{xAxis:B,grid:G,originX:N,originY:W,xCellWidth:V,endY:F,startTime:R,leftAddAreaWidth:$,leftScales:_,rightScales:q,yCellHeight:z,endX:J,scaleValues:K,canvasWidth:Q,borderStyle:U,rightAddAreaWidth:Z,event:ee,originYCervix:te,other:oe,canvasHeight:ie,scalebarBorder:ne,padding:re}=C,le=b(K),se=new Set;function ae(){le.filter((({showData:e=!0})=>e)).forEach(((e,s)=>{var a;const c=[],u=[],d=[],{pointAttr:h={},lineAttr:f={},title:p="",key:g,type:v="circle",childbirthStyle:m={}}=e;function y(r,l,s,a){if(l[s]){const{type:c="circle",style:u={},arrowStyle:h={}}=e[s+"Style"],p=E(l[s]),g=t([...r,p,r[1]],{...f,strokeDashArray:[4,2],...n}),v="dystocia"===s&&r[1]-W>=z?r[1]-z:r[1],m=i(c,{left:p,top:v,...u,...n}),y=v+m.height/2,b="dystocia"===s?o([p,y+z,y],f,"up"):null;g&&(d.push(g),a[s+"Line"]={obj:g,type:"line",left:p-r[0]}),m&&(d.push(m),a[s]={obj:m,left:p-r[0]}),b&&(d.push(b),a[s+"Arrow"]={obj:b,left:p-r[0],moveHide:!0})}}null==(a=e.data)||a.forEach(((a,b)=>{!function(a,b,k){let w,C;const A=e.data[k+1],E=fe(A,e);if(a&&E&&!b.breakpoint)C=t([...a,...E],{...f});else if(a&&!E&&!b.breakpoint){const o=fe(A,e);C=o?t([...a,...o],{...f}):null}const P={};if(["fetalPresentation","cervix"].includes(g)){let e,t;if(b.childbirth){const{type:s="arrow",style:c={},textStyle:u={}}=m;if("arrow"===s){const t=a[1]+z;e=o([a[0],a[1],t],c),e._bottomY=t}else e=i(s,{left:a[0],top:a[1],...c,...n,hoverCursor:"default"}),e._bottomY=a[1]+e.height/2;t=j(b.childbirth)?r([a[0]+V/2,a[1]+z/2],{value:String(b.childbirth),...l,originX:"left",originY:"center",...u}):null,e&&(d.push(e),Object.assign(P,{childbirthIcon:{obj:e,type:s}})),t&&(d.push(t),Object.assign(P,{childbirthText:{obj:t,left:V/2,top:z/2}}))}}if(b.mark){const{type:e="triangle",style:t={}}=b.markStyle||{},o=P.childbirthIcon?P.childbirthIcon.obj._bottomY+5:a[1]+10,s=j(b.mark)?r([a[0],o],{value:String(b.mark),...l,...t,originY:"top"}):i(e,{left:a[0],top:o,...t,...n,originY:"top",hoverCursor:"default"});d.push(s),Object.assign(P,{markObj:{obj:s,top:o-a[1]}})}"fetalPresentation"===g&&(y(a,b,"surgicalDelivery",P),y(a,b,"dystocia",P));const M=u[k-1],I={origin:{data:b,title:p,key:g||"",dataIndex:s,index:k},leftLine:M,rightLine:C,otherObj:P,...h,...D()};a&&(M||(I.leftLine=null),w=i(v,{left:a[0],top:a[1],...I}));C&&u.push(C),w&&(!function(e){ee.hovered&&(e.on("mouseover",(()=>{he(e,"hover")})),e.on("mouseout",(()=>{Y.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{de(e),function(e){var t,o;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:o,top:i=0,left:n=0,type:r="",moveHide:l}=t||{};o&&("line"===r?o.setCoords().set({x1:e.left,y1:e.top,x2:e.left+n,y2:e.top}):o.setCoords().set({left:e.left+n,top:e.top+i}),l&&(S.value.remove(o),delete e.otherObj.obj))}))}(e),ee.hovered&&he(e)})),e.on("mouseup",(t=>{if(Y.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:X(e.left),value:L(t,e.top)}};["surgicalDelivery","dystocia"].some((t=>{var i;(null==(i=e.otherObj[t])?void 0:i.obj)&&(o.data[t]=x(new Date(X(e.left+e.otherObj[t].left)),"yyyy-MM-dd HH:mm"))})),S.value.discardActiveObject(),O("change",o),ce(o,"change")}}))}(w),c.push(w),se.add(w))}(fe(a,e),a,b)})),H(c),S.value.add(...u,...d,...c),c.forEach((e=>{null==e||e.bringToFront();const{childbirthIcon:t}=e.otherObj||{};(null==t?void 0:t.obj)&&"arrow"!==(null==t?void 0:t.type)&&t.obj.bringToFront()}))}))}function ce(e,t="add"){const{dataIndex:o,data:i,index:n,key:r}=e,l=le.find((e=>e.key===r));switch(t){case"remove":l.data.splice(n,1);break;case"change":l.data[n]=i;break;default:{const e=g(i.time,l.data);l.data.splice(e,0,i);break}}ue()}function ue(){var e;se.size&&(null==(e=S.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...se]))),se.clear(),ae()}function de(e){const t=e.prevPoint?e.prevPoint.left:N,o=e.nextPoint?e.nextPoint.left:J;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<te&&e.set("top",te),e.top<W&&e.set("top",W),e.top>F&&e.set("top",F),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function he(e,t="moving"){const{title:o,key:i,data:n}=e.origin;Y.point={x:e.left,y:e.top},Y.list=[`${o} ${"hover"===t?n.value:L(i,e.top)}`,`时间 ${X(e.left).slice(-5)}`],Y.show=!0}function fe(e,t){if(v(e)&&function(e){const t=R+864e5,o=m(e);return o>=R&&o<=t}(e.time)){const o=E(e.time),i=P(t.key,t.range,e.value);return[o,i<W?W:i>F?F:i]}}function pe(e,t){return e+1>t[1]?t[0]:e+1}return c(S,C),function(){const t=ne?{width:Q-$-Z-1,left:$}:{width:J-N-(q.length?0:1),left:N},o=new e.Rect({...U,height:F-re[0]-1,top:re[0],fill:"transparent",...t});S.value.add(o)}(),function(){function t(t,o="left"){let i="left"===o?$:J;t.forEach(((t,o)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:v,position:m="center",spaceGridNumber:b=1,showNumber:j=!0,showMaxMinNumber:k=!0,showName:w=!0}=t,x=[],C=[],O=i+u/2,Y=y(s,c),A=Y.length,{lineXMain:E,lineXSub:P,textLeft:X}=d(m,i,u);Y.forEach(((e,o)=>{const i=F-o*z*b,n=0===o?F-8:o!==Y.length-1||!re[0]||te&&"FHR"!==v?i:W+8;!j||(0===o||o===A-1)&&!k||x.push(h(String(e),t,X,n)),C.push(...f(t,o,E,P,i,z,W,A,1))}));const L=[],M=ne?new e.Rect({...a,strokeWidth:.5,width:u,height:F-re[0],left:O,top:re[0]+(F-re[0])/2}):null;if(M&&L.push(M),w){const e=r([O,W-re[0]>0?W-z/2:z/2],{value:String(p),...l,...g});e&&L.push(e)}const I=new e.Group([...C,...x,...L],{objectCaching:!1,...n});S.value.add(I),I.sendToBack(),i+=u}))}t(_),t(q,"right")}(),function(){const{show:t,startTime:o,range:i=[0,23],position:s="top",style:a}=B.time,{show:c,range:u=[0,23],position:d,style:h={}}=B.processTime;if(t||c){const f=[],p=w(u[0],u[1]+1),g=[],v=[],m=z/2;for(let e=0;e<G.mainXCell;e++){if(t){const{textAlign:t="center"}=a,n=N+("center"===t?V/2:0),c=0===e&&"center"!==t?n+5:n,u=0===e?+o.slice(11,13):pe(k(f),i);f.push(u);const d="top"===s?W-m:F+m;g.push(r([c+e*V,d],{value:String(u),...l,...a})),e===G.mainXCell-1&&"center"!==t&&g.push(r([J-1,d],{value:String(pe(k(f),i)),...l,...a,originX:"center"!==t?"right":"center"}))}if(c&&e<=p.length){const{textAlign:t="center"}=h,o=N+("center"===t?V/2:0),i=0===e&&"center"!==t?o+5:o,n="top"===d?m:ie-m;v.push(r([i+e*V,n],{value:String(p[e]),...l,...h})),e===G.mainXCell-1&&"center"!==t&&v.push(r([J-1,n],{value:String(k(p)),...l,...a,originX:"center"!==t?"right":"center"}))}}const y=new e.Group([...g,...v],{objectCaching:!1,...n});S.value.add(y),S.value.sendToBack(y)}}(),function(){var e;const o=Object.values(oe),i=[],n={},r=le.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:o,range:i}=r||{},n=P(o,i,10),l=[0,t],s=[-t/e,0],a=[(F-n-t)/e,F-n],c=[J-N,e*(J-N)+t];let u=[],d=[];function h([o,i]){return Math.abs(i-e*o-t)<=1}function f([e,t]){const[o,i]=[...p([e,t])];return o>=N&&o<=J&&i>=n&&i<=F}function p([e,t]){return[N+e,F-t]}return h(l)&&f(l)&&(u=p(l)),h(s)&&f(s)&&(u=p(s)),h(a)&&f(a)&&(d=p(a)),h(c)&&f(c)&&(d=p(c)),[...u,...d]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:n,show:r}=le.find((e=>e.key===o));if(r){const r=P(o,n,0);i.push(t([N,r,J,r],{...e}))}break}case"alert":if(l){const{key:o,range:a}=r||{},c=216e5,u={time:x(new Date(m(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[d,h]=[E(l.time)-N,F-P(o,a,l.value)],[f,p]=[E(u.time)-N,F-P(o,a,u.value)],g=(p-h)/(f-d),v=h-d*g,y=s(g,v);y.length>0&&(i.push(t(y,{...e})),Object.assign(n,{k:g,b:v}))}break;case"handling":if(l){const{k:o,b:r}=n,a=144e5,c=s(o,r-(E(x(new Date(m(l.time)+a),"yyyy-MM-dd HH:mm"))-E(l.time))*o);c.length>0&&i.push(t(c,{...e}))}}})),S.value.add(...i)}(),ae(),function(){function e(e,t){const o=le.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}C.event.evented&&S.value.on("mouse:up",(t=>{var o,i;if(3===t.button){const{x:n=0,y:r=0}=t.pointer||{};n>=N&&n<=J&&r>=W&&r<=F&&(A.point={x:n,y:r},A.show=!0,t.target?(A.target=t.target,A.list=[(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.220"))||"删除节点"],[...se].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&A.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(A.target=null,A.list=[(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.219"))||"新增节点"],le.filter((e=>e.show)).forEach((o=>{if(!M([...se],n,"key").includes(o.key)){if(["cervix","fetalPresentation"].includes(o.key)&&r<te)return;A.list.push(e(o,t.pointer))}})),1===A.list.length&&(A.show=!1,I("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=Q-Z/2;function t(e,t){if(!e.length)return;let i=W;const n=[];e.forEach((e=>{const o=(e.alias||e.title).split("").join("\n"),a=K.findIndex((t=>t.key===e.key));if(e.alias){const s=r([t,i],{value:o,...l,originY:"top",...e.titleStyle});o&&(i+=s.height+15,n.push(s))}else{const{text:r,icon:l}=s(o,e,{text:{originX:"center",originY:"top",left:t,top:i},icon:{left:t,topY:i,originX:"center",originY:"top",origin:{type:e.type,dataIndex:a},...C.event}},"vertical");i+=r.height+l.height+15,(c=l).on("moving",(()=>{c.set("originY","center"),T(c)?(de(c),he(c)):Y.show=!1})),c.on("mouseup:before",(e=>{if(Y.show=!1,0===e.e.button&&T(c))if(M([...se],c.left,"key").includes(c.origin.key))I("repeat");else{const e={data:{time:X(c.left),value:L(c.origin.key,c.top)},...c.origin};O("add",e),ce(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(c)})),n.push(r,l)}var c})),o(n),S.value.add(...n)}function o(e){const t=k(e),o=(F-W)/2,i=(t.height+t.top-W)/2;e.forEach((e=>{const t=e.top+o-i;e.set({top:t,originTop:t})}))}t(_,$/2),t(q,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(O("remove",o),ce(o,"remove")):(Object.assign(o,{data:{time:X(e.pointer.x),value:L(e.origin.key,e.pointer.y)}}),O("add",o),ce(o))},redrawPoints:ue}}export{S as useBirthProcess};
|
@@ -532,9 +532,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
532
532
|
}>;
|
533
533
|
developMode: boolean;
|
534
534
|
draggable: boolean;
|
535
|
+
isHighlightRow: boolean;
|
535
536
|
idx: number;
|
536
537
|
isHighlight: boolean;
|
537
|
-
isHighlightRow: boolean;
|
538
538
|
isFieldSet: boolean;
|
539
539
|
fieldDescribeMode: "column" | "tooltip";
|
540
540
|
hideExpressionOption: AnyObject[];
|
@@ -561,9 +561,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
561
561
|
}>;
|
562
562
|
developMode: boolean;
|
563
563
|
draggable: boolean;
|
564
|
+
isHighlightRow: boolean;
|
564
565
|
idx: number;
|
565
566
|
isHighlight: boolean;
|
566
|
-
isHighlightRow: boolean;
|
567
567
|
isFieldSet: boolean;
|
568
568
|
fieldDescribeMode: "column" | "tooltip";
|
569
569
|
hideExpressionOption: AnyObject[];
|
@@ -720,9 +720,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
720
720
|
}>;
|
721
721
|
developMode: boolean;
|
722
722
|
draggable: boolean;
|
723
|
+
isHighlightRow: boolean;
|
723
724
|
idx: number;
|
724
725
|
isHighlight: boolean;
|
725
|
-
isHighlightRow: boolean;
|
726
726
|
isFieldSet: boolean;
|
727
727
|
fieldDescribeMode: "column" | "tooltip";
|
728
728
|
hideExpressionOption: AnyObject[];
|
@@ -383,9 +383,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
383
383
|
}>;
|
384
384
|
developMode: boolean;
|
385
385
|
draggable: boolean;
|
386
|
+
isHighlightRow: boolean;
|
386
387
|
idx: number;
|
387
388
|
isHighlight: boolean;
|
388
|
-
isHighlightRow: boolean;
|
389
389
|
isFieldSet: boolean;
|
390
390
|
fieldDescribeMode: "column" | "tooltip";
|
391
391
|
hideExpressionOption: AnyObject[];
|