cloud-web-corejs 1.0.28 → 1.0.30

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 (205) hide show
  1. package/package.json +2 -1
  2. package/src/components/formOplog/mixins.js +1 -1
  3. package/src/components/langTag/addButton.vue +22 -0
  4. package/src/components/langTag/deleteButton.vue +22 -0
  5. package/src/components/langTag/mixins/addButton.js +5 -0
  6. package/src/components/langTag/mixins/deleteButton.js +5 -0
  7. package/src/components/langTag/mixins/view.js +5 -0
  8. package/src/components/langTag/view.vue +33 -0
  9. package/src/components/projectTag/addButton.vue +3 -50
  10. package/src/components/projectTag/deleteButton.vue +3 -50
  11. package/src/components/projectTag/mixins/addButton.js +5 -0
  12. package/src/components/projectTag/mixins/deleteButton.js +5 -0
  13. package/src/components/projectTag/mixins/view.js +5 -0
  14. package/src/components/projectTag/view.vue +33 -72
  15. package/src/components/xform/mixins/scriptHttp.js +1 -1
  16. package/src/index.js +0 -2
  17. package/src/layout/components/Sidebar/default.vue +3 -4
  18. package/src/router/modules/system.js +1 -1
  19. package/src/store/config/index.js +1 -1
  20. package/src/store/getters.js +2 -0
  21. package/src/store/modules/permission.js +1 -1
  22. package/src/store/modules/user.js +2 -1
  23. package/src/utils/request.js +28 -29
  24. package/src/utils/vab.js +27 -27
  25. package/src/views/bd/setting/bd_attach_setting/dialog.vue +4 -87
  26. package/src/views/bd/setting/bd_attach_setting/edit.vue +3 -92
  27. package/src/views/bd/setting/bd_attach_setting/list.vue +4 -214
  28. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +89 -0
  29. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +96 -0
  30. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +219 -0
  31. package/src/views/bd/setting/form_script/dialog.vue +3 -137
  32. package/src/views/bd/setting/form_script/edit.vue +3 -127
  33. package/src/views/bd/setting/form_script/edit1.vue +3 -142
  34. package/src/views/bd/setting/form_script/form_list.vue +4 -259
  35. package/src/views/bd/setting/form_script/list.vue +6 -174
  36. package/src/views/bd/setting/form_script/list1.vue +6 -333
  37. package/src/views/bd/setting/form_script/list2.vue +3 -4
  38. package/src/views/bd/setting/form_script/mixins/dialog.js +142 -0
  39. package/src/views/bd/setting/form_script/mixins/edit.js +134 -0
  40. package/src/views/bd/setting/form_script/mixins/edit1.js +149 -0
  41. package/src/views/bd/setting/form_script/mixins/form_list.js +264 -0
  42. package/src/views/bd/setting/form_script/mixins/list.js +176 -0
  43. package/src/views/bd/setting/form_script/mixins/list1.js +336 -0
  44. package/src/views/bd/setting/form_script/mixins/list2.js +14 -0
  45. package/src/views/bd/setting/form_template/dialog.vue +104 -212
  46. package/src/views/bd/setting/form_template/edit.vue +183 -329
  47. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +46 -131
  48. package/src/views/bd/setting/form_template/ftHistoryDialog.vue +88 -175
  49. package/src/views/bd/setting/form_template/itemEdit.vue +174 -270
  50. package/src/views/bd/setting/form_template/itemList.vue +56 -300
  51. package/src/views/bd/setting/form_template/list.vue +7 -562
  52. package/src/views/bd/setting/form_template/mixins/dialog.js +114 -0
  53. package/src/views/bd/setting/form_template/mixins/edit.js +155 -0
  54. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +94 -0
  55. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +95 -0
  56. package/src/views/bd/setting/form_template/mixins/itemEdit.js +106 -0
  57. package/src/views/bd/setting/form_template/mixins/itemList.js +254 -0
  58. package/src/views/bd/setting/form_template/mixins/list.js +562 -0
  59. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -0
  60. package/src/views/bd/setting/form_template/preformDialog.vue +57 -77
  61. package/src/views/bd/setting/menu_kind/authDialog.vue +84 -308
  62. package/src/views/bd/setting/menu_kind/dialog.vue +89 -226
  63. package/src/views/bd/setting/menu_kind/list.vue +6 -186
  64. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +255 -0
  65. package/src/views/bd/setting/menu_kind/mixins/dialog.js +144 -0
  66. package/src/views/bd/setting/menu_kind/mixins/list.js +187 -0
  67. package/src/views/bd/setting/table_model/dialog.vue +95 -161
  68. package/src/views/bd/setting/table_model/edit.vue +5 -767
  69. package/src/views/bd/setting/table_model/list.vue +8 -369
  70. package/src/views/bd/setting/table_model/mixins/dialog.js +74 -0
  71. package/src/views/bd/setting/table_model/mixins/edit.js +778 -0
  72. package/src/views/bd/setting/table_model/mixins/list.js +367 -0
  73. package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -0
  74. package/src/views/bd/setting/table_model/zdDialog.vue +95 -201
  75. package/src/views/support/export_template/edit.vue +40 -36
  76. package/src/views/support/export_template/list.vue +40 -52
  77. package/src/views/user/access_log/edit.vue +18 -17
  78. package/src/views/user/access_log/list.vue +27 -26
  79. package/src/views/user/access_log/statistics_list.vue +19 -17
  80. package/src/views/user/api_request/edit.vue +14 -11
  81. package/src/views/user/api_request/list.vue +13 -11
  82. package/src/views/user/area/dialog.vue +14 -27
  83. package/src/views/user/area_attribute/configDialog.vue +11 -13
  84. package/src/views/user/area_attribute/edit.vue +8 -6
  85. package/src/views/user/area_attribute/list.vue +1 -1
  86. package/src/views/user/attachment/uploadDialog.vue +1 -1
  87. package/src/views/user/bill_setting/button/previewButton.vue +2 -2
  88. package/src/views/user/bill_setting/compareView.vue +1 -1
  89. package/src/views/user/bill_setting/edit.vue +24 -17
  90. package/src/views/user/bill_setting/h5_ModifyDialog.vue +1 -1
  91. package/src/views/user/bill_setting/itemViewDialog.vue +3 -66
  92. package/src/views/user/bill_setting/list.vue +28 -26
  93. package/src/views/user/bill_setting/mixins/wf.js +8 -8
  94. package/src/views/user/bill_setting/previewDialog.vue +1 -1
  95. package/src/views/user/bill_setting/render.vue +29 -29
  96. package/src/views/user/bill_setting/userDialog.vue +7 -5
  97. package/src/views/user/code_rules/edit.vue +21 -18
  98. package/src/views/user/code_rules/list.vue +27 -19
  99. package/src/views/user/commMenu/index.vue +3 -3
  100. package/src/views/user/common_attribute/edit.vue +7 -5
  101. package/src/views/user/common_attribute/itemEdit.vue +22 -22
  102. package/src/views/user/common_attribute/list.vue +25 -24
  103. package/src/views/user/common_script/edit.vue +12 -12
  104. package/src/views/user/common_script/list.vue +30 -32
  105. package/src/views/user/company_info/dialog.vue +9 -9
  106. package/src/views/user/company_info/edit.vue +11 -8
  107. package/src/views/user/country/dialog.vue +11 -9
  108. package/src/views/user/country/edit.vue +12 -9
  109. package/src/views/user/country/list.vue +12 -12
  110. package/src/views/user/data_type_setting/dialog.vue +10 -10
  111. package/src/views/user/data_type_setting/editDialog.vue +6 -6
  112. package/src/views/user/ea/eagroup/eaobj_list.vue +25 -25
  113. package/src/views/user/ea/eagroup/edit.vue +48 -42
  114. package/src/views/user/ea/eaobj/edit.vue +6 -5
  115. package/src/views/user/ea/eaobj/list.vue +9 -8
  116. package/src/views/user/extend_datasource/dialog.vue +19 -24
  117. package/src/views/user/extend_datasource/edit.vue +20 -16
  118. package/src/views/user/extend_datasource/list.vue +23 -24
  119. package/src/views/user/fieldTranslation/editDialog.vue +28 -28
  120. package/src/views/user/fieldTranslation/list.vue +59 -57
  121. package/src/views/user/field_values_invisible/edit.vue +15 -14
  122. package/src/views/user/field_values_invisible/list.vue +23 -22
  123. package/src/views/user/file_type/edit.vue +12 -21
  124. package/src/views/user/file_type/list.vue +21 -36
  125. package/src/views/user/file_type/userEdit.vue +14 -9
  126. package/src/views/user/file_view_area/edit.vue +3 -3
  127. package/src/views/user/file_view_area/itemEdit.vue +11 -9
  128. package/src/views/user/file_view_area/list.vue +17 -16
  129. package/src/views/user/file_view_ins/list.vue +29 -28
  130. package/src/views/user/file_view_ins/propertiesDialog.vue +15 -15
  131. package/src/views/user/form/form_template/edit.vue +1 -1
  132. package/src/views/user/form/form_template/itemEdit.vue +1 -1
  133. package/src/views/user/form/form_template/itemList.vue +2 -2
  134. package/src/views/user/form/form_template/list.vue +3 -3
  135. package/src/views/user/form/form_type/edit.vue +1 -1
  136. package/src/views/user/form/form_type/list.vue +1 -1
  137. package/src/views/user/form/report_requestaccess/edit.vue +1 -1
  138. package/src/views/user/form/report_requestaccess/list.vue +1 -1
  139. package/src/views/user/form/vform/designer.vue +2 -0
  140. package/src/views/user/form/vform/out_render.vue +1 -0
  141. package/src/views/user/form/vform/render.vue +1 -0
  142. package/src/views/user/form/view/list.vue +2 -1
  143. package/src/views/user/groups/dialog.vue +159 -0
  144. package/src/views/user/groups/edit.vue +131 -0
  145. package/src/views/user/groups/list.vue +167 -0
  146. package/src/views/user/home/index.vue +1 -2
  147. package/src/views/user/lang_tag/dialog.vue +185 -0
  148. package/src/views/user/lang_tag/edit.vue +138 -0
  149. package/src/views/user/lang_tag/list.vue +170 -0
  150. package/src/views/user/language_setting/edit.vue +11 -9
  151. package/src/views/user/language_setting/list.vue +20 -18
  152. package/src/views/user/login/default.vue +129 -0
  153. package/src/views/user/login/index.vue +3 -117
  154. package/src/views/user/menu/list.vue +39 -55
  155. package/src/views/user/mobile_menu/list.vue +18 -54
  156. package/src/views/user/notify_message/dialog.vue +1 -1
  157. package/src/views/user/notify_message/infoDialog.vue +1 -1
  158. package/src/views/user/notify_message/list.vue +24 -23
  159. package/src/views/user/notify_template/edit.vue +13 -11
  160. package/src/views/user/notify_template/list.vue +19 -16
  161. package/src/views/user/oplog/edit.vue +12 -12
  162. package/src/views/user/oplog/list.vue +20 -18
  163. package/src/views/user/position/dialog.vue +6 -6
  164. package/src/views/user/position/edit.vue +11 -8
  165. package/src/views/user/position/list.vue +11 -11
  166. package/src/views/user/project_tag/dialog.vue +11 -9
  167. package/src/views/user/project_tag/edit.vue +8 -6
  168. package/src/views/user/project_tag/list.vue +15 -12
  169. package/src/views/user/push_setting/edit.vue +20 -17
  170. package/src/views/user/push_setting/list.vue +1 -1
  171. package/src/views/user/role/dialog.vue +11 -11
  172. package/src/views/user/role/edit.vue +14 -12
  173. package/src/views/user/role/list.vue +14 -12
  174. package/src/views/user/sale_org/dialog.vue +12 -12
  175. package/src/views/user/sale_org/list.vue +43 -48
  176. package/src/views/user/system_notice/edit.vue +13 -11
  177. package/src/views/user/system_notice/infoDialog.vue +2 -2
  178. package/src/views/user/system_notice/list.vue +19 -17
  179. package/src/views/user/system_parameter/edit.vue +7 -6
  180. package/src/views/user/system_parameter/list.vue +12 -10
  181. package/src/views/user/user/edit.vue +1 -1
  182. package/src/views/user/user/form_edit.vue +50 -7
  183. package/src/views/user/user/form_list.vue +34 -132
  184. package/src/views/user/user/info.vue +20 -19
  185. package/src/views/user/user/infoEdit.vue +18 -18
  186. package/src/views/user/user/infoIframeDialog.vue +1 -1
  187. package/src/views/user/user/modifyPasswordDialog.vue +9 -9
  188. package/src/views/user/wf/iframe/dialog.vue +1 -1
  189. package/src/views/user/wf/wf_auto_submit_data/edit.vue +11 -10
  190. package/src/views/user/wf/wf_auto_submit_data/edith.vue +14 -13
  191. package/src/views/user/wf/wf_auto_submit_data/list.vue +43 -41
  192. package/src/views/user/wf/wf_diy_attribute/edit.vue +11 -8
  193. package/src/views/user/wf/wf_manage/list.vue +66 -61
  194. package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
  195. package/src/views/user/wf/wf_obj_config/dialog.vue +11 -11
  196. package/src/views/user/wf/wf_obj_config/edit.vue +12 -9
  197. package/src/views/user/wf/wf_obj_config/edit_form.vue +11 -9
  198. package/src/views/user/wf/wf_obj_config/itemEdit.vue +31 -27
  199. package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +8 -6
  200. package/src/views/user/wf/wf_obj_config/list.vue +42 -41
  201. package/src/views/user/wf/wf_obj_config/list_form.vue +14 -12
  202. package/src/views/user/wf/wf_param/edit.vue +7 -5
  203. package/src/views/user/wf/wf_work_calendar/configDialog.vue +9 -24
  204. package/src/views/user/wf/wf_work_calendar/list.vue +6 -3
  205. package/src/views/user/home/distributor.vue +0 -849
