cloud-web-corejs-haier 1.0.17 → 1.0.19

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 (177) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/index.js +48 -1
  3. package/src/components/VabUpload/mixins.js +1821 -1
  4. package/src/components/VabUpload/privateProfileDialogMixins.js +1063 -1
  5. package/src/components/advancedSearchDialog/mixins.js +28 -1
  6. package/src/components/baseAlert/index.js +44 -1
  7. package/src/components/baseAlert/index.vue +53 -53
  8. package/src/components/baseAlert/mixins.js +61 -1
  9. package/src/components/baseAttachment/install.js +21 -5
  10. package/src/components/baseAttachment/mixins.js +309 -1
  11. package/src/components/baseInputBatch/mixins.js +58 -1
  12. package/src/components/baseInputExport/mixins.js +391 -1
  13. package/src/components/baseTabs/mixins.js +166 -1
  14. package/src/components/cnPrint/index.js +44 -1
  15. package/src/components/cnPrint/mixins.js +189 -1
  16. package/src/components/code-editor/index.vue +51 -136
  17. package/src/components/confirmDialog/index.js +41 -1
  18. package/src/components/confirmDialog/mixins.js +31 -1
  19. package/src/components/errorMsg/index.js +44 -1
  20. package/src/components/errorMsg/index.vue +3 -3
  21. package/src/components/errorMsg/mixins.js +96 -1
  22. package/src/components/excelExport/button.vue +1 -1
  23. package/src/components/excelExport/index.js +43 -1
  24. package/src/components/excelExport/mixins.js +964 -1
  25. package/src/components/excelImport/index.js +74 -13
  26. package/src/components/excelImport/mixins.js +774 -1
  27. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  28. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  29. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  30. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +202 -350
  31. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +26 -33
  32. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +5 -5
  33. package/src/components/fileLibrary/mixins/indexMixins.js +106 -250
  34. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +4 -64
  35. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +4 -3
  36. package/src/components/formOplog/mixins.js +77 -1
  37. package/src/components/hiprint/view/design/mixins.js +611 -1
  38. package/src/components/jdPrint/index.js +44 -1
  39. package/src/components/jdPrint/mixins.js +208 -1
  40. package/src/components/jsonImport/index.js +187 -17
  41. package/src/components/jsonImport/mixins.js +332 -1
  42. package/src/components/langImport/index.js +80 -1
  43. package/src/components/langImport/mixins.js +484 -1
  44. package/src/components/langTag/mixins/addButton.js +51 -5
  45. package/src/components/langTag/mixins/deleteButton.js +55 -5
  46. package/src/components/langTag/mixins/view.js +47 -5
  47. package/src/components/obsUpload/index.js +34 -1
  48. package/src/components/obsUpload/mixins.js +1469 -1
  49. package/src/components/onlineTalk/index.vue +5 -327
  50. package/src/components/onlineTalk/mixins.js +852 -1
  51. package/src/components/oplogTable/mixins.js +83 -4
  52. package/src/components/pddPrint/index.js +44 -1
  53. package/src/components/pddPrint/mixins.js +252 -1
  54. package/src/components/projectTag/mixins/addButton.js +52 -1
  55. package/src/components/projectTag/mixins/deleteButton.js +52 -1
  56. package/src/components/projectTag/mixins/view.js +43 -1
  57. package/src/components/scriptDescription/mixins.js +30 -1
  58. package/src/components/scriptTest/mixins.js +90 -1
  59. package/src/components/statusTag/mixins.js +66 -1
  60. package/src/components/table/CellSlot.vue +2 -29
  61. package/src/components/table/config.js +74 -1
  62. package/src/components/table/index.js +1 -1
  63. package/src/components/table/tableFormMixin.js +1 -1
  64. package/src/components/table/util/index.js +2 -2
  65. package/src/components/table/vxeFilter/index.js +153 -1
  66. package/src/components/table/vxeFilter/mixin.js +1 -4
  67. package/src/components/vipPrint/index.js +44 -1
  68. package/src/components/vipPrint/mixins.js +268 -1
  69. package/src/components/xform/form-designer/designer.js +1 -1
  70. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +1 -1
  71. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -1
  72. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
  73. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
  74. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +92 -0
  75. package/src/components/xform/form-designer/form-widget/indexMixin.js +1 -1
  76. package/src/components/xform/form-designer/indexMixin.js +1 -1
  77. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  78. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
  79. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/preWrap-editor.vue +23 -0
  80. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +71 -0
  81. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
  82. package/src/components/xform/form-designer/widget-panel/indexMixin.js +290 -1
  83. package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -1
  84. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
  85. package/src/components/xform/form-render/dynamicDialogRender.js +195 -1
  86. package/src/components/xform/form-render/indexMixin.js +2 -3501
  87. package/src/components/xform/form-render/refMixin.js +3 -3
  88. package/src/components/xform/mixins/defaultHandle.js +340 -2
  89. package/src/components/xform/mixins/scriptHttp.js +172 -1
  90. package/src/components/xform/utils/formHttp.js +162 -0
  91. package/src/components/xform/utils/format.js +12 -6
  92. package/src/components/xform/utils/util.js +1464 -1
  93. package/src/components/xform/utils/validators.js +134 -1
  94. package/src/components/xhsPrint/index.js +44 -1
  95. package/src/components/xhsPrint/mixins.js +269 -1
  96. package/src/directive/LimitNumber/index.js +125 -1
  97. package/src/directive/el-dialog-center/index.js +34 -1
  98. package/src/directive/el-drag-dialog/drag.js +86 -1
  99. package/src/directive/el-readonly/index.js +15 -1
  100. package/src/directive/permission/hasPermi.js +34 -1
  101. package/src/index.js +2 -2
  102. package/src/router/modules/customer.js +3 -3
  103. package/src/store/config/index.js +1 -1
  104. package/src/store/modules/permission.js +40 -41
  105. package/src/store/modules/settings.js +1 -1
  106. package/src/store/modules/tagsView.js +11 -1
  107. package/src/store/modules/user.js +23 -1
  108. package/src/utils/aes.js +1 -1
  109. package/src/utils/auth.js +1 -1
  110. package/src/utils/global.js +362 -1
  111. package/src/utils/index.js +579 -1
  112. package/src/utils/keepAlive.js +181 -1
  113. package/src/utils/pddLog.js +17 -28
  114. package/src/utils/request.js +1 -1
  115. package/src/utils/vab.js +1 -1
  116. package/src/utils/validate.js +106 -1
  117. package/src/utils/wf.js +749 -4
  118. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +84 -1
  119. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +113 -1
  120. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  121. package/src/views/bd/setting/bd_company_env/edit.vue +193 -193
  122. package/src/views/bd/setting/form_script/mixins/form_list.js +283 -1
  123. package/src/views/bd/setting/form_script/mixins/list2.js +10 -1
  124. package/src/views/bd/setting/form_script/mixins/preformDialog.js +34 -1
  125. package/src/views/bd/setting/form_template/mixins/dialog.js +103 -1
  126. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +92 -1
  127. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +91 -1
  128. package/src/views/bd/setting/form_template/mixins/itemEdit.js +104 -1
  129. package/src/views/bd/setting/form_template/mixins/itemList.js +234 -1
  130. package/src/views/bd/setting/form_template/mixins/list2.js +411 -0
  131. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -3
  132. package/src/views/bd/setting/form_template/mixins/wf_list.js +423 -1
  133. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -254
  134. package/src/views/bd/setting/logic_param/mixins/edit.js +91 -1
  135. package/src/views/bd/setting/logic_param/mixins/list.js +368 -1
  136. package/src/views/bd/setting/menu_kind/mixins/dialog.js +139 -1
  137. package/src/views/bd/setting/request_async_setting/edit.vue +320 -320
  138. package/src/views/bd/setting/request_setting/edit.vue +300 -300
  139. package/src/views/bd/setting/table_model/mixins/dialog.js +71 -1
  140. package/src/views/bd/setting/table_model/mixins/zdDialog.js +108 -1
  141. package/src/views/bd/setting/utils/index.js +60 -1
  142. package/src/views/user/api_request/list.vue +203 -203
  143. package/src/views/user/bill_setting/list.vue +345 -345
  144. package/src/views/user/code_rules/list.vue +204 -204
  145. package/src/views/user/common_attribute/list.vue +378 -378
  146. package/src/views/user/common_script/list.vue +341 -341
  147. package/src/views/user/country/list.vue +197 -197
  148. package/src/views/user/extend_datasource/list.vue +224 -224
  149. package/src/views/user/fieldTranslation/list.vue +473 -473
  150. package/src/views/user/field_values_invisible/list.vue +207 -207
  151. package/src/views/user/file_type/list.vue +271 -271
  152. package/src/views/user/file_view_area/list.vue +331 -331
  153. package/src/views/user/form/form_template/itemList.vue +221 -221
  154. package/src/views/user/form/form_template/list.vue +512 -512
  155. package/src/views/user/form/form_type/list.vue +142 -142
  156. package/src/views/user/form/report_requestaccess/list.vue +198 -198
  157. package/src/views/user/groups/list.vue +158 -158
  158. package/src/views/user/lang_tag/list.vue +170 -170
  159. package/src/views/user/language_setting/list.vue +208 -208
  160. package/src/views/user/menu/list.vue +575 -575
  161. package/src/views/user/notify_template/list.vue +192 -192
  162. package/src/views/user/notify_template/list2.vue +190 -190
  163. package/src/views/user/position/list.vue +188 -188
  164. package/src/views/user/project_tag/list.vue +175 -175
  165. package/src/views/user/push_setting/list.vue +236 -236
  166. package/src/views/user/request_setting/list.vue +248 -248
  167. package/src/views/user/role/list.vue +182 -182
  168. package/src/views/user/system_notice/list.vue +203 -203
  169. package/src/views/user/system_parameter/list.vue +141 -141
  170. package/src/views/user/user/form_list.vue +245 -245
  171. package/src/views/user/user_log_classify/list.vue +197 -197
  172. package/src/views/user/wf/wf_obj_config/list.vue +753 -753
  173. package/src/views/user/wf/wf_obj_config/list_form.vue +373 -373
  174. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +0 -11028
  175. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +0 -200
  176. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +0 -1639
  177. package/src/components/xform/form-render/indexMixin copy.js +0 -3462
