cloud-web-corejs 1.0.54-dev.725 → 1.0.54-dev.728
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/vb-tabs/x-tabs.vue +3 -2
- package/src/components/wf/content.vue +1 -1
- package/src/components/wf/wf.js +16 -1
- package/src/components/wf/wfUtil.js +1 -1
- package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217-/346/234/200/347/273/210/345/256/236/347/216/260.md +195 -0
- package/src/components/xform/form-designer/designer.js +3 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +21 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +18 -0
- package/src/components/xform/form-render/container-item/detail-item.vue +107 -3
- package/src/components/xform/form-render/indexMixin.js +95 -1
- package/src/components/xform/mixins/defaultHandle.js +16 -0
- package/src/components/xform/mixins/scriptHttp.js +3 -0
- package/src/components/xform/utils/util.js +3 -0
- package/src/layout/components/AppMain.vue +2 -1
- package/src/views/user/form/view/list.vue +164 -11
- package/src/views/user/position/list.vue +68 -108
- package/src/components/xform/XFormTabContainer/IMPLEMENTATION_PLAN.md +0 -1079
- package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217-/350/220/275/345/234/260/345/256/236/346/226/275/346/226/207/346/241/243.md +0 -232
- package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217/345/256/236/347/216/260/346/226/271/346/241/210.md +0 -511
|
@@ -149,6 +149,9 @@ modules = {
|
|
|
149
149
|
let target2 = target1?.$attrs['parent-target'];
|
|
150
150
|
let target = !target2 ? this : target1;*/
|
|
151
151
|
let target = formTarget;
|
|
152
|
+
// 暴露启动流程所需的 option 与上下文,供 detail-item 声明式渲染启动按钮(替代 DOM 强制注入)
|
|
153
|
+
target.wfStartOption = opt2;
|
|
154
|
+
target.wfStartCtx = target;
|
|
152
155
|
initWf.call(target, opt2);
|
|
153
156
|
}
|
|
154
157
|
}
|
|
@@ -999,6 +999,9 @@ export function getDefaultFormConfig() {
|
|
|
999
999
|
wfConfigData: [],
|
|
1000
1000
|
multiTabEnabled: false,
|
|
1001
1001
|
multiTabLabelField: null,
|
|
1002
|
+
addTabEnabled: false, // 新增打开独立页签(不走「常规」页签)
|
|
1003
|
+
submitBehavior: "refreshCurrent", // 提交后行为: refreshCurrent(默认,留在详情页) | closeToList
|
|
1004
|
+
billNavEnabled: false, // 详情页签显示「上一单/下一单」翻单按钮
|
|
1002
1005
|
addFormCode: null,
|
|
1003
1006
|
addFormName: null,
|
|
1004
1007
|
wfTheme: null,
|
|
@@ -90,13 +90,14 @@ export default {
|
|
|
90
90
|
.app-main {
|
|
91
91
|
/* 45= navbar 45 */
|
|
92
92
|
min-height: calc(100vh - 45px);
|
|
93
|
+
//height:calc(100vh - 10px);
|
|
93
94
|
width: 100%;
|
|
94
95
|
position: relative;
|
|
95
96
|
overflow: hidden;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
.fixed-header + .app-main {
|
|
99
|
-
padding-top:
|
|
100
|
+
padding-top: 32px;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
.hasTagsView {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
></vFormRender>
|
|
69
69
|
</div>
|
|
70
70
|
</el-tab-pane>
|
|
71
|
-
<template #editTab="{ tab
|
|
71
|
+
<template #editTab="{ tab }">
|
|
72
72
|
<el-tab-pane
|
|
73
73
|
:key="tab.tabName"
|
|
74
74
|
:label="tab.data[tab.tabLabelField]"
|
|
@@ -82,12 +82,7 @@
|
|
|
82
82
|
:param="tab.param"
|
|
83
83
|
v-if="tab.showContent"
|
|
84
84
|
:parent-target="_self"
|
|
85
|
-
@reload="
|
|
86
|
-
(...args) => {
|
|
87
|
-
formData = {};
|
|
88
|
-
reloadTabContent(...args);
|
|
89
|
-
}
|
|
90
|
-
"
|
|
85
|
+
@reload="(...args) => onEditTabReload(tab, ...args)"
|
|
91
86
|
@openCopyEditTab="openCopyEditTab"
|
|
92
87
|
></vFormRender>
|
|
93
88
|
</el-tab-pane>
|
|
@@ -146,6 +141,9 @@ export default {
|
|
|
146
141
|
return {
|
|
147
142
|
activeName: "second",
|
|
148
143
|
showEdit: false,
|
|
144
|
+
// 「上一单/下一单」翻单:非多标签(常规页签)模式的导航快照
|
|
145
|
+
firstNavRows: null,
|
|
146
|
+
firstNavIndex: -1,
|
|
149
147
|
formJson: { formConfig: {} },
|
|
150
148
|
formConfig: {},
|
|
151
149
|
showRender: false,
|
|
@@ -297,18 +295,36 @@ export default {
|
|
|
297
295
|
|
|
298
296
|
let dataId = row && row.id ? row.id : null;
|
|
299
297
|
this.dataId = dataId;
|
|
298
|
+
let isAdd = !dataId;
|
|
300
299
|
let formCode = null;
|
|
301
|
-
if (
|
|
300
|
+
if (isAdd) {
|
|
302
301
|
formCode = option?.formCode || this.addFormCode;
|
|
303
302
|
} else {
|
|
304
303
|
formCode = option?.formCode || this.formCode2;
|
|
305
304
|
}
|
|
306
|
-
|
|
307
|
-
|
|
305
|
+
// 新增页签门控:需先启用「列表启用详情多标签」,再叠加 addTabEnabled、新增、配了标题字段
|
|
306
|
+
let addTab =
|
|
307
|
+
multiTabEnabled && formConfig.addTabEnabled && isAdd && tabLabelField;
|
|
308
|
+
if ((multiTabEnabled && dataId) || addTab) {
|
|
309
|
+
// 归一:新增/编辑都走 openEditTab
|
|
310
|
+
// 新增合成唯一 id,让去重(paneKeyName='id')/tabName/paneName 三者对齐
|
|
311
|
+
let key = isAdd
|
|
312
|
+
? "add_" + Date.now() + "_" + Math.random().toString(36).slice(2, 6)
|
|
313
|
+
: dataId;
|
|
314
|
+
let openRow = isAdd
|
|
315
|
+
? { ...row, id: key, [tabLabelField]: "新增" }
|
|
316
|
+
: row;
|
|
317
|
+
this.$refs.xTabs.openEditTab(openRow, param, {
|
|
308
318
|
tabParam: {
|
|
309
319
|
formCode,
|
|
310
320
|
tabLabelField,
|
|
311
|
-
tabName:
|
|
321
|
+
tabName: String(key), // el-tabs 的 name 需为 String,dataId 可能是 Number
|
|
322
|
+
isAdd,
|
|
323
|
+
// 新增时 dataId 必须为 null,避免 vFormRender 把合成 id 当真实单号去 getOne
|
|
324
|
+
...(isAdd ? { dataId: null } : {}),
|
|
325
|
+
// 翻单快照:新增也带(navIndex=-1),保存后把新单插入序列首位
|
|
326
|
+
navRows: option?.navRows || null,
|
|
327
|
+
navIndex: option?.navIndex ?? -1,
|
|
312
328
|
},
|
|
313
329
|
});
|
|
314
330
|
} else {
|
|
@@ -318,6 +334,9 @@ export default {
|
|
|
318
334
|
this.showEditDialog = true;
|
|
319
335
|
this.param = param;
|
|
320
336
|
this.formData = null;
|
|
337
|
+
// 常规页签(非多标签)模式记录翻单快照;新增也记录(navIndex=-1),保存后插入序列首位
|
|
338
|
+
this.firstNavRows = option?.navRows || null;
|
|
339
|
+
this.firstNavIndex = dataId ? option?.navIndex ?? -1 : -1;
|
|
321
340
|
this.$openEditView("showEdit");
|
|
322
341
|
}
|
|
323
342
|
},
|
|
@@ -350,11 +369,145 @@ export default {
|
|
|
350
369
|
reload(...args) {
|
|
351
370
|
this.formData = {};
|
|
352
371
|
this.$reloadHandle(...args);
|
|
372
|
+
// 常规模式新增保存:把新单插入翻单序列首位(navIndex=-1 表示当前为新增未定位)
|
|
373
|
+
let param = args[1];
|
|
374
|
+
let newId = param && param.updateParam ? param.updateParam.dataId : null;
|
|
375
|
+
if (newId && Array.isArray(this.firstNavRows) && this.firstNavIndex === -1) {
|
|
376
|
+
this.firstNavRows = [{ id: newId }, ...this.firstNavRows];
|
|
377
|
+
this.firstNavIndex = 0;
|
|
378
|
+
}
|
|
353
379
|
},
|
|
354
380
|
reload2() {
|
|
355
381
|
this.formData = {};
|
|
356
382
|
this.$reloadHandle(...arguments);
|
|
357
383
|
},
|
|
384
|
+
// 逐级解析真实表单的 formDataModel(target 可能是包裹组件,真实表单在内层 vFormRef 上)
|
|
385
|
+
resolveFormModel(target) {
|
|
386
|
+
return (
|
|
387
|
+
(target && target.formDataModel) ||
|
|
388
|
+
(target && target.$refs && target.$refs.vFormRef
|
|
389
|
+
? target.$refs.vFormRef.formDataModel
|
|
390
|
+
: null) ||
|
|
391
|
+
(target && target.getFormRef && target.getFormRef()
|
|
392
|
+
? target.getFormRef().formDataModel
|
|
393
|
+
: null) ||
|
|
394
|
+
{}
|
|
395
|
+
);
|
|
396
|
+
},
|
|
397
|
+
// 应用保存结果到页签「元数据」:升级编辑态 + 同步标题。不含内容重渲染。
|
|
398
|
+
applyTabSaveResult(tab, dataId, formCode, formModel) {
|
|
399
|
+
// ① 首次新增保存:就地升级本页签为编辑态
|
|
400
|
+
if (tab.isAdd && dataId) {
|
|
401
|
+
tab.data.id = dataId; // 从列表再打开同单号可复用本页签
|
|
402
|
+
tab.dataId = dataId; // 表单不 watch dataId,此处不会触发内容重载
|
|
403
|
+
tab.isAdd = false;
|
|
404
|
+
if (formCode) tab.formCode = formCode;
|
|
405
|
+
// 新增保存:把新单插入翻单序列首位(新数组,不改动列表原 fullData 引用)
|
|
406
|
+
if (Array.isArray(tab.navRows)) {
|
|
407
|
+
tab.navRows = [tab.data, ...tab.navRows];
|
|
408
|
+
tab.navIndex = 0;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
// ② 同步标题为「标签名称字段」最新值;无值则保持原标题,不回退用单号
|
|
412
|
+
let labelField = tab.tabLabelField;
|
|
413
|
+
let labelVal =
|
|
414
|
+
labelField != null &&
|
|
415
|
+
formModel &&
|
|
416
|
+
formModel[labelField] != null &&
|
|
417
|
+
formModel[labelField] !== ""
|
|
418
|
+
? formModel[labelField]
|
|
419
|
+
: null;
|
|
420
|
+
if (labelVal != null) {
|
|
421
|
+
this.$set(tab.data, labelField, labelVal);
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
onEditTabReload(tab, target, param) {
|
|
425
|
+
// 动态页签(新增/编辑)表单保存后回调,tab 直接在作用域内
|
|
426
|
+
this.formData = {};
|
|
427
|
+
let dataId =
|
|
428
|
+
param != null && param.updateParam != null
|
|
429
|
+
? param.updateParam.dataId
|
|
430
|
+
: null;
|
|
431
|
+
let formCode =
|
|
432
|
+
param != null && param.updateParam != null
|
|
433
|
+
? param.updateParam.formCode
|
|
434
|
+
: null;
|
|
435
|
+
this.applyTabSaveResult(tab, dataId, formCode, this.resolveFormModel(target));
|
|
436
|
+
this.$refs.xTabs.reloadTabContent(target, param, tab); // 重载编辑态(内容重渲染)
|
|
437
|
+
},
|
|
438
|
+
// 供「保存并提交」路径调用:只升级当前活动新增页签的元数据,不重渲染详情内容。
|
|
439
|
+
// 目的:保存成功即升级为编辑态(防止提交失败/取消后重复入库),且不多刷一次详情。
|
|
440
|
+
promoteActiveAddTab(dataId, formCode, target) {
|
|
441
|
+
// 常规「first」页签新增(addTabEnabled 关时新增走此)保存后:升级 dataId 为编辑态,
|
|
442
|
+
// 并把新单插入翻单序列首位,使提交后「刷新当前页签」能显示详情。
|
|
443
|
+
if (this.activeName === "first") {
|
|
444
|
+
if (dataId) {
|
|
445
|
+
this.dataId = dataId;
|
|
446
|
+
if (formCode) this.formCode1 = formCode;
|
|
447
|
+
if (Array.isArray(this.firstNavRows) && this.firstNavIndex === -1) {
|
|
448
|
+
this.firstNavRows = [{ id: dataId }, ...this.firstNavRows];
|
|
449
|
+
this.firstNavIndex = 0;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
let xTabs = this.$refs.xTabs;
|
|
455
|
+
if (!xTabs) return;
|
|
456
|
+
let tab = xTabs.tabs.find((t) => t.tabName === xTabs.activeName);
|
|
457
|
+
if (!tab) return;
|
|
458
|
+
this.applyTabSaveResult(tab, dataId, formCode, this.resolveFormModel(target));
|
|
459
|
+
},
|
|
460
|
+
// ===== 上一单/下一单:宿主 API,供详情表单 detail-item 的按钮区调用 =====
|
|
461
|
+
// 返回当前活动详情的翻单快照 {rows, index} —— 兼容多标签页签与常规「first」页签;无快照返回 null。
|
|
462
|
+
getActiveBillNavState() {
|
|
463
|
+
let activeName = this.activeName;
|
|
464
|
+
// 常规「first」页签
|
|
465
|
+
if (activeName === "first") {
|
|
466
|
+
if (
|
|
467
|
+
this.dataId &&
|
|
468
|
+
Array.isArray(this.firstNavRows) &&
|
|
469
|
+
this.firstNavRows.length > 0
|
|
470
|
+
) {
|
|
471
|
+
return { rows: this.firstNavRows, index: this.firstNavIndex };
|
|
472
|
+
}
|
|
473
|
+
return null;
|
|
474
|
+
}
|
|
475
|
+
// 多标签动态编辑页签
|
|
476
|
+
let xTabs = this.$refs.xTabs;
|
|
477
|
+
let tab = xTabs && xTabs.tabs.find((t) => t.tabName === activeName);
|
|
478
|
+
if (
|
|
479
|
+
tab &&
|
|
480
|
+
!tab.isAdd &&
|
|
481
|
+
Array.isArray(tab.navRows) &&
|
|
482
|
+
tab.navRows.length > 0
|
|
483
|
+
) {
|
|
484
|
+
return { rows: tab.navRows, index: tab.navIndex ?? -1, tab };
|
|
485
|
+
}
|
|
486
|
+
return null;
|
|
487
|
+
},
|
|
488
|
+
// 翻单:step = -1 上一单 / +1 下一单,把当前活动详情刷新到相邻单据。
|
|
489
|
+
navigateActiveBill(step) {
|
|
490
|
+
let state = this.getActiveBillNavState();
|
|
491
|
+
if (!state) return;
|
|
492
|
+
let idx = state.index + step;
|
|
493
|
+
if (idx < 0 || idx >= state.rows.length) return; // 到边界不循环
|
|
494
|
+
let newRow = state.rows[idx];
|
|
495
|
+
if (!newRow || !newRow.id) return;
|
|
496
|
+
if (state.tab) {
|
|
497
|
+
// 多标签模式
|
|
498
|
+
let tab = state.tab;
|
|
499
|
+
tab.navIndex = idx;
|
|
500
|
+
tab.data = newRow; // 页签标题取 tab.data[tabLabelField],随之更新
|
|
501
|
+
tab.dataId = newRow.id; // 表单不 watch dataId,靠下方重挂载取数
|
|
502
|
+
this.$refs.xTabs.reloadTabContent(null, null, tab);
|
|
503
|
+
} else {
|
|
504
|
+
// 常规「first」页签模式
|
|
505
|
+
this.firstNavIndex = idx;
|
|
506
|
+
this.dataId = newRow.id;
|
|
507
|
+
this.formData = null;
|
|
508
|
+
this.$openEditView("showEdit"); // toggle 重挂载 → 按新 dataId getOne
|
|
509
|
+
}
|
|
510
|
+
},
|
|
358
511
|
initOtherTabList() {
|
|
359
512
|
if (!this.formJson.formConfig.otherTabEnabled) return;
|
|
360
513
|
this.otherTabList = this.formJson.formConfig.otherTabList
|
|
@@ -2,70 +2,35 @@
|
|
|
2
2
|
<div id="containt">
|
|
3
3
|
<el-tabs v-model="activeName" class="tab-box">
|
|
4
4
|
<el-tab-pane :label="$t1('常规')" name="first">
|
|
5
|
-
<editView
|
|
6
|
-
|
|
7
|
-
visible-key="showEdit"
|
|
8
|
-
:_dataId.sync="dataId"
|
|
9
|
-
:parent-target="_self"
|
|
10
|
-
@reload="$reloadHandle"
|
|
11
|
-
></editView>
|
|
5
|
+
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
|
|
6
|
+
@reload="$reloadHandle"></editView>
|
|
12
7
|
</el-tab-pane>
|
|
13
8
|
<el-tab-pane :label="$t1('列表')" name="second">
|
|
14
9
|
<div class="grid-height">
|
|
15
|
-
<vxe-grid
|
|
16
|
-
|
|
17
|
-
v-bind="vxeOption"
|
|
18
|
-
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
19
|
-
@custom="$vxeTableUtil.customHandle"
|
|
20
|
-
>
|
|
10
|
+
<vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
11
|
+
@custom="$vxeTableUtil.customHandle">
|
|
21
12
|
<template #form>
|
|
22
13
|
<div class="clearfix screen-btns">
|
|
23
14
|
<div class="fl">
|
|
24
|
-
<vxe-button
|
|
25
|
-
|
|
26
|
-
class="button-sty"
|
|
27
|
-
icon="el-icon-plus"
|
|
28
|
-
@click="openEditDialog"
|
|
29
|
-
>
|
|
30
|
-
{{ $t1("新增") }}
|
|
15
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog">
|
|
16
|
+
{{ $t1('新增') }}
|
|
31
17
|
</vxe-button>
|
|
32
|
-
<base-table-export
|
|
33
|
-
:option="{ title: $t1('岗位导出'), targetRef: 'table-m1' }"
|
|
34
|
-
:parent-target="_self"
|
|
35
|
-
/>
|
|
18
|
+
<base-table-export :option="{ title: $t1('岗位导出'), targetRef: 'table-m1'}" :parent-target="_self"/>
|
|
36
19
|
</div>
|
|
37
20
|
<div class="fr">
|
|
38
|
-
<vxe-button
|
|
39
|
-
|
|
40
|
-
class="button-sty"
|
|
41
|
-
@click="resetEvent"
|
|
42
|
-
type="text"
|
|
43
|
-
status="primary"
|
|
44
|
-
plain
|
|
45
|
-
>{{ $t1("重置") }}
|
|
21
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
22
|
+
plain>{{ $t1('重置') }}
|
|
46
23
|
</vxe-button>
|
|
47
|
-
<vxe-button
|
|
48
|
-
|
|
49
|
-
icon="el-icon-search"
|
|
50
|
-
class="button-sty"
|
|
51
|
-
@click="searchEvent"
|
|
52
|
-
>
|
|
53
|
-
{{ $t1("搜索") }}
|
|
24
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
|
25
|
+
{{ $t1('搜索') }}
|
|
54
26
|
</vxe-button>
|
|
55
27
|
</div>
|
|
56
28
|
</div>
|
|
57
|
-
<vxe-form
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
title-width="92px"
|
|
61
|
-
title-align="right"
|
|
62
|
-
:data="formData"
|
|
63
|
-
@submit="searchEvent"
|
|
64
|
-
@reset="searchEvent"
|
|
65
|
-
>
|
|
66
|
-
<vxe-form-item :title="$t1('岗位名称') + ':'" field="name">
|
|
29
|
+
<vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
|
|
30
|
+
@submit="searchEvent" @reset="searchEvent">
|
|
31
|
+
<vxe-form-item :title="$t1('岗位名称')+':'" field="name">
|
|
67
32
|
<template v-slot>
|
|
68
|
-
<el-input v-model="formData.name" size="small" clearable
|
|
33
|
+
<el-input v-model="formData.name" size="small" clearable/>
|
|
69
34
|
</template>
|
|
70
35
|
</vxe-form-item>
|
|
71
36
|
<!-- <vxe-form-item :title="$t1('岗位编码')+':'" field="code">
|
|
@@ -83,18 +48,18 @@
|
|
|
83
48
|
</template>
|
|
84
49
|
|
|
85
50
|
<script>
|
|
86
|
-
import editView from
|
|
51
|
+
import editView from './edit.vue';
|
|
87
52
|
|
|
88
53
|
export default {
|
|
89
|
-
name:
|
|
90
|
-
components: {
|
|
54
|
+
name: 'position:list',
|
|
55
|
+
components: {editView},
|
|
91
56
|
data() {
|
|
92
57
|
return {
|
|
93
|
-
activeName:
|
|
58
|
+
activeName: 'second',
|
|
94
59
|
dataId: 0,
|
|
95
60
|
showEdit: false,
|
|
96
61
|
vxeOption: {},
|
|
97
|
-
formData: {}
|
|
62
|
+
formData: {}
|
|
98
63
|
};
|
|
99
64
|
},
|
|
100
65
|
mounted() {
|
|
@@ -102,85 +67,85 @@ export default {
|
|
|
102
67
|
},
|
|
103
68
|
methods: {
|
|
104
69
|
searchEvent() {
|
|
105
|
-
this.$refs[
|
|
70
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
106
71
|
},
|
|
107
72
|
resetEvent() {
|
|
108
73
|
this.formData = {};
|
|
109
|
-
this.$refs[
|
|
74
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
110
75
|
},
|
|
111
76
|
openEditDialog(id) {
|
|
112
|
-
this.dataId = !id || typeof id ==
|
|
113
|
-
this.activeName =
|
|
114
|
-
this.$openEditView(
|
|
77
|
+
this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
78
|
+
this.activeName = 'first';
|
|
79
|
+
this.$openEditView('showEdit');
|
|
115
80
|
},
|
|
116
81
|
initTableList() {
|
|
117
82
|
let that = this;
|
|
118
83
|
let tableOption = {
|
|
119
84
|
vue: this,
|
|
120
|
-
tableRef:
|
|
121
|
-
tableName:
|
|
122
|
-
path: USER_PREFIX +
|
|
85
|
+
tableRef: 'table-m1',
|
|
86
|
+
tableName: 'basic_position_list-m2',
|
|
87
|
+
path: USER_PREFIX + '/position/listCurrentPage',
|
|
123
88
|
param: () => {
|
|
124
89
|
return this.formData;
|
|
125
90
|
},
|
|
126
91
|
columns: [
|
|
127
|
-
{
|
|
92
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
128
93
|
{
|
|
129
|
-
title: this.$t1(
|
|
130
|
-
field:
|
|
94
|
+
title: this.$t1('岗位名称'),
|
|
95
|
+
field: 'name',
|
|
131
96
|
width: 150,
|
|
132
|
-
fixed:
|
|
97
|
+
fixed: 'left'
|
|
133
98
|
},
|
|
134
99
|
/* {
|
|
135
100
|
field: 'code',
|
|
136
101
|
title: this.$t1('岗位编码'),
|
|
137
102
|
width: 250
|
|
138
103
|
}, */
|
|
139
|
-
{
|
|
104
|
+
{title: this.$t1('所属组织'), field: 'companyName', width: 150},
|
|
140
105
|
{
|
|
141
|
-
field:
|
|
142
|
-
title: this.$t1(
|
|
106
|
+
field: 'enabled',
|
|
107
|
+
title: this.$t1('是否启用'),
|
|
143
108
|
width: 150,
|
|
144
109
|
slots: {
|
|
145
|
-
default: ({
|
|
110
|
+
default: ({row}) => {
|
|
146
111
|
if (row.enabled) {
|
|
147
112
|
return [
|
|
148
113
|
<div class="txt-status">
|
|
149
|
-
<span>{this.$t1(
|
|
150
|
-
</div
|
|
114
|
+
<span>{this.$t1('启用')}</span>
|
|
115
|
+
</div>
|
|
151
116
|
];
|
|
152
117
|
} else {
|
|
153
118
|
return [
|
|
154
119
|
<div class="txt-status disable">
|
|
155
|
-
<span>{this.$t1(
|
|
156
|
-
</div
|
|
120
|
+
<span>{this.$t1('禁用')}</span>
|
|
121
|
+
</div>
|
|
157
122
|
];
|
|
158
123
|
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
161
126
|
},
|
|
162
127
|
{
|
|
163
|
-
field:
|
|
164
|
-
title: this.$t1(
|
|
165
|
-
width: 150
|
|
128
|
+
field: 'createDate',
|
|
129
|
+
title: this.$t1('创建时间'),
|
|
130
|
+
width: 150
|
|
166
131
|
},
|
|
167
132
|
{
|
|
168
|
-
field:
|
|
169
|
-
title: this.$t1(
|
|
170
|
-
width: 150
|
|
133
|
+
field: '_createBy',
|
|
134
|
+
title: this.$t1('创建人'),
|
|
135
|
+
width: 150
|
|
171
136
|
},
|
|
172
137
|
{
|
|
173
|
-
field:
|
|
174
|
-
title: this.$t1(
|
|
175
|
-
width: 150
|
|
138
|
+
field: '_modifyBy',
|
|
139
|
+
title: this.$t1('更新人'),
|
|
140
|
+
width: 150
|
|
176
141
|
},
|
|
177
142
|
{
|
|
178
143
|
width: 47,
|
|
179
|
-
fixed:
|
|
180
|
-
title:
|
|
144
|
+
fixed: 'right',
|
|
145
|
+
title: '',
|
|
181
146
|
sortable: false,
|
|
182
147
|
slots: {
|
|
183
|
-
default: ({
|
|
148
|
+
default: ({row}) => {
|
|
184
149
|
return [
|
|
185
150
|
<div>
|
|
186
151
|
<a
|
|
@@ -190,24 +155,19 @@ export default {
|
|
|
190
155
|
this.openEditDialog(row.id);
|
|
191
156
|
}}
|
|
192
157
|
>
|
|
193
|
-
<el-tooltip
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
content={this.$t1("查看")}
|
|
197
|
-
placement="top"
|
|
198
|
-
popper-class="tooltip-skin"
|
|
199
|
-
>
|
|
200
|
-
<i class="el-icon-edit" />
|
|
158
|
+
<el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
|
|
159
|
+
popper-class="tooltip-skin">
|
|
160
|
+
<i class="el-icon-edit"/>
|
|
201
161
|
</el-tooltip>
|
|
202
162
|
</a>
|
|
203
|
-
</div
|
|
163
|
+
</div>
|
|
204
164
|
];
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]
|
|
209
169
|
};
|
|
210
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(
|
|
170
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
211
171
|
this.vxeOption = opts;
|
|
212
172
|
});
|
|
213
173
|
},
|
|
@@ -215,14 +175,14 @@ export default {
|
|
|
215
175
|
let that = this;
|
|
216
176
|
that.$excelImport({
|
|
217
177
|
prefix: USER_PREFIX,
|
|
218
|
-
excel: USER_PREFIX +
|
|
178
|
+
excel: USER_PREFIX + '/excelTemplate/position/position.xlsx',
|
|
219
179
|
multi: false,
|
|
220
|
-
saveUrl: USER_PREFIX +
|
|
180
|
+
saveUrl: USER_PREFIX + '/position/save',
|
|
221
181
|
callback: () => {
|
|
222
182
|
that.searchEvent();
|
|
223
|
-
}
|
|
183
|
+
}
|
|
224
184
|
});
|
|
225
|
-
}
|
|
226
|
-
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
227
187
|
};
|
|
228
188
|
</script>
|