@newview/permission-service 1.2.10 → 1.2.12

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.
@@ -5,416 +5,15 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import { BaseInstance } from "@newview/base-vue";
8
- import { defineComponent, ref, reactive, onMounted, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createTextVNode, watch, createElementBlock, renderSlot, normalizeClass, withDirectives, vShow, toDisplayString, Fragment, renderList, pushScopeId, popScopeId, nextTick, onUnmounted, createCommentVNode, createSlots, withModifiers, onBeforeUnmount, h, watchEffect, normalizeStyle } from "vue";
9
- import { BaseApi, Methods, QueryWrapper, BaseOldApi, storageInfo } from "@newview/infrastructure";
10
- import { utilities } from "@newview/tools";
8
+ import { defineComponent, ref, reactive, onMounted, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createTextVNode, nextTick, toDisplayString, createElementBlock, Fragment, renderList, withDirectives, vShow, pushScopeId, popScopeId, onUnmounted, createCommentVNode, watch, createSlots, normalizeClass, withModifiers, onBeforeUnmount, h, watchEffect, normalizeStyle } from "vue";
9
+ import { PlatformApi, PlatformGroupApi, ModuleApi, RoleApi, RoleModuleApi, InstitutionRoleApi, InstitutionTypeApi, InstitutioninforApi, InstitutionPlatformApi, InstitutionTreeApi, EnterpriseApi, LoginLogApi, UserinforApi, InstitutionUserApi, UserRoleApi, OAuthApi, UserSignApi } from "@newview/permission-api";
10
+ import { QueryWrapper, BaseApi } from "@newview/infrastructure";
11
11
  import { Icon, Tag, Checkbox, Divider, CheckboxGroup, Space } from "view-ui-plus";
12
- import { useRouter } from "vue-router";
12
+ import { SelectPlatform, BaseLogin } from "@newview/permission-ui";
13
+ import { SignTaskInfoApi } from "@newview/casign-api";
14
+ import { ProvinceApi, CityApi, AreaApi, DictionaryDetailApi, DictionaryTypeApi } from "@newview/basics-api";
13
15
  import { OSSFileApi, FileApi, UploadApi, FileInfoApi } from "@newview/fileservice-api";
