cloud-web-corejs 1.0.54-dev.575 → 1.0.54-dev.577
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/table/index - /345/211/257/346/234/254.js" +1009 -0
- package/src/components/table/index.js +1088 -1
- package/src/components/table/vxeFilter/index.js +154 -1
- package/src/components/table/vxeFilter/mixin.js +303 -1
- package/src/views/user/position/list.vue +112 -68
|
@@ -2,35 +2,70 @@
|
|
|
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
|
-
|
|
5
|
+
<editView
|
|
6
|
+
v-if="showEdit"
|
|
7
|
+
visible-key="showEdit"
|
|
8
|
+
:_dataId.sync="dataId"
|
|
9
|
+
:parent-target="_self"
|
|
10
|
+
@reload="$reloadHandle"
|
|
11
|
+
></editView>
|
|
7
12
|
</el-tab-pane>
|
|
8
13
|
<el-tab-pane :label="$t1('列表')" name="second">
|
|
9
14
|
<div class="grid-height">
|
|
10
|
-
<vxe-grid
|
|
11
|
-
|
|
15
|
+
<vxe-grid
|
|
16
|
+
ref="table-m1"
|
|
17
|
+
v-bind="vxeOption"
|
|
18
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
19
|
+
@custom="$vxeTableUtil.customHandle"
|
|
20
|
+
>
|
|
12
21
|
<template #form>
|
|
13
22
|
<div class="clearfix screen-btns">
|
|
14
23
|
<div class="fl">
|
|
15
|
-
<vxe-button
|
|
16
|
-
|
|
24
|
+
<vxe-button
|
|
25
|
+
status="primary"
|
|
26
|
+
class="button-sty"
|
|
27
|
+
icon="el-icon-plus"
|
|
28
|
+
@click="openEditDialog"
|
|
29
|
+
>
|
|
30
|
+
{{ $t1("新增") }}
|
|
17
31
|
</vxe-button>
|
|
18
|
-
<base-table-export
|
|
32
|
+
<base-table-export
|
|
33
|
+
:option="{ title: $t1('岗位导出'), targetRef: 'table-m1' }"
|
|
34
|
+
:parent-target="_self"
|
|
35
|
+
/>
|
|
19
36
|
</div>
|
|
20
37
|
<div class="fr">
|
|
21
|
-
<vxe-button
|
|
22
|
-
|
|
38
|
+
<vxe-button
|
|
39
|
+
icon="el-icon-brush"
|
|
40
|
+
class="button-sty"
|
|
41
|
+
@click="resetEvent"
|
|
42
|
+
type="text"
|
|
43
|
+
status="primary"
|
|
44
|
+
plain
|
|
45
|
+
>{{ $t1("重置") }}
|
|
23
46
|
</vxe-button>
|
|
24
|
-
<vxe-button
|
|
25
|
-
|
|
47
|
+
<vxe-button
|
|
48
|
+
status="warning"
|
|
49
|
+
icon="el-icon-search"
|
|
50
|
+
class="button-sty"
|
|
51
|
+
@click="searchEvent"
|
|
52
|
+
>
|
|
53
|
+
{{ $t1("搜索") }}
|
|
26
54
|
</vxe-button>
|
|
27
55
|
</div>
|
|
28
56
|
</div>
|
|
29
|
-
<vxe-form
|
|
30
|
-
|
|
31
|
-
|
|
57
|
+
<vxe-form
|
|
58
|
+
ref="form"
|
|
59
|
+
class="screen-box"
|
|
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">
|
|
32
67
|
<template v-slot>
|
|
33
|
-
<el-input v-model="formData.name" size="small" clearable/>
|
|
68
|
+
<el-input v-model="formData.name" size="small" clearable />
|
|
34
69
|
</template>
|
|
35
70
|
</vxe-form-item>
|
|
36
71
|
<!-- <vxe-form-item :title="$t1('岗位编码')+':'" field="code">
|
|
@@ -48,18 +83,18 @@
|
|
|
48
83
|
</template>
|
|
49
84
|
|
|
50
85
|
<script>
|
|
51
|
-
import editView from
|
|
86
|
+
import editView from "./edit.vue";
|
|
52
87
|
|
|
53
88
|
export default {
|
|
54
|
-
name:
|
|
55
|
-
components: {editView},
|
|
89
|
+
name: "position:list",
|
|
90
|
+
components: { editView },
|
|
56
91
|
data() {
|
|
57
92
|
return {
|
|
58
|
-
activeName:
|
|
93
|
+
activeName: "second",
|
|
59
94
|
dataId: 0,
|
|
60
95
|
showEdit: false,
|
|
61
96
|
vxeOption: {},
|
|
62
|
-
formData: {}
|
|
97
|
+
formData: {},
|
|
63
98
|
};
|
|
64
99
|
},
|
|
65
100
|
mounted() {
|
|
@@ -67,85 +102,89 @@ export default {
|
|
|
67
102
|
},
|
|
68
103
|
methods: {
|
|
69
104
|
searchEvent() {
|
|
70
|
-
this.$refs[
|
|
105
|
+
this.$refs["table-m1"].commitProxy("reload");
|
|
71
106
|
},
|
|
72
107
|
resetEvent() {
|
|
73
108
|
this.formData = {};
|
|
74
|
-
this.$refs[
|
|
109
|
+
this.$refs["table-m1"].commitProxy("reload");
|
|
75
110
|
},
|
|
76
111
|
openEditDialog(id) {
|
|
77
|
-
this.dataId = !id || typeof id ==
|
|
78
|
-
this.activeName =
|
|
79
|
-
this.$openEditView(
|
|
112
|
+
this.dataId = !id || typeof id == "object" ? 0 : id;
|
|
113
|
+
this.activeName = "first";
|
|
114
|
+
this.$openEditView("showEdit");
|
|
80
115
|
},
|
|
81
116
|
initTableList() {
|
|
82
117
|
let that = this;
|
|
83
118
|
let tableOption = {
|
|
84
119
|
vue: this,
|
|
85
|
-
tableRef:
|
|
86
|
-
tableName:
|
|
87
|
-
path: USER_PREFIX +
|
|
120
|
+
tableRef: "table-m1",
|
|
121
|
+
tableName: "basic_position_list-m2",
|
|
122
|
+
path: USER_PREFIX + "/position/listCurrentPage",
|
|
88
123
|
param: () => {
|
|
89
124
|
return this.formData;
|
|
90
125
|
},
|
|
91
126
|
columns: [
|
|
92
|
-
{type:
|
|
127
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
93
128
|
{
|
|
94
|
-
title: this.$t1(
|
|
95
|
-
field:
|
|
129
|
+
title: this.$t1("岗位名称"),
|
|
130
|
+
field: "name",
|
|
96
131
|
width: 150,
|
|
97
|
-
fixed:
|
|
132
|
+
fixed: "left",
|
|
98
133
|
},
|
|
99
134
|
/* {
|
|
100
135
|
field: 'code',
|
|
101
136
|
title: this.$t1('岗位编码'),
|
|
102
137
|
width: 250
|
|
103
138
|
}, */
|
|
104
|
-
{title: this.$t1(
|
|
139
|
+
{ title: this.$t1("所属组织"), field: "companyName", width: 150 },
|
|
105
140
|
{
|
|
106
|
-
field:
|
|
107
|
-
title: this.$t1(
|
|
141
|
+
field: "enabled",
|
|
142
|
+
title: this.$t1("是否启用"),
|
|
108
143
|
width: 150,
|
|
109
144
|
slots: {
|
|
110
|
-
default: ({row}) => {
|
|
145
|
+
default: ({ row }) => {
|
|
111
146
|
if (row.enabled) {
|
|
112
147
|
return [
|
|
113
148
|
<div class="txt-status">
|
|
114
|
-
<span>{this.$t1(
|
|
115
|
-
</div
|
|
149
|
+
<span>{this.$t1("启用")}</span>
|
|
150
|
+
</div>,
|
|
116
151
|
];
|
|
117
152
|
} else {
|
|
118
153
|
return [
|
|
119
154
|
<div class="txt-status disable">
|
|
120
|
-
<span>{this.$t1(
|
|
121
|
-
</div
|
|
155
|
+
<span>{this.$t1("禁用")}</span>
|
|
156
|
+
</div>,
|
|
122
157
|
];
|
|
123
158
|
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
159
|
+
},
|
|
160
|
+
},
|
|
126
161
|
},
|
|
127
162
|
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
163
|
+
title: this.$t1("修改信息"),
|
|
164
|
+
field: "modifyInfo",
|
|
165
|
+
children: [
|
|
166
|
+
{ title: this.$t1("更新时间"), field: "modifyDate", width: 150 },
|
|
167
|
+
{ title: this.$t1("更新人"), field: "_modifyBy", width: 150 },
|
|
168
|
+
],
|
|
131
169
|
},
|
|
132
170
|
{
|
|
133
|
-
field:
|
|
134
|
-
title: this.$t1(
|
|
135
|
-
width: 150
|
|
171
|
+
field: "createDate",
|
|
172
|
+
title: this.$t1("创建时间"),
|
|
173
|
+
width: 150,
|
|
136
174
|
},
|
|
137
175
|
{
|
|
138
|
-
field:
|
|
139
|
-
title: this.$t1(
|
|
140
|
-
width: 150
|
|
176
|
+
field: "_createBy",
|
|
177
|
+
title: this.$t1("创建人"),
|
|
178
|
+
width: 150,
|
|
141
179
|
},
|
|
180
|
+
|
|
142
181
|
{
|
|
143
182
|
width: 47,
|
|
144
|
-
fixed:
|
|
145
|
-
title:
|
|
183
|
+
fixed: "right",
|
|
184
|
+
title: "",
|
|
146
185
|
sortable: false,
|
|
147
186
|
slots: {
|
|
148
|
-
default: ({row}) => {
|
|
187
|
+
default: ({ row }) => {
|
|
149
188
|
return [
|
|
150
189
|
<div>
|
|
151
190
|
<a
|
|
@@ -155,19 +194,24 @@ export default {
|
|
|
155
194
|
this.openEditDialog(row.id);
|
|
156
195
|
}}
|
|
157
196
|
>
|
|
158
|
-
<el-tooltip
|
|
159
|
-
|
|
160
|
-
|
|
197
|
+
<el-tooltip
|
|
198
|
+
enterable={false}
|
|
199
|
+
effect="dark"
|
|
200
|
+
content={this.$t1("查看")}
|
|
201
|
+
placement="top"
|
|
202
|
+
popper-class="tooltip-skin"
|
|
203
|
+
>
|
|
204
|
+
<i class="el-icon-edit" />
|
|
161
205
|
</el-tooltip>
|
|
162
206
|
</a>
|
|
163
|
-
</div
|
|
207
|
+
</div>,
|
|
164
208
|
];
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
]
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
],
|
|
169
213
|
};
|
|
170
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
214
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
171
215
|
this.vxeOption = opts;
|
|
172
216
|
});
|
|
173
217
|
},
|
|
@@ -175,14 +219,14 @@ export default {
|
|
|
175
219
|
let that = this;
|
|
176
220
|
that.$excelImport({
|
|
177
221
|
prefix: USER_PREFIX,
|
|
178
|
-
excel: USER_PREFIX +
|
|
222
|
+
excel: USER_PREFIX + "/excelTemplate/position/position.xlsx",
|
|
179
223
|
multi: false,
|
|
180
|
-
saveUrl: USER_PREFIX +
|
|
224
|
+
saveUrl: USER_PREFIX + "/position/save",
|
|
181
225
|
callback: () => {
|
|
182
226
|
that.searchEvent();
|
|
183
|
-
}
|
|
227
|
+
},
|
|
184
228
|
});
|
|
185
|
-
}
|
|
186
|
-
}
|
|
229
|
+
},
|
|
230
|
+
},
|
|
187
231
|
};
|
|
188
232
|
</script>
|