cloud-web-corejs 1.0.27 → 1.0.29

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 (202) hide show
  1. package/package.json +1 -1
  2. package/src/components/formOplog/mixins.js +1 -1
  3. package/src/components/jsonImport/exportDialog.vue +1 -1
  4. package/src/components/jsonImport/index.vue +151 -202
  5. package/src/components/jsonImport/mixins.js +1 -309
  6. package/src/components/projectTag/addButton.vue +3 -50
  7. package/src/components/projectTag/deleteButton.vue +3 -50
  8. package/src/components/projectTag/mixins/addButton.js +5 -0
  9. package/src/components/projectTag/mixins/deleteButton.js +5 -0
  10. package/src/components/projectTag/mixins/view.js +5 -0
  11. package/src/components/projectTag/view.vue +33 -72
  12. package/src/components/xform/mixins/scriptHttp.js +1 -1
  13. package/src/index.js +0 -2
  14. package/src/layout/components/Sidebar/default.vue +4 -6
  15. package/src/router/modules/system.js +1 -1
  16. package/src/store/config/index.js +3 -0
  17. package/src/store/getters.js +2 -0
  18. package/src/store/modules/permission.js +2 -2
  19. package/src/store/modules/user.js +2 -1
  20. package/src/utils/request.js +28 -29
  21. package/src/utils/vab.js +27 -27
  22. package/src/views/bd/setting/bd_attach_setting/dialog.vue +4 -87
  23. package/src/views/bd/setting/bd_attach_setting/edit.vue +3 -92
  24. package/src/views/bd/setting/bd_attach_setting/list.vue +4 -214
  25. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +89 -0
  26. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +96 -0
  27. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +219 -0
  28. package/src/views/bd/setting/form_script/dialog.vue +3 -137
  29. package/src/views/bd/setting/form_script/edit.vue +3 -127
  30. package/src/views/bd/setting/form_script/edit1.vue +3 -142
  31. package/src/views/bd/setting/form_script/form_list.vue +4 -259
  32. package/src/views/bd/setting/form_script/list.vue +55 -223
  33. package/src/views/bd/setting/form_script/list1.vue +117 -444
  34. package/src/views/bd/setting/form_script/list2.vue +3 -4
  35. package/src/views/bd/setting/form_script/mixins/dialog.js +142 -0
  36. package/src/views/bd/setting/form_script/mixins/edit.js +134 -0
  37. package/src/views/bd/setting/form_script/mixins/edit1.js +149 -0
  38. package/src/views/bd/setting/form_script/mixins/form_list.js +264 -0
  39. package/src/views/bd/setting/form_script/mixins/list.js +176 -0
  40. package/src/views/bd/setting/form_script/mixins/list1.js +336 -0
  41. package/src/views/bd/setting/form_script/mixins/list2.js +14 -0
  42. package/src/views/bd/setting/form_template/dialog.vue +104 -212
  43. package/src/views/bd/setting/form_template/edit.vue +183 -329
  44. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +46 -131
  45. package/src/views/bd/setting/form_template/ftHistoryDialog.vue +88 -175
  46. package/src/views/bd/setting/form_template/itemEdit.vue +174 -270
  47. package/src/views/bd/setting/form_template/itemList.vue +56 -300
  48. package/src/views/bd/setting/form_template/list.vue +211 -766
  49. package/src/views/bd/setting/form_template/mixins/dialog.js +114 -0
  50. package/src/views/bd/setting/form_template/mixins/edit.js +155 -0
  51. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +94 -0
  52. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +95 -0
  53. package/src/views/bd/setting/form_template/mixins/itemEdit.js +106 -0
  54. package/src/views/bd/setting/form_template/mixins/itemList.js +254 -0
  55. package/src/views/bd/setting/form_template/mixins/list.js +562 -0
  56. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -0
  57. package/src/views/bd/setting/form_template/preformDialog.vue +57 -77
  58. package/src/views/bd/setting/menu_kind/authDialog.vue +84 -308
  59. package/src/views/bd/setting/menu_kind/dialog.vue +89 -226
  60. package/src/views/bd/setting/menu_kind/list.vue +86 -262
  61. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +232 -0
  62. package/src/views/bd/setting/menu_kind/mixins/dialog.js +144 -0
  63. package/src/views/bd/setting/menu_kind/mixins/list.js +187 -0
  64. package/src/views/bd/setting/table_model/dialog.vue +95 -161
  65. package/src/views/bd/setting/table_model/edit.vue +5 -767
  66. package/src/views/bd/setting/table_model/list.vue +130 -491
  67. package/src/views/bd/setting/table_model/mixins/dialog.js +74 -0
  68. package/src/views/bd/setting/table_model/mixins/edit.js +778 -0
  69. package/src/views/bd/setting/table_model/mixins/list.js +367 -0
  70. package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -0
  71. package/src/views/bd/setting/table_model/zdDialog.vue +95 -201
  72. package/src/views/support/export_template/edit.vue +40 -36
  73. package/src/views/support/export_template/list.vue +40 -52
  74. package/src/views/user/access_log/edit.vue +18 -17
  75. package/src/views/user/access_log/list.vue +27 -26
  76. package/src/views/user/access_log/statistics_list.vue +19 -17
  77. package/src/views/user/api_request/edit.vue +14 -11
  78. package/src/views/user/api_request/list.vue +13 -11
  79. package/src/views/user/area/dialog.vue +14 -27
  80. package/src/views/user/area_attribute/configDialog.vue +11 -13
  81. package/src/views/user/area_attribute/edit.vue +8 -6
  82. package/src/views/user/area_attribute/list.vue +1 -1
  83. package/src/views/user/attachment/uploadDialog.vue +1 -1
  84. package/src/views/user/bill_setting/button/previewButton.vue +2 -2
  85. package/src/views/user/bill_setting/compareView.vue +1 -1
  86. package/src/views/user/bill_setting/edit.vue +24 -17
  87. package/src/views/user/bill_setting/h5_ModifyDialog.vue +1 -1
  88. package/src/views/user/bill_setting/itemViewDialog.vue +3 -66
  89. package/src/views/user/bill_setting/list.vue +28 -26
  90. package/src/views/user/bill_setting/mixins/wf.js +8 -8
  91. package/src/views/user/bill_setting/previewDialog.vue +1 -1
  92. package/src/views/user/bill_setting/render.vue +29 -29
  93. package/src/views/user/bill_setting/userDialog.vue +7 -5
  94. package/src/views/user/code_rules/edit.vue +21 -18
  95. package/src/views/user/code_rules/list.vue +27 -19
  96. package/src/views/user/commMenu/index.vue +3 -3
  97. package/src/views/user/common_attribute/edit.vue +7 -5
  98. package/src/views/user/common_attribute/itemEdit.vue +22 -22
  99. package/src/views/user/common_attribute/list.vue +25 -24
  100. package/src/views/user/common_script/edit.vue +12 -12
  101. package/src/views/user/common_script/list.vue +30 -32
  102. package/src/views/user/company_info/dialog.vue +9 -9
  103. package/src/views/user/company_info/edit.vue +11 -8
  104. package/src/views/user/country/dialog.vue +11 -9
  105. package/src/views/user/country/edit.vue +12 -9
  106. package/src/views/user/country/list.vue +12 -12
  107. package/src/views/user/data_type_setting/dialog.vue +10 -10
  108. package/src/views/user/data_type_setting/editDialog.vue +6 -6
  109. package/src/views/user/ea/eagroup/eaobj_list.vue +25 -25
  110. package/src/views/user/ea/eagroup/edit.vue +48 -42
  111. package/src/views/user/ea/eaobj/edit.vue +6 -5
  112. package/src/views/user/ea/eaobj/list.vue +9 -8
  113. package/src/views/user/extend_datasource/dialog.vue +19 -24
  114. package/src/views/user/extend_datasource/edit.vue +20 -16
  115. package/src/views/user/extend_datasource/list.vue +23 -24
  116. package/src/views/user/fieldTranslation/editDialog.vue +28 -28
  117. package/src/views/user/fieldTranslation/list.vue +59 -57
  118. package/src/views/user/field_values_invisible/edit.vue +15 -14
  119. package/src/views/user/field_values_invisible/list.vue +23 -22
  120. package/src/views/user/file_type/edit.vue +12 -21
  121. package/src/views/user/file_type/list.vue +21 -36
  122. package/src/views/user/file_type/userEdit.vue +14 -9
  123. package/src/views/user/file_view_area/edit.vue +3 -3
  124. package/src/views/user/file_view_area/itemEdit.vue +11 -9
  125. package/src/views/user/file_view_area/list.vue +17 -16
  126. package/src/views/user/file_view_ins/list.vue +29 -28
  127. package/src/views/user/file_view_ins/propertiesDialog.vue +15 -15
  128. package/src/views/user/form/form_template/edit.vue +1 -1
  129. package/src/views/user/form/form_template/itemEdit.vue +1 -1
  130. package/src/views/user/form/form_template/itemList.vue +2 -2
  131. package/src/views/user/form/form_template/list.vue +3 -3
  132. package/src/views/user/form/form_type/edit.vue +1 -1
  133. package/src/views/user/form/form_type/list.vue +1 -1
  134. package/src/views/user/form/report_requestaccess/edit.vue +1 -1
  135. package/src/views/user/form/report_requestaccess/list.vue +1 -1
  136. package/src/views/user/form/vform/designer.vue +2 -0
  137. package/src/views/user/form/vform/out_render.vue +1 -0
  138. package/src/views/user/form/vform/render.vue +1 -0
  139. package/src/views/user/form/view/list.vue +2 -1
  140. package/src/views/user/groups/dialog.vue +159 -0
  141. package/src/views/user/groups/edit.vue +131 -0
  142. package/src/views/user/groups/list.vue +167 -0
  143. package/src/views/user/home/index.vue +3 -3
  144. package/src/views/user/lang_tag/dialog.vue +185 -0
  145. package/src/views/user/lang_tag/edit.vue +138 -0
  146. package/src/views/user/lang_tag/list.vue +170 -0
  147. package/src/views/user/language_setting/edit.vue +11 -9
  148. package/src/views/user/language_setting/list.vue +20 -18
  149. package/src/views/user/login/default.vue +129 -0
  150. package/src/views/user/login/index.vue +3 -117
  151. package/src/views/user/menu/list.vue +39 -55
  152. package/src/views/user/mobile_menu/list.vue +18 -54
  153. package/src/views/user/notify_message/dialog.vue +1 -1
  154. package/src/views/user/notify_message/infoDialog.vue +1 -1
  155. package/src/views/user/notify_message/list.vue +24 -23
  156. package/src/views/user/notify_template/edit.vue +13 -11
  157. package/src/views/user/notify_template/list.vue +19 -16
  158. package/src/views/user/oplog/edit.vue +12 -12
  159. package/src/views/user/oplog/list.vue +20 -18
  160. package/src/views/user/position/dialog.vue +6 -6
  161. package/src/views/user/position/edit.vue +11 -8
  162. package/src/views/user/position/list.vue +11 -11
  163. package/src/views/user/project_tag/dialog.vue +11 -9
  164. package/src/views/user/project_tag/edit.vue +8 -6
  165. package/src/views/user/project_tag/list.vue +15 -12
  166. package/src/views/user/push_setting/edit.vue +20 -17
  167. package/src/views/user/push_setting/list.vue +1 -1
  168. package/src/views/user/role/dialog.vue +11 -11
  169. package/src/views/user/role/edit.vue +14 -12
  170. package/src/views/user/role/list.vue +14 -12
  171. package/src/views/user/sale_org/dialog.vue +12 -12
  172. package/src/views/user/sale_org/list.vue +43 -48
  173. package/src/views/user/system_notice/edit.vue +13 -11
  174. package/src/views/user/system_notice/infoDialog.vue +2 -2
  175. package/src/views/user/system_notice/list.vue +19 -17
  176. package/src/views/user/system_parameter/edit.vue +7 -6
  177. package/src/views/user/system_parameter/list.vue +12 -10
  178. package/src/views/user/user/edit.vue +1 -1
  179. package/src/views/user/user/form_edit.vue +50 -7
  180. package/src/views/user/user/form_list.vue +34 -132
  181. package/src/views/user/user/info.vue +20 -19
  182. package/src/views/user/user/infoEdit.vue +18 -18
  183. package/src/views/user/user/infoIframeDialog.vue +1 -1
  184. package/src/views/user/user/modifyPasswordDialog.vue +9 -9
  185. package/src/views/user/wf/iframe/dialog.vue +1 -1
  186. package/src/views/user/wf/wf_auto_submit_data/edit.vue +11 -10
  187. package/src/views/user/wf/wf_auto_submit_data/edith.vue +14 -13
  188. package/src/views/user/wf/wf_auto_submit_data/list.vue +43 -41
  189. package/src/views/user/wf/wf_diy_attribute/edit.vue +11 -8
  190. package/src/views/user/wf/wf_manage/list.vue +66 -61
  191. package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
  192. package/src/views/user/wf/wf_obj_config/dialog.vue +11 -11
  193. package/src/views/user/wf/wf_obj_config/edit.vue +12 -9
  194. package/src/views/user/wf/wf_obj_config/edit_form.vue +11 -9
  195. package/src/views/user/wf/wf_obj_config/itemEdit.vue +31 -27
  196. package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +8 -6
  197. package/src/views/user/wf/wf_obj_config/list.vue +42 -41
  198. package/src/views/user/wf/wf_obj_config/list_form.vue +14 -12
  199. package/src/views/user/wf/wf_param/edit.vue +7 -5
  200. package/src/views/user/wf/wf_work_calendar/configDialog.vue +9 -24
  201. package/src/views/user/wf/wf_work_calendar/list.vue +6 -3
  202. package/src/views/user/home/distributor.vue +0 -849
