qy-vue-plugins 0.1.21 → 0.1.22

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,12 +1,13 @@
1
- import { defineComponent as G, ref as w, createBlock as r, openBlock as t, unref as e, withCtx as n, createElementVNode as h, createElementBlock as b, Fragment as _, renderList as y, createVNode as c, createCommentVNode as P, createTextVNode as m } from "vue";
2
- import { Close as I, Plus as R, Refresh as j, Check as L } from "@element-plus/icons-vue";
3
- import { ElDialog as X, ElCol as g, ElSelect as C, ElOption as U, ElDatePicker as z, ElOptionGroup as H, ElCascader as J, ElTreeSelect as K, ElInput as M, ElIcon as Q, ElButton as E } from "element-plus";
4
- import { _ as W } from "../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
5
- const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-field-container" }, el = { class: "dialog-footer" }, al = /* @__PURE__ */ G({
1
+ import { defineComponent as G, ref as w, createBlock as r, openBlock as o, unref as e, withCtx as n, createElementVNode as m, createElementBlock as b, Fragment as _, renderList as y, createVNode as i, createCommentVNode as P, createTextVNode as h } from "vue";
2
+ import { Close as F, Plus as R, Refresh as j, Check as L } from "@element-plus/icons-vue";
3
+ import { ElDialog as X, ElCol as g, ElSelect as C, ElOption as E, ElDatePicker as z, ElOptionGroup as H, ElCascader as J, ElTreeSelect as K, ElInput as M, ElIcon as Q, ElButton as U } from "element-plus";
4
+ import { f as W } from "../chunks/EventKeys-Cy8iJb0N.js";
5
+ import { _ as Y } from "../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const Z = { class: "filter-container" }, ll = ["onClick"], el = { class: "add-field-container" }, al = { class: "dialog-footer" }, tl = /* @__PURE__ */ G({
6
7
  __name: "FilterItem",
7
8
  emits: ["callback"],