14
- class PermissionBaseApi extends BaseApi {
15
- get ProxyName() {
16
- return "PermissionApi";
17
- }
18
- }
19
- class InstitutioninforApi extends PermissionBaseApi {
20
- get ControllerName() {
21
- return "Institutioninfor";
22
- }
23
- /**
24
- * 获取机构信息
25
- * @param platformId
26
- * @param institutionCode
27
- * @param institutionName
28
- * @param institutionAbbreviation
29
- * @returns
30
- */
31
- getInstitutioninfors(platformId, institutionCode, institutionName, institutionAbbreviation) {
32
- return this.send({ platformId, institutionCode, institutionName, institutionAbbreviation }, "getInstitutioninfors", Methods.GET);
33
- }
34
- /**
35
- * 获取机构信息
36
- * @param platformId 平台Id
37
- * @param selectType 筛选类别 1:全部机构;2:当前机构;3:当前及以下机构;4:机构类别查询
38
- * @param selectValue 要获取的机构Id 或 要筛选的机构类型(根据selectType决定)
39
- * @returns
40
- */
41
- GetInstitutioninforTree(platformId, selectType, selectValue) {
42
- return this.send({
43
- platformId,
44
- selectType,
45
- selectValue
46
- }, "GetInstitutioninforTree", this.Methods.GET);
47
- }
48
- }
49
- class InstitutionPlatformApi extends PermissionBaseApi {
50
- get ControllerName() {
51
- return "InstitutionPlatform";
52
- }
53
- /**
54
- * 删除机构与平台的关联
55
- * @param insId
56
- * @param platformId
57
- * @returns
58
- */
59
- deleteByInsIdAndPlatformId(insId, platformId) {
60
- return this.send({ insId, platformId }, "deleteByInsIdAndPlatformId", Methods.GET);
61
- }
62
- }
63
- class InstitutionTreeApi extends PermissionBaseApi {
64
- get ControllerName() {
65
- return "InstitutionTree";
66
- }
67
- /**
68
- * 加载机构树
69
- * @param platformId
70
- * @returns
71
- */
72
- getInstitutionTrees(platformId) {
73
- return this.send({ platformId }, "getInstitutionTrees", Methods.GET);
74
- }
75
- /**
76
- * 保存机构树
77
- * @param institutionTrees
78
- * @returns
79
- */
80
- saveInstitutionTrees(institutionTrees) {
81
- return this.send(institutionTrees, "saveInstitutionTrees", Methods.POST);
82
- }
83
- /**
84
- * 删除机构树
85
- * @param institutionTreeId 机构树Id
86
- * @returns
87
- */
88
- deleteInstitutionTree(institutionTreeId) {
89
- return this.send({ institutionTreeId }, "deleteInstitutionTree", Methods.GET);
90
- }
91
- /**
92
- * 根据机构Id和平台Id移除机构树
93
- * @param institutionId 机构Id
94
- * @param platformId 平台Id
95
- * @returns
96
- */
97
- deleteInstitutionTreeByInstitutionIdAndPlatformId(institutionId, platformId) {
98
- return this.send({ institutionId, platformId }, "deleteInstitutionTreeByInstitutionIdAndPlatformId", Methods.GET);
99
- }
100
- /**
101
- * 移动节点到指定父节点下
102
- * @param node
103
- * @param parentNode
104
- * @returns
105
- */
106
- moveNodeToParentNode(node, parentNode) {
107
- return this.send({ Node: node, ParentNode: parentNode }, "moveNodeToParentNode", Methods.POST);
108
- }
109
- /**
110
- * 批量移动节点
111
- * @param nodes
112
- * @param parentNode
113
- * @param oldPId
114
- * @returns
115
- */
116
- batchMoveNodeToParentNode(nodes, parentNode, oldPId) {
117
- return this.send({ Nodes: nodes, ParentNode: parentNode, OldPId: oldPId }, "batchMoveNodeToParentNode", Methods.POST);
118
- }
119
- /**
120
- * 根据指定的机构类型, 获取父机构
121
- * @param platformId
122
- * @param insTreeId
123
- * @param insTypeCode YZ:业主 JL:监理 LJ:施工 ZJL:总监督 ZSY:中心试验室
124
- */
125
- getPInstitutionTreeView(platformId, insTreeId, insTypeCode) {
126
- return this.send({ platformId, insTreeId, insTypeCode }, "getPInstitutionTreeView", Methods.GET);
127
- }
128
- /**
129
- * 根据指定的机构类型, 获取父机构
130
- * @param platformId
131
- * @param parentPath
132
- * @param insTypeCode YZ:业主 JL:监理 LJ:施工 ZJL:总监督 ZSY:中心试验室
133
- */
134
- getPInstitutionTreeViewByParentPath(platformId, parentPath, insTypeCode) {
135
- return this.send({ platformId, parentPath, insTypeCode }, "getPInstitutionTreeViewByParentPath", Methods.GET);
136
- }
137
- }
138
- class InstitutionTypeApi extends PermissionBaseApi {
139
- get ControllerName() {
140
- return "InstitutionType";
141
- }
142
- }
143
- class InstitutionUserApi extends PermissionBaseApi {
144
- get ControllerName() {
145
- return "InstitutionUser";
146
- }
147
- }
148
- class InstitutionRoleApi extends PermissionBaseApi {
149
- get ControllerName() {
150
- return "InstitutionRole";
151
- }
152
- }
153
- class ModuleApi extends PermissionBaseApi {
154
- get ControllerName() {
155
- return "Module";
156
- }
157
- /**
158
- * 导入模块
159
- * @param originModules
160
- * @param targetRootModule
161
- * @returns
162
- */
163
- importModules(originModules, targetRootModule) {
164
- return this.send({ OriginModules: originModules, TargetRootModule: targetRootModule }, "importModules", Methods.POST);
165
- }
166
- /**
167
- * 获取收藏的模块
168
- * @param platformId
169
- * @param userId
170
- * @returns
171
- */
172
- getFavoritesModules(platformId, userId) {
173
- return this.send({ platformId, userId }, "getFavoritesModules", Methods.GET);
174
- }
175
- }
176
- class PlatformApi extends PermissionBaseApi {
177
- get ControllerName() {
178
- return "Platform";
179
- }
180
- }
181
- class PlatformGroupApi extends PermissionBaseApi {
182
- get ControllerName() {
183
- return "platformGroup";
184
- }
185
- }
186
- class RoleApi extends PermissionBaseApi {
187
- get ControllerName() {
188
- return "Role";
189
- }
190
- /**
191
- * 导入角色
192
- * @param platformId
193
- * @param roleIdList
194
- * @returns
195
- */
196
- importRoles(platformId, roleIdList) {
197
- return this.send({ PlatformId: platformId, RoleIdList: roleIdList }, "importRoles", Methods.POST);
198
- }
199
- }
200
- class RoleModuleApi extends PermissionBaseApi {
201
- get ControllerName() {
202
- return "RoleModule";
203
- }
204
- /**
205
- * 根据角色删除模块权限
206
- * @param roleId
207
- * @returns
208
- */
209
- deleteRoleModuleByRoleId(roleId) {
210
- return this.send({ roleId }, "deleteRoleModuleByRoleId", Methods.GET);
211
- }
212
- }
213
- class UserinforApi extends PermissionBaseApi {
214
- get ControllerName() {
215
- return "Userinfor";
216
- }
217
- /**
218
- * 获取机构下面的用户
219
- * @param institutionId 机构Id
220
- * @param userName 用户姓名
221
- * @param account 账号
222
- * @param accountStatus 0:全部 1:正常 2:挂起 3:禁用
223
- * @returns
224
- */
225
- getInstitutionUsers(institutionId, userName = "", account = "", accountStatus = 0) {
226
- return this.send({ institutionId, userName, account, accountStatus }, "getInstitutionUsers", Methods.GET);
227
- }
228
- /**
229
- * 分页获取机构树下面的用户
230
- * @param pageIndex
231
- * @param pageSize
232
- * @param insTreeId 机构树Id
233
- * @param userName 用户姓名
234
- * @param account 账号
235
- * @param accountStatus 0:全部 1:正常 2:挂起 3:禁用
236
- * @returns
237
- */
238
- getInstitutionTreeUsers(pageIndex, pageSize, insTreeId, userName = "", account = "", accountStatus = 0) {
239
- return this.send({ pageIndex, pageSize, insTreeId, userName, account, accountStatus }, "getInstitutionTreeUsers", Methods.GET);
240
- }
241
- /**
242
- * 获取机构树下用户 insTreeId 为 0 时, 查询系统下的所有用户
243
- * @param insTreeId
244
- * @param platformId
245
- * @param userName
246
- * @returns
247
- */
248
- getInstitutionTreeAllUsers(insTreeId, platformId, userName = "") {
249
- return this.send({ insTreeId, platformId, userName }, "getInstitutionTreeAllUsers", Methods.GET);
250
- }
251
- /**
252
- * 获取机构下非当前机构树的用户
253
- * @param institutionId 机构Id
254
- * @param insTreeId 机构树Id
255
- * @param userName 用户姓名
256
- * @param account 账号
257
- * @param accountStatus 0:全部 1:正常 2:挂起 3:禁用
258
- * @returns
259
- */
260
- getNotInInstitutionTreeUsers(institutionId, insTreeId, userName = "", account = "", accountStatus = 0) {
261
- return this.send({ institutionId, insTreeId, userName, account, accountStatus }, "getNotInInstitutionTreeUsers", Methods.GET);
262
- }
263
- /**
264
- * 删除用户
265
- * @param userId
266
- * @param institutionUserId
267
- * @returns
268
- */
269
- deleteUser(userId, institutionUserId) {
270
- return this.send({ userId, institutionUserId }, "deleteUser", Methods.GET);
271
- }
272
- /**
273
- * 重置用户密码
274
- * @param userId
275
- * @returns
276
- */
277
- resetUserPwd(userId) {
278
- return this.send({ userId }, "resetUserPwd", Methods.GET);
279
- }
280
- /**
281
- * 获取角色用户列表
282
- * 需要在同一个机构树链条上
283
- * @param platformId
284
- * @param roleIds
285
- * @param insTreeId
286
- * @param parentPath
287
- * @returns
288
- */
289
- getRoleUsers(platformId, roleIds, insTreeId, parentPath) {
290
- return this.send({ platformId, roleIds, insTreeId, parentPath }, "getRoleUsers", Methods.GET);
291
- }
292
- /**
293
- * 分页获取机构树下面的用户(资质证书扩展)
294
- * @param pageIndex
295
- * @param pageSize
296
- * @param insTreeId 机构树Id
297
- * @param userName 用户姓名
298
- * @returns
299
- */
300
- getInstitutionUsersForCertif(pageIndex, pageSize, insTreeId, userName = "") {
301
- return this.send({ pageIndex, pageSize, insTreeId, userName }, "getInstitutionUsersForCertif", Methods.GET);
302
- }
303
- /**
304
- * 检查用户输入的密码是否正确
305
- * @param userId
306
- * @returns
307
- */
308
- checkUserPwdIsCorrect(userId, pwd) {
309
- return this.send({ UserId: userId, Pwd: pwd }, "checkUserPwdIsCorrect", Methods.POST);
310
- }
311
- /**
312
- * 修改用户密码
313
- * @param userId
314
- * @returns
315
- */
316
- updateUserPwd(userId, newPwd) {
317
- return this.send({ UserId: userId, Pwd: newPwd }, "updateUserPwd", Methods.POST);
318
- }
319
- /**
320
- * 获取角色及用户信息
321
- * @param platformId 平台Id
322
- * @param insTreeIds 机构树Id集合
323
- * @returns
324
- */
325
- getRoleUsersForInstitution(platformId, insTreeIds) {
326
- return this.send({ platformId, insTreeIds }, "getRoleUsersForInstitution", Methods.GET);
327
- }
328
- }
329
- class UserRoleApi extends PermissionBaseApi {
330
- get ControllerName() {
331
- return "UserRole";
332
- }
333
- }
334
- class OAuthApi extends PermissionBaseApi {
335
- constructor() {
336
- super(...arguments);
337
- __publicField(this, "aesKey", "d2140707ca3a469c8527e546fe961276");
338
- }
339
- get ControllerName() {
340
- return "OAuth";
341
- }
342
- /**
343
- * 密码登录
344
- * @param account
345
- * @param pwd
346
- * @returns
347
- */
348
- login(account, pwd) {
349
- return this.send({ Account: account, Pwd: pwd }, "login", Methods.POST);
350
- }
351
- /**
352
- * 手机验证码登录
353
- * @param phone
354
- * @param captcha
355
- * @returns
356
- */
357
- phoneLogin(phone, captcha) {
358
- return this.send({ Phone: phone, Captcha: captcha }, "phoneLogin", Methods.POST);
359
- }
360
- /**
361
- * 运维登录
362
- * @param userId
363
- * @returns
364
- */
365
- devOpsLogin(userId) {
366
- const targetKey = utilities.stringHelper.encryptAES(`${userId}`, this.aesKey);
367
- return this.send({ TargetKey: targetKey }, "devOpsLogin", Methods.POST);
368
- }
369
- /**
370
- * 写入登录Token
371
- * @param token
372
- * @returns
373
- */
374
- writeLoginToken(token) {
375
- return this.send({ Token: token }, "writeLoginToken", Methods.POST);
376
- }
377
- /**
378
- * 验证登录
379
- * @returns
380
- */
381
- validateToken() {
382
- return this.send({}, "validateToken", Methods.GET);
383
- }
384
- /**
385
- * 手机号是否存在
386
- * @param phone
387
- * @returns
388
- */
389
- existPhone(phone) {
390
- return this.send({ phone }, "existPhone", Methods.GET);
391
- }
392
- }
393
- class EnterpriseApi extends PermissionBaseApi {
394
- get ControllerName() {
395
- return "Enterprise";
396
- }
397
- /**
398
- * 项目管理获取所有待绑定人员
399
- * @param BIId
400
- * @param UserName
401
- * @returns
402
- */
403
- GetUserListForBind(pageIndex, pageSize, BIId, UserIds, UserName) {
404
- return this.send({ pageIndex, pageSize, BIId, UserIds, UserName }, "getUserListForBind", Methods.GET);
405
- }
406
- }
407
- class LoginLogApi extends PermissionBaseApi {
408
- get ControllerName() {
409
- return "LoginLog";
410
- }
411
- }
412
- class UserSignApi extends PermissionBaseApi {
413
- get ControllerName() {
414
- return "UserSign";
415
- }
416
- }
417
- const propDefine$m = {
16
+ const propDefine$l = {
418
17
  linkParam: {
419
18
  // 带入的参数
420
19
  type: String,
@@ -431,7 +30,7 @@ const _sfc_main$l = defineComponent({
431
30
  components: {},
432
31
  emits: [""],
433
32
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
434
- props: propDefine$m,
33
+ props: propDefine$l,
435
34
  setup(props, ctx) {
436
35
  return new PlatformInstance$1(props, ctx);
437
36
  }
@@ -646,7 +245,8 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
646
245
  PId: 0,
647
246
  LastUpdateUserId: 0,
648
247
  LastUpdateUserName: "",
649
- LastUpdateDate: ""
248
+ LastUpdateDate: "",
249
+ DefaultPwd: ""
650
250
  }));
651
251
  __publicField(this, "platformFormItems", reactive([
652
252
  { model: "PlatformName", label: "系统名称", prop: "PlatformName", type: "Input", span: 24, rules: [{ required: true, message: "系统名称不能为空", trigger: "blur" }] },
@@ -668,6 +268,7 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
668
268
  },
669
269
  { model: "PlatformUrl", label: "系统URL", prop: "PlatformUrl", type: "Input", span: 24 },
670
270
  { model: "CABusinessKey", label: "CAKey", prop: "CABusinessKey", type: "Input", span: 24 },
271
+ { model: "DefaultPwd", label: "用户默认密码", prop: "DefaultPwd", type: "Input", span: 24 },
671
272
  { model: "OrderNo", label: "排序号", prop: "OrderNo", type: "InputNumber", span: 24 }
672
273
  ]));
673
274
  // 响应式方法 | xxx = () => {}
@@ -756,6 +357,7 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
756
357
  this.platformFormModel.LastUpdateUserName = user.UserName;
757
358
  this.platformFormModel.PId = data.PId;
758
359
  this.platformFormModel.LastUpdateDate = this.utilities.getCurrentDate();
360
+ this.platformFormModel.DefaultPwd = data.DefaultPwd;
759
361
  this.editPlatformModalTitle.value = `编辑 - ${data.PlatformName}`;
760
362
  const tableData = (_a = this.platformGrid.value) == null ? void 0 : _a.getDatas();
761
363
  this.platformFormItems[4].selectProp.datas = tableData.length > 0 ? tableData == null ? void 0 : tableData.map((item) => {
@@ -797,8 +399,8 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
797
399
  }
798
400
  //#endregion 系统平台编辑 END
799
401
  };
800
- const Platform_vue_vue_type_style_index_0_scoped_c0da56b4_lang = "";
801
- const _export_sfc$1 = (sfc, props) => {
402
+ const Platform_vue_vue_type_style_index_0_scoped_f58b0adc_lang = "";
403
+ const _export_sfc = (sfc, props) => {
802
404
  const target = sfc.__vccOpts || sfc;
803
405
  for (const [key, val] of props) {
804
406
  target[key] = val;
@@ -809,7 +411,7 @@ const _hoisted_1$j = {
809
411
  class: "nv-flex",
810
412
  style: { "justify-content": "space-between" }
811
413
  };
812
- const _hoisted_2$b = { style: { "height": "500px", "overflow-y": "auto" } };
414
+ const _hoisted_2$b = { style: { "height": "550px", "overflow-y": "auto" } };
813
415
  const _hoisted_3$a = { style: { "height": "400px", "overflow-y": "auto" } };
814
416
  function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
815
417
  const _component_NvList = resolveComponent("NvList");
@@ -846,1916 +448,147 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
846
448
  _: 1
847
449
  }),
848
450
  createVNode(_component_Space, null, {
849
- default: withCtx(() => [
850
- createVNode(_component_Button, {
851
- type: "text",
852
- onClick: _ctx.doRefresh
853
- }, {
854
- default: withCtx(() => [
855
- createTextVNode("刷新")
856
- ]),
857
- _: 1
858
- }, 8, ["onClick"])
859
- ]),
860
- _: 1
861
- })
862
- ])
863
- ]),
864
- default: withCtx(() => [
865
- createVNode(_component_NvList, {
866
- ref: "groupData",
867
- option: _ctx.groupOption,
868
- onSelect: _ctx.groupSelect
869
- }, null, 8, ["option", "onSelect"])
870
- ]),
871
- _: 1
872
- }),
873
- createVNode(_component_NvBox, {
874
- class: "nv-flex-1",
875
- title: "系统平台"
876
- }, {
877
- default: withCtx(() => [
878
- createVNode(_component_NvGrid, {
879
- ref: "platformGrid",
880
- option: _ctx.platformGridOption
881
- }, null, 8, ["option"])
882
- ]),
883
- _: 1
884
- }),
885
- createVNode(_component_Modal, {
886
- modelValue: _ctx.showEditPlatform,
887
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.showEditPlatform = $event),
888
- draggable: "",
889
- mask: true,
890
- "mask-closable": false,
891
- width: 500,
892
- title: _ctx.editPlatformModalTitle,
893
- styles: { top: "3%" }
894
- }, {
895
- footer: withCtx(() => [
896
- createVNode(_component_Button, {
897
- type: "text",
898
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.showEditPlatform = false)
899
- }, {
900
- default: withCtx(() => [
901
- createTextVNode("关闭")
902
- ]),
903
- _: 1
904
- }),
905
- createVNode(_component_Button, {
906
- type: "primary",
907
- loading: _ctx.saveingPlatform,
908
- onClick: _ctx.doSavePlatform
909
- }, {
910
- default: withCtx(() => [
911
- createTextVNode("保存")
912
- ]),
913
- _: 1
914
- }, 8, ["loading", "onClick"])
915
- ]),
916
- default: withCtx(() => [
917
- createElementVNode("div", _hoisted_2$b, [
918
- createVNode(_component_Form, {
919
- ref: "refPlatformForm",
920
- model: _ctx.platformFormModel,
921
- "label-width": 95
922
- }, {
923
- default: withCtx(() => [
924
- createVNode(_component_NvComForm, {
925
- formModel: _ctx.platformFormModel,
926
- formItems: _ctx.platformFormItems
927
- }, null, 8, ["formModel", "formItems"])
928
- ]),
929
- _: 1
930
- }, 8, ["model"])
931
- ])
932
- ]),
933
- _: 1
934
- }, 8, ["modelValue", "title"]),
935
- createVNode(_component_Modal, {
936
- modelValue: _ctx.showEditGroup,
937
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.showEditGroup = $event),
938
- draggable: "",
939
- mask: true,
940
- "mask-closable": false,
941
- width: 500,
942
- title: _ctx.editGroupformModalTitle,
943
- styles: { top: "3%" }
944
- }, {
945
- footer: withCtx(() => [
946
- createVNode(_component_Button, {
947
- type: "text",
948
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showEditGroup = false)
949
- }, {
950
- default: withCtx(() => [
951
- createTextVNode("关闭")
952
- ]),
953
- _: 1
954
- }),
955
- createVNode(_component_Button, {
956
- type: "primary",
957
- loading: _ctx.saveingGroupform,
958
- onClick: _ctx.doSaveGroupform
959
- }, {
960
- default: withCtx(() => [
961
- createTextVNode("保存")
962
- ]),
963
- _: 1
964
- }, 8, ["loading", "onClick"])
965
- ]),
966
- default: withCtx(() => [
967
- createElementVNode("div", _hoisted_3$a, [
968
- createVNode(_component_Form, {
969
- ref: "refGroupForm",
970
- model: _ctx.groupFormModel,
971
- "label-width": 115
972
- }, {
973
- default: withCtx(() => [
974
- createVNode(_component_NvComForm, {
975
- formModel: _ctx.groupFormModel,
976
- formItems: _ctx.groupFormItems
977
- }, null, 8, ["formModel", "formItems"])
978
- ]),
979
- _: 1
980
- }, 8, ["model"])
981
- ])
982
- ]),
983
- _: 1
984
- }, 8, ["modelValue", "title"])
985
- ]),
986
- _: 1
987
- });
988
- }
989
- const Platform = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-c0da56b4"]]);
990
- class BasicsBaseApi extends BaseApi {
991
- get ProxyName() {
992
- return "BasicsApi";
993
- }
994
- }
995
- class AreaApi extends BasicsBaseApi {
996
- get ControllerName() {
997
- return "Area";
998
- }
999
- }
1000
- class CityApi extends BasicsBaseApi {
1001
- get ControllerName() {
1002
- return "City";
1003
- }
1004
- }
1005
- class ProvinceApi extends BasicsBaseApi {
1006
- get ControllerName() {
1007
- return "Province";
1008
- }
1009
- }
1010
- class DictionaryTypeApi extends BasicsBaseApi {
1011
- get ControllerName() {
1012
- return "OptionType";
1013
- }
1014
- }
1015
- class DictionaryDetailApi extends BasicsBaseApi {
1016
- get ControllerName() {
1017
- return "OptionDetail";
1018
- }
1019
- /**
1020
- * 获取指定平台下字典类别的字典项
1021
- * @param platformId
1022
- * @param optionCode
1023
- * @returns
1024
- */
1025
- getOptions(platformId, optionCode) {
1026
- return this.send({ platformId, optionCode }, "getOptions", this.Methods.GET);
1027
- }
1028
- }
1029
- class CaptchaApi extends BasicsBaseApi {
1030
- get ControllerName() {
1031
- return "Captcha";
1032
- }
1033
- /**
1034
- * 发送短信验证码
1035
- * @param phone
1036
- * @returns
1037
- */
1038
- sendPhoneCaptcha(phone) {
1039
- return this.send({ phone }, "sendPhoneCaptcha", Methods.GET);
1040
- }
1041
- /**
1042
- * 发送邮箱验证码
1043
- * @param mail
1044
- * @returns
1045
- */
1046
- sendMailCaptcha(mail) {
1047
- return this.send({ mail }, "sendMailCaptcha", Methods.GET);
1048
- }
1049
- /**
1050
- * 获取验证码
1051
- * @param source
1052
- * @returns
1053
- */
1054
- getCaptcha(source) {
1055
- return this.send({ source }, "getCaptcha", Methods.GET);
1056
- }
1057
- }
1058
- var __defProp2 = Object.defineProperty;
1059
- var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1060
- var __publicField2 = (obj, key, value) => {
1061
- __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
1062
- return value;
1063
- };
1064
- const propDefine$8$1 = {
1065
- theme: {
1066
- // 主题颜色 light dark
1067
- type: String,
1068
- default: "light"
1069
- },
1070
- autoLogin: {
1071
- // 自动登录
1072
- type: Boolean,
1073
- default: true
1074
- }
1075
- };
1076
- const _sfc_main$4$1 = defineComponent({
1077
- name: "BaseLogin",
1078
- components: {},
1079
- emits: [""],
1080
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
1081
- props: propDefine$8$1,
1082
- setup(props, ctx) {
1083
- return new BaseLoginInstance$1(props, ctx);
1084
- }
1085
- });
1086
- let BaseLoginInstance$1 = class BaseLoginInstance extends BaseInstance {
1087
- constructor(props, ctx) {
1088
- super();
1089
- __publicField2(this, "props");
1090
- __publicField2(this, "ctx");
1091
- __publicField2(this, "oauthApi", new OAuthApi());
1092
- __publicField2(this, "captchaApi", new CaptchaApi());
1093
- __publicField2(this, "router");
1094
- __publicField2(this, "aesKey", "d2140707ca3a469c8527e546fe961276");
1095
- __publicField2(this, "autoLogin", ref(true));
1096
- __publicField2(this, "userName", ref(""));
1097
- __publicField2(this, "passWord", ref(""));
1098
- __publicField2(this, "isloading", ref(false));
1099
- __publicField2(this, "loadType", ref("userName"));
1100
- __publicField2(this, "doUserNamePwdLogin", async () => {
1101
- if (this.utilities.isNull(this.userName.value)) {
1102
- this.loginTip.value = "用户名不能为空!";
1103
- return;
1104
- }
1105
- if (this.utilities.isNull(this.passWord.value)) {
1106
- this.loginTip.value = "密码不能为空!";
1107
- return;
1108
- }
1109
- this.login(this.userName.value, this.passWord.value);
1110
- });
1111
- __publicField2(this, "phone", ref(""));
1112
- __publicField2(this, "captcha", ref(""));
1113
- __publicField2(this, "canGetCaptcha", ref(true));
1114
- __publicField2(this, "canGetCaptchaTime", ref(60));
1115
- __publicField2(this, "sendCaptchaing", ref(false));
1116
- __publicField2(this, "loginTip", ref(""));
1117
- __publicField2(this, "doSendCaptcha", async () => {
1118
- this.sendCaptchaing.value = true;
1119
- this.loginTip.value = "";
1120
- const reg = /^[1][3,4,5,7,8]\d{9}$/;
1121
- if (!reg.test(this.phone.value)) {
1122
- this.loginTip.value = "手机号格式不正确, 请重新输入!";
1123
- this.sendCaptchaing.value = false;
1124
- return;
1125
- }
1126
- let apiResult = await this.oauthApi.existPhone(this.phone.value);
1127
- let result = this.utilities.parseApiResult(apiResult);
1128
- if (result != true) {
1129
- this.loginTip.value = "手机号未注册,请联系管理员!";
1130
- this.sendCaptchaing.value = false;
1131
- return;
1132
- }
1133
- apiResult = await this.captchaApi.sendPhoneCaptcha(this.phone.value);
1134
- result = this.utilities.parseApiResult(apiResult);
1135
- this.sendCaptchaing.value = false;
1136
- if (result > 0) {
1137
- this.message.success("发送成功!");
1138
- this.canGetCaptcha.value = false;
1139
- this.intervalId = setInterval(() => {
1140
- this.canGetCaptchaTime.value--;
1141
- if (this.canGetCaptchaTime.value == 0) {
1142
- this.canGetCaptcha.value = true;
1143
- this.canGetCaptchaTime.value = 60;
1144
- clearInterval(this.intervalId);
1145
- }
1146
- }, 1e3);
1147
- } else {
1148
- this.loginTip.value = apiResult.msg;
1149
- }
1150
- });
1151
- __publicField2(this, "doPhoneLogin", async () => {
1152
- this.isloading.value = true;
1153
- this.loginTip.value = "";
1154
- const reg = /^[1][3,4,5,7,8]\d{9}$/;
1155
- if (!reg.test(this.phone.value)) {
1156
- this.loginTip.value = `手机号格式不正确, 请重新输入!`;
1157
- this.isloading.value = false;
1158
- return;
1159
- }
1160
- if (this.utilities.isNull(this.captcha.value)) {
1161
- this.loginTip.value = `验证码不能为空!`;
1162
- this.isloading.value = false;
1163
- return;
1164
- }
1165
- const apiResult = await this.oauthApi.phoneLogin(this.phone.value, this.captcha.value);
1166
- const result = this.utilities.parseApiResult(apiResult);
1167
- this.isloading.value = false;
1168
- if (!result.IsSuccess) {
1169
- this.loginTip.value = result.Msg;
1170
- return;
1171
- }
1172
- this.message.success("登录成功");
1173
- this.storageInfo.removeAll();
1174
- this.setLoginResult(result);
1175
- });
1176
- __publicField2(this, "loginUserName", "");
1177
- __publicField2(this, "encryptPassword", "");
1178
- __publicField2(this, "loginResult");
1179
- __publicField2(this, "intervalId");
1180
- __publicField2(this, "showPhoneValidate", ref(false));
1181
- __publicField2(this, "sending", ref(false));
1182
- __publicField2(this, "canSendCaptcha", ref(true));
1183
- __publicField2(this, "resendTime", ref(60));
1184
- __publicField2(this, "validateing", ref(false));
1185
- __publicField2(this, "captchaFormRef", ref());
1186
- __publicField2(this, "phoneValidateModel", reactive({
1187
- Captcha: ""
1188
- }));
1189
- __publicField2(this, "phoneValidateRule", reactive({
1190
- Captcha: [
1191
- { required: true, message: "验证码不能空!", trigger: "blur" }
1192
- ]
1193
- }));
1194
- __publicField2(this, "doSendPhoneCaptcha", async () => {
1195
- this.sending.value = true;
1196
- const apiResult = await this.captchaApi.sendPhoneCaptcha(this.loginResult.User.Phone);
1197
- const result = this.utilities.parseApiResult(apiResult);
1198
- this.sending.value = false;
1199
- if (result > 0) {
1200
- this.message.success("发送成功!");
1201
- this.canSendCaptcha.value = false;
1202
- this.intervalId = setInterval(() => {
1203
- this.resendTime.value--;
1204
- if (this.resendTime.value == 0) {
1205
- this.canSendCaptcha.value = true;
1206
- this.resendTime.value = 60;
1207
- clearInterval(this.intervalId);
1208
- }
1209
- }, 1e3);
1210
- } else {
1211
- this.message.warning(apiResult.msg);
1212
- }
1213
- });
1214
- __publicField2(this, "doPhoneValidate", async () => {
1215
- this.validateing.value = true;
1216
- const valid = await this.captchaFormRef.value.validate();
1217
- if (!valid) {
1218
- this.validateing.value = false;
1219
- return;
1220
- }
1221
- let apiResult = await this.captchaApi.getCaptcha(this.loginResult.User.Phone);
1222
- let result = this.utilities.parseApiResult(apiResult);
1223
- this.validateing.value = false;
1224
- if (result == this.phoneValidateModel.Captcha) {
1225
- this.message.success("验证成功!");
1226
- this.loginSuccess(this.loginUserName, this.encryptPassword, this.loginResult, false);
1227
- await this.oauthApi.writeLoginToken(this.storageInfo.getToken());
1228
- this.router.push(this.storageInfo.getCurrentDefaultPath());
1229
- this.showPhoneValidate.value = false;
1230
- } else {
1231
- this.message.warning("验证码填写错误!");
1232
- }
1233
- });
1234
- __publicField2(this, "login", async (userName, password, isEncrypt = false) => {
1235
- this.isloading.value = true;
1236
- this.loginTip.value = "";
1237
- password = isEncrypt == true ? password : this.utilities.stringHelper.encryptAES(password, this.aesKey);
1238
- const apiResult = await this.oauthApi.login(userName, password);
1239
- const result = this.utilities.parseApiResult(apiResult);
1240
- this.isloading.value = false;
1241
- if (!result.IsSuccess) {
1242
- this.loginTip.value = result.Msg;
1243
- return;
1244
- }
1245
- if (result.NeedCaptcha) {
1246
- this.doShowPhoneValidate(userName, password, result);
1247
- } else {
1248
- this.loginSuccess(userName, password, result);
1249
- }
1250
- });
1251
- __publicField2(this, "setLoginResult", (result, isJump = true) => {
1252
- this.storageInfo.setToken(result.Token);
1253
- this.storageInfo.setUser(result.User);
1254
- this.storageInfo.setPlatforms(result.Platforms);
1255
- const platforms = this.storageInfo.getPlatforms();
1256
- if (!this.utilities.isNull(platforms) && platforms.length > 0) {
1257
- const platform = platforms.find((item) => item.PlatformNo == this.storageInfo.getPlatformNo());
1258
- this.storageInfo.setCurrentPlatform(this.utilities.isNull(platform) ? platforms[0] : platform);
1259
- }
1260
- const currentPlatform = this.storageInfo.getCurrentPlatform();
1261
- if (!this.utilities.isNull(currentPlatform) && currentPlatform.Modules.length > 0) {
1262
- this.storageInfo.setCurrentBusiness(currentPlatform.Modules[0]);
1263
- }
1264
- if (isJump) {
1265
- this.router.replace("/");
1266
- }
1267
- });
1268
- this.props = props;
1269
- this.ctx = ctx;
1270
- this.useAutoLogin();
1271
- }
1272
- // 私有方法 | private 方法名() {}
1273
- /**
1274
- * 自动登录
1275
- */
1276
- useAutoLogin() {
1277
- this.router = useRouter();
1278
- if (this.props.autoLogin) {
1279
- this.doAutoLogin();
1280
- }
1281
- }
1282
- /**
1283
- * 自动登录
1284
- */
1285
- async doAutoLogin() {
1286
- const autoLogin = this.storageInfo.getAutoLogin();
1287
- if (autoLogin != "1") {
1288
- this.storageInfo.removeAll();
1289
- return;
1290
- }
1291
- const autoLoginToken = this.storageInfo.getAutoLoginToken();
1292
- if (this.utilities.isNull(autoLoginToken)) {
1293
- return;
1294
- }
1295
- const splitAutoLoginToken = autoLoginToken.split(".");
1296
- if (splitAutoLoginToken.length != 2) {
1297
- return;
1298
- }
1299
- const userName = this.utilities.stringHelper.decryptAES(splitAutoLoginToken[1], this.aesKey);
1300
- const password = splitAutoLoginToken[0];
1301
- this.login(userName, password, true);
1302
- }
1303
- // 私有方法 | private 方法名() {}
1304
- /**
1305
- * 显示登录验证
1306
- * @param loginUserName
1307
- * @param encryptPassword
1308
- * @param result
1309
- */
1310
- doShowPhoneValidate(loginUserName, encryptPassword, result) {
1311
- this.loginUserName = loginUserName;
1312
- this.encryptPassword = encryptPassword;
1313
- this.loginResult = result;
1314
- this.showPhoneValidate.value = true;
1315
- }
1316
- //#endregion 新设备验证 END
1317
- //#region API
1318
- // 私有方法 | private 方法名() {}
1319
- /**
1320
- * 登录成功
1321
- * @param userName
1322
- * @param passWord
1323
- * @param result
1324
- * @param isJump
1325
- */
1326
- loginSuccess(userName, passWord, result, isJump = true) {
1327
- this.storageInfo.setAutoLogin(this.autoLogin.value ? "1" : "0");
1328
- this.storageInfo.setAutoLoginToken(this.autoLogin.value ? `${passWord}.${this.utilities.stringHelper.encryptAES(userName, this.aesKey)}` : "");
1329
- this.setLoginResult(result);
1330
- }
1331
- //#endregion API END
1332
- };
1333
- const _export_sfc = (sfc, props) => {
1334
- const target = sfc.__vccOpts || sfc;
1335
- for (const [key, val] of props) {
1336
- target[key] = val;
1337
- }
1338
- return target;
1339
- };
1340
- const _withScopeId$1$1 = (n) => (pushScopeId("data-v-74a37534"), n = n(), popScopeId(), n);
1341
- const _hoisted_1$3$1 = { class: "login-form" };
1342
- const _hoisted_2$3$1 = { class: "login-body" };
1343
- const _hoisted_3$2$1 = { class: "login-tabs" };
1344
- const _hoisted_4$2$1 = { class: "login-panel" };
1345
- const _hoisted_5$8 = { class: "login-input-item" };
1346
- const _hoisted_6$8 = { class: "login-input-item" };
1347
- const _hoisted_7$6 = {
1348
- class: "login-input-item",
1349
- style: { "text-align": "right" }
1350
- };
1351
- const _hoisted_8$6 = { class: "login-panel" };
1352
- const _hoisted_9$4 = { class: "login-input-item" };
1353
- const _hoisted_10$4 = { class: "login-input-item" };
1354
- const _hoisted_11$4 = {
1355
- class: "login-input-item",
1356
- style: { "text-align": "right" }
1357
- };
1358
- const _hoisted_12$2 = { key: 0 };
1359
- const _hoisted_13$2 = { key: 1 };
1360
- const _hoisted_14 = {
1361
- key: 1,
1362
- class: "captcha-item"
1363
- };
1364
- const _hoisted_15 = {
1365
- class: "login-input-item",
1366
- style: { "margin-top": "30px" }
1367
- };
1368
- const _hoisted_16 = { class: "login-tip" };
1369
- const _hoisted_17 = { key: 0 };
1370
- const _hoisted_18 = { key: 1 };
1371
- const _hoisted_19 = /* @__PURE__ */ _withScopeId$1$1(() => /* @__PURE__ */ createElementVNode("div", { class: "captcha-tip" }, "在新设备登录,需要进行短信验证!", -1));
1372
- const _hoisted_20 = { key: 0 };
1373
- const _hoisted_21 = { key: 1 };
1374
- const _hoisted_22 = {
1375
- key: 1,
1376
- class: "captcha-item"
1377
- };
1378
- function _sfc_render$4$1(_ctx, _cache, $props, $setup, $data, $options) {
1379
- const _component_Input = resolveComponent("Input");
1380
- const _component_Checkbox = resolveComponent("Checkbox");
1381
- const _component_Icon = resolveComponent("Icon");
1382
- const _component_Button = resolveComponent("Button");
1383
- const _component_FormItem = resolveComponent("FormItem");
1384
- const _component_Form = resolveComponent("Form");
1385
- const _component_Modal = resolveComponent("Modal");
1386
- return openBlock(), createElementBlock("div", _hoisted_1$3$1, [
1387
- renderSlot(_ctx.$slots, "default", {}, () => [
1388
- createElementVNode("div", _hoisted_2$3$1, [
1389
- createElementVNode("div", _hoisted_3$2$1, [
1390
- createElementVNode("div", {
1391
- class: normalizeClass(_ctx.loadType == "userName" ? "login-tab login-tab--active" : "login-tab"),
1392
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.loadType = "userName")
1393
- }, "密码登录", 2),
1394
- createElementVNode("div", {
1395
- class: normalizeClass(_ctx.loadType == "captcha" ? "login-tab login-tab--active" : "login-tab"),
1396
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.loadType = "captcha")
1397
- }, "验证码登录", 2)
1398
- ]),
1399
- withDirectives(createElementVNode("div", _hoisted_4$2$1, [
1400
- createElementVNode("div", _hoisted_5$8, [
1401
- createVNode(_component_Input, {
1402
- size: "large",
1403
- prefix: "md-person",
1404
- placeholder: "请输入用户名",
1405
- modelValue: _ctx.userName,
1406
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.userName = $event),
1407
- clearable: ""
1408
- }, null, 8, ["modelValue"])
1409
- ]),
1410
- createElementVNode("div", _hoisted_6$8, [
1411
- createVNode(_component_Input, {
1412
- type: "password",
1413
- size: "large",
1414
- prefix: "md-unlock",
1415
- placeholder: "请输入密码",
1416
- modelValue: _ctx.passWord,
1417
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.passWord = $event),
1418
- password: ""
1419
- }, null, 8, ["modelValue"])
1420
- ]),
1421
- createElementVNode("div", _hoisted_7$6, [
1422
- createVNode(_component_Checkbox, {
1423
- modelValue: _ctx.autoLogin,
1424
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.autoLogin = $event)
1425
- }, {
1426
- default: withCtx(() => [
1427
- createTextVNode("下次自动登录")
1428
- ]),
1429
- _: 1
1430
- }, 8, ["modelValue"])
1431
- ])
1432
- ], 512), [
1433
- [vShow, _ctx.loadType == "userName"]
1434
- ]),
1435
- withDirectives(createElementVNode("div", _hoisted_8$6, [
1436
- createElementVNode("div", _hoisted_9$4, [
1437
- createVNode(_component_Input, {
1438
- size: "large",
1439
- prefix: "md-phone-portrait",
1440
- placeholder: "请输入手机号",
1441
- modelValue: _ctx.phone,
1442
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.phone = $event),
1443
- clearable: ""
1444
- }, null, 8, ["modelValue"])
1445
- ]),
1446
- createElementVNode("div", _hoisted_10$4, [
1447
- createVNode(_component_Input, {
1448
- size: "large",
1449
- prefix: "md-keypad",
1450
- placeholder: "请输入验证码",
1451
- modelValue: _ctx.captcha,
1452
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.captcha = $event),
1453
- clearable: "",
1454
- maxlength: "6",
1455
- "show-word-limit": ""
1456
- }, null, 8, ["modelValue"])
1457
- ]),
1458
- createElementVNode("div", _hoisted_11$4, [
1459
- _ctx.sendCaptchaing ? (openBlock(), createElementBlock("div", _hoisted_12$2, [
1460
- createVNode(_component_Icon, {
1461
- type: "ios-loading",
1462
- style: { "animation": "ani-load-loop 1s linear infinite" }
1463
- }),
1464
- createTextVNode("发送中..")
1465
- ])) : (openBlock(), createElementBlock("div", _hoisted_13$2, [
1466
- _ctx.canGetCaptcha ? (openBlock(), createElementBlock("span", {
1467
- key: 0,
1468
- class: "captcha-item_a",
1469
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.doSendCaptcha && _ctx.doSendCaptcha(...args))
1470
- }, "获取短信验证码")) : (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(_ctx.canGetCaptchaTime) + " 秒后可重发", 1))
1471
- ]))
1472
- ])
1473
- ], 512), [
1474
- [vShow, _ctx.loadType == "captcha"]
1475
- ]),
1476
- createElementVNode("div", _hoisted_15, [
1477
- createElementVNode("div", _hoisted_16, toDisplayString(_ctx.loginTip), 1),
1478
- createVNode(_component_Button, {
1479
- class: "loginbtn",
1480
- size: "large",
1481
- type: "primary",
1482
- long: "",
1483
- loading: _ctx.isloading,
1484
- onClick: _cache[8] || (_cache[8] = ($event) => _ctx.loadType == "captcha" ? _ctx.doPhoneLogin() : _ctx.doUserNamePwdLogin())
1485
- }, {
1486
- default: withCtx(() => [
1487
- !_ctx.isloading ? (openBlock(), createElementBlock("span", _hoisted_17, "登录")) : (openBlock(), createElementBlock("span", _hoisted_18, "正在登录..."))
1488
- ]),
1489
- _: 1
1490
- }, 8, ["loading"])
1491
- ])
1492
- ])
1493
- ], true),
1494
- createVNode(_component_Modal, {
1495
- modelValue: _ctx.showPhoneValidate,
1496
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => _ctx.showPhoneValidate = $event),
1497
- draggable: "",
1498
- mask: true,
1499
- "mask-closable": false,
1500
- width: 450,
1501
- title: "短信验证"
1502
- }, {
1503
- footer: withCtx(() => [
1504
- createVNode(_component_Button, {
1505
- type: "primary",
1506
- loading: _ctx.validateing,
1507
- onClick: _ctx.doPhoneValidate
1508
- }, {
1509
- default: withCtx(() => [
1510
- createTextVNode("验证")
1511
- ]),
1512
- _: 1
1513
- }, 8, ["loading", "onClick"])
1514
- ]),
1515
- default: withCtx(() => [
1516
- _hoisted_19,
1517
- createVNode(_component_Form, {
1518
- ref: "captchaFormRef",
1519
- model: _ctx.phoneValidateModel,
1520
- "label-position": "top",
1521
- rules: _ctx.phoneValidateRule,
1522
- style: { "margin-bottom": "50px" }
1523
- }, {
1524
- default: withCtx(() => [
1525
- createVNode(_component_FormItem, {
1526
- label: "验证码",
1527
- prop: "Captcha"
1528
- }, {
1529
- default: withCtx(() => [
1530
- createVNode(_component_Input, {
1531
- modelValue: _ctx.phoneValidateModel.Captcha,
1532
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.phoneValidateModel.Captcha = $event),
1533
- maxlength: "6"
1534
- }, {
1535
- append: withCtx(() => [
1536
- _ctx.sending ? (openBlock(), createElementBlock("div", _hoisted_20, [
1537
- createVNode(_component_Icon, {
1538
- type: "ios-loading",
1539
- style: { "animation": "ani-load-loop 1s linear infinite" }
1540
- }),
1541
- createTextVNode("发送中..")
1542
- ])) : (openBlock(), createElementBlock("div", _hoisted_21, [
1543
- _ctx.canSendCaptcha ? (openBlock(), createElementBlock("span", {
1544
- key: 0,
1545
- class: "captcha-item_a",
1546
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.doSendPhoneCaptcha && _ctx.doSendPhoneCaptcha(...args))
1547
- }, "获取短信验证码")) : (openBlock(), createElementBlock("span", _hoisted_22, toDisplayString(_ctx.resendTime) + " 秒后可重发", 1))
1548
- ]))
1549
- ]),
1550
- _: 1
1551
- }, 8, ["modelValue"])
1552
- ]),
1553
- _: 1
1554
- })
1555
- ]),
1556
- _: 1
1557
- }, 8, ["model", "rules"])
1558
- ]),
1559
- _: 1
1560
- }, 8, ["modelValue"])
1561
- ]);
1562
- }
1563
- const BaseLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["render", _sfc_render$4$1], ["__scopeId", "data-v-74a37534"]]);
1564
- const propDefine$7$1 = {
1565
- defaultLoad: {
1566
- // 默认选中
1567
- type: Boolean,
1568
- default: true
1569
- },
1570
- width: {
1571
- // 宽度
1572
- type: String,
1573
- default: "320px"
1574
- },
1575
- showLabel: {
1576
- // 是否显示标签
1577
- type: Boolean,
1578
- default: true
1579
- }
1580
- };
1581
- const _sfc_main$3$1 = defineComponent({
1582
- name: "SelectPlatform",
1583
- components: {},
1584
- emits: ["select"],
1585
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
1586
- props: propDefine$7$1,
1587
- setup(props, ctx) {
1588
- return new SelectPlatformInstance$1(props, ctx);
1589
- }
1590
- });
1591
- let SelectPlatformInstance$1 = class SelectPlatformInstance extends BaseInstance {
1592
- // 全局属性
1593
- constructor(props, ctx) {
1594
- super();
1595
- __publicField2(this, "props");
1596
- __publicField2(this, "ctx");
1597
- __publicField2(this, "platformApi", new PlatformApi());
1598
- __publicField2(this, "platforms", ref([]));
1599
- __publicField2(this, "selectPlatformId", ref(0));
1600
- __publicField2(this, "spinShow", ref(false));
1601
- __publicField2(this, "loadPlatforms", async () => {
1602
- this.spinShow.value = true;
1603
- const apiResult = await this.platformApi.getEntities(QueryWrapper.create().eq("1", "1").orderBy(["OrderNo"], true));
1604
- this.platforms.value = this.utilities.parseApiResult(apiResult);
1605
- this.spinShow.value = false;
1606
- if (this.platforms.value.length > 0 && this.selectPlatformId.value == 0) {
1607
- this.selectPlatformId.value = this.platforms.value[0].Id;
1608
- this.ctx.emit("select", this.platforms.value[0]);
1609
- }
1610
- });
1611
- __publicField2(this, "doPlatformChange", () => {
1612
- const data = this.platforms.value.find((item) => item.Id == this.selectPlatformId.value);
1613
- if (this.utilities.isNull(data)) {
1614
- return;
1615
- }
1616
- this.ctx.emit("select", data);
1617
- });
1618
- this.props = props;
1619
- this.ctx = ctx;
1620
- this.usePlatform();
1621
- }
1622
- // 私有方法 | private 方法名() {}
1623
- /**
1624
- * 初始化
1625
- */
1626
- usePlatform() {
1627
- if (this.props.defaultLoad) {
1628
- this.loadPlatforms();
1629
- }
1630
- }
1631
- //#endregion 系统平台 END
1632
- };
1633
- function _sfc_render$3$1(_ctx, _cache, $props, $setup, $data, $options) {
1634
- const _component_Option = resolveComponent("Option");
1635
- const _component_Select = resolveComponent("Select");
1636
- const _component_Spin = resolveComponent("Spin");
1637
- const _component_NvControlGroup = resolveComponent("NvControlGroup");
1638
- return openBlock(), createBlock(_component_NvControlGroup, {
1639
- width: _ctx.width,
1640
- icon: "md-refresh",
1641
- label: _ctx.showLabel ? "系统平台" : "",
1642
- labelWidth: _ctx.showLabel ? 75 : 0,
1643
- onClick: _ctx.loadPlatforms
1644
- }, {
1645
- default: withCtx(() => [
1646
- createVNode(_component_Select, {
1647
- modelValue: _ctx.selectPlatformId,
1648
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.selectPlatformId = $event),
1649
- onOnChange: _ctx.doPlatformChange,
1650
- transfer: ""
1651
- }, {
1652
- default: withCtx(() => [
1653
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.platforms, (item, index2) => {
1654
- return openBlock(), createBlock(_component_Option, {
1655
- key: index2,
1656
- value: item.Id
1657
- }, {
1658
- default: withCtx(() => [
1659
- createTextVNode(toDisplayString(item.PlatformAbbreviation), 1)
1660
- ]),
1661
- _: 2
1662
- }, 1032, ["value"]);
1663
- }), 128))
1664
- ]),
1665
- _: 1
1666
- }, 8, ["modelValue", "onOnChange"]),
1667
- createVNode(_component_Spin, {
1668
- fix: "",
1669
- show: _ctx.spinShow
1670
- }, null, 8, ["show"])
1671
- ]),
1672
- _: 1
1673
- }, 8, ["width", "label", "labelWidth", "onClick"]);
1674
- }
1675
- const SelectPlatform = /* @__PURE__ */ _export_sfc(_sfc_main$3$1, [["render", _sfc_render$3$1]]);
1676
- let CASignBaseApi$1 = class CASignBaseApi extends BaseOldApi {
1677
- get ProxyName() {
1678
- return "CASignApi";
1679
- }
1680
- };
1681
- let SignTaskInfoApi$1 = class SignTaskInfoApi extends CASignBaseApi$1 {
1682
- get ControllerName() {
1683
- return "SignTaskInfo";
1684
- }
1685
- /**
1686
- * 验证签章信息
1687
- * @param taskKey
1688
- * @returns
1689
- */
1690
- SignVerification(taskKey) {
1691
- return this.send({ taskKey }, "SignVerification", Methods.GET);
1692
- }
1693
- /**
1694
- * 获取印章信息
1695
- * @param businessKey
1696
- * @param userSealKey
1697
- * @returns
1698
- */
1699
- GetUserSealCloudInfo(businessKey, userSealKey) {
1700
- return this.send({ businessKey, userSealKey }, "GetUserSealCloudInfo", Methods.GET);
1701
- }
1702
- /**
1703
- * 云签签章
1704
- * @param businessKey
1705
- * @param userSealKey
1706
- * @param userPin
1707
- * @param signContent
1708
- * @returns
1709
- */
1710
- SendCloudSignTask(businessKey, userSealKey, userPin, signContent) {
1711
- return this.send({ BusinessKey: businessKey, UserSealKey: userSealKey, UserPin: userPin, SignContent: signContent }, "SendCloudSignTask", Methods.POST);
1712
- }
1713
- /**
1714
- * 云签验章
1715
- * @param businessKey
1716
- * @param taskKey
1717
- * @param SignContent
1718
- * @returns
1719
- */
1720
- SendCloudVerificationSign(businessKey, taskKey, SignContent) {
1721
- return this.send({ businessKey, taskKey, SignContent }, "SendCloudVerificationSign", Methods.GET);
1722
- }
1723
- };
1724
- new UserSignApi();
1725
- const signTaskInfoApi = new SignTaskInfoApi$1();
1726
- const errorResult = (msg) => {
1727
- return { code: -1, msg, result: "" };
1728
- };
1729
- const successResult = (result) => {
1730
- return { code: 0, msg: "签字成功", result };
1731
- };
1732
- const doSeal = async (sealKey, userPin, sealContent) => {
1733
- const businessKey = storageInfo.getCurrentPlatform().CABusinessKey;
1734
- if (utilities.isNull(businessKey)) {
1735
- return errorResult("未配置BusinessKey");
1736
- }
1737
- const apiResult = await signTaskInfoApi.SendCloudSignTask(
1738
- businessKey,
1739
- sealKey,
1740
- utilities.stringHelper.encodeToBase64(userPin),
1741
- utilities.stringHelper.encodeToBase64(sealContent)
1742
- );
1743
- const result = utilities.parseApiResult(apiResult);
1744
- if (utilities.isNull(result)) {
1745
- return errorResult(apiResult.msg);
1746
- }
1747
- if (result.head.code == 10) {
1748
- return successResult(result.data.signData);
1749
- } else {
1750
- return errorResult(result.head.msg);
1751
- }
1752
- };
1753
- const propDefine$6$1 = {
1754
- platformId: {
1755
- // 平台Id
1756
- type: Number,
1757
- default: 0
1758
- },
1759
- userId: {
1760
- // 用户Id
1761
- type: Number,
1762
- default: 0
1763
- },
1764
- signContent: {
1765
- // 签字内容
1766
- type: String,
1767
- default: ""
1768
- },
1769
- signType: {
1770
- // 0:签字 1:签章
1771
- type: Number,
1772
- default: 0
1773
- },
1774
- signResult: {
1775
- // 签字结果
1776
- type: String,
1777
- default: ""
1778
- }
1779
- };
1780
- defineComponent({
1781
- name: "CASign",
1782
- components: {},
1783
- emits: ["signSuccess"],
1784
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
1785
- props: propDefine$6$1,
1786
- setup(props, ctx) {
1787
- return new CASignInstance$1(props, ctx);
1788
- }
1789
- });
1790
- let CASignInstance$1 = class CASignInstance extends BaseInstance {
1791
- // 全局属性
1792
- constructor(props, ctx) {
1793
- super();
1794
- __publicField2(this, "props");
1795
- __publicField2(this, "ctx");
1796
- __publicField2(this, "signTaskInfoApi", new SignTaskInfoApi$1());
1797
- __publicField2(this, "userSignApi", new UserSignApi());
1798
- __publicField2(this, "userSign");
1799
- __publicField2(this, "sealKey", "");
1800
- __publicField2(this, "hasSign", ref(false));
1801
- __publicField2(this, "signImg", ref(""));
1802
- __publicField2(this, "showSignPwd", ref(false));
1803
- __publicField2(this, "userPin", ref(""));
1804
- __publicField2(this, "signing", ref(false));
1805
- __publicField2(this, "doShowSignPwd", () => {
1806
- this.userPin.value = "";
1807
- this.showSignPwd.value = true;
1808
- });
1809
- __publicField2(this, "doRunSeal", async () => {
1810
- this.signing.value = true;
1811
- if (this.utilities.isNull(this.userPin.value)) {
1812
- this.message.error("请输入证书密钥");
1813
- this.signing.value = false;
1814
- return;
1815
- }
1816
- const signResult = await doSeal(this.sealKey, this.userPin.value, this.props.signContent);
1817
- this.signing.value = false;
1818
- if (signResult.code == -1) {
1819
- this.message.error(signResult.msg);
1820
- return;
1821
- }
1822
- this.ctx.emit("signSuccess", signResult.result);
1823
- this.hasSign.value = true;
1824
- this.showSignPwd.value = false;
1825
- });
1826
- this.props = props;
1827
- this.ctx = ctx;
1828
- this.useCASign();
1829
- }
1830
- // 私有方法 | private 方法名() {}
1831
- /**
1832
- * 初始化
1833
- */
1834
- useCASign() {
1835
- this.loadUserSign();
1836
- watch(() => this.props.signResult, () => {
1837
- this.hasSign.value = !this.utilities.isNull(this.props.signResult);
1838
- });
1839
- watch(() => this.props.userId, () => {
1840
- this.loadUserSign();
1841
- });
1842
- this.hasSign.value = !this.utilities.isNull(this.props.signResult);
1843
- }
1844
- /**
1845
- * 加载用户签字信息
1846
- * @returns
1847
- */
1848
- async loadUserSign() {
1849
- if (this.props.userId == 0) {
1850
- return;
1851
- }
1852
- const apiResult = await this.userSignApi.getEntityByFilter(QueryWrapper.create().eq("UserId", this.props.userId));
1853
- const result = this.utilities.parseApiResult(apiResult);
1854
- if (this.utilities.isNull(result)) {
1855
- this.message.error("该用户未配置签字信息");
1856
- return;
1857
- }
1858
- this.userSign = result;
1859
- this.signImg.value = this.props.signType == 0 ? this.userSign.CAUserSealImg : this.userSign.CAUserYZImg;
1860
- this.sealKey = this.props.signType == 0 ? this.userSign.CAUserSealKey : this.userSign.CAUserYZKey;
1861
- }
1862
- //#endregion 执行签字 END
1863
- };
1864
- const propDefine$5$1 = {
1865
- loadCount: {
1866
- // 加载Count方法
1867
- type: Function
1868
- }
1869
- };
1870
- defineComponent({
1871
- name: "",
1872
- components: { SelectPlatform },
1873
- emits: ["change"],
1874
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
1875
- props: propDefine$5$1,
1876
- setup(props, ctx) {
1877
- return new InstitutionTreeInstance$1(props, ctx);
1878
- }
1879
- });
1880
- let InstitutionTreeInstance$1 = class InstitutionTreeInstance extends BaseInstance {
1881
- // 全局属性
1882
- constructor(props, ctx) {
1883
- super();
1884
- __publicField2(this, "props");
1885
- __publicField2(this, "ctx");
1886
- __publicField2(this, "institutionTreeApi", new InstitutionTreeApi());
1887
- __publicField2(this, "selectedPlatform");
1888
- __publicField2(this, "treeDatas", ref([]));
1889
- __publicField2(this, "treeGrid", ref());
1890
- __publicField2(this, "treeOption", reactive({
1891
- api: this.institutionTreeApi,
1892
- setting: {
1893
- border: false,
1894
- showHeader: false,
1895
- isTree: true,
1896
- toolbarConfig: {
1897
- isButtonGroup: false
1898
- },
1899
- rowConfig: {
1900
- isCurrent: true,
1901
- isHover: true,
1902
- keyField: "Id"
1903
- },
1904
- treeConfig: {
1905
- line: true,
1906
- expandAll: true,
1907
- hasChild: "HasChild"
1908
- }
1909
- },
1910
- columns: [
1911
- {
1912
- colType: "ro",
1913
- field: "InstitutionAbbreviation",
1914
- title: "名称",
1915
- minWidth: 200,
1916
- treeNode: true
1917
- }
1918
- ],
1919
- event: {
1920
- currentChange: ({ row }) => {
1921
- this.doChangeRow(row);
1922
- }
1923
- }
1924
- }));
1925
- __publicField2(this, "doChangePlatform", (data) => {
1926
- this.selectedPlatform = data;
1927
- this.loadInsTree();
1928
- });
1929
- __publicField2(this, "loadInsTree", () => {
1930
- this.treeGrid.value.loadData(async (option) => {
1931
- const apiResult = await this.institutionTreeApi.getInstitutionTrees(this.selectedPlatform.Id);
1932
- const datas = this.utilities.parseApiResult(apiResult);
1933
- this.treeDatas.value = datas;
1934
- await this.loadCount();
1935
- option.success(this.treeDatas.value);
1936
- });
1937
- });
1938
- __publicField2(this, "loadCount", async () => {
1939
- if (this.utilities.isNull(this.props.loadCount)) {
1940
- return;
1941
- }
1942
- await this.props.loadCount(this.treeDatas.value, this.selectedPlatform);
1943
- });
1944
- this.props = props;
1945
- this.ctx = ctx;
1946
- }
1947
- // 私有方法 | private 方法名() {}
1948
- /**
1949
- * 行改变事件
1950
- * @param row
1951
- */
1952
- doChangeRow(row) {
1953
- this.ctx.emit("change", row, this.selectedPlatform);
1954
- }
1955
- //#endregion 机构树 END
1956
- };
1957
- const propDefine$4$1 = {
1958
- multiple: {
1959
- // 是否多选
1960
- type: Boolean,
1961
- default: true
1962
- },
1963
- filterType: {
1964
- // 机构筛选类别 1:全部机构;2:当前机构;3:当前及以下机构;4:机构类别查询
1965
- type: Number,
1966
- default: 1
1967
- },
1968
- insTreeId: {
1969
- // 机构treeId,不传默认为当前登录人机构treeId
1970
- type: Number,
1971
- default: 0
1972
- }
1973
- };
1974
- defineComponent({
1975
- name: "ProjectSel",
1976
- components: {},
1977
- emits: ["on-select", "on-close"],
1978
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
1979
- props: propDefine$4$1,
1980
- setup(props, ctx) {
1981
- return new Instance(props, ctx);
1982
- }
1983
- });
1984
- class Instance extends BaseInstance {
1985
- constructor(props, ctx) {
1986
- super();
1987
- __publicField2(this, "props");
1988
- __publicField2(this, "ctx");
1989
- __publicField2(this, "institutionRoleApi", new InstitutionRoleApi());
1990
- __publicField2(this, "platformId", this.storageInfo.getCurrentPlatform().Id);
1991
- __publicField2(this, "insTreeId", this.storageInfo.getCurrentInsTree().Id);
1992
- __publicField2(this, "institutioninforApi", new InstitutioninforApi());
1993
- __publicField2(this, "institutionPlaneData", []);
1994
- __publicField2(this, "institutionShow", ref(false));
1995
- __publicField2(this, "institutionData", reactive([]));
1996
- __publicField2(this, "institutionTreeRef", ref());
1997
- __publicField2(this, "institutionRender", (h2, { data }) => {
1998
- return data.InstitutionAbbreviation;
1999
- });
2000
- __publicField2(this, "handleInstitutionChange", async () => {
2001
- const datas = this.institutionTreeRef.value.getCheckedNodes();
2002
- let insTreeIds = datas.map((e) => {
2003
- return e["Id"];
2004
- }).toString();
2005
- this.loadMainDataByBIIds(insTreeIds);
2006
- });
2007
- __publicField2(this, "handleInstitutionSelectChange", async (datas, data) => {
2008
- this.loadMainDataByBIIds(data.Id);
2009
- });
2010
- __publicField2(this, "userinforApi", new UserinforApi());
2011
- __publicField2(this, "mainSourceDatas", []);
2012
- __publicField2(this, "mainSelectData", []);
2013
- __publicField2(this, "personSearchText", ref(""));
2014
- __publicField2(this, "mainGridRef", ref());
2015
- __publicField2(this, "mainGridOption", reactive({
2016
- api: this.institutionRoleApi,
2017
- setting: {
2018
- isPagination: false,
2019
- toolbarConfig: {
2020
- isButtonGroup: false
2021
- },
2022
- editConfig: {
2023
- trigger: "click",
2024
- mode: "row",
2025
- showStatus: true
2026
- },
2027
- rowConfig: {
2028
- isCurrent: true,
2029
- isHover: true
2030
- }
2031
- },
2032
- columns: [
2033
- {
2034
- colType: "checkbox"
2035
- },
2036
- {
2037
- colType: "ro",
2038
- field: "InstitutionAbbreviation",
2039
- title: "机构",
2040
- align: "center"
2041
- },
2042
- {
2043
- colType: "ro",
2044
- field: "RoleName",
2045
- title: "部门",
2046
- align: "center"
2047
- },
2048
- {
2049
- colType: "ro",
2050
- field: "UserName",
2051
- title: "人员",
2052
- align: "center"
2053
- }
2054
- ],
2055
- event: {
2056
- checkboxChange: () => {
2057
- this.mainSelectData = this.mainGridRef.value.getCheckboxDatas();
2058
- },
2059
- currentChange: ({ row }) => {
2060
- if (!this.props.multiple) {
2061
- this.mainSelectData = [row];
2062
- }
2063
- }
2064
- }
2065
- }));
2066
- __publicField2(this, "handleMainSelectChange", (datas, data) => {
2067
- var _a;
2068
- if (data.selected) {
2069
- this.mainSelectData.splice(0, 1, data);
2070
- } else {
2071
- this.mainSelectData.splice(0, 1);
2072
- }
2073
- (_a = this.mainGridRef.value) == null ? void 0 : _a.loadData(async (options) => {
2074
- options.success(this.utilities.deepCopy(this.mainSelectData));
2075
- });
2076
- });
2077
- __publicField2(this, "close", () => {
2078
- this.ctx.emit("on-close");
2079
- });
2080
- __publicField2(this, "confirm", () => {
2081
- console.log(this.mainSelectData);
2082
- this.ctx.emit("on-select", this.mainSelectData);
2083
- });
2084
- __publicField2(this, "searchPerson", () => {
2085
- const res = this.mainSourceDatas.filter((e) => {
2086
- return e["UserName"].indexOf(this.personSearchText.value) > -1 || e["RoleName"].indexOf(this.personSearchText.value) > -1;
2087
- });
2088
- this.setMainData(res);
2089
- });
2090
- this.props = props;
2091
- this.ctx = ctx;
2092
- this.init();
2093
- }
2094
- init() {
2095
- if (this.props.insTreeId > 0) {
2096
- this.insTreeId = this.props.insTreeId;
2097
- }
2098
- this.setGridOptions();
2099
- onMounted(() => {
2100
- this.loadInstitution();
2101
- });
2102
- }
2103
- // 私有方法 | private 方法名() {}
2104
- // private test2() {}
2105
- /**获取机构数据 */
2106
- async loadInstitution() {
2107
- let res = this.utilities.parseApiResult(await this.institutioninforApi.GetInstitutioninforTree(this.platformId, this.props.filterType, this.insTreeId));
2108
- this.institutionPlaneData = res;
2109
- if (res.length === 1) {
2110
- this.loadMainDataByBIIds(res[0].Id);
2111
- } else {
2112
- this.institutionShow.value = true;
2113
- const treeData = this.parsePlaneToTree(res);
2114
- this.institutionData.splice(0, this.institutionData.length, ...treeData);
2115
- }
2116
- }
2117
- /**将平面数据解析为树 */
2118
- parsePlaneToTree(sourceData) {
2119
- const data = this.utilities.deepCopy(sourceData);
2120
- const treeData = data.filter((e) => e["PId"] === 0);
2121
- let innerFun = (levelData) => {
2122
- if (levelData.length === 0)
2123
- return;
2124
- levelData.forEach((item) => {
2125
- item.expand = true;
2126
- item.children = data.filter((e) => e["PId"] === item["Id"]);
2127
- innerFun(item.children);
2128
- });
2129
- };
2130
- innerFun(treeData);
2131
- return treeData;
2132
- }
2133
- // 私有方法 | private 方法名() {}
2134
- /**根据单选/多选设置表格配置 */
2135
- setGridOptions() {
2136
- if (this.props.multiple) {
2137
- this.mainGridOption.columns = [
2138
- {
2139
- colType: "checkbox"
2140
- },
2141
- {
2142
- colType: "ro",
2143
- field: "InstitutionAbbreviation",
2144
- title: "机构",
2145
- align: "center"
2146
- },
2147
- {
2148
- colType: "ro",
2149
- field: "RoleName",
2150
- title: "部门",
2151
- align: "center"
2152
- },
2153
- {
2154
- colType: "ro",
2155
- field: "UserName",
2156
- title: "人员",
2157
- align: "center"
2158
- }
2159
- ];
2160
- } else {
2161
- this.mainGridOption.columns = [
2162
- {
2163
- colType: "ro",
2164
- field: "InstitutionAbbreviation",
2165
- title: "机构",
2166
- align: "center"
2167
- },
2168
- {
2169
- colType: "ro",
2170
- field: "RoleName",
2171
- title: "部门",
2172
- align: "center"
2173
- },
2174
- {
2175
- colType: "ro",
2176
- field: "UserName",
2177
- title: "人员",
2178
- align: "center"
2179
- }
2180
- ];
2181
- }
2182
- }
2183
- /** 获取主表数据 */
2184
- async loadMainDataByBIIds(insTreeIds) {
2185
- if (insTreeIds.length === 0) {
2186
- this.setMainData();
2187
- return;
2188
- }
2189
- const res = this.utilities.parseApiResult(await this.userinforApi.getRoleUsersForInstitution(this.platformId, insTreeIds));
2190
- if (res) {
2191
- res.forEach((item) => {
2192
- let institution = this.institutionPlaneData.find((e) => e["Id"] === item.InsTreeId);
2193
- item.InstitutionAbbreviation = institution == null ? void 0 : institution.InstitutionAbbreviation;
2194
- const user = this.mainSelectData.find((e) => e["Id"] === item.Id);
2195
- if (user) {
2196
- item.checked = true;
2197
- }
2198
- });
2199
- this.mainSourceDatas = res;
2200
- this.setMainData(res);
2201
- }
2202
- }
2203
- /**设置人员表格数据 */
2204
- setMainData(datas = []) {
2205
- if (this.props.multiple) {
2206
- let unSelectDatas = datas.filter((e) => {
2207
- return !this.mainSelectData.find((item) => e["Id"] === item["Id"]);
2208
- });
2209
- datas = this.mainSelectData.concat(unSelectDatas);
2210
- }
2211
- this.mainGridRef.value.loadData(async (options) => {
2212
- options.success(datas);
2213
- });
2214
- }
2215
- //#endregion 人员相关 END
2216
- }
2217
- const propDefine$3$1 = {
2218
- theme: {
2219
- // 主题颜色 light dark
2220
- type: String,
2221
- default: "light"
2222
- },
2223
- autoLogin: {
2224
- // 自动登录
2225
- type: Boolean,
2226
- default: true
2227
- }
2228
- };
2229
- defineComponent({
2230
- name: "BaseLogin",
2231
- components: {},
2232
- emits: [""],
2233
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
2234
- props: propDefine$3$1,
2235
- setup(props, ctx) {
2236
- return new BaseLoginInstance2(props, ctx);
2237
- }
2238
- });
2239
- class BaseLoginInstance2 extends BaseInstance {
2240
- constructor(props, ctx) {
2241
- super();
2242
- __publicField2(this, "props");
2243
- __publicField2(this, "ctx");
2244
- __publicField2(this, "oauthApi", new OAuthApi());
2245
- __publicField2(this, "captchaApi", new CaptchaApi());
2246
- __publicField2(this, "router");
2247
- __publicField2(this, "aesKey", "d2140707ca3a469c8527e546fe961276");
2248
- __publicField2(this, "autoLogin", ref(true));
2249
- __publicField2(this, "userName", ref(""));
2250
- __publicField2(this, "passWord", ref(""));
2251
- __publicField2(this, "isloading", ref(false));
2252
- __publicField2(this, "loadType", ref("userName"));
2253
- __publicField2(this, "doUserNamePwdLogin", async () => {
2254
- if (this.utilities.isNull(this.userName.value)) {
2255
- this.loginTip.value = "用户名不能为空!";
2256
- return;
2257
- }
2258
- if (this.utilities.isNull(this.passWord.value)) {
2259
- this.loginTip.value = "密码不能为空!";
2260
- return;
2261
- }
2262
- this.login(this.userName.value, this.passWord.value);
2263
- });
2264
- __publicField2(this, "phone", ref(""));
2265
- __publicField2(this, "captcha", ref(""));
2266
- __publicField2(this, "canGetCaptcha", ref(true));
2267
- __publicField2(this, "canGetCaptchaTime", ref(60));
2268
- __publicField2(this, "sendCaptchaing", ref(false));
2269
- __publicField2(this, "loginTip", ref(""));
2270
- __publicField2(this, "doSendCaptcha", async () => {
2271
- this.sendCaptchaing.value = true;
2272
- this.loginTip.value = "";
2273
- const reg = /^[1][3,4,5,7,8]\d{9}$/;
2274
- if (!reg.test(this.phone.value)) {
2275
- this.loginTip.value = "手机号格式不正确, 请重新输入!";
2276
- this.sendCaptchaing.value = false;
2277
- return;
2278
- }
2279
- let apiResult = await this.oauthApi.existPhone(this.phone.value);
2280
- let result = this.utilities.parseApiResult(apiResult);
2281
- if (result != true) {
2282
- this.loginTip.value = "手机号未注册,请联系管理员!";
2283
- this.sendCaptchaing.value = false;
2284
- return;
2285
- }
2286
- apiResult = await this.captchaApi.sendPhoneCaptcha(this.phone.value);
2287
- result = this.utilities.parseApiResult(apiResult);
2288
- this.sendCaptchaing.value = false;
2289
- if (result > 0) {
2290
- this.message.success("发送成功!");
2291
- this.canGetCaptcha.value = false;
2292
- this.intervalId = setInterval(() => {
2293
- this.canGetCaptchaTime.value--;
2294
- if (this.canGetCaptchaTime.value == 0) {
2295
- this.canGetCaptcha.value = true;
2296
- this.canGetCaptchaTime.value = 60;
2297
- clearInterval(this.intervalId);
2298
- }
2299
- }, 1e3);
2300
- } else {
2301
- this.loginTip.value = apiResult.msg;
2302
- }
2303
- });
2304
- __publicField2(this, "doPhoneLogin", async () => {
2305
- this.isloading.value = true;
2306
- this.loginTip.value = "";
2307
- const reg = /^[1][3,4,5,7,8]\d{9}$/;
2308
- if (!reg.test(this.phone.value)) {
2309
- this.loginTip.value = `手机号格式不正确, 请重新输入!`;
2310
- this.isloading.value = false;
2311
- return;
2312
- }
2313
- if (this.utilities.isNull(this.captcha.value)) {
2314
- this.loginTip.value = `验证码不能为空!`;
2315
- this.isloading.value = false;
2316
- return;
2317
- }
2318
- const apiResult = await this.oauthApi.phoneLogin(this.phone.value, this.captcha.value);
2319
- const result = this.utilities.parseApiResult(apiResult);
2320
- this.isloading.value = false;
2321
- if (!result.IsSuccess) {
2322
- this.loginTip.value = result.Msg;
2323
- return;
2324
- }
2325
- this.message.success("登录成功");
2326
- this.storageInfo.removeAll();
2327
- this.setLoginResult(result);
2328
- });
2329
- __publicField2(this, "loginUserName", "");
2330
- __publicField2(this, "encryptPassword", "");
2331
- __publicField2(this, "loginResult");
2332
- __publicField2(this, "intervalId");
2333
- __publicField2(this, "showPhoneValidate", ref(false));
2334
- __publicField2(this, "sending", ref(false));
2335
- __publicField2(this, "canSendCaptcha", ref(true));
2336
- __publicField2(this, "resendTime", ref(60));
2337
- __publicField2(this, "validateing", ref(false));
2338
- __publicField2(this, "captchaFormRef", ref());
2339
- __publicField2(this, "phoneValidateModel", reactive({
2340
- Captcha: ""
2341
- }));
2342
- __publicField2(this, "phoneValidateRule", reactive({
2343
- Captcha: [
2344
- { required: true, message: "验证码不能空!", trigger: "blur" }
2345
- ]
2346
- }));
2347
- __publicField2(this, "doSendPhoneCaptcha", async () => {
2348
- this.sending.value = true;
2349
- const apiResult = await this.captchaApi.sendPhoneCaptcha(this.loginResult.User.Phone);
2350
- const result = this.utilities.parseApiResult(apiResult);
2351
- this.sending.value = false;
2352
- if (result > 0) {
2353
- this.message.success("发送成功!");
2354
- this.canSendCaptcha.value = false;
2355
- this.intervalId = setInterval(() => {
2356
- this.resendTime.value--;
2357
- if (this.resendTime.value == 0) {
2358
- this.canSendCaptcha.value = true;
2359
- this.resendTime.value = 60;
2360
- clearInterval(this.intervalId);
2361
- }
2362
- }, 1e3);
2363
- } else {
2364
- this.message.warning(apiResult.msg);
2365
- }
2366
- });
2367
- __publicField2(this, "doPhoneValidate", async () => {
2368
- this.validateing.value = true;
2369
- const valid = await this.captchaFormRef.value.validate();
2370
- if (!valid) {
2371
- this.validateing.value = false;
2372
- return;
2373
- }
2374
- let apiResult = await this.captchaApi.getCaptcha(this.loginResult.User.Phone);
2375
- let result = this.utilities.parseApiResult(apiResult);
2376
- this.validateing.value = false;
2377
- if (result == this.phoneValidateModel.Captcha) {
2378
- this.message.success("验证成功!");
2379
- this.loginSuccess(this.loginUserName, this.encryptPassword, this.loginResult, false);
2380
- await this.oauthApi.writeLoginToken(this.storageInfo.getToken());
2381
- this.router.push(this.storageInfo.getCurrentDefaultPath());
2382
- this.showPhoneValidate.value = false;
2383
- } else {
2384
- this.message.warning("验证码填写错误!");
2385
- }
2386
- });
2387
- __publicField2(this, "login", async (userName, password, isEncrypt = false) => {
2388
- this.isloading.value = true;
2389
- this.loginTip.value = "";
2390
- password = isEncrypt == true ? password : this.utilities.stringHelper.encryptAES(password, this.aesKey);
2391
- const apiResult = await this.oauthApi.login(userName, password);
2392
- const result = this.utilities.parseApiResult(apiResult);
2393
- this.isloading.value = false;
2394
- if (!result.IsSuccess) {
2395
- this.loginTip.value = result.Msg;
2396
- return;
2397
- }
2398
- if (result.NeedCaptcha) {
2399
- this.doShowPhoneValidate(userName, password, result);
2400
- } else {
2401
- this.loginSuccess(userName, password, result);
2402
- }
2403
- });
2404
- __publicField2(this, "setLoginResult", (result, isJump = true) => {
2405
- this.storageInfo.setToken(result.Token);
2406
- this.storageInfo.setUser(result.User);
2407
- this.storageInfo.setPlatforms(result.Platforms);
2408
- const platforms = this.storageInfo.getPlatforms();
2409
- if (!this.utilities.isNull(platforms) && platforms.length > 0) {
2410
- const platform = platforms.find((item) => item.PlatformNo == this.storageInfo.getPlatformNo());
2411
- this.storageInfo.setCurrentPlatform(this.utilities.isNull(platform) ? platforms[0] : platform);
2412
- }
2413
- const currentPlatform = this.storageInfo.getCurrentPlatform();
2414
- if (!this.utilities.isNull(currentPlatform) && currentPlatform.Modules.length > 0) {
2415
- this.storageInfo.setCurrentBusiness(currentPlatform.Modules[0]);
2416
- }
2417
- if (isJump) {
2418
- this.router.replace("/");
2419
- }
2420
- });
2421
- this.props = props;
2422
- this.ctx = ctx;
2423
- this.useAutoLogin();
2424
- }
2425
- // 私有方法 | private 方法名() {}
2426
- /**
2427
- * 自动登录
2428
- */
2429
- useAutoLogin() {
2430
- this.router = useRouter();
2431
- if (this.props.autoLogin) {
2432
- this.doAutoLogin();
2433
- }
2434
- }
2435
- /**
2436
- * 自动登录
2437
- */
2438
- async doAutoLogin() {
2439
- const autoLogin = this.storageInfo.getAutoLogin();
2440
- if (autoLogin != "1") {
2441
- this.storageInfo.removeAll();
2442
- return;
2443
- }
2444
- const autoLoginToken = this.storageInfo.getAutoLoginToken();
2445
- if (this.utilities.isNull(autoLoginToken)) {
2446
- return;
2447
- }
2448
- const splitAutoLoginToken = autoLoginToken.split(".");
2449
- if (splitAutoLoginToken.length != 2) {
2450
- return;
2451
- }
2452
- const userName = this.utilities.stringHelper.decryptAES(splitAutoLoginToken[1], this.aesKey);
2453
- const password = splitAutoLoginToken[0];
2454
- this.login(userName, password, true);
2455
- }
2456
- // 私有方法 | private 方法名() {}
2457
- /**
2458
- * 显示登录验证
2459
- * @param loginUserName
2460
- * @param encryptPassword
2461
- * @param result
2462
- */
2463
- doShowPhoneValidate(loginUserName, encryptPassword, result) {
2464
- this.loginUserName = loginUserName;
2465
- this.encryptPassword = encryptPassword;
2466
- this.loginResult = result;
2467
- this.showPhoneValidate.value = true;
2468
- }
2469
- //#endregion 新设备验证 END
2470
- //#region API
2471
- // 私有方法 | private 方法名() {}
2472
- /**
2473
- * 登录成功
2474
- * @param userName
2475
- * @param passWord
2476
- * @param result
2477
- * @param isJump
2478
- */
2479
- loginSuccess(userName, passWord, result, isJump = true) {
2480
- this.storageInfo.setAutoLogin(this.autoLogin.value ? "1" : "0");
2481
- this.storageInfo.setAutoLoginToken(this.autoLogin.value ? `${passWord}.${this.utilities.stringHelper.encryptAES(userName, this.aesKey)}` : "");
2482
- this.setLoginResult(result);
2483
- }
2484
- //#endregion API END
2485
- }
2486
- const propDefine$2$1 = {
2487
- defaultLoad: {
2488
- // 默认选中
2489
- type: Boolean,
2490
- default: true
2491
- },
2492
- width: {
2493
- // 宽度
2494
- type: String,
2495
- default: "320px"
2496
- },
2497
- showLabel: {
2498
- // 是否显示标签
2499
- type: Boolean,
2500
- default: true
2501
- }
2502
- };
2503
- defineComponent({
2504
- name: "SelectPlatform",
2505
- components: {},
2506
- emits: ["select"],
2507
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
2508
- props: propDefine$2$1,
2509
- setup(props, ctx) {
2510
- return new SelectPlatformInstance2(props, ctx);
2511
- }
2512
- });
2513
- class SelectPlatformInstance2 extends BaseInstance {
2514
- // 全局属性
2515
- constructor(props, ctx) {
2516
- super();
2517
- __publicField2(this, "props");
2518
- __publicField2(this, "ctx");
2519
- __publicField2(this, "platformApi", new PlatformApi());
2520
- __publicField2(this, "platforms", ref([]));
2521
- __publicField2(this, "selectPlatformId", ref(0));
2522
- __publicField2(this, "spinShow", ref(false));
2523
- __publicField2(this, "loadPlatforms", async () => {
2524
- this.spinShow.value = true;
2525
- const apiResult = await this.platformApi.getEntities(QueryWrapper.create().eq("1", "1").orderBy(["OrderNo"], true));
2526
- this.platforms.value = this.utilities.parseApiResult(apiResult);
2527
- this.spinShow.value = false;
2528
- if (this.platforms.value.length > 0 && this.selectPlatformId.value == 0) {
2529
- this.selectPlatformId.value = this.platforms.value[0].Id;
2530
- this.ctx.emit("select", this.platforms.value[0]);
2531
- }
2532
- });
2533
- __publicField2(this, "doPlatformChange", () => {
2534
- const data = this.platforms.value.find((item) => item.Id == this.selectPlatformId.value);
2535
- if (this.utilities.isNull(data)) {
2536
- return;
2537
- }
2538
- this.ctx.emit("select", data);
2539
- });
2540
- this.props = props;
2541
- this.ctx = ctx;
2542
- this.usePlatform();
2543
- }
2544
- // 私有方法 | private 方法名() {}
2545
- /**
2546
- * 初始化
2547
- */
2548
- usePlatform() {
2549
- if (this.props.defaultLoad) {
2550
- this.loadPlatforms();
2551
- }
2552
- }
2553
- //#endregion 系统平台 END
2554
- }
2555
- const propDefine$1$1 = {
2556
- platformId: {
2557
- // 平台Id
2558
- type: Number,
2559
- default: 0
2560
- },
2561
- userId: {
2562
- // 用户Id
2563
- type: Number,
2564
- default: 0
2565
- },
2566
- signContent: {
2567
- // 签字内容
2568
- type: String,
2569
- default: ""
2570
- },
2571
- signType: {
2572
- // 0:签字 1:签章
2573
- type: Number,
2574
- default: 0
2575
- },
2576
- signResult: {
2577
- // 签字结果
2578
- type: String,
2579
- default: ""
2580
- }
2581
- };
2582
- defineComponent({
2583
- name: "CASign",
2584
- components: {},
2585
- emits: ["signSuccess"],
2586
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
2587
- props: propDefine$1$1,
2588
- setup(props, ctx) {
2589
- return new CASignInstance2(props, ctx);
2590
- }
2591
- });
2592
- class CASignInstance2 extends BaseInstance {
2593
- // 全局属性
2594
- constructor(props, ctx) {
2595
- super();
2596
- __publicField2(this, "props");
2597
- __publicField2(this, "ctx");
2598
- __publicField2(this, "signTaskInfoApi", new SignTaskInfoApi$1());
2599
- __publicField2(this, "userSignApi", new UserSignApi());
2600
- __publicField2(this, "userSign");
2601
- __publicField2(this, "sealKey", "");
2602
- __publicField2(this, "hasSign", ref(false));
2603
- __publicField2(this, "signImg", ref(""));
2604
- __publicField2(this, "showSignPwd", ref(false));
2605
- __publicField2(this, "userPin", ref(""));
2606
- __publicField2(this, "signing", ref(false));
2607
- __publicField2(this, "doShowSignPwd", () => {
2608
- this.userPin.value = "";
2609
- this.showSignPwd.value = true;
2610
- });
2611
- __publicField2(this, "doRunSeal", async () => {
2612
- this.signing.value = true;
2613
- if (this.utilities.isNull(this.userPin.value)) {
2614
- this.message.error("请输入证书密钥");
2615
- this.signing.value = false;
2616
- return;
2617
- }
2618
- const signResult = await doSeal(this.sealKey, this.userPin.value, this.props.signContent);
2619
- this.signing.value = false;
2620
- if (signResult.code == -1) {
2621
- this.message.error(signResult.msg);
2622
- return;
2623
- }
2624
- this.ctx.emit("signSuccess", signResult.result);
2625
- this.hasSign.value = true;
2626
- this.showSignPwd.value = false;
2627
- });
2628
- this.props = props;
2629
- this.ctx = ctx;
2630
- this.useCASign();
2631
- }
2632
- // 私有方法 | private 方法名() {}
2633
- /**
2634
- * 初始化
2635
- */
2636
- useCASign() {
2637
- this.loadUserSign();
2638
- watch(() => this.props.signResult, () => {
2639
- this.hasSign.value = !this.utilities.isNull(this.props.signResult);
2640
- });
2641
- watch(() => this.props.userId, () => {
2642
- this.loadUserSign();
2643
- });
2644
- this.hasSign.value = !this.utilities.isNull(this.props.signResult);
2645
- }
2646
- /**
2647
- * 加载用户签字信息
2648
- * @returns
2649
- */
2650
- async loadUserSign() {
2651
- if (this.props.userId == 0) {
2652
- return;
2653
- }
2654
- const apiResult = await this.userSignApi.getEntityByFilter(QueryWrapper.create().eq("UserId", this.props.userId));
2655
- const result = this.utilities.parseApiResult(apiResult);
2656
- if (this.utilities.isNull(result)) {
2657
- this.message.error("该用户未配置签字信息");
2658
- return;
2659
- }
2660
- this.userSign = result;
2661
- this.signImg.value = this.props.signType == 0 ? this.userSign.CAUserSealImg : this.userSign.CAUserYZImg;
2662
- this.sealKey = this.props.signType == 0 ? this.userSign.CAUserSealKey : this.userSign.CAUserYZKey;
2663
- }
2664
- //#endregion 执行签字 END
2665
- }
2666
- const propDefine$l = {
2667
- loadCount: {
2668
- // 加载Count方法
2669
- type: Function
2670
- }
2671
- };
2672
- defineComponent({
2673
- name: "",
2674
- components: { SelectPlatform },
2675
- emits: ["change"],
2676
- // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
2677
- props: propDefine$l,
2678
- setup(props, ctx) {
2679
- return new InstitutionTreeInstance2(props, ctx);
2680
- }
2681
- });
2682
- class InstitutionTreeInstance2 extends BaseInstance {
2683
- // 全局属性
2684
- constructor(props, ctx) {
2685
- super();
2686
- __publicField2(this, "props");
2687
- __publicField2(this, "ctx");
2688
- __publicField2(this, "institutionTreeApi", new InstitutionTreeApi());
2689
- __publicField2(this, "selectedPlatform");
2690
- __publicField2(this, "treeDatas", ref([]));
2691
- __publicField2(this, "treeGrid", ref());
2692
- __publicField2(this, "treeOption", reactive({
2693
- api: this.institutionTreeApi,
2694
- setting: {
2695
- border: false,
2696
- showHeader: false,
2697
- isTree: true,
2698
- toolbarConfig: {
2699
- isButtonGroup: false
2700
- },
2701
- rowConfig: {
2702
- isCurrent: true,
2703
- isHover: true,
2704
- keyField: "Id"
2705
- },
2706
- treeConfig: {
2707
- line: true,
2708
- expandAll: true,
2709
- hasChild: "HasChild"
2710
- }
2711
- },
2712
- columns: [
2713
- {
2714
- colType: "ro",
2715
- field: "InstitutionAbbreviation",
2716
- title: "名称",
2717
- minWidth: 200,
2718
- treeNode: true
2719
- }
2720
- ],
2721
- event: {
2722
- currentChange: ({ row }) => {
2723
- this.doChangeRow(row);
2724
- }
2725
- }
2726
- }));
2727
- __publicField2(this, "doChangePlatform", (data) => {
2728
- this.selectedPlatform = data;
2729
- this.loadInsTree();
2730
- });
2731
- __publicField2(this, "loadInsTree", () => {
2732
- this.treeGrid.value.loadData(async (option) => {
2733
- const apiResult = await this.institutionTreeApi.getInstitutionTrees(this.selectedPlatform.Id);
2734
- const datas = this.utilities.parseApiResult(apiResult);
2735
- this.treeDatas.value = datas;
2736
- await this.loadCount();
2737
- option.success(this.treeDatas.value);
2738
- });
2739
- });
2740
- __publicField2(this, "loadCount", async () => {
2741
- if (this.utilities.isNull(this.props.loadCount)) {
2742
- return;
2743
- }
2744
- await this.props.loadCount(this.treeDatas.value, this.selectedPlatform);
2745
- });
2746
- this.props = props;
2747
- this.ctx = ctx;
2748
- }
2749
- // 私有方法 | private 方法名() {}
2750
- /**
2751
- * 行改变事件
2752
- * @param row
2753
- */
2754
- doChangeRow(row) {
2755
- this.ctx.emit("change", row, this.selectedPlatform);
2756
- }
2757
- //#endregion 机构树 END
451
+ default: withCtx(() => [
452
+ createVNode(_component_Button, {
453
+ type: "text",
454
+ onClick: _ctx.doRefresh
455
+ }, {
456
+ default: withCtx(() => [
457
+ createTextVNode("刷新")
458
+ ]),
459
+ _: 1
460
+ }, 8, ["onClick"])
461
+ ]),
462
+ _: 1
463
+ })
464
+ ])
465
+ ]),
466
+ default: withCtx(() => [
467
+ createVNode(_component_NvList, {
468
+ ref: "groupData",
469
+ option: _ctx.groupOption,
470
+ onSelect: _ctx.groupSelect
471
+ }, null, 8, ["option", "onSelect"])
472
+ ]),
473
+ _: 1
474
+ }),
475
+ createVNode(_component_NvBox, {
476
+ class: "nv-flex-1",
477
+ title: "系统平台"
478
+ }, {
479
+ default: withCtx(() => [
480
+ createVNode(_component_NvGrid, {
481
+ ref: "platformGrid",
482
+ option: _ctx.platformGridOption
483
+ }, null, 8, ["option"])
484
+ ]),
485
+ _: 1
486
+ }),
487
+ createVNode(_component_Modal, {
488
+ modelValue: _ctx.showEditPlatform,
489
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.showEditPlatform = $event),
490
+ draggable: "",
491
+ mask: true,
492
+ "mask-closable": false,
493
+ width: 500,
494
+ title: _ctx.editPlatformModalTitle,
495
+ styles: { top: "3%" }
496
+ }, {
497
+ footer: withCtx(() => [
498
+ createVNode(_component_Button, {
499
+ type: "text",
500
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.showEditPlatform = false)
501
+ }, {
502
+ default: withCtx(() => [
503
+ createTextVNode("关闭")
504
+ ]),
505
+ _: 1
506
+ }),
507
+ createVNode(_component_Button, {
508
+ type: "primary",
509
+ loading: _ctx.saveingPlatform,
510
+ onClick: _ctx.doSavePlatform
511
+ }, {
512
+ default: withCtx(() => [
513
+ createTextVNode("保存")
514
+ ]),
515
+ _: 1
516
+ }, 8, ["loading", "onClick"])
517
+ ]),
518
+ default: withCtx(() => [
519
+ createElementVNode("div", _hoisted_2$b, [
520
+ createVNode(_component_Form, {
521
+ ref: "refPlatformForm",
522
+ model: _ctx.platformFormModel,
523
+ "label-width": 120
524
+ }, {
525
+ default: withCtx(() => [
526
+ createVNode(_component_NvComForm, {
527
+ formModel: _ctx.platformFormModel,
528
+ formItems: _ctx.platformFormItems
529
+ }, null, 8, ["formModel", "formItems"])
530
+ ]),
531
+ _: 1
532
+ }, 8, ["model"])
533
+ ])
534
+ ]),
535
+ _: 1
536
+ }, 8, ["modelValue", "title"]),
537
+ createVNode(_component_Modal, {
538
+ modelValue: _ctx.showEditGroup,
539
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.showEditGroup = $event),
540
+ draggable: "",
541
+ mask: true,
542
+ "mask-closable": false,
543
+ width: 500,
544
+ title: _ctx.editGroupformModalTitle,
545
+ styles: { top: "3%" }
546
+ }, {
547
+ footer: withCtx(() => [
548
+ createVNode(_component_Button, {
549
+ type: "text",
550
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showEditGroup = false)
551
+ }, {
552
+ default: withCtx(() => [
553
+ createTextVNode("关闭")
554
+ ]),
555
+ _: 1
556
+ }),
557
+ createVNode(_component_Button, {
558
+ type: "primary",
559
+ loading: _ctx.saveingGroupform,
560
+ onClick: _ctx.doSaveGroupform
561
+ }, {
562
+ default: withCtx(() => [
563
+ createTextVNode("保存")
564
+ ]),
565
+ _: 1
566
+ }, 8, ["loading", "onClick"])
567
+ ]),
568
+ default: withCtx(() => [
569
+ createElementVNode("div", _hoisted_3$a, [
570
+ createVNode(_component_Form, {
571
+ ref: "refGroupForm",
572
+ model: _ctx.groupFormModel,
573
+ "label-width": 115
574
+ }, {
575
+ default: withCtx(() => [
576
+ createVNode(_component_NvComForm, {
577
+ formModel: _ctx.groupFormModel,
578
+ formItems: _ctx.groupFormItems
579
+ }, null, 8, ["formModel", "formItems"])
580
+ ]),
581
+ _: 1
582
+ }, 8, ["model"])
583
+ ])
584
+ ]),
585
+ _: 1
586
+ }, 8, ["modelValue", "title"])
587
+ ]),
588
+ _: 1
589
+ });
2758
590
  }