@@ -14,7 +14,7 @@
14
14
  <tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
15
15
  <template #buttonLeft>
16
16
  <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
17
- v-if="isDev">新增
17
+ v-if="isDev">{{ $t1('新增') }}
18
18
  </vxe-button>
19
19
  <projectTagAddButton :option="addProjectTagOption" v-if="isDev"></projectTagAddButton>
20
20
  <projectTagDeleteButton :option="deleteProjectTagOption" v-if="isDev"></projectTagDeleteButton>
@@ -27,7 +27,7 @@
27
27
  <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
28
28
  plain>{{$t1('重置')}}
29
29
  </vxe-button>
30
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
30
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{ $t1('搜索') }}
31
31
  </vxe-button>
32
32
  </template>
33
33
  <template #tag>
@@ -76,265 +76,10 @@
76
76
  </template>
77
77
 
78
78
  <script>
79
- import editView from './edit1.vue';
80
- import scriptDialog from "./dialog.vue";
81
- import MenuKindDialog from "../../../../views/bd/setting/menu_kind/dialog.vue";
82
- import projectTagDialog from "../../../../views/user/project_tag/dialog.vue";
83
- import tableForm from "@base/components/table/tableForm.vue";
84
- import {getBdFlag} from "@base/api/user";
85
- import projectTagDeleteButton from "@base/components/projectTag/deleteButton.vue";
86
- import projectTagAddButton from "@base/components/projectTag/addButton.vue";
87
- import projectTagView from "@base/components/projectTag/view.vue";
79
+ import mixin from "./mixins/form_list";
88
80
 