8
- setup(ol, { expose: O, emit: D }) {
9
- const f = w(!1), i = w([]), q = D, V = {
9
+ setup(ol, { expose: I, emit: O }) {
10
+ const f = w(!1), c = w([]), D = O, V = {
10
11
  string: [
11
12
  { label: "等于", value: "eq" },
12
13
  { label: "不等于", value: "ne" },
@@ -54,14 +55,14 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
54
55
  };
55
56
  V.singleSelect = V.select;
56
57
  const p = w([]), B = (s) => {
57
- console.log(s), f.value = !0, i.value = s, p.value.length === 0 && p.value.push({
58
+ console.log(s), f.value = !0, c.value = s, p.value.length === 0 && p.value.push({
58
59
  field: s[0].title,
59
60
  fieldType: s[0].filterAble,
60
61
  option: "eq",
61
62
  value: ""
62
63
  });
63
64
  }, A = () => {
64
- p.value = [], f.value = !1, q("callback", {});
65
+ p.value = [], f.value = !1, D("callback", {});
65
66
  }, N = (s) => {
66
67
  p.value.splice(s, 1);
67
68
  }, S = () => {
@@ -72,30 +73,30 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
72
73
  value: ""
73
74
  });
74
75
  }, x = (s, u) => {
75
- const l = i.value.find((d) => d.title === s);
76
+ const l = c.value.find((d) => d.title === s);
76
77
  l && (p.value[u].fieldType = l.filterAble, p.value[u].value = "", V[l.filterAble].filter((d) => d.value === p.value[u].option).length === 0 && (p.value[u].option = "eq"));
77
78
  };
78
- var F = {
79
+ var q = {
79
80
  blockId: "showBlockId"
80
81
  };
81
82
  const $ = () => {
82
83
  f.value = !1;
83
84
  var s = {};
84
85
  Object.assign([], p.value).forEach((l) => {
85
- console.log(l), (l.option == "null" || l.option == "notnull") && (l.value = l.option), l.value !== "" && i.value.forEach((d) => {
86
- var o;
87
- d.title === l.field && (d.filterAble === "cascader" ? (o = d.propertyGroup) == null || o.forEach((k, a) => {
86
+ console.log(l), (l.option == "null" || l.option == "notnull") && (l.value = l.option), l.value !== "" && c.value.forEach((d) => {
87
+ var t;
88
+ d.title === l.field && (d.filterAble === "cascader" ? (t = d.propertyGroup) == null || t.forEach((k, a) => {
88
89
  s[k + "__" + l.option] = l.value[a];
89
- }) : d.property && F[d.property] ? s[F[d.property] + "__" + l.option] = l.value : s[d.property + "__" + l.option] = l.value);
90
+ }) : d.property && q[d.property] ? s[q[d.property] + "__" + l.option] = l.value : s[d.property + "__" + l.option] = l.value);
90
91
  });
91
- }), q("callback", s);
92
+ }), W.emit(s);
92
93
  };
93
- return O({
94
+ return I({
94
95
  showDialog: B,
95
96
  resetForm: () => {
96
- p.value = [], f.value = !1, i.value = [];
97
+ p.value = [], f.value = !1, c.value = [];
97
98
  }
98
- }), (s, u) => (t(), r(e(X), {
99
+ }), (s, u) => (o(), r(e(X), {
99
100
  center: "",
100
101
  title: "设置筛选条件",
101
102
  modelValue: f.value,
@@ -104,37 +105,37 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
104
105
  class: "filter-dialog"
105
106
  }, {
106
107
  footer: n(() => [
107
- h("div", el, [
108
- c(e(E), {
108
+ m("div", al, [
109
+ i(e(U), {
109
110
  type: "default",
110
111
  onClick: A,
111
112
  plain: "",
112
113
  icon: e(j)
113
114
  }, {
114
115
  default: n(() => u[3] || (u[3] = [
115
- m("重置")
116
+ h("重置")
116
117
  ])),
117
118
  _: 1,
118
119
  __: [3]
119
120
  }, 8, ["icon"]),
120
- c(e(E), {
121
+ i(e(U), {
121
122
  onClick: u[0] || (u[0] = (l) => f.value = !1),
122
- icon: e(I),
123
+ icon: e(F),
123
124
  plain: ""
124
125
  }, {
125
126
  default: n(() => u[4] || (u[4] = [
126
- m("取消")
127
+ h("取消")
127
128
  ])),
128
129
  _: 1,
129
130
  __: [4]
130
131
  }, 8, ["icon"]),
131
- c(e(E), {
132
+ i(e(U), {
132
133
  type: "primary",
133
134
  onClick: $,
134
135
  icon: e(L)
135
136
  }, {
136
137
  default: n(() => u[5] || (u[5] = [
137
- m("确定")
138
+ h("确定")
138
139
  ])),
139
140
  _: 1,
140
141
  __: [5]
@@ -142,28 +143,28 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
142
143
  ])
143
144
  ]),
144
145
  default: n(() => [
145
- h("div", Y, [
146
- (t(!0), b(_, null, y(p.value, (l, d) => (t(), b("div", {
146
+ m("div", Z, [
147
+ (o(!0), b(_, null, y(p.value, (l, d) => (o(), b("div", {
147
148
  class: "filter-item",
148
149
  key: d
149
150
  }, [
150
- c(e(g), {
151
+ i(e(g), {
151
152
  span: 5,
152
153
  offset: 0
153
154
  }, {
154
155
  default: n(() => [
155
- c(e(C), {
156
+ i(e(C), {
156
157
  modelValue: l.field,
157
- "onUpdate:modelValue": (o) => l.field = o,
158
- onChange: (o) => x(o, d),
158
+ "onUpdate:modelValue": (t) => l.field = t,
159
+ onChange: (t) => x(t, d),
159
160
  placeholder: "选择字段",
160
161
  class: "field-select"
161
162
  }, {
162
163
  default: n(() => [
163
- (t(!0), b(_, null, y(i.value, (o) => (t(), r(e(U), {
164
- key: o.title,
165
- label: o.title,
166
- value: o.title
164
+ (o(!0), b(_, null, y(c.value, (t) => (o(), r(e(E), {
165
+ key: t.title,
166
+ label: t.title,
167
+ value: t.title
167
168
  }, null, 8, ["label", "value"]))), 128))
168
169
  ]),
169
170
  _: 2
@@ -171,22 +172,22 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
171
172
  ]),
172
173
  _: 2
173
174
  }, 1024),
174
- c(e(g), {
175
+ i(e(g), {
175
176
  span: 4,
176
177
  offset: 0
177
178
  }, {
178
179
  default: n(() => [
179
- c(e(C), {
180
+ i(e(C), {
180
181
  modelValue: l.option,
181
- "onUpdate:modelValue": (o) => l.option = o,
182
+ "onUpdate:modelValue": (t) => l.option = t,
182
183
  placeholder: "操作",
183
184
  class: "option-select"
184
185
  }, {
185
186
  default: n(() => [
186
- (t(!0), b(_, null, y(V[l.fieldType], (o) => (t(), r(e(U), {
187
- key: o.value,
188
- label: o.label,
189
- value: o.value
187
+ (o(!0), b(_, null, y(V[l.fieldType], (t) => (o(), r(e(E), {
188
+ key: t.value,
189
+ label: t.label,
190
+ value: t.value
190
191
  }, null, 8, ["label", "value"]))), 128))
191
192
  ]),
192
193
  _: 2
@@ -194,15 +195,15 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
194
195
  ]),
195
196
  _: 2
196
197
  }, 1024),
197
- l.option != "null" && l.option != "notnull" ? (t(), r(e(g), {
198
+ l.option != "null" && l.option != "notnull" ? (o(), r(e(g), {
198
199
  key: 0,
199
200
  span: 13,
200
201
  offset: 0
201
202
  }, {
202
203
  default: n(() => {
203
- var o, k;
204
+ var t, k;
204
205
  return [
205
- l.fieldType == "date" ? (t(), r(e(z), {
206
+ l.fieldType == "date" ? (o(), r(e(z), {
206
207
  key: 0,
207
208
  modelValue: l.value,
208
209
  "onUpdate:modelValue": (a) => l.value = a,
@@ -211,7 +212,7 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
211
212
  style: { width: "100%" },
212
213
  "value-format": "X",
213
214
  class: "value-input"
214
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : l.fieldType == "select" || l.fieldType == "singleSelect" ? (t(), r(e(C), {
215
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : l.fieldType == "select" || l.fieldType == "singleSelect" ? (o(), r(e(C), {
215
216
  key: 1,
216
217
  modelValue: l.value,
217
218
  "onUpdate:modelValue": (a) => l.value = a,
@@ -222,15 +223,15 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
222
223
  default: n(() => {
223
224
  var a;
224
225
  return [
225
- (t(!0), b(_, null, y((a = i.value.find((v) => v.title == l.field)) == null ? void 0 : a.selectOptions, (v) => (t(), r(e(U), {
226
- key: v.value,
226
+ (o(!0), b(_, null, y((a = c.value.find((v) => v.title == l.field)) == null ? void 0 : a.selectOptions, (v) => (o(), r(e(E), {
227
+ key: v.label,
227
228
  label: v.label,
228
229
  value: v.value
229
230
  }, null, 8, ["label", "value"]))), 128))
230
231
  ];
231
232
  }),
232
233
  _: 2
233
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : l.fieldType == "selectGroup" ? (t(), r(e(C), {
234
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : l.fieldType == "selectGroup" ? (o(), r(e(C), {
234
235
  key: 2,
235
236
  modelValue: l.value,
236
237
  "onUpdate:modelValue": (a) => l.value = a,
@@ -241,13 +242,13 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
241
242
  default: n(() => {
242
243
  var a;
243
244
  return [
244
- (t(!0), b(_, null, y((a = i.value.find((v) => v.title == l.field)) == null ? void 0 : a.selectOptions, (v) => (t(), r(e(H), {
245
+ (o(!0), b(_, null, y((a = c.value.find((v) => v.title == l.field)) == null ? void 0 : a.selectOptions, (v) => (o(), r(e(H), {
245
246
  key: v.label,
246
247
  label: v.label
247
248
  }, {
248
249
  default: n(() => [
249
- (t(!0), b(_, null, y(v.children, (T) => (t(), r(e(U), {
250
- key: T.value,
250
+ (o(!0), b(_, null, y(v.children, (T) => (o(), r(e(E), {
251
+ key: T.label,
251
252
  label: T.label,
252
253
  value: T.value
253
254
  }, null, 8, ["label", "value"]))), 128))
@@ -257,25 +258,25 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
257
258
  ];
258
259
  }),
259
260
  _: 2
260
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : l.fieldType == "cascader" ? (t(), r(e(J), {
261
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : l.fieldType == "cascader" ? (o(), r(e(J), {
261
262
  key: 3,
262
263
  modelValue: l.value,
263
264
  "onUpdate:modelValue": (a) => l.value = a,
264
- options: (o = i.value.find((a) => a.title == l.field)) == null ? void 0 : o.selectOptions,
265
+ options: (t = c.value.find((a) => a.title == l.field)) == null ? void 0 : t.selectOptions,
265
266
  placeholder: "请选择",
266
267
  style: { width: "100%" },
267
268
  class: "value-input"
268
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : l.fieldType == "select_second" ? (t(), r(e(K), {
269
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : l.fieldType == "select_second" ? (o(), r(e(K), {
269
270
  key: 4,
270
271
  modelValue: l.value,
271
272
  "onUpdate:modelValue": (a) => l.value = a,
272
- data: (k = i.value.find((a) => a.title == l.field)) == null ? void 0 : k.selectOptions,
273
+ data: (k = c.value.find((a) => a.title == l.field)) == null ? void 0 : k.selectOptions,
273
274
  "check-strictly": "",
274
275
  "render-after-expand": !1,
275
276
  "show-checkbox": "",
276
277
  style: { width: "100%" },
277
278
  class: "value-input"
278
- }, null, 8, ["modelValue", "onUpdate:modelValue", "data"])) : (t(), r(e(M), {
279
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "data"])) : (o(), r(e(M), {
279
280
  key: 5,
280
281
  modelValue: l.value,
281
282
  "onUpdate:modelValue": (a) => l.value = a,
@@ -287,28 +288,28 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
287
288
  }),
288
289
  _: 2
289
290
  }, 1024)) : P("", !0),
290
- c(e(g), {
291
+ i(e(g), {
291
292
  span: 2,
292
293
  offset: 0
293
294
  }, {
294
295
  default: n(() => [
295
- h("div", {
296
+ m("div", {
296
297
  class: "delete-button",
297
- onClick: (o) => N(d)
298
+ onClick: (t) => N(d)
298
299
  }, [
299
- c(e(Q), null, {
300
+ i(e(Q), null, {
300
301
  default: n(() => [
301
- c(e(I))
302
+ i(e(F))
302
303
  ]),
303
304
  _: 1
304
305
  })
305
- ], 8, Z)
306
+ ], 8, ll)
306
307
  ]),
307
308
  _: 2
308
309
  }, 1024)
309
310
  ]))), 128)),
310
- h("div", ll, [
311
- c(e(E), {
311
+ m("div", el, [
312
+ i(e(U), {
312
313
  type: "primary",
313
314
  plain: "",
314
315
  icon: e(R),
@@ -316,7 +317,7 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
316
317
  class: "add-button"
317
318
  }, {
318
319
  default: n(() => u[2] || (u[2] = [
319
- m(" 增加筛选字段 ")
320
+ h(" 增加筛选字段 ")
320
321
  ])),
321
322
  _: 1,
322
323
  __: [2]
@@ -327,7 +328,7 @@ const Y = { class: "filter-container" }, Z = ["onClick"], ll = { class: "add-fie
327
328
  _: 1
328
329
  }, 8, ["modelValue"]));
329
330
  }
330
- }), rl = /* @__PURE__ */ W(al, [["__scopeId", "data-v-47b651ff"]]);
331
+ }), vl = /* @__PURE__ */ Y(tl, [["__scopeId", "data-v-b054529c"]]);
331
332
  export {
332
- rl as default
333
+ vl as default
333
334
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RenderFormItem.vue_vue_type_style_index_0_lang-DyQCqwfZ.js");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RenderFormItem.vue_vue_type_style_index_0_lang-CGxnSN-x.js");exports.default=e._sfc_main;
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../chunks/RenderFormItem.vue_vue_type_style_index_0_lang-BKjS65Ak.js";
1
+ import { _ as f } from "../chunks/RenderFormItem.vue_vue_type_style_index_0_lang-LijDQik_.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@element-plus/icons-vue"),l=require("element-plus"),N=require("../chunks/_plugin-vue_export-helper-BHFhmbuH.js"),h={class:"sort-container"},g={class:"sort-header"},C={class:"sort-label"},b=["onClick"],B={class:"sort-content"},w={class:"add-field-container"},x={class:"dialog-footer"},y=e.defineComponent({__name:"SortItem",emits:["callback"],setup(S,{expose:f,emit:p}){const s=e.ref(!1),d=e.ref([]),v=[{label:"升序",value:"asc"},{label:"降序",value:"desc"}],a=e.ref([]),m=(n,o)=>{s.value=!0,a.value.length===0&&a.value.push({field:o,sort:"desc"}),d.value=n},V=p;var i={blockId:"showBlockId"};const _=()=>{const n=new Set;for(const t of a.value){if(n.has(t.field)){l.ElMessage.error("排序字段不能重复");return}if(t.field===""){l.ElMessage.error("排序字段不能为空");return}n.add(t.field)}s.value=!1;var o=a.value.map(t=>i[t.field]?i[t.field]+":"+t.sort:t.field+":"+t.sort);console.log("排序结果:",o),V("callback",o)},k=n=>{if(a.value.length===1){l.ElMessage.error("至少保留一个排序字段");return}a.value.splice(n,1)},E=()=>{if(d.value.length===a.value.length){l.ElMessage.error("已经没有可排序的字段了");return}a.value.push({field:"",sort:"desc"})};return f({showDialog:m}),(n,o)=>(e.openBlock(),e.createBlock(e.unref(l.ElDialog),{center:"",modelValue:s.value,"onUpdate:modelValue":o[1]||(o[1]=t=>s.value=t),title:"综合排序",width:"500",class:"sort-dialog"},{footer:e.withCtx(()=>[e.createElementVNode("div",x,[e.createVNode(e.unref(l.ElButton),{onClick:o[0]||(o[0]=t=>s.value=!1),class:"cancel-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Close))]),_:1}),o[3]||(o[3]=e.createTextVNode("取消 "))]),_:1,__:[3]}),e.createVNode(e.unref(l.ElButton),{type:"primary",onClick:_,class:"confirm-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Check))]),_:1}),o[4]||(o[4]=e.createTextVNode("确定 "))]),_:1,__:[4]})])]),default:e.withCtx(()=>[e.createElementVNode("div",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"sort-item"},[e.createElementVNode("div",g,[e.createElementVNode("div",C,"第"+e.toDisplayString(u+1)+"排序",1),u>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"delete-button",onClick:r=>k(u)},[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Close))]),_:1})],8,b)):e.createCommentVNode("",!0)]),e.createElementVNode("div",B,[e.createVNode(e.unref(l.ElSelect),{modelValue:t.field,"onUpdate:modelValue":r=>t.field=r,placeholder:"选择字段",class:"field-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,r=>(e.openBlock(),e.createBlock(e.unref(l.ElOption),{key:r.property,label:r.title,value:r.property},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(l.ElSelect),{modelValue:t.sort,"onUpdate:modelValue":r=>t.sort=r,class:"sort-select"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,r=>e.createVNode(e.unref(l.ElOption),{key:r.value,label:r.label,value:r.value},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])])]))),128)),e.createElementVNode("div",w,[e.createVNode(e.unref(l.ElButton),{type:"primary",plain:"",class:"add-button",onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Plus))]),_:1}),o[2]||(o[2]=e.createElementVNode("span",null,"添加排序条件",-1))]),_:1,__:[2]})])])]),_:1},8,["modelValue"]))}}),I=N._export_sfc(y,[["__scopeId","data-v-2d39b923"]]);exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@element-plus/icons-vue"),l=require("element-plus"),E=require("../chunks/EventKeys-D78tN5KT.js"),k=require("../chunks/_plugin-vue_export-helper-BHFhmbuH.js"),N={class:"sort-container"},h={class:"sort-header"},g={class:"sort-label"},C=["onClick"],B={class:"sort-content"},b={class:"add-field-container"},w={class:"dialog-footer"},x=e.defineComponent({__name:"SortItem",emits:["callback"],setup(I,{expose:f,emit:S}){const s=e.ref(!1),d=e.ref([]),v=[{label:"升序",value:"asc"},{label:"降序",value:"desc"}],a=e.ref([]),p=(n,o)=>{s.value=!0,a.value.length===0&&a.value.push({field:o,sort:"desc"}),d.value=n};var i={blockId:"showBlockId"};const m=()=>{const n=new Set;for(const t of a.value){if(n.has(t.field)){l.ElMessage.error("排序字段不能重复");return}if(t.field===""){l.ElMessage.error("排序字段不能为空");return}n.add(t.field)}s.value=!1;var o=a.value.map(t=>i[t.field]?i[t.field]+":"+t.sort:t.field+":"+t.sort);console.log("排序结果:",o),E.sortEventBus.emit(o)},V=n=>{if(a.value.length===1){l.ElMessage.error("至少保留一个排序字段");return}a.value.splice(n,1)},_=()=>{if(d.value.length===a.value.length){l.ElMessage.error("已经没有可排序的字段了");return}a.value.push({field:"",sort:"desc"})};return f({showDialog:p}),(n,o)=>(e.openBlock(),e.createBlock(e.unref(l.ElDialog),{center:"",modelValue:s.value,"onUpdate:modelValue":o[1]||(o[1]=t=>s.value=t),title:"综合排序",width:"500",class:"sort-dialog"},{footer:e.withCtx(()=>[e.createElementVNode("div",w,[e.createVNode(e.unref(l.ElButton),{onClick:o[0]||(o[0]=t=>s.value=!1),class:"cancel-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Close))]),_:1}),o[3]||(o[3]=e.createTextVNode("取消 "))]),_:1,__:[3]}),e.createVNode(e.unref(l.ElButton),{type:"primary",onClick:m,class:"confirm-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Check))]),_:1}),o[4]||(o[4]=e.createTextVNode("确定 "))]),_:1,__:[4]})])]),default:e.withCtx(()=>[e.createElementVNode("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"sort-item"},[e.createElementVNode("div",h,[e.createElementVNode("div",g,"第"+e.toDisplayString(u+1)+"排序",1),u>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"delete-button",onClick:r=>V(u)},[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Close))]),_:1})],8,C)):e.createCommentVNode("",!0)]),e.createElementVNode("div",B,[e.createVNode(e.unref(l.ElSelect),{modelValue:t.field,"onUpdate:modelValue":r=>t.field=r,placeholder:"选择字段",class:"field-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,r=>(e.openBlock(),e.createBlock(e.unref(l.ElOption),{key:r.property,label:r.title,value:r.property},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"]),e.createVNode(e.unref(l.ElSelect),{modelValue:t.sort,"onUpdate:modelValue":r=>t.sort=r,class:"sort-select"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,r=>e.createVNode(e.unref(l.ElOption),{key:r.value,label:r.label,value:r.value},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])])]))),128)),e.createElementVNode("div",b,[e.createVNode(e.unref(l.ElButton),{type:"primary",plain:"",class:"add-button",onClick:_},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(c.Plus))]),_:1}),o[2]||(o[2]=e.createElementVNode("span",null,"添加排序条件",-1))]),_:1,__:[2]})])])]),_:1},8,["modelValue"]))}}),y=k._export_sfc(x,[["__scopeId","data-v-ea70c104"]]);exports.default=y;
@@ -1,48 +1,49 @@
1
- import { defineComponent as $, ref as _, createBlock as h, openBlock as d, unref as l, withCtx as s, createElementVNode as u, createElementBlock as c, Fragment as b, renderList as k, createCommentVNode as O, toDisplayString as L, createVNode as o, createTextVNode as y } from "vue";
2
- import { Close as C, Plus as M, Check as P } from "@element-plus/icons-vue";
3
- import { ElDialog as R, ElIcon as v, ElSelect as E, ElOption as I, ElButton as V, ElMessage as p } from "element-plus";
4
- import { _ as T } from "../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
5
- const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class: "sort-label" }, A = ["onClick"], G = { class: "sort-content" }, H = { class: "add-field-container" }, J = { class: "dialog-footer" }, K = /* @__PURE__ */ $({
1
+ import { defineComponent as N, ref as _, createBlock as h, openBlock as u, unref as l, withCtx as s, createElementVNode as d, createElementBlock as c, Fragment as k, renderList as V, createCommentVNode as x, toDisplayString as O, createVNode as o, createTextVNode as y } from "vue";
2
+ import { Close as C, Plus as $, Check as L } from "@element-plus/icons-vue";
3
+ import { ElDialog as M, ElIcon as v, ElSelect as E, ElOption as I, ElButton as b, ElMessage as m } from "element-plus";
4
+ import { s as P } from "../chunks/EventKeys-Cy8iJb0N.js";
5
+ import { _ as R } from "../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const T = { class: "sort-container" }, j = { class: "sort-header" }, q = { class: "sort-label" }, z = ["onClick"], A = { class: "sort-content" }, G = { class: "add-field-container" }, H = { class: "dialog-footer" }, J = /* @__PURE__ */ N({
6
7
  __name: "SortItem",
7
8
  emits: ["callback"],
8
- setup(Q, { expose: S, emit: w }) {
9
- const i = _(!1), m = _([]), B = [
9
+ setup(K, { expose: S, emit: Q }) {
10
+ const i = _(!1), p = _([]), B = [
10
11
  { label: "升序", value: "asc" },
11
12
  { label: "降序", value: "desc" }
12
- ], r = _([]), D = (n, t) => {
13
+ ], r = _([]), w = (n, t) => {
13
14
  i.value = !0, r.value.length === 0 && r.value.push({
14
15
  field: t,
15
16
  sort: "desc"
16
- }), m.value = n;
17
- }, F = w;
17
+ }), p.value = n;
18
+ };
18
19
  var g = {
19
20
  blockId: "showBlockId"
20
21
  };
21
- const U = () => {
22
+ const D = () => {
22
23
  const n = /* @__PURE__ */ new Set();
23
24
  for (const e of r.value) {
24
25
  if (n.has(e.field)) {
25
- p.error("排序字段不能重复");
26
+ m.error("排序字段不能重复");
26
27
  return;
27
28
  }
28
29
  if (e.field === "") {
29
- p.error("排序字段不能为空");
30
+ m.error("排序字段不能为空");
30
31
  return;
31
32
  }
32
33
  n.add(e.field);
33
34
  }
34
35
  i.value = !1;
35
36
  var t = r.value.map((e) => g[e.field] ? g[e.field] + ":" + e.sort : e.field + ":" + e.sort);
36
- console.log("排序结果:", t), F("callback", t);
37
- }, N = (n) => {
37
+ console.log("排序结果:", t), P.emit(t);
38
+ }, F = (n) => {
38
39
  if (r.value.length === 1) {
39
- p.error("至少保留一个排序字段");
40
+ m.error("至少保留一个排序字段");
40
41
  return;
41
42
  }
42
43
  r.value.splice(n, 1);
43
- }, x = () => {
44
- if (m.value.length === r.value.length) {
45
- p.error("已经没有可排序的字段了");
44
+ }, U = () => {
45
+ if (p.value.length === r.value.length) {
46
+ m.error("已经没有可排序的字段了");
46
47
  return;
47
48
  }
48
49
  r.value.push({
@@ -51,8 +52,8 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
51
52
  });
52
53
  };
53
54
  return S({
54
- showDialog: D
55
- }), (n, t) => (d(), h(l(R), {
55
+ showDialog: w
56
+ }), (n, t) => (u(), h(l(M), {
56
57
  center: "",
57
58
  modelValue: i.value,
58
59
  "onUpdate:modelValue": t[1] || (t[1] = (e) => i.value = e),
@@ -61,8 +62,8 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
61
62
  class: "sort-dialog"
62
63
  }, {
63
64
  footer: s(() => [
64
- u("div", J, [
65
- o(l(V), {
65
+ d("div", H, [
66
+ o(l(b), {
66
67
  onClick: t[0] || (t[0] = (e) => i.value = !1),
67
68
  class: "cancel-button"
68
69
  }, {
@@ -78,15 +79,15 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
78
79
  _: 1,
79
80
  __: [3]
80
81
  }),
81
- o(l(V), {
82
+ o(l(b), {
82
83
  type: "primary",
83
- onClick: U,
84
+ onClick: D,
84
85
  class: "confirm-button"
85
86
  }, {
86
87
  default: s(() => [
87
88
  o(l(v), null, {
88
89
  default: s(() => [
89
- o(l(P))
90
+ o(l(L))
90
91
  ]),
91
92
  _: 1
92
93
  }),
@@ -98,17 +99,17 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
98
99
  ])
99
100
  ]),
100
101
  default: s(() => [
101
- u("div", j, [
102
- (d(!0), c(b, null, k(r.value, (e, f) => (d(), c("div", {
102
+ d("div", T, [
103
+ (u(!0), c(k, null, V(r.value, (e, f) => (u(), c("div", {
103
104
  key: f,
104
105
  class: "sort-item"
105
106
  }, [
106
- u("div", q, [
107
- u("div", z, "第" + L(f + 1) + "排序", 1),
108
- f > 0 ? (d(), c("div", {
107
+ d("div", j, [
108
+ d("div", q, "第" + O(f + 1) + "排序", 1),
109
+ f > 0 ? (u(), c("div", {
109
110
  key: 0,
110
111
  class: "delete-button",
111
- onClick: (a) => N(f)
112
+ onClick: (a) => F(f)
112
113
  }, [
113
114
  o(l(v), null, {
114
115
  default: s(() => [
@@ -116,9 +117,9 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
116
117
  ]),
117
118
  _: 1
118
119
  })
119
- ], 8, A)) : O("", !0)
120
+ ], 8, z)) : x("", !0)
120
121
  ]),
121
- u("div", G, [
122
+ d("div", A, [
122
123
  o(l(E), {
123
124
  modelValue: e.field,
124
125
  "onUpdate:modelValue": (a) => e.field = a,
@@ -126,7 +127,7 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
126
127
  class: "field-select"
127
128
  }, {
128
129
  default: s(() => [
129
- (d(!0), c(b, null, k(m.value, (a) => (d(), h(l(I), {
130
+ (u(!0), c(k, null, V(p.value, (a) => (u(), h(l(I), {
130
131
  key: a.property,
131
132
  label: a.title,
132
133
  value: a.property
@@ -140,7 +141,7 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
140
141
  class: "sort-select"
141
142
  }, {
142
143
  default: s(() => [
143
- (d(), c(b, null, k(B, (a) => o(l(I), {
144
+ (u(), c(k, null, V(B, (a) => o(l(I), {
144
145
  key: a.value,
145
146
  label: a.label,
146
147
  value: a.value
@@ -150,21 +151,21 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
150
151
  }, 1032, ["modelValue", "onUpdate:modelValue"])
151
152
  ])
152
153
  ]))), 128)),
153
- u("div", H, [
154
- o(l(V), {
154
+ d("div", G, [
155
+ o(l(b), {
155
156
  type: "primary",
156
157
  plain: "",
157
158
  class: "add-button",
158
- onClick: x
159
+ onClick: U
159
160
  }, {
160
161
  default: s(() => [
161
162
  o(l(v), null, {
162
163
  default: s(() => [
163
- o(l(M))
164
+ o(l($))
164
165
  ]),
165
166
  _: 1
166
167
  }),
167
- t[2] || (t[2] = u("span", null, "添加排序条件", -1))
168
+ t[2] || (t[2] = d("span", null, "添加排序条件", -1))
168
169
  ]),
169
170
  _: 1,
170
171
  __: [2]
@@ -175,7 +176,7 @@ const j = { class: "sort-container" }, q = { class: "sort-header" }, z = { class
175
176
  _: 1
176
177
  }, 8, ["modelValue"]));
177
178
  }
178
- }), ee = /* @__PURE__ */ T(K, [["__scopeId", "data-v-2d39b923"]]);
179
+ }), le = /* @__PURE__ */ R(J, [["__scopeId", "data-v-ea70c104"]]);
179
180
  export {
180
- ee as default
181
+ le as default
181
182
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./manageTable.cjs"),a=require("../chunks/imageReview.vue_vue_type_style_index_0_lang-B-S4Gh6W.js"),i=require("../chunks/ProvideKeys-BPenLFlD.js");exports.MangerTable=e.default;exports.default=e.default;exports.imageReview=a._sfc_main;exports.speciesNameQueryKey=i.speciesNameQueryKey;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./manageTable.cjs"),s=require("../chunks/imageReview.vue_vue_type_style_index_0_lang-B-S4Gh6W.js"),r=require("../chunks/ProvideKeys-BPenLFlD.js"),t=require("../chunks/EventKeys-D78tN5KT.js");exports.MangerTable=e.default;exports.default=e.default;exports.imageReview=s._sfc_main;exports.speciesNameQueryKey=r.speciesNameQueryKey;exports.filterEventBus=t.filterEventBus;exports.sortEventBus=t.sortEventBus;
@@ -1,9 +1,12 @@
1
1
  import r from "./manageTable.mjs";
2
- import { _ as m } from "../chunks/imageReview.vue_vue_type_style_index_0_lang-CJi-hvC0.js";
3
- import { s as p } from "../chunks/ProvideKeys-jhgDnhL_.js";
2
+ import { _ as o } from "../chunks/imageReview.vue_vue_type_style_index_0_lang-CJi-hvC0.js";
3
+ import { s as f } from "../chunks/ProvideKeys-jhgDnhL_.js";
4
+ import { f as p, s as i } from "../chunks/EventKeys-Cy8iJb0N.js";
4
5
  export {
5
6
  r as MangerTable,
6
7
  r as default,
7
- m as imageReview,
8
- p as speciesNameQueryKey
8
+ p as filterEventBus,
9
+ o as imageReview,
10
+ i as sortEventBus,
11
+ f as speciesNameQueryKey
9
12
  };