591
+ const Platform = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-f58b0adc"]]);
2759
592
  const propDefine$k = {
2760
593
  linkParam: {
2761
594
  // 带入的参数
@@ -3810,7 +1643,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
3810
1643
  _: 1
3811
1644
  });
3812
1645
  }
3813
- const Module = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-5a5ef504"]]);
1646
+ const Module = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-5a5ef504"]]);
3814
1647
  const propDefine$j = {
3815
1648
  linkParam: {
3816
1649
  // 带入的参数
@@ -4826,7 +2659,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
4826
2659
  _: 1
4827
2660
  });
4828
2661
  }
4829
- const Role = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-0f25fe31"]]);
2662
+ const Role = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-0f25fe31"]]);
4830
2663
  const propDefine$i = {
4831
2664
  linkParam: {
4832
2665
  // 带入的参数
@@ -5122,7 +2955,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
5122
2955
  _: 1
5123
2956
  });
5124
2957
  }
5125
- const InstitutionType = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["render", _sfc_render$i], ["__scopeId", "data-v-947fe129"]]);
2958
+ const InstitutionType = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$i], ["__scopeId", "data-v-947fe129"]]);
5126
2959
  const propDefine$h = {
5127
2960
  linkParam: {
5128
2961
  // 带入的参数
@@ -6322,7 +4155,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
6322
4155
  _: 1
6323
4156
  });
