xyvcard-npc 0.0.3 → 0.0.4

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as A, mergeModels as D, ref as B, reactive as E, useModel as P, resolveComponent as i, createBlock as M, openBlock as g, withCtx as s, createVNode as c, unref as f, createElementBlock as G, Fragment as H, renderList as J, createElementVNode as Q, createTextVNode as T, toDisplayString as F } from "vue";
2
- import { ElMessage as L } from "element-plus";
1
+ import { defineComponent as A, mergeModels as D, ref as B, reactive as E, useModel as P, resolveComponent as i, createBlock as M, openBlock as v, withCtx as s, createVNode as u, unref as f, createElementBlock as G, Fragment as H, renderList as J, createElementVNode as Q, createTextVNode as T, toDisplayString as q } from "vue";
2
+ import { ElMessage as F } from "element-plus";
3
3
  import { useI18n as W } from "vue-i18n";
4
4
  import { useUserStore as n, clearEmpty as l, request as r } from "jmash-core";
5
- import { q as S, U as X, D as Y, _ as Z } from "./_plugin-vue_export-helper-Cv0caQpX.mjs";
5
+ import { q as L, U as X, D as Y, _ as Z } from "./_plugin-vue_export-helper-Cv0caQpX.mjs";
6
6
  import { useRoute as ee } from "vue-router";