@@ -0,0 +1,219 @@
1
+ import tableForm from "@base/components/table/tableForm.vue";
2
+ import editView from "@base/views/bd/setting/bd_attach_setting/edit.vue";
3
+ import {treeScollx} from "@base/utils/global";
4
+
5
+ let modules = {};
6
+ modules = {
7
+ name: 'bd_attach_setting:list',
8
+ components: {
9
+ tableForm,
10
+ editView
11
+ },
12
+ created() {
13
+ },
14
+ async mounted() {
15
+ treeScollx({target: this, type: 'default'});
16
+ this.initTableList();
17
+ },
18
+ data() {
19
+ return {
20
+ activeName: 'second',
21
+ dataId: 0,
22
+ showEdit: false,
23
+ vxeOption: {},
24
+ checkRows: [],
25
+ szTaMbIds: [],
26
+ formData: {},
27
+ defaultProps: {
28
+ label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
29
+ children: [],
30
+ isLeaf: 'leaf'
31
+ },
32
+ showItemView: false,
33
+ showMenuKindDialog: false,
34
+ currentFormType: {},
35
+ menuKindAuth: {},
36
+ showTree: false
37
+ };
38
+ },
39
+ computed: {
40
+ currentMenuKindId() {
41
+ return this.currentFormType?.id || null
42
+ },
43
+ currentMenuKindName() {
44
+ return this.currentFormType?.name || null
45
+ }
46
+ },
47
+ methods: {
48
+ searchEvent() {
49
+ this.$refs['table-m1'].commitProxy('reload');
50
+ },
51
+ resetEvent() {
52
+ this.formData = {};
53
+ this.checkTags = [];
54
+ this.$refs['table-m1'].commitProxy('reload');
55
+ },
56
+ openEditDialog(row) {
57
+ /*this.dataId = !id || typeof id == 'object' ? 0 : id;
58
+ this.activeName = 'first';
59
+ this.$openEditView('showEdit');*/
60
+
61
+ let dataId = row?.id || 0;
62
+ if (!dataId) {
63
+ this.dataId = dataId;
64
+ this.activeName = 'first';
65
+ this.$openEditView('showEdit');
66
+ } else {
67
+ this.$refs.xTabs.openEditTab(row);
68
+ }
69
+ },
70
+ getSearchParam() {
71
+ let currentFormType = this.currentFormType || {}
72
+ return {
73
+ ...this.formData,
74
+ type: "importTemplate",
75
+ menuKindCode: currentFormType.menuKindCode || null
76
+ }
77
+ },
78
+ initTableList() {
79
+ let that = this;
80
+ let tableOption = {
81
+ vue: this,
82
+ tableRef: 'table-m1',
83
+ tableName: 'bd_attach_setting_list-m1',
84
+ path: USER_PREFIX + '/bd_attach_setting/listPage',
85
+ param: () => {
86
+ return this.getSearchParam()
87
+ },
88
+ columns: [
89
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
90
+ {
91
+ title: '模板文件名称',
92
+ field: 'name',
93
+ width: 180,
94
+ fixed: 'left'
95
+ },
96
+ {
97
+ title: '模板文件编码',
98
+ field: 'code',
99
+ width: 180
100
+ },
101
+ {title: '表单分类', field: 'menuKindName', width: 150},
102
+ {
103
+ title: this.$t1('备注'),
104
+ field: 'remark',
105
+ width: 250
106
+ },
107
+ {
108
+ field: 'createDate',
109
+ title: this.$t1('创建时间'),
110
+ width: 150
111
+ },
112
+ {
113
+ width: 47,
114
+ fixed: 'right',
115
+ title: '',
116
+ sortable: false,
117
+ slots: {
118
+ default: ({row}) => {
119
+ return [
120
+ <div>
121
+ <a
122
+ href="javascript:void(0);"
123
+ class="a-link"
124
+ onclick={() => {
125
+ this.openEditDialog(row);
126
+ }}
127
+ >
128
+ <el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
129
+ popper-class="tooltip-skin">
130
+ <i class="el-icon-edit"/>
131
+ </el-tooltip>
132
+ </a>
133
+ </div>
134
+ ];
135
+ }
136
+ }
137
+ }
138
+ ],
139
+ searchColumns: [
140
+ {
141
+ title: "表单分类",
142
+ field: "menuKindName",
143
+ type: "input",
144
+ common: true,
145
+ disabled: true,
146
+ defaultValueEnabled: false,
147
+ slot: "menuKindName"
148
+ },
149
+ {title: "模板文件名称", field: "name", type: "input", common: true},
150
+ {title: "模板文件编码", field: "code", type: "input", common: true},
151
+ {title: this.$t1('备注'), field: "remark", type: "input", common: true},
152
+ ],
153
+ config: {
154
+ proxyConfig: {
155
+ autoLoad: false
156
+ }
157
+ },
158
+ };
159
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
160
+ this.vxeOption = opts;
161
+ this.showTree = true;
162
+ });
163
+ },
164
+ handleNodeClick(data, node, v) {
165
+ this.handleNodeData(node)
166
+ this.$forceUpdate();
167
+ this.searchEvent();
168
+ },
169
+ // 异步树叶子节点懒加载逻辑
170
+ loadNode(node, resolve) {
171
+ let id = node && node.data && node.data.id ? node.data.id || '' : 0;
172
+ let param = {enabled: true};
173
+ let url = !id ? USER_PREFIX + '/menuKind/getAllList' : USER_PREFIX + '/menuKind/getChildren';
174
+ this.$http({
175
+ aes:true,
176
+ url: url,
177
+ method: 'post',
178
+ data: {
179
+ parent: id,
180
+ enabled: true
181
+ },
182
+ success: res => {
183
+ let rows = res.objx || [];
184
+ rows.forEach(value => {
185
+ value.leaf = !value.hasChild;
186
+ });
187
+ if (node.level === 0) {
188
+ if (rows.length > 0) {
189
+ this.$nextTick(() => {
190
+ let firstNode = node.childNodes[0];
191
+ if (rows[0].hasChild) {
192
+ firstNode.expand();
193
+ }
194
+ this.$refs.tree.setCurrentKey(firstNode.data);
195
+ this.handleNodeClick(firstNode.data, firstNode, this)
196
+ });
197
+ }
198
+ }
199
+ resolve(rows);
200
+ }
201
+ });
202
+ },
203
+ handleNodeData(node) {
204
+ this.currentFormType = node ? node.data : null;
205
+ this.currentNode = node;
206
+ },
207
+ confirmInsertMenuKind(rows) {
208
+ this.$baseReload();
209
+ },
210
+ moveClick() {
211
+ this.szTaMbIds = [];
212
+ this.$refs["table-m1"].getCheckboxRecords(true).map((item) => {
213
+ this.szTaMbIds.push(item.id);
214
+ });
215
+ this.showMenuKindDialog = true;
216
+ }
217
+ }
218
+ };
219
+ export default modules
@@ -38,7 +38,7 @@
38
38
  <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