6324
4157
  }
6325
- const Institution = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-42799ba1"]]);
4158
+ const Institution = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-42799ba1"]]);
6326
4159
  const propDefine$g = {};
6327
4160
  const _sfc_main$g = defineComponent({
6328
4161
  name: "LoginLog",
@@ -6444,55 +4277,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
6444
4277
  }, null, 8, ["option"])
6445
4278
  ]);
6446
4279
  }
6447
- const LoginLog$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-4e2e0184"]]);
6448
- class CASignBaseApi2 extends BaseOldApi {
6449
- get ProxyName() {
6450
- return "CASignApi";
6451
- }
6452
- }
6453
- class SignTaskInfoApi2 extends CASignBaseApi2 {
6454
- get ControllerName() {
6455
- return "SignTaskInfo";
6456
- }
6457
- /**
6458
- * 验证签章信息
6459
- * @param taskKey
6460
- * @returns
6461
- */
6462
- SignVerification(taskKey) {
6463
- return this.send({ taskKey }, "SignVerification", Methods.GET);
6464
- }
6465
- /**
6466
- * 获取印章信息
6467
- * @param businessKey
6468
- * @param userSealKey
6469
- * @returns
6470
- */
6471
- GetUserSealCloudInfo(businessKey, userSealKey) {
6472
- return this.send({ businessKey, userSealKey }, "GetUserSealCloudInfo", Methods.GET);
6473
- }
6474
- /**
6475
- * 云签签章
6476
- * @param businessKey
6477
- * @param userSealKey
6478
- * @param userPin
6479
- * @param signContent
6480
- * @returns
6481
- */
6482
- SendCloudSignTask(businessKey, userSealKey, userPin, signContent) {
6483
- return this.send({ BusinessKey: businessKey, UserSealKey: userSealKey, UserPin: userPin, SignContent: signContent }, "SendCloudSignTask", Methods.POST);
6484
- }
6485
- /**
6486
- * 云签验章
6487
- * @param businessKey
6488
- * @param taskKey
6489
- * @param SignContent
6490
- * @returns
6491
- */
6492
- SendCloudVerificationSign(businessKey, taskKey, SignContent) {
6493
- return this.send({ businessKey, taskKey, SignContent }, "SendCloudVerificationSign", Methods.GET);
6494
- }
6495
- }
4280
+ const LoginLog$1 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-4e2e0184"]]);
6496
4281
  const propDefine$f = {
6497
4282
  linkParam: {
6498
4283
  // 带入的参数
@@ -6530,7 +4315,7 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
6530
4315
  __publicField(this, "roleApi", new RoleApi());
6531
4316
  __publicField(this, "oauthApi", new OAuthApi());
6532
4317
  __publicField(this, "userSignApi", new UserSignApi());
6533
- __publicField(this, "signTaskInfoApi", new SignTaskInfoApi2());
4318
+ __publicField(this, "signTaskInfoApi", new SignTaskInfoApi());
6534
4319
  // 全局属性
6535
4320
  __publicField(this, "selectedPlatform");
6536
4321
  //#region 组织机构树
@@ -6938,7 +4723,7 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
6938
4723
  UserId: result,
6939
4724
  InsTreeId: this.selectedInsTree.Id
6940
4725
  });
