cloud-web-corejs 1.0.14 → 1.0.16
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 +1 -1
- package/src/components/jsonImport/exportDialog.vue +63 -0
- package/src/components/jsonImport/index.js +3 -1
- package/src/components/jsonImport/index.vue +6 -5
- package/src/components/jsonImport/mixins.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/preformDialog.vue +77 -0
- package/src/components/xform/form-designer/index.vue +13 -3
- package/src/components/xform/form-designer/indexMixin.js +4 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +1 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +11 -11
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
- package/src/layout/components/Sidebar/default.vue +1226 -0
- package/src/layout/components/Sidebar/index.vue +5 -1178
- package/src/layout/defaultLayout.vue +150 -0
- package/src/layout/index.vue +4 -138
- package/src/permission.js +1 -1
- package/src/router/modules/customer.js +1 -1
- package/src/router/modules/system.js +2 -2
- package/src/store/modules/permission.js +4 -3
- package/src/views/bd/setting/bd_attach_setting/list.vue +64 -45
- package/src/views/bd/setting/form_script/edit.vue +40 -25
- package/src/views/bd/setting/form_script/edit1.vue +40 -25
- package/src/views/bd/setting/form_script/list.vue +13 -8
- package/src/views/bd/setting/form_script/list1.vue +74 -37
- package/src/views/bd/setting/form_template/edit.vue +41 -25
- package/src/views/bd/setting/form_template/list.vue +72 -58
- package/src/views/bd/setting/form_template/preformDialog.vue +77 -0
- package/src/views/bd/setting/menu_kind/authDialog.vue +308 -0
- package/src/views/bd/setting/menu_kind/dialog.vue +3 -0
- package/src/views/bd/setting/menu_kind/list.vue +35 -9
- package/src/views/bd/setting/table_model/edit.vue +48 -34
- package/src/views/bd/setting/table_model/list.vue +72 -33
- package/src/views/user/home/index.vue +4 -2
- package/src/views/user/login/indexMixin.js +45 -21
- package/src/views/user/user/form_edit.vue +483 -0
- package/src/views/user/user/form_list.vue +348 -0
- package/src/views/user/user/list.vue +2 -2
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="containt">
|
|
3
|
+
<el-tabs v-model="activeName" class="tab-box">
|
|
4
|
+
<el-tab-pane label="常规" name="first">
|
|
5
|
+
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
|
|
6
|
+
@reload="$reloadHandle" :userType="userType" :flag="flag"></editView>
|
|
7
|
+
</el-tab-pane>
|
|
8
|
+
<el-tab-pane label="列表" name="second">
|
|
9
|
+
<div class="grid-height">
|
|
10
|
+
<vxe-grid
|
|
11
|
+
id="table-m1"
|
|
12
|
+
ref="table-m1"
|
|
13
|
+
:auto-resize="true"
|
|
14
|
+
v-bind="vxeOption"
|
|
15
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
16
|
+
@custom="$vxeTableUtil.customHandle"
|
|
17
|
+
>
|
|
18
|
+
<template #form>
|
|
19
|
+
<tableForm :formData.sync="formData" :advancedFormData.sync="advancedFormData"
|
|
20
|
+
@searchEvent="searchEvent" @resetEvent="resetEvent">
|
|
21
|
+
<template #buttonLeft>
|
|
22
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog">新增
|
|
23
|
+
</vxe-button>
|
|
24
|
+
<base-table-export :option="{ title: '账户导出', targetRef: 'table-m1'}" :parent-target="_self"/>
|
|
25
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-download" @click="importExcel">导入
|
|
26
|
+
</vxe-button>
|
|
27
|
+
<base-input-export :option="exportOption" :parent-target="_self"/>
|
|
28
|
+
</template>
|
|
29
|
+
<template #buttonRight>
|
|
30
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
31
|
+
plain>重置
|
|
32
|
+
</vxe-button>
|
|
33
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
|
|
34
|
+
</vxe-button>
|
|
35
|
+
</template>
|
|
36
|
+
</tableForm>
|
|
37
|
+
</template>
|
|
38
|
+
</vxe-grid>
|
|
39
|
+
</div>
|
|
40
|
+
</el-tab-pane>
|
|
41
|
+
</el-tabs>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import editView from './form_edit.vue';
|
|
47
|
+
// import {treeScollx} from '@base/utils/global.js';
|
|
48
|
+
import tableForm from "@base/components/table/tableForm";
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
name: 'user:list',
|
|
52
|
+
props: {
|
|
53
|
+
userType: {
|
|
54
|
+
type: Number
|
|
55
|
+
},
|
|
56
|
+
flag:String
|
|
57
|
+
},
|
|
58
|
+
components: {
|
|
59
|
+
tableForm,
|
|
60
|
+
editView
|
|
61
|
+
},
|
|
62
|
+
created() {
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
activated() {
|
|
66
|
+
// this.initTableList();
|
|
67
|
+
},
|
|
68
|
+
async mounted() {
|
|
69
|
+
// treeScollx({target: this, type: 'default'});
|
|
70
|
+
// await this.initOutUserRoleCode();
|
|
71
|
+
// this.getRoleList();
|
|
72
|
+
this.initTableList();
|
|
73
|
+
},
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
exportOption: {
|
|
77
|
+
prefix: USER_PREFIX,
|
|
78
|
+
tableRef: 'table-m1',
|
|
79
|
+
title: '用户',
|
|
80
|
+
codes: ["USEREXCEL", "USERPDF", "USERPRINT", "USERHIPRINT", "USERJDPRINT", "USERPDDPRINT", "USERVIPPRINT"],
|
|
81
|
+
onBeforePrint: (done, {etCode, etType}) => {
|
|
82
|
+
/*etType: 2 菜鸟打印,3 网页打印,6 京东打印*/
|
|
83
|
+
done();
|
|
84
|
+
},
|
|
85
|
+
onAfterPrint: ({etCode, etType}, close) => {
|
|
86
|
+
/*etType: 2 菜鸟打印,3 网页打印,6 京东打印*/
|
|
87
|
+
/*close();//关闭弹框*/
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
printOption: {
|
|
91
|
+
prefix: USER_PREFIX,
|
|
92
|
+
tableRef: 'table-m1',
|
|
93
|
+
param: {
|
|
94
|
+
type: 'print',
|
|
95
|
+
code: 'USERPRINT',
|
|
96
|
+
param: 'tableDefault'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
showEdit: false,
|
|
100
|
+
activeName: 'second',
|
|
101
|
+
showUpload: true,
|
|
102
|
+
uploadSize: 10,
|
|
103
|
+
value10: '',
|
|
104
|
+
dataId: '',
|
|
105
|
+
tp: false,
|
|
106
|
+
showUserDialog: false,
|
|
107
|
+
nickName: 'dd',
|
|
108
|
+
formData: {saleOrgName: null, roleCodes: []},
|
|
109
|
+
vxeOption: {
|
|
110
|
+
className: 'list-table'
|
|
111
|
+
},
|
|
112
|
+
defaultProps: {
|
|
113
|
+
label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
|
|
114
|
+
children: [],
|
|
115
|
+
isLeaf: 'leaf'
|
|
116
|
+
},
|
|
117
|
+
showAdvancedSearch: false,
|
|
118
|
+
advancedFormData: {},
|
|
119
|
+
roleList: [],
|
|
120
|
+
distributorCode: 'distributor',
|
|
121
|
+
outUserCodes: []
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
searchEvent() {
|
|
126
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
127
|
+
},
|
|
128
|
+
resetEvent() {
|
|
129
|
+
this.formData = {};
|
|
130
|
+
this.advancedFormData = {};
|
|
131
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
132
|
+
},
|
|
133
|
+
openEditDialog(id) {
|
|
134
|
+
this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
135
|
+
this.activeName = 'first';
|
|
136
|
+
this.$openEditView('showEdit');
|
|
137
|
+
},
|
|
138
|
+
initTableList() {
|
|
139
|
+
let tableOption = {
|
|
140
|
+
vue: this,
|
|
141
|
+
tableRef: 'table-m1',
|
|
142
|
+
tableName: 'basic_user_list-m11',
|
|
143
|
+
path: USER_PREFIX + '/user/listAllPage',
|
|
144
|
+
param: () => {
|
|
145
|
+
let formData = {
|
|
146
|
+
...this.formData,
|
|
147
|
+
...this.advancedFormData,
|
|
148
|
+
flag:8
|
|
149
|
+
};
|
|
150
|
+
/*let outUserCodes = this.outUserCodes;
|
|
151
|
+
if (this.userType == 1) {
|
|
152
|
+
//企业用户
|
|
153
|
+
formData.neRoleCodes = [...outUserCodes];
|
|
154
|
+
} else if (this.userType == 2) {
|
|
155
|
+
//外部用户
|
|
156
|
+
if (!formData.roleCodes || !formData.roleCodes.length) {
|
|
157
|
+
formData.roleCodes = [...outUserCodes];
|
|
158
|
+
}
|
|
159
|
+
}*/
|
|
160
|
+
return formData;
|
|
161
|
+
},
|
|
162
|
+
columns: [
|
|
163
|
+
{
|
|
164
|
+
type: 'checkbox',
|
|
165
|
+
width: 48,
|
|
166
|
+
resizable: false,
|
|
167
|
+
fixed: 'left'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
title: '登录名',
|
|
171
|
+
field: 'loginAccount',
|
|
172
|
+
width: 250,
|
|
173
|
+
fixed: 'left'
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
field: 'nickName',
|
|
177
|
+
title: '姓名',
|
|
178
|
+
width: 150
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
field: 'enabled',
|
|
182
|
+
title: '是否启用',
|
|
183
|
+
width: 150,
|
|
184
|
+
slots: {
|
|
185
|
+
default: ({row}) => {
|
|
186
|
+
if (row.enabled) {
|
|
187
|
+
return [<div class="txt-status">启用</div>];
|
|
188
|
+
} else {
|
|
189
|
+
return [<div class="txt-status s-3">禁用</div>];
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
field: 'createBy',
|
|
196
|
+
title: '创建人',
|
|
197
|
+
width: 150
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
field: 'modifyBy',
|
|
201
|
+
title: '更新人',
|
|
202
|
+
width: 150
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
field: 'modifyDate',
|
|
206
|
+
title: '更新时间',
|
|
207
|
+
width: 150
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
field: 'createDate',
|
|
211
|
+
title: '创建时间',
|
|
212
|
+
width: 150
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
width: 47,
|
|
216
|
+
fixed: 'right',
|
|
217
|
+
title: '',
|
|
218
|
+
sortable: false,
|
|
219
|
+
slots: {
|
|
220
|
+
default: ({row}) => {
|
|
221
|
+
return [
|
|
222
|
+
<a
|
|
223
|
+
href="javascript:void(0);"
|
|
224
|
+
class="a-link"
|
|
225
|
+
onclick={() => {
|
|
226
|
+
this.openEditDialog(row.id);
|
|
227
|
+
}}
|
|
228
|
+
>
|
|
229
|
+
<el-tooltip enterable={false} enterable={false} effect="dark" content="查看" placement="top"
|
|
230
|
+
popper-class="tooltip-skin">
|
|
231
|
+
<i class="el-icon-edit"/>
|
|
232
|
+
</el-tooltip>
|
|
233
|
+
</a>
|
|
234
|
+
];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
searchColumns: [
|
|
240
|
+
{title: "登录名", field: "loginAccount", type: "input", common: true},
|
|
241
|
+
{title: "姓名", field: "nickName", type: "input", common: true},
|
|
242
|
+
{title: "登录名(批量)", field: "loginAccounts", type: "inputBatch", common: false},
|
|
243
|
+
{
|
|
244
|
+
title: "是否启用", field: "enabled", type: "select", common: false, itemOption: [
|
|
245
|
+
{label: "启用", value: true},
|
|
246
|
+
{label: "禁用", value: false}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
config: {
|
|
251
|
+
pagerConfig: {
|
|
252
|
+
pageSize: 500
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
257
|
+
this.vxeOption = opts;
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
importExcel() {
|
|
261
|
+
let that = this;
|
|
262
|
+
that.$excelImport({
|
|
263
|
+
prefix: USER_PREFIX,
|
|
264
|
+
excel: USER_PREFIX + '/excelTemplate/user/user.xlsx',
|
|
265
|
+
multi: true,
|
|
266
|
+
saveUrl: USER_PREFIX + '/user/batchImport',
|
|
267
|
+
callback: () => {
|
|
268
|
+
that.searchEvent();
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
getRoleList2() {
|
|
273
|
+
return new Promise((resolve, reject) => {
|
|
274
|
+
this.$http({
|
|
275
|
+
url: USER_PREFIX + '/role/list',
|
|
276
|
+
method: 'post',
|
|
277
|
+
success: res => {
|
|
278
|
+
let rows = res.objx || [];
|
|
279
|
+
let outUserCodes = this.outUserCodes;
|
|
280
|
+
if (this.userType == 1) {
|
|
281
|
+
//企业用户
|
|
282
|
+
rows = rows.filter(row => !outUserCodes.includes(row.code));
|
|
283
|
+
} else if (this.userType == 2) {
|
|
284
|
+
//外部用户
|
|
285
|
+
rows = rows.filter(row => outUserCodes.includes(row.code));
|
|
286
|
+
}
|
|
287
|
+
let result = rows.map(row => {
|
|
288
|
+
return {
|
|
289
|
+
value: row.code,
|
|
290
|
+
label: row.name
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
resolve(result);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
getDict() {
|
|
299
|
+
return new Promise((resolve, reject) => {
|
|
300
|
+
this.$getBaseDicts({
|
|
301
|
+
code: "orderType",
|
|
302
|
+
success: ({dicts, dictMap}) => {
|
|
303
|
+
let result = dicts.map(row => {
|
|
304
|
+
return {
|
|
305
|
+
value: row.sn,
|
|
306
|
+
label: row.value
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
resolve(result);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
},
|
|
315
|
+
getRoleList() {
|
|
316
|
+
return this.$http({
|
|
317
|
+
url: USER_PREFIX + '/role/list',
|
|
318
|
+
method: 'post',
|
|
319
|
+
success: res => {
|
|
320
|
+
let rows = res.objx || [];
|
|
321
|
+
let outUserCodes = this.outUserCodes;
|
|
322
|
+
if (this.userType == 1) {
|
|
323
|
+
//企业用户
|
|
324
|
+
rows = rows.filter(row => !outUserCodes.includes(row.code));
|
|
325
|
+
} else if (this.userType == 2) {
|
|
326
|
+
//外部用户
|
|
327
|
+
rows = rows.filter(row => outUserCodes.includes(row.code));
|
|
328
|
+
}
|
|
329
|
+
this.roleList = rows;
|
|
330
|
+
return rows;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
},
|
|
334
|
+
async initOutUserRoleCode() {
|
|
335
|
+
return this.$http({
|
|
336
|
+
url: USER_PREFIX + '/system_parameter/getByCode',
|
|
337
|
+
method: 'post',
|
|
338
|
+
data: {"code": "outUserRoleCode"},
|
|
339
|
+
success: res => {
|
|
340
|
+
let value = (!res.objx || !res.objx.value) ? "distributor" : res.objx.value;
|
|
341
|
+
let codes = value.split(',');
|
|
342
|
+
this.outUserCodes = codes;
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
</script>
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<script>
|
|
69
|
-
|
|
69
|
+
import editView from './form_edit.vue';
|
|
70
70
|
import {treeScollx} from '@base/utils/global.js';
|
|
71
71
|
import tableForm from "@base/components/table/tableForm";
|
|
72
72
|
|
|
73
73
|
export default {
|
|
74
|
-
name: 'user:
|
|
74
|
+
name: 'user:form_list',
|
|
75
75
|
props: {
|
|
76
76
|
userType: {
|
|
77
77
|
type: Number
|