@@ -1,341 +1,341 @@
1
- <template>
2
- <div id="containt">
3
- <el-tabs 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"></editView>
7
- </el-tab-pane>
8
- <el-tab-pane :label="$t1('列表')" name="second">
9
- <div class="tree-box fl">
10
- <div class="tit"><b>{{ $t1('数据类型') }}</b></div>
11
- <div class="tree-btns" style="margin-top: 10px;">
12
- <el-button type="primary" plain icon="el-icon-circle-plus-outline" class="btn"
13
- @click="addDataType()">{{ $t1('新增') }}
14
- </el-button>
15
- <el-button type="primary" plain icon="el-icon-edit-outline" class="btn" @click="editDataType()"
16
- :disabled="!currentDataType || !currentDataType.dataTypeCode">{{ $t1('编辑') }}
17
- </el-button>
18
- <el-button type="primary" plain icon="el-icon-delete" class="btn" @click="deleteDataType()"
19
- :disabled="!currentDataType || !currentDataType.dataTypeCode">{{ $t1('删除') }}
20
- </el-button>
21
- </div>
22
- <el-tree
23
- :props="defaultProps"
24
- :load="loadNode"
25
- node-key="id"
26
- ref="tree"
27
- highlight-current
28
- lazy
29
- :expand-on-click-node="false"
30
- @node-click="handleNodeClick"
31
- class="tree-list"
32
- icon-class="el-icon-arrow-down"
33
- ></el-tree>
34
- </div>
35
- <label id="labBtn">
36
- <div class="icon">
37
- <i class="el-icon-more"></i>
38
- <i class="el-icon-more"></i>
39
- </div>
40
- </label>
41
- <div class="main-right fr" style="padding-left:6px;">
42
- <div class="grid-height">
43
- <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
44
- @custom="$vxeTableUtil.customHandle">
45
- <template #form>
46
- <div class="clearfix screen-btns">
47
- <div class="fl">
48
- <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog">
49
- {{ $t1('新增') }}
50
- </vxe-button>
51
- <base-table-export :option="{ title: $t1('通用执行脚本导出'), targetRef: 'table-m1'}"
52
- :parent-target="_self"/>
53
- </div>
54
- <div class="fr">
55
- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
56
- plain>{{ $t1('重置') }}
57
- </vxe-button>
58
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
59
- {{ $t1('搜索') }}
60
- </vxe-button>
61
- </div>
62
- </div>
63
- <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
64
- @submit="searchEvent" @reset="searchEvent">
65
- <vxe-form-item :title="$t1('数据类型')+':'" field="dataTypeName">
66
- <template v-slot>
67
- <el-input v-model="currentDataType.dataTypeName" size="small" disabled/>
68
- </template>
69
- </vxe-form-item>
70
- <vxe-form-item :title="$t1('脚本编号')+':'" field="scriptCode">
71
- <template v-slot>
72
- <el-input v-model="formData.scriptCode" size="small" clearable/>
73
- </template>
74
- </vxe-form-item>
75
- <vxe-form-item :title="$t1('脚本说明')+':'" field="scriptDesc">
76
- <template v-slot>
77
- <el-input v-model="formData.scriptDesc" size="small" clearable/>
78
- </template>
79
- </vxe-form-item>
80
- <vxe-form-item :title="$t1('脚本')+':'" field="script">
81
- <template v-slot>
82
- <el-input v-model="formData.script" size="small" clearable/>
83
- </template>
84
- </vxe-form-item>
85
- <vxe-form-item :title="$t1('是否启用')+':'" field="enabled">
86
- <template v-slot>
87
- <el-select v-model="formData.enabled" clearable>
88
- <el-option :value="true" :label="$t1('启用')"></el-option>
89
- <el-option :value="false" :label="$t1('禁用')"></el-option>
90
- </el-select>
91
- </template>
92
- </vxe-form-item>
93
- </vxe-form>
94
- </template>
95
- </vxe-grid>
96
- </div>
97
- </div>
98
- </el-tab-pane>
99
- </el-tabs>
100
- <dataTypeEditDialog v-if="showDataTypeEditDialog" :visiable.sync="showDataTypeEditDialog"
101
- :_dataId.sync="editDataTypeId" :dataTypeGroup="dataTypeGroup"
102
- @confirm="confirmDataTypeEditDialog"></dataTypeEditDialog>
103
- </div>
104
- </template>
105
-
106
- <script>
107
- import editView from './edit.vue';
108
- import dataTypeEditDialog from "../../../views/user/data_type_setting/editDialog";
109
- import {treeScollx} from '@base/utils/global.js';
110
-
111
- export default {
112
- name: 'common_script:list',
113
- components: {editView, dataTypeEditDialog},
114
- data() {
115
- return {
116
- activeName: 'second',
117
- dataId: 0,
118
- showEdit: false,
119
- vxeOption: {},
120
- formData: {},
121
-
122
- defaultProps: {
123
- label: 'dataTypeName', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
124
- children: [],
125
- isLeaf: 'leaf'
126
- },
127
- showDataTypeEditDialog: false,
128
- currentDataType: {},
129
- dataTypeGroup: "commonScript"
130
- };
131
- },
132
- mounted() {
133
- treeScollx({target: this, type: 'default'});
134
- this.initTableList();
135
- },
136
- methods: {
137
- searchEvent() {
138
- this.$refs['table-m1'].commitProxy('reload');
139
- },
140
- resetEvent() {
141
- this.formData = {};
142
- this.$refs['table-m1'].commitProxy('reload');
143
- },
144
- openEditDialog(id) {
145
- this.dataId = !id || typeof id == 'object' ? 0 : id;
146
- this.activeName = 'first';
147
- this.$openEditView('showEdit');
148
- },
149
- initTableList() {
150
- let that = this;
151
- let pushTypeMap = {0: this.$t1('异步推送'), 1: this.$t1('同步调用')};
152
- let tableOption = {
153
- vue: this,
154
- tableRef: 'table-m1',
155
- tableName: 'user_commonScript_list-m1',
156
- path: USER_PREFIX + '/common_script/listPage',
157
- param: () => {
158
- return {
159
- ...this.formData,
160
- dataTypeCode: this.currentDataType.dataTypeCode
161
- };
162
- },
163
- columns: [
164
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
165
- {
166
- title: this.$t1('脚本编号'),
167
- field: 'scriptCode',
168
- width: 150,
169
- fixed: 'left'
170
- },
171
- {
172
- title: this.$t1('脚本说明'),
173
- field: 'scriptDesc',
174
- width: 150
175
- },
176
- {
177
- title: this.$t1('执行组织编码'),
178
- field: 'exeCompanyCode',
179
- width: 150
180
- },
181
- {
182
- field: 'enabled',
183
- title: this.$t1('是否启用'),
184
- width: 150,
185
- slots: {
186
- default: ({row}) => {
187
- if (row.enabled) {
188
- return [
189
- <div class="txt-status">
190
- <span>{this.$t1('启用')}</span>
191
- </div>
192
- ];
193
- } else {
194
- return [
195
- <div class="txt-status disable">
196
- <span>{this.$t1('禁用')}</span>
197
- </div>
198
- ];
199
- }
200
- }
201
- }
202
- },
203
- {
204
- field: 'allCompany',
205
- title: this.$t1('全部组织使用'),
206
- width: 150,
207
- slots: {
208
- default: ({row}) => {
209
- if (row.allCompany) {
210
- return [
211
- <div class="txt-status">
212
- <span>{this.$t1('是')}</span>
213
- </div>
214
- ];
215
- } else {
216
- return [
217
- <div class="txt-status disable">
218
- <span>{this.$t1('否')}</span>
219
- </div>
220
- ];
221
- }
222
- }
223
- }
224
- },
225
- {
226
- field: 'createDate',
227
- title: this.$t1('创建时间'),
228
- width: 150
229
- },
230
- {title: this.$t1('更新时间'), field: 'modifyDate', width: 150},
231
- {
232
- width: 47,
233
- fixed: 'right',
234
- title: '',
235
- sortable: false,
236
- slots: {
237
- default: ({row}) => {
238
- return [
239
- <div>
240
- <a
241
- href="javascript:void(0);"
242
- class="a-link"
243
- onclick={() => {
244
- this.openEditDialog(row.id);
245
- }}
246
- >
247
- <el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
248
- popper-class="tooltip-skin">
249
- <i class="el-icon-edit"/>
250
- </el-tooltip>
251
- </a>
252
- </div>
253
- ];
254
- }
255
- }
256
- }
257
- ]
258
- };
259
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
260
- this.vxeOption = opts;
261
- });
262
- },
263
- handleNodeClick(data, node, v) {
264
- this.currentDataType = data;
265
- this.$forceUpdate();
266
- this.searchEvent();
267
- },
268
- // 异步树叶子节点懒加载逻辑
269
- loadNode(node, resolve) {
270
- let url = USER_PREFIX + '/data_type_setting/listPage';
271
- this.$http({
272
- url: url,
273
- method: 'post',
274
- data: {
275
- dataTypeGroup: this.dataTypeGroup
276
- },
277
- success: res => {
278
- let rows = [{id: -1, dataTypeCode: null, dataTypeName: this.$t1('全部'), leaf: true}]
279
- let records = res.objx && res.objx.records ? res.objx.records : [];
280
- records.forEach(value => {
281
- value.leaf = true;
282
- });
283
- rows.push(...records)
284
- resolve(rows);
285
- this.$nextTick(() => {
286
- let data = node.childNodes[0].data;
287
- this.$refs.tree.setCurrentKey(data);
288
- this.currentDataType = data;
289
- })
290
- }
291
- });
292
- },
293
- addDataType() {
294
- this.editDataTypeId = null;
295
- this.showDataTypeEditDialog = true;
296
- },
297
- editDataType() {
298
- let row = this.currentDataType;
299
- this.editDataTypeId = row.id;
300
- this.showDataTypeEditDialog = true;
301
- },
302
- confirmDataTypeEditDialog(row) {
303
- row.leaf = true;
304
- let editDataTypeId = this.editDataTypeId;
305
- if (!editDataTypeId) {
306
- this.$refs.tree.append(row);
307
- } else {
308
- let node = this.$refs.tree.getNode(row.id + "");
309
- node.data = row;
310
- }
311
- },
312
- deleteDataType() {
313
- let row = this.currentDataType;
314
-
315
- this.$baseConfirm(this.$t1('您确定要删除数据类型[{dataTypeName}]吗?', {dataTypeName: row.dataTypeName})).then(() => {
316
- var url = USER_PREFIX + `/data_type_setting/setDisabled`;
317
- this.$http({
318
- url: url,
319
- method: `post`,
320
- data: {id: row.id},
321
- isLoading: true,
322
- success: res => {
323
- this.$message({
324
- message: res.content,
325
- type: 'success',
326
- duration: 2000
327
- });
328
- this.$refs.tree.remove(row);
329
-
330
- let node = this.$refs.tree.getNode("-1");
331
- let data = node.data;
332
- this.$refs.tree.setCurrentKey(data);
333
- this.currentDataType = data;
334
- this.searchEvent();
335
- }
336
- });
337
- });
338
- }
339
- }
340
- };
341
- </script>
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs 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"></editView>
7
+ </el-tab-pane>
8
+ <el-tab-pane :label="$t1('列表')" name="second">
9
+ <div class="tree-box fl">
10
+ <div class="tit"><b>{{ $t1('数据类型') }}</b></div>
11
+ <div class="tree-btns" style="margin-top: 10px;">
12
+ <el-button type="primary" plain icon="el-icon-circle-plus-outline" class="btn"
13
+ @click="addDataType()">{{ $t1('新增') }}
14
+ </el-button>
15
+ <el-button type="primary" plain icon="el-icon-edit-outline" class="btn" @click="editDataType()"
16
+ :disabled="!currentDataType || !currentDataType.dataTypeCode">{{ $t1('编辑') }}
17
+ </el-button>
18
+ <el-button type="primary" plain icon="el-icon-delete" class="btn" @click="deleteDataType()"
19
+ :disabled="!currentDataType || !currentDataType.dataTypeCode">{{ $t1('删除') }}
20
+ </el-button>
21
+ </div>
22
+ <el-tree
23
+ :props="defaultProps"
24
+ :load="loadNode"
25
+ node-key="id"
26
+ ref="tree"
27
+ highlight-current
28
+ lazy
29
+ :expand-on-click-node="false"
30
+ @node-click="handleNodeClick"
31
+ class="tree-list"
32
+ icon-class="el-icon-arrow-down"
33
+ ></el-tree>
34
+ </div>
35
+ <label id="labBtn">
36
+ <div class="icon">
37
+ <i class="el-icon-more"></i>
38
+ <i class="el-icon-more"></i>
39
+ </div>
40
+ </label>
41
+ <div class="main-right fr" style="padding-left:6px;">
42
+ <div class="grid-height">
43
+ <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
44
+ @custom="$vxeTableUtil.customHandle">
45
+ <template #form>
46
+ <div class="clearfix screen-btns">
47
+ <div class="fl">
48
+ <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog">
49
+ {{ $t1('新增') }}
50
+ </vxe-button>
51
+ <base-table-export :option="{ title: $t1('通用执行脚本导出'), targetRef: 'table-m1'}"
52
+ :parent-target="_self"/>
53
+ </div>
54
+ <div class="fr">
55
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
56
+ plain>{{ $t1('重置') }}
57
+ </vxe-button>
58
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
59
+ {{ $t1('搜索') }}
60
+ </vxe-button>
61
+ </div>
62
+ </div>
63
+ <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
64
+ @submit="searchEvent" @reset="searchEvent">
65
+ <vxe-form-item :title="$t1('数据类型')+':'" field="dataTypeName">
66
+ <template v-slot>
67
+ <el-input v-model="currentDataType.dataTypeName" size="small" disabled/>
68
+ </template>
69
+ </vxe-form-item>
70
+ <vxe-form-item :title="$t1('脚本编号')+':'" field="scriptCode">
71
+ <template v-slot>
72
+ <el-input v-model="formData.scriptCode" size="small" clearable/>
73
+ </template>
74
+ </vxe-form-item>
75
+ <vxe-form-item :title="$t1('脚本说明')+':'" field="scriptDesc">
76
+ <template v-slot>
77
+ <el-input v-model="formData.scriptDesc" size="small" clearable/>
78
+ </template>
79
+ </vxe-form-item>
80
+ <vxe-form-item :title="$t1('脚本')+':'" field="script">
81
+ <template v-slot>
82
+ <el-input v-model="formData.script" size="small" clearable/>
83
+ </template>
84
+ </vxe-form-item>
85
+ <vxe-form-item :title="$t1('是否启用')+':'" field="enabled">
86
+ <template v-slot>
87
+ <el-select v-model="formData.enabled" clearable>
88
+ <el-option :value="true" :label="$t1('启用')"></el-option>
89
+ <el-option :value="false" :label="$t1('禁用')"></el-option>
90
+ </el-select>
91
+ </template>
92
+ </vxe-form-item>
93
+ </vxe-form>
94
+ </template>
95
+ </vxe-grid>
96
+ </div>
97
+ </div>
98
+ </el-tab-pane>
99
+ </el-tabs>
100
+ <dataTypeEditDialog v-if="showDataTypeEditDialog" :visiable.sync="showDataTypeEditDialog"
101
+ :_dataId.sync="editDataTypeId" :dataTypeGroup="dataTypeGroup"
102
+ @confirm="confirmDataTypeEditDialog"></dataTypeEditDialog>
103
+ </div>
104
+ </template>
105
+
106
+ <script>
107
+ import editView from './edit.vue';
108
+ import dataTypeEditDialog from "../../../views/user/data_type_setting/editDialog";
109
+ import {treeScollx} from '@base/utils/global.js';
110
+
111
+ export default {
112
+ name: 'common_script:list',
113
+ components: {editView, dataTypeEditDialog},
114
+ data() {
115
+ return {
116
+ activeName: 'second',
117
+ dataId: 0,
118
+ showEdit: false,
119
+ vxeOption: {},
120
+ formData: {},
121
+
122
+ defaultProps: {
123
+ label: 'dataTypeName', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
124
+ children: [],
125
+ isLeaf: 'leaf'
126
+ },
127
+ showDataTypeEditDialog: false,
128
+ currentDataType: {},
129
+ dataTypeGroup: "commonScript"
130
+ };
131
+ },
132
+ mounted() {
133
+ treeScollx({target: this, type: 'default'});
134
+ this.initTableList();
135
+ },
136
+ methods: {
137
+ searchEvent() {
138
+ this.$refs['table-m1'].commitProxy('reload');
139
+ },
140
+ resetEvent() {
141
+ this.formData = {};
142
+ this.$refs['table-m1'].commitProxy('reload');
143
+ },
144
+ openEditDialog(id) {
145
+ this.dataId = !id || typeof id == 'object' ? 0 : id;
146
+ this.activeName = 'first';
147
+ this.$openEditView('showEdit');
148
+ },
149
+ initTableList() {
150
+ let that = this;
151
+ let pushTypeMap = {0: this.$t1('异步推送'), 1: this.$t1('同步调用')};
152
+ let tableOption = {
153
+ vue: this,
154
+ tableRef: 'table-m1',
155
+ tableName: 'user_commonScript_list-m1',
156
+ path: USER_PREFIX + '/common_script/listPage',
157
+ param: () => {
158
+ return {
159
+ ...this.formData,
160
+ dataTypeCode: this.currentDataType.dataTypeCode
161
+ };
162
+ },
163
+ columns: [
164
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
165
+ {
166
+ title: this.$t1('脚本编号'),
167
+ field: 'scriptCode',
168
+ width: 150,
169
+ fixed: 'left'
170
+ },
171
+ {
172
+ title: this.$t1('脚本说明'),
173
+ field: 'scriptDesc',
174
+ width: 150
175
+ },
176
+ {
177
+ title: this.$t1('执行组织编码'),
178
+ field: 'exeCompanyCode',
179
+ width: 150
180
+ },
181
+ {
182
+ field: 'enabled',
183
+ title: this.$t1('是否启用'),
184
+ width: 150,
185
+ slots: {
186
+ default: ({row}) => {
187
+ if (row.enabled) {
188
+ return [
189
+ <div class="txt-status">
190
+ <span>{this.$t1('启用')}</span>
191
+ </div>
192
+ ];
193
+ } else {
194
+ return [
195
+ <div class="txt-status disable">
196
+ <span>{this.$t1('禁用')}</span>
197
+ </div>
198
+ ];
199
+ }
200
+ }
201
+ }
202
+ },
203
+ {
204
+ field: 'allCompany',
205
+ title: this.$t1('全部组织使用'),
206
+ width: 150,
207
+ slots: {
208
+ default: ({row}) => {
209
+ if (row.allCompany) {
210
+ return [
211
+ <div class="txt-status">
212
+ <span>{this.$t1('是')}</span>
213
+ </div>
214
+ ];
215
+ } else {
216
+ return [
217
+ <div class="txt-status disable">
218
+ <span>{this.$t1('否')}</span>
219
+ </div>
220
+ ];
221
+ }
222
+ }
223
+ }
224
+ },
225
+ {
226
+ field: 'createDate',
227
+ title: this.$t1('创建时间'),
228
+ width: 150
229
+ },
230
+ {title: this.$t1('更新时间'), field: 'modifyDate', width: 150},
231
+ {
232
+ width: 47,
233
+ fixed: 'right',
234
+ title: '',
235
+ sortable: false,
236
+ slots: {
237
+ default: ({row}) => {
238
+ return [
239
+ <div>
240
+ <a
241
+ href="javascript:void(0);"
242
+ class="a-link"
243
+ onclick={() => {
244
+ this.openEditDialog(row.id);
245
+ }}
246
+ >
247
+ <el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
248
+ popper-class="tooltip-skin">
249
+ <i class="el-icon-edit"/>
250
+ </el-tooltip>
251
+ </a>
252
+ </div>
253
+ ];
254
+ }
255
+ }
256
+ }
257
+ ]
258
+ };
259
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
260
+ this.vxeOption = opts;
261
+ });
262
+ },
263
+ handleNodeClick(data, node, v) {
264
+ this.currentDataType = data;
265
+ this.$forceUpdate();
266
+ this.searchEvent();
267
+ },
268
+ // 异步树叶子节点懒加载逻辑
269
+ loadNode(node, resolve) {
270
+ let url = USER_PREFIX + '/data_type_setting/listPage';
271
+ this.$http({
272
+ url: url,
273
+ method: 'post',
274
+ data: {
275
+ dataTypeGroup: this.dataTypeGroup
276
+ },
277
+ success: res => {
278
+ let rows = [{id: -1, dataTypeCode: null, dataTypeName: this.$t1('全部'), leaf: true}]
279
+ let records = res.objx && res.objx.records ? res.objx.records : [];
280
+ records.forEach(value => {
281
+ value.leaf = true;
282
+ });
283
+ rows.push(...records)
284
+ resolve(rows);
285
+ this.$nextTick(() => {
286
+ let data = node.childNodes[0].data;
287
+ this.$refs.tree.setCurrentKey(data);
288
+ this.currentDataType = data;
289
+ })
290
+ }
291
+ });
292
+ },
293
+ addDataType() {
294
+ this.editDataTypeId = null;
295
+ this.showDataTypeEditDialog = true;
296
+ },
297
+ editDataType() {
298
+ let row = this.currentDataType;
299
+ this.editDataTypeId = row.id;
300
+ this.showDataTypeEditDialog = true;
301
+ },
302
+ confirmDataTypeEditDialog(row) {
303
+ row.leaf = true;
304
+ let editDataTypeId = this.editDataTypeId;
305
+ if (!editDataTypeId) {
306
+ this.$refs.tree.append(row);
307
+ } else {
308
+ let node = this.$refs.tree.getNode(row.id + "");
309
+ node.data = row;
310
+ }
311
+ },
312
+ deleteDataType() {
313
+ let row = this.currentDataType;
314
+
315
+ this.$baseConfirm(this.$t1('您确定要删除数据类型[{dataTypeName}]吗?', {dataTypeName: row.dataTypeName})).then(() => {
316
+ var url = USER_PREFIX + `/data_type_setting/setDisabled`;
317
+ this.$http({
318
+ url: url,
319
+ method: `post`,
320
+ data: {id: row.id},
321
+ isLoading: true,
322
+ success: res => {
323
+ this.$message({
324
+ message: res.content,
325
+ type: 'success',
326
+ duration: 2000
327
+ });
328
+ this.$refs.tree.remove(row);
329
+
330
+ let node = this.$refs.tree.getNode("-1");
331
+ let data = node.data;
332
+ this.$refs.tree.setCurrentKey(data);
333
+ this.currentDataType = data;
334
+ this.searchEvent();
335
+ }
336
+ });
337
+ });
338
+ }
339
+ }
340
+ };
341
+ </script>