6941
- await this.userinforApi.resetUserPwd(result);
4726
+ await this.userinforApi.initialUserPwd(result, this.selectedPlatform.Id);
6942
4727
  }
6943
4728
  this.saveingUser.value = false;
6944
4729
  if (result > 0) {
@@ -7922,7 +5707,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
7922
5707
  _: 1
7923
5708
  });
7924
5709
  }
7925
- const Userinfor = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-3969fae6"]]);
5710
+ const Userinfor = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-3969fae6"]]);
7926
5711
  const propDefine$e = {
7927
5712
  linkParam: {
7928
5713
  // 带入的参数
@@ -8419,7 +6204,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
8419
6204
  _: 1
8420
6205
  });
8421
6206
  }
8422
- const Enterprise = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-58aa3e77"]]);
6207
+ const Enterprise = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-58aa3e77"]]);
8423
6208
  class DBCenterBaseApi extends BaseApi {
8424
6209
  get ProxyName() {
8425
6210
  return "CalcPythonApi";
@@ -8619,7 +6404,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
8619
6404
  }, 8, ["modelValue", "title", "onOnVisibleChange"])
8620
6405
  ], 64);
8621
6406
  }
8622
- const filePreview = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-33abffa5"]]);
6407
+ const filePreview = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-33abffa5"]]);
8623
6408
  const propDefine$c = {
8624
6409
  linkParam: {
8625
6410
  // 带入的参数
@@ -9246,7 +7031,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
9246
7031
  }, null, 8, ["modelValue", "preview-list", "preview-index", "file-info"])
