liyu-pc-base 1.0.715 → 1.0.719

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.
@@ -2,12 +2,12 @@ import { F as e, o as t } from "./init-plugin-CvgtEpwY.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { getApiData as r } from "./api/api-model.js";
4
4
  import { exportJsonToExcel as i } from "./utils/excel.js";
5
- import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, shallowRef as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
6
- import { message as x } from "ant-design-vue";
7
- import { DownloadOutlined as S, PlusOutlined as C, UploadOutlined as w } from "@ant-design/icons-vue";
8
- import { read as T, utils as E } from "xlsx";
5
+ import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
6
+ import { message as b } from "ant-design-vue";
7
+ import { DownloadOutlined as x, PlusOutlined as S, UploadOutlined as C } from "@ant-design/icons-vue";
8
+ import { read as w, utils as T } from "xlsx";
9
9
  //#region src/components/batchCreateUser/batchCreateUser.vue?vue&type=script&setup=true&lang.ts
10
- var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 }, A = { key: 1 }, j = "id", M = /*#__PURE__*/ n(/* @__PURE__ */ f({
10
+ var E = { class: "batch-toolbar" }, D = { class: "batch-tip" }, O = { key: 1 }, k = { key: 1 }, A = "id", j = /*#__PURE__*/ n(/* @__PURE__ */ f({
11
11
  __name: "batchCreateUser",
12
12
  props: {
13
13
  title: {},
@@ -15,8 +15,8 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
15
15
  },
16
16
  emits: ["cancel", "ok"],
17
17
  setup(n, { emit: f }) {
18
- let M = f, N = h(!0), P = h(!1), F = h([]), I = h(0), L = h([]), R = _([]), z = h(""), B = e(), V = B.currentOrg, H = (() => {
19
- let e = B.person?.manage_type;
18
+ let j = f, M = h(!0), N = h(!1), P = h([]), F = h(0), I = h([]), L = h([]), R = h(""), z = e(), B = z.currentOrg, V = (() => {
19
+ let e = z.person?.manage_type;
20
20
  return e === 2 ? [
21
21
  {
22
22
  label: "普通用户",
@@ -40,7 +40,7 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
40
40
  label: "普通用户",
41
41
  value: 0
42
42
  }];
43
- })(), U = [
43
+ })(), H = [
44
44
  {
45
45
  title: "序号",
46
46
  dataIndex: "index",
@@ -63,23 +63,23 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
63
63
  width: 140,
64
64
  fixed: "right"
65
65
  }
66
- ], W = 0, G = () => `row_${++W}`, K = () => {
67
- let e = G();
68
- z.value = e, R.value = [...R.value, {
66
+ ], U = 0, W = () => `row_${++U}`, G = () => {
67
+ let e = W();
68
+ R.value = e, L.value = [...L.value, {
69
69
  id: e,
70
70
  username: "",
71
71
  realname: ""
72
72
  }];
73
- }, q = (e) => {
74
- z.value = e.id, R.value = [...R.value];
73
+ }, K = (e) => {
74
+ R.value = e.id, L.value = [...L.value];
75
+ }, q = () => {
76
+ R.value = "", L.value = [...L.value];
75
77
  }, J = () => {
76
- z.value = "", R.value = [...R.value];
77
- }, Y = () => {
78
- R.value = [];
79
- }, X = (e) => {
80
- let t = R.value.findIndex((t) => t.id === e.id);
81
- t > -1 && R.value.splice(t, 1), R.value = [...R.value];
82
- }, Z = () => {
78
+ L.value = [];
79
+ }, Y = (e) => {
80
+ let t = L.value.findIndex((t) => t.id === e.id);
81
+ t > -1 && L.value.splice(t, 1), L.value = [...L.value];
82
+ }, X = () => {
83
83
  i({
84
84
  header: ["账号", "姓名"],
85
85
  data: [],
@@ -88,11 +88,11 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
88
88
  autoWidth: !0,
89
89
  percent: h(0)
90
90
  });
91
- }, Q = (e) => {
91
+ }, Z = (e) => {
92
92
  let t = new FileReader();
93
93
  return t.onload = (e) => {
94
94
  try {
95
- let t = T(new Uint8Array(e.target.result), { type: "array" }), n = t.SheetNames[0], r = t.Sheets[n], i = E.sheet_to_json(r, { header: 1 }), a = (i[0] || []).map((e) => String(e ?? "").trim().toLowerCase()), o = a.findIndex((e) => [
95
+ let t = w(new Uint8Array(e.target.result), { type: "array" }), n = t.SheetNames[0], r = t.Sheets[n], i = T.sheet_to_json(r, { header: 1 }), a = (i[0] || []).map((e) => String(e ?? "").trim().toLowerCase()), o = a.findIndex((e) => [
96
96
  "账号",
97
97
  "用户名",
98
98
  "username"
@@ -103,113 +103,113 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
103
103
  "name"
104
104
  ].includes(e));
105
105
  if (o === -1 && s === -1) {
106
- x.warning("未识别到“账号/姓名”列,请使用下载的模板");
106
+ b.warning("未识别到“账号/姓名”列,请使用下载的模板");
107
107
  return;
108
108
  }
109
109
  let c = i.slice(1).filter((e) => e && e.some((e) => e !== "" && e != null)), l = 0, u = [];
110
110
  c.forEach((e) => {
111
111
  let t = o > -1 ? String(e[o] ?? "").trim() : "", n = s > -1 ? String(e[s] ?? "").trim() : "";
112
112
  !t && !n || (u.push({
113
- id: G(),
113
+ id: W(),
114
114
  username: t,
115
115
  realname: n
116
116
  }), l++);
117
- }), R.value = [...R.value, ...u], l > 0 ? x.success(`已导入 ${l} 条`) : x.info("文件中没有可导入的数据");
117
+ }), L.value = [...L.value, ...u], l > 0 ? b.success(`已导入 ${l} 条`) : b.info("文件中没有可导入的数据");
118
118
  } catch (e) {
119
- console.error(e), x.error("解析 Excel 失败");
119
+ console.error(e), b.error("解析 Excel 失败");
120
120
  }
121
121
  }, t.readAsArrayBuffer(e), !1;
122
- }, $ = async () => {
123
- if (!F.value || F.value.length === 0) {
124
- x.error("请至少选择一个组织");
122
+ }, Q = async () => {
123
+ if (!P.value || P.value.length === 0) {
124
+ b.error("请至少选择一个组织");
125
125
  return;
126
126
  }
127
- if (I.value === null || I.value === void 0) {
128
- x.error("请选择用户类型");
127
+ if (F.value === null || F.value === void 0) {
128
+ b.error("请选择用户类型");
129
129
  return;
130
130
  }
131
- if (R.value.length === 0) {
132
- x.error("请至少添加一条用户信息");
131
+ if (L.value.length === 0) {
132
+ b.error("请至少添加一条用户信息");
133
133
  return;
134
134
  }
135
135
  let e = /* @__PURE__ */ new Set();
136
- for (let t of R.value) {
136
+ for (let t of L.value) {
137
137
  let n = (t.username || "").trim(), r = (t.realname || "").trim();
138
138
  if (!n) {
139
- x.error("账号不能为空,请检查表格");
139
+ b.error("账号不能为空,请检查表格");
140
140
  return;
141
141
  }
142
142
  if (!r) {
143
- x.error(`账号 [${n}] 的姓名不能为空`);
143
+ b.error(`账号 [${n}] 的姓名不能为空`);
144
144
  return;
145
145
  }
146
146
  if (e.has(n)) {
147
- x.error(`账号 [${n}] 重复,请检查`);
147
+ b.error(`账号 [${n}] 重复,请检查`);
148
148
  return;
149
149
  }
150
150
  e.add(n);
151
151
  }
152
152
  let n = {
153
- org_ids: F.value,
154
- manage_type: I.value,
155
- user_list: R.value.map((e) => ({
153
+ org_ids: P.value,
154
+ manage_type: F.value,
155
+ user_list: L.value.map((e) => ({
156
156
  username: (e.username || "").trim(),
157
157
  realname: (e.realname || "").trim()
158
158
  })),
159
- org_id: V?.id
159
+ org_id: B?.id
160
160
  };
161
- P.value = !0;
161
+ N.value = !0;
162
162
  try {
163
- await r(n, "/sys/create_batch_user"), x.success("批量创建完成"), t()?.emit("refresh"), M("ok");
163
+ await r(n, "/sys/create_batch_user"), b.success("批量创建完成"), t()?.emit("refresh"), j("ok");
164
164
  } catch (e) {
165
165
  console.error(e);
166
166
  } finally {
167
- P.value = !1;
167
+ N.value = !1;
168
168
  }
169
- }, ee = () => M("cancel");
169
+ }, $ = () => j("cancel");
170
170
  return p(async () => {
171
171
  try {
172
172
  let e = await r({ is_pagination: !1 }, "/org/query_org_for_person_admin"), t = e?.data ?? e ?? [];
173
- L.value = Array.isArray(t) ? t : [];
173
+ I.value = Array.isArray(t) ? t : [];
174
174
  } catch (e) {
175
175
  console.error("加载组织列表失败", e);
176
176
  }
177
177
  }), (e, t) => {
178
- let n = g("a-select"), r = g("a-form-item"), i = g("a-col"), f = g("a-row"), p = g("a-form"), h = g("a-button"), _ = g("a-upload"), x = g("a-popconfirm"), T = g("a-input"), E = g("a-space"), M = g("s-table"), B = g("a-modal");
178
+ let n = g("a-select"), r = g("a-form-item"), i = g("a-col"), f = g("a-row"), p = g("a-form"), h = g("a-button"), b = g("a-upload"), w = g("a-popconfirm"), T = g("a-input"), j = g("a-space"), z = g("s-table"), B = g("a-modal");
179
179
  return m(), o(B, {
180
180
  title: e.title,
181
181
  width: "900px",
182
- open: N.value,
182
+ open: M.value,
183
183
  bodyStyle: {
184
184
  height: "75vh",
185
185
  overflowY: "auto",
186
186
  padding: "0 24px"
187
187
  },
188
- "confirm-loading": P.value,
188
+ "confirm-loading": N.value,
189
189
  "cancel-text": "取消",
190
190
  "ok-text": "确定",
191
191
  centered: "",
192
192
  "destroy-on-close": "",
193
- onCancel: ee,
194
- onOk: $
193
+ onCancel: $,
194
+ onOk: Q
195
195
  }, {
196
- default: b(() => [
196
+ default: y(() => [
197
197
  d(p, {
198
198
  layout: "vertical",
199
199
  size: "small"
200
200
  }, {
201
- default: b(() => [d(f, { gutter: 16 }, {
202
- default: b(() => [d(i, { span: 12 }, {
203
- default: b(() => [d(r, {
201
+ default: y(() => [d(f, { gutter: 16 }, {
202
+ default: y(() => [d(i, { span: 12 }, {
203
+ default: y(() => [d(r, {
204
204
  label: "组织",
205
205
  required: ""
206
206
  }, {
207
- default: b(() => [d(n, {
208
- value: F.value,
209
- "onUpdate:value": t[0] ||= (e) => F.value = e,
207
+ default: y(() => [d(n, {
208
+ value: P.value,
209
+ "onUpdate:value": t[0] ||= (e) => P.value = e,
210
210
  mode: "multiple",
211
211
  placeholder: "请选择组织(可多选)",
212
- options: L.value,
212
+ options: I.value,
213
213
  "field-names": {
214
214
  label: "name",
215
215
  value: "id"
@@ -222,15 +222,15 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
222
222
  })]),
223
223
  _: 1
224
224
  }), d(i, { span: 12 }, {
225
- default: b(() => [d(r, {
225
+ default: y(() => [d(r, {
226
226
  label: "用户类型",
227
227
  required: ""
228
228
  }, {
229
- default: b(() => [d(n, {
230
- value: I.value,
231
- "onUpdate:value": t[1] ||= (e) => I.value = e,
229
+ default: y(() => [d(n, {
230
+ value: F.value,
231
+ "onUpdate:value": t[1] ||= (e) => F.value = e,
232
232
  placeholder: "请选择用户类型",
233
- options: y(H)
233
+ options: v(V)
234
234
  }, null, 8, ["value", "options"])]),
235
235
  _: 1
236
236
  })]),
@@ -240,93 +240,93 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
240
240
  })]),
241
241
  _: 1
242
242
  }),
243
- l("div", D, [
243
+ l("div", E, [
244
244
  d(h, {
245
245
  type: "primary",
246
- onClick: K
246
+ onClick: G
247
247
  }, {
248
- default: b(() => [d(y(C)), t[4] ||= u(" 添加 ")]),
248
+ default: y(() => [d(v(S)), t[4] ||= u(" 添加 ")]),
249
249
  _: 1
250
250
  }),
251
- d(_, {
251
+ d(b, {
252
252
  "show-upload-list": !1,
253
- "before-upload": Q,
253
+ "before-upload": Z,
254
254
  accept: ".xlsx,.xls"
255
255
  }, {
256
- default: b(() => [d(h, null, {
257
- default: b(() => [d(y(w)), t[5] ||= u(" 导入 ")]),
256
+ default: y(() => [d(h, null, {
257
+ default: y(() => [d(v(C)), t[5] ||= u(" 导入 ")]),
258
258
  _: 1
259
259
  })]),
260
260
  _: 1
261
261
  }),
262
- d(h, { onClick: Z }, {
263
- default: b(() => [d(y(S)), t[6] ||= u(" 下载导入模板 ")]),
262
+ d(h, { onClick: X }, {
263
+ default: y(() => [d(v(x)), t[6] ||= u(" 下载导入模板 ")]),
264
264
  _: 1
265
265
  }),
266
- R.value.length > 0 ? (m(), o(x, {
266
+ L.value.length > 0 ? (m(), o(w, {
267
267
  key: 0,
268
268
  title: "确认清空所有数据?",
269
- onConfirm: t[2] ||= (e) => Y()
269
+ onConfirm: t[2] ||= (e) => J()
270
270
  }, {
271
- default: b(() => [d(h, {
271
+ default: y(() => [d(h, {
272
272
  type: "default",
273
273
  danger: ""
274
274
  }, {
275
- default: b(() => t[7] ||= [u(" 清空 ")]),
275
+ default: y(() => t[7] ||= [u(" 清空 ")]),
276
276
  _: 1
277
277
  })]),
278
278
  _: 1
279
279
  })) : s("", !0),
280
- l("span", O, "共 " + v(R.value.length) + " 条", 1)
280
+ l("span", D, "共 " + _(L.value.length) + " 条", 1)
281
281
  ]),
282
- d(M, {
283
- columns: U,
284
- "data-source": R.value,
285
- rowKey: j,
282
+ d(z, {
283
+ columns: H,
284
+ "data-source": L.value,
285
+ rowKey: A,
286
286
  bordered: !0,
287
287
  size: "small",
288
288
  pagination: !1,
289
289
  scroll: { y: 320 }
290
290
  }, {
291
- bodyCell: b(({ column: e, index: n, record: r }) => [e.dataIndex === "index" ? (m(), c(a, { key: 0 }, [u(v(n + 1), 1)], 64)) : e.dataIndex === "username" ? (m(), c(a, { key: 1 }, [r.id === z.value ? (m(), o(T, {
291
+ bodyCell: y(({ column: e, index: n, record: r, recordIndexs: i }) => [e.dataIndex === "index" ? (m(), c(a, { key: 0 }, [u(_(n + 1), 1)], 64)) : e.dataIndex === "username" ? (m(), c(a, { key: 1 }, [r.id === R.value ? (m(), o(T, {
292
292
  key: 0,
293
- value: r.username,
294
- "onUpdate:value": (e) => r.username = e,
293
+ value: L.value[i[0]].username,
294
+ "onUpdate:value": (e) => L.value[i[0]].username = e,
295
295
  placeholder: "请输入账号",
296
296
  "allow-clear": ""
297
- }, null, 8, ["value", "onUpdate:value"])) : (m(), c("span", k, v(r.username), 1))], 64)) : e.dataIndex === "realname" ? (m(), c(a, { key: 2 }, [r.id === z.value ? (m(), o(T, {
297
+ }, null, 8, ["value", "onUpdate:value"])) : (m(), c("span", O, _(r.username), 1))], 64)) : e.dataIndex === "realname" ? (m(), c(a, { key: 2 }, [r.id === R.value ? (m(), o(T, {
298
298
  key: 0,
299
- value: r.realname,
300
- "onUpdate:value": (e) => r.realname = e,
299
+ value: L.value[i[0]].realname,
300
+ "onUpdate:value": (e) => L.value[i[0]].realname = e,
301
301
  placeholder: "请输入姓名",
302
302
  "allow-clear": ""
303
- }, null, 8, ["value", "onUpdate:value"])) : (m(), c("span", A, v(r.realname), 1))], 64)) : e.dataIndex === "action" ? (m(), o(E, { key: 3 }, {
304
- default: b(() => [r.id === z.value ? (m(), o(h, {
303
+ }, null, 8, ["value", "onUpdate:value"])) : (m(), c("span", k, _(r.realname), 1))], 64)) : e.dataIndex === "action" ? (m(), o(j, { key: 3 }, {
304
+ default: y(() => [r.id === R.value ? (m(), o(h, {
305
305
  key: 1,
306
306
  type: "link",
307
307
  size: "small",
308
- onClick: t[3] ||= (e) => J()
308
+ onClick: t[3] ||= (e) => q()
309
309
  }, {
310
- default: b(() => t[9] ||= [u(" 完成 ")]),
310
+ default: y(() => t[9] ||= [u(" 完成 ")]),
311
311
  _: 1
312
312
  })) : (m(), o(h, {
313
313
  key: 0,
314
314
  type: "link",
315
315
  size: "small",
316
- onClick: (e) => q(r)
316
+ onClick: (e) => K(r)
317
317
  }, {
318
- default: b(() => t[8] ||= [u(" 编辑 ")]),
318
+ default: y(() => t[8] ||= [u(" 编辑 ")]),
319
319
  _: 2
320
- }, 1032, ["onClick"])), d(x, {
320
+ }, 1032, ["onClick"])), d(w, {
321
321
  title: "确认删除该行?",
322
- onConfirm: (e) => X(r)
322
+ onConfirm: (e) => Y(r)
323
323
  }, {
324
- default: b(() => [d(h, {
324
+ default: y(() => [d(h, {
325
325
  type: "link",
326
326
  size: "small",
327
327
  danger: ""
328
328
  }, {
329
- default: b(() => t[10] ||= [u(" 删除 ")]),
329
+ default: y(() => t[10] ||= [u(" 删除 ")]),
330
330
  _: 1
331
331
  })]),
332
332
  _: 2
@@ -344,6 +344,6 @@ var D = { class: "batch-toolbar" }, O = { class: "batch-tip" }, k = { key: 1 },
344
344
  ]);
345
345
  };
346
346
  }
347
- }), [["__scopeId", "data-v-aecb1aff"]]);
347
+ }), [["__scopeId", "data-v-237ef1f1"]]);
348
348
  //#endregion
349
- export { M as default };
349
+ export { j as default };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batchCreateUser-B4zAXSR6.js","names":[],"sources":["../src/components/batchCreateUser/batchCreateUser.vue","../src/components/batchCreateUser/batchCreateUser.vue"],"sourcesContent":["<template>\n <a-modal\n :title=\"title\"\n width=\"900px\"\n :open=\"open\"\n :bodyStyle=\"{ height: '75vh', overflowY: 'auto', padding: '0 24px' }\"\n :confirm-loading=\"loading\"\n cancel-text=\"取消\"\n ok-text=\"确定\"\n centered\n destroy-on-close\n @cancel=\"handleCancel\"\n @ok=\"handleOk\"\n >\n <a-form\n layout=\"vertical\"\n size=\"small\"\n >\n <a-row :gutter=\"16\">\n <a-col :span=\"12\">\n <a-form-item\n label=\"组织\"\n required\n >\n <a-select\n v-model:value=\"orgIds\"\n mode=\"multiple\"\n placeholder=\"请选择组织(可多选)\"\n :options=\"orgOptions\"\n :field-names=\"{ label: 'name', value: 'id' }\"\n allow-clear\n show-search\n option-filter-prop=\"name\"\n />\n </a-form-item>\n </a-col>\n <a-col :span=\"12\">\n <a-form-item\n label=\"用户类型\"\n required\n >\n <a-select\n v-model:value=\"manageType\"\n placeholder=\"请选择用户类型\"\n :options=\"manageTypeOptions\"\n />\n </a-form-item>\n </a-col>\n </a-row>\n </a-form>\n\n <div class=\"batch-toolbar\">\n <a-button\n type=\"primary\"\n @click=\"handleAddRow\"\n >\n <plus-outlined />\n 添加\n </a-button>\n <a-upload\n :show-upload-list=\"false\"\n :before-upload=\"beforeImportUpload\"\n accept=\".xlsx,.xls\"\n >\n <a-button>\n <upload-outlined />\n 导入\n </a-button>\n </a-upload>\n <a-button @click=\"handleDownloadTemplate\">\n <download-outlined />\n 下载导入模板\n </a-button>\n <a-popconfirm\n title=\"确认清空所有数据?\"\n @confirm=\"handleClear()\"\n v-if=\"dataSource.length > 0\"\n >\n <a-button\n type=\"default\"\n danger\n >\n 清空\n </a-button>\n </a-popconfirm>\n <span class=\"batch-tip\">共 {{ dataSource.length }} 条</span>\n </div>\n\n <s-table\n :columns=\"columns\"\n :data-source=\"dataSource\"\n :rowKey=\"rowKey\"\n :bordered=\"true\"\n size=\"small\"\n :pagination=\"false\"\n :scroll=\"{ y: 320 }\"\n >\n <template #bodyCell=\"{ column, index, record, recordIndexs }\">\n <template v-if=\"column.dataIndex === 'index'\">\n {{ index + 1 }}\n </template>\n <template v-else-if=\"column.dataIndex === 'username'\">\n <a-input\n v-if=\"record.id === currentEditId\"\n v-model:value=\"dataSource[recordIndexs[0]].username\"\n placeholder=\"请输入账号\"\n allow-clear\n />\n <span v-else>{{ record.username }}</span>\n </template>\n <template v-else-if=\"column.dataIndex === 'realname'\">\n <a-input\n v-if=\"record.id === currentEditId\"\n v-model:value=\"dataSource[recordIndexs[0]].realname\"\n placeholder=\"请输入姓名\"\n allow-clear\n />\n <span v-else>{{ record.realname }}</span>\n </template>\n <template v-else-if=\"column.dataIndex === 'action'\">\n <a-space>\n <a-button\n type=\"link\"\n size=\"small\"\n v-if=\"record.id !== currentEditId\"\n @click=\"handleEdit(record)\"\n >\n 编辑\n </a-button>\n <a-button\n type=\"link\"\n size=\"small\"\n v-else\n @click=\"handleComplete()\"\n >\n 完成\n </a-button>\n <a-popconfirm\n title=\"确认删除该行?\"\n @confirm=\"handleDelete(record)\"\n >\n <a-button\n type=\"link\"\n size=\"small\"\n danger\n >\n 删除\n </a-button>\n </a-popconfirm>\n </a-space>\n </template>\n </template>\n </s-table>\n </a-modal>\n</template>\n\n<script setup lang=\"ts\">\nimport { DownloadOutlined, PlusOutlined, UploadOutlined } from '@ant-design/icons-vue';\nimport { message } from 'ant-design-vue';\nimport { read, utils } from 'xlsx';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\nimport { event_obj, useUserStore } from 'liyu-pc-base/init-plugin';\nimport { getApiData } from 'liyu-pc-base/api/api-model';\nimport { exportJsonToExcel } from 'liyu-pc-base/utils/excel';\n\ninterface Props {\n title?: string;\n record?: any;\n}\nconst props = defineProps<Props>();\nconst emit = defineEmits(['cancel', 'ok']);\n\nconst open = ref(true);\nconst loading = ref(false);\nconst orgIds = ref<any[]>([]);\nconst manageType = ref<number>(0);\nconst orgOptions = ref<any[]>([]);\nconst dataSource = ref<any[]>([]);\nconst currentEditId = ref<string>('');\n\nconst userStore = useUserStore();\nconst current_org = userStore.currentOrg;\n\n// 用户类型可选项:受当前账号 manage_type 约束(与 permission-user 保持一致)\nconst manageTypeOptions = (() => {\n const curr = userStore.person?.manage_type;\n if (curr === 2) {\n return [\n { label: '普通用户', value: 0 },\n { label: '管理员', value: 1 },\n { label: '超级管理员', value: 2 },\n ];\n } else if (curr === 1) {\n return [\n { label: '普通用户', value: 0 },\n { label: '管理员', value: 1 },\n ];\n }\n return [{ label: '普通用户', value: 0 }];\n})();\n\nconst columns = [\n { title: '序号', dataIndex: 'index', width: 70, fixed: 'left' },\n { title: '账号', dataIndex: 'username', width: 220 },\n { title: '姓名', dataIndex: 'realname', width: 220 },\n { title: '操作', dataIndex: 'action', width: 140, fixed: 'right' },\n];\nconst rowKey = 'id';\n\nlet uid = 0;\nconst genId = () => `row_${++uid}`;\n\nconst handleAddRow = () => {\n const id = genId();\n currentEditId.value = id;\n dataSource.value = [...dataSource.value, { id, username: '', realname: '' }];\n};\n\nconst handleEdit = (record: any) => {\n currentEditId.value = record.id;\n dataSource.value = [...dataSource.value];\n};\nconst handleComplete = () => {\n currentEditId.value = '';\n dataSource.value = [...dataSource.value];\n};\nconst handleClear = () => {\n dataSource.value = [];\n};\n\nconst handleDelete = (record: any) => {\n const idx = dataSource.value.findIndex(r => r.id === record.id);\n if (idx > -1) dataSource.value.splice(idx, 1);\n dataSource.value = [...dataSource.value];\n};\n\n// 下载导入模板(账号 / 姓名 两列)\nconst handleDownloadTemplate = () => {\n const percent: Ref<number> = ref(0);\n exportJsonToExcel({\n header: ['账号', '姓名'],\n data: [],\n filename: '批量创建用户导入模板',\n bookType: 'xlsx',\n autoWidth: true,\n percent,\n } as any);\n};\n\n// 导入 Excel:解析“账号 / 姓名”列,追加到表格\nconst beforeImportUpload = (file: any) => {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n try {\n const data = new Uint8Array(e.target.result);\n const workbook = read(data, { type: 'array' });\n const firstSheet = workbook.SheetNames[0];\n const worksheet = workbook.Sheets[firstSheet];\n const sheetData: any[][] = utils.sheet_to_json(worksheet, { header: 1 });\n const headers = (sheetData[0] || []).map((h: any) =>\n String(h ?? '')\n .trim()\n .toLowerCase(),\n );\n const userCol = headers.findIndex(h => ['账号', '用户名', 'username'].includes(h));\n const nameCol = headers.findIndex(h => ['姓名', '名字', 'realname', 'name'].includes(h));\n if (userCol === -1 && nameCol === -1) {\n message.warning('未识别到“账号/姓名”列,请使用下载的模板');\n return;\n }\n const rows = sheetData\n .slice(1)\n .filter((row: any[]) => row && row.some(c => c !== '' && c != null));\n let added = 0;\n const newRows = [];\n rows.forEach((row: any[]) => {\n const username = userCol > -1 ? String(row[userCol] ?? '').trim() : '';\n const realname = nameCol > -1 ? String(row[nameCol] ?? '').trim() : '';\n if (!username && !realname) return;\n newRows.push({ id: genId(), username, realname });\n added++;\n });\n dataSource.value = [...dataSource.value, ...newRows];\n if (added > 0) message.success(`已导入 ${added} 条`);\n else message.info('文件中没有可导入的数据');\n } catch (err) {\n console.error(err);\n message.error('解析 Excel 失败');\n }\n };\n reader.readAsArrayBuffer(file);\n return false; // 阻止自动上传\n};\n\nconst handleOk = async () => {\n // 前置校验\n if (!orgIds.value || orgIds.value.length === 0) {\n message.error('请至少选择一个组织');\n return;\n }\n if (manageType.value === null || manageType.value === undefined) {\n message.error('请选择用户类型');\n return;\n }\n if (dataSource.value.length === 0) {\n message.error('请至少添加一条用户信息');\n return;\n }\n // 校验账号/姓名非空,且账号不重复\n const seen = new Set<string>();\n for (const row of dataSource.value) {\n const username = (row.username || '').trim();\n const realname = (row.realname || '').trim();\n if (!username) {\n message.error('账号不能为空,请检查表格');\n return;\n }\n if (!realname) {\n message.error(`账号 [${username}] 的姓名不能为空`);\n return;\n }\n if (seen.has(username)) {\n message.error(`账号 [${username}] 重复,请检查`);\n return;\n }\n seen.add(username);\n }\n\n const payload = {\n org_ids: orgIds.value,\n manage_type: manageType.value,\n user_list: dataSource.value.map(r => ({\n username: (r.username || '').trim(),\n realname: (r.realname || '').trim(),\n })),\n org_id: current_org?.id,\n };\n\n loading.value = true;\n try {\n await getApiData(payload, '/sys/create_batch_user');\n message.success(`批量创建完成`);\n event_obj()?.emit('refresh');\n emit('ok');\n } catch (err) {\n console.error(err);\n // 错误提示已由请求拦截器统一处理\n } finally {\n loading.value = false;\n }\n};\n\nconst handleCancel = () => emit('cancel');\n\nonMounted(async () => {\n try {\n const res: any = await getApiData({ is_pagination: false }, '/org/query_org_for_person_admin');\n const list = res?.data ?? res ?? [];\n orgOptions.value = Array.isArray(list) ? list : [];\n } catch (err) {\n console.error('加载组织列表失败', err);\n }\n});\n</script>\n\n<style scoped lang=\"less\">\n.batch-toolbar {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 12px;\n}\n.batch-tip {\n margin-left: auto;\n color: #999;\n font-size: 12px;\n}\n</style>\n","<template>\n <a-modal\n :title=\"title\"\n width=\"900px\"\n :open=\"open\"\n :bodyStyle=\"{ height: '75vh', overflowY: 'auto', padding: '0 24px' }\"\n :confirm-loading=\"loading\"\n cancel-text=\"取消\"\n ok-text=\"确定\"\n centered\n destroy-on-close\n @cancel=\"handleCancel\"\n @ok=\"handleOk\"\n >\n <a-form\n layout=\"vertical\"\n size=\"small\"\n >\n <a-row :gutter=\"16\">\n <a-col :span=\"12\">\n <a-form-item\n label=\"组织\"\n required\n >\n <a-select\n v-model:value=\"orgIds\"\n mode=\"multiple\"\n placeholder=\"请选择组织(可多选)\"\n :options=\"orgOptions\"\n :field-names=\"{ label: 'name', value: 'id' }\"\n allow-clear\n show-search\n option-filter-prop=\"name\"\n />\n </a-form-item>\n </a-col>\n <a-col :span=\"12\">\n <a-form-item\n label=\"用户类型\"\n required\n >\n <a-select\n v-model:value=\"manageType\"\n placeholder=\"请选择用户类型\"\n :options=\"manageTypeOptions\"\n />\n </a-form-item>\n </a-col>\n </a-row>\n </a-form>\n\n <div class=\"batch-toolbar\">\n <a-button\n type=\"primary\"\n @click=\"handleAddRow\"\n >\n <plus-outlined />\n 添加\n </a-button>\n <a-upload\n :show-upload-list=\"false\"\n :before-upload=\"beforeImportUpload\"\n accept=\".xlsx,.xls\"\n >\n <a-button>\n <upload-outlined />\n 导入\n </a-button>\n </a-upload>\n <a-button @click=\"handleDownloadTemplate\">\n <download-outlined />\n 下载导入模板\n </a-button>\n <a-popconfirm\n title=\"确认清空所有数据?\"\n @confirm=\"handleClear()\"\n v-if=\"dataSource.length > 0\"\n >\n <a-button\n type=\"default\"\n danger\n >\n 清空\n </a-button>\n </a-popconfirm>\n <span class=\"batch-tip\">共 {{ dataSource.length }} 条</span>\n </div>\n\n <s-table\n :columns=\"columns\"\n :data-source=\"dataSource\"\n :rowKey=\"rowKey\"\n :bordered=\"true\"\n size=\"small\"\n :pagination=\"false\"\n :scroll=\"{ y: 320 }\"\n >\n <template #bodyCell=\"{ column, index, record, recordIndexs }\">\n <template v-if=\"column.dataIndex === 'index'\">\n {{ index + 1 }}\n </template>\n <template v-else-if=\"column.dataIndex === 'username'\">\n <a-input\n v-if=\"record.id === currentEditId\"\n v-model:value=\"dataSource[recordIndexs[0]].username\"\n placeholder=\"请输入账号\"\n allow-clear\n />\n <span v-else>{{ record.username }}</span>\n </template>\n <template v-else-if=\"column.dataIndex === 'realname'\">\n <a-input\n v-if=\"record.id === currentEditId\"\n v-model:value=\"dataSource[recordIndexs[0]].realname\"\n placeholder=\"请输入姓名\"\n allow-clear\n />\n <span v-else>{{ record.realname }}</span>\n </template>\n <template v-else-if=\"column.dataIndex === 'action'\">\n <a-space>\n <a-button\n type=\"link\"\n size=\"small\"\n v-if=\"record.id !== currentEditId\"\n @click=\"handleEdit(record)\"\n >\n 编辑\n </a-button>\n <a-button\n type=\"link\"\n size=\"small\"\n v-else\n @click=\"handleComplete()\"\n >\n 完成\n </a-button>\n <a-popconfirm\n title=\"确认删除该行?\"\n @confirm=\"handleDelete(record)\"\n >\n <a-button\n type=\"link\"\n size=\"small\"\n danger\n >\n 删除\n </a-button>\n </a-popconfirm>\n </a-space>\n </template>\n </template>\n </s-table>\n </a-modal>\n</template>\n\n<script setup lang=\"ts\">\nimport { DownloadOutlined, PlusOutlined, UploadOutlined } from '@ant-design/icons-vue';\nimport { message } from 'ant-design-vue';\nimport { read, utils } from 'xlsx';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\nimport { event_obj, useUserStore } from 'liyu-pc-base/init-plugin';\nimport { getApiData } from 'liyu-pc-base/api/api-model';\nimport { exportJsonToExcel } from 'liyu-pc-base/utils/excel';\n\ninterface Props {\n title?: string;\n record?: any;\n}\nconst props = defineProps<Props>();\nconst emit = defineEmits(['cancel', 'ok']);\n\nconst open = ref(true);\nconst loading = ref(false);\nconst orgIds = ref<any[]>([]);\nconst manageType = ref<number>(0);\nconst orgOptions = ref<any[]>([]);\nconst dataSource = ref<any[]>([]);\nconst currentEditId = ref<string>('');\n\nconst userStore = useUserStore();\nconst current_org = userStore.currentOrg;\n\n// 用户类型可选项:受当前账号 manage_type 约束(与 permission-user 保持一致)\nconst manageTypeOptions = (() => {\n const curr = userStore.person?.manage_type;\n if (curr === 2) {\n return [\n { label: '普通用户', value: 0 },\n { label: '管理员', value: 1 },\n { label: '超级管理员', value: 2 },\n ];\n } else if (curr === 1) {\n return [\n { label: '普通用户', value: 0 },\n { label: '管理员', value: 1 },\n ];\n }\n return [{ label: '普通用户', value: 0 }];\n})();\n\nconst columns = [\n { title: '序号', dataIndex: 'index', width: 70, fixed: 'left' },\n { title: '账号', dataIndex: 'username', width: 220 },\n { title: '姓名', dataIndex: 'realname', width: 220 },\n { title: '操作', dataIndex: 'action', width: 140, fixed: 'right' },\n];\nconst rowKey = 'id';\n\nlet uid = 0;\nconst genId = () => `row_${++uid}`;\n\nconst handleAddRow = () => {\n const id = genId();\n currentEditId.value = id;\n dataSource.value = [...dataSource.value, { id, username: '', realname: '' }];\n};\n\nconst handleEdit = (record: any) => {\n currentEditId.value = record.id;\n dataSource.value = [...dataSource.value];\n};\nconst handleComplete = () => {\n currentEditId.value = '';\n dataSource.value = [...dataSource.value];\n};\nconst handleClear = () => {\n dataSource.value = [];\n};\n\nconst handleDelete = (record: any) => {\n const idx = dataSource.value.findIndex(r => r.id === record.id);\n if (idx > -1) dataSource.value.splice(idx, 1);\n dataSource.value = [...dataSource.value];\n};\n\n// 下载导入模板(账号 / 姓名 两列)\nconst handleDownloadTemplate = () => {\n const percent: Ref<number> = ref(0);\n exportJsonToExcel({\n header: ['账号', '姓名'],\n data: [],\n filename: '批量创建用户导入模板',\n bookType: 'xlsx',\n autoWidth: true,\n percent,\n } as any);\n};\n\n// 导入 Excel:解析“账号 / 姓名”列,追加到表格\nconst beforeImportUpload = (file: any) => {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n try {\n const data = new Uint8Array(e.target.result);\n const workbook = read(data, { type: 'array' });\n const firstSheet = workbook.SheetNames[0];\n const worksheet = workbook.Sheets[firstSheet];\n const sheetData: any[][] = utils.sheet_to_json(worksheet, { header: 1 });\n const headers = (sheetData[0] || []).map((h: any) =>\n String(h ?? '')\n .trim()\n .toLowerCase(),\n );\n const userCol = headers.findIndex(h => ['账号', '用户名', 'username'].includes(h));\n const nameCol = headers.findIndex(h => ['姓名', '名字', 'realname', 'name'].includes(h));\n if (userCol === -1 && nameCol === -1) {\n message.warning('未识别到“账号/姓名”列,请使用下载的模板');\n return;\n }\n const rows = sheetData\n .slice(1)\n .filter((row: any[]) => row && row.some(c => c !== '' && c != null));\n let added = 0;\n const newRows = [];\n rows.forEach((row: any[]) => {\n const username = userCol > -1 ? String(row[userCol] ?? '').trim() : '';\n const realname = nameCol > -1 ? String(row[nameCol] ?? '').trim() : '';\n if (!username && !realname) return;\n newRows.push({ id: genId(), username, realname });\n added++;\n });\n dataSource.value = [...dataSource.value, ...newRows];\n if (added > 0) message.success(`已导入 ${added} 条`);\n else message.info('文件中没有可导入的数据');\n } catch (err) {\n console.error(err);\n message.error('解析 Excel 失败');\n }\n };\n reader.readAsArrayBuffer(file);\n return false; // 阻止自动上传\n};\n\nconst handleOk = async () => {\n // 前置校验\n if (!orgIds.value || orgIds.value.length === 0) {\n message.error('请至少选择一个组织');\n return;\n }\n if (manageType.value === null || manageType.value === undefined) {\n message.error('请选择用户类型');\n return;\n }\n if (dataSource.value.length === 0) {\n message.error('请至少添加一条用户信息');\n return;\n }\n // 校验账号/姓名非空,且账号不重复\n const seen = new Set<string>();\n for (const row of dataSource.value) {\n const username = (row.username || '').trim();\n const realname = (row.realname || '').trim();\n if (!username) {\n message.error('账号不能为空,请检查表格');\n return;\n }\n if (!realname) {\n message.error(`账号 [${username}] 的姓名不能为空`);\n return;\n }\n if (seen.has(username)) {\n message.error(`账号 [${username}] 重复,请检查`);\n return;\n }\n seen.add(username);\n }\n\n const payload = {\n org_ids: orgIds.value,\n manage_type: manageType.value,\n user_list: dataSource.value.map(r => ({\n username: (r.username || '').trim(),\n realname: (r.realname || '').trim(),\n })),\n org_id: current_org?.id,\n };\n\n loading.value = true;\n try {\n await getApiData(payload, '/sys/create_batch_user');\n message.success(`批量创建完成`);\n event_obj()?.emit('refresh');\n emit('ok');\n } catch (err) {\n console.error(err);\n // 错误提示已由请求拦截器统一处理\n } finally {\n loading.value = false;\n }\n};\n\nconst handleCancel = () => emit('cancel');\n\nonMounted(async () => {\n try {\n const res: any = await getApiData({ is_pagination: false }, '/org/query_org_for_person_admin');\n const list = res?.data ?? res ?? [];\n orgOptions.value = Array.isArray(list) ? list : [];\n } catch (err) {\n console.error('加载组织列表失败', err);\n }\n});\n</script>\n\n<style scoped lang=\"less\">\n.batch-toolbar {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 12px;\n}\n.batch-tip {\n margin-left: auto;\n color: #999;\n font-size: 12px;\n}\n</style>\n"],"mappings":"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"}
@@ -63835,8 +63835,8 @@ var eZ = function(e, t, n, r) {
63835
63835
  return {
63836
63836
  rowHierarchyType: Ve.value?.length >= 2 && be.value.rowHierarchyType || "grid",
63837
63837
  indicatorsAsCol: be.value.indicatorsAsCol ?? !0,
63838
- ...x.value && x.value.length ? { rowTree: o(x.value, n, i, !!be.value.rowShowGrandTotals, "小计", "总计", !t) } : {},
63839
- ...S.value && S.value.length ? { columnTree: o(S.value, r, a, !!be.value.columnShowGrandTotals, "小计", "总计", !t) } : {},
63838
+ ...x.value && x.value.length ? { rowTree: o(x.value, n, i, !!be.value.rowShowGrandTotals, "小计", "总计", !t && !!be.value.rowShowSubTotals) } : {},
63839
+ ...S.value && S.value.length ? { columnTree: o(S.value, r, a, !!be.value.columnShowGrandTotals, "小计", "总计", !t && !!be.value.columnShowSubTotals) } : {},
63840
63840
  rowExpandLevel: Math.max(2, Ve.value.length + 1),
63841
63841
  rowHierarchyIndent: 20,
63842
63842
  rowHierarchyTextStartAlignment: !0,
@@ -64336,7 +64336,7 @@ var eZ = function(e, t, n, r) {
64336
64336
  }, 512)], 512);
64337
64337
  };
64338
64338
  }
64339
- }), [["__scopeId", "data-v-ba30d240"]]), cZ = {
64339
+ }), [["__scopeId", "data-v-72dfa192"]]), cZ = {
64340
64340
  key: 0,
64341
64341
  class: "pivot-echarts-loading"
64342
64342
  }, lZ = {