89
81
  export default {
90
82
  name: 'form_script:form_list',
91
- components: {
92
- projectTagView,
93
- projectTagAddButton,
94
- projectTagDeleteButton,
95
- tableForm, MenuKindDialog, editView, scriptDialog, projectTagDialog
96
- },
97
- props: ["formTemplate"],
98
- data() {
99
- return {
100
- activeName: 'second',
101
- dataId: 0,
102
- showEdit: false,
103
- vxeOption: {},
104
- formData: {},
105
- showScriptDialog: false,
106
- addProjectTagOption: {
107
- url: USER_PREFIX + `/formScript/saveTag`,
108
- tableDatas: () => {
109
- return this.$refs["table-m1"].getCheckboxRecords(true);
110
- },
111
- reqData: (tagDatas, tableDatas) => {
112
- let sids = tableDatas.map(item => item.sid);
113
- let tagCodes = tagDatas.map(item => item.tagCode);
114
- let reqData = {
115
- tagCodes,
116
- sids
117
- };
118
- return reqData;
119
- },
120
- callback: () => {
121
- this.searchEvent()
122
- }
123
- },
124
- deleteProjectTagOption: {
125
- url: USER_PREFIX + `/formScript/deleteTag`,
126
- tableDatas: () => {
127
- return this.$refs["table-m1"].getCheckboxRecords(true);
128
- },
129
- reqData: (tagDatas, tableDatas) => {
130
- let sids = tableDatas.map(item => item.sid);
131
- let tagCodes = tagDatas.map(item => item.tagCode);
132
- let reqData = {
133
- tagCodes,
134
- sids
135
- };
136
- return reqData;
137
- },
138
- callback: () => {
139
- this.searchEvent()
140
- }
141
- },
142
- showProjectTagDialog3: false,
143
- checkTags: [],
144
- isDev: true
145
- };
146
- },
147
- mounted() {
148
- this.getBdEnv();
149
- this.initTableList();
150
- },
151
- methods: {
152
- searchEvent() {
153
- this.$refs['table-m1'].commitProxy('reload');
154
- },
155
- resetEvent() {
156
- this.formData = {};
157
- this.checkTags = [];
158
- this.$refs['table-m1'].commitProxy('reload');
159
- },
160
- openEditDialog(row) {
161
- /*this.dataId = !id || typeof id == 'object' ? 0 : id;
162
- this.activeName = 'first';
163
- this.$openEditView('showEdit');*/
164
-
165
- let dataId = row?.id || 0;
166
- if (!dataId) {
167
- this.dataId = dataId;
168
- this.activeName = 'first';
169
- this.$openEditView('showEdit');
170
- } else {
171
- this.$refs.xTabs.openEditTab(row);
172
- }
173
- },
174
- initTableList() {
175
- let that = this;
176
- let tableOption = {
177
- vue: this,
178
- tableRef: 'table-m1',
179
- tableName: 'bd_form_script_form_list-m1',
180
- path: USER_PREFIX + '/formScript/listPage',
181
- param: () => {
182
- let tagCodes = null;
183
- if (this.checkTags.length) {
184
- tagCodes = this.checkTags.map(item => item.tagCode);
185
- }
186
- return {
187
- formCode: this.formTemplate.formCode,
188
- menuKindCode: this.formTemplate.menuKindCode,
189
- ...this.formData,
190
- tagCodes,
191
- scriptType: 1,
192
- };
193
- },
194
- columns: [
195
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
196
- {
197
- title: '脚本名称',
198
- field: 'scriptName',
199
- width: 180,
200
- fixed: 'left'
201
- },
202
- {
203
- title: '脚本编码',
204
- field: 'scriptCode',
205
- width: 180
206
- },
207
- {
208
- title: '脚本说明',
209
- field: 'scriptRemark',
210
- width: 250
211
- },
212
- {
213
- title: '表单模板编码',
214
- field: 'formCode',
215
- width: 250
216
- },
217
- {
218
- title: '项目标签', field: 'tag', width: 250, slots: {default: "tag"}, params: {
219
- exportVal: ({row}) => {
220
- if (row.formScriptTagDTOs) {
221
- return row.formScriptTagDTOs.map(item => item.tagName).join(",")
222
- }
223
- }
224
- }
225
- },
226
- {
227
- field: 'transactions',
228
- title: '开启事务',
229
- width: 150,
230
- slots: {
231
- default: ({row}) => {
232
- if (row.transactions == 1) {
233
- return [<div class="txt-status">是</div>];
234
- } else {
235
- return [<div class="txt-status s-3">否</div>];
236
- }
237
- }
238
- }
239
- },
240
- {
241
- field: 'sid',
242
- title: '唯一标识',
243
- width: 280
244
- },
245
- {
246
- field: 'createDate',
247
- title: this.$t1('创建时间'),
248
- width: 150
249
- },
250
- {
251
- width: 47,
252
- fixed: 'right',
253
- title: '',
254
- sortable: false,
255
- slots: {
256
- default: ({row}) => {
257
- return [
258
- <div>
259
- <a
260
- href="javascript:void(0);"
261
- class="a-link"
262
- onclick={() => {
263
- this.openEditDialog(row);
264
- }}
265
- >
266
- <el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
267
- popper-class="tooltip-skin">
268
- <i class="el-icon-edit"/>
269
- </el-tooltip>
270
- </a>
271
- </div>
272
- ];
273
- }
274
- }
275
- }
276
- ],
277
- searchColumns: [
278
- {title: "脚本名称", field: "scriptName", type: "input", common: true},
279
- {title: "脚本编码", field: "scriptCode", type: "input", common: true},
280
- {title: "脚本说明", field: "scriptRemark", type: "input", common: true},
281
- {title: "脚本", field: "script", type: "input", common: true},
282
- {title: "项目标签", field: "tag", type: "input", common: true, slot: "tag"},
283
- ]
284
- };
285
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
286
- this.vxeOption = opts;
287
- });
288
- },
289
- confirmScriptDialog(rows) {
290
- if (rows.length) {
291
- let formCode = this.formTemplate.formCode;
292
- let menuKindCode = this.formTemplate.menuKindCode;
293
- let data = rows.map(row => {
294
- return {
295
- scriptCode: row.scriptCode,
296
- scriptName: row.scriptName,
297
- scriptRemark: row.scriptRemark,
298
- script: row.script,
299
- scriptType: 1,
300
- formCode: formCode,
301
- menuKindCode: menuKindCode
302
- }
303
- })
304
- this.$http({
305
- url: USER_PREFIX + '/formScript/saves',
306
- method: `post`,
307
- data: data,
308
- isLoading: true,
309
- success: res => {
310
- this.$message({
311
- message: res.content,
312
- type: 'success',
313
- duration: 500,
314
- onClose: t => {
315
- this.searchEvent()
316
- }
317
- });
318
- }
319
- });
320
- }
321
- },
322
- openProjectTagDialog3() {
323
- this.showProjectTagDialog3 = true;
324
- },
325
- confirmProjectTagDialog3(rows) {
326
- this.checkTags = rows;
327
- },
328
- getTabNames() {
329
- return this.checkTags.map(item => item.tagName).join(",");
330
- },
331
- getBdEnv() {
332
- getBdFlag({
333
- success: res => {
334
- this.isDev = res.objx == 1
335
- }
336
- });
337
- }
338
- }
83
+ mixins: [mixin]
339
84
  };
