cloud-web-corejs-haier 1.0.42 → 1.0.44
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.
- package/package.json +9 -7
- package/src/api/user.js +54 -46
- package/src/components/baseAlert/index.vue +57 -53
- package/src/components/baseInputExport/index.vue +3 -3
- package/src/components/baseTabs/mixins.js +12 -1
- package/src/components/errorMsg/index.vue +78 -78
- package/src/components/excelExport/button.vue +54 -45
- package/src/components/excelExport/exportFieldDialog.vue +3 -3
- package/src/components/excelExport/index.js +1 -43
- package/src/components/excelExport/index.vue +62 -34
- package/src/components/excelExport/mixins.js +74 -87
- package/src/components/excelImport/index.js +1 -62
- package/src/components/excelImport/mixins.js +1 -774
- package/src/components/fileLibrary/index.vue +113 -33
- package/src/components/fileLibrary/propertiesDialog.vue +6 -0
- package/src/components/hiprint/view/design/index.vue +139 -47
- package/src/components/hiprint/view/design/preview.vue +75 -52
- package/src/components/hiprint/view/json-view.vue +31 -31
- package/src/components/luckysheet/dialog.vue +159 -0
- package/src/components/luckysheet/export.js +595 -0
- package/src/components/luckysheet/fileUtils.js +147 -0
- package/src/components/luckysheet/index.js +69 -0
- package/src/components/luckysheet/templateJson.js +12078 -0
- package/src/components/luckysheet/view.vue +210 -0
- package/src/components/onlineTalk/index.vue +328 -6
- package/src/components/onlineTalk/talkUserDialog.vue +280 -0
- package/src/components/wf/addTaskUserdialog.vue +5 -5
- package/src/components/wf/content.vue +1244 -1169
- package/src/components/wf/mixins/setCandidateDialog.js +228 -2
- package/src/components/wf/mixins/setCandidateDialog2.js +115 -100
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +67 -1
- package/src/components/wf/setCandidateDialog.vue +5 -7
- package/src/components/wf/setCandidateDialog2.vue +14 -10
- package/src/components/wf/wf.js +527 -411
- package/src/components/wf/wfTaskUserRangeDialog.vue +1 -1
- package/src/components/wf/wfUtil.js +129 -91
- package/src/components/xform/form-designer/designer.js +1994 -9
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +10 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1756 -2
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +10 -1
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1630 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +153 -40
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +65 -46
- package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +231 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +7 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +659 -221
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +48 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +18 -17
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +26 -26
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +67 -13
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +2 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/showViewButton-editor.vue +29 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +8 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +20 -17
- package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
- package/src/components/xform/form-render/container-item/sub-form-item.vue +10 -2
- package/src/components/xform/form-render/container-item/table2-item.vue +40 -10
- package/src/components/xform/form-render/indexMixin.js +3705 -1
- package/src/components/xform/icon-picker/icons.json +284 -0
- package/src/components/xform/icon-picker/index.vue +145 -0
- package/src/components/xform/lang/zh-CN.js +2 -1
- package/src/components/xform/mixins/defaultHandle.js +366 -2
- package/src/components/xform/utils/formula-util.js +3 -0
- package/src/components/xform/utils/sfc-generator.js +2 -2
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/xform/utils/tableColumnHelper.js +54 -10
- package/src/components/xform/utils/util.js +1547 -1
- package/src/index.js +190 -211
- package/src/lang/locale/en/login.js +26 -19
- package/src/lang/locale/zh/login.js +25 -19
- package/src/layout/components/Sidebar/default.vue +252 -71
- package/src/layout/components/Sidebar/index.vue +6 -1
- package/src/layout/components/TagsView/index.vue +6 -0
- package/src/layout/components/langTool.vue +32 -29
- package/src/layout/defaultLayout.vue +16 -8
- package/src/layout/index.vue +5 -3
- package/src/permission.js +135 -1
- package/src/router/index.js +1 -4
- package/src/store/config/index.js +667 -1
- package/src/store/getters.js +2 -1
- package/src/store/modules/permission.js +332 -1
- package/src/store/modules/settings.js +26 -1
- package/src/store/modules/tagsView.js +190 -1
- package/src/store/modules/user.js +358 -1
- package/src/utils/aes.js +15 -1
- package/src/utils/auth.js +27 -1
- package/src/utils/componentDialog.js +217 -0
- package/src/utils/request.js +368 -1
- package/src/utils/vab.js +1256 -7
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/bd_company_env/edit.vue +193 -193
- package/src/views/bd/setting/formVersion/button.vue +55 -0
- package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
- package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
- package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
- package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
- package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
- package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
- package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
- package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +491 -0
- package/src/views/bd/setting/formVersion/link.vue +58 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
- package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
- package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
- package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
- package/src/views/bd/setting/formVersion/textDiff.js +102 -0
- package/src/views/bd/setting/form_import_log/edit.vue +6 -3
- package/src/views/bd/setting/form_import_log/list.vue +5 -0
- package/src/views/bd/setting/form_script/edit.vue +196 -83
- package/src/views/bd/setting/form_script/edit1.vue +410 -220
- package/src/views/bd/setting/form_script/form_list.vue +19 -0
- package/src/views/bd/setting/form_script/list.vue +95 -21
- package/src/views/bd/setting/form_script/list1.vue +24 -0
- package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
- package/src/views/bd/setting/form_script/mixins/edit.js +265 -207
- package/src/views/bd/setting/form_script/mixins/edit1.js +259 -201
- package/src/views/bd/setting/form_script/mixins/form_list.js +322 -296
- package/src/views/bd/setting/form_script/mixins/list.js +163 -95
- package/src/views/bd/setting/form_script/mixins/list1.js +244 -155
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +1 -1
- package/src/views/bd/setting/form_template/edit.vue +355 -205
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
- package/src/views/bd/setting/form_template/list.vue +49 -74
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +51 -8
- package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +114 -82
- package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -7
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -254
- package/src/views/bd/setting/form_template/wf_list.vue +161 -127
- package/src/views/bd/setting/request_async_setting/edit.vue +320 -320
- package/src/views/bd/setting/request_setting/edit.vue +300 -300
- package/src/views/bd/setting/request_setting/list.vue +15 -25
- package/src/views/bd/setting/table_model/edit.vue +702 -498
- package/src/views/bd/setting/table_model/list.vue +28 -0
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit copy.js +903 -0
- package/src/views/bd/setting/table_model/mixins/edit.js +228 -121
- package/src/views/bd/setting/table_model/mixins/list.js +55 -20
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +50 -46
- package/src/views/bd/setting/utils/index.js +15 -0
- package/src/views/user/api_request/list.vue +203 -203
- package/src/views/user/bill_setting/list.vue +345 -345
- package/src/views/user/code_rules/list.vue +204 -204
- package/src/views/user/common_attribute/list.vue +378 -378
- package/src/views/user/common_script/list.vue +341 -341
- package/src/views/user/company_info/dialog.vue +80 -49
- package/src/views/user/country/list.vue +197 -197
- package/src/views/user/extend_datasource/dialog.vue +0 -3
- package/src/views/user/extend_datasource/edit.vue +1 -2
- package/src/views/user/extend_datasource/list.vue +221 -224
- package/src/views/user/fieldTranslation/editDialog.vue +1 -1
- package/src/views/user/fieldTranslation/list.vue +473 -473
- package/src/views/user/field_values_invisible/list.vue +207 -207
- package/src/views/user/file_type/list.vue +271 -271
- package/src/views/user/file_view_area/list.vue +331 -331
- package/src/views/user/form/vform/designer.vue +303 -287
- package/src/views/user/form/vform/formFieldMapping.js +2 -3
- package/src/views/user/form/view/edit.vue +19 -1
- package/src/views/user/form/view/list.vue +59 -17
- package/src/views/user/groups/list.vue +158 -158
- package/src/views/user/home/default.vue +274 -182
- package/src/views/user/home/default2.vue +1148 -0
- package/src/views/user/home/index.vue +2 -1
- package/src/views/user/lang_tag/list.vue +170 -170
- package/src/views/user/language_setting/list.vue +208 -208
- package/src/views/user/ledger_library/list.vue +12 -10
- package/src/views/user/login/default.vue +1 -1
- package/src/views/user/login/indexMixin.js +204 -169
- package/src/views/user/menu/list.vue +575 -575
- package/src/views/user/notify_message/dialog.vue +7 -1
- package/src/views/user/notify_template/list.vue +192 -192
- package/src/views/user/notify_template/list2.vue +190 -190
- package/src/views/user/position/list.vue +188 -188
- package/src/views/user/project_tag/list.vue +175 -175
- package/src/views/user/push_setting/list.vue +236 -236
- package/src/views/user/request_setting/list.vue +248 -248
- package/src/views/user/role/list.vue +182 -182
- package/src/views/user/system_notice/infoDialog.vue +61 -2
- package/src/views/user/system_notice/list.vue +203 -203
- package/src/views/user/system_parameter/list.vue +141 -141
- package/src/views/user/user/edit.vue +45 -0
- package/src/views/user/user/form_list.vue +245 -245
- package/src/views/user/user/info.vue +253 -140
- package/src/views/user/user_log_classify/list.vue +197 -197
- package/src/views/user/wf/iframe/index.vue +46 -46
- package/src/views/user/wf/wfReport/index.vue +1 -1
- package/src/views/user/wf/wf_auto_submit_data/list.vue +659 -659
- package/src/views/user/wf/wf_diy_attribute/edit.vue +1 -1
- package/src/views/user/wf/wf_manage/list.vue +795 -795
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +106 -106
- package/src/views/user/wf/wf_obj_config/dialog.vue +2 -2
- package/src/views/user/wf/wf_obj_config/edit.vue +1 -1
- package/src/views/user/wf/wf_obj_config/edit_form.vue +2 -2
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +1 -1
- package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +1 -1
- package/src/views/user/wf/wf_obj_config/itemOperateDialog.vue +4 -4
- package/src/views/user/wf/wf_obj_config/list.vue +28 -28
- package/src/views/user/wf/wf_obj_config/list_form.vue +5 -5
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +292 -292
- package/src/views/user/wf/wf_param/edit.vue +1 -1
- package/src/views/user/wf/wf_transfer_setting/edit.vue +1 -1
- package/src/views/user/wf/wf_transfer_setting/list.vue +321 -319
- package/src/views/user/wf/wf_work_calendar/components/calendar.vue +369 -367
- package/src/views/user/wf/wf_work_calendar/components/calendar2.vue +401 -399
- package/src/views/user/wf/wf_work_calendar/configDialog.vue +6 -6
- package/src/views/user/wf/wf_work_calendar/date.js +84 -83
- package/src/views/user/wf/wf_work_calendar/list.vue +6 -6
- package/src/views/user/workbench_menu/list.vue +555 -0
|
@@ -1,345 +1,345 @@
|
|
|
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="name">
|
|
71
|
-
<template v-slot>
|
|
72
|
-
<el-input v-model="formData.name" size="small" clearable/>
|
|
73
|
-
</template>
|
|
74
|
-
</vxe-form-item>
|
|
75
|
-
<vxe-form-item :title="$t1('编号')+':'" field="code">
|
|
76
|
-
<template v-slot>
|
|
77
|
-
<el-input v-model="formData.code" size="small" clearable/>
|
|
78
|
-
</template>
|
|
79
|
-
</vxe-form-item>
|
|
80
|
-
<vxe-form-item :title="$t1('备注')+':'" field="remark">
|
|
81
|
-
<template v-slot>
|
|
82
|
-
<el-input v-model="formData.remark" size="small" clearable/>
|
|
83
|
-
</template>
|
|
84
|
-
</vxe-form-item>
|
|
85
|
-
|
|
86
|
-
<vxe-form-item :title="$t1('是否启用')+':'" field="enabled">
|
|
87
|
-
<template v-slot>
|
|
88
|
-
<el-select v-model="formData.enabled" clearable>
|
|
89
|
-
<el-option :value="true" :label="$t1('启用')"></el-option>
|
|
90
|
-
<el-option :value="false" :label="$t1('禁用')"></el-option>
|
|
91
|
-
</el-select>
|
|
92
|
-
</template>
|
|
93
|
-
</vxe-form-item>
|
|
94
|
-
</vxe-form>
|
|
95
|
-
</template>
|
|
96
|
-
</vxe-grid>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</el-tab-pane>
|
|
100
|
-
</el-tabs>
|
|
101
|
-
<dataTypeEditDialog v-if="showDataTypeEditDialog" :visiable.sync="showDataTypeEditDialog"
|
|
102
|
-
:_dataId.sync="editDataTypeId" :dataTypeGroup="dataTypeGroup"
|
|
103
|
-
@confirm="confirmDataTypeEditDialog"></dataTypeEditDialog>
|
|
104
|
-
</div>
|
|
105
|
-
</template>
|
|
106
|
-
|
|
107
|
-
<script>
|
|
108
|
-
import editView from './edit.vue';
|
|
109
|
-
import dataTypeEditDialog from "../../../views/user/data_type_setting/editDialog";
|
|
110
|
-
import {treeScollx} from '@base/utils/global.js';
|
|
111
|
-
|
|
112
|
-
export default {
|
|
113
|
-
name: 'bill_setting:list',
|
|
114
|
-
components: {editView, dataTypeEditDialog},
|
|
115
|
-
data() {
|
|
116
|
-
return {
|
|
117
|
-
activeName: 'second',
|
|
118
|
-
dataId: 0,
|
|
119
|
-
showEdit: false,
|
|
120
|
-
vxeOption: {},
|
|
121
|
-
formData: {},
|
|
122
|
-
|
|
123
|
-
defaultProps: {
|
|
124
|
-
label: 'dataTypeName', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
|
125
|
-
children: [],
|
|
126
|
-
isLeaf: 'leaf'
|
|
127
|
-
},
|
|
128
|
-
editDataTypeId: null,
|
|
129
|
-
showDataTypeEditDialog: false,
|
|
130
|
-
currentDataType: {},
|
|
131
|
-
dataTypeGroup: "billSetting"
|
|
132
|
-
};
|
|
133
|
-
},
|
|
134
|
-
mounted() {
|
|
135
|
-
treeScollx({target: this, type: 'default'});
|
|
136
|
-
this.initTableList();
|
|
137
|
-
},
|
|
138
|
-
methods: {
|
|
139
|
-
searchEvent() {
|
|
140
|
-
this.$refs['table-m1'].commitProxy('reload');
|
|
141
|
-
},
|
|
142
|
-
resetEvent() {
|
|
143
|
-
this.formData = {};
|
|
144
|
-
this.$refs['table-m1'].commitProxy('reload');
|
|
145
|
-
},
|
|
146
|
-
openEditDialog(id) {
|
|
147
|
-
this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
148
|
-
this.activeName = 'first';
|
|
149
|
-
this.$openEditView('showEdit');
|
|
150
|
-
},
|
|
151
|
-
initTableList() {
|
|
152
|
-
let that = this;
|
|
153
|
-
let tableOption = {
|
|
154
|
-
vue: this,
|
|
155
|
-
tableRef: 'table-m1',
|
|
156
|
-
tableName: 'USER_bill_setting_list-m1',
|
|
157
|
-
path: USER_PREFIX + '/bill_setting/listPage',
|
|
158
|
-
param: () => {
|
|
159
|
-
return {
|
|
160
|
-
...this.formData,
|
|
161
|
-
dataTypeCode: this.currentDataType.dataTypeCode
|
|
162
|
-
};
|
|
163
|
-
},
|
|
164
|
-
columns: [
|
|
165
|
-
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
166
|
-
{
|
|
167
|
-
title: this.$t1('名称'),
|
|
168
|
-
field: 'name',
|
|
169
|
-
width: 150,
|
|
170
|
-
fixed: 'left'
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
title: this.$t1('编号'),
|
|
174
|
-
field: 'code',
|
|
175
|
-
width: 180
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
field: 'enabled',
|
|
179
|
-
title: this.$t1('是否启用'),
|
|
180
|
-
width: 150,
|
|
181
|
-
slots: {
|
|
182
|
-
default: ({row}) => {
|
|
183
|
-
if (row.enabled) {
|
|
184
|
-
return [
|
|
185
|
-
<div class="txt-status">
|
|
186
|
-
<span>{this.$t1('启用')}</span>
|
|
187
|
-
</div>
|
|
188
|
-
];
|
|
189
|
-
} else {
|
|
190
|
-
return [
|
|
191
|
-
<div class="txt-status disable">
|
|
192
|
-
<span>{this.$t1('禁用')}</span>
|
|
193
|
-
</div>
|
|
194
|
-
];
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
field: 'allCompany',
|
|
201
|
-
title: this.$t1('全部组织使用'),
|
|
202
|
-
width: 150,
|
|
203
|
-
slots: {
|
|
204
|
-
default: ({row}) => {
|
|
205
|
-
if (row.allCompany) {
|
|
206
|
-
return [
|
|
207
|
-
<div class="txt-status">
|
|
208
|
-
<span>{this.$t1('是')}</span>
|
|
209
|
-
</div>
|
|
210
|
-
];
|
|
211
|
-
} else {
|
|
212
|
-
return [
|
|
213
|
-
<div class="txt-status disable">
|
|
214
|
-
<span>{this.$t1('否')}</span>
|
|
215
|
-
</div>
|
|
216
|
-
];
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
title: this.$t1('执行组织编码'),
|
|
223
|
-
field: 'exeCompanyCode',
|
|
224
|
-
width: 150
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
title: this.$t1('备注'),
|
|
228
|
-
field: 'remark',
|
|
229
|
-
width: 150
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
field: 'createDate',
|
|
233
|
-
title: this.$t1('创建时间'),
|
|
234
|
-
width: 150
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
width: 47,
|
|
238
|
-
fixed: 'right',
|
|
239
|
-
title: '',
|
|
240
|
-
sortable: false,
|
|
241
|
-
slots: {
|
|
242
|
-
default: ({row}) => {
|
|
243
|
-
return [
|
|
244
|
-
<div>
|
|
245
|
-
<a
|
|
246
|
-
href="javascript:void(0);"
|
|
247
|
-
class="a-link"
|
|
248
|
-
onclick={() => {
|
|
249
|
-
this.openEditDialog(row.id);
|
|
250
|
-
}}
|
|
251
|
-
>
|
|
252
|
-
<el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
|
|
253
|
-
popper-class="tooltip-skin">
|
|
254
|
-
<i class="el-icon-edit"/>
|
|
255
|
-
</el-tooltip>
|
|
256
|
-
</a>
|
|
257
|
-
</div>
|
|
258
|
-
];
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
|
-
};
|
|
264
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
265
|
-
this.vxeOption = opts;
|
|
266
|
-
});
|
|
267
|
-
},
|
|
268
|
-
handleNodeClick(data, node, v) {
|
|
269
|
-
this.currentDataType = data;
|
|
270
|
-
this.$forceUpdate();
|
|
271
|
-
this.searchEvent();
|
|
272
|
-
},
|
|
273
|
-
// 异步树叶子节点懒加载逻辑
|
|
274
|
-
loadNode(node, resolve) {
|
|
275
|
-
let url = USER_PREFIX + '/data_type_setting/listPage';
|
|
276
|
-
this.$http({
|
|
277
|
-
url: url,
|
|
278
|
-
method: 'post',
|
|
279
|
-
data: {
|
|
280
|
-
dataTypeGroup: this.dataTypeGroup
|
|
281
|
-
},
|
|
282
|
-
success: res => {
|
|
283
|
-
let rows = [{id: -1, dataTypeCode: null, dataTypeName: this.$t1('全部'), leaf: true}]
|
|
284
|
-
let records = res.objx && res.objx.records ? res.objx.records : [];
|
|
285
|
-
records.forEach(value => {
|
|
286
|
-
value.leaf = true;
|
|
287
|
-
});
|
|
288
|
-
rows.push(...records)
|
|
289
|
-
resolve(rows);
|
|
290
|
-
this.$nextTick(() => {
|
|
291
|
-
let data = node.childNodes[0].data;
|
|
292
|
-
this.$refs.tree.setCurrentKey(data);
|
|
293
|
-
this.currentDataType = data;
|
|
294
|
-
})
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
},
|
|
298
|
-
addDataType() {
|
|
299
|
-
this.editDataTypeId = null;
|
|
300
|
-
this.showDataTypeEditDialog = true;
|
|
301
|
-
},
|
|
302
|
-
editDataType() {
|
|
303
|
-
let row = this.currentDataType;
|
|
304
|
-
this.editDataTypeId = row.id;
|
|
305
|
-
this.showDataTypeEditDialog = true;
|
|
306
|
-
},
|
|
307
|
-
confirmDataTypeEditDialog(row) {
|
|
308
|
-
row.leaf = true;
|
|
309
|
-
let editDataTypeId = this.editDataTypeId;
|
|
310
|
-
if (!editDataTypeId) {
|
|
311
|
-
this.$refs.tree.append(row);
|
|
312
|
-
} else {
|
|
313
|
-
let node = this.$refs.tree.getNode(row.id + "");
|
|
314
|
-
node.data = row;
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
deleteDataType() {
|
|
318
|
-
let row = this.currentDataType;
|
|
319
|
-
this.$baseConfirm(this.$t1('您确定要删除数据类型[{dataTypeName}]吗?', {dataTypeName: row.dataTypeName})).then(() => {
|
|
320
|
-
var url = USER_PREFIX + `/data_type_setting/setDisabled`;
|
|
321
|
-
this.$http({
|
|
322
|
-
url: url,
|
|
323
|
-
method: `post`,
|
|
324
|
-
data: {id: row.id},
|
|
325
|
-
isLoading: true,
|
|
326
|
-
success: res => {
|
|
327
|
-
this.$message({
|
|
328
|
-
message: res.content,
|
|
329
|
-
type: 'success',
|
|
330
|
-
duration: 2000
|
|
331
|
-
});
|
|
332
|
-
this.$refs.tree.remove(row);
|
|
333
|
-
|
|
334
|
-
let node = this.$refs.tree.getNode("-1");
|
|
335
|
-
let data = node.data;
|
|
336
|
-
this.$refs.tree.setCurrentKey(data);
|
|
337
|
-
this.currentDataType = data;
|
|
338
|
-
this.searchEvent();
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
</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="name">
|
|
71
|
+
<template v-slot>
|
|
72
|
+
<el-input v-model="formData.name" size="small" clearable/>
|
|
73
|
+
</template>
|
|
74
|
+
</vxe-form-item>
|
|
75
|
+
<vxe-form-item :title="$t1('编号')+':'" field="code">
|
|
76
|
+
<template v-slot>
|
|
77
|
+
<el-input v-model="formData.code" size="small" clearable/>
|
|
78
|
+
</template>
|
|
79
|
+
</vxe-form-item>
|
|
80
|
+
<vxe-form-item :title="$t1('备注')+':'" field="remark">
|
|
81
|
+
<template v-slot>
|
|
82
|
+
<el-input v-model="formData.remark" size="small" clearable/>
|
|
83
|
+
</template>
|
|
84
|
+
</vxe-form-item>
|
|
85
|
+
|
|
86
|
+
<vxe-form-item :title="$t1('是否启用')+':'" field="enabled">
|
|
87
|
+
<template v-slot>
|
|
88
|
+
<el-select v-model="formData.enabled" clearable>
|
|
89
|
+
<el-option :value="true" :label="$t1('启用')"></el-option>
|
|
90
|
+
<el-option :value="false" :label="$t1('禁用')"></el-option>
|
|
91
|
+
</el-select>
|
|
92
|
+
</template>
|
|
93
|
+
</vxe-form-item>
|
|
94
|
+
</vxe-form>
|
|
95
|
+
</template>
|
|
96
|
+
</vxe-grid>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</el-tab-pane>
|
|
100
|
+
</el-tabs>
|
|
101
|
+
<dataTypeEditDialog v-if="showDataTypeEditDialog" :visiable.sync="showDataTypeEditDialog"
|
|
102
|
+
:_dataId.sync="editDataTypeId" :dataTypeGroup="dataTypeGroup"
|
|
103
|
+
@confirm="confirmDataTypeEditDialog"></dataTypeEditDialog>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
<script>
|
|
108
|
+
import editView from './edit.vue';
|
|
109
|
+
import dataTypeEditDialog from "../../../views/user/data_type_setting/editDialog";
|
|
110
|
+
import {treeScollx} from '@base/utils/global.js';
|
|
111
|
+
|
|
112
|
+
export default {
|
|
113
|
+
name: 'bill_setting:list',
|
|
114
|
+
components: {editView, dataTypeEditDialog},
|
|
115
|
+
data() {
|
|
116
|
+
return {
|
|
117
|
+
activeName: 'second',
|
|
118
|
+
dataId: 0,
|
|
119
|
+
showEdit: false,
|
|
120
|
+
vxeOption: {},
|
|
121
|
+
formData: {},
|
|
122
|
+
|
|
123
|
+
defaultProps: {
|
|
124
|
+
label: 'dataTypeName', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
|
125
|
+
children: [],
|
|
126
|
+
isLeaf: 'leaf'
|
|
127
|
+
},
|
|
128
|
+
editDataTypeId: null,
|
|
129
|
+
showDataTypeEditDialog: false,
|
|
130
|
+
currentDataType: {},
|
|
131
|
+
dataTypeGroup: "billSetting"
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
mounted() {
|
|
135
|
+
treeScollx({target: this, type: 'default'});
|
|
136
|
+
this.initTableList();
|
|
137
|
+
},
|
|
138
|
+
methods: {
|
|
139
|
+
searchEvent() {
|
|
140
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
141
|
+
},
|
|
142
|
+
resetEvent() {
|
|
143
|
+
this.formData = {};
|
|
144
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
145
|
+
},
|
|
146
|
+
openEditDialog(id) {
|
|
147
|
+
this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
148
|
+
this.activeName = 'first';
|
|
149
|
+
this.$openEditView('showEdit');
|
|
150
|
+
},
|
|
151
|
+
initTableList() {
|
|
152
|
+
let that = this;
|
|
153
|
+
let tableOption = {
|
|
154
|
+
vue: this,
|
|
155
|
+
tableRef: 'table-m1',
|
|
156
|
+
tableName: 'USER_bill_setting_list-m1',
|
|
157
|
+
path: USER_PREFIX + '/bill_setting/listPage',
|
|
158
|
+
param: () => {
|
|
159
|
+
return {
|
|
160
|
+
...this.formData,
|
|
161
|
+
dataTypeCode: this.currentDataType.dataTypeCode
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
columns: [
|
|
165
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
166
|
+
{
|
|
167
|
+
title: this.$t1('名称'),
|
|
168
|
+
field: 'name',
|
|
169
|
+
width: 150,
|
|
170
|
+
fixed: 'left'
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
title: this.$t1('编号'),
|
|
174
|
+
field: 'code',
|
|
175
|
+
width: 180
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
field: 'enabled',
|
|
179
|
+
title: this.$t1('是否启用'),
|
|
180
|
+
width: 150,
|
|
181
|
+
slots: {
|
|
182
|
+
default: ({row}) => {
|
|
183
|
+
if (row.enabled) {
|
|
184
|
+
return [
|
|
185
|
+
<div class="txt-status">
|
|
186
|
+
<span>{this.$t1('启用')}</span>
|
|
187
|
+
</div>
|
|
188
|
+
];
|
|
189
|
+
} else {
|
|
190
|
+
return [
|
|
191
|
+
<div class="txt-status disable">
|
|
192
|
+
<span>{this.$t1('禁用')}</span>
|
|
193
|
+
</div>
|
|
194
|
+
];
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
field: 'allCompany',
|
|
201
|
+
title: this.$t1('全部组织使用'),
|
|
202
|
+
width: 150,
|
|
203
|
+
slots: {
|
|
204
|
+
default: ({row}) => {
|
|
205
|
+
if (row.allCompany) {
|
|
206
|
+
return [
|
|
207
|
+
<div class="txt-status">
|
|
208
|
+
<span>{this.$t1('是')}</span>
|
|
209
|
+
</div>
|
|
210
|
+
];
|
|
211
|
+
} else {
|
|
212
|
+
return [
|
|
213
|
+
<div class="txt-status disable">
|
|
214
|
+
<span>{this.$t1('否')}</span>
|
|
215
|
+
</div>
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
title: this.$t1('执行组织编码'),
|
|
223
|
+
field: 'exeCompanyCode',
|
|
224
|
+
width: 150
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
title: this.$t1('备注'),
|
|
228
|
+
field: 'remark',
|
|
229
|
+
width: 150
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
field: 'createDate',
|
|
233
|
+
title: this.$t1('创建时间'),
|
|
234
|
+
width: 150
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
width: 47,
|
|
238
|
+
fixed: 'right',
|
|
239
|
+
title: '',
|
|
240
|
+
sortable: false,
|
|
241
|
+
slots: {
|
|
242
|
+
default: ({row}) => {
|
|
243
|
+
return [
|
|
244
|
+
<div>
|
|
245
|
+
<a
|
|
246
|
+
href="javascript:void(0);"
|
|
247
|
+
class="a-link"
|
|
248
|
+
onclick={() => {
|
|
249
|
+
this.openEditDialog(row.id);
|
|
250
|
+
}}
|
|
251
|
+
>
|
|
252
|
+
<el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
|
|
253
|
+
popper-class="tooltip-skin">
|
|
254
|
+
<i class="el-icon-edit"/>
|
|
255
|
+
</el-tooltip>
|
|
256
|
+
</a>
|
|
257
|
+
</div>
|
|
258
|
+
];
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
};
|
|
264
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
265
|
+
this.vxeOption = opts;
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
handleNodeClick(data, node, v) {
|
|
269
|
+
this.currentDataType = data;
|
|
270
|
+
this.$forceUpdate();
|
|
271
|
+
this.searchEvent();
|
|
272
|
+
},
|
|
273
|
+
// 异步树叶子节点懒加载逻辑
|
|
274
|
+
loadNode(node, resolve) {
|
|
275
|
+
let url = USER_PREFIX + '/data_type_setting/listPage';
|
|
276
|
+
this.$http({
|
|
277
|
+
url: url,
|
|
278
|
+
method: 'post',
|
|
279
|
+
data: {
|
|
280
|
+
dataTypeGroup: this.dataTypeGroup
|
|
281
|
+
},
|
|
282
|
+
success: res => {
|
|
283
|
+
let rows = [{id: -1, dataTypeCode: null, dataTypeName: this.$t1('全部'), leaf: true}]
|
|
284
|
+
let records = res.objx && res.objx.records ? res.objx.records : [];
|
|
285
|
+
records.forEach(value => {
|
|
286
|
+
value.leaf = true;
|
|
287
|
+
});
|
|
288
|
+
rows.push(...records)
|
|
289
|
+
resolve(rows);
|
|
290
|
+
this.$nextTick(() => {
|
|
291
|
+
let data = node.childNodes[0].data;
|
|
292
|
+
this.$refs.tree.setCurrentKey(data);
|
|
293
|
+
this.currentDataType = data;
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
addDataType() {
|
|
299
|
+
this.editDataTypeId = null;
|
|
300
|
+
this.showDataTypeEditDialog = true;
|
|
301
|
+
},
|
|
302
|
+
editDataType() {
|
|
303
|
+
let row = this.currentDataType;
|
|
304
|
+
this.editDataTypeId = row.id;
|
|
305
|
+
this.showDataTypeEditDialog = true;
|
|
306
|
+
},
|
|
307
|
+
confirmDataTypeEditDialog(row) {
|
|
308
|
+
row.leaf = true;
|
|
309
|
+
let editDataTypeId = this.editDataTypeId;
|
|
310
|
+
if (!editDataTypeId) {
|
|
311
|
+
this.$refs.tree.append(row);
|
|
312
|
+
} else {
|
|
313
|
+
let node = this.$refs.tree.getNode(row.id + "");
|
|
314
|
+
node.data = row;
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
deleteDataType() {
|
|
318
|
+
let row = this.currentDataType;
|
|
319
|
+
this.$baseConfirm(this.$t1('您确定要删除数据类型[{dataTypeName}]吗?', {dataTypeName: row.dataTypeName})).then(() => {
|
|
320
|
+
var url = USER_PREFIX + `/data_type_setting/setDisabled`;
|
|
321
|
+
this.$http({
|
|
322
|
+
url: url,
|
|
323
|
+
method: `post`,
|
|
324
|
+
data: {id: row.id},
|
|
325
|
+
isLoading: true,
|
|
326
|
+
success: res => {
|
|
327
|
+
this.$message({
|
|
328
|
+
message: res.content,
|
|
329
|
+
type: 'success',
|
|
330
|
+
duration: 2000
|
|
331
|
+
});
|
|
332
|
+
this.$refs.tree.remove(row);
|
|
333
|
+
|
|
334
|
+
let node = this.$refs.tree.getNode("-1");
|
|
335
|
+
let data = node.data;
|
|
336
|
+
this.$refs.tree.setCurrentKey(data);
|
|
337
|
+
this.currentDataType = data;
|
|
338
|
+
this.searchEvent();
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
</script>
|