cloud-web-corejs 1.0.222 → 1.0.225
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
CHANGED
package/src/api/user.js
CHANGED
|
@@ -1,107 +1,115 @@
|
|
|
1
|
-
import request from
|
|
1
|
+
import request from "@base/utils/request";
|
|
2
2
|
|
|
3
3
|
export function loginYx(option) {
|
|
4
4
|
return request({
|
|
5
|
-
url: USER_PREFIX +
|
|
6
|
-
method:
|
|
7
|
-
...option
|
|
8
|
-
})
|
|
5
|
+
url: USER_PREFIX + "/auth/login",
|
|
6
|
+
method: "post",
|
|
7
|
+
...option,
|
|
8
|
+
});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function getInfo(option) {
|
|
12
12
|
return request({
|
|
13
|
-
url: USER_PREFIX +
|
|
14
|
-
method:
|
|
15
|
-
...option
|
|
16
|
-
})
|
|
13
|
+
url: USER_PREFIX + "/user/currentUser",
|
|
14
|
+
method: "post",
|
|
15
|
+
...option,
|
|
16
|
+
});
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export function logout(option) {
|
|
20
20
|
return request({
|
|
21
|
-
url: USER_PREFIX +
|
|
22
|
-
method:
|
|
23
|
-
...option
|
|
24
|
-
})
|
|
21
|
+
url: USER_PREFIX + "/auth/logout",
|
|
22
|
+
method: "post",
|
|
23
|
+
...option,
|
|
24
|
+
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export function saveAccessMenuLog(option) {
|
|
28
28
|
return request({
|
|
29
|
-
url: USER_PREFIX +
|
|
30
|
-
method:
|
|
31
|
-
...option
|
|
32
|
-
})
|
|
29
|
+
url: USER_PREFIX + "/access_log/saveAccessMenuLog",
|
|
30
|
+
method: "post",
|
|
31
|
+
...option,
|
|
32
|
+
});
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export function getLoginTp(duration, option) {
|
|
36
36
|
return request({
|
|
37
|
-
url: USER_PREFIX +
|
|
38
|
-
method:
|
|
37
|
+
url: USER_PREFIX + "/thirdparty_auth/getTp",
|
|
38
|
+
method: "post",
|
|
39
39
|
isLoading: true,
|
|
40
|
-
data: {duration: duration},
|
|
41
|
-
...option
|
|
42
|
-
})
|
|
40
|
+
data: { duration: duration },
|
|
41
|
+
...option,
|
|
42
|
+
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export function loginByTp(tp, option) {
|
|
46
46
|
return request({
|
|
47
|
-
url: USER_PREFIX +
|
|
48
|
-
method:
|
|
47
|
+
url: USER_PREFIX + "/thirdparty_auth/login",
|
|
48
|
+
method: "post",
|
|
49
49
|
isLoading: true,
|
|
50
50
|
useToken: false,
|
|
51
|
-
data: {tp: tp},
|
|
52
|
-
...option
|
|
53
|
-
})
|
|
51
|
+
data: { tp: tp },
|
|
52
|
+
...option,
|
|
53
|
+
});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export function getParameterVauleByCode(option) {
|
|
57
57
|
//初始化外部用户编码
|
|
58
58
|
return request({
|
|
59
|
-
url: USER_PREFIX +
|
|
60
|
-
method:
|
|
61
|
-
...option
|
|
59
|
+
url: USER_PREFIX + "/system_parameter/getByCode",
|
|
60
|
+
method: "post",
|
|
61
|
+
...option,
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export function languageSettingListPage(option) {
|
|
66
66
|
//获取语种
|
|
67
67
|
return request({
|
|
68
|
-
url: USER_PREFIX +
|
|
69
|
-
method:
|
|
68
|
+
url: USER_PREFIX + "/language_setting/listPage",
|
|
69
|
+
method: "post",
|
|
70
70
|
data: {
|
|
71
|
-
enabled: true
|
|
71
|
+
enabled: true,
|
|
72
72
|
},
|
|
73
|
-
...option
|
|
73
|
+
...option,
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export function getBdEnv(option) {
|
|
78
78
|
return request({
|
|
79
79
|
url: USER_PREFIX + `/form_develop/getBdEnv`,
|
|
80
|
-
method:
|
|
81
|
-
...option
|
|
82
|
-
})
|
|
80
|
+
method: "post",
|
|
81
|
+
...option,
|
|
82
|
+
});
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export function getBdFlag(option) {
|
|
86
86
|
return request({
|
|
87
87
|
url: USER_PREFIX + `/form_develop/getBdFlag`,
|
|
88
|
-
method:
|
|
89
|
-
...option
|
|
90
|
-
})
|
|
88
|
+
method: "post",
|
|
89
|
+
...option,
|
|
90
|
+
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
export function getFileServerInfo(option){
|
|
93
|
+
export function getFileServerInfo(option) {
|
|
94
94
|
return request({
|
|
95
95
|
url: USER_PREFIX + "/logic_param/getFileServerInfo",
|
|
96
96
|
method: "post",
|
|
97
|
-
...option
|
|
98
|
-
})
|
|
97
|
+
...option,
|
|
98
|
+
});
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
export function getLoginConfig(option){
|
|
101
|
+
export function getLoginConfig(option) {
|
|
102
102
|
return request({
|
|
103
103
|
url: USER_PREFIX + "/login_page/readData",
|
|
104
104
|
method: "post",
|
|
105
|
-
...option
|
|
106
|
-
})
|
|
105
|
+
...option,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function getLogicParamValue(option) {
|
|
110
|
+
return request({
|
|
111
|
+
url: USER_PREFIX + "/logic_param/getParamValue",
|
|
112
|
+
method: "post",
|
|
113
|
+
...option,
|
|
114
|
+
});
|
|
107
115
|
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:title="$t1('用户列表')"
|
|
4
|
+
:append-to-body="true"
|
|
5
|
+
:modal-append-to-body="true"
|
|
6
|
+
:close-on-click-modal="falseValue"
|
|
7
|
+
:visible.sync="showDialog"
|
|
8
|
+
:modal="falseValue"
|
|
9
|
+
custom-class="dialog-style list-dialog dialog-checkbox pd_0"
|
|
10
|
+
width="1200px"
|
|
11
|
+
@close="dialogClose"
|
|
12
|
+
v-el-drag-dialog
|
|
13
|
+
v-el-dialog-center
|
|
14
|
+
>
|
|
15
|
+
<div class="cont" style="height: 65vh">
|
|
16
|
+
<vxe-grid
|
|
17
|
+
class="is-pointer"
|
|
18
|
+
ref="table-m1"
|
|
19
|
+
v-bind="vxeOption"
|
|
20
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
21
|
+
@custom="$vxeTableUtil.customHandle"
|
|
22
|
+
@checkbox-change="addDataTable"
|
|
23
|
+
@checkbox-all="checkAll"
|
|
24
|
+
@cell-dblclick="checkWithSubmit"
|
|
25
|
+
>
|
|
26
|
+
<template #form>
|
|
27
|
+
<tableForm
|
|
28
|
+
:formData.sync="formData"
|
|
29
|
+
@searchEvent="searchEvent"
|
|
30
|
+
@resetEvent="resetEvent"
|
|
31
|
+
>
|
|
32
|
+
<template #buttonRight>
|
|
33
|
+
<vxe-button
|
|
34
|
+
icon="el-icon-brush"
|
|
35
|
+
class="button-sty"
|
|
36
|
+
@click="resetEvent"
|
|
37
|
+
type="text"
|
|
38
|
+
status="primary"
|
|
39
|
+
plain
|
|
40
|
+
>{{ $t1("重置") }}
|
|
41
|
+
</vxe-button>
|
|
42
|
+
<vxe-button
|
|
43
|
+
status="warning"
|
|
44
|
+
icon="el-icon-search"
|
|
45
|
+
class="button-sty"
|
|
46
|
+
@click="searchEvent"
|
|
47
|
+
>
|
|
48
|
+
{{ $t1("搜索") }}
|
|
49
|
+
</vxe-button>
|
|
50
|
+
</template>
|
|
51
|
+
<template #saleOrgName>
|
|
52
|
+
<vxe-form-item :title="$t1('机构') + ':'">
|
|
53
|
+
<template v-slot>
|
|
54
|
+
<el-input
|
|
55
|
+
class="search-input"
|
|
56
|
+
v-model="formData.saleOrgName"
|
|
57
|
+
clearable
|
|
58
|
+
@clear="
|
|
59
|
+
formData.saleOrgId = null;
|
|
60
|
+
formData.saleOrgName = null;
|
|
61
|
+
"
|
|
62
|
+
v-el-readonly
|
|
63
|
+
>
|
|
64
|
+
<i
|
|
65
|
+
slot="suffix"
|
|
66
|
+
class="el-input__icon el-icon-search"
|
|
67
|
+
@click="showSaleOrgDialog = true"
|
|
68
|
+
></i>
|
|
69
|
+
</el-input>
|
|
70
|
+
</template>
|
|
71
|
+
</vxe-form-item>
|
|
72
|
+
</template>
|
|
73
|
+
</tableForm>
|
|
74
|
+
</template>
|
|
75
|
+
</vxe-grid>
|
|
76
|
+
</div>
|
|
77
|
+
<label id="labBtn" class="transverse">
|
|
78
|
+
<div class="icon">
|
|
79
|
+
<i class="el-icon-more"></i>
|
|
80
|
+
<i class="el-icon-more"></i>
|
|
81
|
+
</div>
|
|
82
|
+
</label>
|
|
83
|
+
<div class="multipleChoice">
|
|
84
|
+
<el-tooltip
|
|
85
|
+
:enterable="false"
|
|
86
|
+
effect="dark"
|
|
87
|
+
:content="$t1('全部删除')"
|
|
88
|
+
placement="top"
|
|
89
|
+
><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a
|
|
90
|
+
></el-tooltip>
|
|
91
|
+
<div class="list">
|
|
92
|
+
<div class="item" v-for="(checkRow, index) in checkRows" :key="index">
|
|
93
|
+
<p>{{ getCheckLabel(checkRow, "nickName") }}</p>
|
|
94
|
+
<a class="el-icon-close" @click="clearTable1Select(index)"></a>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<span slot="footer" class="dialog-footer">
|
|
99
|
+
<span class="fl tips" v-if="!selectMulti">{{
|
|
100
|
+
$t1("注:双击确认选择(单选)")
|
|
101
|
+
}}</span>
|
|
102
|
+
<el-button type="primary" plain class="button-sty" @click="dialogClose">
|
|
103
|
+
<i class="el-icon-close el-icon"></i>
|
|
104
|
+
{{ $t1("取 消") }}
|
|
105
|
+
</el-button>
|
|
106
|
+
<el-button type="primary" @click="dialogPrimary" class="button-sty">
|
|
107
|
+
<i class="el-icon-check el-icon"></i>
|
|
108
|
+
{{ $t1("确 定") }}
|
|
109
|
+
</el-button>
|
|
110
|
+
</span>
|
|
111
|
+
<saleOrgDialog
|
|
112
|
+
v-if="showSaleOrgDialog"
|
|
113
|
+
:visiable.sync="showSaleOrgDialog"
|
|
114
|
+
:multi="false"
|
|
115
|
+
@confirm="confirmSaleOrgDialog"
|
|
116
|
+
></saleOrgDialog>
|
|
117
|
+
</el-dialog>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script>
|
|
121
|
+
import { selectDialogMixins } from "@base/mixins/selectDialog/index.js";
|
|
122
|
+
import tableForm from "@base/components/table/tableForm.vue";
|
|
123
|
+
import saleOrgDialog from "@base/views/user/sale_org/dialog.vue";
|
|
124
|
+
import { getLogicParamValue } from "@base/api/user";
|
|
125
|
+
export default {
|
|
126
|
+
components: { tableForm, saleOrgDialog },
|
|
127
|
+
props: ["visiable", "multi", "rows", "param"],
|
|
128
|
+
mixins: [selectDialogMixins],
|
|
129
|
+
created() {
|
|
130
|
+
this.initSetting();
|
|
131
|
+
if (this.param) {
|
|
132
|
+
if (this.param.userType !== null) {
|
|
133
|
+
this.userType = this.param.userType;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
async mounted() {
|
|
138
|
+
await getLogicParamValue({
|
|
139
|
+
data: { paramCode: "chatUserQueryPath" },
|
|
140
|
+
success: (res) => {
|
|
141
|
+
let value = res?.objx;
|
|
142
|
+
if (value) {
|
|
143
|
+
this.chatUserQueryPath = value;
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
this.initTableM1();
|
|
148
|
+
},
|
|
149
|
+
data() {
|
|
150
|
+
var that = this;
|
|
151
|
+
return {
|
|
152
|
+
showDialog: true,
|
|
153
|
+
falseValue: false,
|
|
154
|
+
userType: 0,
|
|
155
|
+
formData: {
|
|
156
|
+
saleOrgId: "",
|
|
157
|
+
saleOrgName: "",
|
|
158
|
+
},
|
|
159
|
+
selectMulti: true,
|
|
160
|
+
vxeOption: {},
|
|
161
|
+
showSaleOrgDialog: false,
|
|
162
|
+
chatUserQueryPath: null,
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
initTableM1() {
|
|
167
|
+
let path = USER_PREFIX + "/user/listCurrentPage";
|
|
168
|
+
if (this.chatUserQueryPath) {
|
|
169
|
+
path = this.chatUserQueryPath;
|
|
170
|
+
}
|
|
171
|
+
var that = this;
|
|
172
|
+
let tableOption = {
|
|
173
|
+
vue: that,
|
|
174
|
+
tableRef: "table-m1",
|
|
175
|
+
tableName: "basic_user_dialog-m1",
|
|
176
|
+
path: path,
|
|
177
|
+
param: () => {
|
|
178
|
+
return {
|
|
179
|
+
enabled: true,
|
|
180
|
+
...this.formData,
|
|
181
|
+
...this.param,
|
|
182
|
+
};
|
|
183
|
+
},
|
|
184
|
+
searchColumns: [
|
|
185
|
+
{
|
|
186
|
+
title: this.$t1("登录名"),
|
|
187
|
+
field: "loginAccount",
|
|
188
|
+
type: "input",
|
|
189
|
+
common: true,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
title: this.$t1("姓名"),
|
|
193
|
+
field: "nickName",
|
|
194
|
+
type: "input",
|
|
195
|
+
common: true,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
title: this.$t1("机构"),
|
|
199
|
+
field: "saleOrgName",
|
|
200
|
+
type: "input",
|
|
201
|
+
common: true,
|
|
202
|
+
slot: "saleOrgName",
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
config: {
|
|
206
|
+
checkboxConfig: {
|
|
207
|
+
checkStrictly: true,
|
|
208
|
+
showHeader: this.selectMulti,
|
|
209
|
+
trigger: "row",
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
columns: [
|
|
213
|
+
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
214
|
+
{
|
|
215
|
+
title: this.$t1("登录名"),
|
|
216
|
+
field: "loginAccount",
|
|
217
|
+
width: 250,
|
|
218
|
+
fixed: "left",
|
|
219
|
+
},
|
|
220
|
+
{ field: "nickName", title: this.$t1("姓名"), width: 150 },
|
|
221
|
+
{
|
|
222
|
+
field: "enabled",
|
|
223
|
+
title: this.$t1("是否启用"),
|
|
224
|
+
width: 150,
|
|
225
|
+
slots: {
|
|
226
|
+
default: ({ row }) => {
|
|
227
|
+
if (row.enabled) {
|
|
228
|
+
return [<div class="txt-status">{this.$t1("启用")}</div>];
|
|
229
|
+
} else {
|
|
230
|
+
return [<div class="txt-status s-3">{this.$t1("禁用")}</div>];
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{ field: "roleNames", title: this.$t1("角色"), width: 150 },
|
|
236
|
+
{ field: "saleOrgNames", title: this.$t1("机构"), width: 150 },
|
|
237
|
+
{ field: "zipCode", title: this.$t1("邮编"), width: 150 },
|
|
238
|
+
{ field: "address", title: this.$t1("地址"), width: 150 },
|
|
239
|
+
{
|
|
240
|
+
field: "gender",
|
|
241
|
+
title: this.$t1("性别"),
|
|
242
|
+
width: 150,
|
|
243
|
+
slots: {
|
|
244
|
+
default: ({ row }) => {
|
|
245
|
+
var val = row.gender;
|
|
246
|
+
if (val == 1) {
|
|
247
|
+
return this.$t1("男");
|
|
248
|
+
} else if (val == 2) {
|
|
249
|
+
return this.$t1("女");
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{ field: "companyNames", title: this.$t1("所属组织"), width: 250 },
|
|
255
|
+
{ field: "createBy", title: this.$t1("创建人"), width: 150 },
|
|
256
|
+
{ field: "modifyBy", title: this.$t1("更新人"), width: 150 },
|
|
257
|
+
{ field: "modifyDate", title: this.$t1("更新时间"), width: 150 },
|
|
258
|
+
{ field: "createDate", title: this.$t1("创建时间"), width: 150 },
|
|
259
|
+
{
|
|
260
|
+
width: 47,
|
|
261
|
+
fixed: "right",
|
|
262
|
+
title: "",
|
|
263
|
+
sortable: false,
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
};
|
|
267
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
268
|
+
that.vxeOption = opts;
|
|
269
|
+
});
|
|
270
|
+
},
|
|
271
|
+
confirmSaleOrgDialog(rows) {
|
|
272
|
+
if (rows.length) {
|
|
273
|
+
let row = rows[0];
|
|
274
|
+
this.$set(this.formData, "saleOrgId", row.id);
|
|
275
|
+
this.$set(this.formData, "saleOrgName", row.name);
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
</script>
|
|
@@ -632,7 +632,7 @@ export default {
|
|
|
632
632
|
storageType: "user",
|
|
633
633
|
data: () => {
|
|
634
634
|
this.handleData();
|
|
635
|
-
return this.
|
|
635
|
+
return this.getReqFormData();
|
|
636
636
|
},
|
|
637
637
|
chooseConfirm: (tempStorageData) => {
|
|
638
638
|
this.user = tempStorageData;
|
|
@@ -696,6 +696,22 @@ export default {
|
|
|
696
696
|
this.showExtendedProperties = true;
|
|
697
697
|
}
|
|
698
698
|
},
|
|
699
|
+
getReqFormData() {
|
|
700
|
+
let userCompanyInfoDTOs = this.user.userCompanyInfoDTOs.map((item) => {
|
|
701
|
+
return {
|
|
702
|
+
...item,
|
|
703
|
+
saleOrgGridOption: null,
|
|
704
|
+
roleGridOption: null,
|
|
705
|
+
saleOrgData: null,
|
|
706
|
+
roleData: null,
|
|
707
|
+
};
|
|
708
|
+
});
|
|
709
|
+
let formData = {
|
|
710
|
+
...this.user,
|
|
711
|
+
userCompanyInfoDTOs,
|
|
712
|
+
};
|
|
713
|
+
return formData;
|
|
714
|
+
},
|
|
699
715
|
saveData() {
|
|
700
716
|
let companyCode = this.companyInfo.companyCode;
|
|
701
717
|
this.handleData();
|
|
@@ -718,20 +734,7 @@ export default {
|
|
|
718
734
|
if (valid) {
|
|
719
735
|
this.$baseConfirm(this.$t1("您确定要保存吗?")).then(() => {
|
|
720
736
|
var url = USER_PREFIX + (this.isEdit ? "/user/update" : "/user/save");
|
|
721
|
-
let
|
|
722
|
-
return {
|
|
723
|
-
...item,
|
|
724
|
-
saleOrgGridOption: null,
|
|
725
|
-
roleGridOption: null,
|
|
726
|
-
saleOrgData: null,
|
|
727
|
-
roleData: null,
|
|
728
|
-
};
|
|
729
|
-
});
|
|
730
|
-
let formData = {
|
|
731
|
-
...this.user,
|
|
732
|
-
userCompanyInfoDTOs,
|
|
733
|
-
};
|
|
734
|
-
|
|
737
|
+
let formData = this.getReqFormData();
|
|
735
738
|
this.$http({
|
|
736
739
|
url: url,
|
|
737
740
|
method: `post`,
|