general-basic-form 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/index.js +915 -266
- package/dist/index.umd.cjs +1 -1
- package/package.json +72 -60
- package/README.assets/image-20210820173738506.png +0 -0
- package/public/index.d.ts +0 -17
- package/script/initialization.ts +0 -24
- package/script/link.ts +0 -14
- package/script/linkNode.ts +0 -14
- package/script/unlinkModule.ts +0 -48
- package/script/unlinkNode.ts +0 -38
- package/tsconfig.json +0 -14
- package/vite.config.js +0 -121
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { nextTick as
|
|
2
|
-
function
|
|
3
|
-
var
|
|
4
|
-
e && (
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
7
|
-
|
|
1
|
+
import { nextTick as he } from "vue";
|
|
2
|
+
function E(a, e, t, r, n, o, i, s) {
|
|
3
|
+
var c = typeof a == "function" ? a.options : a;
|
|
4
|
+
e && (c.render = e, c.staticRenderFns = t, c._compiled = !0), r && (c.functional = !0), o && (c._scopeId = "data-v-" + o);
|
|
5
|
+
var f;
|
|
6
|
+
if (i ? (f = function(l) {
|
|
7
|
+
l = l || // cached call
|
|
8
8
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
9
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !
|
|
10
|
-
},
|
|
11
|
-
|
|
9
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !l && typeof __VUE_SSR_CONTEXT__ < "u" && (l = __VUE_SSR_CONTEXT__), n && n.call(this, l), l && l._registeredComponents && l._registeredComponents.add(i);
|
|
10
|
+
}, c._ssrRegister = f) : n && (f = s ? function() {
|
|
11
|
+
n.call(
|
|
12
12
|
this,
|
|
13
|
-
(
|
|
13
|
+
(c.functional ? this.parent : this).$root.$options.shadowRoot
|
|
14
14
|
);
|
|
15
|
-
} :
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
return
|
|
15
|
+
} : n), f)
|
|
16
|
+
if (c.functional) {
|
|
17
|
+
c._injectStyles = f;
|
|
18
|
+
var p = c.render;
|
|
19
|
+
c.render = function(y, b) {
|
|
20
|
+
return f.call(b), p(y, b);
|
|
21
21
|
};
|
|
22
22
|
} else {
|
|
23
|
-
var
|
|
24
|
-
|
|
23
|
+
var u = c.beforeCreate;
|
|
24
|
+
c.beforeCreate = u ? [].concat(u, f) : [f];
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
-
exports:
|
|
28
|
-
options:
|
|
27
|
+
exports: a,
|
|
28
|
+
options: c
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const be = {
|
|
32
32
|
props: {
|
|
33
33
|
verificationSetting: {
|
|
34
34
|
type: Object,
|
|
@@ -76,45 +76,672 @@ const g = {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
var
|
|
80
|
-
var e = this,
|
|
81
|
-
return
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
var _e = function() {
|
|
80
|
+
var e = this, t = e._self._c;
|
|
81
|
+
return t("el-button", { on: { click: e.buttonClick } }, [e._v(e._s(e.buttonType ? e.defaultText : e.buttonText + "s"))]);
|
|
82
|
+
}, ge = [], ve = /* @__PURE__ */ E(
|
|
83
|
+
be,
|
|
84
|
+
_e,
|
|
85
|
+
ge,
|
|
86
86
|
!1,
|
|
87
87
|
null,
|
|
88
88
|
null,
|
|
89
89
|
null,
|
|
90
90
|
null
|
|
91
91
|
);
|
|
92
|
-
const
|
|
93
|
-
for (const e in
|
|
94
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
95
|
-
const
|
|
96
|
-
Object.prototype.toString.call(
|
|
92
|
+
const De = ve.exports, we = (a = {}) => {
|
|
93
|
+
for (const e in a)
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(a, e)) {
|
|
95
|
+
const t = a[e];
|
|
96
|
+
Object.prototype.toString.call(t) === "[object Object]" && (a[e] = JSON.stringify(t));
|
|
97
97
|
}
|
|
98
|
-
return
|
|
99
|
-
},
|
|
100
|
-
for (const e in
|
|
101
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
102
|
-
const
|
|
98
|
+
return a;
|
|
99
|
+
}, Se = (a = {}) => {
|
|
100
|
+
for (const e in a)
|
|
101
|
+
if (Object.prototype.hasOwnProperty.call(a, e)) {
|
|
102
|
+
const t = a[e];
|
|
103
103
|
try {
|
|
104
|
-
/[{]+/g.test(
|
|
104
|
+
/[{]+/g.test(t) && /[}]+/g.test(t) && (a[e] = JSON.parse(t));
|
|
105
105
|
} catch {
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
return
|
|
109
|
-
},
|
|
110
|
-
|
|
108
|
+
return a;
|
|
109
|
+
}, se = { paramsToQuery: we, queryToData: Se }, N = q;
|
|
110
|
+
(function(a, e) {
|
|
111
|
+
const t = q, r = a();
|
|
112
|
+
for (; ; )
|
|
113
|
+
try {
|
|
114
|
+
if (parseInt(t(561)) / 1 + -parseInt(t(558)) / 2 + parseInt(t(521)) / 3 * (parseInt(t(527)) / 4) + -parseInt(t(506)) / 5 * (parseInt(t(510)) / 6) + -parseInt(t(550)) / 7 * (parseInt(t(503)) / 8) + parseInt(t(540)) / 9 + -parseInt(t(546)) / 10 * (-parseInt(t(562)) / 11) === e)
|
|
115
|
+
break;
|
|
116
|
+
r.push(r.shift());
|
|
117
|
+
} catch {
|
|
118
|
+
r.push(r.shift());
|
|
119
|
+
}
|
|
120
|
+
})(W, 819524);
|
|
121
|
+
const w = {};
|
|
122
|
+
let F = null;
|
|
123
|
+
const oe = async (a, e) => {
|
|
124
|
+
const t = q;
|
|
125
|
+
!window[t(543)] && window[t(498)]("您的浏览器不支持IndexedDB的稳定版本。离线数据功能将不可用。Your browser doesn't support a stable version of IndexedDB. offline data feature will not be available.");
|
|
126
|
+
const { DBName: r = "", DBVersion: n = 1 } = a;
|
|
127
|
+
let o, i = !1;
|
|
128
|
+
try {
|
|
129
|
+
const s = window[t(543)][t(519)](r, n);
|
|
130
|
+
await new Promise((c, f) => {
|
|
131
|
+
const p = t;
|
|
132
|
+
s[p(551)] = async function(u) {
|
|
133
|
+
const l = p, y = u.target.result, { stores: b = [] } = a;
|
|
134
|
+
await Promise.all(b[l(509)](async (d) => {
|
|
135
|
+
const m = l, { DBStoreName: h = "", properties: _ = {} } = d;
|
|
136
|
+
try {
|
|
137
|
+
const g = {};
|
|
138
|
+
g[m(536)] = a[m(557)];
|
|
139
|
+
const I = u[m(541)][m(520)][m(554)](h, g);
|
|
140
|
+
if (Object[m(548)](_)[m(500)] === 0) {
|
|
141
|
+
console[m(559)](h + "没有设置默认值");
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
for (const v in _)
|
|
145
|
+
if (_[m(556)][m(515)](_, v)) {
|
|
146
|
+
const D = _[v], B = { ...D.createIndex };
|
|
147
|
+
I[m(504)](v, v, B);
|
|
148
|
+
}
|
|
149
|
+
} catch (g) {
|
|
150
|
+
console[m(559)](g);
|
|
151
|
+
}
|
|
152
|
+
})), o = y, i = !0;
|
|
153
|
+
}, s[p(535)] = async function(u) {
|
|
154
|
+
const l = p;
|
|
155
|
+
if (o = this[l(520)], i) {
|
|
156
|
+
const { stores: y = [] } = a;
|
|
157
|
+
await Promise[l(528)](y[l(509)](async (b) => {
|
|
158
|
+
const d = l, { DBStoreName: m = "" } = b, h = o[d(552)]([m], d(547)), _ = h[d(496)](m), g = {};
|
|
159
|
+
g[a[d(557)]] = e, _[d(502)](g);
|
|
160
|
+
try {
|
|
161
|
+
await new Promise((I, v) => {
|
|
162
|
+
const D = d;
|
|
163
|
+
h[D(525)] = function(B) {
|
|
164
|
+
const P = D;
|
|
165
|
+
console[P(513)](P(512), B), v();
|
|
166
|
+
}, h[D(544)] = function(B) {
|
|
167
|
+
I();
|
|
168
|
+
}, h[D(529)] = function(B) {
|
|
169
|
+
const P = D;
|
|
170
|
+
console[P(513)](P(534), B), v();
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
} catch (I) {
|
|
174
|
+
console.warn(d(511), I);
|
|
175
|
+
}
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
c();
|
|
179
|
+
}, s.onerror = function(u) {
|
|
180
|
+
f(u);
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
} catch (s) {
|
|
184
|
+
console[t(513)](s, t(526));
|
|
185
|
+
}
|
|
186
|
+
return o;
|
|
187
|
+
};
|
|
188
|
+
function W() {
|
|
189
|
+
const a = ["transaction", "DBName", "createObjectStore", "close", "hasOwnProperty", "primaryKey", "208156ZfrAJr", "warn", "delete", "1575928bFmnZg", "154LBDnQZ", "objectStore", "数据更新失败", "alert", "store不存在,请更新schema和DBVersion并重启前端服务", "length", "openCursor", "add", "15752fkogxb", "createIndex", "deleteDB", "299045NkkBTh", "请传入主键", "mapDB", "map", "102uEoUGM", "目前所有数据都在用户ID的主键下面,所以没有主键的话做重新载入页面处理", "主键插入中止", "error", "数据库删除失败", "call", "continue", "update", "deleteStore", "open", "result", "66891DVCnfv", "get", "getDataByKey", "数据删除失败", "onabort", "打开数据库报错,可能是数据库版本不对,或者储存容量不足等原因", "52JGzdMb", "all", "onerror", "put", "数据更新失败没有request", "Database connection closed, reconnecting...", "target", "主键插入失败", "onsuccess", "keyPath", "数据更新成功", "主键查询结果:", "传入结构化克隆算法不支持的数据类型可能导致报错", "4779333CtWPbr", "currentTarget", "获取Database缺乏用户信息,请先传入对primaryKey的赋值", "indexedDB", "oncomplete", "事务失败", "634540WpNScH", "readwrite", "keys", "getDB", "4781SEkDBZ", "onupgradeneeded"];
|
|
190
|
+
return W = function() {
|
|
191
|
+
return a;
|
|
192
|
+
}, W();
|
|
193
|
+
}
|
|
194
|
+
function q(a, e) {
|
|
195
|
+
const t = W();
|
|
196
|
+
return q = function(r, n) {
|
|
197
|
+
return r = r - 496, t[r];
|
|
198
|
+
}, q(a, e);
|
|
199
|
+
}
|
|
200
|
+
let Q = !1;
|
|
201
|
+
w[N(549)] = async (a, e) => {
|
|
202
|
+
const t = N, { mapDB: r, primaryKey: n } = a;
|
|
203
|
+
return r ? n ? (Q && await new Promise(async (o, i) => {
|
|
204
|
+
const s = () => {
|
|
205
|
+
Q ? setTimeout(() => {
|
|
206
|
+
s();
|
|
207
|
+
}, 200) : o();
|
|
208
|
+
};
|
|
209
|
+
s();
|
|
210
|
+
}), !F && (Q = !0, F = await oe(r, n), F == null || F.addEventListener(t(555), async () => {
|
|
211
|
+
console.info(t(532)), F = await oe(r, n);
|
|
212
|
+
}), Q = !1), e && e(F), F) : (console[t(559)](t(542)), !1) : (console[t(559)]("必须传入数据库配置信息"), !1);
|
|
213
|
+
}, w[N(523)] = async (a, e) => {
|
|
214
|
+
const t = N, { mapDB: r, tableName: n, primaryKey: o } = a, i = {};
|
|
215
|
+
i[t(508)] = r, i[t(557)] = o;
|
|
216
|
+
const s = await w.getDB(i);
|
|
217
|
+
if (!s)
|
|
218
|
+
return;
|
|
219
|
+
const c = s.transaction([n]), f = c[t(496)](n), p = f[t(522)](o);
|
|
220
|
+
return new Promise((u, l) => {
|
|
221
|
+
const y = t;
|
|
222
|
+
p.onsuccess = function(b) {
|
|
223
|
+
const d = q;
|
|
224
|
+
e && e(n + d(538) + p[d(520)]), u(p[d(520)]);
|
|
225
|
+
}, p[y(529)] = function(b) {
|
|
226
|
+
console.error(n + y(545) + b), l();
|
|
227
|
+
};
|
|
228
|
+
});
|
|
229
|
+
}, w.updateStore = async (a, e) => {
|
|
230
|
+
var t;
|
|
231
|
+
const r = N, { mapDB: n, tableName: o, updateData: i } = a;
|
|
232
|
+
!i[n == null ? void 0 : n[r(557)]] && console[r(559)](r(507) + n[r(557)]);
|
|
233
|
+
const s = {};
|
|
234
|
+
s.mapDB = n, s[r(557)] = i[n == null ? void 0 : n[r(557)]];
|
|
235
|
+
const c = await w[r(549)](s);
|
|
236
|
+
if (!c)
|
|
237
|
+
return;
|
|
238
|
+
let f = null;
|
|
239
|
+
try {
|
|
240
|
+
f = c[r(552)]([o], r(547)).objectStore(o);
|
|
241
|
+
} catch (y) {
|
|
242
|
+
console[r(513)](r(499), y);
|
|
243
|
+
}
|
|
244
|
+
let p = null, u = null;
|
|
245
|
+
const l = await new Promise((y, b) => {
|
|
246
|
+
const d = r, m = f[d(501)](i[n == null ? void 0 : n[d(557)]]);
|
|
247
|
+
m[d(535)] = (h) => {
|
|
248
|
+
y(h);
|
|
249
|
+
}, m.onerror = (h) => {
|
|
250
|
+
b(h);
|
|
251
|
+
};
|
|
252
|
+
});
|
|
253
|
+
u = (t = l == null ? void 0 : l[r(533)]) == null ? void 0 : t[r(520)];
|
|
254
|
+
try {
|
|
255
|
+
u && (u == null ? void 0 : u.primaryKey) === i[n == null ? void 0 : n.primaryKey] ? p = u[r(517)](i) : p = f[r(530)](i);
|
|
256
|
+
} catch (y) {
|
|
257
|
+
console[r(513)](r(539), y, i);
|
|
258
|
+
}
|
|
259
|
+
new Promise((y, b) => {
|
|
260
|
+
const d = r;
|
|
261
|
+
!p && (console[d(513)](o + d(531)), b()), p[d(535)] = function(m) {
|
|
262
|
+
e && e(o + d(537)), y();
|
|
263
|
+
}, p[d(529)] = function(m) {
|
|
264
|
+
const h = d;
|
|
265
|
+
console[h(513)](o + h(497), m), b();
|
|
266
|
+
};
|
|
267
|
+
}), u && u[r(516)]();
|
|
268
|
+
}, w[N(518)] = async (a, e) => {
|
|
269
|
+
const t = N, { mapDB: r, tableName: n, primaryKey: o } = a, i = {};
|
|
270
|
+
i[t(508)] = r, i[t(557)] = o;
|
|
271
|
+
const s = await w.getDB(i);
|
|
272
|
+
if (!s)
|
|
273
|
+
return;
|
|
274
|
+
const c = s[t(552)]([n], t(547))[t(496)](n)[t(560)](o);
|
|
275
|
+
return new Promise((f, p) => {
|
|
276
|
+
const u = t;
|
|
277
|
+
c[u(535)] = function(l) {
|
|
278
|
+
e && e(n + "数据删除成功"), f();
|
|
279
|
+
}, c.onerror = function(l) {
|
|
280
|
+
const y = u;
|
|
281
|
+
console[y(513)](n + y(524) + l), p();
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
}, w[N(505)] = async (a, e) => {
|
|
285
|
+
const { mapDB: t } = a, r = window.indexedDB.deleteDatabase(t.DBName);
|
|
286
|
+
return new Promise((n, o) => {
|
|
287
|
+
const i = q;
|
|
288
|
+
r[i(535)] = (s) => {
|
|
289
|
+
e && e(t[i(553)] + "数据库已删除"), n();
|
|
290
|
+
}, r[i(529)] = (s) => {
|
|
291
|
+
const c = i;
|
|
292
|
+
console[c(513)](t[c(553)] + c(514) + s), o();
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
function K(a, e) {
|
|
297
|
+
const t = Z();
|
|
298
|
+
return K = function(r, n) {
|
|
299
|
+
return r = r - 125, t[r];
|
|
300
|
+
}, K(a, e);
|
|
301
|
+
}
|
|
302
|
+
function Z() {
|
|
303
|
+
const a = ["updateData", "error", "getDataByKey", "531aQoQZo", "primaryKey", "handleData", "2kSsgxs", "777jFjQPc", "1271805RJVSFy", "546pnZEJw", "3522904vvFeGW", "4wGSwDA", "tableName", "780ChApSf", "deleteStore", "655364nEjUrb", "3705144rIEFqv", "updateStore", "getData", "clearData", "mapDB", "3003845nIJAzp"];
|
|
304
|
+
return Z = function() {
|
|
305
|
+
return a;
|
|
306
|
+
}, Z();
|
|
307
|
+
}
|
|
308
|
+
const G = K;
|
|
309
|
+
(function(a, e) {
|
|
310
|
+
const t = K, r = a();
|
|
311
|
+
for (; ; )
|
|
312
|
+
try {
|
|
313
|
+
if (-parseInt(t(140)) / 1 * (-parseInt(t(127)) / 2) + parseInt(t(142)) / 3 * (parseInt(t(145)) / 4) + -parseInt(t(133)) / 5 + -parseInt(t(143)) / 6 * (parseInt(t(141)) / 7) + -parseInt(t(128)) / 8 + parseInt(t(137)) / 9 * (parseInt(t(125)) / 10) + parseInt(t(144)) / 11 === e)
|
|
314
|
+
break;
|
|
315
|
+
r.push(r.shift());
|
|
316
|
+
} catch {
|
|
317
|
+
r.push(r.shift());
|
|
318
|
+
}
|
|
319
|
+
})(Z, 330152);
|
|
320
|
+
async function Be(a, e) {
|
|
321
|
+
const t = K, { tableName: r, propertiesKey: n, parameter: o, primaryKey: i, mapDB: s } = a;
|
|
322
|
+
let c = null, f = { [s[t(138)]]: i };
|
|
323
|
+
const p = {};
|
|
324
|
+
p[t(132)] = s, p.tableName = r, p[t(138)] = i;
|
|
325
|
+
const u = await w[t(136)](p);
|
|
326
|
+
u && (f = { ...u, [s.primaryKey]: i }), f[n] = o;
|
|
327
|
+
const l = {};
|
|
328
|
+
return l[t(132)] = s, l.tableName = r, l[t(134)] = f, await w[t(129)](l), o && (c = o), e && e(c), c;
|
|
329
|
+
}
|
|
330
|
+
async function ke(a, e) {
|
|
331
|
+
const t = K, { tableName: r, propertiesKey: n, primaryKey: o, mapDB: i } = a;
|
|
332
|
+
let s = null;
|
|
333
|
+
const c = {};
|
|
334
|
+
c[t(132)] = i, c[t(146)] = r, c.primaryKey = o;
|
|
335
|
+
const f = await w[t(136)](c);
|
|
336
|
+
return f && (s = f[n]), e && e(s), s;
|
|
337
|
+
}
|
|
338
|
+
async function xe(a, e) {
|
|
339
|
+
const t = K, { tableName: r, propertiesKey: n, parameter: o, primaryKey: i, mapDB: s } = a;
|
|
340
|
+
let c = {};
|
|
341
|
+
const f = {};
|
|
342
|
+
f.mapDB = s, f[t(146)] = r, f[t(138)] = i;
|
|
343
|
+
const p = await w[t(136)](f);
|
|
344
|
+
try {
|
|
345
|
+
if (p) {
|
|
346
|
+
c = { ...p[n], ...o };
|
|
347
|
+
const u = { [s[t(138)]]: i }, l = u;
|
|
348
|
+
l[n] = c;
|
|
349
|
+
const y = {};
|
|
350
|
+
y[t(132)] = s, y[t(146)] = r, y[t(134)] = l, await w.updateStore(y);
|
|
351
|
+
} else
|
|
352
|
+
console.warn(r + "为空,请先调用handleData");
|
|
353
|
+
} catch (u) {
|
|
354
|
+
console[t(135)](u);
|
|
355
|
+
}
|
|
356
|
+
return e && e(c), c;
|
|
357
|
+
}
|
|
358
|
+
async function Ie(a, e) {
|
|
359
|
+
const t = K, { tableName: r, primaryKey: n, mapDB: o } = a;
|
|
360
|
+
let i = null;
|
|
361
|
+
try {
|
|
362
|
+
const s = {};
|
|
363
|
+
s.mapDB = o, s[t(146)] = r, s[t(138)] = n, await w[t(126)](s);
|
|
364
|
+
} catch (s) {
|
|
365
|
+
console.error(s);
|
|
366
|
+
}
|
|
367
|
+
return e && e(i), i;
|
|
368
|
+
}
|
|
369
|
+
const z = {};
|
|
370
|
+
z[G(139)] = Be, z[G(130)] = ke, z[G(134)] = xe, z[G(131)] = Ie;
|
|
371
|
+
var k = U;
|
|
372
|
+
(function(a, e) {
|
|
373
|
+
for (var t = U, r = a(); ; )
|
|
374
|
+
try {
|
|
375
|
+
var n = -parseInt(t(385)) / 1 + parseInt(t(387)) / 2 + -parseInt(t(389)) / 3 + -parseInt(t(398)) / 4 * (parseInt(t(394)) / 5) + -parseInt(t(402)) / 6 + -parseInt(t(399)) / 7 + -parseInt(t(386)) / 8 * (-parseInt(t(400)) / 9);
|
|
376
|
+
if (n === e)
|
|
377
|
+
break;
|
|
378
|
+
r.push(r.shift());
|
|
379
|
+
} catch {
|
|
380
|
+
r.push(r.shift());
|
|
381
|
+
}
|
|
382
|
+
})(M, 363872);
|
|
383
|
+
var ce = {};
|
|
384
|
+
ce[k(397)] = !1;
|
|
385
|
+
var te = {};
|
|
386
|
+
te[k(384)] = ce, te[k(392)] = {};
|
|
387
|
+
var le = {};
|
|
388
|
+
function M() {
|
|
389
|
+
var a = ["default", "mapDB-indexeddb-form-schema", "663915ecCGKl", "primaryKey", "stores", "unique", "12QKZOdu", "2103521TxMjSC", "1212714qgZAmF", "formParams", "3534618LLAImJ", "DBName", "properties", "createIndex", "464644FTRsMp", "128qSoFyx", "33606razpoB", "DBVersion", "168804drPGaG", "queryParams", "DBStoreName"];
|
|
390
|
+
return M = function() {
|
|
391
|
+
return a;
|
|
392
|
+
}, M();
|
|
393
|
+
}
|
|
394
|
+
le[k(390)] = te;
|
|
395
|
+
function U(a, e) {
|
|
396
|
+
var t = M();
|
|
397
|
+
return U = function(r, n) {
|
|
398
|
+
r = r - 382;
|
|
399
|
+
var o = t[r];
|
|
400
|
+
return o;
|
|
401
|
+
}, U(a, e);
|
|
402
|
+
}
|
|
403
|
+
var re = {};
|
|
404
|
+
re[k(391)] = k(401), re[k(383)] = le;
|
|
405
|
+
var A = {};
|
|
406
|
+
A[k(395)] = "userId", A[k(382)] = k(393), A[k(388)] = 1, A[k(396)] = [re];
|
|
407
|
+
const Pe = {
|
|
408
|
+
formSchema: A
|
|
409
|
+
}, Ne = z, { handleData: Te, getData: Ke } = Ne, { formSchema: ue } = Pe, $e = async (a, e) => {
|
|
410
|
+
var t;
|
|
411
|
+
return e.parametersType === "url" && (a = {
|
|
412
|
+
...se.queryToData((t = e.$route) == null ? void 0 : t.query),
|
|
413
|
+
...a
|
|
414
|
+
}), e.parametersType === "indexDB" && (a = {
|
|
415
|
+
...await Ke({
|
|
416
|
+
tableName: "formParams",
|
|
417
|
+
propertiesKey: e.$route.path || "defQueryParams",
|
|
418
|
+
primaryKey: e.DBPrimaryKey || "default",
|
|
419
|
+
mapDB: ue
|
|
420
|
+
}),
|
|
421
|
+
...a
|
|
422
|
+
}), a;
|
|
423
|
+
}, Fe = async (a, e) => {
|
|
424
|
+
e.parametersType === "url" && await e.$router.push({
|
|
425
|
+
query: se.paramsToQuery({ ...a })
|
|
426
|
+
}), e.parametersType === "indexDB" && await Te({
|
|
427
|
+
tableName: "formParams",
|
|
428
|
+
propertiesKey: e.$route.path || "defQueryParams",
|
|
429
|
+
parameter: { ...a },
|
|
430
|
+
primaryKey: e.DBPrimaryKey || "default",
|
|
431
|
+
mapDB: ue
|
|
432
|
+
});
|
|
433
|
+
}, Ce = {
|
|
434
|
+
makeParamsByType: $e,
|
|
435
|
+
saveParamsByType: Fe
|
|
436
|
+
}, pe = se, R = Ce, T = O;
|
|
437
|
+
(function(a, e) {
|
|
438
|
+
const t = O, r = a();
|
|
439
|
+
for (; ; )
|
|
440
|
+
try {
|
|
441
|
+
if (parseInt(t(561)) / 1 + -parseInt(t(558)) / 2 + parseInt(t(521)) / 3 * (parseInt(t(527)) / 4) + -parseInt(t(506)) / 5 * (parseInt(t(510)) / 6) + -parseInt(t(550)) / 7 * (parseInt(t(503)) / 8) + parseInt(t(540)) / 9 + -parseInt(t(546)) / 10 * (-parseInt(t(562)) / 11) === e)
|
|
442
|
+
break;
|
|
443
|
+
r.push(r.shift());
|
|
444
|
+
} catch {
|
|
445
|
+
r.push(r.shift());
|
|
446
|
+
}
|
|
447
|
+
})(H, 819524);
|
|
448
|
+
const S = {};
|
|
449
|
+
let C = null;
|
|
450
|
+
const ie = async (a, e) => {
|
|
451
|
+
const t = O;
|
|
452
|
+
!window[t(543)] && window[t(498)]("您的浏览器不支持IndexedDB的稳定版本。离线数据功能将不可用。Your browser doesn't support a stable version of IndexedDB. offline data feature will not be available.");
|
|
453
|
+
const { DBName: r = "", DBVersion: n = 1 } = a;
|
|
454
|
+
let o, i = !1;
|
|
455
|
+
try {
|
|
456
|
+
const s = window[t(543)][t(519)](r, n);
|
|
457
|
+
await new Promise((c, f) => {
|
|
458
|
+
const p = t;
|
|
459
|
+
s[p(551)] = async function(u) {
|
|
460
|
+
const l = p, y = u.target.result, { stores: b = [] } = a;
|
|
461
|
+
await Promise.all(b[l(509)](async (d) => {
|
|
462
|
+
const m = l, { DBStoreName: h = "", properties: _ = {} } = d;
|
|
463
|
+
try {
|
|
464
|
+
const g = {};
|
|
465
|
+
g[m(536)] = a[m(557)];
|
|
466
|
+
const I = u[m(541)][m(520)][m(554)](h, g);
|
|
467
|
+
if (Object[m(548)](_)[m(500)] === 0) {
|
|
468
|
+
console[m(559)](h + "没有设置默认值");
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
for (const v in _)
|
|
472
|
+
if (_[m(556)][m(515)](_, v)) {
|
|
473
|
+
const D = _[v], B = { ...D.createIndex };
|
|
474
|
+
I[m(504)](v, v, B);
|
|
475
|
+
}
|
|
476
|
+
} catch (g) {
|
|
477
|
+
console[m(559)](g);
|
|
478
|
+
}
|
|
479
|
+
})), o = y, i = !0;
|
|
480
|
+
}, s[p(535)] = async function(u) {
|
|
481
|
+
const l = p;
|
|
482
|
+
if (o = this[l(520)], i) {
|
|
483
|
+
const { stores: y = [] } = a;
|
|
484
|
+
await Promise[l(528)](y[l(509)](async (b) => {
|
|
485
|
+
const d = l, { DBStoreName: m = "" } = b, h = o[d(552)]([m], d(547)), _ = h[d(496)](m), g = {};
|
|
486
|
+
g[a[d(557)]] = e, _[d(502)](g);
|
|
487
|
+
try {
|
|
488
|
+
await new Promise((I, v) => {
|
|
489
|
+
const D = d;
|
|
490
|
+
h[D(525)] = function(B) {
|
|
491
|
+
const P = D;
|
|
492
|
+
console[P(513)](P(512), B), v();
|
|
493
|
+
}, h[D(544)] = function(B) {
|
|
494
|
+
I();
|
|
495
|
+
}, h[D(529)] = function(B) {
|
|
496
|
+
const P = D;
|
|
497
|
+
console[P(513)](P(534), B), v();
|
|
498
|
+
};
|
|
499
|
+
});
|
|
500
|
+
} catch (I) {
|
|
501
|
+
console.warn(d(511), I);
|
|
502
|
+
}
|
|
503
|
+
}));
|
|
504
|
+
}
|
|
505
|
+
c();
|
|
506
|
+
}, s.onerror = function(u) {
|
|
507
|
+
f(u);
|
|
508
|
+
};
|
|
509
|
+
});
|
|
510
|
+
} catch (s) {
|
|
511
|
+
console[t(513)](s, t(526));
|
|
512
|
+
}
|
|
513
|
+
return o;
|
|
514
|
+
};
|
|
515
|
+
function H() {
|
|
516
|
+
const a = ["transaction", "DBName", "createObjectStore", "close", "hasOwnProperty", "primaryKey", "208156ZfrAJr", "warn", "delete", "1575928bFmnZg", "154LBDnQZ", "objectStore", "数据更新失败", "alert", "store不存在,请更新schema和DBVersion并重启前端服务", "length", "openCursor", "add", "15752fkogxb", "createIndex", "deleteDB", "299045NkkBTh", "请传入主键", "mapDB", "map", "102uEoUGM", "目前所有数据都在用户ID的主键下面,所以没有主键的话做重新载入页面处理", "主键插入中止", "error", "数据库删除失败", "call", "continue", "update", "deleteStore", "open", "result", "66891DVCnfv", "get", "getDataByKey", "数据删除失败", "onabort", "打开数据库报错,可能是数据库版本不对,或者储存容量不足等原因", "52JGzdMb", "all", "onerror", "put", "数据更新失败没有request", "Database connection closed, reconnecting...", "target", "主键插入失败", "onsuccess", "keyPath", "数据更新成功", "主键查询结果:", "传入结构化克隆算法不支持的数据类型可能导致报错", "4779333CtWPbr", "currentTarget", "获取Database缺乏用户信息,请先传入对primaryKey的赋值", "indexedDB", "oncomplete", "事务失败", "634540WpNScH", "readwrite", "keys", "getDB", "4781SEkDBZ", "onupgradeneeded"];
|
|
517
|
+
return H = function() {
|
|
518
|
+
return a;
|
|
519
|
+
}, H();
|
|
520
|
+
}
|
|
521
|
+
function O(a, e) {
|
|
522
|
+
const t = H();
|
|
523
|
+
return O = function(r, n) {
|
|
524
|
+
return r = r - 496, t[r];
|
|
525
|
+
}, O(a, e);
|
|
526
|
+
}
|
|
527
|
+
let V = !1;
|
|
528
|
+
S[T(549)] = async (a, e) => {
|
|
529
|
+
const t = T, { mapDB: r, primaryKey: n } = a;
|
|
530
|
+
return r ? n ? (V && await new Promise(async (o, i) => {
|
|
531
|
+
const s = () => {
|
|
532
|
+
V ? setTimeout(() => {
|
|
533
|
+
s();
|
|
534
|
+
}, 200) : o();
|
|
535
|
+
};
|
|
536
|
+
s();
|
|
537
|
+
}), !C && (V = !0, C = await ie(r, n), C == null || C.addEventListener(t(555), async () => {
|
|
538
|
+
console.info(t(532)), C = await ie(r, n);
|
|
539
|
+
}), V = !1), e && e(C), C) : (console[t(559)](t(542)), !1) : (console[t(559)]("必须传入数据库配置信息"), !1);
|
|
540
|
+
}, S[T(523)] = async (a, e) => {
|
|
541
|
+
const t = T, { mapDB: r, tableName: n, primaryKey: o } = a, i = {};
|
|
542
|
+
i[t(508)] = r, i[t(557)] = o;
|
|
543
|
+
const s = await S.getDB(i);
|
|
544
|
+
if (!s)
|
|
545
|
+
return;
|
|
546
|
+
const c = s.transaction([n]), f = c[t(496)](n), p = f[t(522)](o);
|
|
547
|
+
return new Promise((u, l) => {
|
|
548
|
+
const y = t;
|
|
549
|
+
p.onsuccess = function(b) {
|
|
550
|
+
const d = O;
|
|
551
|
+
e && e(n + d(538) + p[d(520)]), u(p[d(520)]);
|
|
552
|
+
}, p[y(529)] = function(b) {
|
|
553
|
+
console.error(n + y(545) + b), l();
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
}, S.updateStore = async (a, e) => {
|
|
557
|
+
var t;
|
|
558
|
+
const r = T, { mapDB: n, tableName: o, updateData: i } = a;
|
|
559
|
+
!i[n == null ? void 0 : n[r(557)]] && console[r(559)](r(507) + n[r(557)]);
|
|
560
|
+
const s = {};
|
|
561
|
+
s.mapDB = n, s[r(557)] = i[n == null ? void 0 : n[r(557)]];
|
|
562
|
+
const c = await S[r(549)](s);
|
|
563
|
+
if (!c)
|
|
564
|
+
return;
|
|
565
|
+
let f = null;
|
|
566
|
+
try {
|
|
567
|
+
f = c[r(552)]([o], r(547)).objectStore(o);
|
|
568
|
+
} catch (y) {
|
|
569
|
+
console[r(513)](r(499), y);
|
|
570
|
+
}
|
|
571
|
+
let p = null, u = null;
|
|
572
|
+
const l = await new Promise((y, b) => {
|
|
573
|
+
const d = r, m = f[d(501)](i[n == null ? void 0 : n[d(557)]]);
|
|
574
|
+
m[d(535)] = (h) => {
|
|
575
|
+
y(h);
|
|
576
|
+
}, m.onerror = (h) => {
|
|
577
|
+
b(h);
|
|
578
|
+
};
|
|
579
|
+
});
|
|
580
|
+
u = (t = l == null ? void 0 : l[r(533)]) == null ? void 0 : t[r(520)];
|
|
581
|
+
try {
|
|
582
|
+
u && (u == null ? void 0 : u.primaryKey) === i[n == null ? void 0 : n.primaryKey] ? p = u[r(517)](i) : p = f[r(530)](i);
|
|
583
|
+
} catch (y) {
|
|
584
|
+
console[r(513)](r(539), y, i);
|
|
585
|
+
}
|
|
586
|
+
new Promise((y, b) => {
|
|
587
|
+
const d = r;
|
|
588
|
+
!p && (console[d(513)](o + d(531)), b()), p[d(535)] = function(m) {
|
|
589
|
+
e && e(o + d(537)), y();
|
|
590
|
+
}, p[d(529)] = function(m) {
|
|
591
|
+
const h = d;
|
|
592
|
+
console[h(513)](o + h(497), m), b();
|
|
593
|
+
};
|
|
594
|
+
}), u && u[r(516)]();
|
|
595
|
+
}, S[T(518)] = async (a, e) => {
|
|
596
|
+
const t = T, { mapDB: r, tableName: n, primaryKey: o } = a, i = {};
|
|
597
|
+
i[t(508)] = r, i[t(557)] = o;
|
|
598
|
+
const s = await S.getDB(i);
|
|
599
|
+
if (!s)
|
|
600
|
+
return;
|
|
601
|
+
const c = s[t(552)]([n], t(547))[t(496)](n)[t(560)](o);
|
|
602
|
+
return new Promise((f, p) => {
|
|
603
|
+
const u = t;
|
|
604
|
+
c[u(535)] = function(l) {
|
|
605
|
+
e && e(n + "数据删除成功"), f();
|
|
606
|
+
}, c.onerror = function(l) {
|
|
607
|
+
const y = u;
|
|
608
|
+
console[y(513)](n + y(524) + l), p();
|
|
609
|
+
};
|
|
610
|
+
});
|
|
611
|
+
}, S[T(505)] = async (a, e) => {
|
|
612
|
+
const { mapDB: t } = a, r = window.indexedDB.deleteDatabase(t.DBName);
|
|
613
|
+
return new Promise((n, o) => {
|
|
614
|
+
const i = O;
|
|
615
|
+
r[i(535)] = (s) => {
|
|
616
|
+
e && e(t[i(553)] + "数据库已删除"), n();
|
|
617
|
+
}, r[i(529)] = (s) => {
|
|
618
|
+
const c = i;
|
|
619
|
+
console[c(513)](t[c(553)] + c(514) + s), o();
|
|
620
|
+
};
|
|
621
|
+
});
|
|
622
|
+
};
|
|
623
|
+
function $(a, e) {
|
|
624
|
+
const t = X();
|
|
625
|
+
return $ = function(r, n) {
|
|
626
|
+
return r = r - 125, t[r];
|
|
627
|
+
}, $(a, e);
|
|
628
|
+
}
|
|
629
|
+
function X() {
|
|
630
|
+
const a = ["updateData", "error", "getDataByKey", "531aQoQZo", "primaryKey", "handleData", "2kSsgxs", "777jFjQPc", "1271805RJVSFy", "546pnZEJw", "3522904vvFeGW", "4wGSwDA", "tableName", "780ChApSf", "deleteStore", "655364nEjUrb", "3705144rIEFqv", "updateStore", "getData", "clearData", "mapDB", "3003845nIJAzp"];
|
|
631
|
+
return X = function() {
|
|
632
|
+
return a;
|
|
633
|
+
}, X();
|
|
634
|
+
}
|
|
635
|
+
const J = $;
|
|
636
|
+
(function(a, e) {
|
|
637
|
+
const t = $, r = a();
|
|
638
|
+
for (; ; )
|
|
639
|
+
try {
|
|
640
|
+
if (-parseInt(t(140)) / 1 * (-parseInt(t(127)) / 2) + parseInt(t(142)) / 3 * (parseInt(t(145)) / 4) + -parseInt(t(133)) / 5 + -parseInt(t(143)) / 6 * (parseInt(t(141)) / 7) + -parseInt(t(128)) / 8 + parseInt(t(137)) / 9 * (parseInt(t(125)) / 10) + parseInt(t(144)) / 11 === e)
|
|
641
|
+
break;
|
|
642
|
+
r.push(r.shift());
|
|
643
|
+
} catch {
|
|
644
|
+
r.push(r.shift());
|
|
645
|
+
}
|
|
646
|
+
})(X, 330152);
|
|
647
|
+
async function qe(a, e) {
|
|
648
|
+
const t = $, { tableName: r, propertiesKey: n, parameter: o, primaryKey: i, mapDB: s } = a;
|
|
649
|
+
let c = null, f = { [s[t(138)]]: i };
|
|
650
|
+
const p = {};
|
|
651
|
+
p[t(132)] = s, p.tableName = r, p[t(138)] = i;
|
|
652
|
+
const u = await S[t(136)](p);
|
|
653
|
+
u && (f = { ...u, [s.primaryKey]: i }), f[n] = o;
|
|
654
|
+
const l = {};
|
|
655
|
+
return l[t(132)] = s, l.tableName = r, l[t(134)] = f, await S[t(129)](l), o && (c = o), e && e(c), c;
|
|
656
|
+
}
|
|
657
|
+
async function Oe(a, e) {
|
|
658
|
+
const t = $, { tableName: r, propertiesKey: n, primaryKey: o, mapDB: i } = a;
|
|
659
|
+
let s = null;
|
|
660
|
+
const c = {};
|
|
661
|
+
c[t(132)] = i, c[t(146)] = r, c.primaryKey = o;
|
|
662
|
+
const f = await S[t(136)](c);
|
|
663
|
+
return f && (s = f[n]), e && e(s), s;
|
|
664
|
+
}
|
|
665
|
+
async function Ee(a, e) {
|
|
666
|
+
const t = $, { tableName: r, propertiesKey: n, parameter: o, primaryKey: i, mapDB: s } = a;
|
|
667
|
+
let c = {};
|
|
668
|
+
const f = {};
|
|
669
|
+
f.mapDB = s, f[t(146)] = r, f[t(138)] = i;
|
|
670
|
+
const p = await S[t(136)](f);
|
|
671
|
+
try {
|
|
672
|
+
if (p) {
|
|
673
|
+
c = { ...p[n], ...o };
|
|
674
|
+
const u = { [s[t(138)]]: i }, l = u;
|
|
675
|
+
l[n] = c;
|
|
676
|
+
const y = {};
|
|
677
|
+
y[t(132)] = s, y[t(146)] = r, y[t(134)] = l, await S.updateStore(y);
|
|
678
|
+
} else
|
|
679
|
+
console.warn(r + "为空,请先调用handleData");
|
|
680
|
+
} catch (u) {
|
|
681
|
+
console[t(135)](u);
|
|
682
|
+
}
|
|
683
|
+
return e && e(c), c;
|
|
684
|
+
}
|
|
685
|
+
async function ze(a, e) {
|
|
686
|
+
const t = $, { tableName: r, primaryKey: n, mapDB: o } = a;
|
|
687
|
+
let i = null;
|
|
688
|
+
try {
|
|
689
|
+
const s = {};
|
|
690
|
+
s.mapDB = o, s[t(146)] = r, s[t(138)] = n, await S[t(126)](s);
|
|
691
|
+
} catch (s) {
|
|
692
|
+
console.error(s);
|
|
693
|
+
}
|
|
694
|
+
return e && e(i), i;
|
|
695
|
+
}
|
|
696
|
+
const L = {};
|
|
697
|
+
L[J(139)] = qe, L[J(130)] = Oe, L[J(134)] = Ee, L[J(131)] = ze;
|
|
698
|
+
var x = ee;
|
|
699
|
+
(function(a, e) {
|
|
700
|
+
for (var t = ee, r = a(); ; )
|
|
701
|
+
try {
|
|
702
|
+
var n = -parseInt(t(385)) / 1 + parseInt(t(387)) / 2 + -parseInt(t(389)) / 3 + -parseInt(t(398)) / 4 * (parseInt(t(394)) / 5) + -parseInt(t(402)) / 6 + -parseInt(t(399)) / 7 + -parseInt(t(386)) / 8 * (-parseInt(t(400)) / 9);
|
|
703
|
+
if (n === e)
|
|
704
|
+
break;
|
|
705
|
+
r.push(r.shift());
|
|
706
|
+
} catch {
|
|
707
|
+
r.push(r.shift());
|
|
708
|
+
}
|
|
709
|
+
})(Y, 363872);
|
|
710
|
+
var fe = {};
|
|
711
|
+
fe[x(397)] = !1;
|
|
712
|
+
var ae = {};
|
|
713
|
+
ae[x(384)] = fe, ae[x(392)] = {};
|
|
714
|
+
var de = {};
|
|
715
|
+
function Y() {
|
|
716
|
+
var a = ["default", "mapDB-indexeddb-form-schema", "663915ecCGKl", "primaryKey", "stores", "unique", "12QKZOdu", "2103521TxMjSC", "1212714qgZAmF", "formParams", "3534618LLAImJ", "DBName", "properties", "createIndex", "464644FTRsMp", "128qSoFyx", "33606razpoB", "DBVersion", "168804drPGaG", "queryParams", "DBStoreName"];
|
|
717
|
+
return Y = function() {
|
|
718
|
+
return a;
|
|
719
|
+
}, Y();
|
|
720
|
+
}
|
|
721
|
+
de[x(390)] = ae;
|
|
722
|
+
function ee(a, e) {
|
|
723
|
+
var t = Y();
|
|
724
|
+
return ee = function(r, n) {
|
|
725
|
+
r = r - 382;
|
|
726
|
+
var o = t[r];
|
|
727
|
+
return o;
|
|
728
|
+
}, ee(a, e);
|
|
729
|
+
}
|
|
730
|
+
var ne = {};
|
|
731
|
+
ne[x(391)] = x(401), ne[x(383)] = de;
|
|
732
|
+
var j = {};
|
|
733
|
+
j[x(395)] = "userId", j[x(382)] = x(393), j[x(388)] = 1, j[x(396)] = [ne];
|
|
734
|
+
const ye = {
|
|
735
|
+
formSchema: j
|
|
736
|
+
}, me = L;
|
|
737
|
+
const { getData: Ae } = me, { formSchema: Le } = ye, je = {
|
|
111
738
|
name: "GeneralBasicForm",
|
|
112
739
|
components: {
|
|
113
|
-
InputArchive: (
|
|
114
|
-
const { templateEle: e } =
|
|
740
|
+
InputArchive: (a) => {
|
|
741
|
+
const { templateEle: e } = a;
|
|
115
742
|
return e();
|
|
116
743
|
},
|
|
117
|
-
VerificationButton:
|
|
744
|
+
VerificationButton: De
|
|
118
745
|
},
|
|
119
746
|
props: {
|
|
120
747
|
showSearch: {
|
|
@@ -159,10 +786,14 @@ const $ = {
|
|
|
159
786
|
type: String,
|
|
160
787
|
default: "90px"
|
|
161
788
|
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
789
|
+
parametersType: {
|
|
790
|
+
type: String,
|
|
791
|
+
default: "url"
|
|
792
|
+
},
|
|
793
|
+
DBPrimaryKey: {
|
|
794
|
+
// indexDB的primaryKey,一般配合parametersType==="indexDB"使用
|
|
795
|
+
type: [String, Number],
|
|
796
|
+
required: !1
|
|
166
797
|
},
|
|
167
798
|
formData: {
|
|
168
799
|
// 外部传入的表单数据,用于回填
|
|
@@ -190,14 +821,16 @@ const $ = {
|
|
|
190
821
|
defPageSize: {
|
|
191
822
|
type: Number,
|
|
192
823
|
default: 10
|
|
824
|
+
},
|
|
825
|
+
queryWhenReady: {
|
|
826
|
+
// 初始化完成后自动触发查找数据函数
|
|
827
|
+
type: Boolean,
|
|
828
|
+
default: () => !1
|
|
193
829
|
}
|
|
194
830
|
},
|
|
195
831
|
data() {
|
|
196
|
-
var t;
|
|
197
832
|
return {
|
|
198
|
-
queryParams:
|
|
199
|
-
...this.noUrlParameters ? {} : c.queryToData((t = this.$route) == null ? void 0 : t.query)
|
|
200
|
-
},
|
|
833
|
+
queryParams: this.initQueryParams(),
|
|
201
834
|
// form表单数据
|
|
202
835
|
formLoading: this.loading || !1,
|
|
203
836
|
selectSetting: {
|
|
@@ -239,198 +872,206 @@ const $ = {
|
|
|
239
872
|
// },
|
|
240
873
|
watch: {
|
|
241
874
|
formData: {
|
|
242
|
-
handler(
|
|
243
|
-
JSON.stringify(
|
|
875
|
+
handler(a, e) {
|
|
876
|
+
JSON.stringify(a) !== JSON.stringify(this.queryParams) && (this.queryParams = {
|
|
244
877
|
...this.queryParams,
|
|
245
|
-
...
|
|
878
|
+
...a
|
|
246
879
|
});
|
|
247
880
|
},
|
|
248
881
|
// watch 默认是懒执行的:仅当数据源变化时,才会执行回调。但在某些场景中,我们希望在创建侦听器时,立即执行一遍回调。举例来说,我们想请求一些初始数据,然后在相关状态更改时重新请求数据。
|
|
249
882
|
// https://cn.vuejs.org/guide/essentials/watchers.html#deep-watchers
|
|
250
|
-
immediate: !0
|
|
251
|
-
|
|
883
|
+
immediate: !0,
|
|
884
|
+
deep: !0
|
|
252
885
|
},
|
|
253
886
|
queryParams: {
|
|
254
|
-
handler(
|
|
255
|
-
this.$emit("update:formData", { ...
|
|
887
|
+
handler(a) {
|
|
888
|
+
this.$emit("update:formData", { ...a });
|
|
256
889
|
},
|
|
257
890
|
deep: !0
|
|
258
891
|
},
|
|
259
892
|
$attrs: {
|
|
260
|
-
handler(
|
|
893
|
+
handler(a) {
|
|
261
894
|
this.attrs = {
|
|
262
895
|
...this.attrs,
|
|
263
|
-
...
|
|
896
|
+
...a
|
|
264
897
|
};
|
|
265
898
|
},
|
|
266
899
|
immediate: !0,
|
|
267
900
|
deep: !0
|
|
268
901
|
},
|
|
269
|
-
loading(
|
|
270
|
-
this.formLoading !==
|
|
902
|
+
loading(a) {
|
|
903
|
+
this.formLoading !== a && (this.formLoading = a);
|
|
271
904
|
},
|
|
272
|
-
formLoading(
|
|
273
|
-
this.loading !==
|
|
905
|
+
formLoading(a) {
|
|
906
|
+
this.loading !== a && this.$emit("update:loading", a);
|
|
274
907
|
}
|
|
275
908
|
},
|
|
276
909
|
methods: {
|
|
277
910
|
/** 搜索按钮操作 */
|
|
278
|
-
handleQuery(
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
);
|
|
292
|
-
this.noUrlParameters || this.$router.push({
|
|
293
|
-
query: { ...a }
|
|
294
|
-
}), this.getList({
|
|
295
|
-
...a
|
|
911
|
+
async handleQuery(a = {}) {
|
|
912
|
+
a.defaultPageFirst ?? (a.defaultPageFirst = !0);
|
|
913
|
+
const e = { [this.currentPageKey]: this.defCurrentPage };
|
|
914
|
+
let t = {
|
|
915
|
+
...e,
|
|
916
|
+
...this.queryParams
|
|
917
|
+
};
|
|
918
|
+
t = await R.makeParamsByType(t, this), a.defaultPageFirst && (t = {
|
|
919
|
+
...t,
|
|
920
|
+
...e
|
|
921
|
+
}), await R.saveParamsByType(t, this), this.getList({
|
|
922
|
+
...t
|
|
296
923
|
});
|
|
297
924
|
},
|
|
298
925
|
/** 重置按钮操作 */
|
|
299
926
|
async resetQuery() {
|
|
300
|
-
var e;
|
|
301
927
|
this.$refs.queryFormRef.resetFields();
|
|
302
|
-
const
|
|
303
|
-
this.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
928
|
+
const a = { [this.currentPageKey]: this.defCurrentPage };
|
|
929
|
+
await R.saveParamsByType(a, this), this.queryParams = { ...a }, this.afterReset(), this.handleQuery();
|
|
930
|
+
},
|
|
931
|
+
initQueryParams() {
|
|
932
|
+
var e;
|
|
933
|
+
let a = {
|
|
934
|
+
[this.pageSizeKey]: this.defPageSize
|
|
935
|
+
};
|
|
936
|
+
return this.parametersType === "url" && (a = { ...a, ...pe.queryToData((e = this.$route) == null ? void 0 : e.query) }), this.parametersType === "indexDB" && Ae(
|
|
937
|
+
{
|
|
938
|
+
tableName: "formParams",
|
|
939
|
+
propertiesKey: this.$route.path || "defQueryParams",
|
|
940
|
+
primaryKey: this.DBPrimaryKey || "default",
|
|
941
|
+
mapDB: Le
|
|
942
|
+
},
|
|
943
|
+
(t) => {
|
|
944
|
+
this.queryParams = { ...a, ...t };
|
|
945
|
+
}
|
|
946
|
+
), this.queryWhenReady && this.$nextTick(() => {
|
|
947
|
+
this.handleQuery({ defaultPageFirst: !1 });
|
|
948
|
+
}), a;
|
|
308
949
|
},
|
|
309
950
|
currentInputComponent() {
|
|
310
951
|
return "input-archive";
|
|
311
952
|
},
|
|
312
|
-
getItemRules(
|
|
313
|
-
const { type: e, rules:
|
|
953
|
+
getItemRules(a) {
|
|
954
|
+
const { type: e, rules: t = [] } = a, r = [...t];
|
|
314
955
|
return this.noInputBlank && e === "input" && r.push({
|
|
315
956
|
pattern: this.trimRegex,
|
|
316
957
|
message: "请输入(不能仅输入空格)",
|
|
317
958
|
trigger: "blur"
|
|
318
959
|
}), r;
|
|
319
960
|
},
|
|
320
|
-
getInputSetting(
|
|
321
|
-
const { inputSetting: e, setting:
|
|
961
|
+
getInputSetting(a) {
|
|
962
|
+
const { inputSetting: e, setting: t } = a;
|
|
322
963
|
return {
|
|
323
964
|
...this.inputSetting,
|
|
324
965
|
...e,
|
|
325
|
-
...
|
|
966
|
+
...t
|
|
326
967
|
};
|
|
327
968
|
},
|
|
328
969
|
defaultFunction() {
|
|
329
970
|
},
|
|
330
|
-
getInputEvents(
|
|
971
|
+
getInputEvents(a) {
|
|
331
972
|
return {
|
|
332
|
-
blur:
|
|
333
|
-
focus:
|
|
334
|
-
change:
|
|
335
|
-
input:
|
|
336
|
-
clear:
|
|
973
|
+
blur: a.blur || this.defaultFunction,
|
|
974
|
+
focus: a.focus || this.defaultFunction,
|
|
975
|
+
change: a.change || this.defaultFunction,
|
|
976
|
+
input: a.input || this.defaultFunction,
|
|
977
|
+
clear: a.clear || this.defaultFunction
|
|
337
978
|
};
|
|
338
979
|
},
|
|
339
|
-
getSelectSetting(
|
|
340
|
-
const { selectSetting: e, setting:
|
|
980
|
+
getSelectSetting(a) {
|
|
981
|
+
const { selectSetting: e, setting: t } = a;
|
|
341
982
|
return {
|
|
342
983
|
...this.selectSetting,
|
|
343
984
|
...e,
|
|
344
|
-
...
|
|
985
|
+
...t
|
|
345
986
|
};
|
|
346
987
|
},
|
|
347
|
-
getSelectEvents(
|
|
988
|
+
getSelectEvents(a) {
|
|
348
989
|
return {
|
|
349
|
-
change:
|
|
350
|
-
"visible-change":
|
|
351
|
-
"remove-tag":
|
|
352
|
-
"expand-change":
|
|
353
|
-
clear:
|
|
354
|
-
blur:
|
|
355
|
-
focus:
|
|
990
|
+
change: a.change || this.defaultFunction,
|
|
991
|
+
"visible-change": a["visible-change"] || this.defaultFunction,
|
|
992
|
+
"remove-tag": a["remove-tag"] || this.defaultFunction,
|
|
993
|
+
"expand-change": a["expand-change"] || this.defaultFunction,
|
|
994
|
+
clear: a.clear || this.defaultFunction,
|
|
995
|
+
blur: a.blur || this.defaultFunction,
|
|
996
|
+
focus: a.focus || this.defaultFunction
|
|
356
997
|
};
|
|
357
998
|
},
|
|
358
|
-
getDatePackerSetting(
|
|
359
|
-
const { datePackerSetting: e, setting:
|
|
999
|
+
getDatePackerSetting(a) {
|
|
1000
|
+
const { datePackerSetting: e, setting: t } = a;
|
|
360
1001
|
return {
|
|
361
1002
|
...this.datePackerSetting,
|
|
362
1003
|
...e,
|
|
363
|
-
...
|
|
1004
|
+
...t
|
|
364
1005
|
};
|
|
365
1006
|
},
|
|
366
|
-
getDatePackerEvents(
|
|
1007
|
+
getDatePackerEvents(a) {
|
|
367
1008
|
return {
|
|
368
|
-
change:
|
|
369
|
-
blur:
|
|
370
|
-
focus:
|
|
1009
|
+
change: a.change || this.defaultFunction,
|
|
1010
|
+
blur: a.blur || this.defaultFunction,
|
|
1011
|
+
focus: a.focus || this.defaultFunction
|
|
371
1012
|
};
|
|
372
1013
|
},
|
|
373
|
-
getCheckboxGroupSetting(
|
|
374
|
-
const { checkboxGroupSetting: e, setting:
|
|
1014
|
+
getCheckboxGroupSetting(a) {
|
|
1015
|
+
const { checkboxGroupSetting: e, setting: t } = a;
|
|
375
1016
|
return {
|
|
376
1017
|
...e,
|
|
377
|
-
...
|
|
1018
|
+
...t
|
|
378
1019
|
};
|
|
379
1020
|
},
|
|
380
|
-
getCheckboxGroupEvents(
|
|
1021
|
+
getCheckboxGroupEvents(a) {
|
|
381
1022
|
return {
|
|
382
|
-
change:
|
|
1023
|
+
change: a.change || this.defaultFunction
|
|
383
1024
|
};
|
|
384
1025
|
}
|
|
385
1026
|
}
|
|
386
1027
|
};
|
|
387
|
-
var
|
|
388
|
-
var e = this,
|
|
389
|
-
return
|
|
390
|
-
return
|
|
391
|
-
return !
|
|
392
|
-
} }, scopedSlots: e._u([e._l(r.template, function(
|
|
393
|
-
return { key:
|
|
394
|
-
return [
|
|
1028
|
+
var Re = function() {
|
|
1029
|
+
var e = this, t = e._self._c;
|
|
1030
|
+
return t("el-form", e._b({ directives: [{ name: "show", rawName: "v-show", value: e.showSearch, expression: "showSearch" }], ref: "queryFormRef", attrs: { model: e.queryParams, "label-width": e.labelWidth } }, "el-form", e.attrs, !1), [e._l(e.formItem, function(r) {
|
|
1031
|
+
return t("el-form-item", e._b({ key: r.prop, attrs: { rules: e.getItemRules(r) } }, "el-form-item", r, !1), [r.type === "input" ? t("el-input", e._g(e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(n) {
|
|
1032
|
+
return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.getList.apply(null, arguments);
|
|
1033
|
+
} }, scopedSlots: e._u([e._l(r.template, function(n, o) {
|
|
1034
|
+
return { key: o, fn: function() {
|
|
1035
|
+
return [n ? t(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: n } }) : e._e()];
|
|
395
1036
|
}, proxy: !0 };
|
|
396
|
-
})], null, !0), model: { value: e.queryParams[r.prop], callback: function(
|
|
397
|
-
e.$set(e.queryParams, r.prop,
|
|
398
|
-
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(r), !1), e.getInputEvents(r))) : r.type === "input-mobile-verification" ?
|
|
399
|
-
return !
|
|
400
|
-
} }, scopedSlots: e._u([e._l(r.template, function(
|
|
401
|
-
return { key:
|
|
402
|
-
return [
|
|
1037
|
+
})], null, !0), model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1038
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1039
|
+
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(r), !1), e.getInputEvents(r))) : r.type === "input-mobile-verification" ? t("el-input", e._g(e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(n) {
|
|
1040
|
+
return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.getList.apply(null, arguments);
|
|
1041
|
+
} }, scopedSlots: e._u([e._l(r.template, function(n, o) {
|
|
1042
|
+
return { key: o, fn: function() {
|
|
1043
|
+
return [n ? t(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: n } }) : e._e()];
|
|
403
1044
|
}, proxy: !0 };
|
|
404
|
-
})], null, !0), model: { value: e.queryParams[r.prop], callback: function(
|
|
405
|
-
e.$set(e.queryParams, r.prop,
|
|
406
|
-
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(r), !1), e.getInputEvents(r)), [
|
|
407
|
-
e.$set(e.queryParams, r.prop,
|
|
408
|
-
}, expression: "queryParams[item.prop]" } }, "el-select", e.getSelectSetting(r), !1), e.getSelectEvents(r)), e._l(r.option || [], function(
|
|
409
|
-
return
|
|
410
|
-
}), 1) : r.type === "cascader" ?
|
|
411
|
-
e.$set(e.queryParams, r.prop,
|
|
412
|
-
}, expression: "queryParams[item.prop]" } }, "el-cascader", e.getSelectSetting(r), !1), e.getSelectEvents(r))) : r.type === "date-picker" ?
|
|
413
|
-
e.$set(e.queryParams, r.prop,
|
|
414
|
-
}, expression: "queryParams[item.prop]" } }, "el-date-picker", e.getDatePackerSetting(r), !1), e.getDatePackerEvents(r))) : e._e(), r.type === "input-number" ?
|
|
415
|
-
e.$set(e.queryParams, r.prop,
|
|
416
|
-
}, expression: "queryParams[item.prop]" } }, "el-input-number", e.getInputSetting(r), !1), e.getInputEvents(r))) : r.type === "checkbox" ?
|
|
417
|
-
e.$set(e.queryParams, r.prop,
|
|
418
|
-
}, expression: "queryParams[item.prop]" } }, "el-checkbox-group", e.getCheckboxGroupSetting(r), !1), e.getCheckboxGroupEvents(r)), e._l(r.option || [], function(
|
|
419
|
-
return
|
|
1045
|
+
})], null, !0), model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1046
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1047
|
+
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(r), !1), e.getInputEvents(r)), [t("template", { slot: "append" }, [t("verification-button", { attrs: { verificationSetting: r.verificationSetting, getSmscode: r.getSmscode } })], 1)], 2) : r.type === "select" ? t("el-select", e._g(e._b({ attrs: { filterable: "", size: e.size }, model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1048
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1049
|
+
}, expression: "queryParams[item.prop]" } }, "el-select", e.getSelectSetting(r), !1), e.getSelectEvents(r)), e._l(r.option || [], function(n) {
|
|
1050
|
+
return t("el-option", { key: n.key || n.value, attrs: { label: n.label, value: n.value } });
|
|
1051
|
+
}), 1) : r.type === "cascader" ? t("el-cascader", e._g(e._b({ attrs: { filterable: "", size: e.size, options: r.options || [] }, model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1052
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1053
|
+
}, expression: "queryParams[item.prop]" } }, "el-cascader", e.getSelectSetting(r), !1), e.getSelectEvents(r))) : r.type === "date-picker" ? t("el-date-picker", e._g(e._b({ attrs: { size: e.size }, model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1054
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1055
|
+
}, expression: "queryParams[item.prop]" } }, "el-date-picker", e.getDatePackerSetting(r), !1), e.getDatePackerEvents(r))) : e._e(), r.type === "input-number" ? t("el-input-number", e._g(e._b({ attrs: { size: e.size }, model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1056
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1057
|
+
}, expression: "queryParams[item.prop]" } }, "el-input-number", e.getInputSetting(r), !1), e.getInputEvents(r))) : r.type === "checkbox" ? t("el-checkbox-group", e._g(e._b({ attrs: { size: e.size }, model: { value: e.queryParams[r.prop], callback: function(n) {
|
|
1058
|
+
e.$set(e.queryParams, r.prop, n);
|
|
1059
|
+
}, expression: "queryParams[item.prop]" } }, "el-checkbox-group", e.getCheckboxGroupSetting(r), !1), e.getCheckboxGroupEvents(r)), e._l(r.option || [], function(n) {
|
|
1060
|
+
return t("el-checkbox", e._b({ key: n.key || n.value || n.label }, "el-checkbox", n, !1));
|
|
420
1061
|
}), 1) : e._e(), /^form-item-slot$/i.test(r.type) ? e._t(r.name) : e._e()], 2);
|
|
421
|
-
}), e._t("default"), e.formOnly ? e._e() :
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
1062
|
+
}), e._t("default"), e.formOnly ? e._e() : t("el-form-item", [t("el-button", { attrs: { type: "primary", icon: "el-icon-search", size: e.size, loading: e.formLoading }, on: { click: e.handleQuery } }, [e._v("查询")]), t("el-button", { attrs: { icon: "el-icon-refresh", size: e.size }, on: { click: e.resetQuery } }, [e._v("重置")])], 1), e._t("behind-the-button")], 2);
|
|
1063
|
+
}, Qe = [], Ge = /* @__PURE__ */ E(
|
|
1064
|
+
je,
|
|
1065
|
+
Re,
|
|
1066
|
+
Qe,
|
|
426
1067
|
!1,
|
|
427
1068
|
null,
|
|
428
|
-
"
|
|
1069
|
+
"e0143289",
|
|
429
1070
|
null,
|
|
430
1071
|
null
|
|
431
1072
|
);
|
|
432
|
-
const
|
|
433
|
-
const
|
|
1073
|
+
const Ve = Ge.exports;
|
|
1074
|
+
const Je = {
|
|
434
1075
|
components: {},
|
|
435
1076
|
props: {
|
|
436
1077
|
query: {
|
|
@@ -461,18 +1102,18 @@ const w = {
|
|
|
461
1102
|
}
|
|
462
1103
|
},
|
|
463
1104
|
data() {
|
|
464
|
-
var
|
|
1105
|
+
var a, e;
|
|
465
1106
|
return {
|
|
466
|
-
keyWord: ((e = (
|
|
1107
|
+
keyWord: ((e = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : e.keyWord) || "",
|
|
467
1108
|
attrs: {}
|
|
468
1109
|
};
|
|
469
1110
|
},
|
|
470
1111
|
watch: {
|
|
471
1112
|
$attrs: {
|
|
472
|
-
handler(
|
|
1113
|
+
handler(a) {
|
|
473
1114
|
this.attrs = {
|
|
474
1115
|
...this.attrs,
|
|
475
|
-
...
|
|
1116
|
+
...a
|
|
476
1117
|
};
|
|
477
1118
|
},
|
|
478
1119
|
immediate: !0,
|
|
@@ -481,33 +1122,33 @@ const w = {
|
|
|
481
1122
|
},
|
|
482
1123
|
methods: {
|
|
483
1124
|
search() {
|
|
484
|
-
const
|
|
1125
|
+
const a = { path: this.routePath, query: { ...this.query, keyWord: this.keyWord } };
|
|
485
1126
|
if (this.openHref) {
|
|
486
|
-
const e = this.$router.resolve(
|
|
1127
|
+
const e = this.$router.resolve(a);
|
|
487
1128
|
window.open(e.href, "_blank");
|
|
488
1129
|
} else
|
|
489
|
-
this.$router.push(
|
|
1130
|
+
this.$router.push(a);
|
|
490
1131
|
}
|
|
491
1132
|
}
|
|
492
1133
|
};
|
|
493
|
-
var
|
|
494
|
-
var e = this,
|
|
495
|
-
return
|
|
1134
|
+
var We = function() {
|
|
1135
|
+
var e = this, t = e._self._c;
|
|
1136
|
+
return t("div", { staticClass: "search-box" }, [t("el-input", e._b({ style: { ...e.inputstyle }, attrs: { size: e.size }, nativeOn: { keydown: function(r) {
|
|
496
1137
|
return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.search.apply(null, arguments);
|
|
497
1138
|
} }, model: { value: e.keyWord, callback: function(r) {
|
|
498
1139
|
e.keyWord = r;
|
|
499
|
-
}, expression: "keyWord" } }, "el-input", e.attrs, !1), [
|
|
500
|
-
},
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
1140
|
+
}, expression: "keyWord" } }, "el-input", e.attrs, !1), [t("svg", { staticClass: "el-input__icon", attrs: { slot: "prefix", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, slot: "prefix" }, [t("path", { attrs: { d: "M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z", fill: "#959A9F" } })])])], 1);
|
|
1141
|
+
}, Ze = [], Me = /* @__PURE__ */ E(
|
|
1142
|
+
Je,
|
|
1143
|
+
We,
|
|
1144
|
+
Ze,
|
|
504
1145
|
!1,
|
|
505
1146
|
null,
|
|
506
1147
|
"ef706e31",
|
|
507
1148
|
null,
|
|
508
1149
|
null
|
|
509
1150
|
);
|
|
510
|
-
const
|
|
1151
|
+
const Ue = Me.exports, He = {
|
|
511
1152
|
functional: !0,
|
|
512
1153
|
props: {
|
|
513
1154
|
column: {
|
|
@@ -520,14 +1161,14 @@ const I = z.exports, B = {
|
|
|
520
1161
|
type: Object
|
|
521
1162
|
}
|
|
522
1163
|
},
|
|
523
|
-
render(
|
|
524
|
-
const { props:
|
|
525
|
-
return r.render(
|
|
1164
|
+
render(a, e) {
|
|
1165
|
+
const { props: t } = e, { column: r, formData: n } = t;
|
|
1166
|
+
return r.render(n);
|
|
526
1167
|
}
|
|
527
|
-
},
|
|
1168
|
+
}, Xe = {
|
|
528
1169
|
name: "Descriptions",
|
|
529
1170
|
components: {
|
|
530
|
-
DescriptionsColumn:
|
|
1171
|
+
DescriptionsColumn: He
|
|
531
1172
|
},
|
|
532
1173
|
data() {
|
|
533
1174
|
return {
|
|
@@ -552,10 +1193,10 @@ const I = z.exports, B = {
|
|
|
552
1193
|
},
|
|
553
1194
|
watch: {
|
|
554
1195
|
$attrs: {
|
|
555
|
-
handler(
|
|
1196
|
+
handler(a) {
|
|
556
1197
|
this.attrs = {
|
|
557
1198
|
...this.attrs,
|
|
558
|
-
...
|
|
1199
|
+
...a
|
|
559
1200
|
};
|
|
560
1201
|
},
|
|
561
1202
|
immediate: !0,
|
|
@@ -563,23 +1204,23 @@ const I = z.exports, B = {
|
|
|
563
1204
|
}
|
|
564
1205
|
}
|
|
565
1206
|
};
|
|
566
|
-
var
|
|
567
|
-
var e = this,
|
|
568
|
-
return
|
|
569
|
-
return
|
|
1207
|
+
var Ye = function() {
|
|
1208
|
+
var e = this, t = e._self._c;
|
|
1209
|
+
return t("el-descriptions", e._b({}, "el-descriptions", e.attrs, !1), e._l(e.formItem, function(r, n) {
|
|
1210
|
+
return t("el-descriptions-item", e._b({ key: r.prop, attrs: { label: r.label } }, "el-descriptions-item", r.descriptionsItemProps, !1), [r.render ? t("DescriptionsColumn", { attrs: { column: r, formData: e.formData } }) : t("span", [e._v(e._s(e.formData[r.prop]))])], 1);
|
|
570
1211
|
}), 1);
|
|
571
|
-
},
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
1212
|
+
}, et = [], tt = /* @__PURE__ */ E(
|
|
1213
|
+
Xe,
|
|
1214
|
+
Ye,
|
|
1215
|
+
et,
|
|
575
1216
|
!1,
|
|
576
1217
|
null,
|
|
577
1218
|
null,
|
|
578
1219
|
null,
|
|
579
1220
|
null
|
|
580
1221
|
);
|
|
581
|
-
const
|
|
582
|
-
const
|
|
1222
|
+
const rt = tt.exports;
|
|
1223
|
+
const at = {
|
|
583
1224
|
props: {
|
|
584
1225
|
nodeKey: {
|
|
585
1226
|
type: String,
|
|
@@ -599,15 +1240,15 @@ const U = {
|
|
|
599
1240
|
}
|
|
600
1241
|
},
|
|
601
1242
|
watch: {
|
|
602
|
-
sourceFilterText(
|
|
603
|
-
this.$refs.sourceTree.filter(
|
|
1243
|
+
sourceFilterText(a) {
|
|
1244
|
+
this.$refs.sourceTree.filter(a);
|
|
604
1245
|
},
|
|
605
|
-
selectedFilterText(
|
|
606
|
-
this.$refs.selectTree.filter(
|
|
1246
|
+
selectedFilterText(a) {
|
|
1247
|
+
this.$refs.selectTree.filter(a);
|
|
607
1248
|
},
|
|
608
|
-
checkedKeys(
|
|
609
|
-
this.$refs.sourceTree.setCheckedKeys(
|
|
610
|
-
this.getSelectedData(), this.$refs.selectTree.setCheckedKeys(
|
|
1249
|
+
checkedKeys(a) {
|
|
1250
|
+
this.$refs.sourceTree.setCheckedKeys(a), he(() => {
|
|
1251
|
+
this.getSelectedData(), this.$refs.selectTree.setCheckedKeys(a);
|
|
611
1252
|
});
|
|
612
1253
|
}
|
|
613
1254
|
},
|
|
@@ -623,42 +1264,42 @@ const U = {
|
|
|
623
1264
|
};
|
|
624
1265
|
},
|
|
625
1266
|
methods: {
|
|
626
|
-
sourceFilterNode(
|
|
627
|
-
return
|
|
1267
|
+
sourceFilterNode(a, e) {
|
|
1268
|
+
return a ? e.label.indexOf(a) !== -1 : !0;
|
|
628
1269
|
},
|
|
629
1270
|
getSelectedData() {
|
|
630
|
-
let
|
|
631
|
-
const
|
|
632
|
-
this.selectedList =
|
|
1271
|
+
let a = !0, e;
|
|
1272
|
+
const t = this.$refs.sourceTree.getCheckedNodes(a, e);
|
|
1273
|
+
this.selectedList = t;
|
|
633
1274
|
},
|
|
634
1275
|
removeSelectedData() {
|
|
635
|
-
let
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
r[
|
|
639
|
-
}), this.selectedList = this.selectedList.filter((
|
|
1276
|
+
let a, e;
|
|
1277
|
+
const t = this.$refs.selectTree.getCheckedNodes(a, e), r = {};
|
|
1278
|
+
t.forEach((n) => {
|
|
1279
|
+
r[n[this.nodeKey]] = n;
|
|
1280
|
+
}), this.selectedList = this.selectedList.filter((n) => !r[n[this.nodeKey]]);
|
|
640
1281
|
}
|
|
641
1282
|
}
|
|
642
1283
|
};
|
|
643
|
-
var
|
|
644
|
-
var e = this,
|
|
645
|
-
return
|
|
1284
|
+
var nt = function() {
|
|
1285
|
+
var e = this, t = e._self._c;
|
|
1286
|
+
return t("div", { staticClass: "tree-box" }, [t("div", { staticClass: "left-box" }, [e.filterable ? t("el-input", { attrs: { placeholder: "输入关键字进行过滤" }, model: { value: e.sourceFilterText, callback: function(r) {
|
|
646
1287
|
e.sourceFilterText = r;
|
|
647
|
-
}, expression: "sourceFilterText" } }) : e._e(),
|
|
1288
|
+
}, expression: "sourceFilterText" } }) : e._e(), t("el-tree", e._b({ ref: "sourceTree", attrs: { data: e.dataSource, "filter-node-method": e.sourceFilterNode, nodeKey: e.nodeKey } }, "el-tree", { ...e.defaultTreeAttributes }, !1))], 1), t("div", { staticClass: "mid-box" }, [t("el-button", { attrs: { icon: "el-icon-arrow-right", circle: "" }, on: { click: e.getSelectedData } }), t("el-button", { attrs: { icon: "el-icon-arrow-left", circle: "" }, on: { click: e.removeSelectedData } })], 1), t("div", { staticClass: "right-box" }, [e.filterable ? t("el-input", { attrs: { placeholder: "输入关键字进行过滤" }, model: { value: e.selectedFilterText, callback: function(r) {
|
|
648
1289
|
e.selectedFilterText = r;
|
|
649
|
-
}, expression: "selectedFilterText" } }) : e._e(),
|
|
650
|
-
},
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
1290
|
+
}, expression: "selectedFilterText" } }) : e._e(), t("el-tree", e._b({ ref: "selectTree", attrs: { data: e.selectedList, "filter-node-method": e.sourceFilterNode, nodeKey: e.nodeKey } }, "el-tree", { ...e.defaultTreeAttributes }, !1))], 1)]);
|
|
1291
|
+
}, st = [], ot = /* @__PURE__ */ E(
|
|
1292
|
+
at,
|
|
1293
|
+
nt,
|
|
1294
|
+
st,
|
|
654
1295
|
!1,
|
|
655
1296
|
null,
|
|
656
1297
|
"49dbad2a",
|
|
657
1298
|
null,
|
|
658
1299
|
null
|
|
659
1300
|
);
|
|
660
|
-
const
|
|
661
|
-
const
|
|
1301
|
+
const it = ot.exports;
|
|
1302
|
+
const { getData: ct } = me, { formSchema: lt } = ye, ut = {
|
|
662
1303
|
name: "VTabs",
|
|
663
1304
|
data() {
|
|
664
1305
|
return {
|
|
@@ -671,10 +1312,14 @@ const Q = {
|
|
|
671
1312
|
type: Array,
|
|
672
1313
|
default: () => []
|
|
673
1314
|
},
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
1315
|
+
parametersType: {
|
|
1316
|
+
type: String,
|
|
1317
|
+
default: "url"
|
|
1318
|
+
},
|
|
1319
|
+
DBPrimaryKey: {
|
|
1320
|
+
// indexDB的primaryKey,一般配合parametersType==="indexDB"使用
|
|
1321
|
+
type: [String, Number],
|
|
1322
|
+
required: !1
|
|
678
1323
|
},
|
|
679
1324
|
activeNameKey: {
|
|
680
1325
|
type: String,
|
|
@@ -692,63 +1337,67 @@ const Q = {
|
|
|
692
1337
|
},
|
|
693
1338
|
watch: {
|
|
694
1339
|
defActiveName: {
|
|
695
|
-
handler(
|
|
696
|
-
JSON.stringify(
|
|
1340
|
+
handler(a, e) {
|
|
1341
|
+
JSON.stringify(a) !== JSON.stringify(this.activeName) && (this.activeName = a);
|
|
697
1342
|
},
|
|
698
1343
|
immediate: !0
|
|
699
1344
|
},
|
|
700
1345
|
activeName: {
|
|
701
|
-
handler(
|
|
702
|
-
this.$emit(`update:${this.activeNameKey}`,
|
|
1346
|
+
handler(a) {
|
|
1347
|
+
this.$emit(`update:${this.activeNameKey}`, a);
|
|
703
1348
|
}
|
|
704
1349
|
}
|
|
705
1350
|
},
|
|
706
1351
|
methods: {
|
|
707
|
-
handleClick(
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}
|
|
714
|
-
);
|
|
715
|
-
this.noUrlParameters || this.$router.push({
|
|
716
|
-
query: { ...a }
|
|
717
|
-
}), this.getList({
|
|
718
|
-
...a
|
|
1352
|
+
async handleClick(a, e) {
|
|
1353
|
+
const t = await R.makeParamsByType({
|
|
1354
|
+
[this.activeNameKey]: this.activeName
|
|
1355
|
+
}, this);
|
|
1356
|
+
await R.saveParamsByType(t, this), this.getList({
|
|
1357
|
+
...t
|
|
719
1358
|
});
|
|
720
1359
|
},
|
|
721
1360
|
activeNameInit() {
|
|
722
|
-
var
|
|
723
|
-
let
|
|
724
|
-
(
|
|
725
|
-
const e =
|
|
726
|
-
return
|
|
1361
|
+
var t, r, n;
|
|
1362
|
+
let a = "";
|
|
1363
|
+
(t = this.tabPanes[0]) != null && t.name && (a = (r = this.tabPanes[0]) == null ? void 0 : r.name);
|
|
1364
|
+
const e = pe.queryToData(Number((n = this.$route) == null ? void 0 : n.query[this.activeNameKey]));
|
|
1365
|
+
return this.parametersType === "url" && e && (a = e), this.parametersType === "indexDB" && ct(
|
|
1366
|
+
{
|
|
1367
|
+
tableName: "formParams",
|
|
1368
|
+
propertiesKey: this.$route.path || "defQueryParams",
|
|
1369
|
+
primaryKey: this.DBPrimaryKey || "default",
|
|
1370
|
+
mapDB: lt
|
|
1371
|
+
},
|
|
1372
|
+
(o) => {
|
|
1373
|
+
this.activeName = o == null ? void 0 : o[this.activeNameKey];
|
|
1374
|
+
}
|
|
1375
|
+
), this.defActiveName && (a = this.defActiveName), `${a}`;
|
|
727
1376
|
}
|
|
728
1377
|
}
|
|
729
1378
|
};
|
|
730
|
-
var
|
|
731
|
-
var e = this,
|
|
732
|
-
return
|
|
1379
|
+
var pt = function() {
|
|
1380
|
+
var e = this, t = e._self._c;
|
|
1381
|
+
return t("el-tabs", e._b({ on: { "tab-click": e.handleClick }, model: { value: e.activeName, callback: function(r) {
|
|
733
1382
|
e.activeName = r;
|
|
734
1383
|
}, expression: "activeName" } }, "el-tabs", e.$attrs, !1), [e._l(e.tabPanes, function(r) {
|
|
735
|
-
return
|
|
1384
|
+
return t("el-tab-pane", e._b({ key: r.name }, "el-tab-pane", r, !1), [e._v(" " + e._s(r.render && r.render(r)) + " ")]);
|
|
736
1385
|
}), e._t("default")], 2);
|
|
737
|
-
},
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1386
|
+
}, ft = [], dt = /* @__PURE__ */ E(
|
|
1387
|
+
ut,
|
|
1388
|
+
pt,
|
|
1389
|
+
ft,
|
|
741
1390
|
!1,
|
|
742
1391
|
null,
|
|
743
|
-
"
|
|
1392
|
+
"ebedcae9",
|
|
744
1393
|
null,
|
|
745
1394
|
null
|
|
746
1395
|
);
|
|
747
|
-
const
|
|
1396
|
+
const yt = dt.exports, ht = Ve, bt = Ue, _t = rt, gt = it, vt = yt;
|
|
748
1397
|
export {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
1398
|
+
_t as VDescriptions,
|
|
1399
|
+
ht as VGeneralBasicForm,
|
|
1400
|
+
bt as VSearchBox,
|
|
1401
|
+
vt as VTabs,
|
|
1402
|
+
gt as VTreeTransfer
|
|
754
1403
|
};
|