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,575 +1,575 @@
1
- <template>
2
- <div id="containt">
3
- <el-tabs v-model="activeName" class="tab-box">
4
- <el-tab-pane :label="$t1('列表')" name="second">
5
- <div class="grid-height">
6
- <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
7
- @custom="$vxeTableUtil.customHandle">
8
- <template #form>
9
- <div class="clearfix screen-btns">
10
- <div class="fl">
11
- <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="addMenu(0)">
12
- {{ $t1('新增一级菜单') }}
13
- </vxe-button>
14
- <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="addMenu(2)">
15
- {{ $t1('新增自定义首页') }}
16
- </vxe-button>
17
- </div>
18
- <div class="fr">
19
- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
20
- plain>{{ $t1('重置') }}
21
- </vxe-button>
22
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
23
- {{ $t1('搜索') }}
24
- </vxe-button>
25
- </div>
26
- </div>
27
- <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
28
- @submit="searchEvent">
29
- <vxe-form-item :title="$t1('菜单名称')+':'" field="menuName">
30
- <template v-slot>
31
- <el-input v-model="formData.menuName" size="small" clearable/>
32
- </template>
33
- </vxe-form-item>
34
- <vxe-form-item :title="$t1('菜单编码')+':'" field="menuCode">
35
- <template v-slot>
36
- <el-input v-model="formData.menuCode" size="small" clearable/>
37
- </template>
38
- </vxe-form-item>
39
- <vxe-form-item :title="$t1('是否启用')+':'" field="enabled">
40
- <template v-slot>
41
- <el-select v-model="formData.enabled" clearable>
42
- <el-option value="true" :label="$t1('启用')"></el-option>
43
- <el-option value="false" :label="$t1('禁用')"></el-option>
44
- </el-select>
45
- </template>
46
- </vxe-form-item>
47
- </vxe-form>
48
- </template>
49
- <template #typeEdit="obj">
50
- <template v-if="obj.row.type == 2">
51
- {{ typeMap[2] }}
52
- </template>
53
- <el-select v-else v-model="obj.row.type">
54
- <el-option :value="0" :label="typeMap[0]"/>
55
- <el-option :value="1" :label="typeMap[1]"/>
56
- <el-option :value="3" :label="typeMap[3]"/>
57
- <el-option :value="4" :label="typeMap[4]"/>
58
- <el-option :value="5" :label="typeMap[5]"/>
59
- </el-select>
60
- </template>
61
- <template #menuImgEdit="{row,rowIndex}">
62
- <el-popover
63
- placement="bottom"
64
- width="680"
65
- trigger="click"
66
- :ref="'menuImg'+rowIndex"
67
- >
68
- <div class="icons-box">
69
- <div class="item iconfont" v-for="(item,index) in iconList" :key="index"
70
- :class="[item,row.menuImg == item ? 'on':'']" @click="checkMenuImg(row,item,rowIndex)"></div>
71
- </div>
72
- <label class="icons-box_select" :class="{noNone:(!!row.menuImg)}" slot="reference">
73
- <i :class="row.menuImg" class="iconfont"></i>
74
- <i class="el-icon-arrow-down"></i>
75
- <i class="el-icon-circle-close icon-box_del" @click.stop="clearMenuImg(row)"></i>
76
- </label>
77
- </el-popover>
78
-
79
- </template>
80
- <template #operate="obj">
81
- <div class="cell-operate">
82
- <template v-if="$refs['table-m1'].isActiveByRow(obj.row)">
83
- <a @click="saveRowEvent(obj)" class="a-link">
84
- <el-tooltip :enterable="false" effect="dark" :content="$t1('保存')" placement="top"
85
- popper-class="tooltip-skin"><i class="el-icon-circle-check"></i></el-tooltip>
86
- </a>
87
- <a @click="cancleRowEvent(obj)" class="a-link" v-if="hasSaveRow(obj.row)">
88
- <el-tooltip :enterable="false" effect="dark" :content="$t1('取消行编辑')" placement="top"
89
- popper-class="tooltip-skin"><i class="el-icon-circle-close"></i></el-tooltip>
90
- </a>
91
- <a @click="removeRowEvent(obj)" class="a-link" v-if="!hasSaveRow(obj.row)">
92
- <el-tooltip :enterable="false" effect="dark" :content="$t1('删除')" placement="top"
93
- popper-class="tooltip-skin"><i class="el-icon-delete"></i></el-tooltip>
94
- </a>
95
- </template>
96
- <template v-else>
97
- <a class="a-link" @click="addMenu(0, obj)" v-if="obj.row && obj.row.type != 2">
98
- <el-tooltip :enterable="false" effect="dark" :content="$t1('新增')" placement="top"
99
- popper-class="tooltip-skin"><i class="el-icon-circle-plus-outline"></i></el-tooltip>
100
- </a>
101
- <a @click="editRowEvent(obj)" class="a-link" v-if="obj.row && !obj.row.is_top">
102
- <el-tooltip :enterable="false" effect="dark" :content="$t1('行编辑')" placement="top"
103
- popper-class="tooltip-skin"><i class="el-icon-edit-outline"></i></el-tooltip>
104
- </a>
105
- </template>
106
- </div>
107
- </template>
108
- </vxe-grid>
109
- </div>
110
- </el-tab-pane>
111
- </el-tabs>
112
- </div>
113
- </template>
114
-
115
- <script>
116
- import {tableTreeMixins} from '@base/mixins/tableTree/index.js';
117
-
118
- export default {
119
- name: 'menu:in_list',
120
- components: {},
121
- mixins: [tableTreeMixins],
122
- mounted() {
123
- this.initTableList();
124
- },
125
- data() {
126
- let that = this;
127
- return {
128
- activeName: 'second',
129
- dataId: '',
130
- formData: {},
131
- vxeOption: {},
132
- menuType: 0,
133
- iconList: [
134
- "icon-shangji-shangjiguanli",
135
- "icon-daifahuodingdan",
136
- "icon-jichuziliao",
137
- "icon-zuzhi",
138
- "icon-shujujianmo",
139
- "icon-wenjianguanli",
140
- "icon-guanli1",
141
- "icon-dianshang",
142
- "icon-ziyuan",
143
- "icon-feiyongguanli",
144
- "icon-yunpingtai",
145
- "icon-yingxiao",
146
- "icon-biaodanguanli",
147
- "icon-baobiao",
148
- "icon-yusuanguanli",
149
- "icon-baoxiao",
150
- "icon-yanfa",
151
- "icon-hetong",
152
- "icon-danjuliuchengshezhi",
153
- "icon-shenqingguanli",
154
- "icon-xitongshezhi",
155
- "icon-icon-servicenetwork",
156
- "icon-a-zu96",
157
- "icon-chanpin2",
158
- "icon-shangpin2",
159
- "icon-tuihuanhuo1",
160
- "icon-wenquantiaocha",
161
- "icon-cangchu",
162
- "icon-caigou",
163
- "icon-churuku",
164
- "icon-fl-gouwuche",
165
- "icon-shangpinfenlei",
166
- "icon-shangpinshangxiajia",
167
- "icon-taocanxinxi_changgui",
168
- "icon-kehuchaxun",
169
- "icon-shangpin-canshumoban",
170
- "icon-shangpinguanli-shangpinweihu",
171
- "icon-kehubiangeng",
172
- "icon-shanghuguanxiweihu",
173
- "icon-kehuxinzeng",
174
- "icon-dunpaibaowei",
175
- "icon-a-061_bijiben",
176
- "icon-a-061_gengduo",
177
- "icon-a-061_gouwu-12",
178
- "icon-a-061_jianzhu-17",
179
- "icon-a-061_shuben",
180
- "icon-a-061_jinbi",
181
- "icon-a-061_guangbo",
182
- "icon-a-061_shuqian",
183
- "icon-a-061_shangpin",
184
- "icon-a-061_kuaidi",
185
- "icon-a-061_wenjian",
186
- "icon-a-061_xiaoxi",
187
- "icon-a-rongqi262",
188
- "icon-a-rongqi256",
189
- "icon-a-rongqi265",
190
- "icon-a-rongqi285",
191
- "icon-huomiao-mianxing",
192
- "icon-dingwei-mianxing",
193
- "icon-xiuxian-mianxing",
194
- "icon-shuju-wenjianliebiao",
195
- "icon-chexing-pinpailiebiao",
196
- "icon-yonghu-gongzuodanwei",
197
- "icon-shujujieguo",
198
- "icon-gongyingshangguanli",
199
- "icon-xitong-quanxianguanli",
200
- "icon-shujuguanli",
201
- "icon-yonghushenhe",
202
- "icon-gongyingshangliebiao",
203
- "icon-xiaoliangliebiao",
204
- "icon-chexing-ruanjianbanben",
205
- "icon-xitong-meijuguanli",
206
- "icon-huiyuan-qiyeguanli",
207
- "icon-chexing-ruanjianbanben1",
208
- "icon-shuju-ceshiguihua",
209
- "icon-yonghuliebiao",
210
- "icon-yonghuguanli",
211
- "icon-xitong-jiaoseguanli",
212
- "icon-chexingliebiao",
213
- "icon-chexingguanli",
214
- "icon-shujujiegou",
215
- "icon-huiyuanyonghu",
216
- "icon-huiyuan-quanxianguanli",
217
- "icon-shexiangtouqiehuan",
218
- "icon-luyin",
219
- "icon-yingpianjiesuo",
220
- "icon-yingpianjiasuo",
221
- "icon-qianlu",
222
- "icon-luxiangjiasuo",
223
- "icon-a-yonghuliebiao3x",
224
- "icon-a-yijianfankui3x",
225
- "icon-a-chanpinshangjiaguanli3x",
226
- "icon-a-kefufankui3x",
227
- "icon-a-zhanghaoguanli3x",
228
- "icon-a-kefu3x",
229
- "icon-a-kesu3x",
230
- "icon-a-ribaobiaoshuju3x",
231
- "icon-a-tuikuan3x",
232
- "icon-gudingmianzhi",
233
- "icon-manjianquan",
234
- "icon-xiangouhuodong",
235
- "icon-youhuiquan",
236
- "icon-Xyuanhuodong",
237
- "icon-shangpindongcha",
238
- "icon-zhijianghuodong",
239
- "icon-shizhongshezhi",
240
- "icon-kasuceshi",
241
- "icon-SDkarongliang",
242
- "icon-sudubuchang",
243
- "icon-sududanwei",
244
- "icon-GPSxinxi",
245
- "icon-GPSxianshi",
246
- "icon-GPSshuiyin",
247
- "icon-a-shouhui3x",
248
- "icon-a-yunyingpeizhi3x",
249
- "icon-biaotitubiao",
250
- "icon-tubiao1",
251
- "icon-tubiao18",
252
- "icon-tubiao28",
253
- "icon-tiyugonggongsheshi",
254
- "icon-tubiaoliebiao",
255
- "icon-VRtubiao",
256
- "icon-tubiaoAzitubiao",
257
- "icon-tubiao2",
258
- "icon-tubiao-",
259
- "icon-tubiao-1",
260
- "icon-tubiao-2",
261
- "icon-tubiao-3",
262
- "icon-tubiao3",
263
- "icon-a-tubiao-daqijiayou",
264
- "icon-charge-fill",
265
- "icon-book-fill",
266
- "icon-device-set-fill",
267
- "icon-dynamic-password-fill",
268
- "icon-map-fill",
269
- "icon-security-fill",
270
- "icon-tool-fill",
271
- "icon-readcard-fill",
272
- "icon-chaye",
273
- "icon-baoxian",
274
- "icon-dadou",
275
- "icon-nongye",
276
- "icon-nongyeqixiang",
277
- "icon-pingguo",
278
- "icon-nongyebaoxian",
279
- "icon-yaogan",
280
- "icon-zhiwu",
281
- "icon-weixing",
282
- "icon-qixiang",
283
- "icon-zuowu",
284
- "icon-qiyeguanli-2",
285
- "icon-qiyeshenhe-2",
286
- "icon-xiaoxi",
287
- "icon-xunhuan",
288
- "icon-zoushi",
289
- "icon-bushu",
290
- "icon-duanlian",
291
- "icon-gaojing",
292
- "icon-renyuan",
293
- "icon-tubiao4",
294
- "icon-wangguan",
295
- "icon-wangluo",
296
- "icon-fenzhi",
297
- "icon-gongchang",
298
- "icon-zhihuizhongxin",
299
- "icon-mti-an-gongmaoqiye",
300
- "icon-mti-an-zhongdaweixianyuan",
301
- "icon-mti-cheng-huanjing",
302
- "icon-mti-cheng-lvhua",
303
- "icon-mti-di-dimianchenjiang",
304
- "icon-mti-cheng-fengli",
305
- "icon-mti-di-qiangzhentai",
306
- "icon-mti-dong-yinhuan",
307
- "icon-mti-dong-jiaotongshigu",
308
- "icon-mti-dong-jianzhugongdi",
309
- "icon-mti-fang-jiangyuliang",
310
- "icon-mti-dong-weihuapin",
311
- "icon-mti-gu-shengtaihuanjing",
312
- "icon-mti-ying-daochang",
313
- "icon-mti-sen-shumuziyuanfenbu",
314
- "icon-mti-gongdi",
315
- "icon-mti-ying-moshiqiehuan",
316
- "icon-mti-ying-tongxunbaozhang",
317
- "icon-mti-ying-qidongyuan",
318
- "icon-mti-ying-jishuidian",
319
- "icon-mti-ying-zaihoufupan",
320
- "icon-wodeshequ2",
321
- "icon-service-line-1",
322
- "icon-notice-manage-fill",
323
- "icon-announcement-fill",
324
- "icon-box-noise-fill",
325
- ],
326
- typeMap: {
327
- 0: this.$t1('菜单'),
328
- 1: this.$t1('按钮'),
329
- 2: this.$t1('首页'),
330
- 3: this.$t1('外部菜单'),
331
- 4: this.$t1('第三方地址'),
332
- 5: this.$t1('动态表单'),
333
- }
334
- };
335
- },
336
- methods: {
337
- searchEvent() {
338
- this.$refs['table-m1'].commitProxy('reload');
339
- },
340
- resetEvent() {
341
- this.formData = {};
342
- this.$refs['table-m1'].commitProxy('reload');
343
- },
344
- initTableList() {
345
- let that = this;
346
- let tableOption = {
347
- vue: this,
348
- tableRef: 'table-m1',
349
- tableName: 'user_menu_list-m1',
350
- path: USER_PREFIX + '/menu/list',
351
- treeNodeUrl: USER_PREFIX + '/menu/listChildren',
352
- editSaveUrl: USER_PREFIX + '/menu/save',
353
- editDefaultRow: () => {
354
- return {enabled: true, type: this.menuType,checkPermission: 0};
355
- },
356
- param: () => {
357
- return this.formData;
358
- },
359
- treeNodeParam: row => {
360
- return {
361
- parent: row.id,
362
- enabled: this.formData.enabled
363
- };
364
- },
365
- config: {
366
- treeConfig: {
367
- parentField: 'parent'
368
- }
369
- },
370
- columns: [
371
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
372
- {
373
- title: this.$t1('菜单名称'),
374
- field: 'menuName',
375
- width: 250,
376
- fixed: 'left',
377
- treeNode: true,
378
- editRender: {name: 'input'},
379
- slots: {
380
- default: ({row}) => {
381
- return [
382
- <a
383
- class="levitate-tips"
384
- onclick={event => {
385
- event.stopPropagation();
386
- this.$refs['table-m1'].toggleTreeExpand(row);
387
- }}
388
- >
389
- {row.menuName}
390
- </a>
391
- ];
392
- }
393
- }
394
- },
395
- {
396
- field: 'menuCode',
397
- title: this.$t1('菜单编码'),
398
- width: 250,
399
- editRender: {},
400
- slots: {
401
- edit: ({row}) => {
402
- if (false && row.type != 2 && row.type != 3 && this.hasSaveRow(row)) {
403
- return row.menuCode;
404
- } else {
405
- return [<el-input v-model={row.menuCode}/>];
406
- }
407
- }
408
- }
409
- },
410
- {
411
- field: 'url',
412
- title: this.$t1('菜单地址'),
413
- width: 200,
414
- editRender: {},
415
- slots: {
416
- edit: ({row}) => {
417
- return [<el-input v-model={row.url}/>];
418
- }
419
- }
420
- },
421
- {
422
- field: 'enabled',
423
- title: this.$t1('是否启用'),
424
- width: 150,
425
- editRender: {
426
- name: '$select',
427
- events: {
428
- change: () => {
429
- this.$forceUpdate();
430
- }
431
- },
432
- options: [
433
- {
434
- label: this.$t1('启用'),
435
- value: true
436
- },
437
- {
438
- label: this.$t1('禁用'),
439
- value: false
440
- }
441
- ]
442
- },
443
- slots: {
444
- default: ({row}) => {
445
- if (row.enabled) {
446
- return [<div class="txt-status">{this.$t1('启用')}</div>];
447
- } else {
448
- return [<div class="txt-status s-3">{this.$t1('禁用')}</div>];
449
- }
450
- }
451
- }
452
- },
453
- {
454
- field: 'checkPermission',
455
- title: this.$t1('查询数据权限'),
456
- width: 150,
457
- editRender: {},
458
- slots: {
459
- default: ({row}) => {
460
- if (row.checkPermission) {
461
- return [<div class="txt-status">{this.$t1('启用')}</div>];
462
- } else {
463
- return [<div class="txt-status s-3">{this.$t1('禁用')}</div>];
464
- }
465
- },
466
- edit: ({row}) => {
467
- return [
468
- <el-select v-model={row.checkPermission}>
469
- <el-option value={1} label={this.$t1('启用')}></el-option>
470
- <el-option value={0} label={this.$t1('禁用')}></el-option>
471
- </el-select>
472
- ]
473
- }
474
- }
475
- },
476
- // { field: 'treePathName', title: '上级菜单', width: 200 },
477
- {field: 'orders', title: this.$t1('序号'), width: 100, editRender: {name: 'input'}},
478
- {
479
- field: 'type',
480
- title: this.$t1('类型'),
481
- width: 100,
482
- editRender: {},
483
- slots: {
484
- default: ({row}) => {
485
- return this.typeMap[row.type] || '';
486
- },
487
- edit: 'typeEdit'
488
- }
489
- },
490
- {
491
- field: 'menuImg',
492
- title: this.$t1('图标'),
493
- width: 150,
494
- editRender: {},
495
- slots: {
496
- default: ({row}) => {
497
- return [
498
- <i class={"iconfont " + row.menuImg}></i>
499
- ];
500
- },
501
- edit: "menuImgEdit"
502
- }
503
- },
504
- {
505
- field: 'menuEnName',
506
- title: this.$t1('英文菜单名称'),
507
- width: 250,
508
- editRender: {name: 'input'}
509
- },
510
- {
511
- field: 'route',
512
- title: this.$t1('路由'),
513
- width: 100,
514
- editRender: {name: 'input'}
515
- },
516
- {title: this.$t1('创建时间'), field: 'createDate', width: 150},
517
- // { title: this.$t1('更新人'), field: 'modifyBy', width: 100 },
518
- {title: this.$t1('更新时间'), field: 'modifyDate', width: 150},
519
- {
520
- width: 100,
521
- title: '',
522
- fixed: 'right',
523
- sortable: false,
524
- slots: {default: 'operate'}
525
- }
526
- ]
527
- };
528
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
529
- this.vxeOption = opts;
530
- });
531
- },
532
- addMenu(type, parentParam) {
533
- this.menuType = type;
534
- if (type == 2) {
535
- this.insertTopRow(this.$refs['table-m1']);
536
- } else {
537
- if (parentParam) {
538
- this.insertChildEvent(parentParam);
539
- } else {
540
- this.insertTopRow(this.$refs['table-m1']);
541
- }
542
- }
543
- },
544
- checkMenuImg(row, menuImg, rowIndex) {
545
- row.menuImg = menuImg;
546
- this.$refs['menuImg' + rowIndex].showPopper = false;
547
- },
548
- clearMenuImg(row) {
549
- row.menuImg = null;
550
- }
551
- }
552
- };
553
- </script>
554
- <style scoped lang="scss">
555
- .el-select-dropdown__item .iconfont {
556
- vertical-align: middle;
557
- margin-right: 3px;
558
- }
559
-
560
- .icons-box_select {
561
- .el-icon-circle-close {
562
- display: none;
563
- }
564
- }
565
-
566
- .icons-box_select.noNone:hover {
567
- .el-icon-arrow-down {
568
- display: none;
569
- }
570
-
571
- .el-icon-circle-close {
572
- display: inline-block;
573
- }
574
- }
575
- </style>
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('列表')" name="second">
5
+ <div class="grid-height">
6
+ <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
7
+ @custom="$vxeTableUtil.customHandle">
8
+ <template #form>
9
+ <div class="clearfix screen-btns">
10
+ <div class="fl">
11
+ <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="addMenu(0)">
12
+ {{ $t1('新增一级菜单') }}
13
+ </vxe-button>
14
+ <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="addMenu(2)">
15
+ {{ $t1('新增自定义首页') }}
16
+ </vxe-button>
17
+ </div>
18
+ <div class="fr">
19
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
20
+ plain>{{ $t1('重置') }}
21
+ </vxe-button>
22
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
23
+ {{ $t1('搜索') }}
24
+ </vxe-button>
25
+ </div>
26
+ </div>
27
+ <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
28
+ @submit="searchEvent">
29
+ <vxe-form-item :title="$t1('菜单名称')+':'" field="menuName">
30
+ <template v-slot>
31
+ <el-input v-model="formData.menuName" size="small" clearable/>
32
+ </template>
33
+ </vxe-form-item>
34
+ <vxe-form-item :title="$t1('菜单编码')+':'" field="menuCode">
35
+ <template v-slot>
36
+ <el-input v-model="formData.menuCode" size="small" clearable/>
37
+ </template>
38
+ </vxe-form-item>
39
+ <vxe-form-item :title="$t1('是否启用')+':'" field="enabled">
40
+ <template v-slot>
41
+ <el-select v-model="formData.enabled" clearable>
42
+ <el-option value="true" :label="$t1('启用')"></el-option>
43
+ <el-option value="false" :label="$t1('禁用')"></el-option>
44
+ </el-select>
45
+ </template>
46
+ </vxe-form-item>
47
+ </vxe-form>
48
+ </template>
49
+ <template #typeEdit="obj">
50
+ <template v-if="obj.row.type == 2">
51
+ {{ typeMap[2] }}
52
+ </template>
53
+ <el-select v-else v-model="obj.row.type">
54
+ <el-option :value="0" :label="typeMap[0]"/>
55
+ <el-option :value="1" :label="typeMap[1]"/>
56
+ <el-option :value="3" :label="typeMap[3]"/>
57
+ <el-option :value="4" :label="typeMap[4]"/>
58
+ <el-option :value="5" :label="typeMap[5]"/>
59
+ </el-select>
60
+ </template>
61
+ <template #menuImgEdit="{row,rowIndex}">
62
+ <el-popover
63
+ placement="bottom"
64
+ width="680"
65
+ trigger="click"
66
+ :ref="'menuImg'+rowIndex"
67
+ >
68
+ <div class="icons-box">
69
+ <div class="item iconfont" v-for="(item,index) in iconList" :key="index"
70
+ :class="[item,row.menuImg == item ? 'on':'']" @click="checkMenuImg(row,item,rowIndex)"></div>
71
+ </div>
72
+ <label class="icons-box_select" :class="{noNone:(!!row.menuImg)}" slot="reference">
73
+ <i :class="row.menuImg" class="iconfont"></i>
74
+ <i class="el-icon-arrow-down"></i>
75
+ <i class="el-icon-circle-close icon-box_del" @click.stop="clearMenuImg(row)"></i>
76
+ </label>
77
+ </el-popover>
78
+
79
+ </template>
80
+ <template #operate="obj">
81
+ <div class="cell-operate">
82
+ <template v-if="$refs['table-m1'].isActiveByRow(obj.row)">
83
+ <a @click="saveRowEvent(obj)" class="a-link">
84
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('保存')" placement="top"
85
+ popper-class="tooltip-skin"><i class="el-icon-circle-check"></i></el-tooltip>
86
+ </a>
87
+ <a @click="cancleRowEvent(obj)" class="a-link" v-if="hasSaveRow(obj.row)">
88
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('取消行编辑')" placement="top"
89
+ popper-class="tooltip-skin"><i class="el-icon-circle-close"></i></el-tooltip>
90
+ </a>
91
+ <a @click="removeRowEvent(obj)" class="a-link" v-if="!hasSaveRow(obj.row)">
92
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('删除')" placement="top"
93
+ popper-class="tooltip-skin"><i class="el-icon-delete"></i></el-tooltip>
94
+ </a>
95
+ </template>
96
+ <template v-else>
97
+ <a class="a-link" @click="addMenu(0, obj)" v-if="obj.row && obj.row.type != 2">
98
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('新增')" placement="top"
99
+ popper-class="tooltip-skin"><i class="el-icon-circle-plus-outline"></i></el-tooltip>
100
+ </a>
101
+ <a @click="editRowEvent(obj)" class="a-link" v-if="obj.row && !obj.row.is_top">
102
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('行编辑')" placement="top"
103
+ popper-class="tooltip-skin"><i class="el-icon-edit-outline"></i></el-tooltip>
104
+ </a>
105
+ </template>
106
+ </div>
107
+ </template>
108
+ </vxe-grid>
109
+ </div>
110
+ </el-tab-pane>
111
+ </el-tabs>
112
+ </div>
113
+ </template>
114
+
115
+ <script>
116
+ import {tableTreeMixins} from '@base/mixins/tableTree/index.js';
117
+
118
+ export default {
119
+ name: 'menu:in_list',
120
+ components: {},
121
+ mixins: [tableTreeMixins],
122
+ mounted() {
123
+ this.initTableList();
124
+ },
125
+ data() {
126
+ let that = this;
127
+ return {
128
+ activeName: 'second',
129
+ dataId: '',
130
+ formData: {},
131
+ vxeOption: {},
132
+ menuType: 0,
133
+ iconList: [
134
+ "icon-shangji-shangjiguanli",
135
+ "icon-daifahuodingdan",
136
+ "icon-jichuziliao",
137
+ "icon-zuzhi",
138
+ "icon-shujujianmo",
139
+ "icon-wenjianguanli",
140
+ "icon-guanli1",
141
+ "icon-dianshang",
142
+ "icon-ziyuan",
143
+ "icon-feiyongguanli",
144
+ "icon-yunpingtai",
145
+ "icon-yingxiao",
146
+ "icon-biaodanguanli",
147
+ "icon-baobiao",
148
+ "icon-yusuanguanli",
149
+ "icon-baoxiao",
150
+ "icon-yanfa",
151
+ "icon-hetong",
152
+ "icon-danjuliuchengshezhi",
153
+ "icon-shenqingguanli",
154
+ "icon-xitongshezhi",
155
+ "icon-icon-servicenetwork",
156
+ "icon-a-zu96",
157
+ "icon-chanpin2",
158
+ "icon-shangpin2",
159
+ "icon-tuihuanhuo1",
160
+ "icon-wenquantiaocha",
161
+ "icon-cangchu",
162
+ "icon-caigou",
163
+ "icon-churuku",
164
+ "icon-fl-gouwuche",
165
+ "icon-shangpinfenlei",
166
+ "icon-shangpinshangxiajia",
167
+ "icon-taocanxinxi_changgui",
168
+ "icon-kehuchaxun",
169
+ "icon-shangpin-canshumoban",
170
+ "icon-shangpinguanli-shangpinweihu",
171
+ "icon-kehubiangeng",
172
+ "icon-shanghuguanxiweihu",
173
+ "icon-kehuxinzeng",
174
+ "icon-dunpaibaowei",
175
+ "icon-a-061_bijiben",
176
+ "icon-a-061_gengduo",
177
+ "icon-a-061_gouwu-12",
178
+ "icon-a-061_jianzhu-17",
179
+ "icon-a-061_shuben",
180
+ "icon-a-061_jinbi",
181
+ "icon-a-061_guangbo",
182
+ "icon-a-061_shuqian",
183
+ "icon-a-061_shangpin",
184
+ "icon-a-061_kuaidi",
185
+ "icon-a-061_wenjian",
186
+ "icon-a-061_xiaoxi",
187
+ "icon-a-rongqi262",
188
+ "icon-a-rongqi256",
189
+ "icon-a-rongqi265",
190
+ "icon-a-rongqi285",
191
+ "icon-huomiao-mianxing",
192
+ "icon-dingwei-mianxing",
193
+ "icon-xiuxian-mianxing",
194
+ "icon-shuju-wenjianliebiao",
195
+ "icon-chexing-pinpailiebiao",
196
+ "icon-yonghu-gongzuodanwei",
197
+ "icon-shujujieguo",
198
+ "icon-gongyingshangguanli",
199
+ "icon-xitong-quanxianguanli",
200
+ "icon-shujuguanli",
201
+ "icon-yonghushenhe",
202
+ "icon-gongyingshangliebiao",
203
+ "icon-xiaoliangliebiao",
204
+ "icon-chexing-ruanjianbanben",
205
+ "icon-xitong-meijuguanli",
206
+ "icon-huiyuan-qiyeguanli",
207
+ "icon-chexing-ruanjianbanben1",
208
+ "icon-shuju-ceshiguihua",
209
+ "icon-yonghuliebiao",
210
+ "icon-yonghuguanli",
211
+ "icon-xitong-jiaoseguanli",
212
+ "icon-chexingliebiao",
213
+ "icon-chexingguanli",
214
+ "icon-shujujiegou",
215
+ "icon-huiyuanyonghu",
216
+ "icon-huiyuan-quanxianguanli",
217
+ "icon-shexiangtouqiehuan",
218
+ "icon-luyin",
219
+ "icon-yingpianjiesuo",
220
+ "icon-yingpianjiasuo",
221
+ "icon-qianlu",
222
+ "icon-luxiangjiasuo",
223
+ "icon-a-yonghuliebiao3x",
224
+ "icon-a-yijianfankui3x",
225
+ "icon-a-chanpinshangjiaguanli3x",
226
+ "icon-a-kefufankui3x",
227
+ "icon-a-zhanghaoguanli3x",
228
+ "icon-a-kefu3x",
229
+ "icon-a-kesu3x",
230
+ "icon-a-ribaobiaoshuju3x",
231
+ "icon-a-tuikuan3x",
232
+ "icon-gudingmianzhi",
233
+ "icon-manjianquan",
234
+ "icon-xiangouhuodong",
235
+ "icon-youhuiquan",
236
+ "icon-Xyuanhuodong",
237
+ "icon-shangpindongcha",
238
+ "icon-zhijianghuodong",
239
+ "icon-shizhongshezhi",
240
+ "icon-kasuceshi",
241
+ "icon-SDkarongliang",
242
+ "icon-sudubuchang",
243
+ "icon-sududanwei",
244
+ "icon-GPSxinxi",
245
+ "icon-GPSxianshi",
246
+ "icon-GPSshuiyin",
247
+ "icon-a-shouhui3x",
248
+ "icon-a-yunyingpeizhi3x",
249
+ "icon-biaotitubiao",
250
+ "icon-tubiao1",
251
+ "icon-tubiao18",
252
+ "icon-tubiao28",
253
+ "icon-tiyugonggongsheshi",
254
+ "icon-tubiaoliebiao",
255
+ "icon-VRtubiao",
256
+ "icon-tubiaoAzitubiao",
257
+ "icon-tubiao2",
258
+ "icon-tubiao-",
259
+ "icon-tubiao-1",
260
+ "icon-tubiao-2",
261
+ "icon-tubiao-3",
262
+ "icon-tubiao3",
263
+ "icon-a-tubiao-daqijiayou",
264
+ "icon-charge-fill",
265
+ "icon-book-fill",
266
+ "icon-device-set-fill",
267
+ "icon-dynamic-password-fill",
268
+ "icon-map-fill",
269
+ "icon-security-fill",
270
+ "icon-tool-fill",
271
+ "icon-readcard-fill",
272
+ "icon-chaye",
273
+ "icon-baoxian",
274
+ "icon-dadou",
275
+ "icon-nongye",
276
+ "icon-nongyeqixiang",
277
+ "icon-pingguo",
278
+ "icon-nongyebaoxian",
279
+ "icon-yaogan",
280
+ "icon-zhiwu",
281
+ "icon-weixing",
282
+ "icon-qixiang",
283
+ "icon-zuowu",
284
+ "icon-qiyeguanli-2",
285
+ "icon-qiyeshenhe-2",
286
+ "icon-xiaoxi",
287
+ "icon-xunhuan",
288
+ "icon-zoushi",
289
+ "icon-bushu",
290
+ "icon-duanlian",
291
+ "icon-gaojing",
292
+ "icon-renyuan",
293
+ "icon-tubiao4",
294
+ "icon-wangguan",
295
+ "icon-wangluo",
296
+ "icon-fenzhi",
297
+ "icon-gongchang",
298
+ "icon-zhihuizhongxin",
299
+ "icon-mti-an-gongmaoqiye",
300
+ "icon-mti-an-zhongdaweixianyuan",
301
+ "icon-mti-cheng-huanjing",
302
+ "icon-mti-cheng-lvhua",
303
+ "icon-mti-di-dimianchenjiang",
304
+ "icon-mti-cheng-fengli",
305
+ "icon-mti-di-qiangzhentai",
306
+ "icon-mti-dong-yinhuan",
307
+ "icon-mti-dong-jiaotongshigu",
308
+ "icon-mti-dong-jianzhugongdi",
309
+ "icon-mti-fang-jiangyuliang",
310
+ "icon-mti-dong-weihuapin",
311
+ "icon-mti-gu-shengtaihuanjing",
312
+ "icon-mti-ying-daochang",
313
+ "icon-mti-sen-shumuziyuanfenbu",
314
+ "icon-mti-gongdi",
315
+ "icon-mti-ying-moshiqiehuan",
316
+ "icon-mti-ying-tongxunbaozhang",
317
+ "icon-mti-ying-qidongyuan",
318
+ "icon-mti-ying-jishuidian",
319
+ "icon-mti-ying-zaihoufupan",
320
+ "icon-wodeshequ2",
321
+ "icon-service-line-1",
322
+ "icon-notice-manage-fill",
323
+ "icon-announcement-fill",
324
+ "icon-box-noise-fill",
325
+ ],
326
+ typeMap: {
327
+ 0: this.$t1('菜单'),
328
+ 1: this.$t1('按钮'),
329
+ 2: this.$t1('首页'),
330
+ 3: this.$t1('外部菜单'),
331
+ 4: this.$t1('第三方地址'),
332
+ 5: this.$t1('动态表单'),
333
+ }
334
+ };
335
+ },
336
+ methods: {
337
+ searchEvent() {
338
+ this.$refs['table-m1'].commitProxy('reload');
339
+ },
340
+ resetEvent() {
341
+ this.formData = {};
342
+ this.$refs['table-m1'].commitProxy('reload');
343
+ },
344
+ initTableList() {
345
+ let that = this;
346
+ let tableOption = {
347
+ vue: this,
348
+ tableRef: 'table-m1',
349
+ tableName: 'user_menu_list-m1',
350
+ path: USER_PREFIX + '/menu/list',
351
+ treeNodeUrl: USER_PREFIX + '/menu/listChildren',
352
+ editSaveUrl: USER_PREFIX + '/menu/save',
353
+ editDefaultRow: () => {
354
+ return {enabled: true, type: this.menuType,checkPermission: 0};
355
+ },
356
+ param: () => {
357
+ return this.formData;
358
+ },
359
+ treeNodeParam: row => {
360
+ return {
361
+ parent: row.id,
362
+ enabled: this.formData.enabled
363
+ };
364
+ },
365
+ config: {
366
+ treeConfig: {
367
+ parentField: 'parent'
368
+ }
369
+ },
370
+ columns: [
371
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
372
+ {
373
+ title: this.$t1('菜单名称'),
374
+ field: 'menuName',
375
+ width: 250,
376
+ fixed: 'left',
377
+ treeNode: true,
378
+ editRender: {name: 'input'},
379
+ slots: {
380
+ default: ({row}) => {
381
+ return [
382
+ <a
383
+ class="levitate-tips"
384
+ onclick={event => {
385
+ event.stopPropagation();
386
+ this.$refs['table-m1'].toggleTreeExpand(row);
387
+ }}
388
+ >
389
+ {row.menuName}
390
+ </a>
391
+ ];
392
+ }
393
+ }
394
+ },
395
+ {
396
+ field: 'menuCode',
397
+ title: this.$t1('菜单编码'),
398
+ width: 250,
399
+ editRender: {},
400
+ slots: {
401
+ edit: ({row}) => {
402
+ if (false && row.type != 2 && row.type != 3 && this.hasSaveRow(row)) {
403
+ return row.menuCode;
404
+ } else {
405
+ return [<el-input v-model={row.menuCode}/>];
406
+ }
407
+ }
408
+ }
409
+ },
410
+ {
411
+ field: 'url',
412
+ title: this.$t1('菜单地址'),
413
+ width: 200,
414
+ editRender: {},
415
+ slots: {
416
+ edit: ({row}) => {
417
+ return [<el-input v-model={row.url}/>];
418
+ }
419
+ }
420
+ },
421
+ {
422
+ field: 'enabled',
423
+ title: this.$t1('是否启用'),
424
+ width: 150,
425
+ editRender: {
426
+ name: '$select',
427
+ events: {
428
+ change: () => {
429
+ this.$forceUpdate();
430
+ }
431
+ },
432
+ options: [
433
+ {
434
+ label: this.$t1('启用'),
435
+ value: true
436
+ },
437
+ {
438
+ label: this.$t1('禁用'),
439
+ value: false
440
+ }
441
+ ]
442
+ },
443
+ slots: {
444
+ default: ({row}) => {
445
+ if (row.enabled) {
446
+ return [<div class="txt-status">{this.$t1('启用')}</div>];
447
+ } else {
448
+ return [<div class="txt-status s-3">{this.$t1('禁用')}</div>];
449
+ }
450
+ }
451
+ }
452
+ },
453
+ {
454
+ field: 'checkPermission',
455
+ title: this.$t1('查询数据权限'),
456
+ width: 150,
457
+ editRender: {},
458
+ slots: {
459
+ default: ({row}) => {
460
+ if (row.checkPermission) {
461
+ return [<div class="txt-status">{this.$t1('启用')}</div>];
462
+ } else {
463
+ return [<div class="txt-status s-3">{this.$t1('禁用')}</div>];
464
+ }
465
+ },
466
+ edit: ({row}) => {
467
+ return [
468
+ <el-select v-model={row.checkPermission}>
469
+ <el-option value={1} label={this.$t1('启用')}></el-option>
470
+ <el-option value={0} label={this.$t1('禁用')}></el-option>
471
+ </el-select>
472
+ ]
473
+ }
474
+ }
475
+ },
476
+ // { field: 'treePathName', title: '上级菜单', width: 200 },
477
+ {field: 'orders', title: this.$t1('序号'), width: 100, editRender: {name: 'input'}},
478
+ {
479
+ field: 'type',
480
+ title: this.$t1('类型'),
481
+ width: 100,
482
+ editRender: {},
483
+ slots: {
484
+ default: ({row}) => {
485
+ return this.typeMap[row.type] || '';
486
+ },
487
+ edit: 'typeEdit'
488
+ }
489
+ },
490
+ {
491
+ field: 'menuImg',
492
+ title: this.$t1('图标'),
493
+ width: 150,
494
+ editRender: {},
495
+ slots: {
496
+ default: ({row}) => {
497
+ return [
498
+ <i class={"iconfont " + row.menuImg}></i>
499
+ ];
500
+ },
501
+ edit: "menuImgEdit"
502
+ }
503
+ },
504
+ {
505
+ field: 'menuEnName',
506
+ title: this.$t1('英文菜单名称'),
507
+ width: 250,
508
+ editRender: {name: 'input'}
509
+ },
510
+ {
511
+ field: 'route',
512
+ title: this.$t1('路由'),
513
+ width: 100,
514
+ editRender: {name: 'input'}
515
+ },
516
+ {title: this.$t1('创建时间'), field: 'createDate', width: 150},
517
+ // { title: this.$t1('更新人'), field: 'modifyBy', width: 100 },
518
+ {title: this.$t1('更新时间'), field: 'modifyDate', width: 150},
519
+ {
520
+ width: 100,
521
+ title: '',
522
+ fixed: 'right',
523
+ sortable: false,
524
+ slots: {default: 'operate'}
525
+ }
526
+ ]
527
+ };
528
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
529
+ this.vxeOption = opts;
530
+ });
531
+ },
532
+ addMenu(type, parentParam) {
533
+ this.menuType = type;
534
+ if (type == 2) {
535
+ this.insertTopRow(this.$refs['table-m1']);
536
+ } else {
537
+ if (parentParam) {
538
+ this.insertChildEvent(parentParam);
539
+ } else {
540
+ this.insertTopRow(this.$refs['table-m1']);
541
+ }
542
+ }
543
+ },
544
+ checkMenuImg(row, menuImg, rowIndex) {
545
+ row.menuImg = menuImg;
546
+ this.$refs['menuImg' + rowIndex].showPopper = false;
547
+ },
548
+ clearMenuImg(row) {
549
+ row.menuImg = null;
550
+ }
551
+ }
552
+ };
553
+ </script>
554
+ <style scoped lang="scss">
555
+ .el-select-dropdown__item .iconfont {
556
+ vertical-align: middle;
557
+ margin-right: 3px;
558
+ }
559
+
560
+ .icons-box_select {
561
+ .el-icon-circle-close {
562
+ display: none;
563
+ }
564
+ }
565
+
566
+ .icons-box_select.noNone:hover {
567
+ .el-icon-arrow-down {
568
+ display: none;
569
+ }
570
+
571
+ .el-icon-circle-close {
572
+ display: inline-block;
573
+ }
574
+ }
575
+ </style>