tianheng-ui 0.1.0 → 0.1.2

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 (254) hide show
  1. package/README.md +9 -18
  2. package/lib/039af9192b9bb277966ceb4e4ce29c41.js +16 -0
  3. package/lib/2d84c80112a372bc149cad3464e90fa3.js +1617 -0
  4. package/lib/5977b934a4c6b480790864ea01303173.js +10834 -0
  5. package/lib/7745f3e776488705a38e62f85adad54d.js +16 -0
  6. package/lib/de8dee841ffdaaede3a2254deef30376.js +15395 -0
  7. package/lib/e78eab250e7f8ccac3d918dfdb06ca10.js +8904 -0
  8. package/lib/theme-chalk/fonts/PingFang.ttf +0 -0
  9. package/lib/theme-chalk/fonts/bpmn.eot +0 -0
  10. package/lib/theme-chalk/fonts/bpmn.svg +224 -0
  11. package/lib/theme-chalk/fonts/bpmn.ttf +0 -0
  12. package/lib/theme-chalk/fonts/bpmn.woff +0 -0
  13. package/lib/theme-chalk/fonts/bpmn.woff2 +0 -0
  14. package/lib/theme-chalk/fonts/fontawesome-webfont.eot +0 -0
  15. package/lib/theme-chalk/fonts/fontawesome-webfont.svg +2671 -0
  16. package/lib/theme-chalk/fonts/fontawesome-webfont.ttf +0 -0
  17. package/lib/theme-chalk/fonts/fontawesome-webfont.woff +0 -0
  18. package/lib/theme-chalk/fonts/fontawesome-webfont.woff2 +0 -0
  19. package/lib/theme-chalk/fonts/iconfont.eot +0 -0
  20. package/lib/theme-chalk/fonts/iconfont.svg +155 -0
  21. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  22. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  23. package/lib/theme-chalk/fonts/iconfont.woff2 +0 -0
  24. package/lib/theme-chalk/images/notData.png +0 -0
  25. package/lib/theme-chalk/index.scss +31 -0
  26. package/lib/theme-chalk/js/Log.js +99 -0
  27. package/lib/theme-chalk/js/axios.js +86 -0
  28. package/lib/theme-chalk/js/store/getters.js +5 -0
  29. package/lib/theme-chalk/js/store/modules/makingForm.js +21 -0
  30. package/lib/theme-chalk/js/store/store.js +26 -0
  31. package/lib/theme-chalk/styles/button.scss +501 -0
  32. package/lib/theme-chalk/styles/card.scss +29 -0
  33. package/lib/theme-chalk/styles/cell.scss +54 -0
  34. package/lib/theme-chalk/styles/codeEditor.scss +9 -0
  35. package/lib/theme-chalk/styles/col.scss +151 -0
  36. package/lib/theme-chalk/styles/dialog.scss +56 -0
  37. package/lib/theme-chalk/styles/empty.scss +22 -0
  38. package/lib/theme-chalk/styles/feature.scss +46 -0
  39. package/lib/theme-chalk/styles/font.css +7 -0
  40. package/lib/theme-chalk/styles/grid.scss +41 -0
  41. package/lib/theme-chalk/styles/icon.css +1944 -0
  42. package/lib/theme-chalk/styles/imagePreview.scss +113 -0
  43. package/lib/theme-chalk/styles/img.scss +35 -0
  44. package/lib/theme-chalk/styles/reset.scss +17 -0
  45. package/lib/theme-chalk/styles/root.css +64 -0
  46. package/lib/theme-chalk/styles/row.scss +23 -0
  47. package/lib/theme-chalk/styles/upload.scss +744 -0
  48. package/lib/theme-chalk/styles/variable.scss +80 -0
  49. package/lib/tianheng-ui.js +116 -0
  50. package/package.json +86 -48
  51. package/packages/Button/index.js +8 -0
  52. package/packages/Button/index.vue +80 -0
  53. package/packages/Card/index.js +8 -0
  54. package/packages/Card/index.vue +37 -0
  55. package/packages/Cell/index.js +8 -0
  56. package/packages/Cell/index.vue +68 -0
  57. package/packages/CodeEditor/index.js +8 -0
  58. package/packages/CodeEditor/index.vue +177 -0
  59. package/packages/Col/index.js +8 -0
  60. package/packages/Col/index.vue +43 -0
  61. package/packages/Dialog/index.js +8 -0
  62. package/packages/Dialog/index.vue +129 -0
  63. package/packages/Empty/index.js +8 -0
  64. package/packages/Empty/index.vue +35 -0
  65. package/packages/FormMaking/FormConfig.vue +60 -0
  66. package/packages/FormMaking/GenerateForm.vue +308 -0
  67. package/packages/FormMaking/GenerateFormItem.vue +887 -0
  68. package/packages/FormMaking/GenerateFormItemH5.vue +825 -0
  69. package/packages/FormMaking/Upload/index.vue +572 -0
  70. package/packages/FormMaking/WidgetConfig.vue +472 -0
  71. package/packages/FormMaking/WidgetForm.vue +159 -0
  72. package/packages/FormMaking/WidgetFormItem.vue +187 -0
  73. package/packages/FormMaking/custom/config.js +762 -0
  74. package/packages/FormMaking/custom/configs/alliance.vue +0 -0
  75. package/packages/FormMaking/custom/configs/blank.vue +54 -0
  76. package/packages/FormMaking/custom/configs/button.vue +172 -0
  77. package/packages/FormMaking/custom/configs/cascader.vue +175 -0
  78. package/packages/FormMaking/custom/configs/cell.vue +81 -0
  79. package/packages/FormMaking/custom/configs/checkbox.vue +234 -0
  80. package/packages/FormMaking/custom/configs/color.vue +137 -0
  81. package/packages/FormMaking/custom/configs/date.vue +158 -0
  82. package/packages/FormMaking/custom/configs/divider.vue +61 -0
  83. package/packages/FormMaking/custom/configs/editor.vue +71 -0
  84. package/packages/FormMaking/custom/configs/filler.vue +57 -0
  85. package/packages/FormMaking/custom/configs/grid.vue +103 -0
  86. package/packages/FormMaking/custom/configs/image.vue +138 -0
  87. package/packages/FormMaking/custom/configs/input.vue +176 -0
  88. package/packages/FormMaking/custom/configs/number.vue +140 -0
  89. package/packages/FormMaking/custom/configs/radio.vue +211 -0
  90. package/packages/FormMaking/custom/configs/rate.vue +109 -0
  91. package/packages/FormMaking/custom/configs/select.vue +305 -0
  92. package/packages/FormMaking/custom/configs/slider.vue +142 -0
  93. package/packages/FormMaking/custom/configs/switch.vue +130 -0
  94. package/packages/FormMaking/custom/configs/table.vue +105 -0
  95. package/packages/FormMaking/custom/configs/table_h5.vue +102 -0
  96. package/packages/FormMaking/custom/configs/tabs.vue +175 -0
  97. package/packages/FormMaking/custom/configs/text.vue +71 -0
  98. package/packages/FormMaking/custom/configs/textarea.vue +167 -0
  99. package/packages/FormMaking/custom/configs/time.vue +153 -0
  100. package/packages/FormMaking/custom/configs/upload.vue +155 -0
  101. package/packages/FormMaking/custom/index.js +32 -0
  102. package/packages/FormMaking/custom/items/alliance.vue +132 -0
  103. package/packages/FormMaking/custom/items/blank.vue +16 -0
  104. package/packages/FormMaking/custom/items/button.vue +27 -0
  105. package/packages/FormMaking/custom/items/cascader.vue +29 -0
  106. package/packages/FormMaking/custom/items/cell.vue +18 -0
  107. package/packages/FormMaking/custom/items/checkbox.vue +46 -0
  108. package/packages/FormMaking/custom/items/color.vue +19 -0
  109. package/packages/FormMaking/custom/items/date.vue +29 -0
  110. package/packages/FormMaking/custom/items/divider.vue +14 -0
  111. package/packages/FormMaking/custom/items/editor.vue +22 -0
  112. package/packages/FormMaking/custom/items/filler.vue +17 -0
  113. package/packages/FormMaking/custom/items/grid.vue +130 -0
  114. package/packages/FormMaking/custom/items/image.vue +70 -0
  115. package/packages/FormMaking/custom/items/input.vue +33 -0
  116. package/packages/FormMaking/custom/items/login.vue +13 -0
  117. package/packages/FormMaking/custom/items/number.vue +24 -0
  118. package/packages/FormMaking/custom/items/radio.vue +44 -0
  119. package/packages/FormMaking/custom/items/rate.vue +20 -0
  120. package/packages/FormMaking/custom/items/select.vue +32 -0
  121. package/packages/FormMaking/custom/items/slider.vue +34 -0
  122. package/packages/FormMaking/custom/items/switch.vue +22 -0
  123. package/packages/FormMaking/custom/items/table.vue +106 -0
  124. package/packages/FormMaking/custom/items/table_h5.vue +126 -0
  125. package/packages/FormMaking/custom/items/tabs.vue +145 -0
  126. package/packages/FormMaking/custom/items/text.vue +18 -0
  127. package/packages/FormMaking/custom/items/textarea.vue +37 -0
  128. package/packages/FormMaking/custom/items/time.vue +32 -0
  129. package/packages/FormMaking/custom/items/upload.vue +102 -0
  130. package/packages/FormMaking/custom/mixins/index.js +61 -0
  131. package/packages/FormMaking/custom/register.js +18 -0
  132. package/packages/FormMaking/generate.js +5 -0
  133. package/packages/FormMaking/iconfont/demo.css +539 -0
  134. package/packages/FormMaking/iconfont/demo_index.html +1159 -0
  135. package/packages/FormMaking/iconfont/iconfont.css +189 -0
  136. package/packages/FormMaking/iconfont/iconfont.eot +0 -0
  137. package/packages/FormMaking/iconfont/iconfont.js +1 -0
  138. package/packages/FormMaking/iconfont/iconfont.svg +155 -0
  139. package/packages/FormMaking/iconfont/iconfont.ttf +0 -0
  140. package/packages/FormMaking/iconfont/iconfont.woff +0 -0
  141. package/packages/FormMaking/iconfont/iconfont.woff2 +0 -0
  142. package/packages/FormMaking/index.js +33 -0
  143. package/packages/FormMaking/index.vue +807 -0
  144. package/packages/FormMaking/lang/en-US.js +187 -0
  145. package/packages/FormMaking/lang/zh-CN.js +187 -0
  146. package/packages/FormMaking/making.js +9 -0
  147. package/packages/FormMaking/styles/cover.scss +41 -0
  148. package/packages/FormMaking/styles/index.scss +785 -0
  149. package/packages/FormMaking/util/generateCode.js +163 -0
  150. package/packages/FormMaking/util/index.js +33 -0
  151. package/packages/FormMaking/util/request.js +28 -0
  152. package/packages/Grid/index.js +8 -0
  153. package/packages/Grid/index.vue +21 -0
  154. package/packages/GridItem/index.js +8 -0
  155. package/packages/GridItem/index.vue +69 -0
  156. package/packages/Icons/index.js +8 -0
  157. package/packages/Icons/index.vue +377 -0
  158. package/packages/Image/index.js +8 -0
  159. package/packages/Image/index.vue +146 -0
  160. package/packages/ImagePreview/index.js +8 -0
  161. package/packages/ImagePreview/index.vue +386 -0
  162. package/packages/Row/index.js +8 -0
  163. package/packages/Row/index.vue +33 -0
  164. package/packages/Table/action.js +8 -0
  165. package/packages/Table/action.vue +168 -0
  166. package/packages/Table/column.vue +63 -0
  167. package/packages/Table/index.js +8 -0
  168. package/packages/Table/index.vue +327 -0
  169. package/packages/Table/search.js +8 -0
  170. package/packages/Table/search.vue +163 -0
  171. package/packages/Table/tools.js +8 -0
  172. package/packages/Table/tools.vue +49 -0
  173. package/packages/TableMaking/custom/configs/fieldSearch.vue +17 -0
  174. package/packages/TableMaking/custom/configs/fieldTable.vue +15 -0
  175. package/packages/TableMaking/custom/items/search/index.vue +158 -0
  176. package/packages/TableMaking/custom/items/tools/index.vue +49 -0
  177. package/packages/TableMaking/generate.js +5 -0
  178. package/packages/TableMaking/generateTable.vue +560 -0
  179. package/packages/TableMaking/index.vue +229 -0
  180. package/packages/TableMaking/making.js +5 -0
  181. package/packages/TableMaking/util/index.js +433 -0
  182. package/packages/TableMaking/widgetConfig.vue +390 -0
  183. package/packages/TableMaking/widgetTable.vue +305 -0
  184. package/packages/Upload/ajax.js +85 -0
  185. package/packages/Upload/index.js +8 -0
  186. package/packages/Upload/index.vue +325 -0
  187. package/packages/Upload/upload-dragger.vue +70 -0
  188. package/packages/Upload/upload-list.vue +121 -0
  189. package/packages/Upload/upload.vue +193 -0
  190. package/packages/VueEditor/index.js +8 -0
  191. package/packages/VueEditor/index.vue +38 -0
  192. package/packages/Workflow/Log.js +99 -0
  193. package/packages/Workflow/designer/ProcessDesigner.vue +628 -0
  194. package/packages/Workflow/designer/index.js +7 -0
  195. package/packages/Workflow/designer/plugins/content-pad/contentPadProvider.js +390 -0
  196. package/packages/Workflow/designer/plugins/content-pad/index.js +6 -0
  197. package/packages/Workflow/designer/plugins/defaultEmpty.js +24 -0
  198. package/packages/Workflow/designer/plugins/descriptor/activitiDescriptor.json +1071 -0
  199. package/packages/Workflow/designer/plugins/descriptor/camundaDescriptor.json +1087 -0
  200. package/packages/Workflow/designer/plugins/descriptor/flowableDescriptor.json +1215 -0
  201. package/packages/Workflow/designer/plugins/extension-moddle/activiti/activitiExtension.js +74 -0
  202. package/packages/Workflow/designer/plugins/extension-moddle/activiti/index.js +9 -0
  203. package/packages/Workflow/designer/plugins/extension-moddle/camunda/extension.js +148 -0
  204. package/packages/Workflow/designer/plugins/extension-moddle/camunda/index.js +6 -0
  205. package/packages/Workflow/designer/plugins/extension-moddle/flowable/flowableExtension.js +74 -0
  206. package/packages/Workflow/designer/plugins/extension-moddle/flowable/index.js +9 -0
  207. package/packages/Workflow/designer/plugins/palette/CustomPalette.js +156 -0
  208. package/packages/Workflow/designer/plugins/palette/index.js +6 -0
  209. package/packages/Workflow/designer/plugins/palette/paletteProvider.js +160 -0
  210. package/packages/Workflow/designer/plugins/translate/customTranslate.js +41 -0
  211. package/packages/Workflow/designer/plugins/translate/zh.js +238 -0
  212. package/packages/Workflow/highlight/index.js +5 -0
  213. package/packages/Workflow/index.js +34 -0
  214. package/packages/Workflow/index.vue +399 -0
  215. package/packages/Workflow/modules/auto-place/CustomAutoPlace.js +81 -0
  216. package/packages/Workflow/modules/auto-place/index.js +6 -0
  217. package/packages/Workflow/modules/custom-renderer/CustomRenderer.js +17 -0
  218. package/packages/Workflow/modules/custom-renderer/index.js +6 -0
  219. package/packages/Workflow/modules/rules/CustomRules.js +16 -0
  220. package/packages/Workflow/modules/rules/index.js +6 -0
  221. package/packages/Workflow/palette/ProcessPalette.vue +106 -0
  222. package/packages/Workflow/palette/index.js +7 -0
  223. package/packages/Workflow/penal/PropertiesPanel.vue +245 -0
  224. package/packages/Workflow/penal/base/ElementBaseInfo.vue +80 -0
  225. package/packages/Workflow/penal/flow-condition/FlowCondition.vue +142 -0
  226. package/packages/Workflow/penal/form/ElementForm.vue +367 -0
  227. package/packages/Workflow/penal/index.js +7 -0
  228. package/packages/Workflow/penal/listeners/ElementListeners.vue +299 -0
  229. package/packages/Workflow/penal/listeners/UserTaskListeners.vue +322 -0
  230. package/packages/Workflow/penal/listeners/template.js +178 -0
  231. package/packages/Workflow/penal/listeners/utilSelf.js +64 -0
  232. package/packages/Workflow/penal/multi-instance/ElementMultiInstance.vue +200 -0
  233. package/packages/Workflow/penal/other/ElementOtherConfig.vue +59 -0
  234. package/packages/Workflow/penal/properties/ElementProperties.vue +135 -0
  235. package/packages/Workflow/penal/signal-message/SignalAndMessage.vue +104 -0
  236. package/packages/Workflow/penal/task/ElementTask.vue +73 -0
  237. package/packages/Workflow/penal/task/task-components/ReceiveTask.vue +97 -0
  238. package/packages/Workflow/penal/task/task-components/ScriptTask.vue +85 -0
  239. package/packages/Workflow/penal/task/task-components/UserTask.vue +535 -0
  240. package/packages/Workflow/theme/element-variables.scss +70 -0
  241. package/packages/Workflow/theme/index.scss +2 -0
  242. package/packages/Workflow/theme/process-designer.scss +157 -0
  243. package/packages/Workflow/theme/process-panel.scss +107 -0
  244. package/packages/Workflow/translations.js +25 -0
  245. package/packages/Workflow/utils.js +71 -0
  246. package/packages/index.js +160 -0
  247. package/babel.config.js +0 -15
  248. package/index.js +0 -11
  249. package/public/favicon.ico +0 -0
  250. package/public/index.html +0 -17
  251. package/src/App.vue +0 -28
  252. package/src/assets/logo.png +0 -0
  253. package/src/components/HelloWorld.vue +0 -58
  254. package/src/main.js +0 -8