9247
7032
  ]);
9248
7033
  }
9249
- const UploadFile = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-43bf6b9a"]]);
7034
+ const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-43bf6b9a"]]);
9250
7035
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9251
7036
  function getDefaultExportFromCjs(x) {
9252
7037
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -23741,7 +21526,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
23741
21526
  }, null, 8, ["content", "readOnly", "theme", "onTextChange", "options"])) : createCommentVNode("", true)
23742
21527
  ], 2);
23743
21528
  }
23744
- const TextEditor2 = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-3d4d07e3"]]);
21529
+ const TextEditor2 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-3d4d07e3"]]);
23745
21530
  const propDefine$a = {
23746
21531
  onlyView: {
23747
21532
  // 是否只读
@@ -23851,7 +21636,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
23851
21636
  _: 1
23852
21637
  }, 8, ["onlyView", "formItems", "formModel"]);
23853
21638
  }
23854
- const NvComFormUp = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["render", _sfc_render$a]]);
21639
+ const NvComFormUp = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
23855
21640
  const propDefine$9 = {
23856
21641
  linkParam: {
23857
21642
  // 带入的参数
@@ -24316,7 +22101,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
24316
22101
  _: 1
24317
22102
  });
24318
22103
  }
24319
- const Information = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9]]);
22104
+ const Information = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
24320
22105
  const propDefine$8 = {
24321
22106
  linkParam: {
24322
22107
  // 带入的参数
@@ -24937,7 +22722,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
24937
22722
  _: 1
24938
22723
  });