39
39
  plain>{{$t1('重置')}}
40
40
  </vxe-button>
41
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
41
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">{{ $t1('搜索') }}
42
42
  </vxe-button>
43
43
  </div>
44
44
  </div>
@@ -112,144 +112,10 @@
112
112
  </template>
113
113
 
114
114
  <script>
115
- import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
116
- import editView from "./edit.vue";
115
+ import mixin from "./mixins/dialog";
117
116
 
118
117
  export default {
119
118
  name: 'formScriptDialog',
120
- components: {editView},
121
- props: ['visiable', 'multi', 'rows', 'param', 'title'],
122
- mixins: [selectDialogMixins],
123
- created() {
124
- this.initSetting();
125
- },
126
- mounted() {
127
- this.initTableM1();
128
- },
129
- data() {
130
- var that = this;
131
- return {
132
- showDialog: true,
133
- falseValue: false,
134
- selectMulti: true,
135
- formData: {},
136
- vxeOption: {},
137
- activeName: 'second',
138
- showEdit: false,
139
- dataId: null,
140
- showTabs: false
141
- };
142
- },
143
- methods: {
144
- initTableM1() {
145
- let that = this;
146
- let tableOption = {
147
- vue: this,
148
- tableRef: 'table-m1',
149
- tableName: 'user_form_script_dialog-m1',
150
- path: USER_PREFIX + '/formScript/listPage',
151
- param: () => {
152
- return {
153
- scriptType: 0,
154
- ...this.formData,
155
- ...this.param
156
- };
157
- },
158
- config: {
159
- checkboxConfig: {
160
- checkStrictly: true,
161
- showHeader: this.selectMulti,
162
- trigger: 'row'
163
- }
164
- },
165
- columns: [
166
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
167
- {
168
- title: '脚本名称',
169
- field: 'scriptName',
170
- width: 180,
171
- fixed: 'left'
172
- },
173
- {
174
- title: '脚本编码',
175
- field: 'scriptCode',
176
- width: 180
177
- },
178
- {
179
- title: '脚本说明',
180
- field: 'scriptRemark',
181
- width: 250
182
- },
183
- {
184
- field: 'transactions',
185
- title: '开启事务',
186
- width: 150,
187
- slots: {
188
- default: ({row}) => {
189
- if (row.transactions == 1) {
190
- return [<div class="txt-status">是</div>];
191
- } else {
192
- return [<div class="txt-status s-3">否</div>];
193
- }
194
- }
195
- }
196
- },
197
- {
198
- field: 'sid',
199
- title: '唯一标识',
200
- width: 250
201
- },
202
- {
203
- field: 'createDate',
204
- title: this.$t1('创建时间'),
205
- width: 150
206
- },
207
- {
208
- width: 47,
209
- fixed: 'right',
210
- title: '',
211
- sortable: false,
212
- slots: {
213
- default: ({row}) => {
214
- return [
215
- <div>
216
- <a
217
- href="javascript:void(0);"
218
- class="a-link"
219
- onclick={() => {
220
- this.openEditDialog(row);
221
- }}
222
- >
223
- <el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
224
- popper-class="tooltip-skin">
225
- <i class="el-icon-edit"/>
226
- </el-tooltip>
227
- </a>
228
- </div>
229
- ];
230
- }
231
- }
232
- }
233
- ]
234
- };
235
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
236
- this.vxeOption = opts;
237
- });
238
- },
239
- openEditDialog(row) {
240
- /*this.dataId = !id || typeof id == 'object' ? 0 : id;
241
- this.activeName = 'first';
242
- this.$openEditView('showEdit');*/
243
-
244
- let dataId = row?.id || 0;
245
- if (!dataId) {
246
- this.dataId = dataId;
247
- this.activeName = 'first';
248
- this.$openEditView('showEdit');
249
- } else {
250
- this.$refs.xTabs.openEditTab(row);
251
- }
252
- },
253
- }
119
+ mixins: [mixin]
254
120
  };
