@ibiz-template/vue3-components 0.2.8 → 0.2.10

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.
Files changed (80) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/index.system.min.js +5 -5
  3. package/dist/index.system.min.js.map +1 -1
  4. package/dist/map-chart-7nfIdU3w.js +2 -0
  5. package/dist/map-chart-7nfIdU3w.js.map +1 -0
  6. package/es/common/data-import/data-import.css +1 -0
  7. package/es/common/data-import/data-import.d.ts +34 -0
  8. package/es/common/data-import/data-import.mjs +147 -0
  9. package/es/common/index.d.ts +1 -0
  10. package/es/common/index.mjs +2 -0
  11. package/es/common/map-chart/map-chart.d.ts +15 -14
  12. package/es/common/map-chart/map-chart.mjs +20 -10
  13. package/es/common/map-chart/map-chart.util.d.ts +11 -1
  14. package/es/common/map-chart/map-chart.util.mjs +12 -2
  15. package/es/common/map-chart/map-manager.d.ts +1 -1
  16. package/es/common/map-chart/map-manager.mjs +6 -6
  17. package/es/control/form/form-detail/form-button/form-button.css +1 -1
  18. package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
  19. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +1 -1
  20. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.mjs +3 -3
  21. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.mjs +1 -1
  22. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +1 -1
  23. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.mjs +1 -1
  24. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.mjs +1 -1
  25. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs +1 -1
  26. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.mjs +1 -1
  27. package/es/control/map/map.d.ts +15 -0
  28. package/es/control/map/map.mjs +10 -3
  29. package/es/control/toolbar/export-excel/export-excel.mjs +54 -52
  30. package/es/control/toolbar/toolbar.css +1 -1
  31. package/es/control/toolbar/toolbar.mjs +1 -1
  32. package/es/editor/autocomplete/autocomplete-editor.controller.mjs +7 -4
  33. package/es/editor/data-picker/picker-editor.controller.mjs +12 -10
  34. package/es/editor/list-box/list-box-picker-editor.controller.mjs +3 -2
  35. package/es/index.mjs +1 -1
  36. package/es/panel-component/multi-data-container/multi-data-container-item.controller.d.ts +5 -2
  37. package/es/panel-component/multi-data-container/multi-data-container-item.controller.mjs +27 -2
  38. package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +2 -0
  39. package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +20 -4
  40. package/es/panel-component/panel-button/panel-button.css +1 -1
  41. package/es/panel-component/panel-button/panel-button.mjs +1 -1
  42. package/es/panel-component/panel-field/panel-field.controller.mjs +3 -8
  43. package/es/panel-component/single-data-container/single-data-container.controller.d.ts +9 -0
  44. package/es/panel-component/single-data-container/single-data-container.controller.mjs +38 -4
  45. package/es/view-engine/login-view.engine.d.ts +2 -0
  46. package/es/view-engine/login-view.engine.mjs +19 -0
  47. package/lib/common/data-import/data-import.cjs +149 -0
  48. package/lib/common/data-import/data-import.css +1 -0
  49. package/lib/common/index.cjs +2 -0
  50. package/lib/common/map-chart/map-chart.cjs +19 -9
  51. package/lib/common/map-chart/map-chart.util.cjs +12 -2
  52. package/lib/common/map-chart/map-manager.cjs +6 -6
  53. package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
  54. package/lib/control/form/form-detail/form-button/form-button.css +1 -1
  55. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.cjs +2 -2
  56. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +1 -1
  57. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.cjs +1 -1
  58. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +1 -1
  59. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.cjs +1 -1
  60. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.cjs +1 -1
  61. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.cjs +1 -1
  62. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.cjs +1 -1
  63. package/lib/control/map/map.cjs +9 -2
  64. package/lib/control/toolbar/export-excel/export-excel.cjs +54 -52
  65. package/lib/control/toolbar/toolbar.cjs +1 -1
  66. package/lib/control/toolbar/toolbar.css +1 -1
  67. package/lib/editor/autocomplete/autocomplete-editor.controller.cjs +7 -4
  68. package/lib/editor/data-picker/picker-editor.controller.cjs +11 -9
  69. package/lib/editor/list-box/list-box-picker-editor.controller.cjs +3 -2
  70. package/lib/index.cjs +1 -1
  71. package/lib/panel-component/multi-data-container/multi-data-container-item.controller.cjs +26 -1
  72. package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +19 -3
  73. package/lib/panel-component/panel-button/panel-button.cjs +1 -1
  74. package/lib/panel-component/panel-button/panel-button.css +1 -1
  75. package/lib/panel-component/panel-field/panel-field.controller.cjs +3 -8
  76. package/lib/panel-component/single-data-container/single-data-container.controller.cjs +37 -3
  77. package/lib/view-engine/login-view.engine.cjs +19 -0
  78. package/package.json +4 -4
  79. package/dist/map-chart-yT41jdRg.js +0 -2
  80. package/dist/map-chart-yT41jdRg.js.map +0 -1