24939
22724
  }
24940
- const GeneralConfiguration = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-a01b6a2e"]]);
22725
+ const GeneralConfiguration = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-a01b6a2e"]]);
24941
22726
  const propDefine$7 = {
24942
22727
  linkParam: {
24943
22728
  // 带入的参数
@@ -25131,14 +22916,15 @@ class PlatformInstance2 extends BaseInstance {
25131
22916
  PlatformName: "",
25132
22917
  PlatformAbbreviation: "",
25133
22918
  OssRootPath: "",
25134
- PlatformGroup: 0,
22919
+ PlatformGroup: "0",
25135
22920
  PlatformUrl: "",
25136
22921
  OrderNo: 0,
25137
22922
  CABusinessKey: "",
25138
22923
  PId: 0,
25139
22924
  LastUpdateUserId: 0,
25140
22925
  LastUpdateUserName: "",
25141
- LastUpdateDate: ""
22926
+ LastUpdateDate: "",
22927
+ DefaultPwd: ""
25142
22928
  }));
25143
22929
  __publicField(this, "platformFormItems", reactive([
25144
22930
  { model: "PlatformName", label: "系统名称", prop: "PlatformName", type: "Input", span: 24, rules: [{ required: true, message: "系统名称不能为空", trigger: "blur" }] },
@@ -25155,11 +22941,16 @@ class PlatformInstance2 extends BaseInstance {
25155
22941
  datas: [],
25156
22942
  transfer: true,
25157
22943
  clearable: true,
25158
- multiple: false
22944
+ multiple: false,
22945
+ onChange: (event, data) => {
22946
+ const gropId = data.selectProp.datas.find((item) => item.value == event);
22947
+ this.platformFormModel.PlatformGroup = !this.utilities.isNull(gropId.PlatformGroup) ? gropId.PlatformGroup : "0";
22948
+ }
25159
22949
  }
25160
22950
  },
25161
22951
  { model: "PlatformUrl", label: "系统URL", prop: "PlatformUrl", type: "Input", span: 24 },
25162
22952
  { model: "CABusinessKey", label: "CAKey", prop: "CABusinessKey", type: "Input", span: 24 },
22953
+ { model: "DefaultPwd", label: "用户默认密码", prop: "DefaultPwd", type: "Input", span: 24 },
25163
22954
  { model: "OrderNo", label: "排序号", prop: "OrderNo", type: "InputNumber", span: 24 }
25164
22955
  ]));
25165
22956
  // 响应式方法 | xxx = () => {}