255
121
  </script>
@@ -4,7 +4,7 @@
4
4
  <div class="d-header clearfix">
5
5
  <div class="fl">
6
6
  <i class="el-icon-info"/>
7
- {{ dataId ? $t1('查看') : $t1('新增') }} 表单脚本
7
+ {{ dataId ? $t1('查看表单脚本') : $t1('新增表单脚本') }}
8
8
  </div>
9
9
  <div class="fr">
10
10
  <el-form>
@@ -101,134 +101,10 @@
101
101
  </template>
102
102
 
103
103
  <script>
104
- import {getBdFlag} from "@base/api/user";
105
- import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
106
- import formOplogTable from "@base/components/formOplog/index.vue";
104
+ import mixin from "./mixins/edit";
107
105
 
108
106
  export default {
109
107
  name: 'user_form_scriptEdit',
110
- props: {
111
- _dataId: [String, Number],
112
- readonly: Boolean,
113
- scriptType: {
114
- type: Number,
115
- default: 0
116
- },
117
- formCode: {
118
- type: String,
119
- default: null
120
- }
121
- },
122
- components: {formOplogTable, preformDialog},
123
- data() {
124
- return {
125
- isEdit: false,
126
- tabIndex: 'first',
127
- dataId: '',
128
- formScript: {
129
- enabled: true,
130
- scriptType: null,
131
- formCode: null,
132
- transactions: 1
133
- },
134
- showCodeEditor: false,
135
- isDev: true,
136
- showPreformDialog: false
137
- };
138
- },
139
- created() {
140
- if (this._dataId && !isNaN(this._dataId)) {
141
- this.dataId = this._dataId;
142
- } else {
143
- this.formScript.formCode = this.formCode;
144
- this.formScript.scriptType = this.scriptType;
145
- }
146
- },
147
- mounted() {
148
- this.getBdEnv();
149
- this.getData();
150
- },
151
- methods: {
152
- getData() {
153
- if (this.dataId && !isNaN(this.dataId)) {
154
- this.isEdit = true;
155
- this.$commonHttp({
156
- url: USER_PREFIX + `/formScript/get`,
157
- method: `post`,
158
- data: {
159
- id: this.dataId
160
- },
161
- isLoading: true,
162
- modalStrictly: true,
163
- success: res => {
164
- this.formScript = res.objx || {};
165
- this.showCodeEditor = true;
166
- //获取操作日志数据
167
- this.$refs['oplogTable'].initData({
168
- param: () => {
169
- return {
170
- logType: "FormScript",
171
- logObjCode: this.formScript.sid
172
- };
173
- }
174
- });
175
- }
176
- });
177
- } else {
178
- this.showCodeEditor = true;
179
- }
180
- },
181
- saveData() {
182
- this.$refs.editForm.$baseValidate(valid => {
183
- if (valid) {
184
- this.openPreformDialog();
185
- }
186
- });
187
- },
188
- saveDataHandle(preformData) {
189
- var url = USER_PREFIX + (this.isEdit ? `/formScript/update` : `/formScript/save`);
190
- let formData = {
191
- ...this.formScript,
192
- logContent: preformData.logContent
193
- };
194
- this.$http({
195
- url: url,
196
- method: `post`,
197
- data: formData,
198
- isLoading: true,
199
- success: res => {
200
- this.$message({
201
- message: res.content,
202
- type: 'success',
203
- duration: 500,
204
- onClose: t => {
205
- if (this.isEdit) {
206
- this.$baseReload();
207
- } else {
208
- this.$baseReload({
209
- updateParam: {
210
- _dataId: res.objx
211
- }
212
- });
213
- }
214
- }
215
- });
216
- }
217
- });
218
- },
219
- openPreformDialog() {
220
- this.showPreformDialog = true;
221
- },
222
- confirmPreformDialog(preformData) {
223
- this.saveDataHandle(preformData);
224
- },
225
- getBdEnv() {
226
- getBdFlag({
227
- success: res => {
228
- this.isDev = res.objx == 1
229
- }
230
- });
231
- }
232
- }
108
+ mixins: [mixin]
233
109
  };