7
7
  class te {
8
8
  getKey(e) {
@@ -80,7 +80,7 @@ class te {
80
80
  }
81
81
  // 批量删除话题机器人
82
82
  batchDelete(e) {
83
- const o = e.map((v) => v.robotId), t = {
83
+ const o = e.map((g) => g.robotId), t = {
84
84
  tenant: n().user.tenant,
85
85
  robotId: o
86
86
  };
@@ -114,7 +114,7 @@ class te {
114
114
  exportExcel(e) {
115
115
  const o = n().user.tenant;
116
116
  l(e);
117
- const t = S.stringify(e, {
117
+ const t = L.stringify(e, {
118
118
  arrayFormat: "brackets",
119
119
  allowDots: !0
120
120
  });
@@ -128,7 +128,7 @@ class te {
128
128
  exportPdf(e) {
129
129
  const o = n().user.tenant;
130
130
  l(e);
131
- const t = S.stringify(e, {
131
+ const t = L.stringify(e, {
132
132
  arrayFormat: "brackets",
133
133
  allowDots: !0
134
134
  });
@@ -157,14 +157,14 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
157
157
  roleCode: "npc"
158
158
  });
159
159
  o.useValues();
160
- const { t } = W(), v = ee(), y = B();
160
+ const { t } = W(), g = ee(), y = B();
161
161
  console.log(Y.userListBizDict.values, "=> userListBizDict");
162
162
  let d = E({
163
163
  requestId: Math.random() * 10 + "",
164
164
  updateMask: "userId,robotContent",
165
- topicId: v.query.topicId
165
+ topicId: g.query.topicId
166
166
  });
167
- const U = E({
167
+ const S = E({
168
168
  // nickName: [
169
169
  // {
170
170
  // required: true,
@@ -172,6 +172,13 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
172
172
  // trigger: "change",
173
173
  // },
174
174
  // ],
175
+ userId: [
176
+ {
177
+ required: !0,
178
+ message: t("topicRobot.userIdRequired"),
179
+ trigger: "change"
180
+ }
181
+ ],
175
182
  robotContent: [
176
183
  {
177
184
  required: !0,
@@ -179,23 +186,23 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
179
186
  trigger: "change"
180
187
  }
181
188
  ]
182
- }), m = P(_, "modelValue"), I = _, R = e, $ = Object.keys(I.entityKey), V = B($.length >= 1);
189
+ }), m = P(_, "modelValue"), I = _, R = e, U = Object.keys(I.entityKey), V = B(U.length >= 1);
183
190
  V.value && h.findById(I.entityKey).then(({ data: a }) => {
184
191
  Object.assign(d, a);
185
192
  });
186
- const j = async () => {
193
+ const $ = async () => {
187
194
  var a;
188
195
  await ((a = y.value) == null ? void 0 : a.validate((b) => {
189
- b && (V.value ? h.update(d).then((u) => {
190
- console.log(u), u.status === 200 && (L({
196
+ b && (V.value ? h.update(d).then((c) => {
197
+ console.log(c), c.status === 200 && (F({
191
198
  message: t("common.submitSuccess"),
192
199
  type: "success"
193
- }), m.value && (m.value = !1), R("refresh", u.status === 200));
194
- }) : h.create(d).then((u) => {
195
- console.log(u), u.status === 200 && (L({
200
+ }), m.value && (m.value = !1), R("refresh", c.status === 200));
201
+ }) : h.create(d).then((c) => {
202
+ console.log(c), c.status === 200 && (F({
196
203
  message: t("common.submitSuccess"),
197
204
  type: "success"
198
- }), m.value && (m.value = !1), R("refresh", u.status === 200));
205
+ }), m.value && (m.value = !1), R("refresh", c.status === 200));
199
206
  }));
200
207
  }));
201
208
  };
@@ -203,50 +210,50 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
203
210
  m.value && (m.value = !1);
204
211
  }
205
212
  return (a, b) => {
206
- const u = i("el-option"), O = i("el-select"), C = i("el-form-item"), w = i("el-col"), q = i("el-input"), z = i("el-row"), K = i("el-form"), x = i("el-button"), N = i("el-dialog");
207
- return g(), M(N, {
213
+ const c = i("el-option"), j = i("el-select"), C = i("el-form-item"), w = i("el-col"), O = i("el-input"), z = i("el-row"), K = i("el-form"), x = i("el-button"), N = i("el-dialog");
214
+ return v(), M(N, {
208
215
  modelValue: m.value,
209
216
  "onUpdate:modelValue": b[2] || (b[2] = (p) => m.value = p),
210
217
  onClose: k
211
218
  }, {
212
219
  footer: s(() => [
213
220
  Q("div", oe, [
214
- c(x, { onClick: k }, {
221
+ u(x, { onClick: k }, {
215
222
  default: s(() => [
216
- T(F(a.$t("common.cancel")), 1)
223
+ T(q(a.$t("common.cancel")), 1)
217
224
  ]),
218
225
  _: 1
219
226
  }),
220
- c(x, {
227
+ u(x, {
221
228
  type: "primary",
222
- onClick: j
229
+ onClick: $
223
230
  }, {
224
231
  default: s(() => [
225
- T(F(a.$t("common.confirm")), 1)
232
+ T(q(a.$t("common.confirm")), 1)
226
233
  ]),
227
234
  _: 1
228
235
  })
229
236
  ])
230
237
  ]),
231
238
  default: s(() => [
232
- c(K, {
239
+ u(K, {
233
240
  ref_key: "topicRobotFormRef",
234
241
  ref: y,
235
242
  model: f(d),
236
243
  "label-width": "120px",
237
- rules: U
244
+ rules: S
238
245
  }, {
239
246
  default: s(() => [
240
- c(z, null, {
247
+ u(z, null, {
241
248
  default: s(() => [
242
- c(w, { span: 24 }, {
249
+ u(w, { span: 24 }, {
243
250
  default: s(() => [
244
- c(C, {
251
+ u(C, {
245
252
  label: a.$t("topicRobot.userId"),
246
253
  prop: "userId"
247
254
  }, {
248
255
  default: s(() => [
249
- c(O, {
256
+ u(j, {
250
257
  modelValue: f(d).userId,
251
258
  "onUpdate:modelValue": b[0] || (b[0] = (p) => f(d).userId = p),
252
259
  placeholder: a.$t("topicRobot.userIdRequired"),
@@ -257,7 +264,7 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
257
264
  "allow-create": ""
258
265
  }, {
259
266
  default: s(() => [
260
- (g(!0), G(H, null, J(f(o).values, (p) => (g(), M(u, {
267
+ (v(!0), G(H, null, J(f(o).values, (p) => (v(), M(c, {
261
268
  key: p.key,
262
269
  label: p.value,
263
270
  value: p.key
@@ -271,14 +278,14 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
271
278
  ]),
272
279
  _: 1
273
280
  }),
274
- c(w, { span: 24 }, {
281
+ u(w, { span: 24 }, {
275
282
  default: s(() => [
276
- c(C, {
283
+ u(C, {
277
284
  label: a.$t("topicRobot.robotContent"),
278
285
  prop: "robotContent"
279
286
  }, {
280
287
  default: s(() => [
281
- c(q, {
288
+ u(O, {
282
289
  modelValue: f(d).robotContent,
283
290
  "onUpdate:modelValue": b[1] || (b[1] = (p) => f(d).robotContent = p),
284
291
  placeholder: a.$t("topicRobot.robotContentRequired"),
@@ -304,7 +311,7 @@ const h = new te(), oe = { class: "dialog-footer" }, ne = /* @__PURE__ */ A({
304
311
  }, 8, ["modelValue"]);
305
312
  };
306
313
  }
307
- }), re = /* @__PURE__ */ Z(ne, [["__scopeId", "data-v-88db7c72"]]), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
314
+ }), re = /* @__PURE__ */ Z(ne, [["__scopeId", "data-v-5915b0ff"]]), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
308
315
  __proto__: null,
309
316
  default: re
310
317
  }, Symbol.toStringTag, { value: "Module" }));
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as W, ref as _, reactive as S, resolveComponent as r, resolveDirective as F, createElementBlock as h, openBlock as s, createVNode as c, createBlock as g, createCommentVNode as N, withCtx as l, unref as n, withDirectives as k, createTextVNode as u, toDisplayString as d, isRef as V } from "vue";
2
2
  import { useUserStoreHook as G, useTableHooks as J, routerUtil as M } from "jmash-core";
3
3
  import { useI18n as O } from "vue-i18n";
4
- import { t as Q, a as X } from "./edit-CQhkMihp.mjs";
4
+ import { t as Q, a as X } from "./edit-B-vuO3Gr.mjs";
5
5
  import { useRoute as Y, useRouter as Z } from "vue-router";
6
6
  const ee = { class: "app-container" }, te = ["onClick"], oe = ["onClick"], ce = /* @__PURE__ */ W({
7
7
  __name: "index",
package/dist/index.mjs CHANGED
@@ -64,7 +64,7 @@ function i(e) {
64
64
  let t = e.global.getLocaleMessage("en");
65
65
  t = n(t, a), e.global.setLocaleMessage("zh-cn", o), e.global.setLocaleMessage("en", t);
66
66
  }
67
- const r = /* @__PURE__ */ Object.assign({ "./views/npc/npc-topic-robot/edit.vue": () => import("./edit-CQhkMihp.mjs").then((e) => e.e), "./views/npc/npc-topic-robot/index.vue": () => import("./index-DCfP-zJc.mjs"), "./views/npc/npc-topic/edit.vue": () => import("./edit-DKbHar4T.mjs").then((e) => e.e), "./views/npc/npc-topic/index.vue": () => import("./index-CgLI5mY7.mjs") }), s = {
67
+ const r = /* @__PURE__ */ Object.assign({ "./views/npc/npc-topic-robot/edit.vue": () => import("./edit-B-vuO3Gr.mjs").then((e) => e.e), "./views/npc/npc-topic-robot/index.vue": () => import("./index-CF-ZEpIa.mjs"), "./views/npc/npc-topic/edit.vue": () => import("./edit-DKbHar4T.mjs").then((e) => e.e), "./views/npc/npc-topic/index.vue": () => import("./index-CgLI5mY7.mjs") }), s = {
68
68
  install(e) {
69
69
  c(r, 7), i(p);
70
70
  }
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.position-center[data-v-88db7c72]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-88db7c72]{position:absolute;right:0;top:0;margin-top:8px}.range-separator[data-v-4c0dd255]{display:flex;align-items:center;justify-content:center;height:40px}.range-separator .separator-text[data-v-4c0dd255]{font-size:14px;color:#6b7280;font-weight:500}
1
+ .avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.position-center[data-v-5915b0ff]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-5915b0ff]{position:absolute;right:0;top:0;margin-top:8px}.range-separator[data-v-4c0dd255]{display:flex;align-items:center;justify-content:center;height:40px}.range-separator .separator-text[data-v-4c0dd255]{font-size:14px;color:#6b7280;font-weight:500}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-npc",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/src/index.d.ts",