@@ -25244,12 +23035,13 @@ class PlatformInstance2 extends BaseInstance {
25244
23035
  this.platformFormModel.LastUpdateUserId = user.Id;
25245
23036
  this.platformFormModel.LastUpdateUserName = user.UserName;
25246
23037
  this.platformFormModel.LastUpdateDate = this.utilities.getCurrentDate();
25247
- this.platformFormModel.PId = data.PId;
23038
+ this.platformFormModel.DefaultPwd = data.DefaultPwd;
25248
23039
  const tableData = (_a = this.platformGrid.value) == null ? void 0 : _a.getDatas();
25249
23040
  this.platformFormItems[4].selectProp.datas = tableData.length > 0 ? tableData == null ? void 0 : tableData.map((item) => {
25250
23041
  return {
25251
23042
  value: item.Id,
25252
- text: item.PlatformAbbreviation
23043
+ text: item.PlatformAbbreviation,
23044
+ PlatformGroup: item.PlatformGroup
25253
23045
  };
25254
23046
  }) : [];
25255
23047
  this.editPlatformModalTitle.value = `编辑 - ${data.PlatformName}`;
@@ -25267,27 +23059,30 @@ class PlatformInstance2 extends BaseInstance {
25267
23059
  this.platformFormModel.PlatformName = "";
25268
23060
  this.platformFormModel.PlatformAbbreviation = "";
25269
23061
  this.platformFormModel.OssRootPath = "";
25270
- this.platformFormModel.PlatformGroup = 0;
25271
23062
  this.platformFormModel.PlatformUrl = "";
25272
23063
  this.platformFormModel.CABusinessKey = "";
25273
23064
  this.platformFormModel.OrderNo = 0;
25274
23065
  this.platformFormModel.LastUpdateUserId = user.Id;
25275
23066
  this.platformFormModel.LastUpdateUserName = user.UserName;
25276
23067
  this.platformFormModel.LastUpdateDate = this.utilities.getCurrentDate();
23068
+ this.platformFormModel.DefaultPwd = "";
25277
23069
  this.editPlatformModalTitle.value = `新增 - 系统平台`;
25278
23070
  const data = (_a = this.platformGrid.value) == null ? void 0 : _a.getDatas();
25279
23071
  this.platformFormItems[4].selectProp.datas = data.length > 0 ? data == null ? void 0 : data.map((item) => {
25280
23072
  return {
25281
23073
  value: item.Id,
25282
- text: item.PlatformAbbreviation
23074
+ text: item.PlatformAbbreviation,
23075
+ PlatformGroup: item.PlatformGroup
25283
23076
  };
25284
23077
  }) : [];
23078
+ this.platformFormModel.PId = data.length > 0 ? data[0].Id : 0;
23079
+ this.platformFormModel.PlatformGroup = data.length > 0 ? data[0].PlatformGroup : 0;
25285
23080
  this.showEditPlatform.value = true;
25286
23081
  }
25287
23082
  //#endregion 系统平台编辑 END
25288
23083
  }
25289
- const Platform_vue_vue_type_style_index_0_scoped_30a3712d_lang = "";
25290
- const _hoisted_1$7 = { style: { "height": "500px", "overflow-y": "auto" } };
23084
+ const Platform_vue_vue_type_style_index_0_scoped_fbc0e7f2_lang = "";
23085
+ const _hoisted_1$7 = { style: { "height": "550px", "overflow-y": "auto" } };
25291
23086
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
25292
23087
  const _component_NvGrid = resolveComponent("NvGrid");
25293
23088
  const _component_NvBox = resolveComponent("NvBox");
@@ -25347,7 +23142,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
25347
23142
  createVNode(_component_Form, {
25348
23143
  ref: "refPlatformForm",
25349
23144
  model: _ctx.platformFormModel,
25350
- "label-width": 95
23145
+ "label-width": 120
25351
23146
  }, {
25352
23147
  default: withCtx(() => [
25353
23148
  createVNode(_component_NvComForm, {
@@ -25391,7 +23186,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
25391
23186
  _: 1
25392
23187
  });
25393
23188
  }
25394
- const subplatform = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-30a3712d"]]);
23189
+ const subplatform = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-fbc0e7f2"]]);
25395
23190
  const propDefine$6 = {
25396
23191
  linkParam: {
25397
23192
  // 带入的参数
@@ -26471,7 +24266,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
26471
24266
  _: 1
26472
24267
  });
26473
24268
  }
26474
- const subrole = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-ffab91cb"]]);
24269
+ const subrole = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-ffab91cb"]]);
26475
24270
  const propDefine$5 = {
26476
24271
  linkParam: {
26477
24272
  // 带入的参数
@@ -27026,7 +24821,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
27026
24821
  _: 1
27027
24822
  });
27028
24823
  }
27029
- const subenterprise = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-57711b94"]]);
24824
+ const subenterprise = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-57711b94"]]);
27030
24825
  const propDefine$4 = {
27031
24826
  linkParam: {
27032
24827
  // 带入的参数
@@ -28302,7 +26097,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
28302
26097
  _: 1
28303
26098
  });
28304
26099
  }
28305
- const subinstitution = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-ed65a91d"]]);
26100
+ const subinstitution = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-ed65a91d"]]);
28306
26101
  const propDefine$3 = {};
28307
26102
  const _sfc_main$3 = defineComponent({
28308
26103
  name: "LoginLog",
@@ -28424,7 +26219,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
28424
26219
  }, null, 8, ["option"])
28425
26220
  ]);
28426
26221
  }
28427
- const LoginLog = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-a0d5af5b"]]);
26222
+ const LoginLog = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-a0d5af5b"]]);
28428
26223
  const propDefine$2 = {
28429
26224
  linkParam: {
28430
26225
  // 带入的参数
@@ -28462,7 +26257,7 @@ class UserinforInstance2 extends BaseInstance {
28462
26257
  __publicField(this, "roleApi", new RoleApi());
28463
26258
  __publicField(this, "oauthApi", new OAuthApi());
28464
26259
  __publicField(this, "userSignApi", new UserSignApi());
28465
- __publicField(this, "signTaskInfoApi", new SignTaskInfoApi2());
26260
+ __publicField(this, "signTaskInfoApi", new SignTaskInfoApi());
28466
26261
  // 全局属性
28467
26262
  __publicField(this, "selectedPlatform");
28468
26263
  //#region 系统平台
@@ -28900,7 +26695,7 @@ class UserinforInstance2 extends BaseInstance {
28900
26695
  UserId: result,
28901
26696
  InsTreeId: this.selectedInsTree.Id
28902
26697
  });
28903
- await this.userinforApi.resetUserPwd(result);
26698
+ await this.userinforApi.initialUserPwd(result, this.selectedPlatform.Id);
28904
26699
  }
28905
26700
  this.saveingUser.value = false;
28906
26701
  if (result > 0) {
@@ -29513,8 +27308,8 @@ class UserinforInstance2 extends BaseInstance {
29513
27308
  // 响应式方法 | xxx = () => {}
29514
27309
  //#endregion 重置密码 END
29515
27310
  }
29516
- const Userinfor_vue_vue_type_style_index_0_scoped_e699b018_lang = "";
29517
- const _withScopeId$2 = (n) => (pushScopeId("data-v-e699b018"), n = n(), popScopeId(), n);
27311
+ const Userinfor_vue_vue_type_style_index_0_scoped_4827d4a9_lang = "";
27312
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-4827d4a9"), n = n(), popScopeId(), n);
29518
27313
  const _hoisted_1$2 = { class: "instree-search" };
29519
27314
  const _hoisted_2$2 = { class: "instree-list" };
29520
27315
  const _hoisted_3$2 = { style: { "height": "600px", "overflow-y": "auto" } };
@@ -29926,7 +27721,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
29926
27721
  _: 1
29927
27722
  });
29928
27723
  }
29929
- const subuserinfor = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-e699b018"]]);
27724
+ const subuserinfor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-4827d4a9"]]);
29930
27725
  const propDefine$1 = {
29931
27726
  linkParam: {
29932
27727
  // 带入的参数
@@ -31063,7 +28858,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
31063
28858
  _: 1
31064
28859
  });
31065
28860
  }
31066
- const subModule = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-23a8ab5f"]]);
28861
+ const subModule = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-23a8ab5f"]]);
31067
28862
  const propDefine = {
31068
28863
  linkParam: {
31069
28864
  // 带入的参数
@@ -31101,7 +28896,7 @@ class ProjectUserinforInstance extends BaseInstance {
31101
28896
  __publicField(this, "roleApi", new RoleApi());
31102
28897
  __publicField(this, "oauthApi", new OAuthApi());
31103
28898
  __publicField(this, "userSignApi", new UserSignApi());
31104
- __publicField(this, "signTaskInfoApi", new SignTaskInfoApi2());
28899
+ __publicField(this, "signTaskInfoApi", new SignTaskInfoApi());
31105
28900
  // 全局属性
31106
28901
  __publicField(this, "selectedPlatform");
31107
28902
  //#region 系统平台
@@ -31530,7 +29325,7 @@ class ProjectUserinforInstance extends BaseInstance {
31530
29325
  UserId: result,
31531
29326
  InsTreeId: this.selectedInsTree.Id
31532
29327
  });
31533
- await this.userinforApi.resetUserPwd(result);
29328
+ await this.userinforApi.initialUserPwd(result, this.selectedPlatform.Id);
31534
29329
  }
31535
29330
  this.saveingUser.value = false;
31536
29331
  if (result > 0) {
@@ -31873,50 +29668,6 @@ class ProjectUserinforInstance extends BaseInstance {
31873
29668
  this.message.error("读取失败,请稍后重试");
31874
29669
  }
31875
29670
  });
31876
- //#region 重置密码
31877
- __publicField(this, "showPW", ref(false));
31878
- __publicField(this, "curUser", {});
31879
- __publicField(this, "pwUserComForm", ref());
31880
- __publicField(this, "pwFormModel", reactive({
31881
- newPwd: "",
31882
- oldPwd: "",
31883
- AffirmPassword: ""
31884
- }));
31885
- __publicField(this, "pwFormItems", reactive([
31886
- { model: "oldPwd", label: "原密码", span: 24, type: "Input", inputProp: { type: "password", password: true }, prop: "oldPwd", rules: [{ required: true, message: "请输入原密码", trigger: "blur" }] },
31887
- { model: "newPwd", label: "新密码", span: 24, type: "Input", inputProp: { type: "password", password: true }, prop: "newPwd", rules: [{ required: true, message: "请输入新密码", trigger: "blur" }] },
31888
- { model: "AffirmPassword", label: "确认密码", span: 24, type: "Input", inputProp: { type: "password", password: true }, prop: "AffirmPassword", rules: [{ required: true, message: "请确认密码", trigger: "blur" }] }
31889
- ]));
31890
- // private doResetUserPwd(userId: number) {
31891
- // this.pwFormModel.newPwd = ''
31892
- // this.pwFormModel.oldPwd = ''
31893
- // this.pwFormModel.AffirmPassword = ''
31894
- // this.showPW.value = true
31895
- // this.curUser = userId
31896
- // }
31897
- // 响应式方法 | xxx = () => {}
31898
- __publicField(this, "savePassword", async () => {
31899
- const validate = await this.pwUserComForm.value.validate();
31900
- if (!validate) {
31901
- return;
31902
- }
31903
- if (this.pwFormModel.newPwd != this.pwFormModel.AffirmPassword) {
31904
- this.message.warning("请确认两次密码输入一致");
31905
- return;
31906
- }
31907
- const res = this.utilities.parseApiResult(await this.userinforApi.updateUserPwd(this.curUser, this.pwFormModel.newPwd));
31908
- if (res > 0) {
31909
- const apiResult = await this.userinforApi.resetUserPwd(this.curUser);
31910
- const result = this.utilities.parseApiResult(apiResult);
31911
- if (result > 0) {
31912
- this.message.success("重置成功");
31913
- } else {
31914
- this.message.error("操作失败,请稍后重试");
31915
- }
31916
- } else {
31917
- this.message.error("操作失败,请稍后重试");
31918
- }
31919
- });
31920
29671
  this.props = props;
31921
29672
  this.ctx = ctx;
31922
29673
  this.initData();
@@ -32135,6 +29886,25 @@ class ProjectUserinforInstance extends BaseInstance {
32135
29886
  this.loginRef.value.setLoginResult(result);
32136
29887
  }
32137
29888
  // 私有方法 | private 方法名() {}
29889
+ /**
29890
+ * 重置密码
29891
+ * @param userId
29892
+ */
29893
+ doResetUserPwd(userId) {
29894
+ this.modal.confirm({
29895
+ title: "提示",
29896
+ content: "确定要重置为初始密码吗?",
29897
+ onOk: async () => {
29898
+ const apiResult = await this.userinforApi.resetUserPwd(userId);
29899
+ const result = this.utilities.parseApiResult(apiResult);
29900
+ if (result > 0) {
29901
+ this.message.success("重置成功");
29902
+ } else {
29903
+ this.message.error("操作失败,请稍后重试");
29904
+ }
29905
+ }
29906
+ });
29907
+ }
32138
29908
  /**
32139
29909
  * 编辑用户签字
32140
29910
  */
@@ -32170,32 +29940,9 @@ class ProjectUserinforInstance extends BaseInstance {
32170
29940
  callback();
32171
29941
  }
32172
29942
  }
32173
- // 私有属性 | private
32174
- // 响应属性 | ref、reactive、computed、watch
32175
- // 私有方法 | private 方法名() {}
32176
- /**
32177
- * 重置密码
32178
- * @param userId
32179
- */
32180
- doResetUserPwd(userId) {
32181
- this.modal.confirm({
32182
- title: "提示",
32183
- content: "确定要重置为初始密码吗?",
32184
- onOk: async () => {
32185
- const apiResult = await this.userinforApi.resetUserPwd(userId);
32186
- const result = this.utilities.parseApiResult(apiResult);
32187
- if (result > 0) {
32188
- this.message.success("重置成功");
32189
- } else {
32190
- this.message.error("操作失败,请稍后重试");
32191
- }
32192
- }
32193
- });
32194
- }
32195
- //#endregion 业务逻辑 END
32196
29943
  }
32197
- const ProjectUserinfor_vue_vue_type_style_index_0_scoped_9a899d22_lang = "";
32198
- const _withScopeId = (n) => (pushScopeId("data-v-9a899d22"), n = n(), popScopeId(), n);
29944
+ const ProjectUserinfor_vue_vue_type_style_index_0_scoped_86385f96_lang = "";
29945
+ const _withScopeId = (n) => (pushScopeId("data-v-86385f96"), n = n(), popScopeId(), n);
32199
29946
  const _hoisted_1 = { class: "instree-search" };
32200
29947
  const _hoisted_2 = { class: "instree-list" };
32201
29948
  const _hoisted_3 = { style: { "height": "600px", "overflow-y": "auto" } };
@@ -32554,60 +30301,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32554
30301
  ])
32555
30302
  ]),
32556
30303
  _: 1
32557
- }, 8, ["modelValue"]),
32558
- createVNode(_component_Modal, {
32559
- modelValue: _ctx.showPW,
32560
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.showPW = $event),
32561
- draggable: "",
32562
- mask: true,
32563
- "mask-closable": false,
32564
- width: 500,
32565
- title: "修改密码",
32566
- styles: { top: "3%" }
32567
- }, {
32568
- footer: withCtx(() => [
32569
- createVNode(_component_Button, {
32570
- type: "text",
32571
- onClick: _cache[9] || (_cache[9] = ($event) => _ctx.showPW = false)
32572
- }, {
32573
- default: withCtx(() => [
32574
- createTextVNode("关闭")
32575
- ]),
32576
- _: 1
32577
- }),
32578
- createVNode(_component_Button, {
32579
- type: "primary",
32580
- onClick: _ctx.savePassword
32581
- }, {
32582
- default: withCtx(() => [
32583
- createTextVNode("保存")
32584
- ]),
32585
- _: 1
32586
- }, 8, ["onClick"])
32587
- ]),
32588
- default: withCtx(() => [
32589
- createVNode(_component_Form, {
32590
- ref: "userForm",
32591
- model: _ctx.pwFormModel,
32592
- "label-width": 120
32593
- }, {
32594
- default: withCtx(() => [
32595
- createVNode(_component_NvComForm, {
32596
- ref: "userComForm",
32597
- formModel: _ctx.pwFormModel,
32598
- formItems: _ctx.pwFormItems
32599
- }, null, 8, ["formModel", "formItems"])
32600
- ]),
32601
- _: 1
32602
- }, 8, ["model"])
32603
- ]),
32604
- _: 1
32605
30304
  }, 8, ["modelValue"])
32606
30305
  ]),
32607
30306
  _: 1
32608
30307
  });
32609
30308
  }
32610
- const projectUser = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9a899d22"]]);
30309
+ const projectUser = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-86385f96"]]);
32611
30310
  const index = [
32612
30311
  {
32613
30312
  // 系统平台