234
110
  </script>
@@ -4,7 +4,7 @@
4
4
  <div class="d-header clearfix">
5
5
  <div class="fl">
6
6
  <i class="el-icon-info"/>
7
- {{ dataId ? $t1('查看') : $t1('新增') }} 表单脚本
7
+ {{ dataId ? $t1('查看表单脚本') : $t1('新增表单脚本') }}
8
8
  </div>
9
9
  <div class="fr">
10
10
  <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">{{$t1('重置')}}
@@ -168,149 +168,10 @@
168
168
  </template>
169
169
 
170
170
  <script>
171
- import {getBdFlag} from "@base/api/user";
172
- import MenuKindDialog from "../../../../views/bd/setting/menu_kind/dialog";
173
- import projectTagView from "@base/components/projectTag/view.vue";
174
- import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
175
- import formOplogTable from "@base/components/formOplog/index.vue";
171
+ import mixin from "./mixins/edit1";
176
172
 
177
173
  export default {
178
174
  name: 'user_form_scriptEdit',
179
- props: {
180
- _dataId: [String, Number],
181
- formCode: String,
182
- formTemplate: Object,
183
- currentFormType: Object
184
- },
185
- components: {formOplogTable, preformDialog, projectTagView, MenuKindDialog},
186
- data() {
187
- return {
188
- isEdit: false,
189
- tabIndex: 'first',
190
- dataId: '',
191
- formScript: {
192
- scriptType: 1,
193
- enabled: true,
194
- formCode: null,
195
- menuKindCode: null,
196
- menuKindName: null,
197
- transactions: 1,
198
- formScriptTagDTOs: []
199
- },
200
- showCodeEditor: false,
201
- showMenuKindDialog: false,
202
- isDev: true,
203
- showPreformDialog: false
204
- };
205
- },
206
- created() {
207
- if (this._dataId && !isNaN(this._dataId)) {
208
- this.dataId = this._dataId;
209
- } else {
210
- if (this.formTemplate) {
211
- this.formScript.formCode = this.formTemplate.formCode;
212
- this.formScript.menuKindCode = this.formTemplate.menuKindCode;
213
- this.formScript.menuKindName = this.formTemplate.menuKindName;
214
- } else {
215
- this.formScript.formCode = 'intf';
216
- this.formScript.menuKindName = this.currentFormType?.name || null;
217
- this.formScript.menuKindCode = this.currentFormType?.menuKindCode || null;
218
- }
219
-
220
- }
221
- },
222
- mounted() {
223
- this.getBdEnv();
224
- this.getData();
225
- },
226
- methods: {
227
- getData() {
228
- if (this.dataId && !isNaN(this.dataId)) {
229
- this.isEdit = true;
230
- this.$commonHttp({
231
- url: USER_PREFIX + `/formScript/get`,
232
- method: `post`,
233
- data: {
234
- id: this.dataId
235
- },
236
- isLoading: true,
237
- modalStrictly: true,
238
- success: res => {
239
- this.formScript = res.objx || {};
240
- this.showCodeEditor = true;
241
- //获取操作日志数据
242
- this.$refs['oplogTable'].initData({
243
- param: () => {
244
- return {
245
- logType: "FormScript",
246
- logObjCode: this.formScript.sid
247
- };
248
- }
249
- });
250
- }
251
- });
252
- } else {
253
- this.showCodeEditor = true;
254
- }
255
- },
256
- saveData() {
257
- this.$refs.editForm.$baseValidate(valid => {
258
- if (valid) {
259
- this.openPreformDialog();
260
- }
261
- });
262
- },
263
- saveDataHandle(preformData) {
264
- var url = USER_PREFIX + (this.isEdit ? `/formScript/update` : `/formScript/save`);
265
- let formData = {
266
- ...this.formScript,
267
- logContent: preformData.logContent
268
- };
269
- this.$http({
270
- url: url,
271
- method: `post`,
272
- data: formData,
273
- isLoading: true,
274
- success: res => {
275
- this.$message({
276
- message: res.content,
277
- type: 'success',
278
- duration: 500,
279
- onClose: t => {
280
- if (this.isEdit) {
281
- this.$baseReload();
282
- } else {
283
- this.$baseReload({
284
- updateParam: {
285
- _dataId: res.objx
286
- }
287
- });
288
- }
289
- }
290
- });
291
- }
292
- });
293
- },
294
- openPreformDialog() {
295
- this.showPreformDialog = true;
296
- },
297
- confirmPreformDialog(preformData) {
298
- this.saveDataHandle(preformData);
299
- },
300
- confirmInsertMenuKind(rows) {
301
- if (rows.length > 0) {
302
- let row = rows[0];
303
- this.$set(this.formScript, 'menuKindCode', row.menuKindCode);
304
- this.$set(this.formScript, 'menuKindName', row.name);
305
- }
306
- },
307
- getBdEnv() {
308
- getBdFlag({
309
- success: res => {
310
- this.isDev = res.objx == 1
311
- }
312
- });
313
- }
314
- }
175
+ mixins: [mixin]
315
176
  };
316
177
  </script>