cnhis-design-vue 3.1.42-release.5 → 3.1.42-release.7
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/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +12 -12
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +9 -9
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +9 -9
- package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +12 -12
- package/es/components/classification/src/index.vue.js +1 -1
- package/es/components/fabric-chart/index.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/form-config/index.d.ts +22 -17
- package/es/components/form-config/src/FormConfig.vue.d.ts +22 -17
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -6
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -9
- package/es/components/form-config/src/constants/index.d.ts +8 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.d.ts +6 -6
- package/es/components/form-render/src/FormRender.vue.d.ts +6 -6
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -6
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +5 -1
- package/es/components/form-render/src/types/index.d.ts +1 -1
- 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 +3 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +48 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useTriggerEvent.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +8 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +7 -2
- package/es/components/iho-table/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +15 -15
- package/es/components/info-header/src/InfoHeader.vue.d.ts +15 -15
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -9
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -6
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
- package/es/components/search-cascader/src/constants/index.d.ts +1 -1
- package/es/components/select-label/index.d.ts +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
- package/es/components/select-person/index.d.ts +183 -2
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +131 -0
- package/es/components/select-person/src/SearchMultiple.vue.js +1 -0
- package/es/components/select-person/src/SearchMultiple.vue2.js +1 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +176 -3
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +8 -7
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -7
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +3 -3
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -4
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
- /package/es/components/{bpmn-workflow/src/BpmnWorkflow.d.ts → iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useTriggerEvent.d.ts} +0 -0
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
|
+
```
|
|
@@ -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`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=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.messageHandlerQueue=[],m)return m;m=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview
|
|
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`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=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.messageHandlerQueue=[],m)return m;m=this;const e=window;if(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.postMessage({exec:"config",data:""})}catch(t){console.log("非封装浏览器或者当前版本不支持获取配置接口")}}}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{console.log(t);const i=JSON.parse(t.data||"{}");"config"===i.exec&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||""),n(i.res||"")}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}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}}_handleResult(t,e){if(!t)return null==e||e({type:"printError",message:"打印命令未返回信息",result:!1,errinfo:"打印命令未返回信息"}),!1;if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!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:p})||{},{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(`${u}/${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;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n}),c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}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 p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o}),m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),null==d||d(m)}_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){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.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};
|
|
@@ -10,7 +10,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10
10
|
};
|
|
11
11
|
conditionMap: {
|
|
12
12
|
type: import("vue").PropType<import("..").IConditionMapType>;
|
|
13
|
-
default: () =>
|
|
13
|
+
default: () => {};
|
|
14
14
|
};
|
|
15
15
|
conditionSid: {
|
|
16
16
|
type: import("vue").PropType<string[]>;
|
|
@@ -59,7 +59,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
59
59
|
};
|
|
60
60
|
conditionMap: {
|
|
61
61
|
type: import("vue").PropType<import("..").IConditionMapType>;
|
|
62
|
-
default: () =>
|
|
62
|
+
default: () => {};
|
|
63
63
|
};
|
|
64
64
|
conditionSid: {
|
|
65
65
|
type: import("vue").PropType<string[]>;
|
|
@@ -292,15 +292,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
292
292
|
};
|
|
293
293
|
edit: {
|
|
294
294
|
type: FunctionConstructor;
|
|
295
|
-
defdault: () =>
|
|
295
|
+
defdault: () => {};
|
|
296
296
|
};
|
|
297
297
|
copy: {
|
|
298
298
|
type: FunctionConstructor;
|
|
299
|
-
defdault: () =>
|
|
299
|
+
defdault: () => {};
|
|
300
300
|
};
|
|
301
301
|
delItem: {
|
|
302
302
|
type: FunctionConstructor;
|
|
303
|
-
defdault: () =>
|
|
303
|
+
defdault: () => {};
|
|
304
304
|
};
|
|
305
305
|
dataSource: {
|
|
306
306
|
type: ArrayConstructor;
|
|
@@ -335,15 +335,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
335
335
|
};
|
|
336
336
|
edit: {
|
|
337
337
|
type: FunctionConstructor;
|
|
338
|
-
defdault: () =>
|
|
338
|
+
defdault: () => {};
|
|
339
339
|
};
|
|
340
340
|
copy: {
|
|
341
341
|
type: FunctionConstructor;
|
|
342
|
-
defdault: () =>
|
|
342
|
+
defdault: () => {};
|
|
343
343
|
};
|
|
344
344
|
delItem: {
|
|
345
345
|
type: FunctionConstructor;
|
|
346
|
-
defdault: () =>
|
|
346
|
+
defdault: () => {};
|
|
347
347
|
};
|
|
348
348
|
dataSource: {
|
|
349
349
|
type: ArrayConstructor;
|
|
@@ -492,15 +492,15 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
492
492
|
};
|
|
493
493
|
edit: {
|
|
494
494
|
type: FunctionConstructor;
|
|
495
|
-
defdault: () =>
|
|
495
|
+
defdault: () => {};
|
|
496
496
|
};
|
|
497
497
|
copy: {
|
|
498
498
|
type: FunctionConstructor;
|
|
499
|
-
defdault: () =>
|
|
499
|
+
defdault: () => {};
|
|
500
500
|
};
|
|
501
501
|
delItem: {
|
|
502
502
|
type: FunctionConstructor;
|
|
503
|
-
defdault: () =>
|
|
503
|
+
defdault: () => {};
|
|
504
504
|
};
|
|
505
505
|
dataSource: {
|
|
506
506
|
type: ArrayConstructor;
|
|
@@ -943,7 +943,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
943
943
|
};
|
|
944
944
|
conditionMap: {
|
|
945
945
|
type: import("vue").PropType<import("..").IConditionMapType>;
|
|
946
|
-
default: () =>
|
|
946
|
+
default: () => {};
|
|
947
947
|
};
|
|
948
948
|
conditionSid: {
|
|
949
949
|
type: import("vue").PropType<string[]>;
|
|
@@ -79,15 +79,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
};
|
|
80
80
|
edit: {
|
|
81
81
|
type: FunctionConstructor;
|
|
82
|
-
defdault: () =>
|
|
82
|
+
defdault: () => {};
|
|
83
83
|
};
|
|
84
84
|
copy: {
|
|
85
85
|
type: FunctionConstructor;
|
|
86
|
-
defdault: () =>
|
|
86
|
+
defdault: () => {};
|
|
87
87
|
};
|
|
88
88
|
delItem: {
|
|
89
89
|
type: FunctionConstructor;
|
|
90
|
-
defdault: () =>
|
|
90
|
+
defdault: () => {};
|
|
91
91
|
};
|
|
92
92
|
dataSource: {
|
|
93
93
|
type: ArrayConstructor;
|
|
@@ -122,15 +122,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
122
|
};
|
|
123
123
|
edit: {
|
|
124
124
|
type: FunctionConstructor;
|
|
125
|
-
defdault: () =>
|
|
125
|
+
defdault: () => {};
|
|
126
126
|
};
|
|
127
127
|
copy: {
|
|
128
128
|
type: FunctionConstructor;
|
|
129
|
-
defdault: () =>
|
|
129
|
+
defdault: () => {};
|
|
130
130
|
};
|
|
131
131
|
delItem: {
|
|
132
132
|
type: FunctionConstructor;
|
|
133
|
-
defdault: () =>
|
|
133
|
+
defdault: () => {};
|
|
134
134
|
};
|
|
135
135
|
dataSource: {
|
|
136
136
|
type: ArrayConstructor;
|
|
@@ -279,15 +279,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
279
279
|
};
|
|
280
280
|
edit: {
|
|
281
281
|
type: FunctionConstructor;
|
|
282
|
-
defdault: () =>
|
|
282
|
+
defdault: () => {};
|
|
283
283
|
};
|
|
284
284
|
copy: {
|
|
285
285
|
type: FunctionConstructor;
|
|
286
|
-
defdault: () =>
|
|
286
|
+
defdault: () => {};
|
|
287
287
|
};
|
|
288
288
|
delItem: {
|
|
289
289
|
type: FunctionConstructor;
|
|
290
|
-
defdault: () =>
|
|
290
|
+
defdault: () => {};
|
|
291
291
|
};
|
|
292
292
|
dataSource: {
|
|
293
293
|
type: ArrayConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as i,useAttrs as t,computed as n,watch as
|
|
1
|
+
import{defineComponent as e,ref as i,useAttrs as t,computed as n,watch as a,openBlock as o,createElementBlock as l,createVNode as s,mergeProps as r,unref as c,withCtx as d,createTextVNode as f}from"vue";import{useMessage as u,NButton as p}from"naive-ui";import v from"../table-modal/index.vue.js";import g from"../search-filter/index.vue.js";import C from"../../../../table-filter/src/hooks/useMixins.js";import y from"../../../../../_virtual/plugin-vue_export-helper.js";const m={class:"search"};var b=y(e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},conditionList:{type:Array,default:()=>[]},settingId:String,filterApiConfig:{type:Object,default:()=>({})},classifyModal:{type:Boolean,default:!1}},emits:["CondiTionListInit","saveGetTableCondiTionList","setClassifyModal"],setup(e,{emit:y}){const b=e,h=u(),{handleGetConfigApi:A}=C();let L=i(b.conditionList),I=i(),T=i(!1),S=i({}),_=i([]),j=i(!1);const O=i(null),x=t();async function F(e){try{let i=Object.assign(e,{id:b.settingId,tableId:x.tableId});await A(i,"requestSaveTableCondiTionSetting",{},b.filterApiConfig)&&(y("CondiTionListInit"),H(!1))}catch(e){console.log(e)}}function k(){H(!1),L.value.forEach((e=>{e.checked=!1}))}function w(){T.value=!0}function G(e,i){T.value=!0,S.value=Object.assign(e,{from:"edit"})}function M(e,i){T.value=!0,S.value=Object.assign(e,{from:"copy"})}async function q(e){try{if(Object.assign(e,{tableId:x.tableId,conditionList:JSON.stringify(L.value)}),j.value=!0,!await A(e,"requestSaveTableCondiTion",{},b.filterApiConfig))return;O.value&&O.value.cancelSaveAdd(),y("saveGetTableCondiTionList"),T.value=!1}catch(e){console.log(e)}finally{j.value=!1}}function R(){T.value=!1,S.value={}}function D(e,i){L.value=e,I.value=i}async function E(e,i){if(e)try{let i={id:e.sid};if(!await A(i,"requestDeleteTableCondiTion",{},b.filterApiConfig))return;h.success("删除成功"),y("saveGetTableCondiTionList",{type:"delete",item:e})}catch(e){console.log(e)}else h.info("请选择行")}function H(e){y("setClassifyModal",e)}async function K(){try{let e={id:b.settingId,tableId:x.tableId,type:"SEARCH_CATEGORY"};await A(e,"requestResetDefaultSetting",{},b.filterApiConfig)&&(y("CondiTionListInit"),H(!1))}catch(e){console.log(e)}}let N=n((()=>b.classifyModal));return a((()=>x.searchKey),(()=>{x.selectKeys=[x.searchKey||"all"]})),a((()=>b.searchFieldList),(e=>{e&&e.length>0&&(_.value=e.filter((e=>"operatorColumn"!==e.columnName)))}),{immediate:!0,deep:!0}),a((()=>b.conditionList),(e=>{L.value=e}),{immediate:!0,deep:!0}),a((()=>T),(e=>{e||(S.value={})})),(i,t)=>(o(),l("div",m,[s(v,r({dataSource:c(L),visibleIn:c(N)},i.$attrs,{onHandleOk:F,onClose:k,onChangeData:D,onResetPopconfirm:K,edit:G,copy:M,delItem:E,type:"search",filterApiConfig:e.filterApiConfig}),{add:d((()=>[s(c(p),{type:"info",onClick:w},{default:d((()=>[f("新增")])),_:1})])),_:1},16,["dataSource","visibleIn","filterApiConfig"]),s(g,r({ref_key:"searchFilter",ref:O},i.$attrs,{visible:c(T),loading:c(j),conditionList:c(L),actionList_prop:c(S),searchFieldList:c(_),isInSearch:!0,isCnHis:!0,showCompareField:!0,filterApiConfig:e.filterApiConfig,onSaveAdd:q,onCancelSaveAdd:R}),null,16,["visible","loading","conditionList","actionList_prop","searchFieldList","filterApiConfig"])]))}}),[["__file","index.vue"]]);export{b as default};
|
|
@@ -11,15 +11,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
edit: {
|
|
13
13
|
type: FunctionConstructor;
|
|
14
|
-
defdault: () =>
|
|
14
|
+
defdault: () => {};
|
|
15
15
|
};
|
|
16
16
|
copy: {
|
|
17
17
|
type: FunctionConstructor;
|
|
18
|
-
defdault: () =>
|
|
18
|
+
defdault: () => {};
|
|
19
19
|
};
|
|
20
20
|
delItem: {
|
|
21
21
|
type: FunctionConstructor;
|
|
22
|
-
defdault: () =>
|
|
22
|
+
defdault: () => {};
|
|
23
23
|
};
|
|
24
24
|
dataSource: {
|
|
25
25
|
type: ArrayConstructor;
|
|
@@ -54,15 +54,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
};
|
|
55
55
|
edit: {
|
|
56
56
|
type: FunctionConstructor;
|
|
57
|
-
defdault: () =>
|
|
57
|
+
defdault: () => {};
|
|
58
58
|
};
|
|
59
59
|
copy: {
|
|
60
60
|
type: FunctionConstructor;
|
|
61
|
-
defdault: () =>
|
|
61
|
+
defdault: () => {};
|
|
62
62
|
};
|
|
63
63
|
delItem: {
|
|
64
64
|
type: FunctionConstructor;
|
|
65
|
-
defdault: () =>
|
|
65
|
+
defdault: () => {};
|
|
66
66
|
};
|
|
67
67
|
dataSource: {
|
|
68
68
|
type: ArrayConstructor;
|
|
@@ -211,15 +211,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
211
211
|
};
|
|
212
212
|
edit: {
|
|
213
213
|
type: FunctionConstructor;
|
|
214
|
-
defdault: () =>
|
|
214
|
+
defdault: () => {};
|
|
215
215
|
};
|
|
216
216
|
copy: {
|
|
217
217
|
type: FunctionConstructor;
|
|
218
|
-
defdault: () =>
|
|
218
|
+
defdault: () => {};
|
|
219
219
|
};
|
|
220
220
|
delItem: {
|
|
221
221
|
type: FunctionConstructor;
|
|
222
|
-
defdault: () =>
|
|
222
|
+
defdault: () => {};
|
|
223
223
|
};
|
|
224
224
|
dataSource: {
|
|
225
225
|
type: ArrayConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as n,watch as a,openBlock as o,createBlock as s,unref as r,normalizeClass as u,withCtx as c,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as z,NModal as S,NCard as _,NTooltip as D,NIcon as E,NSwitch as M,NPopconfirm as P,NButton as I}from"naive-ui";import{ReorderTwo as U,Brush as N,DocumentOutline as V}from"@vicons/ionicons5";import O from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as F}from"../../const/index.js";import B from"axios";import j from"../../../../../_virtual/plugin-vue_export-helper.js";const A={class:"svg-wrap"},H={class:"flex_between"},R={key:0},$={class:"table-modal-list"},J={class:"list-title"},T=v("span",{class:"list-title-item",style:{width:"6%"}},null,-1),Y=v("span",{class:"list-title-item"}," 名称 ",-1),q=v("span",{class:"list-title-item"}," 父类名称 ",-1),G=v("span",{class:"list-title-item"}," 是否显示 ",-1),K=v("span",{class:"list-title-item"}," 设置为默认 ",-1),L={class:"list-title-item"},Q=v("span",{class:"list-title-item"}," 操作 ",-1),W=["onClick"],X={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},Z=["title"],ee=["title"],te={class:"list-content-item list-content-switch"},ie={class:"list-content-item list-content-radio"},le={class:"list-content-item"},ne={class:"list-content-item"},ae={key:0},oe=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),se={key:1},re=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var ue=j(e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>{}},copy:{type:Function,defdault:()=>{}},delItem:{type:Function,defdault:()=>{}},dataSource:{type:Array,default:()=>[]},type:{type:String},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","changeData","resetPopconfirm","finishSubmit"],setup(e,{emit:j}){const ue=e,ce=B.create({}),de=t(),pe=b(),me=z(),ve=i((()=>(null==de?void 0:de.isOrgAdmin)||!1)),he=l(ue.dataSource),fe=l(ue.visibleIn),ge=l(!1),ye=l("other"==ue.type?"100%":"860px"),Ce=l("654px"),we=n(F);function ke(){ue.type&&(ze(),j("handleOk",function(e){if("search"==e||"other"==e)return{id:"",tableId:"",setting:JSON.stringify(he.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))};if("mananger"==e){let e={};return he.value.forEach(((t,i)=>{const l=(null==t?void 0:t.id)||"";e[l]={id:l,index:i,default:t.isDefault?1:0,isHide:t.isShow?0:1}})),{type:"HOMEPAGE",tableId:"10001",setting:JSON.stringify({pageConfig:e})}}return}(ue.type)))}function xe(){be()}function be(){fe.value=!1,ze(),j("close")}function ze(){ye.value="860px",Ce.value="654px",ge.value=!1}function Se(){j("changeData",he.value)}function _e(){ge.value=!ge.value;let e=document.body.clientHeight;ye.value="860px"===ye.value?"100%":"860px",Ce.value="654px"===Ce.value?`${e}px`:"654px"}function De(e){j("resetPopconfirm",e)}function Ee(e,t,i){const l=ue[e];l&&l(t,i)}return a((()=>ue.visibleIn),(e=>{fe.value=e})),a((()=>ue.dataSource),(e=>{he.value=e}),{immediate:!0,deep:!0}),(t,i)=>(o(),s(r(S),{show:fe.value,bodyStyle:{height:Ce.value,overflowY:"auto"},width:ye.value,maskClosable:!1,class:u(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":ge.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:ke,onNegativeClick:be},{default:c((()=>[d(r(_),{style:p({width:ye.value,height:Ce.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},m({"header-extra":c((()=>[v("div",A,[v("i",{onClick:_e,class:u(["iconfont-table-filter",ge.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),v("i",{onClick:be,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),default:c((()=>[r(ve)&&"mananger"==e.type?(o(),h("p",R,[v("span",{onClick:xe}," 添加首页 ")])):f("v-if",!0),v("div",$,[v("div",J,[T,Y,q,G,K,g(v("span",L," 设置公共首页 ",512),[[y,r(ve)&&"mananger"==e.type]]),Q]),d(r(O),{class:"list-content",tag:"ul",list:he.value,"item-key":"sid",onEnd:Se,animation:"300"},{item:c((({element:t})=>[g(v("li",{class:u({checked:t.checked}),onClick:e=>{return i=t,he.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1})),void j("changeData",he.value,i);var i}},[v("span",X,[d(r(D),{mouseEnterDelay:1},{trigger:c((()=>[d(r(E),{component:r(U),size:"24"},null,8,["component"])])),default:c((()=>[C(" 拖拽调整顺序 ")])),_:1})]),v("span",{title:t.displayCategory,class:"list-content-item"},w(t.name),9,Z),v("span",{title:t.name,class:"list-content-item"},w(t.displayCategory),9,ee),v("span",te,[d(r(M),{"onUpdate:value":e=>{return i=t,void he.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),v("span",ie,[d(r(M),{"onUpdate:value":e=>{var i;(i=t).isShow&&he.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),g(v("span",le,[d(r(M),{"onUpdate:value":e=>function(e){function t(e){let t="";for(const i in e)t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i])+"&";return t=t.slice(0,-1),t}me.warning({title:`是否确定${e.isCommon?"取消":"设置"}公共首页?`,positiveText:"确定",negativeText:"取消",maskClosable:!1,onPositiveClick:()=>{let i={id:e.id,setCommon:!e.isCommon};ce({url:"homePage/updateCommon",method:"post",data:i,transformRequest:[t]}).then((t=>{"SUCCESS"===t.data.result?(pe.success(t.data.resultMsg),e.isCommon=!e.isCommon,j("finishSubmit")):pe.error(t.data.resultMsg)})).catch((e=>{console.log(e)}))},onNegativeClick:()=>{}})}(t),size:"small",value:t.isCommon},null,8,["onUpdate:value","value"])],512),[[y,r(ve)&&"mananger"==e.type]]),v("span",ne,["mananger"==e.type&&r(ve)?(o(),h("span",ae,[d(r(P),{onPositiveClick:e=>Ee("confirm",t)},{trigger:c((()=>[d(r(E),null,{default:c((()=>[oe])),_:1})])),default:c((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0),f(" 编辑 "),g(v("span",null,[d(r(D),null,{trigger:c((()=>[d(r(E),{component:r(N),onClick:k((e=>Ee("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[C(" 编辑 ")])),_:2},1024)],512),[[y,"other"==e.type||"search"==e.type&&t.isEdit||"mananger"==e.type&&r(ve)]]),f(" 复制 "),g(v("span",null,[d(r(D),null,{trigger:c((()=>[d(r(E),{component:r(V),onClick:k((e=>Ee("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[C(" 复制 ")])),_:2},1024)],512),[[y,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(o(),h("span",se,[d(r(P),{onPositiveClick:e=>Ee("delItem",t,"删除")},{trigger:c((()=>[d(r(E),null,{default:c((()=>[re])),_:1})])),default:c((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,W),[[y,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:c((()=>[v("div",H,[v("div",null,[r(we)?(o(),s(r(P),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:De},{trigger:c((()=>[d(r(I),null,{default:c((()=>[C("恢复默认设置")])),_:1})])),default:c((()=>[C(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),v("div",null,[d(r(I),{onClick:be},{default:c((()=>[C("取消")])),_:1}),x(t.$slots,"add"),d(r(I),{type:"info",onClick:ke},{default:c((()=>[C("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}}),[["__file","index.vue"]]);export{ue as default};
|
|
1
|
+
import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as n,watch as a,openBlock as o,createBlock as s,unref as r,normalizeClass as u,withCtx as c,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as z,NModal as S,NCard as _,NTooltip as D,NIcon as E,NSwitch as M,NPopconfirm as P,NButton as I}from"naive-ui";import{ReorderTwo as U,Brush as N,DocumentOutline as V}from"@vicons/ionicons5";import O from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as F}from"../../const/index.js";import B from"axios";import j from"../../../../../_virtual/plugin-vue_export-helper.js";const A={class:"svg-wrap"},H={class:"flex_between"},R={key:0},$={class:"table-modal-list"},J={class:"list-title"},T=v("span",{class:"list-title-item",style:{width:"6%"}},null,-1),Y=v("span",{class:"list-title-item"}," 名称 ",-1),q=v("span",{class:"list-title-item"}," 父类名称 ",-1),G=v("span",{class:"list-title-item"}," 是否显示 ",-1),K=v("span",{class:"list-title-item"}," 设置为默认 ",-1),L={class:"list-title-item"},Q=v("span",{class:"list-title-item"}," 操作 ",-1),W=["onClick"],X={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},Z=["title"],ee=["title"],te={class:"list-content-item list-content-switch"},ie={class:"list-content-item list-content-radio"},le={class:"list-content-item"},ne={class:"list-content-item"},ae={key:0},oe=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),se={key:1},re=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var ue=j(e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>({})},copy:{type:Function,defdault:()=>({})},delItem:{type:Function,defdault:()=>({})},dataSource:{type:Array,default:()=>[]},type:{type:String},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","changeData","resetPopconfirm","finishSubmit"],setup(e,{emit:j}){const ue=e,ce=B.create({}),de=t(),pe=b(),me=z(),ve=i((()=>(null==de?void 0:de.isOrgAdmin)||!1)),he=l(ue.dataSource),fe=l(ue.visibleIn),ge=l(!1),ye=l("other"==ue.type?"100%":"860px"),Ce=l("654px"),we=n(F);function ke(){ue.type&&(ze(),j("handleOk",function(e){if("search"==e||"other"==e)return{id:"",tableId:"",setting:JSON.stringify(he.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))};if("mananger"==e){let e={};return he.value.forEach(((t,i)=>{const l=(null==t?void 0:t.id)||"";e[l]={id:l,index:i,default:t.isDefault?1:0,isHide:t.isShow?0:1}})),{type:"HOMEPAGE",tableId:"10001",setting:JSON.stringify({pageConfig:e})}}return}(ue.type)))}function xe(){be()}function be(){fe.value=!1,ze(),j("close")}function ze(){ye.value="860px",Ce.value="654px",ge.value=!1}function Se(){j("changeData",he.value)}function _e(){ge.value=!ge.value;let e=document.body.clientHeight;ye.value="860px"===ye.value?"100%":"860px",Ce.value="654px"===Ce.value?`${e}px`:"654px"}function De(e){j("resetPopconfirm",e)}function Ee(e,t,i){const l=ue[e];l&&l(t,i)}return a((()=>ue.visibleIn),(e=>{fe.value=e})),a((()=>ue.dataSource),(e=>{he.value=e}),{immediate:!0,deep:!0}),(t,i)=>(o(),s(r(S),{show:fe.value,bodyStyle:{height:Ce.value,overflowY:"auto"},width:ye.value,maskClosable:!1,class:u(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":ge.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:ke,onNegativeClick:be},{default:c((()=>[d(r(_),{style:p({width:ye.value,height:Ce.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},m({"header-extra":c((()=>[v("div",A,[v("i",{onClick:_e,class:u(["iconfont-table-filter",ge.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),v("i",{onClick:be,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),default:c((()=>[r(ve)&&"mananger"==e.type?(o(),h("p",R,[v("span",{onClick:xe}," 添加首页 ")])):f("v-if",!0),v("div",$,[v("div",J,[T,Y,q,G,K,g(v("span",L," 设置公共首页 ",512),[[y,r(ve)&&"mananger"==e.type]]),Q]),d(r(O),{class:"list-content",tag:"ul",list:he.value,"item-key":"sid",onEnd:Se,animation:"300"},{item:c((({element:t})=>[g(v("li",{class:u({checked:t.checked}),onClick:e=>{return i=t,he.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1})),void j("changeData",he.value,i);var i}},[v("span",X,[d(r(D),{mouseEnterDelay:1},{trigger:c((()=>[d(r(E),{component:r(U),size:"24"},null,8,["component"])])),default:c((()=>[C(" 拖拽调整顺序 ")])),_:1})]),v("span",{title:t.displayCategory,class:"list-content-item"},w(t.name),9,Z),v("span",{title:t.name,class:"list-content-item"},w(t.displayCategory),9,ee),v("span",te,[d(r(M),{"onUpdate:value":e=>{return i=t,void he.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),v("span",ie,[d(r(M),{"onUpdate:value":e=>{var i;(i=t).isShow&&he.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),g(v("span",le,[d(r(M),{"onUpdate:value":e=>function(e){function t(e){let t="";for(const i in e)t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i])+"&";return t=t.slice(0,-1),t}me.warning({title:`是否确定${e.isCommon?"取消":"设置"}公共首页?`,positiveText:"确定",negativeText:"取消",maskClosable:!1,onPositiveClick:()=>{let i={id:e.id,setCommon:!e.isCommon};ce({url:"homePage/updateCommon",method:"post",data:i,transformRequest:[t]}).then((t=>{"SUCCESS"===t.data.result?(pe.success(t.data.resultMsg),e.isCommon=!e.isCommon,j("finishSubmit")):pe.error(t.data.resultMsg)})).catch((e=>{console.log(e)}))},onNegativeClick:()=>({})})}(t),size:"small",value:t.isCommon},null,8,["onUpdate:value","value"])],512),[[y,r(ve)&&"mananger"==e.type]]),v("span",ne,["mananger"==e.type&&r(ve)?(o(),h("span",ae,[d(r(P),{onPositiveClick:e=>Ee("confirm",t)},{trigger:c((()=>[d(r(E),null,{default:c((()=>[oe])),_:1})])),default:c((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0),f(" 编辑 "),g(v("span",null,[d(r(D),null,{trigger:c((()=>[d(r(E),{component:r(N),onClick:k((e=>Ee("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[C(" 编辑 ")])),_:2},1024)],512),[[y,"other"==e.type||"search"==e.type&&t.isEdit||"mananger"==e.type&&r(ve)]]),f(" 复制 "),g(v("span",null,[d(r(D),null,{trigger:c((()=>[d(r(E),{component:r(V),onClick:k((e=>Ee("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:c((()=>[C(" 复制 ")])),_:2},1024)],512),[[y,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(o(),h("span",se,[d(r(P),{onPositiveClick:e=>Ee("delItem",t,"删除")},{trigger:c((()=>[d(r(E),null,{default:c((()=>[re])),_:1})])),default:c((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,W),[[y,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:c((()=>[v("div",H,[v("div",null,[r(we)?(o(),s(r(P),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:De},{trigger:c((()=>[d(r(I),null,{default:c((()=>[C("恢复默认设置")])),_:1})])),default:c((()=>[C(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),v("div",null,[d(r(I),{onClick:be},{default:c((()=>[C("取消")])),_:1}),x(t.$slots,"add"),d(r(I),{type:"info",onClick:ke},{default:c((()=>[C("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}}),[["__file","index.vue"]]);export{ue as default};
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
conditionMap: {
|
|
13
13
|
type: PropType<IConditionMapType>;
|
|
14
|
-
default: () =>
|
|
14
|
+
default: () => {};
|
|
15
15
|
};
|
|
16
16
|
conditionSid: {
|
|
17
17
|
type: PropType<string[]>;
|
|
@@ -60,7 +60,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
60
|
};
|
|
61
61
|
conditionMap: {
|
|
62
62
|
type: PropType<IConditionMapType>;
|
|
63
|
-
default: () =>
|
|
63
|
+
default: () => {};
|
|
64
64
|
};
|
|
65
65
|
conditionSid: {
|
|
66
66
|
type: PropType<string[]>;
|
|
@@ -293,15 +293,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
293
293
|
};
|
|
294
294
|
edit: {
|
|
295
295
|
type: FunctionConstructor;
|
|
296
|
-
defdault: () =>
|
|
296
|
+
defdault: () => {};
|
|
297
297
|
};
|
|
298
298
|
copy: {
|
|
299
299
|
type: FunctionConstructor;
|
|
300
|
-
defdault: () =>
|
|
300
|
+
defdault: () => {};
|
|
301
301
|
};
|
|
302
302
|
delItem: {
|
|
303
303
|
type: FunctionConstructor;
|
|
304
|
-
defdault: () =>
|
|
304
|
+
defdault: () => {};
|
|
305
305
|
};
|
|
306
306
|
dataSource: {
|
|
307
307
|
type: ArrayConstructor;
|
|
@@ -336,15 +336,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
336
336
|
};
|
|
337
337
|
edit: {
|
|
338
338
|
type: FunctionConstructor;
|
|
339
|
-
defdault: () =>
|
|
339
|
+
defdault: () => {};
|
|
340
340
|
};
|
|
341
341
|
copy: {
|
|
342
342
|
type: FunctionConstructor;
|
|
343
|
-
defdault: () =>
|
|
343
|
+
defdault: () => {};
|
|
344
344
|
};
|
|
345
345
|
delItem: {
|
|
346
346
|
type: FunctionConstructor;
|
|
347
|
-
defdault: () =>
|
|
347
|
+
defdault: () => {};
|
|
348
348
|
};
|
|
349
349
|
dataSource: {
|
|
350
350
|
type: ArrayConstructor;
|
|
@@ -493,15 +493,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
493
493
|
};
|
|
494
494
|
edit: {
|
|
495
495
|
type: FunctionConstructor;
|
|
496
|
-
defdault: () =>
|
|
496
|
+
defdault: () => {};
|
|
497
497
|
};
|
|
498
498
|
copy: {
|
|
499
499
|
type: FunctionConstructor;
|
|
500
|
-
defdault: () =>
|
|
500
|
+
defdault: () => {};
|
|
501
501
|
};
|
|
502
502
|
delItem: {
|
|
503
503
|
type: FunctionConstructor;
|
|
504
|
-
defdault: () =>
|
|
504
|
+
defdault: () => {};
|
|
505
505
|
};
|
|
506
506
|
dataSource: {
|
|
507
507
|
type: ArrayConstructor;
|
|
@@ -944,7 +944,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
944
944
|
};
|
|
945
945
|
conditionMap: {
|
|
946
946
|
type: PropType<IConditionMapType>;
|
|
947
|
-
default: () =>
|
|
947
|
+
default: () => {};
|
|
948
948
|
};
|
|
949
949
|
conditionSid: {
|
|
950
950
|
type: PropType<string[]>;
|