340
85
  </script>
@@ -1,223 +1,55 @@
1
- <template>
2
- <div id="containt">
3
- <x-tabs ref="xTabs" v-model="activeName" class="tab-box">
4
- <el-tab-pane :label="$t1('常规')" name="first">
5
- <editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
6
- @reload="$reloadHandle" :formCode="formCode" :scriptType="scriptType"></editView>
7
- </el-tab-pane>
8
- <el-tab-pane :label="$t1('列表')" name="second">
9
- <div class="grid-height">
10
- <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
11
- @custom="$vxeTableUtil.customHandle">
12
- <template #form>
13
- <tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
14
- <template #buttonLeft>
15
- <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
16
- v-if="isDev">新增
17
- </vxe-button>
18
- <vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">导入发布
19
- </vxe-button>
20
- <vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
21
- v-if="isDev">导出发布
22
- </vxe-button>
23
- </template>
24
- <template #buttonRight>
25
- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
26
- plain>{{$t1('重置')}}
27
- </vxe-button>
28
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
29
- </vxe-button>
30
- </template>
31
- </tableForm>
32
- </template>
33
- </vxe-grid>
34
- </div>
35
- </el-tab-pane>
36
- <template #editTab="{tab,index,reloadTabContent}">
37
- <el-tab-pane :key="tab.data.id" :label.sync="tab.data.scriptName" :name="tab.data.id+''"
38
- :closable="true">
39
- <editView v-if="tab.showContent" :_dataId="tab.dataId" :formCode="formCode" :scriptType="scriptType"
40
- :parent-target="_self"
41
- @reload="reloadTabContent"></editView>
42
- </el-tab-pane>
43
- </template>
44
- </x-tabs>
45
- </div>
46
- </template>
47
-
48
- <script>
49
- import editView from './edit.vue';
50
- import tableForm from "@base/components/table/tableForm.vue";
51
- import {getBdFlag} from "@base/api/user";
52
-
53
- export default {
54
- name: 'form_script:list',
55
- props: {
56
- scriptType: {
57
- type: Number,
58
- default: 0
59
- },
60
- formCode: {
61
- type: String,
62
- default: null
63
- }
64
- },
65
- components: {tableForm, editView},
66
- data() {
67
- return {
68
- activeName: 'second',
69
- dataId: 0,
70
- showEdit: false,
71
- vxeOption: {},
72
- formData: {},
73
- isDev: true
74
- };
75
- },
76
- mounted() {
77
- this.getBdEnv();
78
- this.initTableList();
79
- },
80
- methods: {
81
- searchEvent() {
82
- this.$refs['table-m1'].commitProxy('reload');
83
- },
84
- resetEvent() {
85
- this.formData = {};
86
- this.$refs['table-m1'].commitProxy('reload');
87
- },
88
- openEditDialog(row) {
89
- /*this.dataId = !id || typeof id == 'object' ? 0 : id;
90
- this.activeName = 'first';
91
- this.$openEditView('showEdit');*/
92
-
93
- let dataId = row?.id || 0;
94
- if (!dataId) {
95
- this.dataId = dataId;
96
- this.activeName = 'first';
97
- this.$openEditView('showEdit');
98
- } else {
99
- this.$refs.xTabs.openEditTab(row);
100
- }
101
- },
102
- getSearchParam() {
103
- return {
104
- ...this.formData,
105
- formCode: this.formCode,
106
- scriptType: this.scriptType
107
- };
108
- },
109
- initTableList() {
110
- let that = this;
111
- let tableOption = {
112
- vue: this,
113
- tableRef: 'table-m1',
114
- tableName: 'bd_form_script_list-m' + this.scriptType,
115
- path: USER_PREFIX + '/formScript/listPage',
116
- param: () => {
117
- return this.getSearchParam();
118
- },
119
- columns: [
120
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
121
- {
122
- title: '脚本名称',
123
- field: 'scriptName',
124
- width: 180,
125
- fixed: 'left'
126
- },
127
- {
128
- title: '脚本编码',
129
- field: 'scriptCode',
130
- width: 180
131
- },
132
- {
133
- title: '脚本说明',
134
- field: 'scriptRemark',
135
- width: 250
136
- },
137
- {
138
- field: 'transactions',
139
- title: '开启事务',
140
- width: 150,
141
- slots: {
142
- default: ({row}) => {
143
- if (row.transactions == 1) {
144
- return [<div class="txt-status">是</div>];
145
- } else {
146
- return [<div class="txt-status s-3">否</div>];
147
- }
148
- }
149
- }
150
- },
151
- {
152
- field: 'sid',
153
- title: '唯一标识',
154
- width: 280
155
- },
156
- {
157
- field: 'createDate',
158
- title: this.$t1('创建时间'),
159
- width: 150
160
- },
161
- {
162
- width: 47,
163
- fixed: 'right',
164
- title: '',
165
- sortable: false,
166
- slots: {
167
- default: ({row}) => {
168
- return [
169
- <div>
170
- <a
171
- href="javascript:void(0);"
172
- class="a-link"
173
- onclick={() => {
174
- this.openEditDialog(row);
175
- }}
176
- >
177
- <el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
178
- popper-class="tooltip-skin">
179
- <i class="el-icon-edit"/>
180
- </el-tooltip>
181
- </a>
182
- </div>
183
- ];
184
- }
185
- }
186
- }
187
- ],
188
- searchColumns: [
189
- {title: "脚本名称", field: "scriptName", type: "input", common: true},
190
- {title: "脚本编码", field: "scriptCode", type: "input", common: true},
191
- {title: "脚本说明", field: "scriptRemark", type: "input", common: true},
192
- {title: "脚本", field: "script", type: "input", common: true},
193
- ]
194
- };
195
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
196
- this.vxeOption = opts;
197
- });
198
- },
199
- jsonImport() {
200
- this.$jsonImport({
201
- saveUrl: USER_PREFIX + '/form_develop/importFormScript',
202
- callback: () => {
203
- this.searchEvent();
204
- }
205
- });
206
- },
207
- jsonExport() {
208
- this.$jsonExport({
209
- targetRef: "table-m1",
210
- url: USER_PREFIX + "/form_develop/exportFormScript",
211
- abcEnabled: true
212
- })
213
- },
214
- getBdEnv() {
215
- getBdFlag({
216
- success: res => {
217
- this.isDev = res.objx == 1
218
- }
219
- });
220
- }
221
- }
222
- };
223
- </script>
1
+ <template>
2
+ <div id="containt">
3
+ <x-tabs ref="xTabs" v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('常规')" name="first">
5
+ <editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
6
+ @reload="$reloadHandle" :formCode="formCode" :scriptType="scriptType"></editView>
7
+ </el-tab-pane>
8
+ <el-tab-pane :label="$t1('列表')" name="second">
9
+ <div class="grid-height">
10
+ <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
11
+ @custom="$vxeTableUtil.customHandle">
12
+ <template #form>
13
+ <tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
14
+ <template #buttonLeft>
15
+ <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
16
+ v-if="isDev">{{ $t1('新增') }}
17
+ </vxe-button>
18
+ <vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">{{ $t1('导入发布') }}
19
+ </vxe-button>
20
+ <vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
21
+ v-if="isDev">{{ $t1('导出发布') }}
22
+ </vxe-button>
23
+ </template>
24
+ <template #buttonRight>
25
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
26
+ plain>{{$t1('重置')}}
27
+ </vxe-button>
28
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{ $t1('搜索') }}
29
+ </vxe-button>
30
+ </template>
31
+ </tableForm>
32
+ </template>
33
+ </vxe-grid>
34
+ </div>
35
+ </el-tab-pane>
36
+ <template #editTab="{tab,index,reloadTabContent}">
37
+ <el-tab-pane :key="tab.data.id" :label.sync="tab.data.scriptName" :name="tab.data.id+''"
38
+ :closable="true">
39
+ <editView v-if="tab.showContent" :_dataId="tab.dataId" :formCode="formCode" :scriptType="scriptType"
40
+ :parent-target="_self"
41
+ @reload="reloadTabContent"></editView>
42
+ </el-tab-pane>
43
+ </template>
44
+ </x-tabs>
45
+ </div>
46
+ </template>
47
+
48
+ <script>
49
+ import mixin from "./mixins/list";
50
+
51
+ export default {
52
+ name: 'form_script:list',
53
+ mixins: [mixin]
54
+ };
55
+ </script>