@@ -0,0 +1,149 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('./data-import.css');
6
+ var runtime = require('@ibiz-template/runtime');
7
+
8
+ "use strict";
9
+ const DataImport = /* @__PURE__ */ vue.defineComponent({
10
+ name: "DataImport",
11
+ props: {
12
+ dismiss: {
13
+ type: Function,
14
+ required: true
15
+ },
16
+ appDataEntity: {
17
+ type: Object,
18
+ required: true
19
+ }
20
+ },
21
+ setup(props) {
22
+ const ns = vue3Util.useNamespace("data-import");
23
+ const inputUpLoad = vue.ref();
24
+ const message = vue.ref({
25
+ state: "ready",
26
+ message: ""
27
+ });
28
+ const isLoading = vue.ref(false);
29
+ const onFileChange = async ($event) => {
30
+ const obj = $event.target;
31
+ if (!obj.files) {
32
+ return;
33
+ }
34
+ const selectedFile = obj.files[0];
35
+ obj.value = null;
36
+ let result;
37
+ isLoading.value = true;
38
+ try {
39
+ if (ibiz.env.enableMqtt) {
40
+ result = await runtime.asyncImportData(selectedFile, props.appDataEntity);
41
+ } else {
42
+ result = await runtime.importData(selectedFile, props.appDataEntity);
43
+ }
44
+ ibiz.mc.command.send({
45
+ srfdecodename: props.appDataEntity.codeName
46
+ }, "OBJECTCREATED");
47
+ const {
48
+ success,
49
+ total,
50
+ message: _message
51
+ } = result;
52
+ const totalNum = total ? Number(total) : 0;
53
+ const successNum = success ? Number(success) : 0;
54
+ const errorNum = total - success;
55
+ message.value.state = _message ? "error" : "over";
56
+ message.value.message = _message || `\u5171\u8BA1\u5BFC\u5165\u6570\u636E ${totalNum} \u6761\uFF0C\u9519\u8BEF[${errorNum}]\uFF0C\u6210\u529F[${successNum}]`;
57
+ } finally {
58
+ isLoading.value = false;
59
+ }
60
+ };
61
+ const onLinkClick = async () => {
62
+ var _a;
63
+ const templateUrl = `${props.appDataEntity.codeName2.toLowerCase()}/importtemplate`;
64
+ const res = await ibiz.net.request(templateUrl, {
65
+ responseType: "blob"
66
+ });
67
+ if (res.status === 200) {
68
+ let fileName = ((_a = res.headers["content-disposition"].split(";").find((str) => str.indexOf("filename=") !== -1)) == null ? void 0 : _a.slice(9)) || "";
69
+ fileName = decodeURIComponent(fileName);
70
+ const blob = new Blob([res.data], {
71
+ type: "application/vnd.ms-excel"
72
+ });
73
+ const elink = document.createElement("a");
74
+ elink.download = fileName;
75
+ elink.style.display = "none";
76
+ elink.href = URL.createObjectURL(blob);
77
+ document.body.appendChild(elink);
78
+ elink.click();
79
+ URL.revokeObjectURL(elink.href);
80
+ document.body.removeChild(elink);
81
+ }
82
+ };
83
+ const selectFile = () => {
84
+ inputUpLoad.value.click();
85
+ };
86
+ const onCancelButtonClick = () => {
87
+ props.dismiss();
88
+ };
89
+ return {
90
+ ns,
91
+ onLinkClick,
92
+ selectFile,
93
+ onCancelButtonClick,
94
+ onFileChange,
95
+ inputUpLoad,
96
+ isLoading,
97
+ message
98
+ };
99
+ },
100
+ render() {
101
+ return vue.withDirectives(vue.createVNode("div", {
102
+ "class": this.ns.b()
103
+ }, [vue.createVNode("input", {
104
+ "ref": "inputUpLoad",
105
+ "type": "file",
106
+ "style": "display: none",
107
+ "accept": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
108
+ "onChange": this.onFileChange
109
+ }, null), vue.createVNode("div", {
110
+ "class": this.ns.e("caption")
111
+ }, [vue.createTextVNode("\u5BFC\u5165\u6570\u636E")]), this.message.state === "ready" ? vue.createVNode("div", {
112
+ "class": this.ns.b("upload"),
113
+ "onClick": this.selectFile
114
+ }, [vue.createVNode("img", {
115
+ "class": this.ns.be("upload", "img"),
116
+ "src": "./assets/images/icon-import.svg"
117
+ }, null), vue.createVNode("span", {
118
+ "class": this.ns.be("upload", "text")
119
+ }, [vue.createTextVNode("\u5355\u51FB\u6B64\u533A\u57DF\u8FDB\u884C\u4E0A\u4F20")])]) : vue.createVNode("div", {
120
+ "class": [this.ns.b("message")]
121
+ }, [vue.createVNode("div", {
122
+ "class": this.ns.be("message", "title")
123
+ }, [vue.createTextVNode("\u5BFC\u5165\u7ED3\u679C")]), vue.createVNode("div", {
124
+ "class": [this.ns.be("message", "content"), this.ns.is("error", this.message.state === "error")]
125
+ }, [this.message.message])]), vue.createVNode("div", {
126
+ "class": this.ns.e("template-container")
127
+ }, [vue.createVNode("div", {
128
+ "class": this.ns.e("template-description")
129
+ }, [vue.createTextVNode("\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248\uFF0C\u5E76\u6309\u8981\u6C42\u586B\u5199\uFF1A")]), vue.createVNode("div", {
130
+ "class": this.ns.e("template-link"),
131
+ "onClick": this.onLinkClick
132
+ }, [vue.createVNode("ion-icon", {
133
+ "class": this.ns.e("link-icon"),
134
+ "name": "link"
135
+ }, null), this.appDataEntity.logicName, vue.createTextVNode("\u6570\u636E\u5BFC\u5165\u6A21\u677F\u6587\u4EF6")])]), vue.createVNode("div", {
136
+ "class": this.ns.e("button-bar")
137
+ }, [vue.createVNode(vue.resolveComponent("el-button"), {
138
+ "onClick": this.onCancelButtonClick
139
+ }, {
140
+ default: () => [vue.createTextVNode("\u53D6\u6D88")]
141
+ }), this.message.state !== "ready" && vue.createVNode(vue.resolveComponent("el-button"), {
142
+ "onClick": this.selectFile
143
+ }, {
144
+ default: () => [vue.createTextVNode("\u7EE7\u7EED\u5BFC\u5165")]
145
+ })])]), [[vue.resolveDirective("loading"), this.isLoading]]);
146
+ }
147
+ });
148
+
149
+ exports.DataImport = DataImport;
@@ -0,0 +1 @@
1
+ .ibiz-data-import{display:flex;flex-flow:column nowrap;width:544px;height:368px;padding:20px;background:var(--ibiz-color-bg-1)}.ibiz-data-import__caption{margin-bottom:16px;font-size:var(--ibiz-font-size-large);font-weight:600;color:var(--ibiz-text-color)}.ibiz-data-import__template-container{padding:16px 12px 0;margin-bottom:16px}.ibiz-data-import__template-link{color:#57a3fd;cursor:pointer}.ibiz-data-import__link-icon{height:19px;margin-right:2px;vertical-align:bottom}.ibiz-data-import__button-bar{margin-right:20px;text-align:right}.ibiz-data-import__button-bar .ivu-btn{margin-left:8px}.ibiz-data-import-upload{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;flex-grow:1;cursor:pointer;background:var(--ibiz-color-bg-1);border:1px dashed var(--ibiz-color-border);border-radius:4px}.ibiz-data-import-upload__img{width:50px;height:50px;margin-bottom:20px}.ibiz-data-import-message{display:flex;flex-flow:column nowrap;flex-grow:1;padding:8px 16px;overflow:auto;cursor:pointer;background:var(--ibiz-color-bg-1);border:1px dashed var(--ibiz-color-border);border-radius:4px}.ibiz-data-import-message__title{font-size:var(--ibiz-font-size-medium);font-weight:600}.ibiz-data-import-message__content{padding-left:16px}.ibiz-data-import-message__content.is-error{color:var(--ibiz-color-danger)}
@@ -20,6 +20,7 @@ var extendActionTimeline = require('./extend-action-timeline/extend-action-timel
20
20
  var viewMessage = require('./view-message/view-message.cjs');
21
21
  var pagination = require('./pagination/pagination.cjs');
22
22
  var sortBar = require('./sort-bar/sort-bar.cjs');
23
+ var dataImport = require('./data-import/data-import.cjs');
23
24
  var controlLoadingPlaceholder = require('./control-loading-placeholder/control-loading-placeholder.cjs');
24
25
 
25
26
  "use strict";
@@ -42,6 +43,7 @@ const IBizCommonComponents = {
42
43
  v.component(viewMessage.ViewMessage.name, viewMessage.ViewMessage);
43
44
  v.component(pagination.IBizPagination.name, pagination.IBizPagination);
44
45
  v.component(sortBar.IBizSortBar.name, sortBar.IBizSortBar);
46
+ v.component(dataImport.DataImport.name, dataImport.DataImport);
45
47
  v.component(
46
48
  "IBizMapChart",
47
49
  vue.defineAsyncComponent({
@@ -22,18 +22,17 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
22
22
  options: {
23
23
  type: Object,
24
24
  default: () => ({})
25
- },
26
- defaultAreaCode: {
27
- type: String,
28
- required: true,
29
- default: "320000"
30
25
  }
31
26
  },
32
27
  setup(props, {
33
28
  emit
34
29
  }) {
35
30
  const ns = vue3Util.useNamespace("map-chart");
36
- const options = vue.computed(() => ramda.mergeDeepRight(mapChart_util.defaultOpts, props.options));
31
+ const options = vue.computed(() => {
32
+ return ramda.mergeDeepWithKey((_key, x, z) => {
33
+ return ramda.isNil(z) ? x : z;
34
+ }, mapChart_util.defaultOpts, props.options);
35
+ });
37
36
  const findData = (id, type) => {
38
37
  if (type === "area" && props.areaData) {
39
38
  return props.areaData.find((item) => item._id === id);
@@ -52,7 +51,10 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
52
51
  } = mapManager.useMapManager(options, (mapName) => {
53
52
  const {
54
53
  visualMap,
55
- pointSymbol
54
+ pointSymbol,
55
+ areaColor,
56
+ hoverAreaColor,
57
+ areaBorderColor
56
58
  } = options.value;
57
59
  const areaData2 = props.areaData || [];
58
60
  const pointData2 = props.pointData || [];
@@ -89,9 +91,17 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
89
91
  // 地图JSON里和name匹配的属性名称
90
92
  nameProperty: "adcodeStr",
91
93
  itemStyle: {
92
- borderColor: "#FFF",
94
+ // 默认区域颜色
95
+ areaColor,
96
+ borderColor: areaBorderColor,
93
97
  borderWidth: 2
94
98
  },
99
+ // 悬浮样式
100
+ emphasis: {
101
+ itemStyle: {
102
+ areaColor: hoverAreaColor
103
+ }
104
+ },
95
105
  tooltip: {
96
106
  formatter: (params) => {
97
107
  if (!params.data) {
@@ -186,7 +196,7 @@ const IBizMapChart = /* @__PURE__ */ vue.defineComponent({
186
196
  }
187
197
  });
188
198
  vue.onMounted(() => {
189
- changeMap(props.defaultAreaCode, true);
199
+ changeMap(options.value.defaultAreaCode, true);
190
200
  });
191
201
  const {
192
202
  areaData,
@@ -4,7 +4,7 @@
4
4
  const GradientColors = ["#90d1e7", "#fff600", "#ff5200"];
5
5
  const defaultOpts = {
6
6
  /** true地图code标识使用字符串,false使用数字 */
7
- strMapCode: false,
7
+ strAreaCode: false,
8
8
  /** 热力图配置 */
9
9
  visualMap: {
10
10
  /** 两端的文本,如 ['高', '低'] */
@@ -16,8 +16,18 @@ const defaultOpts = {
16
16
  /** 热力图渐变颜色数组 */
17
17
  rangeColor: GradientColors
18
18
  },
19
+ /** 区块颜色 */
20
+ areaColor: "#87cefa",
21
+ /** 区块边界颜色 */
22
+ areaBorderColor: "#FFF",
23
+ /** 悬浮时区块颜色 */
24
+ hoverAreaColor: "#fbdb2f",
25
+ /** 点图标 */
19
26
  pointSymbol: "pin",
20
- jsonBaseUrl: "/assets/json/map/jiangsu"
27
+ /** 地图json数据基础路径 */
28
+ jsonBaseUrl: "./assets/json/map",
29
+ /** 默认打开的区域编码 */
30
+ defaultAreaCode: 1e5
21
31
  };
22
32
 
23
33
  exports.GradientColors = GradientColors;
@@ -46,14 +46,15 @@ function useMapManager(opts, calcEchartsOpts, emit) {
46
46
  const changeMap = async (name, isInit = false) => {
47
47
  if (!isInit) {
48
48
  emit("mapChange", {
49
- areaCode: opts.value.strMapCode ? `${name}` : Number(name)
49
+ areaCode: opts.value.strAreaCode ? `${name}` : Number(name)
50
50
  });
51
51
  }
52
- if (!mapInfos.has(name)) {
53
- await registerMap(name);
52
+ const strName = `${name}`;
53
+ if (!mapInfos.has(strName)) {
54
+ await registerMap(strName);
54
55
  }
55
- currentName.value = name;
56
- historyNames.value.push(name);
56
+ currentName.value = strName;
57
+ historyNames.value.push(strName);
57
58
  refresh();
58
59
  };
59
60
  const goBack = () => {
@@ -79,7 +80,6 @@ function useMapManager(opts, calcEchartsOpts, emit) {
79
80
  emit("areaClick", params.data);
80
81
  }
81
82
  if (params.name !== currentName.value) {
82
- debugger;
83
83
  changeMap(params.name);
84
84
  }
85
85
  }
@@ -47,7 +47,7 @@ const FormButton = /* @__PURE__ */ vue.defineComponent({
47
47
  return null;
48
48
  }
49
49
  return vue.createVNode("div", {
50
- "class": [this.ns.b(), this.ns.m(this.modelData.codeName), ...this.controller.containerClass]
50
+ "class": [this.ns.b(), this.ns.m(this.modelData.codeName), this.ns.is("loading", this.controller.state.loading), ...this.controller.containerClass]
51
51
  }, [vue.createVNode(vue.resolveComponent("el-button"), {
52
52
  "sime": "small",
53
53
  "onClick": this.controller.onClick.bind(this.controller),
@@ -1 +1 @@
1
- .ibiz-form-button{--ibiz-form-button-icon-margin:0 var(--ibiz-spacing-extra-tight) 0 0;--ibiz-form-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-form-button-icon-max-height:var(--ibiz-width-icon-medium);width:100%;height:100%;padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-form-button .el-button{width:100%;height:100%}.ibiz-form-button .el-button i,.ibiz-form-button .el-button img{display:inline-block;max-width:var(--ibiz-form-button-icon-max-width);max-height:var(--ibiz-form-button-icon-max-height);margin:var(--ibiz-form-button-icon-margin)}
1
+ .ibiz-form-button{--ibiz-form-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-form-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-form-button-icon-max-height:var(--ibiz-width-icon-medium);width:100%;height:100%;padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-form-button .el-button{width:100%;height:100%}.ibiz-form-button .el-button .ibiz-form-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-form-button .el-button .ibiz-form-button-content i,.ibiz-form-button .el-button .ibiz-form-button-content img{display:inline-block;max-width:var(--ibiz-form-button-icon-max-width);max-height:var(--ibiz-form-button-icon-max-height)}.ibiz-form-button .el-button .ibiz-form-button-content .ibiz-icon+.ibiz-form-button-content--caption{margin-left:var(--ibiz-form-button-icon-margin)}.ibiz-form-button.is-loading .el-button .ibiz-icon{display:none}
@@ -51,12 +51,12 @@ const FormMDCtrlContainer = /* @__PURE__ */ vue.defineComponent({
51
51
  "class": this.ns.b("title")
52
52
  }, [vue.createVNode("span", {
53
53
  "class": this.ns.b("caption")
54
- }, [this.controller.model.showCaption && this.controller.model.caption]), vue.withDirectives(vue.createVNode(vue.resolveComponent("el-button"), {
54
+ }, [this.controller.model.showCaption && this.controller.model.caption]), this.buttonVisible && this.controller.isCreate && vue.createVNode(vue.resolveComponent("el-button"), {
55
55
  "class": this.ns.b("add-btn"),
56
56
  "onClick": () => this.insertButtonClick()
57
57
  }, {
58
58
  default: () => [vue.createTextVNode("\u6DFB\u52A0")]
59
- }), [[vue.vShow, this.buttonVisible]])]), renderFormContent()]]);
59
+ })]), renderFormContent()]]);
60
60
  };
61
61
  return vue.createVNode("div", {
62
62
  "class": [this.ns.b(), this.ns.b(this.c.model.codeName), this.ns.b(this.c.model.contentType.toLowerCase()), ...this.controller.containerClass, this.ns.is("no-caption", !this.hasCaption)]
@@ -1 +1 @@
1
- .ibiz-form-mdctrl{min-height:var(--ibiz-form-mdctrl-min-height);--ibiz-form-mdctrl-gap:var(--ibiz-spacing-tight);--ibiz-form-mdctrl-btn-width:60px;--ibiz-form-mdctrl-min-height:32px;--ibiz-form-mdctrl-content-min-height:72px}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content{display:flex;min-height:var(--ibiz-form-mdctrl-content-min-height);margin-top:var(--ibiz-spacing-tight)}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content-container{width:100%}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content-control{width:calc(100% - var(--ibiz-form-mdctrl-btn-width) - var(--ibiz-form-mdctrl-gap))}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-btn{width:var(--ibiz-form-mdctrl-btn-width);margin-left:var(--ibiz-form-mdctrl-gap);cursor:pointer;display:flex;flex-flow:column nowrap;align-items:center;justify-content:flex-start}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title{display:flex;align-items:center;justify-content:space-between}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main{position:relative}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main>.ibiz-form-mdctrl-form-content:nth-child(2) .ibiz-form-mdctrl-btn{position:relative;top:40px;height:-moz-fit-content;height:fit-content}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title{position:absolute;top:0;right:0;z-index:2}
1
+ .ibiz-form-mdctrl{min-height:var(--ibiz-form-mdctrl-min-height);--ibiz-form-mdctrl-gap:var(--ibiz-spacing-tight);--ibiz-form-mdctrl-btn-width:60px;--ibiz-form-mdctrl-min-height:32px;--ibiz-form-mdctrl-content-min-height:72px}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content{display:flex;min-height:var(--ibiz-form-mdctrl-content-min-height);margin-top:var(--ibiz-spacing-tight)}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content-container{width:100%}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content-control{width:calc(100% - var(--ibiz-form-mdctrl-btn-width) - var(--ibiz-form-mdctrl-gap))}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-btn{width:var(--ibiz-form-mdctrl-btn-width);margin-left:var(--ibiz-form-mdctrl-gap);display:flex;flex-flow:column nowrap;align-items:center;justify-content:flex-start}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-btn button{cursor:pointer}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title{display:flex;align-items:center;justify-content:space-between}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main{position:relative}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main>.ibiz-form-mdctrl-form-content:nth-child(2) .ibiz-form-mdctrl-btn{position:relative;top:40px;height:-moz-fit-content;height:fit-content}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title{position:absolute;top:0;right:0;z-index:2}
@@ -47,7 +47,7 @@ const FormMDCtrlDataView = /* @__PURE__ */ vue.defineComponent({
47
47
  "class": this.ns.b("form-content")
48
48
  }, [controlComponent, vue.createVNode("div", {
49
49
  "class": this.ns.b("btn")
50
- }, [vue.createVNode(vue.resolveComponent("el-button"), {
50
+ }, [c.parent.isDelete && vue.createVNode(vue.resolveComponent("el-button"), {
51
51
  "type": "danger",
52
52
  "class": this.ns.b("remove-btn"),
53
53
  "disabled": !this.c.state.isSelect,
@@ -54,7 +54,7 @@ const FormMDCtrlForm = /* @__PURE__ */ vue.defineComponent({
54
54
  "key": item.srfkey
55
55
  }, [controlComponent, vue.createVNode("div", {
56
56
  "class": this.ns.b("btn")
57
- }, [vue.createVNode(vue.resolveComponent("el-button"), {
57
+ }, [c.parent.isDelete && vue.createVNode(vue.resolveComponent("el-button"), {
58
58
  "type": "danger",
59
59
  "class": this.ns.b("remove-btn"),
60
60
  "onClick": () => this.c.onDataRemove(index)
@@ -49,7 +49,7 @@ const FormMDCtrlGrid = /* @__PURE__ */ vue.defineComponent({
49
49
  "class": this.ns.b("form-content")
50
50
  }, [controlComponent, vue.createVNode("div", {
51
51
  "class": this.ns.b("btn")
52
- }, [vue.createVNode(vue.resolveComponent("el-button"), {
52
+ }, [c.parent.isDelete && vue.createVNode(vue.resolveComponent("el-button"), {
53
53
  "type": "danger",
54
54
  "class": this.ns.b("remove-btn"),
55
55
  "disabled": !this.c.state.isSelect,
@@ -47,7 +47,7 @@ const FormMDCtrlList = /* @__PURE__ */ vue.defineComponent({
47
47
  "class": this.ns.b("form-content")
48
48
  }, [controlComponent, vue.createVNode("div", {
49
49
  "class": this.ns.b("btn")
50
- }, [vue.createVNode(vue.resolveComponent("el-button"), {
50
+ }, [c.parent.isDelete && vue.createVNode(vue.resolveComponent("el-button"), {
51
51
  "type": "danger",
52
52
  "class": this.ns.b("remove-btn"),
53
53
  "disabled": !this.c.state.isSelect,
@@ -137,7 +137,7 @@ const FormMDCtrlRepeaterFormShell = /* @__PURE__ */ vue.defineComponent({
137
137
  "layout": this.c.model.layout
138
138
  }, _isSlot(_slot2 = renderDetails(this.data, this.index)) ? _slot2 : {
139
139
  default: () => [_slot2]
140
- })]), this.buttonVisible && vue.createVNode("div", {
140
+ })]), this.buttonVisible && this.controller.parent.isDelete && vue.createVNode("div", {
141
141
  "class": this.ns.b("btn")
142
142
  }, [vue.createVNode(vue.resolveComponent("el-popconfirm"), {
143
143
  "title": "\u662F\u5426\u5220\u9664\u8BE5\u9879",
@@ -68,7 +68,7 @@ const FormMDCtrlRepeaterGrid = /* @__PURE__ */ vue.defineComponent({
68
68
  "class": this.ns.b("table-left")
69
69
  }, [vue.createVNode("span", {
70
70
  "class": this.ns.b("table-left-index")
71
- }, [index + 1]), vue.createVNode(vue.resolveComponent("el-popconfirm"), {
71
+ }, [index + 1]), this.controller.parent.isDelete && vue.createVNode(vue.resolveComponent("el-popconfirm"), {
72
72
  "title": "\u662F\u5426\u5220\u9664\u9009\u4E2D\u9879",
73
73
  "confirm-button-text": "\u786E\u8BA4",
74
74
  "cancel-button-text": "\u53D6\u6D88",
@@ -39,12 +39,18 @@ const MapControl = /* @__PURE__ */ vue.defineComponent({
39
39
  const c = vue3Util.useControlController((...args) => new runtime.MapController(...args));
40
40
  const ns = vue3Util.useNamespace(`control-${c.model.controlType.toLowerCase()}`);
41
41
  const mapRef = vue.ref();
42
- vue.onMounted(() => {
42
+ const mapOpts = vue.computed(() => {
43
+ return {
44
+ strAreaCode: c.state.strAreaCode,
45
+ defaultAreaCode: c.state.defaultAreaCode,
46
+ jsonBaseUrl: c.state.jsonBaseUrl
47
+ };
43
48
  });
44
49
  return {
45
50
  c,
46
51
  ns,
47
- mapRef
52
+ mapRef,
53
+ mapOpts
48
54
  };
49
55
  },
50
56
  render() {
@@ -57,6 +63,7 @@ const MapControl = /* @__PURE__ */ vue.defineComponent({
57
63
  default: () => [state.isLoaded && vue.createVNode(vue.resolveComponent("iBizMapChart"), {
58
64
  "areaData": state.areaData,
59
65
  "pointData": state.pointData,
66
+ "options": this.mapOpts,
60
67
  "class": this.ns.e("map"),
61
68
  "onMapChange": (e) => {
62
69
  this.c.onMapChange(e.areaCode);
@@ -69,60 +69,62 @@ const IBizExportExcel = /* @__PURE__ */ vue.defineComponent({
69
69
  });
70
70
  },
71
71
  dropdown: () => {
72
- return [vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
73
- "command": "maxRowCount"
74
- }, {
75
- default: () => [vue.createTextVNode("\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA1000\u884C)")]
76
- }), vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
77
- "command": "activatedPage"
78
- }, {
79
- default: () => [vue.createTextVNode("\u5BFC\u51FA\u5F53\u524D\u9875")]
80
- }), vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
81
- "command": "selectedRows"
82
- }, {
83
- default: () => [vue.createTextVNode("\u5BFC\u51FA\u5F53\u524D\u9009\u4E2D")]
84
- }), vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
85
- "class": this.ns.e("custom"),
86
- "command": ""
87
- }, {
88
- default: () => [vue.createVNode(vue.resolveComponent("el-input"), {
89
- "type": "number",
90
- "modelValue": this.startPage,
91
- "onUpdate:modelValue": ($event) => this.startPage = $event,
92
- "size": "small",
93
- "maxlength": "4",
94
- "onClick": (event) => {
95
- event.stopPropagation();
96
- },
97
- "onChange": (value) => {
98
- this.startPage = value;
99
- }
100
- }, null), vue.createVNode("span", {
101
- "class": "item-text",
102
- "onClick": (event) => {
103
- event.stopPropagation();
104
- }
105
- }, [vue.createTextVNode("-")]), vue.createVNode(vue.resolveComponent("el-input"), {
106
- "modelValue": this.endPage,
107
- "onUpdate:modelValue": ($event) => this.endPage = $event,
108
- "size": "small",
109
- "type": "number",
110
- "maxlength": "4",
111
- "onClick": (event) => {
112
- event.stopPropagation();
113
- }
114
- }, null), vue.createVNode("span", {
115
- "class": "item-text",
116
- "onClick": (event) => {
117
- event.stopPropagation();
118
- }
119
- }, [vue.createTextVNode("\u9875")]), vue.createVNode(vue.resolveComponent("el-button"), {
120
- "onClick": (e) => this.onCommand("customPage", e),
121
- "size": "small"
72
+ return vue.createVNode(vue.resolveComponent("el-dropdown-menu"), null, {
73
+ default: () => [vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
74
+ "command": "maxRowCount"
122
75
  }, {
123
- default: () => [vue.createTextVNode("\u5BFC\u51FA")]
76
+ default: () => [vue.createTextVNode("\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA1000\u884C)")]
77
+ }), vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
78
+ "command": "activatedPage"
79
+ }, {
80
+ default: () => [vue.createTextVNode("\u5BFC\u51FA\u5F53\u524D\u9875")]
81
+ }), vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
82
+ "command": "selectedRows"
83
+ }, {
84
+ default: () => [vue.createTextVNode("\u5BFC\u51FA\u5F53\u524D\u9009\u4E2D")]
85
+ }), vue.createVNode(vue.resolveComponent("el-dropdown-item"), {
86
+ "class": this.ns.e("custom"),
87
+ "command": ""
88
+ }, {
89
+ default: () => [vue.createVNode(vue.resolveComponent("el-input"), {
90
+ "type": "number",
91
+ "modelValue": this.startPage,
92
+ "onUpdate:modelValue": ($event) => this.startPage = $event,
93
+ "size": "small",
94
+ "maxlength": "4",
95
+ "onClick": (event) => {
96
+ event.stopPropagation();
97
+ },
98
+ "onChange": (value) => {
99
+ this.startPage = value;
100
+ }
101
+ }, null), vue.createVNode("span", {
102
+ "class": "item-text",
103
+ "onClick": (event) => {
104
+ event.stopPropagation();
105
+ }
106
+ }, [vue.createTextVNode("-")]), vue.createVNode(vue.resolveComponent("el-input"), {
107
+ "modelValue": this.endPage,
108
+ "onUpdate:modelValue": ($event) => this.endPage = $event,
109
+ "size": "small",
110
+ "type": "number",
111
+ "maxlength": "4",
112
+ "onClick": (event) => {
113
+ event.stopPropagation();
114
+ }
115
+ }, null), vue.createVNode("span", {
116
+ "class": "item-text",
117
+ "onClick": (event) => {
118
+ event.stopPropagation();
119
+ }
120
+ }, [vue.createTextVNode("\u9875")]), vue.createVNode(vue.resolveComponent("el-button"), {
121
+ "onClick": (e) => this.onCommand("customPage", e),
122
+ "size": "small"
123
+ }, {
124
+ default: () => [vue.createTextVNode("\u5BFC\u51FA")]
125
+ })]
124
126
  })]
125
- })];
127
+ });
126
128
  }
127
129
  });
128
130
  }
@@ -99,7 +99,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
99
99
  }
100
100
  return vue.createVNode("div", {
101
101
  "key": itemId,
102
- "class": [ns.e("item"), ns.e("item-deuiaction")]
102
+ "class": [ns.e("item"), ns.e("item-deuiaction"), ns.is("loading", c.state.buttonsState[itemId].loading)]
103
103
  }, [vue.createVNode(vue.resolveComponent("el-button"), {
104
104
  "title": item.tooltip,
105
105
  "size": btnSize.value,
@@ -1 +1 @@
1
- @charset "UTF-8";.ibiz-control-toolbar{--ibiz-control-toolbar-item-margin:0 var(--ibiz-spacing-extra-tight);--ibiz-control-toolbar-item-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-toolbar-icon-margin:0 var(--ibiz-spacing-extra-tight) 0 0;--ibiz-control-toolbar-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-control-toolbar-icon-max-height:var(--ibiz-width-icon-medium);--ibiz-control-toolbar-separator-color:var(--ibiz-color-fill-2);display:flex}.ibiz-control-toolbar__item{display:flex;align-items:center;margin:var(--ibiz-control-toolbar-item-margin);overflow:hidden}.ibiz-control-toolbar__item .el-button{display:flex;align-items:center;justify-content:center;padding:var(--ibiz-control-toolbar-item-padding)}.ibiz-control-toolbar__item .el-button>span{display:flex;align-items:center;justify-content:center;font-size:14px;pointer-events:none}.ibiz-control-toolbar__item .el-button i,.ibiz-control-toolbar__item .el-button img{display:inline-block;max-width:var(--ibiz-control-toolbar-icon-max-width);max-height:var(--ibiz-control-toolbar-icon-max-height);margin:var(--ibiz-control-toolbar-icon-margin)}.ibiz-control-toolbar__item-separator{color:var(--ibiz-control-toolbar-separator-color)}.ibiz-control-toolbar__item-separator+.ibiz-control-toolbar__item-separator,.ibiz-control-toolbar__item-separator:first-child{display:none}
1
+ @charset "UTF-8";.ibiz-control-toolbar{--ibiz-control-toolbar-item-margin:0 var(--ibiz-spacing-extra-tight);--ibiz-control-toolbar-item-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-toolbar-icon-margin:0 var(--ibiz-spacing-extra-tight) 0 0;--ibiz-control-toolbar-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-control-toolbar-icon-max-height:var(--ibiz-width-icon-medium);--ibiz-control-toolbar-separator-color:var(--ibiz-color-fill-2);display:flex}.ibiz-control-toolbar__item{display:flex;align-items:center;margin:var(--ibiz-control-toolbar-item-margin);overflow:hidden}.ibiz-control-toolbar__item .el-button{display:flex;align-items:center;justify-content:center;padding:var(--ibiz-control-toolbar-item-padding)}.ibiz-control-toolbar__item .el-button>span{display:flex;align-items:center;justify-content:center;font-size:14px;pointer-events:none}.ibiz-control-toolbar__item .el-button i,.ibiz-control-toolbar__item .el-button img{display:inline-block;max-width:var(--ibiz-control-toolbar-icon-max-width);max-height:var(--ibiz-control-toolbar-icon-max-height);margin:var(--ibiz-control-toolbar-icon-margin)}.ibiz-control-toolbar__item.is-loading .el-button .ibiz-icon{display:none}.ibiz-control-toolbar__item-separator{color:var(--ibiz-control-toolbar-separator-color)}.ibiz-control-toolbar__item-separator+.ibiz-control-toolbar__item-separator,.ibiz-control-toolbar__item-separator:first-child{display:none}
@@ -2,6 +2,7 @@
2
2
 
3
3
  var core = require('@ibiz-template/core');
4
4
  var runtime = require('@ibiz-template/runtime');
5
+ var ramda = require('ramda');
5
6
 
6
7
  "use strict";
7
8
  var __defProp = Object.defineProperty;
@@ -89,20 +90,22 @@ class AutoCompleteEditorController extends runtime.EditorController {
89
90
  this.context,
90
91
  this.params
91
92
  );
93
+ const fixedParams = {};
92
94
  if (this.sort && !Object.is(this.sort, "")) {
93
- Object.assign(params, { sort: this.sort });
95
+ Object.assign(fixedParams, { sort: this.sort });
94
96
  }
95
97
  if (query) {
96
- Object.assign(params, { query });
98
+ Object.assign(fixedParams, { query });
97
99
  }
98
- Object.assign(params, { size: 1e3 });
100
+ Object.assign(fixedParams, { size: 1e3 });
101
+ const tempParams = ramda.mergeDeepLeft(params, fixedParams);
99
102
  if (this.interfaceName) {
100
103
  const app = ibiz.hub.getApp(this.context.srfappid);
101
104
  const res = await app.deService.exec(
102
105
  this.model.appDataEntityId,
103
106
  this.interfaceName,
104
107
  context,
105
- params
108
+ tempParams
106
109
  );
107
110
  return res;
108
111
  }
@@ -164,25 +164,27 @@ class PickerEditorController extends runtime.EditorController {
164
164
  * @memberof PickerEditorController
165
165
  */
166
166
  async getServiceData(query, data) {
167
- const tempParams = { ...this.params, size: 1e3 };
168
- if (query) {
169
- Object.assign(tempParams, { query });
170
- }
171
- if (this.sort && !Object.is(this.sort, "")) {
172
- Object.assign(tempParams, { sort: this.sort });
173
- }
174
167
  const { context, params } = this.handlePublicParams(
175
168
  data,
176
169
  this.context,
177
- tempParams
170
+ this.params
178
171
  );
172
+ const fixedParams = {};
173
+ if (this.sort && !Object.is(this.sort, "")) {
174
+ Object.assign(fixedParams, { sort: this.sort });
175
+ }
176
+ if (query) {
177
+ Object.assign(fixedParams, { query });
178
+ }
179
+ Object.assign(fixedParams, { size: 1e3 });
180
+ const tempParams = ramda.mergeDeepLeft(params, fixedParams);
179
181
  if (this.interfaceName) {
180
182
  const app = ibiz.hub.getApp(this.context.srfappid);
181
183
  const res = await app.deService.exec(
182
184
  this.model.appDataEntityId,
183
185
  this.interfaceName,
184
186
  context,
185
- params
187
+ tempParams
186
188
  );
187
189
  return res;
188
190
  }