cloud-web-corejs 1.0.28 → 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 (199) hide show
  1. package/package.json +1 -1
  2. package/src/components/formOplog/mixins.js +1 -1
  3. package/src/components/projectTag/addButton.vue +3 -50
  4. package/src/components/projectTag/deleteButton.vue +3 -50
  5. package/src/components/projectTag/mixins/addButton.js +5 -0
  6. package/src/components/projectTag/mixins/deleteButton.js +5 -0
  7. package/src/components/projectTag/mixins/view.js +5 -0
  8. package/src/components/projectTag/view.vue +33 -72
  9. package/src/components/xform/mixins/scriptHttp.js +1 -1
  10. package/src/index.js +0 -2
  11. package/src/layout/components/Sidebar/default.vue +3 -4
  12. package/src/router/modules/system.js +1 -1
  13. package/src/store/config/index.js +1 -1
  14. package/src/store/getters.js +2 -0
  15. package/src/store/modules/permission.js +1 -1
  16. package/src/store/modules/user.js +2 -1
  17. package/src/utils/request.js +28 -29
  18. package/src/utils/vab.js +27 -27
  19. package/src/views/bd/setting/bd_attach_setting/dialog.vue +4 -87
  20. package/src/views/bd/setting/bd_attach_setting/edit.vue +3 -92
  21. package/src/views/bd/setting/bd_attach_setting/list.vue +4 -214
  22. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +89 -0
  23. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +96 -0
  24. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +219 -0
  25. package/src/views/bd/setting/form_script/dialog.vue +3 -137
  26. package/src/views/bd/setting/form_script/edit.vue +3 -127
  27. package/src/views/bd/setting/form_script/edit1.vue +3 -142
  28. package/src/views/bd/setting/form_script/form_list.vue +4 -259
  29. package/src/views/bd/setting/form_script/list.vue +6 -174
  30. package/src/views/bd/setting/form_script/list1.vue +6 -333
  31. package/src/views/bd/setting/form_script/list2.vue +3 -4
  32. package/src/views/bd/setting/form_script/mixins/dialog.js +142 -0
  33. package/src/views/bd/setting/form_script/mixins/edit.js +134 -0
  34. package/src/views/bd/setting/form_script/mixins/edit1.js +149 -0
  35. package/src/views/bd/setting/form_script/mixins/form_list.js +264 -0
  36. package/src/views/bd/setting/form_script/mixins/list.js +176 -0
  37. package/src/views/bd/setting/form_script/mixins/list1.js +336 -0
  38. package/src/views/bd/setting/form_script/mixins/list2.js +14 -0
  39. package/src/views/bd/setting/form_template/dialog.vue +104 -212
  40. package/src/views/bd/setting/form_template/edit.vue +183 -329
  41. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +46 -131
  42. package/src/views/bd/setting/form_template/ftHistoryDialog.vue +88 -175
  43. package/src/views/bd/setting/form_template/itemEdit.vue +174 -270
  44. package/src/views/bd/setting/form_template/itemList.vue +56 -300
  45. package/src/views/bd/setting/form_template/list.vue +7 -562
  46. package/src/views/bd/setting/form_template/mixins/dialog.js +114 -0
  47. package/src/views/bd/setting/form_template/mixins/edit.js +155 -0
  48. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +94 -0
  49. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +95 -0
  50. package/src/views/bd/setting/form_template/mixins/itemEdit.js +106 -0
  51. package/src/views/bd/setting/form_template/mixins/itemList.js +254 -0
  52. package/src/views/bd/setting/form_template/mixins/list.js +562 -0
  53. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -0
  54. package/src/views/bd/setting/form_template/preformDialog.vue +57 -77
  55. package/src/views/bd/setting/menu_kind/authDialog.vue +84 -308
  56. package/src/views/bd/setting/menu_kind/dialog.vue +89 -226
  57. package/src/views/bd/setting/menu_kind/list.vue +6 -186
  58. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +232 -0
  59. package/src/views/bd/setting/menu_kind/mixins/dialog.js +144 -0
  60. package/src/views/bd/setting/menu_kind/mixins/list.js +187 -0
  61. package/src/views/bd/setting/table_model/dialog.vue +95 -161
  62. package/src/views/bd/setting/table_model/edit.vue +5 -767
  63. package/src/views/bd/setting/table_model/list.vue +8 -369
  64. package/src/views/bd/setting/table_model/mixins/dialog.js +74 -0
  65. package/src/views/bd/setting/table_model/mixins/edit.js +778 -0
  66. package/src/views/bd/setting/table_model/mixins/list.js +367 -0
  67. package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -0
  68. package/src/views/bd/setting/table_model/zdDialog.vue +95 -201
  69. package/src/views/support/export_template/edit.vue +40 -36
  70. package/src/views/support/export_template/list.vue +40 -52
  71. package/src/views/user/access_log/edit.vue +18 -17
  72. package/src/views/user/access_log/list.vue +27 -26
  73. package/src/views/user/access_log/statistics_list.vue +19 -17
  74. package/src/views/user/api_request/edit.vue +14 -11
  75. package/src/views/user/api_request/list.vue +13 -11
  76. package/src/views/user/area/dialog.vue +14 -27
  77. package/src/views/user/area_attribute/configDialog.vue +11 -13
  78. package/src/views/user/area_attribute/edit.vue +8 -6
  79. package/src/views/user/area_attribute/list.vue +1 -1
  80. package/src/views/user/attachment/uploadDialog.vue +1 -1
  81. package/src/views/user/bill_setting/button/previewButton.vue +2 -2
  82. package/src/views/user/bill_setting/compareView.vue +1 -1
  83. package/src/views/user/bill_setting/edit.vue +24 -17
  84. package/src/views/user/bill_setting/h5_ModifyDialog.vue +1 -1
  85. package/src/views/user/bill_setting/itemViewDialog.vue +3 -66
  86. package/src/views/user/bill_setting/list.vue +28 -26
  87. package/src/views/user/bill_setting/mixins/wf.js +8 -8
  88. package/src/views/user/bill_setting/previewDialog.vue +1 -1
  89. package/src/views/user/bill_setting/render.vue +29 -29
  90. package/src/views/user/bill_setting/userDialog.vue +7 -5
  91. package/src/views/user/code_rules/edit.vue +21 -18
  92. package/src/views/user/code_rules/list.vue +27 -19
  93. package/src/views/user/commMenu/index.vue +3 -3
  94. package/src/views/user/common_attribute/edit.vue +7 -5
  95. package/src/views/user/common_attribute/itemEdit.vue +22 -22
  96. package/src/views/user/common_attribute/list.vue +25 -24
  97. package/src/views/user/common_script/edit.vue +12 -12
  98. package/src/views/user/common_script/list.vue +30 -32
  99. package/src/views/user/company_info/dialog.vue +9 -9
  100. package/src/views/user/company_info/edit.vue +11 -8
  101. package/src/views/user/country/dialog.vue +11 -9
  102. package/src/views/user/country/edit.vue +12 -9
  103. package/src/views/user/country/list.vue +12 -12
  104. package/src/views/user/data_type_setting/dialog.vue +10 -10
  105. package/src/views/user/data_type_setting/editDialog.vue +6 -6
  106. package/src/views/user/ea/eagroup/eaobj_list.vue +25 -25
  107. package/src/views/user/ea/eagroup/edit.vue +48 -42
  108. package/src/views/user/ea/eaobj/edit.vue +6 -5
  109. package/src/views/user/ea/eaobj/list.vue +9 -8
  110. package/src/views/user/extend_datasource/dialog.vue +19 -24
  111. package/src/views/user/extend_datasource/edit.vue +20 -16
  112. package/src/views/user/extend_datasource/list.vue +23 -24
  113. package/src/views/user/fieldTranslation/editDialog.vue +28 -28
  114. package/src/views/user/fieldTranslation/list.vue +59 -57
  115. package/src/views/user/field_values_invisible/edit.vue +15 -14
  116. package/src/views/user/field_values_invisible/list.vue +23 -22
  117. package/src/views/user/file_type/edit.vue +12 -21
  118. package/src/views/user/file_type/list.vue +21 -36
  119. package/src/views/user/file_type/userEdit.vue +14 -9
  120. package/src/views/user/file_view_area/edit.vue +3 -3
  121. package/src/views/user/file_view_area/itemEdit.vue +11 -9
  122. package/src/views/user/file_view_area/list.vue +17 -16
  123. package/src/views/user/file_view_ins/list.vue +29 -28
  124. package/src/views/user/file_view_ins/propertiesDialog.vue +15 -15
  125. package/src/views/user/form/form_template/edit.vue +1 -1
  126. package/src/views/user/form/form_template/itemEdit.vue +1 -1
  127. package/src/views/user/form/form_template/itemList.vue +2 -2
  128. package/src/views/user/form/form_template/list.vue +3 -3
  129. package/src/views/user/form/form_type/edit.vue +1 -1
  130. package/src/views/user/form/form_type/list.vue +1 -1
  131. package/src/views/user/form/report_requestaccess/edit.vue +1 -1
  132. package/src/views/user/form/report_requestaccess/list.vue +1 -1
  133. package/src/views/user/form/vform/designer.vue +2 -0
  134. package/src/views/user/form/vform/out_render.vue +1 -0
  135. package/src/views/user/form/vform/render.vue +1 -0
  136. package/src/views/user/form/view/list.vue +2 -1
  137. package/src/views/user/groups/dialog.vue +159 -0
  138. package/src/views/user/groups/edit.vue +131 -0
  139. package/src/views/user/groups/list.vue +167 -0
  140. package/src/views/user/home/index.vue +1 -2
  141. package/src/views/user/lang_tag/dialog.vue +185 -0
  142. package/src/views/user/lang_tag/edit.vue +138 -0
  143. package/src/views/user/lang_tag/list.vue +170 -0
  144. package/src/views/user/language_setting/edit.vue +11 -9
  145. package/src/views/user/language_setting/list.vue +20 -18
  146. package/src/views/user/login/default.vue +129 -0
  147. package/src/views/user/login/index.vue +3 -117
  148. package/src/views/user/menu/list.vue +39 -55
  149. package/src/views/user/mobile_menu/list.vue +18 -54
  150. package/src/views/user/notify_message/dialog.vue +1 -1
  151. package/src/views/user/notify_message/infoDialog.vue +1 -1
  152. package/src/views/user/notify_message/list.vue +24 -23
  153. package/src/views/user/notify_template/edit.vue +13 -11
  154. package/src/views/user/notify_template/list.vue +19 -16
  155. package/src/views/user/oplog/edit.vue +12 -12
  156. package/src/views/user/oplog/list.vue +20 -18
  157. package/src/views/user/position/dialog.vue +6 -6
  158. package/src/views/user/position/edit.vue +11 -8
  159. package/src/views/user/position/list.vue +11 -11
  160. package/src/views/user/project_tag/dialog.vue +11 -9
  161. package/src/views/user/project_tag/edit.vue +8 -6
  162. package/src/views/user/project_tag/list.vue +15 -12
  163. package/src/views/user/push_setting/edit.vue +20 -17
  164. package/src/views/user/push_setting/list.vue +1 -1
  165. package/src/views/user/role/dialog.vue +11 -11
  166. package/src/views/user/role/edit.vue +14 -12
  167. package/src/views/user/role/list.vue +14 -12
  168. package/src/views/user/sale_org/dialog.vue +12 -12
  169. package/src/views/user/sale_org/list.vue +43 -48
  170. package/src/views/user/system_notice/edit.vue +13 -11
  171. package/src/views/user/system_notice/infoDialog.vue +2 -2
  172. package/src/views/user/system_notice/list.vue +19 -17
  173. package/src/views/user/system_parameter/edit.vue +7 -6
  174. package/src/views/user/system_parameter/list.vue +12 -10
  175. package/src/views/user/user/edit.vue +1 -1
  176. package/src/views/user/user/form_edit.vue +50 -7
  177. package/src/views/user/user/form_list.vue +34 -132
  178. package/src/views/user/user/info.vue +20 -19
  179. package/src/views/user/user/infoEdit.vue +18 -18
  180. package/src/views/user/user/infoIframeDialog.vue +1 -1
  181. package/src/views/user/user/modifyPasswordDialog.vue +9 -9
  182. package/src/views/user/wf/iframe/dialog.vue +1 -1
  183. package/src/views/user/wf/wf_auto_submit_data/edit.vue +11 -10
  184. package/src/views/user/wf/wf_auto_submit_data/edith.vue +14 -13
  185. package/src/views/user/wf/wf_auto_submit_data/list.vue +43 -41
  186. package/src/views/user/wf/wf_diy_attribute/edit.vue +11 -8
  187. package/src/views/user/wf/wf_manage/list.vue +66 -61
  188. package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
  189. package/src/views/user/wf/wf_obj_config/dialog.vue +11 -11
  190. package/src/views/user/wf/wf_obj_config/edit.vue +12 -9
  191. package/src/views/user/wf/wf_obj_config/edit_form.vue +11 -9
  192. package/src/views/user/wf/wf_obj_config/itemEdit.vue +31 -27
  193. package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +8 -6
  194. package/src/views/user/wf/wf_obj_config/list.vue +42 -41
  195. package/src/views/user/wf/wf_obj_config/list_form.vue +14 -12
  196. package/src/views/user/wf/wf_param/edit.vue +7 -5
  197. package/src/views/user/wf/wf_work_calendar/configDialog.vue +9 -24
  198. package/src/views/user/wf/wf_work_calendar/list.vue +6 -3
  199. package/src/views/user/home/distributor.vue +0 -849
