cnhis-design-vue 3.1.46-release.2 → 3.1.46-release.4
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/form-config/index.d.ts +22 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +22 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +11 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +11 -0
- package/es/components/form-render/index.d.ts +11 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +12 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +11 -0
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +7 -0
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -0
- package/es/components/form-render/src/types/index.d.ts +7 -0
- package/es/components/iho-table/index.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +26 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +11 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +11 -0
- package/es/components/scale-view/index.d.ts +9 -9
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +16 -16
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/index.d.ts +21 -0
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/select-person/src/SelectPerson.vue.d.ts +19 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +11 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/components/table-export-field/src/index.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -181,7 +181,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
181
181
|
renderLabel: (option: import("../../../es/shared/types").AnyObject) => JSX.Element;
|
|
182
182
|
callLocalServicesSuccessCb: (res: any, type: any) => void;
|
|
183
183
|
callLocalServicesErrorCb: (res: unknown) => void;
|
|
184
|
-
prevFnError: () => void;
|
|
184
|
+
prevFnError: (type: string) => void;
|
|
185
185
|
getPrintParams: (index?: number) => string;
|
|
186
186
|
getOnceParams: () => string;
|
|
187
187
|
handleClickPrint: () => void;
|
|
@@ -188,7 +188,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
188
188
|
renderLabel: (option: AnyObject) => JSX.Element;
|
|
189
189
|
callLocalServicesSuccessCb: (res: any, type: any) => void;
|
|
190
190
|
callLocalServicesErrorCb: (res: unknown) => void;
|
|
191
|
-
prevFnError: () => void;
|
|
191
|
+
prevFnError: (type: string) => void;
|
|
192
192
|
getPrintParams: (index?: number) => string;
|
|
193
193
|
getOnceParams: () => string;
|
|
194
194
|
handleClickPrint: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,reactive as e,computed as r,onMounted as a,onUnmounted as n,watch as i,openBlock as
|
|
1
|
+
import{defineComponent as t,reactive as e,computed as r,onMounted as a,onUnmounted as n,watch as i,openBlock as l,createElementBlock as o,Fragment as s,createVNode as m,unref as d,withCtx as p,renderSlot as u,withModifiers as c,createTextVNode as f,toDisplayString as v,mergeProps as y}from"vue";import{isObject as b}from"@vue/shared";import{useMessage as g,NDropdown as I,NButton as P,NIcon as w}from"naive-ui";import{ChevronDown as h}from"@vicons/ionicons5";import{Print as F}from"./utils/print.js";import{isIReport as k}from"./utils/browserPrint.js";import T from"./components/IdentityVerification.vue.js";import{format as x}from"date-fns";import{savePrivateFormatApi as S,getPrivateFormatApi as D}from"./api.js";var O=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})}},emits:["success","error","clickoutside"],setup(t,{expose:O,emit:j}){var E;const L=t,M=g();let N;const V={},C=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),Y=e([{label:L.printText,key:"printText"},{label:L.previewText,key:"previewText"},{label:L.pdfLoadText,key:"downloadPdf"},{label:L.formatEditText,key:"formatEditText"},...(null==(E=L.externalOptionConfig)?void 0:E.options)||[]]),J=r((()=>{if(!C.currentFormatId)return{};let t=C.currentFormatId;return C.formatList.find((e=>e.id===t))})),U=r((()=>{var t;return(null==(t=J.value)?void 0:t.name)||"格式选择"})),A=r((()=>{let t=C.formatList.find((t=>t.id===C.currentFormatId));return null==t?void 0:t.templateId})),B=async t=>{if(L.directPrint){if(C.spinning)return;return"button"===t?void await it():rt()}return rt()},q=t=>m("span",{class:{active:t.key===C.currentFormatId}},[t.label]),R=(t,e)=>{let r={type:e,formatId:C.currentFormatId,templateId:A.value};j("success",t,r)},_=t=>{j("error",t),b(t)&&"notInstalledApp"===t.type&&M.error(t.message)},z=t=>{j("error",{message:"前置条件执行错误",type:t,preExecution:!0})},H=(t=0)=>{var e;const r=(null==(e=L.printParams)?void 0:e.length)?L.printParams[t]:C.printParams[t];return JSON.stringify({...r||{},...L.token?{token:L.token}:{}})},$=()=>{var t,e;let r={},a={};if(null==(t=C.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(C.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(C.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(C.printParams[0]).forEach((t=>{a[t]=[],C.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(H(0)),a),JSON.stringify(r)},G=()=>{let t=C.printParams.length;const e=async e=>{try{--t<=0&&R(e,"print")}catch(t){console.log("error",t)}};L.prevFn("print").then((()=>{const t={formatId:C.currentFormatId,templateId:A.value,printdlgshow:L.printdlgshow};if("MULTI"===L.strategy)for(let r=0;r<C.printParams.length;r++)r>0&&(t.printdlgshow="0"),N.printDirect({...t,params:H(r)},e,_);else N.printDirect({...t,params:$()},(t=>{R(t,"print")}),_)})).catch((()=>{z("print")})).finally((()=>{C.visible=!1}))},K=async(t,e)=>{var r,a;switch(t){case"printText":G();break;case"previewText":(async()=>{L.prevFn("preview").then((()=>{const t="MULTI"===L.strategy?H():$(),e={formatId:C.currentFormatId,templateId:A.value,params:t,btnprint:L.btnprint};N.preview(e,(t=>{R(t,"preview")}),_)})).catch((()=>{z("preview")})).finally((()=>{C.visible=!1}))})();break;case"formatEditText":L.prevFn("edit").then((()=>{C.identityVerification.visible=!0})).catch((()=>{z("edit")})).finally((()=>{C.visible=!1}));break;case"downloadPdf":(async()=>{L.prevFn("download").then((()=>{const t="MULTI"===L.strategy?H():$(),e={formatId:C.currentFormatId,templateId:A.value,print:{print:"1",type:"1"},params:t};N.downloadPDF(e,(t=>R(t,"preview")),_)})).catch((()=>{z("download")})).finally((()=>{C.visible=!1}))})();break;default:{C.visible=!1;const n=C.formatList.find((e=>e.id===t))||{};if(Object.keys(n).length>0){C.currentFormatId=t;const[e]=Y;e.label=(null==n?void 0:n.name)||e.label,await S({formatForms:[{...n}],name:V.name||n.templateName,number:V.number||n.number,templateId:V.templateId||n.templateId,...V.id?{id:V.id}:{}},{token:L.token})}else null==(a=null==(r=L.externalOptionConfig)?void 0:r.onSelect)||a.call(r,t,e);break}}},Q=()=>{C.visible=!1,j("clickoutside")},W=()=>(C.isInited=!1,C.spinning=!1,setTimeout((()=>{C.visible=!1}),0),!1),X=(t,e,r)=>{const a={};return e.forEach((e=>{let n=((t,e)=>{const r={DATE:"YYYY-MM-DD",DATETIME:"YYYY-MM-DD HH:mm:ss"};let a=e;return Object.keys(r).includes(t.type)&&e&&(a=x(e,r[t.type])),(null==t?void 0:t.defaultValue)||a})(e,t[e[r]]);t[e[r]]&&n&&(a[e[r]]=n)})),a},Z=({customizeDataset:t=[],param:e=[]},r=[])=>r.map((r=>{let a={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;a.datasetData={[t.name]:JSON.stringify(X(r,e,"fieldName"))}})),a=Object.assign({},a,X(r,e,"key")),a})),tt=async t=>{var e;if(C.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],C.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await D({templateId:t[0].templateId},{token:L.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(V,a.map||{});const n=null==(r=null==e?void 0:e[0])?void 0:r.id;if(n&&t.map((t=>t.id)).includes(n))return n}const n=t.find((t=>1==t[e]));return(null==n?void 0:n.id)||t[0].id})(C.formatList,"defaultFlag"),!C.currentFormatId)return M.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=C.formatList.map((t=>({label:t.name,key:t.id})));Y.unshift({label:U.value,key:"format",children:t})})();let r=null==(e=await L.queryTemplateParams())?void 0:e.obj;if(!r||!A.value)return M.error("获取打印模板失败,请联系管理员!"),W();C.templateParams=r,C.printParams=Z(C.templateParams,L.params)},et=async()=>{if(C.isInited)return!0;C.isInited=!0,C.spinning=!0,(()=>{if(N)return!1;N=new F})();const t=await L.queryPrintFormatByNumber();return await tt(t),C.spinning=!1,!0},rt=async(t=!0)=>{var e;if(await L.clickPrevFn())if(null==(e=L.params)?void 0:e.length){if(!C.visible){if(!await et())return!1}t&&(C.visible=!C.visible)}else M.warning(L.noDataMsg)},at=()=>{C.watchPrintParamsReformatFn&&C.watchPrintParamsReformatFn(),C.isInited?C.printParams=Z(C.templateParams,L.params):C.watchPrintParamsReformatFn=()=>i((()=>C.isInited),(t=>{if(!t)return!1;at()}))},nt=t=>{if(C.identityVerification.visible=!1,k(C.currentFormatId))return R(null,"edit");const e={formatId:C.currentFormatId,templateId:A.value,params:H(),token:t};N.editPrintFormat(e,(t=>{R(t,"edit")}),_)};async function it(){await rt(!1),G()}return a((()=>{C.isInited=!1})),n((()=>{null==N||N.destroy()})),i((()=>L.params),(t=>{if(!(null==t?void 0:t.length))return!1;at()}),{deep:!0}),O({directPrint:it}),(e,r)=>(l(),o(s,null,[m(d(I),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:C.visible,onClickoutside:Q,options:Y,onSelect:K,"render-label":q},{default:p((()=>[u(e.$slots,"button",{handleClickPrintBtn:rt,printSpinning:C.spinning,printbtnText:t.btnText,printVisible:C.visible},(()=>[m(d(P),{class:"dropdown-button",onClick:r[1]||(r[1]=c((()=>B("button")),["stop"]))},{default:p((()=>[f(v(t.btnText)+" ",1),m(d(w),{component:d(h),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=c((()=>B("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),m(T,y(e.$attrs,{modelValue:C.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>C.identityVerification.visible=t),formatId:C.currentFormatId,templateId:d(A),onSuccess:nt}),null,16,["modelValue","formatId","templateId"])],64))}});export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,u=`${h}/bi-api/reprot/print/open/client/getRemote`,
|
|
1
|
+
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,u=`${h}/bi-api/reprot/print/open/client/getRemote`,m=`${h}/printService/file`;let p=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],p)return p;p=this;const e=window;if(this.CMonitor=e.$CMonitor,this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=e;try{n(i.res||"")}catch(t){s(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t){if(!this.webview)return Promise.reject();const e=Date.now().toString();return Promise.race([new Promise(((i,n)=>{this.messageHandlerQueue.push({resolve:i,reject:n,id:e}),this.webview.postMessage(t)})),new Promise(((t,i)=>{setTimeout((()=>{const t=this.messageHandlerQueue.findIndex((t=>t.id===e));t>-1&&this.messageHandlerQueue.splice(t,1),i({type:"timeout"})}),5e3)}))])}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}}):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const n={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(n),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else if(this.isRemote){const t=l(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:u})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=h+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${m}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n}),a=this._handleResult(r,l);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==s||s(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==l||l(i),this._handleMonitorNotify(i)}}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const u=await this._testConnection();if(!this._handleResultTest(u,h))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o}),a=this._handleResult(r,h);if(!a)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(a,c),null==d||d(a)}catch(t){const e="printDirect"===c?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==h||h(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){let e=l(new Date,"yyyyMMddHHmmss");t.customFileName&&(e=`${e}${t.customFileName}`),t.print.filename=`${this.downloadPath}/${e}`.replace(/\\/g,"/")}this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
|
|
@@ -7131,6 +7131,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7131
7131
|
lowCodeReactions: {
|
|
7132
7132
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
7133
7133
|
};
|
|
7134
|
+
operationalForm: {
|
|
7135
|
+
type: import("vue").PropType<import("..").FormOperationalConfig[]>;
|
|
7136
|
+
};
|
|
7134
7137
|
linebarAutoHidden: {
|
|
7135
7138
|
type: BooleanConstructor;
|
|
7136
7139
|
};
|
|
@@ -7268,6 +7271,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7268
7271
|
lowCodeReactions: {
|
|
7269
7272
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
7270
7273
|
};
|
|
7274
|
+
operationalForm: {
|
|
7275
|
+
type: import("vue").PropType<import("..").FormOperationalConfig[]>;
|
|
7276
|
+
};
|
|
7271
7277
|
linebarAutoHidden: {
|
|
7272
7278
|
type: BooleanConstructor;
|
|
7273
7279
|
};
|
|
@@ -7325,6 +7331,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7325
7331
|
}>;
|
|
7326
7332
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
7327
7333
|
triggerAllReactionsHandler: () => void;
|
|
7334
|
+
operationalFormHandler: (field: string) => void;
|
|
7335
|
+
triggerAllOperationalFormHandler: () => void;
|
|
7328
7336
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
7329
7337
|
[key: symbol]: any;
|
|
7330
7338
|
[key: `x-${string}`]: any;
|
|
@@ -7731,6 +7739,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7731
7739
|
lowCodeReactions: {
|
|
7732
7740
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
7733
7741
|
};
|
|
7742
|
+
operationalForm: {
|
|
7743
|
+
type: import("vue").PropType<import("..").FormOperationalConfig[]>;
|
|
7744
|
+
};
|
|
7734
7745
|
linebarAutoHidden: {
|
|
7735
7746
|
type: BooleanConstructor;
|
|
7736
7747
|
};
|
|
@@ -13147,6 +13158,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13147
13158
|
lowCodeReactions: {
|
|
13148
13159
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
13149
13160
|
};
|
|
13161
|
+
operationalForm: {
|
|
13162
|
+
type: import("vue").PropType<import("..").FormOperationalConfig[]>;
|
|
13163
|
+
};
|
|
13150
13164
|
linebarAutoHidden: {
|
|
13151
13165
|
type: BooleanConstructor;
|
|
13152
13166
|
};
|
|
@@ -13284,6 +13298,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13284
13298
|
lowCodeReactions: {
|
|
13285
13299
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
13286
13300
|
};
|
|
13301
|
+
operationalForm: {
|
|
13302
|
+
type: import("vue").PropType<import("..").FormOperationalConfig[]>;
|
|
13303
|
+
};
|
|
13287
13304
|
linebarAutoHidden: {
|
|
13288
13305
|
type: BooleanConstructor;
|
|
13289
13306
|
};
|
|
@@ -13341,6 +13358,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13341
13358
|
}>;
|
|
13342
13359
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
13343
13360
|
triggerAllReactionsHandler: () => void;
|
|
13361
|
+
operationalFormHandler: (field: string) => void;
|
|
13362
|
+
triggerAllOperationalFormHandler: () => void;
|
|
13344
13363
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
13345
13364
|
[key: symbol]: any;
|
|
13346
13365
|
[key: `x-${string}`]: any;
|
|
@@ -13747,6 +13766,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13747
13766
|
lowCodeReactions: {
|
|
13748
13767
|
type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
|
|
13749
13768
|
};
|
|
13769
|
+
operationalForm: {
|
|
13770
|
+
type: import("vue").PropType<import("..").FormOperationalConfig[]>;
|
|
13771
|
+
};
|
|
13750
13772
|
linebarAutoHidden: {
|
|
13751
13773
|
type: BooleanConstructor;
|
|
13752
13774
|
};
|
|
@@ -7133,6 +7133,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7133
7133
|
lowCodeReactions: {
|
|
7134
7134
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
7135
7135
|
};
|
|
7136
|
+
operationalForm: {
|
|
7137
|
+
type: PropType<import("../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
7138
|
+
};
|
|
7136
7139
|
linebarAutoHidden: {
|
|
7137
7140
|
type: BooleanConstructor;
|
|
7138
7141
|
};
|
|
@@ -7270,6 +7273,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7270
7273
|
lowCodeReactions: {
|
|
7271
7274
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
7272
7275
|
};
|
|
7276
|
+
operationalForm: {
|
|
7277
|
+
type: PropType<import("../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
7278
|
+
};
|
|
7273
7279
|
linebarAutoHidden: {
|
|
7274
7280
|
type: BooleanConstructor;
|
|
7275
7281
|
};
|
|
@@ -7327,6 +7333,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7327
7333
|
}>;
|
|
7328
7334
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
7329
7335
|
triggerAllReactionsHandler: () => void;
|
|
7336
|
+
operationalFormHandler: (field: string) => void;
|
|
7337
|
+
triggerAllOperationalFormHandler: () => void;
|
|
7330
7338
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
7331
7339
|
[key: symbol]: any;
|
|
7332
7340
|
[key: `x-${string}`]: any;
|
|
@@ -7733,6 +7741,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7733
7741
|
lowCodeReactions: {
|
|
7734
7742
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
7735
7743
|
};
|
|
7744
|
+
operationalForm: {
|
|
7745
|
+
type: PropType<import("../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
7746
|
+
};
|
|
7736
7747
|
linebarAutoHidden: {
|
|
7737
7748
|
type: BooleanConstructor;
|
|
7738
7749
|
};
|
|
@@ -13149,6 +13160,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13149
13160
|
lowCodeReactions: {
|
|
13150
13161
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
13151
13162
|
};
|
|
13163
|
+
operationalForm: {
|
|
13164
|
+
type: PropType<import("../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
13165
|
+
};
|
|
13152
13166
|
linebarAutoHidden: {
|
|
13153
13167
|
type: BooleanConstructor;
|
|
13154
13168
|
};
|
|
@@ -13286,6 +13300,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13286
13300
|
lowCodeReactions: {
|
|
13287
13301
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
13288
13302
|
};
|
|
13303
|
+
operationalForm: {
|
|
13304
|
+
type: PropType<import("../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
13305
|
+
};
|
|
13289
13306
|
linebarAutoHidden: {
|
|
13290
13307
|
type: BooleanConstructor;
|
|
13291
13308
|
};
|
|
@@ -13343,6 +13360,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13343
13360
|
}>;
|
|
13344
13361
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
13345
13362
|
triggerAllReactionsHandler: () => void;
|
|
13363
|
+
operationalFormHandler: (field: string) => void;
|
|
13364
|
+
triggerAllOperationalFormHandler: () => void;
|
|
13346
13365
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
13347
13366
|
[key: symbol]: any;
|
|
13348
13367
|
[key: `x-${string}`]: any;
|
|
@@ -13749,6 +13768,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13749
13768
|
lowCodeReactions: {
|
|
13750
13769
|
type: PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
13751
13770
|
};
|
|
13771
|
+
operationalForm: {
|
|
13772
|
+
type: PropType<import("../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
13773
|
+
};
|
|
13752
13774
|
linebarAutoHidden: {
|
|
13753
13775
|
type: BooleanConstructor;
|
|
13754
13776
|
};
|
|
@@ -146,6 +146,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
146
146
|
lowCodeReactions: {
|
|
147
147
|
type: import("vue").PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
148
148
|
};
|
|
149
|
+
operationalForm: {
|
|
150
|
+
type: import("vue").PropType<import("../../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
151
|
+
};
|
|
149
152
|
linebarAutoHidden: {
|
|
150
153
|
type: BooleanConstructor;
|
|
151
154
|
};
|
|
@@ -283,6 +286,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
283
286
|
lowCodeReactions: {
|
|
284
287
|
type: import("vue").PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
285
288
|
};
|
|
289
|
+
operationalForm: {
|
|
290
|
+
type: import("vue").PropType<import("../../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
291
|
+
};
|
|
286
292
|
linebarAutoHidden: {
|
|
287
293
|
type: BooleanConstructor;
|
|
288
294
|
};
|
|
@@ -340,6 +346,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
340
346
|
}>;
|
|
341
347
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
342
348
|
triggerAllReactionsHandler: () => void;
|
|
349
|
+
operationalFormHandler: (field: string) => void;
|
|
350
|
+
triggerAllOperationalFormHandler: () => void;
|
|
343
351
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
344
352
|
[key: symbol]: any;
|
|
345
353
|
[key: `x-${string}`]: any;
|
|
@@ -746,6 +754,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
746
754
|
lowCodeReactions: {
|
|
747
755
|
type: import("vue").PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
748
756
|
};
|
|
757
|
+
operationalForm: {
|
|
758
|
+
type: import("vue").PropType<import("../../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
759
|
+
};
|
|
749
760
|
linebarAutoHidden: {
|
|
750
761
|
type: BooleanConstructor;
|
|
751
762
|
};
|
|
@@ -5277,6 +5277,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5277
5277
|
lowCodeReactions: {
|
|
5278
5278
|
type: PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
5279
5279
|
};
|
|
5280
|
+
operationalForm: {
|
|
5281
|
+
type: PropType<import("../../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
5282
|
+
};
|
|
5280
5283
|
linebarAutoHidden: {
|
|
5281
5284
|
type: BooleanConstructor;
|
|
5282
5285
|
};
|
|
@@ -5414,6 +5417,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5414
5417
|
lowCodeReactions: {
|
|
5415
5418
|
type: PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
5416
5419
|
};
|
|
5420
|
+
operationalForm: {
|
|
5421
|
+
type: PropType<import("../../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
5422
|
+
};
|
|
5417
5423
|
linebarAutoHidden: {
|
|
5418
5424
|
type: BooleanConstructor;
|
|
5419
5425
|
};
|
|
@@ -5471,6 +5477,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5471
5477
|
}>;
|
|
5472
5478
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
5473
5479
|
triggerAllReactionsHandler: () => void;
|
|
5480
|
+
operationalFormHandler: (field: string) => void;
|
|
5481
|
+
triggerAllOperationalFormHandler: () => void;
|
|
5474
5482
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
5475
5483
|
[key: symbol]: any;
|
|
5476
5484
|
[key: `x-${string}`]: any;
|
|
@@ -5877,6 +5885,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5877
5885
|
lowCodeReactions: {
|
|
5878
5886
|
type: PropType<import("../../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
5879
5887
|
};
|
|
5888
|
+
operationalForm: {
|
|
5889
|
+
type: PropType<import("../../../../../es/components/form-render").FormOperationalConfig[]>;
|
|
5890
|
+
};
|
|
5880
5891
|
linebarAutoHidden: {
|
|
5881
5892
|
type: BooleanConstructor;
|
|
5882
5893
|
};
|
|
@@ -133,6 +133,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
133
133
|
lowCodeReactions: {
|
|
134
134
|
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
135
135
|
};
|
|
136
|
+
operationalForm: {
|
|
137
|
+
type: import("vue").PropType<import("./src/types").FormOperationalConfig[]>;
|
|
138
|
+
};
|
|
136
139
|
linebarAutoHidden: {
|
|
137
140
|
type: BooleanConstructor;
|
|
138
141
|
};
|
|
@@ -270,6 +273,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
270
273
|
lowCodeReactions: {
|
|
271
274
|
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
272
275
|
};
|
|
276
|
+
operationalForm: {
|
|
277
|
+
type: import("vue").PropType<import("./src/types").FormOperationalConfig[]>;
|
|
278
|
+
};
|
|
273
279
|
linebarAutoHidden: {
|
|
274
280
|
type: BooleanConstructor;
|
|
275
281
|
};
|
|
@@ -327,6 +333,8 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
327
333
|
}>;
|
|
328
334
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
329
335
|
triggerAllReactionsHandler: () => void;
|
|
336
|
+
operationalFormHandler: (field: string) => void;
|
|
337
|
+
triggerAllOperationalFormHandler: () => void;
|
|
330
338
|
schemaAdaptor: (fieldList: import("./src/types").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
331
339
|
[key: symbol]: any;
|
|
332
340
|
[key: `x-${string}`]: any;
|
|
@@ -733,6 +741,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
733
741
|
lowCodeReactions: {
|
|
734
742
|
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
735
743
|
};
|
|
744
|
+
operationalForm: {
|
|
745
|
+
type: import("vue").PropType<import("./src/types").FormOperationalConfig[]>;
|
|
746
|
+
};
|
|
736
747
|
linebarAutoHidden: {
|
|
737
748
|
type: BooleanConstructor;
|
|
738
749
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../es/shared/types';
|
|
2
2
|
import { Component, FunctionalComponent, PropType } from 'vue';
|
|
3
3
|
import { RequestInstance } from './hooks';
|
|
4
|
-
import { FieldItem, FieldVisitor, FormBusinessFormatter, FormLowCodeReactions } from './types';
|
|
4
|
+
import { FieldItem, FieldVisitor, FormBusinessFormatter, FormLowCodeReactions, FormOperationalConfig } from './types';
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
|
6
6
|
fieldList: {
|
|
7
7
|
type: PropType<FieldItem[]>;
|
|
@@ -127,6 +127,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
127
|
lowCodeReactions: {
|
|
128
128
|
type: PropType<FormLowCodeReactions.Config[]>;
|
|
129
129
|
};
|
|
130
|
+
operationalForm: {
|
|
131
|
+
type: PropType<FormOperationalConfig[]>;
|
|
132
|
+
};
|
|
130
133
|
linebarAutoHidden: {
|
|
131
134
|
type: BooleanConstructor;
|
|
132
135
|
};
|
|
@@ -264,6 +267,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
267
|
lowCodeReactions: {
|
|
265
268
|
type: PropType<FormLowCodeReactions.Config[]>;
|
|
266
269
|
};
|
|
270
|
+
operationalForm: {
|
|
271
|
+
type: PropType<FormOperationalConfig[]>;
|
|
272
|
+
};
|
|
267
273
|
linebarAutoHidden: {
|
|
268
274
|
type: BooleanConstructor;
|
|
269
275
|
};
|
|
@@ -321,6 +327,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
321
327
|
}>;
|
|
322
328
|
lowCodeReactionsHandler: (field: string, value: unknown) => void;
|
|
323
329
|
triggerAllReactionsHandler: () => void;
|
|
330
|
+
operationalFormHandler: (field: string) => void;
|
|
331
|
+
triggerAllOperationalFormHandler: () => void;
|
|
324
332
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/vue").Stringify<{
|
|
325
333
|
[key: symbol]: any;
|
|
326
334
|
[key: `x-${string}`]: any;
|
|
@@ -727,6 +735,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
727
735
|
lowCodeReactions: {
|
|
728
736
|
type: PropType<FormLowCodeReactions.Config[]>;
|
|
729
737
|
};
|
|
738
|
+
operationalForm: {
|
|
739
|
+
type: PropType<FormOperationalConfig[]>;
|
|
740
|
+
};
|
|
730
741
|
linebarAutoHidden: {
|
|
731
742
|
type: BooleanConstructor;
|
|
732
743
|
};
|