@@ -0,0 +1,229 @@
1
+ <template>
2
+ <div class="th-table-making">
3
+ <el-container>
4
+ <el-container>
5
+ <el-header>
6
+ <div class="client">
7
+ <el-button
8
+ :class="{ active: client === 'monitor' }"
9
+ type="text"
10
+ size="medium"
11
+ icon="el-icon-monitor"
12
+ @click="client = 'monitor'"
13
+ >
14
+ 桌面端
15
+ </el-button>
16
+ <!-- <el-button
17
+ :class="{ active: client === 'mobile' }"
18
+ type="text"
19
+ size="medium"
20
+ icon="el-icon-mobile"
21
+ @click="client = 'mobile'"
22
+ >
23
+ 移动端
24
+ </el-button> -->
25
+ </div>
26
+ <slot name="action"></slot>
27
+ </el-header>
28
+ <el-main>
29
+ <widget-table
30
+ :searchFields="searchFields"
31
+ :tableFields="tableFields"
32
+ @move="handleMoveChange"
33
+ ></widget-table>
34
+ </el-main>
35
+ </el-container>
36
+ <el-aside width="300px">
37
+ <widget-config
38
+ :fields="fields"
39
+ ref="configRef"
40
+ @fields-change="handleFieldsChange"
41
+ ></widget-config>
42
+ </el-aside>
43
+ </el-container>
44
+ </div>
45
+ </template>
46
+
47
+ <script>
48
+ import WidgetTable from "./widgetTable.vue";
49
+ import WidgetConfig from "./widgetConfig.vue";
50
+ export default {
51
+ name: "ThTableMaking",
52
+ components: { WidgetTable, WidgetConfig },
53
+ props: {
54
+ fields: {
55
+ type: Array,
56
+ default: () => {
57
+ return [];
58
+ }
59
+ },
60
+ config: {
61
+ type: Object,
62
+ default: () => {
63
+ return {};
64
+ }
65
+ }
66
+ },
67
+ data() {
68
+ return {
69
+ searchFields: [],
70
+ tableFields: [],
71
+ client: "monitor"
72
+ };
73
+ },
74
+ watch: {
75
+ fields: {
76
+ handler(val, oldVal) {
77
+ if (oldVal.length === 0) {
78
+ this.initConfig();
79
+ }
80
+ },
81
+ deep: true
82
+ },
83
+ config(val) {
84
+ this.initConfig();
85
+ }
86
+ },
87
+ mounted() {
88
+ this.initConfig();
89
+ },
90
+ methods: {
91
+ initConfig() {
92
+ if (!this.config || Object.keys(this.config).length === 0) return;
93
+
94
+ this.$refs.configRef.tableConfig = this.config;
95
+
96
+ const searchFields = [];
97
+ const searchFieldsIndexs = [];
98
+ if (this.config.search) {
99
+ const searchOptions = this.config.search.options;
100
+ for (const item of searchOptions) {
101
+ for (let i = 0; i < this.fields.length; i++) {
102
+ const element = this.fields[i];
103
+ if (element.alias === item.prop) {
104
+ searchFields.push(item);
105
+ searchFieldsIndexs.push(i);
106
+ }
107
+ }
108
+ }
109
+ this.searchFields = searchFields;
110
+ this.$refs.configRef.search = {
111
+ fields: searchFieldsIndexs,
112
+ isCheckAll: searchFieldsIndexs.length === this.fields.length,
113
+ isIndeterminate:
114
+ searchFieldsIndexs.length > 0 &&
115
+ searchFieldsIndexs.length < this.fields.length
116
+ };
117
+ }
118
+
119
+ const tableFields = [];
120
+ const tableFieldsIndexs = [];
121
+ if (this.config.table) {
122
+ const tableOptions = this.config.table.options;
123
+ for (const item of tableOptions) {
124
+ for (let i = 0; i < this.fields.length; i++) {
125
+ const element = this.fields[i];
126
+ if (element.alias === item.prop) {
127
+ tableFields.push(item);
128
+ tableFieldsIndexs.push(i);
129
+ }
130
+ }
131
+ }
132
+ this.tableFields = tableFields;
133
+ this.$refs.configRef.table = {
134
+ fields: tableFieldsIndexs,
135
+ isCheckAll: tableFieldsIndexs.length === this.fields.length,
136
+ isIndeterminate:
137
+ tableFieldsIndexs.length > 0 &&
138
+ tableFieldsIndexs.length < this.fields.length
139
+ };
140
+ }
141
+ },
142
+ handleFieldsChange(val) {
143
+ const type = val.type;
144
+ const data = val.data;
145
+ const list = [];
146
+ data.forEach(i => {
147
+ list.push(this.fields[i]);
148
+ });
149
+ if (type === 0) {
150
+ this.searchFields = list;
151
+ } else {
152
+ this.tableFields = list;
153
+ }
154
+ },
155
+ handleMoveChange(val) {
156
+ const type = val.type;
157
+ const data = val.data;
158
+ const newIndex = data.newIndex;
159
+ const oldIndex = data.oldIndex;
160
+ if (type === "search") {
161
+ let list = this.$refs.configRef.search.fields;
162
+ list = this.mobile(list, oldIndex, newIndex);
163
+ this.$refs.configRef.search.fields = list;
164
+ this.searchFields = this.mobile(this.searchFields, oldIndex, newIndex);
165
+ } else {
166
+ let list = this.$refs.configRef.table.fields;
167
+ list = this.mobile(list, oldIndex, newIndex);
168
+ this.$refs.configRef.table.fields = list;
169
+ this.tableFields = this.mobile(this.tableFields, oldIndex, newIndex);
170
+ }
171
+ },
172
+ mobile(list, oldIndex, newIndex) {
173
+ const item = JSON.parse(JSON.stringify(list[oldIndex]));
174
+ if (oldIndex < newIndex) {
175
+ list.splice(newIndex + 1, 0, item);
176
+ list.splice(oldIndex, 1);
177
+ }
178
+ if (oldIndex > newIndex) {
179
+ list.splice(newIndex, 0, item);
180
+ list.splice(oldIndex + 1, 1);
181
+ }
182
+ return list;
183
+ },
184
+ getJson() {
185
+ const tableConfig = this.$refs.configRef.getJson();
186
+ tableConfig.search.options = this.searchFields;
187
+ tableConfig.table.options = this.tableFields;
188
+ return tableConfig;
189
+ }
190
+ }
191
+ };
192
+ </script>
193
+
194
+ <style lang="scss" scoped>
195
+ .th-table-making {
196
+ height: 100%;
197
+ background-color: white;
198
+ border: 1px solid #dcdfe6;
199
+
200
+ .client {
201
+ flex: 1;
202
+ .el-button {
203
+ color: #333;
204
+ }
205
+ .active {
206
+ color: #409eff;
207
+ }
208
+ }
209
+
210
+ .el-container {
211
+ height: 100%;
212
+ }
213
+ .el-header {
214
+ display: flex;
215
+ align-items: center;
216
+ height: 45px !important;
217
+ line-height: 45px;
218
+ border-bottom: 1px solid #dcdfe6;
219
+ }
220
+ .el-main {
221
+ padding: 5px;
222
+ background-color: #fafafa;
223
+ }
224
+ .el-aside {
225
+ border-left: 1px solid #dcdfe6;
226
+ box-sizing: border-box;
227
+ }
228
+ }
229
+ </style>
@@ -0,0 +1,5 @@
1
+ import TableMaking from "./index.vue";
2
+ TableMaking.install = function(Vue) {
3
+ Vue.component(TableMaking.name, TableMaking);
4
+ };
5
+ export default TableMaking;
@@ -0,0 +1,433 @@
1
+ const toolsConfig = {
2
+ add: {
3
+ act: "add",
4
+ name: "",
5
+ type: "primary",
6
+ icon: "el-icon-plus",
7
+ disabled: false,
8
+ loading: false
9
+ },
10
+ edit: {
11
+ act: "edit",
12
+ name: "",
13
+ type: "text",
14
+ icon: "el-icon-edit",
15
+ disabled: false,
16
+ loading: false
17
+ },
18
+ detail: {
19
+ act: "detail",
20
+ name: "",
21
+ type: "text",
22
+ icon: "el-icon-view",
23
+ disabled: false,
24
+ loading: false
25
+ },
26
+ delete: {
27
+ act: "delete",
28
+ name: "",
29
+ type: "text",
30
+ icon: "el-icon-delete",
31
+ style: "color:#ff4949;",
32
+ disabled: false,
33
+ loading: false
34
+ },
35
+ batchDelete: {
36
+ act: "batchDelete",
37
+ name: "",
38
+ type: "danger",
39
+ icon: "el-icon-delete",
40
+ disabled: false,
41
+ loading: false
42
+ },
43
+ export: {
44
+ act: "export",
45
+ name: "",
46
+ type: "primary",
47
+ icon: "el-icon-download",
48
+ disabled: false,
49
+ loading: false
50
+ },
51
+ import: {
52
+ act: "import",
53
+ name: "",
54
+ type: "primary",
55
+ icon: "el-icon-upload2",
56
+ disabled: false,
57
+ loading: false
58
+ }
59
+ };
60
+
61
+ export const toolsItemConfig = (key, data) => {
62
+ let config = toolsConfig[key] || {};
63
+ config = JSON.parse(JSON.stringify(config));
64
+ config.name = data.name;
65
+ return config;
66
+ };
67
+
68
+ const formConfig = {
69
+ "1": {
70
+ list: [
71
+ {
72
+ name: "平台名称",
73
+ type: "input",
74
+ icon: "icon-input",
75
+ options: {
76
+ width: "100%",
77
+ labelWidth: 100,
78
+ isLabelWidth: false,
79
+ defaultValue: "",
80
+ dataType: "string",
81
+ pattern: "",
82
+ placeholder: "",
83
+ maxlength: -1,
84
+ required: true,
85
+ disabled: false,
86
+ readonly: false,
87
+ clearable: false,
88
+ showWordLimit: false,
89
+ showPassword: false,
90
+ prefixIcon: "",
91
+ suffixIcon: "",
92
+ prepend: "",
93
+ append: "",
94
+ hidden: false,
95
+ hideLabel: false
96
+ },
97
+ events: {
98
+ onChange: "",
99
+ onFocus: "",
100
+ onBlur: ""
101
+ },
102
+ rules: [
103
+ {
104
+ type: "string",
105
+ message: "平台名称格式不正确"
106
+ },
107
+ {
108
+ required: true,
109
+ message: "平台名称必须填写"
110
+ }
111
+ ],
112
+ key: "1669859814000_5209",
113
+ model: "name"
114
+ },
115
+ {
116
+ name: "平台分类",
117
+ type: "select",
118
+ icon: "icon-select",
119
+ options: {
120
+ width: "100%",
121
+ labelWidth: 100,
122
+ isLabelWidth: false,
123
+ defaultValue: "",
124
+ multiple: false,
125
+ disabled: false,
126
+ clearable: false,
127
+ placeholder: "",
128
+ required: false,
129
+ showLabel: false,
130
+ collapseTags: false,
131
+ allowCreate: false,
132
+ options: [
133
+ {
134
+ value: "Option 1"
135
+ },
136
+ {
137
+ value: "Option 2"
138
+ },
139
+ {
140
+ value: "Option 3"
141
+ }
142
+ ],
143
+ remote: true,
144
+ filterable: false,
145
+ remoteOptions: [],
146
+ props: {
147
+ value: "id",
148
+ label: "name"
149
+ },
150
+ remoteFunc: "getUserList",
151
+ hidden: false,
152
+ hideLabel: false
153
+ },
154
+ events: {
155
+ onChange: "",
156
+ onFocus: "",
157
+ onBlur: ""
158
+ },
159
+ key: "1669859824000_68681",
160
+ model: "projectTypeId",
161
+ rules: []
162
+ },
163
+ {
164
+ name: "访问地址",
165
+ type: "input",
166
+ icon: "icon-input",
167
+ options: {
168
+ width: "100%",
169
+ labelWidth: 100,
170
+ isLabelWidth: false,
171
+ defaultValue: "",
172
+ dataType: "url",
173
+ pattern: "",
174
+ placeholder: "",
175
+ maxlength: -1,
176
+ required: false,
177
+ disabled: false,
178
+ readonly: false,
179
+ clearable: false,
180
+ showWordLimit: false,
181
+ showPassword: false,
182
+ prefixIcon: "",
183
+ suffixIcon: "",
184
+ prepend: "",
185
+ append: "",
186
+ hidden: false,
187
+ hideLabel: false
188
+ },
189
+ events: {
190
+ onChange: "",
191
+ onFocus: "",
192
+ onBlur: ""
193
+ },
194
+ rules: [
195
+ {
196
+ type: "url",
197
+ message: "访问地址格式不正确"
198
+ }
199
+ ],
200
+ key: "1669859816000_814",
201
+ model: "targetUrl"
202
+ }
203
+ ],
204
+ config: {
205
+ ui: "element",
206
+ title: "",
207
+ width: "",
208
+ labelWidth: 100,
209
+ labelPosition: "right",
210
+ labelSuffix: ":",
211
+ size: "small",
212
+ disabled: false,
213
+ hideLabel: false,
214
+ eventScript: [
215
+ {
216
+ key: "mounted",
217
+ name: "mounted",
218
+ func: ""
219
+ },
220
+ {
221
+ key: "refresh",
222
+ name: "refresh",
223
+ func: ""
224
+ }
225
+ ]
226
+ }
227
+ },
228
+ "2": {}
229
+ };
230
+
231
+ export const formItemConfig = key => {
232
+ const config = formConfig[key] || {};
233
+ return JSON.parse(JSON.stringify(config));
234
+ };
235
+
236
+ const tableConfig = {
237
+ "1": {
238
+ search: {
239
+ show: true,
240
+ options: [
241
+ {
242
+ type: "input",
243
+ label: "平台名称",
244
+ prop: "name",
245
+ defaultValue: "",
246
+ align: "left",
247
+ width: 0
248
+ }
249
+ ]
250
+ },
251
+ table: {
252
+ options: [
253
+ {
254
+ label: "平台名称",
255
+ type: "input",
256
+ prop: "name",
257
+ align: "left"
258
+ },
259
+ {
260
+ label: "平台分类",
261
+ type: "select",
262
+ prop: "projectTypeName",
263
+ align: "left",
264
+ width: 0
265
+ },
266
+ {
267
+ label: "访问地址",
268
+ type: "input",
269
+ prop: "targetUrl",
270
+ align: "left",
271
+ width: 0
272
+ },
273
+ {
274
+ label: "编辑人",
275
+ type: "input",
276
+ prop: "user",
277
+ sortable: true,
278
+ align: "left",
279
+ width: 0
280
+ }
281
+ ],
282
+ pageInfo: {
283
+ show: false,
284
+ options: {
285
+ pageCount: 0, // 总页数
286
+ pageSize: 20, // 每页展示的条数
287
+ currentPage: 1, // 当前页码
288
+ total: 0, // 总条数
289
+ sizes: [10, 20, 30, 50, 100]
290
+ }
291
+ },
292
+ sort: { type: "1", key: "createTime" },
293
+ loading: { show: false, text: "加载中", image: "" },
294
+ empty: { show: true, text: "暂无数据", image: "" },
295
+ sequence: true
296
+ },
297
+ tools: {
298
+ add: { show: true, name: "新增", position: 1, form: { id: "1" } },
299
+ edit: { show: true, name: "编辑", position: 2, form: { id: "1" } },
300
+ detail: { show: false, name: "查看", position: 2, form: { id: "1" } },
301
+ delete: { show: true, name: "删除", position: 2 },
302
+ batchDelete: { show: true, name: "批量删除", position: 1 },
303
+ export: { show: true, name: "导出", position: 1 },
304
+ import: { show: true, name: "导入", position: 1 },
305
+ key_123456: {}
306
+ },
307
+ network: {
308
+ mounted: {
309
+ name: "获取列表",
310
+ api: "tenant/project/list",
311
+ method: "post"
312
+ },
313
+ add: {
314
+ name: "新增",
315
+ api: "tenant/project/add",
316
+ method: "post"
317
+ },
318
+ edit: {
319
+ name: "编辑",
320
+ api: "tenant/project/edit",
321
+ method: "post"
322
+ },
323
+ delete: {
324
+ name: "删除",
325
+ api: "tenant/project/delete",
326
+ method: "post"
327
+ },
328
+ key_123456: {
329
+ name: "获取列表",
330
+ url: "https://"
331
+ }
332
+ }
333
+ },
334
+ "2": {
335
+ search: {
336
+ show: false,
337
+ options: []
338
+ },
339
+ table: {
340
+ options: [
341
+ {
342
+ label: "平台名称",
343
+ type: "input",
344
+ prop: "name",
345
+ align: "left"
346
+ },
347
+ {
348
+ label: "平台分类",
349
+ type: "select",
350
+ prop: "projectTypeName",
351
+ align: "left",
352
+ width: 0
353
+ },
354
+ {
355
+ label: "访问地址",
356
+ type: "input",
357
+ prop: "targetUrl",
358
+ align: "left",
359
+ width: 0
360
+ },
361
+ {
362
+ label: "编辑人",
363
+ type: "input",
364
+ prop: "user",
365
+ sortable: true,
366
+ align: "left",
367
+ width: 0
368
+ },
369
+ {
370
+ label: "编辑时间",
371
+ type: "input",
372
+ prop: "updateTime",
373
+ align: "left",
374
+ width: 0
375
+ }
376
+ ],
377
+ pageInfo: {
378
+ show: true,
379
+ options: {
380
+ pageCount: 0, // 总页数
381
+ pageSize: 20, // 每页展示的条数
382
+ currentPage: 1, // 当前页码
383
+ total: 0, // 总条数
384
+ sizes: [10, 20, 30, 50, 100]
385
+ }
386
+ },
387
+ sort: { type: "1", key: "createTime" },
388
+ loading: { show: false, text: "加载中", image: "" },
389
+ empty: { show: true, text: "暂无数据", image: "" },
390
+ sequence: true
391
+ },
392
+ tools: {
393
+ add: { show: true, name: "新增", position: 1, form: { id: "1" } },
394
+ edit: { show: true, name: "编辑", position: 2, form: { id: "1" } },
395
+ detail: { show: false, name: "查看", position: 2, form: { id: "1" } },
396
+ delete: { show: true, name: "删除", position: 2 },
397
+ batchDelete: { show: false, name: "批量删除", position: 1 },
398
+ export: { show: false, name: "导出", position: 1 },
399
+ import: { show: false, name: "导入", position: 1 }
400
+ },
401
+ network: {
402
+ mounted: {
403
+ name: "获取列表",
404
+ api: "tenant/project/list",
405
+ method: "post"
406
+ },
407
+ add: {
408
+ name: "新增",
409
+ api: "tenant/project/add",
410
+ method: "post"
411
+ },
412
+ edit: {
413
+ name: "编辑",
414
+ api: "tenant/project/edit",
415
+ method: "post"
416
+ },
417
+ delete: {
418
+ name: "删除",
419
+ api: "tenant/project/delete",
420
+ method: "post"
421
+ },
422
+ key_123456: {
423
+ name: "获取列表",
424
+ url: "https://"
425
+ }
426
+ }
427
+ }
428
+ };
429
+
430
+ export const tableItemConfig = key => {
431
+ const config = tableConfig[key] || null;
432
+ return JSON.parse(JSON.stringify(config));
433
+ };