@@ -0,0 +1,149 @@
1
+ import formOplogTable from "@base/components/formOplog/index.vue";
2
+ import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
3
+ import projectTagView from "@base/components/projectTag/view.vue";
4
+ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
5
+ import {getBdFlag} from "@base/api/user";
6
+
7
+ let modules = {};
8
+ modules = {
9
+ name: 'user_form_scriptEdit',
10
+ props: {
11
+ _dataId: [String, Number],
12
+ formCode: String,
13
+ formTemplate: Object,
14
+ currentFormType: Object
15
+ },
16
+ components: {formOplogTable, preformDialog, projectTagView, MenuKindDialog},
17
+ data() {
18
+ return {
19
+ isEdit: false,
20
+ tabIndex: 'first',
21
+ dataId: '',
22
+ formScript: {
23
+ scriptType: 1,
24
+ enabled: true,
25
+ formCode: null,
26
+ menuKindCode: null,
27
+ menuKindName: null,
28
+ transactions: 1,
29
+ formScriptTagDTOs: []
30
+ },
31
+ showCodeEditor: false,
32
+ showMenuKindDialog: false,
33
+ isDev: true,
34
+ showPreformDialog: false
35
+ };
36
+ },
37
+ created() {
38
+ if (this._dataId && !isNaN(this._dataId)) {
39
+ this.dataId = this._dataId;
40
+ } else {
41
+ if (this.formTemplate) {
42
+ this.formScript.formCode = this.formTemplate.formCode;
43
+ this.formScript.menuKindCode = this.formTemplate.menuKindCode;
44
+ this.formScript.menuKindName = this.formTemplate.menuKindName;
45
+ } else {
46
+ this.formScript.formCode = 'intf';
47
+ this.formScript.menuKindName = this.currentFormType?.name || null;
48
+ this.formScript.menuKindCode = this.currentFormType?.menuKindCode || null;
49
+ }
50
+
51
+ }
52
+ },
53
+ mounted() {
54
+ this.getBdEnv();
55
+ this.getData();
56
+ },
57
+ methods: {
58
+ getData() {
59
+ if (this.dataId && !isNaN(this.dataId)) {
60
+ this.isEdit = true;
61
+ this.$commonHttp({
62
+ aes:true,
63
+ url: USER_PREFIX + `/formScript/get`,
64
+ method: `post`,
65
+ data: {
66
+ id: this.dataId
67
+ },
68
+ isLoading: true,
69
+ modalStrictly: true,
70
+ success: res => {
71
+ this.formScript = res.objx || {};
72
+ this.showCodeEditor = true;
73
+ //获取操作日志数据
74
+ this.$refs['oplogTable'].initData({
75
+ param: () => {
76
+ return {
77
+ logType: "FormScript",
78
+ logObjCode: this.formScript.sid
79
+ };
80
+ }
81
+ });
82
+ }
83
+ });
84
+ } else {
85
+ this.showCodeEditor = true;
86
+ }
87
+ },
88
+ saveData() {
89
+ this.$refs.editForm.$baseValidate(valid => {
90
+ if (valid) {
91
+ this.openPreformDialog();
92
+ }
93
+ });
94
+ },
95
+ saveDataHandle(preformData) {
96
+ var url = USER_PREFIX + (this.isEdit ? `/formScript/update` : `/formScript/save`);
97
+ let formData = {
98
+ ...this.formScript,
99
+ logContent: preformData.logContent
100
+ };
101
+ this.$http({
102
+ aes:true,
103
+ url: url,
104
+ method: `post`,
105
+ data: formData,
106
+ isLoading: true,
107
+ success: res => {
108
+ this.$message({
109
+ message: res.content,
110
+ type: 'success',
111
+ duration: 500,
112
+ onClose: t => {
113
+ if (this.isEdit) {
114
+ this.$baseReload();
115
+ } else {
116
+ this.$baseReload({
117
+ updateParam: {
118
+ _dataId: res.objx
119
+ }
120
+ });
121
+ }
122
+ }
123
+ });
124
+ }
125
+ });
126
+ },
127
+ openPreformDialog() {
128
+ this.showPreformDialog = true;
129
+ },
130
+ confirmPreformDialog(preformData) {
131
+ this.saveDataHandle(preformData);
132
+ },
133
+ confirmInsertMenuKind(rows) {
134
+ if (rows.length > 0) {
135
+ let row = rows[0];
136
+ this.$set(this.formScript, 'menuKindCode', row.menuKindCode);
137
+ this.$set(this.formScript, 'menuKindName', row.name);
138
+ }
139
+ },
140
+ getBdEnv() {
141
+ getBdFlag({
142
+ success: res => {
143
+ this.isDev = res.objx == 1
144
+ }
145
+ });
146
+ }
147
+ }
148
+ };
149
+ export default modules
@@ -0,0 +1,264 @@
1
+ import projectTagView from "@base/components/projectTag/view.vue";
2
+ import projectTagAddButton from "@base/components/projectTag/addButton.vue";
3
+ import projectTagDeleteButton from "@base/components/projectTag/deleteButton.vue";
4
+ import tableForm from "@base/components/table/tableForm.vue";
5
+ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
6
+ import editView from "@base/views/bd/setting/form_script/edit1.vue";
7
+ import scriptDialog from "@base/views/bd/setting/form_script/dialog.vue";
8
+ import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
9
+ import {getBdFlag} from "@base/api/user";
10
+
11
+ let modules = {};
12
+ modules = {
13
+ name: 'form_script:form_list',
14
+ components: {
15
+ projectTagView,
16
+ projectTagAddButton,
17
+ projectTagDeleteButton,
18
+ tableForm, MenuKindDialog, editView, scriptDialog, projectTagDialog
19
+ },
20
+ props: ["formTemplate"],
21
+ data() {
22
+ return {
23
+ activeName: 'second',
24
+ dataId: 0,
25
+ showEdit: false,
26
+ vxeOption: {},
27
+ formData: {},
28
+ showScriptDialog: false,
29
+ addProjectTagOption: {
30
+ url: USER_PREFIX + `/formScript/saveTag`,
31
+ tableDatas: () => {
32
+ return this.$refs["table-m1"].getCheckboxRecords(true);
33
+ },
34
+ reqData: (tagDatas, tableDatas) => {
35
+ let sids = tableDatas.map(item => item.sid);
36
+ let tagCodes = tagDatas.map(item => item.tagCode);
37
+ let reqData = {
38
+ tagCodes,
39
+ sids
40
+ };
41
+ return reqData;
42
+ },
43
+ callback: () => {
44
+ this.searchEvent()
45
+ }
46
+ },
47
+ deleteProjectTagOption: {
48
+ url: USER_PREFIX + `/formScript/deleteTag`,
49
+ tableDatas: () => {
50
+ return this.$refs["table-m1"].getCheckboxRecords(true);
51
+ },
52
+ reqData: (tagDatas, tableDatas) => {
53
+ let sids = tableDatas.map(item => item.sid);
54
+ let tagCodes = tagDatas.map(item => item.tagCode);
55
+ let reqData = {
56
+ tagCodes,
57
+ sids
58
+ };
59
+ return reqData;
60
+ },
61
+ callback: () => {
62
+ this.searchEvent()
63
+ }
64
+ },
65
+ showProjectTagDialog3: false,
66
+ checkTags: [],
67
+ isDev: true
68
+ };
69
+ },
70
+ mounted() {
71
+ this.getBdEnv();
72
+ this.initTableList();
73
+ },
74
+ methods: {
75
+ searchEvent() {
76
+ this.$refs['table-m1'].commitProxy('reload');
77
+ },
78
+ resetEvent() {
79
+ this.formData = {};
80
+ this.checkTags = [];
81
+ this.$refs['table-m1'].commitProxy('reload');
82
+ },
83
+ openEditDialog(row) {
84
+ /*this.dataId = !id || typeof id == 'object' ? 0 : id;
85
+ this.activeName = 'first';
86
+ this.$openEditView('showEdit');*/
87
+
88
+ let dataId = row?.id || 0;
89
+ if (!dataId) {
90
+ this.dataId = dataId;
91
+ this.activeName = 'first';
92
+ this.$openEditView('showEdit');
93
+ } else {
94
+ this.$refs.xTabs.openEditTab(row);
95
+ }
96
+ },
97
+ initTableList() {
98
+ let that = this;
99
+ let tableOption = {
100
+ vue: this,
101
+ tableRef: 'table-m1',
102
+ tableName: 'bd_form_script_form_list-m1',
103
+ path: USER_PREFIX + '/formScript/listPage',
104
+ param: () => {
105
+ let tagCodes = null;
106
+ if (this.checkTags.length) {
107
+ tagCodes = this.checkTags.map(item => item.tagCode);
108
+ }
109
+ return {
110
+ formCode: this.formTemplate.formCode,
111
+ menuKindCode: this.formTemplate.menuKindCode,
112
+ ...this.formData,
113
+ tagCodes,
114
+ scriptType: 1,
115
+ };
116
+ },
117
+ columns: [
118
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
119
+ {
120
+ title: '脚本名称',
121
+ field: 'scriptName',
122
+ width: 180,
123
+ fixed: 'left'
124
+ },
125
+ {
126
+ title: '脚本编码',
127
+ field: 'scriptCode',
128
+ width: 180
129
+ },
130
+ {
131
+ title: '脚本说明',
132
+ field: 'scriptRemark',
133
+ width: 250
134
+ },
135
+ {
136
+ title: '表单模板编码',
137
+ field: 'formCode',
138
+ width: 250
139
+ },
140
+ {
141
+ title: '项目标签', field: 'tag', width: 250, slots: {default: "tag"}, params: {
142
+ exportVal: ({row}) => {
143
+ if (row.formScriptTagDTOs) {
144
+ return row.formScriptTagDTOs.map(item => item.tagName).join(",")
145
+ }
146
+ }
147
+ }
148
+ },
149
+ {
150
+ field: 'transactions',
151
+ title: '开启事务',
152
+ width: 150,
153
+ slots: {
154
+ default: ({row}) => {
155
+ if (row.transactions == 1) {
156
+ return [<div class="txt-status">是</div>];
157
+ } else {
158
+ return [<div class="txt-status s-3">否</div>];
159
+ }
160
+ }
161
+ }
162
+ },
163
+ {
164
+ field: 'sid',
165
+ title: '唯一标识',
166
+ width: 280
167
+ },
168
+ {
169
+ field: 'createDate',
170
+ title: this.$t1('创建时间'),
171
+ width: 150
172
+ },
173
+ {
174
+ width: 47,
175
+ fixed: 'right',
176
+ title: '',
177
+ sortable: false,
178
+ slots: {
179
+ default: ({row}) => {
180
+ return [
181
+ <div>
182
+ <a
183
+ href="javascript:void(0);"
184
+ class="a-link"
185
+ onclick={() => {
186
+ this.openEditDialog(row);
187
+ }}
188
+ >
189
+ <el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
190
+ popper-class="tooltip-skin">
191
+ <i class="el-icon-edit"/>
192
+ </el-tooltip>
193
+ </a>
194
+ </div>
195
+ ];
196
+ }
197
+ }
198
+ }
199
+ ],
200
+ searchColumns: [
201
+ {title: "脚本名称", field: "scriptName", type: "input", common: true},
202
+ {title: "脚本编码", field: "scriptCode", type: "input", common: true},
203
+ {title: "脚本说明", field: "scriptRemark", type: "input", common: true},
204
+ {title: "脚本", field: "script", type: "input", common: true},
205
+ {title: "项目标签", field: "tag", type: "input", common: true, slot: "tag"},
206
+ ]
207
+ };
208
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
209
+ this.vxeOption = opts;
210
+ });
211
+ },
212
+ confirmScriptDialog(rows) {
213
+ if (rows.length) {
214
+ let formCode = this.formTemplate.formCode;
215
+ let menuKindCode = this.formTemplate.menuKindCode;
216
+ let data = rows.map(row => {
217
+ return {
218
+ scriptCode: row.scriptCode,
219
+ scriptName: row.scriptName,
220
+ scriptRemark: row.scriptRemark,
221
+ script: row.script,
222
+ scriptType: 1,
223
+ formCode: formCode,
224
+ menuKindCode: menuKindCode
225
+ }
226
+ })
227
+ this.$http({
228
+ aes:true,
229
+ url: USER_PREFIX + '/formScript/saves',
230
+ method: `post`,
231
+ data: data,
232
+ isLoading: true,
233
+ success: res => {
234
+ this.$message({
235
+ message: res.content,
236
+ type: 'success',
237
+ duration: 500,
238
+ onClose: t => {
239
+ this.searchEvent()
240
+ }
241
+ });
242
+ }
243
+ });
244
+ }
245
+ },
246
+ openProjectTagDialog3() {
247
+ this.showProjectTagDialog3 = true;
248
+ },
249
+ confirmProjectTagDialog3(rows) {
250
+ this.checkTags = rows;
251
+ },
252
+ getTabNames() {
253
+ return this.checkTags.map(item => item.tagName).join(",");
254
+ },
255
+ getBdEnv() {
256
+ getBdFlag({
257
+ success: res => {
258
+ this.isDev = res.objx == 1
259
+ }
260
+ });
261
+ }
262
+ }
263
+ };
264
+ export default modules
@@ -0,0 +1,176 @@
1
+ import tableForm from "@base/components/table/tableForm.vue";
2
+ import editView from "@base/views/bd/setting/form_script/edit.vue";
3
+ import {getBdFlag} from "@base/api/user";
4
+
5
+ let modules = {};
6
+ modules = {
7
+ name: 'form_script:list',
8
+ props: {
9
+ scriptType: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ formCode: {
14
+ type: String,
15
+ default: null
16
+ }
17
+ },
18
+ components: {tableForm, editView},
19
+ data() {
20
+ return {
21
+ activeName: 'second',
22
+ dataId: 0,
23
+ showEdit: false,
24
+ vxeOption: {},
25
+ formData: {},
26
+ isDev: true
27
+ };
28
+ },
29
+ mounted() {
30
+ this.getBdEnv();
31
+ this.initTableList();
32
+ },
33
+ methods: {
34
+ searchEvent() {
35
+ this.$refs['table-m1'].commitProxy('reload');
36
+ },
37
+ resetEvent() {
38
+ this.formData = {};
39
+ this.$refs['table-m1'].commitProxy('reload');
40
+ },
41
+ openEditDialog(row) {
42
+ /*this.dataId = !id || typeof id == 'object' ? 0 : id;
43
+ this.activeName = 'first';
44
+ this.$openEditView('showEdit');*/
45
+
46
+ let dataId = row?.id || 0;
47
+ if (!dataId) {
48
+ this.dataId = dataId;
49
+ this.activeName = 'first';
50
+ this.$openEditView('showEdit');
51
+ } else {
52
+ this.$refs.xTabs.openEditTab(row);
53
+ }
54
+ },
55
+ getSearchParam() {
56
+ return {
57
+ ...this.formData,
58
+ formCode: this.formCode,
59
+ scriptType: this.scriptType
60
+ };
61
+ },
62
+ initTableList() {
63
+ let that = this;
64
+ let tableOption = {
65
+ vue: this,
66
+ tableRef: 'table-m1',
67
+ tableName: 'bd_form_script_list-m' + this.scriptType,
68
+ path: USER_PREFIX + '/formScript/listPage',
69
+ param: () => {
70
+ return this.getSearchParam();
71
+ },
72
+ columns: [
73
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
74
+ {
75
+ title: '脚本名称',
76
+ field: 'scriptName',
77
+ width: 180,
78
+ fixed: 'left'
79
+ },
80
+ {
81
+ title: '脚本编码',
82
+ field: 'scriptCode',
83
+ width: 180
84
+ },
85
+ {
86
+ title: '脚本说明',
87
+ field: 'scriptRemark',
88
+ width: 250
89
+ },
90
+ {
91
+ field: 'transactions',
92
+ title: '开启事务',
93
+ width: 150,
94
+ slots: {
95
+ default: ({row}) => {
96
+ if (row.transactions == 1) {
97
+ return [<div class="txt-status">是</div>];
98
+ } else {
99
+ return [<div class="txt-status s-3">否</div>];
100
+ }
101
+ }
102
+ }
103
+ },
104
+ {
105
+ field: 'sid',
106
+ title: '唯一标识',
107
+ width: 280
108
+ },
109
+ {
110
+ field: 'createDate',
111
+ title: this.$t1('创建时间'),
112
+ width: 150
113
+ },
114
+ {
115
+ width: 47,
116
+ fixed: 'right',
117
+ title: '',
118
+ sortable: false,
119
+ slots: {
120
+ default: ({row}) => {
121
+ return [
122
+ <div>
123
+ <a
124
+ href="javascript:void(0);"
125
+ class="a-link"
126
+ onclick={() => {
127
+ this.openEditDialog(row);
128
+ }}
129
+ >
130
+ <el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
131
+ popper-class="tooltip-skin">
132
+ <i class="el-icon-edit"/>
133
+ </el-tooltip>
134
+ </a>
135
+ </div>
136
+ ];
137
+ }
138
+ }
139
+ }
140
+ ],
141
+ searchColumns: [
142
+ {title: "脚本名称", field: "scriptName", type: "input", common: true},
143
+ {title: "脚本编码", field: "scriptCode", type: "input", common: true},
144
+ {title: "脚本说明", field: "scriptRemark", type: "input", common: true},
145
+ {title: "脚本", field: "script", type: "input", common: true},
146
+ ]
147
+ };
148
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
149
+ this.vxeOption = opts;
150
+ });
151
+ },
152
+ jsonImport() {
153
+ this.$jsonImport({
154
+ saveUrl: USER_PREFIX + '/form_develop/importFormScript',
155
+ callback: () => {
156
+ this.searchEvent();
157
+ }
158
+ });
159
+ },
160
+ jsonExport() {
161
+ this.$jsonExport({
162
+ targetRef: "table-m1",
163
+ url: USER_PREFIX + "/form_develop/exportFormScript",
164
+ abcEnabled: true
165
+ })
166
+ },
167
+ getBdEnv() {
168
+ getBdFlag({
169
+ success: res => {
170
+ this.isDev = res.objx == 1
171
+ }
172
+ });
173
+ }
174
+ }
175
+ };
176
+ export default modules