@gis_victory/curd-form 0.0.4 → 0.0.6
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/dist/curd-form.css +1 -1
- package/dist/curd-form.es.js +1039 -1054
- package/dist/curd-form.umd.js +2 -2
- package/package.json +1 -1
package/dist/curd-form.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { dayjs as oe, ElMessage as
|
|
3
|
-
import { GisMapView as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as Y, ref as V, computed as ue, watch as q, openBlock as p, createBlock as C, unref as u, withCtx as h, createElementBlock as S, Fragment as B, renderList as J, onMounted as ne, toDisplayString as re, createElementVNode as G, normalizeClass as ee, createCommentVNode as E, reactive as j, onUnmounted as Ee, createVNode as b, renderSlot as K, createTextVNode as U, nextTick as de, normalizeStyle as Ie, createSlots as xe } from "vue";
|
|
2
|
+
import { ElSelect as ce, ElOption as pe, ElDatePicker as me, ElCheckboxGroup as ve, ElCheckbox as se, ElRadioGroup as $e, ElRadio as Ne, ElInput as te, dayjs as ae, ElButton as I, ElIcon as we, Download as Ae, ElDialog as be, ElForm as oe, ElFormItem as Z, ElMessage as z, ElPopover as We, Menu as Ue, ElTable as Be, ElTableColumn as Q, ElPagination as Re, ElRow as le, ElCol as X, ElMessageBox as fe } from "element-plus";
|
|
3
|
+
import { GisMapView as Ge, GisMapSwitch as Ye } from "@gis_victory/gismap";
|
|
4
|
+
const je = {
|
|
5
5
|
name: "FormItem"
|
|
6
|
-
},
|
|
7
|
-
...
|
|
6
|
+
}, he = /* @__PURE__ */ Y({
|
|
7
|
+
...je,
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: {
|
|
10
10
|
type: [String, Number, Array],
|
|
@@ -24,12 +24,12 @@ const xe = {
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
const e =
|
|
29
|
-
let
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
27
|
+
setup(l, { emit: t }) {
|
|
28
|
+
const e = l;
|
|
29
|
+
let a = e.modelValue;
|
|
30
|
+
const n = e.item.type === "multiple-select" || e.item.type === "checkbox" || e.item.searchFormType === "multiple-select" || e.item.searchFormType === "checkbox";
|
|
31
|
+
n && typeof a == "string" && a && (a = a.split(","));
|
|
32
|
+
const i = V(a), g = t, m = ue(() => {
|
|
33
33
|
switch (e.currentOperationType) {
|
|
34
34
|
case "default":
|
|
35
35
|
return !1;
|
|
@@ -41,7 +41,7 @@ const xe = {
|
|
|
41
41
|
return e.item.updateFormStatus == "disabled";
|
|
42
42
|
}
|
|
43
43
|
return !1;
|
|
44
|
-
}),
|
|
44
|
+
}), o = ue(() => {
|
|
45
45
|
switch (e.currentOperationType) {
|
|
46
46
|
case "default":
|
|
47
47
|
return !1;
|
|
@@ -54,132 +54,129 @@ const xe = {
|
|
|
54
54
|
}
|
|
55
55
|
return !1;
|
|
56
56
|
});
|
|
57
|
-
return
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
}),
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
}), (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
clearable: ""
|
|
176
|
-
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly"]));
|
|
177
|
-
};
|
|
57
|
+
return q(i, (d) => {
|
|
58
|
+
let c = d;
|
|
59
|
+
n && Array.isArray(d) && (c = d.join(",")), g("update:modelValue", c);
|
|
60
|
+
}), q(() => e.modelValue, (d) => {
|
|
61
|
+
let c = d;
|
|
62
|
+
n && typeof d == "string" && d && (c = d.split(",")), i.value = c;
|
|
63
|
+
}), (d, c) => l.item.searchFormType === "select" || l.item.type === "select" ? (p(), C(u(ce), {
|
|
64
|
+
key: 0,
|
|
65
|
+
modelValue: i.value,
|
|
66
|
+
"onUpdate:modelValue": c[0] || (c[0] = (r) => i.value = r),
|
|
67
|
+
placeholder: l.item.placeholder || "请选择",
|
|
68
|
+
disabled: m.value,
|
|
69
|
+
readonly: o.value,
|
|
70
|
+
clearable: ""
|
|
71
|
+
}, {
|
|
72
|
+
default: h(() => [
|
|
73
|
+
(p(!0), S(B, null, J(l.dropdownOptions, (r) => (p(), C(u(pe), {
|
|
74
|
+
key: r.id,
|
|
75
|
+
label: r.name,
|
|
76
|
+
value: r.id
|
|
77
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["modelValue", "placeholder", "disabled", "readonly"])) : l.item.searchFormType === "multiple-select" || l.item.type === "multiple-select" ? (p(), C(u(ce), {
|
|
81
|
+
key: 1,
|
|
82
|
+
modelValue: i.value,
|
|
83
|
+
"onUpdate:modelValue": c[1] || (c[1] = (r) => i.value = r),
|
|
84
|
+
placeholder: l.item.placeholder || "请选择",
|
|
85
|
+
multiple: "",
|
|
86
|
+
disabled: m.value,
|
|
87
|
+
readonly: o.value,
|
|
88
|
+
clearable: ""
|
|
89
|
+
}, {
|
|
90
|
+
default: h(() => [
|
|
91
|
+
(p(!0), S(B, null, J(l.dropdownOptions, (r) => (p(), C(u(pe), {
|
|
92
|
+
key: r.id,
|
|
93
|
+
label: r.name,
|
|
94
|
+
value: r.id
|
|
95
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["modelValue", "placeholder", "disabled", "readonly"])) : l.item.searchFormType === "date" || l.item.type === "date" ? (p(), C(u(me), {
|
|
99
|
+
key: 2,
|
|
100
|
+
modelValue: i.value,
|
|
101
|
+
"onUpdate:modelValue": c[2] || (c[2] = (r) => i.value = r),
|
|
102
|
+
type: "date",
|
|
103
|
+
"value-format": "YYYY-MM-DD",
|
|
104
|
+
placeholder: l.item.placeholder || "请选择日期",
|
|
105
|
+
disabled: m.value,
|
|
106
|
+
readonly: o.value,
|
|
107
|
+
clearable: "",
|
|
108
|
+
style: { width: "100%" }
|
|
109
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly"])) : l.item.searchFormType === "daterange" || l.item.type === "daterange" ? (p(), C(u(me), {
|
|
110
|
+
key: 3,
|
|
111
|
+
modelValue: i.value,
|
|
112
|
+
"onUpdate:modelValue": c[3] || (c[3] = (r) => i.value = r),
|
|
113
|
+
type: "daterange",
|
|
114
|
+
"value-format": "yyyy-MM-dd",
|
|
115
|
+
placeholder: l.item.placeholder || "请选择日期范围",
|
|
116
|
+
disabled: m.value,
|
|
117
|
+
readonly: o.value,
|
|
118
|
+
clearable: ""
|
|
119
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly"])) : l.item.searchFormType === "checkbox" || l.item.type === "checkbox" ? (p(), C(u(ve), {
|
|
120
|
+
key: 4,
|
|
121
|
+
modelValue: i.value,
|
|
122
|
+
"onUpdate:modelValue": c[4] || (c[4] = (r) => i.value = r),
|
|
123
|
+
disabled: m.value,
|
|
124
|
+
readonly: o.value
|
|
125
|
+
}, {
|
|
126
|
+
default: h(() => [
|
|
127
|
+
(p(!0), S(B, null, J(l.dropdownOptions, (r) => (p(), C(u(se), {
|
|
128
|
+
key: r.id,
|
|
129
|
+
label: r.name,
|
|
130
|
+
value: r.id
|
|
131
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["modelValue", "disabled", "readonly"])) : l.item.searchFormType === "radio" || l.item.type === "radio" ? (p(), C(u($e), {
|
|
135
|
+
key: 5,
|
|
136
|
+
modelValue: i.value,
|
|
137
|
+
"onUpdate:modelValue": c[5] || (c[5] = (r) => i.value = r),
|
|
138
|
+
disabled: m.value,
|
|
139
|
+
readonly: o.value
|
|
140
|
+
}, {
|
|
141
|
+
default: h(() => [
|
|
142
|
+
(p(!0), S(B, null, J(l.dropdownOptions, (r) => (p(), C(u(Ne), {
|
|
143
|
+
key: r.id,
|
|
144
|
+
label: r.name,
|
|
145
|
+
value: r.id
|
|
146
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
147
|
+
]),
|
|
148
|
+
_: 1
|
|
149
|
+
}, 8, ["modelValue", "disabled", "readonly"])) : l.item.searchFormType === "textarea" || l.item.type === "textarea" ? (p(), C(u(te), {
|
|
150
|
+
key: 6,
|
|
151
|
+
modelValue: i.value,
|
|
152
|
+
"onUpdate:modelValue": c[6] || (c[6] = (r) => i.value = r),
|
|
153
|
+
type: "textarea",
|
|
154
|
+
placeholder: l.item.placeholder || "请输入",
|
|
155
|
+
disabled: m.value,
|
|
156
|
+
readonly: o.value,
|
|
157
|
+
clearable: ""
|
|
158
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly"])) : l.item.searchFormType === "input" || l.item.type === "input" ? (p(), C(u(te), {
|
|
159
|
+
key: 7,
|
|
160
|
+
modelValue: i.value,
|
|
161
|
+
"onUpdate:modelValue": c[7] || (c[7] = (r) => i.value = r),
|
|
162
|
+
placeholder: l.item.placeholder || "请输入",
|
|
163
|
+
disabled: m.value,
|
|
164
|
+
readonly: o.value,
|
|
165
|
+
clearable: ""
|
|
166
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly"])) : (p(), C(u(te), {
|
|
167
|
+
key: 8,
|
|
168
|
+
modelValue: i.value,
|
|
169
|
+
"onUpdate:modelValue": c[8] || (c[8] = (r) => i.value = r),
|
|
170
|
+
placeholder: l.item.placeholder || "请输入",
|
|
171
|
+
disabled: m.value,
|
|
172
|
+
readonly: o.value,
|
|
173
|
+
clearable: ""
|
|
174
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "readonly"]));
|
|
178
175
|
}
|
|
179
|
-
}),
|
|
176
|
+
}), Je = {
|
|
180
177
|
name: "FormItemDetail"
|
|
181
|
-
},
|
|
182
|
-
...
|
|
178
|
+
}, Ke = /* @__PURE__ */ Y({
|
|
179
|
+
...Je,
|
|
183
180
|
props: {
|
|
184
181
|
modelValue: {
|
|
185
182
|
type: [String, Number, Array, Object],
|
|
@@ -194,311 +191,311 @@ const xe = {
|
|
|
194
191
|
default: () => []
|
|
195
192
|
}
|
|
196
193
|
},
|
|
197
|
-
setup(
|
|
198
|
-
const t =
|
|
194
|
+
setup(l) {
|
|
195
|
+
const t = l;
|
|
199
196
|
let e = t.modelValue;
|
|
200
|
-
const
|
|
201
|
-
typeof e == "object" && e !== null && !Array.isArray(e) && (e = Object.values(e).join(",")),
|
|
202
|
-
const
|
|
197
|
+
const a = t.item.type === "multiple-select" || t.item.type === "checkbox" || t.item.searchFormType === "multiple-select" || t.item.searchFormType === "checkbox";
|
|
198
|
+
typeof e == "object" && e !== null && !Array.isArray(e) && (e = Object.values(e).join(",")), a && typeof e == "string" && e && (e = e.split(","));
|
|
199
|
+
const n = V(e);
|
|
203
200
|
return ne(() => {
|
|
204
201
|
switch (t.item.type) {
|
|
205
202
|
case "select":
|
|
206
203
|
case "radio":
|
|
207
|
-
const
|
|
208
|
-
|
|
204
|
+
const i = t.dropdownOptions.find((o) => o.id === t.modelValue);
|
|
205
|
+
n.value = i?.name || "";
|
|
209
206
|
break;
|
|
210
207
|
case "checkbox":
|
|
211
208
|
case "multiple-select":
|
|
212
|
-
const
|
|
213
|
-
|
|
209
|
+
const m = (Array.isArray(n.value) ? n.value : n.value?.split(",") || []).map((o) => t.dropdownOptions.find((c) => c.id === o)?.name || o).filter(Boolean);
|
|
210
|
+
n.value = m.join(",") || "";
|
|
214
211
|
break;
|
|
215
212
|
case "date":
|
|
216
|
-
|
|
213
|
+
n.value = t.modelValue ? ae(t.modelValue).format(t.item.formatter || "YYYY-MM-DD") : "";
|
|
217
214
|
break;
|
|
218
215
|
case "datetime":
|
|
219
|
-
|
|
216
|
+
n.value = t.modelValue ? ae(t.modelValue).format(t.item.formatter || "YYYY-MM-DD HH:mm:ss") : "";
|
|
220
217
|
break;
|
|
221
218
|
default:
|
|
222
|
-
|
|
219
|
+
n.value = t.modelValue;
|
|
223
220
|
break;
|
|
224
221
|
}
|
|
225
|
-
}), (
|
|
222
|
+
}), (i, g) => (p(), S("span", null, re(n.value), 1));
|
|
226
223
|
}
|
|
227
224
|
});
|
|
228
|
-
var
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
var
|
|
233
|
-
function e(
|
|
234
|
-
var
|
|
235
|
-
function
|
|
236
|
-
var
|
|
237
|
-
return
|
|
225
|
+
var H = { exports: {} }, ye;
|
|
226
|
+
function qe() {
|
|
227
|
+
if (ye) return H.exports;
|
|
228
|
+
ye = 1, H.exports = e, H.exports.parse = e, H.exports.stringify = a;
|
|
229
|
+
var l = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/, t = new RegExp("^" + l.source + "(\\s" + l.source + "){1,}");
|
|
230
|
+
function e(n) {
|
|
231
|
+
var i = n.split(";"), g = i.pop(), m = (i.shift() || "").split("=").pop(), o = 0;
|
|
232
|
+
function d(v) {
|
|
233
|
+
var k = g.substring(o).match(v);
|
|
234
|
+
return k ? (o += k[0].length, k[0]) : null;
|
|
238
235
|
}
|
|
239
|
-
function
|
|
240
|
-
return v &&
|
|
236
|
+
function c(v) {
|
|
237
|
+
return v && m.match(/\d+/) && (v.crs = {
|
|
241
238
|
type: "name",
|
|
242
239
|
properties: {
|
|
243
|
-
name: "urn:ogc:def:crs:EPSG::" +
|
|
240
|
+
name: "urn:ogc:def:crs:EPSG::" + m
|
|
244
241
|
}
|
|
245
242
|
}), v;
|
|
246
243
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
244
|
+
function r() {
|
|
245
|
+
d(/^\s*/);
|
|
249
246
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
252
|
-
for (var v = 0,
|
|
253
|
-
if (
|
|
254
|
-
|
|
255
|
-
else if (
|
|
256
|
-
if (
|
|
247
|
+
function f() {
|
|
248
|
+
r();
|
|
249
|
+
for (var v = 0, k = [], T = [k], W = k, x; x = d(/^(\()/) || d(/^(\))/) || d(/^(,)/) || d(t); ) {
|
|
250
|
+
if (x === "(")
|
|
251
|
+
T.push(W), W = [], T[T.length - 1].push(W), v++;
|
|
252
|
+
else if (x === ")") {
|
|
253
|
+
if (W.length === 0 || (W = T.pop(), !W)) return null;
|
|
257
254
|
if (v--, v === 0) break;
|
|
258
|
-
} else if (
|
|
259
|
-
|
|
260
|
-
else if (!
|
|
261
|
-
Array.prototype.push.apply(
|
|
255
|
+
} else if (x === ",")
|
|
256
|
+
W = [], T[T.length - 1].push(W);
|
|
257
|
+
else if (!x.split(/\s/g).some(isNaN))
|
|
258
|
+
Array.prototype.push.apply(W, x.split(/\s/g).map(parseFloat));
|
|
262
259
|
else
|
|
263
260
|
return null;
|
|
264
|
-
|
|
261
|
+
r();
|
|
265
262
|
}
|
|
266
|
-
return v !== 0 ? null :
|
|
263
|
+
return v !== 0 ? null : k;
|
|
267
264
|
}
|
|
268
|
-
function
|
|
269
|
-
for (var v = [],
|
|
270
|
-
|
|
271
|
-
if (
|
|
265
|
+
function D() {
|
|
266
|
+
for (var v = [], k, T; T = d(t) || d(/^(,)/); )
|
|
267
|
+
T === "," ? (v.push(k), k = []) : T.split(/\s/g).some(isNaN) || (k || (k = []), Array.prototype.push.apply(k, T.split(/\s/g).map(parseFloat))), r();
|
|
268
|
+
if (k) v.push(k);
|
|
272
269
|
else return null;
|
|
273
270
|
return v.length ? v : null;
|
|
274
271
|
}
|
|
275
|
-
function
|
|
276
|
-
if (!
|
|
277
|
-
var v =
|
|
278
|
-
return !v || (
|
|
272
|
+
function L() {
|
|
273
|
+
if (!d(/^(point(\sz)?)/i) || (r(), !d(/^(\()/))) return null;
|
|
274
|
+
var v = D();
|
|
275
|
+
return !v || (r(), !d(/^(\))/)) ? null : {
|
|
279
276
|
type: "Point",
|
|
280
277
|
coordinates: v[0]
|
|
281
278
|
};
|
|
282
279
|
}
|
|
283
|
-
function
|
|
284
|
-
if (!
|
|
285
|
-
|
|
280
|
+
function $() {
|
|
281
|
+
if (!d(/^(multipoint)/i)) return null;
|
|
282
|
+
r();
|
|
286
283
|
var v = g.substring(g.indexOf("(") + 1, g.length - 1).replace(/\(/g, "").replace(/\)/g, "");
|
|
287
284
|
g = "MULTIPOINT (" + v + ")";
|
|
288
|
-
var
|
|
289
|
-
return
|
|
285
|
+
var k = f();
|
|
286
|
+
return k ? (r(), {
|
|
290
287
|
type: "MultiPoint",
|
|
291
|
-
coordinates:
|
|
288
|
+
coordinates: k
|
|
292
289
|
}) : null;
|
|
293
290
|
}
|
|
294
|
-
function
|
|
295
|
-
if (!
|
|
296
|
-
|
|
297
|
-
var v =
|
|
298
|
-
return v ? (
|
|
291
|
+
function R() {
|
|
292
|
+
if (!d(/^(multilinestring)/i)) return null;
|
|
293
|
+
r();
|
|
294
|
+
var v = f();
|
|
295
|
+
return v ? (r(), {
|
|
299
296
|
type: "MultiLineString",
|
|
300
297
|
coordinates: v
|
|
301
298
|
}) : null;
|
|
302
299
|
}
|
|
303
|
-
function
|
|
304
|
-
if (!
|
|
305
|
-
var v =
|
|
306
|
-
return !v || !
|
|
300
|
+
function O() {
|
|
301
|
+
if (!d(/^(linestring(\sz)?)/i) || (r(), !d(/^(\()/))) return null;
|
|
302
|
+
var v = D();
|
|
303
|
+
return !v || !d(/^(\))/) ? null : {
|
|
307
304
|
type: "LineString",
|
|
308
305
|
coordinates: v
|
|
309
306
|
};
|
|
310
307
|
}
|
|
311
|
-
function
|
|
312
|
-
if (!
|
|
313
|
-
|
|
314
|
-
var v =
|
|
308
|
+
function N() {
|
|
309
|
+
if (!d(/^(polygon(\sz)?)/i)) return null;
|
|
310
|
+
r();
|
|
311
|
+
var v = f();
|
|
315
312
|
return v ? {
|
|
316
313
|
type: "Polygon",
|
|
317
314
|
coordinates: v
|
|
318
315
|
} : null;
|
|
319
316
|
}
|
|
320
|
-
function
|
|
321
|
-
if (!
|
|
322
|
-
|
|
323
|
-
var v =
|
|
317
|
+
function P() {
|
|
318
|
+
if (!d(/^(multipolygon)/i)) return null;
|
|
319
|
+
r();
|
|
320
|
+
var v = f();
|
|
324
321
|
return v ? {
|
|
325
322
|
type: "MultiPolygon",
|
|
326
323
|
coordinates: v
|
|
327
324
|
} : null;
|
|
328
325
|
}
|
|
329
|
-
function
|
|
330
|
-
var v = [],
|
|
331
|
-
if (!
|
|
332
|
-
for (;
|
|
333
|
-
v.push(
|
|
334
|
-
return
|
|
326
|
+
function F() {
|
|
327
|
+
var v = [], k;
|
|
328
|
+
if (!d(/^(geometrycollection)/i) || (r(), !d(/^(\()/))) return null;
|
|
329
|
+
for (; k = A(); )
|
|
330
|
+
v.push(k), r(), d(/^(,)/), r();
|
|
331
|
+
return d(/^(\))/) ? {
|
|
335
332
|
type: "GeometryCollection",
|
|
336
333
|
geometries: v
|
|
337
334
|
} : null;
|
|
338
335
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
336
|
+
function A() {
|
|
337
|
+
return L() || O() || N() || $() || R() || P() || F();
|
|
341
338
|
}
|
|
342
|
-
return
|
|
339
|
+
return c(A());
|
|
343
340
|
}
|
|
344
|
-
function
|
|
345
|
-
|
|
346
|
-
function
|
|
347
|
-
return
|
|
341
|
+
function a(n) {
|
|
342
|
+
n.type === "Feature" && (n = n.geometry);
|
|
343
|
+
function i(c) {
|
|
344
|
+
return c.join(" ");
|
|
348
345
|
}
|
|
349
|
-
function g(
|
|
350
|
-
return
|
|
346
|
+
function g(c) {
|
|
347
|
+
return c.map(i).join(", ");
|
|
351
348
|
}
|
|
352
|
-
function
|
|
353
|
-
return
|
|
349
|
+
function m(c) {
|
|
350
|
+
return c.map(g).map(d).join(", ");
|
|
354
351
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
352
|
+
function o(c) {
|
|
353
|
+
return c.map(m).map(d).join(", ");
|
|
357
354
|
}
|
|
358
|
-
function
|
|
359
|
-
return "(" +
|
|
355
|
+
function d(c) {
|
|
356
|
+
return "(" + c + ")";
|
|
360
357
|
}
|
|
361
|
-
switch (
|
|
358
|
+
switch (n.type) {
|
|
362
359
|
case "Point":
|
|
363
|
-
return "POINT (" +
|
|
360
|
+
return "POINT (" + i(n.coordinates) + ")";
|
|
364
361
|
case "LineString":
|
|
365
|
-
return "LINESTRING (" + g(
|
|
362
|
+
return "LINESTRING (" + g(n.coordinates) + ")";
|
|
366
363
|
case "Polygon":
|
|
367
|
-
return "POLYGON (" +
|
|
364
|
+
return "POLYGON (" + m(n.coordinates) + ")";
|
|
368
365
|
case "MultiPoint":
|
|
369
|
-
return "MULTIPOINT (" + g(
|
|
366
|
+
return "MULTIPOINT (" + g(n.coordinates) + ")";
|
|
370
367
|
case "MultiPolygon":
|
|
371
|
-
return "MULTIPOLYGON (" + n
|
|
368
|
+
return "MULTIPOLYGON (" + o(n.coordinates) + ")";
|
|
372
369
|
case "MultiLineString":
|
|
373
|
-
return "MULTILINESTRING (" +
|
|
370
|
+
return "MULTILINESTRING (" + m(n.coordinates) + ")";
|
|
374
371
|
case "GeometryCollection":
|
|
375
|
-
return "GEOMETRYCOLLECTION (" +
|
|
372
|
+
return "GEOMETRYCOLLECTION (" + n.geometries.map(a).join(", ") + ")";
|
|
376
373
|
default:
|
|
377
374
|
throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input");
|
|
378
375
|
}
|
|
379
376
|
}
|
|
380
|
-
return
|
|
377
|
+
return H.exports;
|
|
381
378
|
}
|
|
382
|
-
var
|
|
383
|
-
function
|
|
384
|
-
const
|
|
385
|
-
return (e.id === 0 || e.id) && (
|
|
379
|
+
var ie = qe();
|
|
380
|
+
function He(l, t, e = {}) {
|
|
381
|
+
const a = { type: "Feature" };
|
|
382
|
+
return (e.id === 0 || e.id) && (a.id = e.id), e.bbox && (a.bbox = e.bbox), a.properties = t || {}, a.geometry = l, a;
|
|
386
383
|
}
|
|
387
|
-
function
|
|
388
|
-
if (!
|
|
384
|
+
function Ze(l, t, e = {}) {
|
|
385
|
+
if (!l)
|
|
389
386
|
throw new Error("coordinates is required");
|
|
390
|
-
if (!Array.isArray(
|
|
387
|
+
if (!Array.isArray(l))
|
|
391
388
|
throw new Error("coordinates must be an Array");
|
|
392
|
-
if (
|
|
389
|
+
if (l.length < 2)
|
|
393
390
|
throw new Error("coordinates must be at least 2 numbers long");
|
|
394
|
-
if (!
|
|
391
|
+
if (!ge(l[0]) || !ge(l[1]))
|
|
395
392
|
throw new Error("coordinates must contain numbers");
|
|
396
|
-
return
|
|
393
|
+
return He({
|
|
397
394
|
type: "Point",
|
|
398
|
-
coordinates:
|
|
395
|
+
coordinates: l
|
|
399
396
|
}, t, e);
|
|
400
397
|
}
|
|
401
|
-
function
|
|
402
|
-
return !isNaN(
|
|
398
|
+
function ge(l) {
|
|
399
|
+
return !isNaN(l) && l !== null && !Array.isArray(l);
|
|
403
400
|
}
|
|
404
|
-
function
|
|
405
|
-
if (
|
|
406
|
-
for (var
|
|
407
|
-
|
|
401
|
+
function Ce(l, t, e) {
|
|
402
|
+
if (l !== null)
|
|
403
|
+
for (var a, n, i, g, m, o, d, c = 0, r = 0, f, D = l.type, L = D === "FeatureCollection", $ = D === "Feature", R = L ? l.features.length : 1, O = 0; O < R; O++) {
|
|
404
|
+
d = L ? (
|
|
408
405
|
// @ts-expect-error: Known type conflict
|
|
409
|
-
|
|
410
|
-
) :
|
|
406
|
+
l.features[O].geometry
|
|
407
|
+
) : $ ? (
|
|
411
408
|
// @ts-expect-error: Known type conflict
|
|
412
|
-
|
|
413
|
-
) :
|
|
414
|
-
for (var
|
|
415
|
-
var
|
|
416
|
-
if (g =
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
switch (
|
|
409
|
+
l.geometry
|
|
410
|
+
) : l, f = d ? d.type === "GeometryCollection" : !1, m = f ? d.geometries.length : 1;
|
|
411
|
+
for (var N = 0; N < m; N++) {
|
|
412
|
+
var P = 0, F = 0;
|
|
413
|
+
if (g = f ? d.geometries[N] : d, g !== null) {
|
|
414
|
+
o = g.coordinates;
|
|
415
|
+
var A = g.type;
|
|
416
|
+
switch (c = A === "Polygon" || A === "MultiPolygon" ? 1 : 0, A) {
|
|
420
417
|
case null:
|
|
421
418
|
break;
|
|
422
419
|
case "Point":
|
|
423
420
|
if (
|
|
424
421
|
// @ts-expect-error: Known type conflict
|
|
425
422
|
t(
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
423
|
+
o,
|
|
424
|
+
r,
|
|
425
|
+
O,
|
|
426
|
+
P,
|
|
427
|
+
F
|
|
431
428
|
) === !1
|
|
432
429
|
)
|
|
433
430
|
return !1;
|
|
434
|
-
|
|
431
|
+
r++, P++;
|
|
435
432
|
break;
|
|
436
433
|
case "LineString":
|
|
437
434
|
case "MultiPoint":
|
|
438
|
-
for (
|
|
435
|
+
for (a = 0; a < o.length; a++) {
|
|
439
436
|
if (
|
|
440
437
|
// @ts-expect-error: Known type conflict
|
|
441
438
|
t(
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
439
|
+
o[a],
|
|
440
|
+
r,
|
|
441
|
+
O,
|
|
442
|
+
P,
|
|
443
|
+
F
|
|
447
444
|
) === !1
|
|
448
445
|
)
|
|
449
446
|
return !1;
|
|
450
|
-
|
|
447
|
+
r++, A === "MultiPoint" && P++;
|
|
451
448
|
}
|
|
452
|
-
|
|
449
|
+
A === "LineString" && P++;
|
|
453
450
|
break;
|
|
454
451
|
case "Polygon":
|
|
455
452
|
case "MultiLineString":
|
|
456
|
-
for (
|
|
457
|
-
for (
|
|
453
|
+
for (a = 0; a < o.length; a++) {
|
|
454
|
+
for (n = 0; n < o[a].length - c; n++) {
|
|
458
455
|
if (
|
|
459
456
|
// @ts-expect-error: Known type conflict
|
|
460
457
|
t(
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
458
|
+
o[a][n],
|
|
459
|
+
r,
|
|
460
|
+
O,
|
|
461
|
+
P,
|
|
462
|
+
F
|
|
466
463
|
) === !1
|
|
467
464
|
)
|
|
468
465
|
return !1;
|
|
469
|
-
|
|
466
|
+
r++;
|
|
470
467
|
}
|
|
471
|
-
|
|
468
|
+
A === "MultiLineString" && P++, A === "Polygon" && F++;
|
|
472
469
|
}
|
|
473
|
-
|
|
470
|
+
A === "Polygon" && P++;
|
|
474
471
|
break;
|
|
475
472
|
case "MultiPolygon":
|
|
476
|
-
for (
|
|
477
|
-
for (
|
|
478
|
-
for (
|
|
473
|
+
for (a = 0; a < o.length; a++) {
|
|
474
|
+
for (F = 0, n = 0; n < o[a].length; n++) {
|
|
475
|
+
for (i = 0; i < o[a][n].length - c; i++) {
|
|
479
476
|
if (
|
|
480
477
|
// @ts-expect-error: Known type conflict
|
|
481
478
|
t(
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
479
|
+
o[a][n][i],
|
|
480
|
+
r,
|
|
481
|
+
O,
|
|
482
|
+
P,
|
|
483
|
+
F
|
|
487
484
|
) === !1
|
|
488
485
|
)
|
|
489
486
|
return !1;
|
|
490
|
-
|
|
487
|
+
r++;
|
|
491
488
|
}
|
|
492
|
-
|
|
489
|
+
F++;
|
|
493
490
|
}
|
|
494
|
-
|
|
491
|
+
P++;
|
|
495
492
|
}
|
|
496
493
|
break;
|
|
497
494
|
case "GeometryCollection":
|
|
498
|
-
for (
|
|
495
|
+
for (a = 0; a < g.geometries.length; a++)
|
|
499
496
|
if (
|
|
500
497
|
// @ts-expect-error: Known type conflict
|
|
501
|
-
|
|
498
|
+
Ce(g.geometries[a], t) === !1
|
|
502
499
|
)
|
|
503
500
|
return !1;
|
|
504
501
|
break;
|
|
@@ -509,16 +506,16 @@ function me(r, t, e) {
|
|
|
509
506
|
}
|
|
510
507
|
}
|
|
511
508
|
}
|
|
512
|
-
function
|
|
513
|
-
let e = 0,
|
|
514
|
-
return
|
|
515
|
-
|
|
516
|
-
function(
|
|
517
|
-
e +=
|
|
509
|
+
function _e(l, t = {}) {
|
|
510
|
+
let e = 0, a = 0, n = 0;
|
|
511
|
+
return Ce(
|
|
512
|
+
l,
|
|
513
|
+
function(i) {
|
|
514
|
+
e += i[0], a += i[1], n++;
|
|
518
515
|
}
|
|
519
|
-
),
|
|
516
|
+
), Ze([e / n, a / n], t.properties);
|
|
520
517
|
}
|
|
521
|
-
class
|
|
518
|
+
class Qe {
|
|
522
519
|
map;
|
|
523
520
|
sourceId = "curd-map-source";
|
|
524
521
|
layerId = "curd-map-layer";
|
|
@@ -588,8 +585,8 @@ class We {
|
|
|
588
585
|
const e = {
|
|
589
586
|
type: "Feature",
|
|
590
587
|
geometry: t
|
|
591
|
-
},
|
|
592
|
-
|
|
588
|
+
}, a = this.map.getSource(this.sourceId);
|
|
589
|
+
a && (this.featureCollection.features = [e], a?.setData(this.featureCollection));
|
|
593
590
|
}
|
|
594
591
|
flyTo() {
|
|
595
592
|
if (this.featureCollection.features.length !== 0)
|
|
@@ -598,7 +595,7 @@ class We {
|
|
|
598
595
|
if (!t)
|
|
599
596
|
return;
|
|
600
597
|
let e = null;
|
|
601
|
-
if (t.geometry.type.toLowerCase() === "point" ? e = t.geometry.coordinates : e =
|
|
598
|
+
if (t.geometry.type.toLowerCase() === "point" ? e = t.geometry.coordinates : e = _e(this.featureCollection)?.geometry?.coordinates || null, !e)
|
|
602
599
|
return;
|
|
603
600
|
this.map.flyTo({
|
|
604
601
|
center: e,
|
|
@@ -612,7 +609,7 @@ class We {
|
|
|
612
609
|
if (!t)
|
|
613
610
|
return null;
|
|
614
611
|
try {
|
|
615
|
-
return
|
|
612
|
+
return ie.parse(t);
|
|
616
613
|
} catch (e) {
|
|
617
614
|
return console.error("WKT 转换为 GeoJSON 失败:", e), null;
|
|
618
615
|
}
|
|
@@ -621,7 +618,7 @@ class We {
|
|
|
621
618
|
if (!t)
|
|
622
619
|
return "";
|
|
623
620
|
try {
|
|
624
|
-
return
|
|
621
|
+
return ie.stringify(t);
|
|
625
622
|
} catch (e) {
|
|
626
623
|
return console.error("GeoJSON 转换为 WKT 失败:", e), "";
|
|
627
624
|
}
|
|
@@ -630,7 +627,7 @@ class We {
|
|
|
630
627
|
this.map.removeLayer(this.layerId), this.map.removeSource(this.sourceId);
|
|
631
628
|
}
|
|
632
629
|
}
|
|
633
|
-
class
|
|
630
|
+
class Xe {
|
|
634
631
|
map;
|
|
635
632
|
drawSourceId = "curd-map-draw-source";
|
|
636
633
|
drawLayerId = "curd-map-draw-layer";
|
|
@@ -743,8 +740,8 @@ class Ue {
|
|
|
743
740
|
handleMapMouseMove(t) {
|
|
744
741
|
if (this.drawType === "none" || this.drawCoordinates.length === 0)
|
|
745
742
|
return;
|
|
746
|
-
const e = t.lngLat.toArray(),
|
|
747
|
-
this.updateDrawFeature(
|
|
743
|
+
const e = t.lngLat.toArray(), a = [...this.drawCoordinates, e];
|
|
744
|
+
this.updateDrawFeature(a);
|
|
748
745
|
}
|
|
749
746
|
// 处理地图双击事件
|
|
750
747
|
handleMapDoubleClick() {
|
|
@@ -755,34 +752,34 @@ class Ue {
|
|
|
755
752
|
const e = t || this.drawCoordinates;
|
|
756
753
|
if (e.length === 0)
|
|
757
754
|
return;
|
|
758
|
-
let
|
|
755
|
+
let a = null;
|
|
759
756
|
switch (this.drawType) {
|
|
760
757
|
case "point":
|
|
761
|
-
|
|
758
|
+
a = {
|
|
762
759
|
type: "Point",
|
|
763
760
|
coordinates: e[0]
|
|
764
761
|
};
|
|
765
762
|
break;
|
|
766
763
|
case "line":
|
|
767
|
-
|
|
764
|
+
a = {
|
|
768
765
|
type: "LineString",
|
|
769
766
|
coordinates: e
|
|
770
767
|
};
|
|
771
768
|
break;
|
|
772
769
|
case "polygon":
|
|
773
|
-
|
|
770
|
+
a = {
|
|
774
771
|
type: "Polygon",
|
|
775
772
|
coordinates: [e]
|
|
776
773
|
};
|
|
777
774
|
break;
|
|
778
775
|
}
|
|
779
|
-
if (
|
|
776
|
+
if (a) {
|
|
780
777
|
this.drawFeatureCollection.features = [{
|
|
781
778
|
type: "Feature",
|
|
782
|
-
geometry:
|
|
779
|
+
geometry: a
|
|
783
780
|
}];
|
|
784
|
-
const
|
|
785
|
-
|
|
781
|
+
const n = this.map.getSource(this.drawSourceId);
|
|
782
|
+
n && n.setData(this.drawFeatureCollection);
|
|
786
783
|
}
|
|
787
784
|
}
|
|
788
785
|
// 完成绘制
|
|
@@ -819,7 +816,7 @@ class Ue {
|
|
|
819
816
|
break;
|
|
820
817
|
}
|
|
821
818
|
if (t && this.drawCallback) {
|
|
822
|
-
const e =
|
|
819
|
+
const e = ie.stringify(t);
|
|
823
820
|
this.drawCallback(this.drawType, t, e), this.map.getCanvas().style.cursor = "", this.drawType = "none", this.map.off("click", this.handleMapClick.bind(this)), this.map.off("mousemove", this.handleMapMouseMove.bind(this)), this.map.off("dblclick", this.handleMapDoubleClick.bind(this)), setTimeout(() => {
|
|
824
821
|
this.map.doubleClickZoom.enable();
|
|
825
822
|
}, 0);
|
|
@@ -830,57 +827,57 @@ class Ue {
|
|
|
830
827
|
this.stopDraw(), this.map.getSource(this.drawSourceId) && this.map.removeSource(this.drawSourceId);
|
|
831
828
|
}
|
|
832
829
|
}
|
|
833
|
-
var
|
|
830
|
+
var et = /* @__PURE__ */ Y({
|
|
834
831
|
name: "CircleClose",
|
|
835
832
|
__name: "circle-close",
|
|
836
|
-
setup(
|
|
837
|
-
return (t, e) => (
|
|
833
|
+
setup(l) {
|
|
834
|
+
return (t, e) => (p(), S("svg", {
|
|
838
835
|
xmlns: "http://www.w3.org/2000/svg",
|
|
839
836
|
viewBox: "0 0 1024 1024"
|
|
840
837
|
}, [
|
|
841
|
-
|
|
838
|
+
G("path", {
|
|
842
839
|
fill: "currentColor",
|
|
843
840
|
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
|
|
844
841
|
}),
|
|
845
|
-
|
|
842
|
+
G("path", {
|
|
846
843
|
fill: "currentColor",
|
|
847
844
|
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
848
845
|
})
|
|
849
846
|
]));
|
|
850
847
|
}
|
|
851
|
-
}),
|
|
848
|
+
}), tt = et, at = /* @__PURE__ */ Y({
|
|
852
849
|
name: "EditPen",
|
|
853
850
|
__name: "edit-pen",
|
|
854
|
-
setup(
|
|
855
|
-
return (t, e) => (
|
|
851
|
+
setup(l) {
|
|
852
|
+
return (t, e) => (p(), S("svg", {
|
|
856
853
|
xmlns: "http://www.w3.org/2000/svg",
|
|
857
854
|
viewBox: "0 0 1024 1024"
|
|
858
855
|
}, [
|
|
859
|
-
|
|
856
|
+
G("path", {
|
|
860
857
|
fill: "currentColor",
|
|
861
858
|
d: "m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"
|
|
862
859
|
})
|
|
863
860
|
]));
|
|
864
861
|
}
|
|
865
|
-
}),
|
|
862
|
+
}), rt = at, lt = /* @__PURE__ */ Y({
|
|
866
863
|
name: "MoreFilled",
|
|
867
864
|
__name: "more-filled",
|
|
868
|
-
setup(
|
|
869
|
-
return (t, e) => (
|
|
865
|
+
setup(l) {
|
|
866
|
+
return (t, e) => (p(), S("svg", {
|
|
870
867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
871
868
|
viewBox: "0 0 1024 1024"
|
|
872
869
|
}, [
|
|
873
|
-
|
|
870
|
+
G("path", {
|
|
874
871
|
fill: "currentColor",
|
|
875
872
|
d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
|
|
876
873
|
})
|
|
877
874
|
]));
|
|
878
875
|
}
|
|
879
|
-
}),
|
|
880
|
-
const
|
|
876
|
+
}), ot = lt;
|
|
877
|
+
const it = { class: "map-draw-container" }, nt = {
|
|
881
878
|
name: "FormItemMapDraw"
|
|
882
|
-
},
|
|
883
|
-
...
|
|
879
|
+
}, st = /* @__PURE__ */ Y({
|
|
880
|
+
...nt,
|
|
884
881
|
props: {
|
|
885
882
|
geomType: {
|
|
886
883
|
type: String,
|
|
@@ -888,54 +885,51 @@ const Ke = { class: "map-draw-container" }, qe = {
|
|
|
888
885
|
}
|
|
889
886
|
},
|
|
890
887
|
emits: ["draw-start", "draw-end", "draw-cancel"],
|
|
891
|
-
setup(
|
|
892
|
-
const e = t,
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
};
|
|
897
|
-
return (n, u) => {
|
|
898
|
-
const i = k("el-button");
|
|
899
|
-
return d(), P("div", Ke, [
|
|
900
|
-
r.geomType === "point" ? (d(), C(i, {
|
|
901
|
-
key: 0,
|
|
902
|
-
type: "primary",
|
|
903
|
-
size: "small",
|
|
904
|
-
circle: "",
|
|
905
|
-
onClick: u[0] || (u[0] = (s) => p("point")),
|
|
906
|
-
icon: _(l),
|
|
907
|
-
class: te({ active: o.value === "point" })
|
|
908
|
-
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
909
|
-
r.geomType === "linestring" ? (d(), C(i, {
|
|
910
|
-
key: 1,
|
|
911
|
-
type: "primary",
|
|
912
|
-
size: "small",
|
|
913
|
-
circle: "",
|
|
914
|
-
onClick: u[1] || (u[1] = (s) => p("line")),
|
|
915
|
-
icon: _(a),
|
|
916
|
-
class: te({ active: o.value === "line" })
|
|
917
|
-
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
918
|
-
r.geomType === "polygon" ? (d(), C(i, {
|
|
919
|
-
key: 2,
|
|
920
|
-
type: "primary",
|
|
921
|
-
size: "small",
|
|
922
|
-
circle: "",
|
|
923
|
-
onClick: u[2] || (u[2] = (s) => p("polygon")),
|
|
924
|
-
icon: _(g),
|
|
925
|
-
class: te({ active: o.value === "polygon" })
|
|
926
|
-
}, null, 8, ["icon", "class"])) : N("", !0)
|
|
927
|
-
]);
|
|
888
|
+
setup(l, { emit: t }) {
|
|
889
|
+
const e = t, a = V("none");
|
|
890
|
+
V(!1), V(null);
|
|
891
|
+
const n = tt, i = rt, g = ot, m = (o) => {
|
|
892
|
+
a.value = o, o === "none" ? e("draw-cancel") : e("draw-start", o);
|
|
928
893
|
};
|
|
894
|
+
return (o, d) => (p(), S("div", it, [
|
|
895
|
+
l.geomType === "point" ? (p(), C(u(I), {
|
|
896
|
+
key: 0,
|
|
897
|
+
type: "primary",
|
|
898
|
+
size: "small",
|
|
899
|
+
circle: "",
|
|
900
|
+
onClick: d[0] || (d[0] = (c) => m("point")),
|
|
901
|
+
icon: u(n),
|
|
902
|
+
class: ee({ active: a.value === "point" })
|
|
903
|
+
}, null, 8, ["icon", "class"])) : E("", !0),
|
|
904
|
+
l.geomType === "linestring" ? (p(), C(u(I), {
|
|
905
|
+
key: 1,
|
|
906
|
+
type: "primary",
|
|
907
|
+
size: "small",
|
|
908
|
+
circle: "",
|
|
909
|
+
onClick: d[1] || (d[1] = (c) => m("line")),
|
|
910
|
+
icon: u(i),
|
|
911
|
+
class: ee({ active: a.value === "line" })
|
|
912
|
+
}, null, 8, ["icon", "class"])) : E("", !0),
|
|
913
|
+
l.geomType === "polygon" ? (p(), C(u(I), {
|
|
914
|
+
key: 2,
|
|
915
|
+
type: "primary",
|
|
916
|
+
size: "small",
|
|
917
|
+
circle: "",
|
|
918
|
+
onClick: d[2] || (d[2] = (c) => m("polygon")),
|
|
919
|
+
icon: u(g),
|
|
920
|
+
class: ee({ active: a.value === "polygon" })
|
|
921
|
+
}, null, 8, ["icon", "class"])) : E("", !0)
|
|
922
|
+
]));
|
|
929
923
|
}
|
|
930
|
-
}),
|
|
931
|
-
const e =
|
|
932
|
-
for (const [
|
|
933
|
-
e[
|
|
924
|
+
}), _ = (l, t) => {
|
|
925
|
+
const e = l.__vccOpts || l;
|
|
926
|
+
for (const [a, n] of t)
|
|
927
|
+
e[a] = n;
|
|
934
928
|
return e;
|
|
935
|
-
},
|
|
929
|
+
}, ut = /* @__PURE__ */ _(st, [["__scopeId", "data-v-c4ff065e"]]), dt = { class: "curd-map" }, ct = {
|
|
936
930
|
name: "FormItemMap"
|
|
937
|
-
},
|
|
938
|
-
...
|
|
931
|
+
}, pt = /* @__PURE__ */ Y({
|
|
932
|
+
...ct,
|
|
939
933
|
props: {
|
|
940
934
|
modelValue: {
|
|
941
935
|
type: String || void 0,
|
|
@@ -955,10 +949,10 @@ const Ke = { class: "map-draw-container" }, qe = {
|
|
|
955
949
|
}
|
|
956
950
|
},
|
|
957
951
|
emits: ["update:modelValue"],
|
|
958
|
-
setup(
|
|
959
|
-
const e =
|
|
960
|
-
let
|
|
961
|
-
const g =
|
|
952
|
+
setup(l, { emit: t }) {
|
|
953
|
+
const e = l, a = V(e.modelValue);
|
|
954
|
+
let n, i;
|
|
955
|
+
const g = j({
|
|
962
956
|
mapViewData: {
|
|
963
957
|
zoom: e.mapViewData.zoom || 13,
|
|
964
958
|
center: e.mapViewData.center || [120.656774, 29.8],
|
|
@@ -989,53 +983,53 @@ const Ke = { class: "map-draw-container" }, qe = {
|
|
|
989
983
|
}
|
|
990
984
|
]
|
|
991
985
|
}
|
|
992
|
-
}),
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
}),
|
|
996
|
-
|
|
986
|
+
}), m = t;
|
|
987
|
+
q(a, (r) => {
|
|
988
|
+
m("update:modelValue", r);
|
|
989
|
+
}), q(() => e.modelValue, (r) => {
|
|
990
|
+
a.value = r;
|
|
997
991
|
});
|
|
998
|
-
const
|
|
999
|
-
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1004
|
-
|
|
992
|
+
const o = (r) => {
|
|
993
|
+
n = new Qe(r), i = new Xe(r);
|
|
994
|
+
const f = n.formatWktToGeoJson(a.value);
|
|
995
|
+
f && (n.setLayer(f.type), n.setData(f), n.flyTo());
|
|
996
|
+
}, d = (r) => {
|
|
997
|
+
i && i.startDraw(r, (f, D, L) => {
|
|
998
|
+
a.value = L;
|
|
1005
999
|
});
|
|
1006
|
-
},
|
|
1007
|
-
|
|
1000
|
+
}, c = () => {
|
|
1001
|
+
i && i.stopDraw();
|
|
1008
1002
|
};
|
|
1009
|
-
return
|
|
1010
|
-
|
|
1011
|
-
}), (
|
|
1012
|
-
b(
|
|
1003
|
+
return Ee(() => {
|
|
1004
|
+
i && (i.destroy(), i = void 0);
|
|
1005
|
+
}), (r, f) => (p(), S("div", dt, [
|
|
1006
|
+
b(u(Ge), {
|
|
1013
1007
|
options: g.mapViewData,
|
|
1014
|
-
onLoad:
|
|
1008
|
+
onLoad: o
|
|
1015
1009
|
}, {
|
|
1016
1010
|
"top-left": h(() => [
|
|
1017
|
-
|
|
1011
|
+
l.currentOperationType !== "details" ? (p(), C(ut, {
|
|
1018
1012
|
key: 0,
|
|
1019
|
-
onDrawStart:
|
|
1020
|
-
onDrawCancel:
|
|
1021
|
-
})) :
|
|
1013
|
+
onDrawStart: d,
|
|
1014
|
+
onDrawCancel: c
|
|
1015
|
+
})) : E("", !0)
|
|
1022
1016
|
]),
|
|
1023
1017
|
"bottom-right": h(() => [
|
|
1024
|
-
b(
|
|
1018
|
+
b(u(Ye), {
|
|
1025
1019
|
data: g.switchData
|
|
1026
1020
|
}, null, 8, ["data"])
|
|
1027
1021
|
]),
|
|
1028
1022
|
default: h(() => [
|
|
1029
|
-
|
|
1023
|
+
K(r.$slots, "default", {}, void 0, !0)
|
|
1030
1024
|
]),
|
|
1031
1025
|
_: 3
|
|
1032
1026
|
}, 8, ["options"])
|
|
1033
1027
|
]));
|
|
1034
1028
|
}
|
|
1035
|
-
}),
|
|
1029
|
+
}), mt = /* @__PURE__ */ _(pt, [["__scopeId", "data-v-e1f42b56"]]), ft = { class: "field-select-container" }, ht = {
|
|
1036
1030
|
name: "ExportButton"
|
|
1037
|
-
},
|
|
1038
|
-
...
|
|
1031
|
+
}, yt = /* @__PURE__ */ Y({
|
|
1032
|
+
...ht,
|
|
1039
1033
|
props: {
|
|
1040
1034
|
columns: {
|
|
1041
1035
|
type: Array,
|
|
@@ -1046,144 +1040,141 @@ const Ke = { class: "map-draw-container" }, qe = {
|
|
|
1046
1040
|
default: () => []
|
|
1047
1041
|
}
|
|
1048
1042
|
},
|
|
1049
|
-
setup(
|
|
1050
|
-
const t =
|
|
1043
|
+
setup(l) {
|
|
1044
|
+
const t = l, e = V(!1), a = j({
|
|
1051
1045
|
filename: "",
|
|
1052
1046
|
dataType: "current",
|
|
1053
1047
|
// current: 当前页数据, selected: 选择中数据
|
|
1054
1048
|
selectedFields: []
|
|
1055
1049
|
});
|
|
1056
1050
|
ne(() => {
|
|
1057
|
-
|
|
1051
|
+
a.selectedFields = t.columns.map((g) => g.columnProperty);
|
|
1058
1052
|
});
|
|
1059
|
-
const
|
|
1053
|
+
const n = () => {
|
|
1060
1054
|
let g = [...t.data];
|
|
1061
1055
|
if (g.length === 0) {
|
|
1062
|
-
|
|
1056
|
+
z.warning("没有数据可导出");
|
|
1063
1057
|
return;
|
|
1064
1058
|
}
|
|
1065
|
-
const
|
|
1066
|
-
const
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1069
|
-
}),
|
|
1070
|
-
}),
|
|
1071
|
-
|
|
1072
|
-
},
|
|
1059
|
+
const m = g.map((D) => {
|
|
1060
|
+
const L = {};
|
|
1061
|
+
return a.selectedFields.forEach(($) => {
|
|
1062
|
+
L[$] = D[$];
|
|
1063
|
+
}), L;
|
|
1064
|
+
}), o = a.filename || `导出数据_${(/* @__PURE__ */ new Date()).getTime()}`, d = i(m), c = new Blob([d], { type: "text/csv;charset=utf-8;" }), r = document.createElement("a"), f = URL.createObjectURL(c);
|
|
1065
|
+
r.setAttribute("href", f), r.setAttribute("download", `${o}.csv`), r.style.visibility = "hidden", document.body.appendChild(r), r.click(), document.body.removeChild(r), e.value = !1, z.success("导出成功");
|
|
1066
|
+
}, i = (g) => {
|
|
1073
1067
|
if (g.length === 0) return "";
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1076
|
-
for (const
|
|
1077
|
-
const
|
|
1078
|
-
const
|
|
1079
|
-
return typeof
|
|
1068
|
+
const m = Object.keys(g[0]) || [], o = [];
|
|
1069
|
+
o.push(m.join(","));
|
|
1070
|
+
for (const d of g) {
|
|
1071
|
+
const c = m.map((r) => {
|
|
1072
|
+
const f = d[r];
|
|
1073
|
+
return typeof f == "string" ? `"${f.replace(/"/g, '""')}"` : f;
|
|
1080
1074
|
});
|
|
1081
|
-
|
|
1075
|
+
o.push(c.join(","));
|
|
1082
1076
|
}
|
|
1083
|
-
return
|
|
1077
|
+
return o.join(`
|
|
1084
1078
|
`);
|
|
1085
1079
|
};
|
|
1086
|
-
return (g,
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
}, 8, ["modelValue"])
|
|
1180
|
-
]);
|
|
1181
|
-
};
|
|
1080
|
+
return (g, m) => (p(), S("div", null, [
|
|
1081
|
+
b(u(I), {
|
|
1082
|
+
type: "default",
|
|
1083
|
+
round: "",
|
|
1084
|
+
onClick: m[0] || (m[0] = (o) => e.value = !0)
|
|
1085
|
+
}, {
|
|
1086
|
+
default: h(() => [
|
|
1087
|
+
b(u(we), null, {
|
|
1088
|
+
default: h(() => [
|
|
1089
|
+
b(u(Ae))
|
|
1090
|
+
]),
|
|
1091
|
+
_: 1
|
|
1092
|
+
})
|
|
1093
|
+
]),
|
|
1094
|
+
_: 1
|
|
1095
|
+
}),
|
|
1096
|
+
b(u(be), {
|
|
1097
|
+
modelValue: e.value,
|
|
1098
|
+
"onUpdate:modelValue": m[4] || (m[4] = (o) => e.value = o),
|
|
1099
|
+
title: "导出数据",
|
|
1100
|
+
width: "400px",
|
|
1101
|
+
"close-on-click-modal": !1
|
|
1102
|
+
}, {
|
|
1103
|
+
footer: h(() => [
|
|
1104
|
+
b(u(I), {
|
|
1105
|
+
onClick: m[3] || (m[3] = (o) => e.value = !1)
|
|
1106
|
+
}, {
|
|
1107
|
+
default: h(() => [...m[5] || (m[5] = [
|
|
1108
|
+
U("取消", -1)
|
|
1109
|
+
])]),
|
|
1110
|
+
_: 1
|
|
1111
|
+
}),
|
|
1112
|
+
b(u(I), {
|
|
1113
|
+
type: "primary",
|
|
1114
|
+
onClick: n
|
|
1115
|
+
}, {
|
|
1116
|
+
default: h(() => [...m[6] || (m[6] = [
|
|
1117
|
+
U("导出", -1)
|
|
1118
|
+
])]),
|
|
1119
|
+
_: 1
|
|
1120
|
+
})
|
|
1121
|
+
]),
|
|
1122
|
+
default: h(() => [
|
|
1123
|
+
b(u(oe), {
|
|
1124
|
+
model: a,
|
|
1125
|
+
"label-width": "100px"
|
|
1126
|
+
}, {
|
|
1127
|
+
default: h(() => [
|
|
1128
|
+
b(u(Z), { label: "文件名称" }, {
|
|
1129
|
+
default: h(() => [
|
|
1130
|
+
b(u(te), {
|
|
1131
|
+
modelValue: a.filename,
|
|
1132
|
+
"onUpdate:modelValue": m[1] || (m[1] = (o) => a.filename = o),
|
|
1133
|
+
placeholder: "请输入文件名称"
|
|
1134
|
+
}, null, 8, ["modelValue"])
|
|
1135
|
+
]),
|
|
1136
|
+
_: 1
|
|
1137
|
+
}),
|
|
1138
|
+
b(u(Z), { label: "选择字段" }, {
|
|
1139
|
+
default: h(() => [
|
|
1140
|
+
G("div", ft, [
|
|
1141
|
+
b(u(ve), {
|
|
1142
|
+
modelValue: a.selectedFields,
|
|
1143
|
+
"onUpdate:modelValue": m[2] || (m[2] = (o) => a.selectedFields = o)
|
|
1144
|
+
}, {
|
|
1145
|
+
default: h(() => [
|
|
1146
|
+
(p(!0), S(B, null, J(l.columns, (o) => (p(), S("div", {
|
|
1147
|
+
key: o.columnProperty,
|
|
1148
|
+
class: "column-item"
|
|
1149
|
+
}, [
|
|
1150
|
+
b(u(se), {
|
|
1151
|
+
value: o.columnProperty
|
|
1152
|
+
}, {
|
|
1153
|
+
default: h(() => [
|
|
1154
|
+
U(re(o.columnLabel), 1)
|
|
1155
|
+
]),
|
|
1156
|
+
_: 2
|
|
1157
|
+
}, 1032, ["value"])
|
|
1158
|
+
]))), 128))
|
|
1159
|
+
]),
|
|
1160
|
+
_: 1
|
|
1161
|
+
}, 8, ["modelValue"])
|
|
1162
|
+
])
|
|
1163
|
+
]),
|
|
1164
|
+
_: 1
|
|
1165
|
+
})
|
|
1166
|
+
]),
|
|
1167
|
+
_: 1
|
|
1168
|
+
}, 8, ["model"])
|
|
1169
|
+
]),
|
|
1170
|
+
_: 1
|
|
1171
|
+
}, 8, ["modelValue"])
|
|
1172
|
+
]));
|
|
1182
1173
|
}
|
|
1183
|
-
}),
|
|
1174
|
+
}), gt = /* @__PURE__ */ _(yt, [["__scopeId", "data-v-aa567411"]]), vt = { class: "column-manager" }, wt = {
|
|
1184
1175
|
name: "ColumnManager"
|
|
1185
|
-
},
|
|
1186
|
-
...
|
|
1176
|
+
}, bt = /* @__PURE__ */ Y({
|
|
1177
|
+
...wt,
|
|
1187
1178
|
props: {
|
|
1188
1179
|
tableColumns: {
|
|
1189
1180
|
type: Array,
|
|
@@ -1197,68 +1188,65 @@ const Ke = { class: "map-draw-container" }, qe = {
|
|
|
1197
1188
|
}
|
|
1198
1189
|
},
|
|
1199
1190
|
emits: ["update:visibleColumns", "update:columns"],
|
|
1200
|
-
setup(
|
|
1201
|
-
const e =
|
|
1202
|
-
|
|
1191
|
+
setup(l, { emit: t }) {
|
|
1192
|
+
const e = l, a = t, n = V(!1), i = V([...e.visibleColumns]), g = (m, o) => {
|
|
1193
|
+
o ? i.value.push(m) : i.value = i.value.filter((d) => d !== m), a("update:visibleColumns", i.value);
|
|
1203
1194
|
};
|
|
1204
|
-
return
|
|
1195
|
+
return q(
|
|
1205
1196
|
() => e.visibleColumns,
|
|
1206
|
-
(
|
|
1207
|
-
|
|
1197
|
+
(m) => {
|
|
1198
|
+
i.value = [...m];
|
|
1208
1199
|
},
|
|
1209
1200
|
{ deep: !0 }
|
|
1210
|
-
), (
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
}, 8, ["visible"])
|
|
1257
|
-
]);
|
|
1258
|
-
};
|
|
1201
|
+
), (m, o) => (p(), S("div", null, [
|
|
1202
|
+
b(u(We), {
|
|
1203
|
+
visible: n.value,
|
|
1204
|
+
"onUpdate:visible": o[0] || (o[0] = (d) => n.value = d),
|
|
1205
|
+
placement: "bottom-end",
|
|
1206
|
+
width: 220,
|
|
1207
|
+
trigger: "click",
|
|
1208
|
+
"popper-class": "column-manager-popover"
|
|
1209
|
+
}, {
|
|
1210
|
+
reference: h(() => [
|
|
1211
|
+
b(u(I), {
|
|
1212
|
+
type: "default",
|
|
1213
|
+
round: ""
|
|
1214
|
+
}, {
|
|
1215
|
+
default: h(() => [
|
|
1216
|
+
b(u(we), null, {
|
|
1217
|
+
default: h(() => [
|
|
1218
|
+
b(u(Ue))
|
|
1219
|
+
]),
|
|
1220
|
+
_: 1
|
|
1221
|
+
})
|
|
1222
|
+
]),
|
|
1223
|
+
_: 1
|
|
1224
|
+
})
|
|
1225
|
+
]),
|
|
1226
|
+
default: h(() => [
|
|
1227
|
+
G("div", vt, [
|
|
1228
|
+
(p(!0), S(B, null, J(l.tableColumns, (d) => (p(), S("div", {
|
|
1229
|
+
class: "column-item",
|
|
1230
|
+
key: d.columnProperty
|
|
1231
|
+
}, [
|
|
1232
|
+
b(u(se), {
|
|
1233
|
+
modelValue: i.value.includes(d.columnProperty),
|
|
1234
|
+
onChange: (c) => g(d.columnProperty, c)
|
|
1235
|
+
}, {
|
|
1236
|
+
default: h(() => [
|
|
1237
|
+
U(re(d.columnLabel || d.columnProperty), 1)
|
|
1238
|
+
]),
|
|
1239
|
+
_: 2
|
|
1240
|
+
}, 1032, ["modelValue", "onChange"])
|
|
1241
|
+
]))), 128))
|
|
1242
|
+
])
|
|
1243
|
+
]),
|
|
1244
|
+
_: 1
|
|
1245
|
+
}, 8, ["visible"])
|
|
1246
|
+
]));
|
|
1259
1247
|
}
|
|
1260
|
-
}),
|
|
1261
|
-
class
|
|
1248
|
+
}), Ct = /* @__PURE__ */ _(bt, [["__scopeId", "data-v-bb3ec273"]]);
|
|
1249
|
+
class kt {
|
|
1262
1250
|
serverConfig;
|
|
1263
1251
|
curdConfig = {};
|
|
1264
1252
|
searchConfig = {};
|
|
@@ -1271,19 +1259,19 @@ class ct {
|
|
|
1271
1259
|
constructor({ serverConfig: t }) {
|
|
1272
1260
|
this.serverConfig = t;
|
|
1273
1261
|
}
|
|
1274
|
-
setConfig({ curdConfig: t, searchConfig: e, tableConfig:
|
|
1275
|
-
this.curdConfig = t || this.curdConfig, this.searchConfig = e || this.searchConfig, this.tableConfig =
|
|
1262
|
+
setConfig({ curdConfig: t, searchConfig: e, tableConfig: a, editorConfig: n }) {
|
|
1263
|
+
this.curdConfig = t || this.curdConfig, this.searchConfig = e || this.searchConfig, this.tableConfig = a || this.tableConfig, this.editorConfig = n || this.editorConfig;
|
|
1276
1264
|
}
|
|
1277
1265
|
//加载字典数据,确保全部加载完成后返回结果
|
|
1278
1266
|
async loadDictionary() {
|
|
1279
1267
|
if (!this.tableConfig?.columns)
|
|
1280
1268
|
return this.dictionaryMap;
|
|
1281
1269
|
const t = this.tableConfig.columns.filter((e) => ["code", "table"].includes(e.dictType || "") && e.dictService).map((e) => {
|
|
1282
|
-
let
|
|
1283
|
-
return
|
|
1284
|
-
|
|
1285
|
-
}).catch((
|
|
1286
|
-
console.error(`加载字典 ${e.dictService} 失败:`,
|
|
1270
|
+
let a = e.fieldType || "String";
|
|
1271
|
+
return a === "integer" && (a = "Integer"), (e.dictType === "code" ? this.serverConfig?.dict({ dictCode: e.dictService, itemIdType: a }) : this.serverConfig?.dictServer(e.dictService, {})).then((i) => {
|
|
1272
|
+
i && e.dictService && this.dictionaryMap.set(e.dictService, i || []);
|
|
1273
|
+
}).catch((i) => {
|
|
1274
|
+
console.error(`加载字典 ${e.dictService} 失败:`, i);
|
|
1287
1275
|
});
|
|
1288
1276
|
});
|
|
1289
1277
|
return await Promise.all(t), this.dictionaryMap;
|
|
@@ -1296,7 +1284,7 @@ class ct {
|
|
|
1296
1284
|
getDictOptionsByColumnProperty(t) {
|
|
1297
1285
|
if (!t)
|
|
1298
1286
|
return [];
|
|
1299
|
-
const e = this.tableConfig?.columns?.find((
|
|
1287
|
+
const e = this.tableConfig?.columns?.find((a) => a.columnProperty === t)?.dictService;
|
|
1300
1288
|
return this.getDictOptionsByCode(e || void 0);
|
|
1301
1289
|
}
|
|
1302
1290
|
//格式化
|
|
@@ -1304,19 +1292,19 @@ class ct {
|
|
|
1304
1292
|
if (!e || e === "")
|
|
1305
1293
|
return e;
|
|
1306
1294
|
if (t.dictType && t.dictService) {
|
|
1307
|
-
const
|
|
1308
|
-
if (!
|
|
1295
|
+
const a = this.dictionaryMap.get(t.dictService) || [];
|
|
1296
|
+
if (!a || a.length === 0)
|
|
1309
1297
|
return e;
|
|
1310
|
-
const
|
|
1311
|
-
return
|
|
1298
|
+
const n = a.find((i) => i.id === e);
|
|
1299
|
+
return n ? n.name : e;
|
|
1312
1300
|
}
|
|
1313
1301
|
if (!t.formatter || t.formatter === "")
|
|
1314
1302
|
return e;
|
|
1315
1303
|
switch (t.fieldType) {
|
|
1316
1304
|
case "date":
|
|
1317
|
-
return e ?
|
|
1305
|
+
return e ? ae(e).format(t.formatter || "YYYY-MM-DD") : "";
|
|
1318
1306
|
case "datetime":
|
|
1319
|
-
return e ?
|
|
1307
|
+
return e ? ae(e).format(t.formatter || "YYYY-MM-DD HH:mm:ss") : "";
|
|
1320
1308
|
default:
|
|
1321
1309
|
return e;
|
|
1322
1310
|
}
|
|
@@ -1339,29 +1327,29 @@ class ct {
|
|
|
1339
1327
|
}
|
|
1340
1328
|
formatFormConfigData() {
|
|
1341
1329
|
const t = {};
|
|
1342
|
-
return (this.editorConfig?.columns || []).filter((
|
|
1343
|
-
t[
|
|
1330
|
+
return (this.editorConfig?.columns || []).filter((a) => a.columnProperty === this.curdConfig?.priKey ? !0 : a.type !== "hidden").forEach((a) => {
|
|
1331
|
+
t[a.columnProperty] = a.defaultValue;
|
|
1344
1332
|
}), this.cloneFormData = JSON.stringify(t), t;
|
|
1345
1333
|
}
|
|
1346
1334
|
//拼接查询条件
|
|
1347
1335
|
formatSearchForm(t) {
|
|
1348
1336
|
const e = {};
|
|
1349
|
-
return this.searchFormMap.forEach((
|
|
1350
|
-
const
|
|
1351
|
-
if (
|
|
1337
|
+
return this.searchFormMap.forEach((a, n) => {
|
|
1338
|
+
const i = t[n];
|
|
1339
|
+
if (i != null && i !== "") {
|
|
1352
1340
|
let g = "";
|
|
1353
|
-
switch (
|
|
1341
|
+
switch (a.searchable) {
|
|
1354
1342
|
case "=":
|
|
1355
|
-
g = `= '${
|
|
1343
|
+
g = `= '${i}'`;
|
|
1356
1344
|
break;
|
|
1357
1345
|
case "like":
|
|
1358
|
-
g = `like '%${
|
|
1346
|
+
g = `like '%${i}%'`;
|
|
1359
1347
|
break;
|
|
1360
1348
|
case "in":
|
|
1361
|
-
g = `in (${
|
|
1349
|
+
g = `in (${i})`;
|
|
1362
1350
|
break;
|
|
1363
1351
|
}
|
|
1364
|
-
e[
|
|
1352
|
+
e[n] = g;
|
|
1365
1353
|
}
|
|
1366
1354
|
}), e;
|
|
1367
1355
|
}
|
|
@@ -1370,8 +1358,8 @@ class ct {
|
|
|
1370
1358
|
if (!t || Object.keys(t).length === 0)
|
|
1371
1359
|
return {};
|
|
1372
1360
|
let e = {};
|
|
1373
|
-
return (this.tableConfig?.columns || []).forEach((
|
|
1374
|
-
|
|
1361
|
+
return (this.tableConfig?.columns || []).forEach((a) => {
|
|
1362
|
+
a?.fieldType === "integer" ? e[a.columnProperty] = Number(t[a.columnProperty]) : e[a.columnProperty] = t[a.columnProperty];
|
|
1375
1363
|
}), t.wktstr && (e.wktstr = t.wktstr), e;
|
|
1376
1364
|
}
|
|
1377
1365
|
//可见列
|
|
@@ -1383,13 +1371,13 @@ class ct {
|
|
|
1383
1371
|
let e = [];
|
|
1384
1372
|
switch (t) {
|
|
1385
1373
|
case "details":
|
|
1386
|
-
e = (this.editorConfig?.columns || []).filter((
|
|
1374
|
+
e = (this.editorConfig?.columns || []).filter((a) => a.type !== "hidden" && a.updateFormStatus !== "hidden" && a.type !== "shape");
|
|
1387
1375
|
break;
|
|
1388
1376
|
case "add":
|
|
1389
|
-
e = (this.editorConfig?.columns || []).filter((
|
|
1377
|
+
e = (this.editorConfig?.columns || []).filter((a) => a.type !== "hidden" && a.createFormStatus !== "hidden" && a.type !== "shape");
|
|
1390
1378
|
break;
|
|
1391
1379
|
case "update":
|
|
1392
|
-
e = (this.editorConfig?.columns || []).filter((
|
|
1380
|
+
e = (this.editorConfig?.columns || []).filter((a) => a.type !== "hidden" && a.updateFormStatus !== "hidden" && a.type !== "shape");
|
|
1393
1381
|
break;
|
|
1394
1382
|
}
|
|
1395
1383
|
return e;
|
|
@@ -1399,16 +1387,16 @@ class ct {
|
|
|
1399
1387
|
return (this.editorConfig?.columns || []).find((e) => e.type === "shape") || void 0;
|
|
1400
1388
|
}
|
|
1401
1389
|
}
|
|
1402
|
-
const
|
|
1390
|
+
const St = { class: "curd-container" }, Ft = { class: "curd-search" }, Vt = {
|
|
1403
1391
|
key: 0,
|
|
1404
1392
|
class: "table-actions"
|
|
1405
|
-
},
|
|
1393
|
+
}, Dt = { class: "table-actions-left" }, Pt = { class: "table-actions-right" }, Lt = { class: "curd-table" }, Tt = {
|
|
1406
1394
|
key: 1,
|
|
1407
1395
|
class: "curd-pagination"
|
|
1408
|
-
},
|
|
1396
|
+
}, Mt = {
|
|
1409
1397
|
name: "CurdForm"
|
|
1410
|
-
},
|
|
1411
|
-
...
|
|
1398
|
+
}, Ot = /* @__PURE__ */ Y({
|
|
1399
|
+
...Mt,
|
|
1412
1400
|
props: {
|
|
1413
1401
|
size: {
|
|
1414
1402
|
type: String,
|
|
@@ -1449,8 +1437,8 @@ const dt = { class: "curd-container" }, pt = { class: "curd-search" }, mt = {
|
|
|
1449
1437
|
}
|
|
1450
1438
|
},
|
|
1451
1439
|
emits: ["loadDataSuccess"],
|
|
1452
|
-
setup(
|
|
1453
|
-
const
|
|
1440
|
+
setup(l, { expose: t, emit: e }) {
|
|
1441
|
+
const a = l, n = V(!1), i = V(null), g = e, m = V(), o = new kt({ serverConfig: a.serverConfig }), d = V(""), c = V("details"), r = j({
|
|
1454
1442
|
priKey: "id",
|
|
1455
1443
|
priKeyType: "string",
|
|
1456
1444
|
sortField: "id",
|
|
@@ -1458,7 +1446,7 @@ const dt = { class: "curd-container" }, pt = { class: "curd-search" }, mt = {
|
|
|
1458
1446
|
geomType: "point",
|
|
1459
1447
|
webFunction: [],
|
|
1460
1448
|
dataExt: "{}"
|
|
1461
|
-
}),
|
|
1449
|
+
}), f = j({
|
|
1462
1450
|
showIndex: !0,
|
|
1463
1451
|
indexWidth: 50,
|
|
1464
1452
|
showCheckbox: !0,
|
|
@@ -1473,118 +1461,118 @@ const dt = { class: "curd-container" }, pt = { class: "curd-search" }, mt = {
|
|
|
1473
1461
|
pageUISize: "default",
|
|
1474
1462
|
showExpand: !1,
|
|
1475
1463
|
columns: []
|
|
1476
|
-
}),
|
|
1464
|
+
}), D = j({
|
|
1477
1465
|
total: 0,
|
|
1478
|
-
pageSize:
|
|
1466
|
+
pageSize: f.defaultPageSize,
|
|
1479
1467
|
currentPage: 1
|
|
1480
|
-
}),
|
|
1468
|
+
}), L = j({
|
|
1481
1469
|
title: "弹框表单",
|
|
1482
1470
|
formDialogWidth: "800px",
|
|
1483
1471
|
labelWidth: "120px"
|
|
1484
|
-
}),
|
|
1472
|
+
}), $ = j({
|
|
1485
1473
|
columns: [],
|
|
1486
1474
|
formColumns: []
|
|
1487
|
-
}),
|
|
1475
|
+
}), R = j({
|
|
1488
1476
|
searchLabelWidth: "80",
|
|
1489
1477
|
searchFormWidth: "290",
|
|
1490
1478
|
columns: []
|
|
1491
|
-
}),
|
|
1479
|
+
}), O = V({}), N = V(!1), P = V([]), F = j({
|
|
1492
1480
|
data: {}
|
|
1493
|
-
}),
|
|
1494
|
-
if (
|
|
1481
|
+
}), A = V({}), v = V(!1), k = V(!1), T = V(), W = V([]), x = async () => {
|
|
1482
|
+
if (a.serverConfig?.list)
|
|
1495
1483
|
try {
|
|
1496
|
-
|
|
1497
|
-
const w = await
|
|
1498
|
-
whereClause:
|
|
1484
|
+
n.value = !0;
|
|
1485
|
+
const w = await a.serverConfig?.list({
|
|
1486
|
+
whereClause: o.formatSearchForm(O.value),
|
|
1499
1487
|
orderParam: [
|
|
1500
1488
|
{
|
|
1501
|
-
fieldName:
|
|
1502
|
-
asc:
|
|
1489
|
+
fieldName: r.sortField,
|
|
1490
|
+
asc: r.sortOrder === 0
|
|
1503
1491
|
}
|
|
1504
1492
|
],
|
|
1505
1493
|
pageParam: {
|
|
1506
|
-
pageNum:
|
|
1507
|
-
pageSize:
|
|
1494
|
+
pageNum: D.currentPage,
|
|
1495
|
+
pageSize: D.pageSize
|
|
1508
1496
|
}
|
|
1509
1497
|
});
|
|
1510
1498
|
if (w) {
|
|
1511
1499
|
const y = w.data;
|
|
1512
|
-
|
|
1500
|
+
P.value = y.dataList || [], D.total = y.totalCount, g("loadDataSuccess", P.value);
|
|
1513
1501
|
}
|
|
1514
1502
|
} catch {
|
|
1515
1503
|
} finally {
|
|
1516
|
-
|
|
1504
|
+
n.value = !1;
|
|
1517
1505
|
}
|
|
1518
|
-
},
|
|
1519
|
-
|
|
1520
|
-
},
|
|
1521
|
-
|
|
1522
|
-
},
|
|
1523
|
-
if (
|
|
1524
|
-
const w =
|
|
1506
|
+
}, ke = () => {
|
|
1507
|
+
O.value = JSON.parse(o.cloneSearchForm), x();
|
|
1508
|
+
}, Se = async () => {
|
|
1509
|
+
a.serverConfig?.add && (c.value = "add", $.formColumns = o.getFormItems("add"), L.title = "新增信息", N.value = !0, F.data = JSON.parse(o.cloneFormData));
|
|
1510
|
+
}, Fe = async () => {
|
|
1511
|
+
if (a.serverConfig?.deleteBatch && i?.value) {
|
|
1512
|
+
const w = i.value.getSelectionRows();
|
|
1525
1513
|
if (w.length === 0) {
|
|
1526
|
-
|
|
1514
|
+
z.warning("请选择要删除的项");
|
|
1527
1515
|
return;
|
|
1528
1516
|
}
|
|
1529
|
-
const y = w.map((
|
|
1530
|
-
y.length > 0 &&
|
|
1517
|
+
const y = w.map((s) => s[r.priKey || "id"]);
|
|
1518
|
+
y.length > 0 && fe.confirm("确定删除选中项吗?", "提示", {
|
|
1531
1519
|
confirmButtonText: "确定",
|
|
1532
1520
|
cancelButtonText: "取消",
|
|
1533
1521
|
type: "warning"
|
|
1534
1522
|
}).then(async () => {
|
|
1535
|
-
await
|
|
1523
|
+
await a.serverConfig?.deleteBatch?.(y.join(",")) ? z.success("删除成功") : z.error("删除失败"), x();
|
|
1536
1524
|
});
|
|
1537
1525
|
}
|
|
1538
|
-
},
|
|
1539
|
-
|
|
1540
|
-
},
|
|
1541
|
-
|
|
1542
|
-
},
|
|
1543
|
-
if (
|
|
1544
|
-
|
|
1526
|
+
}, Ve = (w) => {
|
|
1527
|
+
D.pageSize = Number(w), x();
|
|
1528
|
+
}, De = (w) => {
|
|
1529
|
+
D.currentPage = w, x();
|
|
1530
|
+
}, Pe = async (w) => {
|
|
1531
|
+
if (a.serverConfig?.view) {
|
|
1532
|
+
c.value = "details", $.formColumns = o.getFormItems("details"), L.title = "查看详情";
|
|
1545
1533
|
try {
|
|
1546
|
-
const y = w[
|
|
1534
|
+
const y = w[r.priKey || "id"];
|
|
1547
1535
|
if (!y) {
|
|
1548
|
-
|
|
1536
|
+
z.error("查看失败,未获取到主键值");
|
|
1549
1537
|
return;
|
|
1550
1538
|
}
|
|
1551
|
-
const
|
|
1539
|
+
const s = await a.serverConfig?.view?.({
|
|
1552
1540
|
key: y
|
|
1553
1541
|
});
|
|
1554
|
-
|
|
1542
|
+
s.success && s.data ? (F.data = { ...s.data }, N.value = !0) : z.error("查询失败");
|
|
1555
1543
|
} catch {
|
|
1556
|
-
|
|
1544
|
+
z.error("查询失败");
|
|
1557
1545
|
}
|
|
1558
1546
|
}
|
|
1559
|
-
},
|
|
1560
|
-
|
|
1561
|
-
},
|
|
1562
|
-
|
|
1547
|
+
}, Le = async (w) => {
|
|
1548
|
+
a.serverConfig?.update && (c.value = "update", $.formColumns = o.getFormItems("update"), L.title = "编辑信息", N.value = !0, F.data = { ...w });
|
|
1549
|
+
}, Te = (w) => {
|
|
1550
|
+
a.serverConfig?.delete && fe.confirm("确定删除选中项吗?", "提示", {
|
|
1563
1551
|
confirmButtonText: "确定",
|
|
1564
1552
|
cancelButtonText: "取消",
|
|
1565
1553
|
type: "warning"
|
|
1566
1554
|
}).then(async () => {
|
|
1567
|
-
const y = w[
|
|
1555
|
+
const y = w[r.priKey || "id"];
|
|
1568
1556
|
if (!y) {
|
|
1569
|
-
|
|
1557
|
+
z.error("删除失败,未获取到主键值");
|
|
1570
1558
|
return;
|
|
1571
1559
|
}
|
|
1572
|
-
await
|
|
1560
|
+
await a.serverConfig?.delete?.(y) ? (z.success("删除成功"), x()) : z.error("删除失败");
|
|
1573
1561
|
});
|
|
1574
|
-
},
|
|
1575
|
-
v.value = !0,
|
|
1562
|
+
}, Me = () => {
|
|
1563
|
+
v.value = !0, m.value?.validate(async (w, y) => {
|
|
1576
1564
|
if (w) {
|
|
1577
|
-
let
|
|
1578
|
-
if (
|
|
1565
|
+
let s = c.value === "add" ? a.serverConfig?.add : a.serverConfig?.update;
|
|
1566
|
+
if (s)
|
|
1579
1567
|
try {
|
|
1580
|
-
const
|
|
1568
|
+
const M = await s({
|
|
1581
1569
|
params: {
|
|
1582
|
-
...
|
|
1570
|
+
...o.formatFormData(F.data)
|
|
1583
1571
|
}
|
|
1584
1572
|
});
|
|
1585
|
-
|
|
1586
|
-
} catch (
|
|
1587
|
-
|
|
1573
|
+
M.success ? (z.success(c.value === "add" ? "新增成功" : "编辑成功"), N.value = !1, x()) : z.error("保存失败" + M.msg);
|
|
1574
|
+
} catch (M) {
|
|
1575
|
+
z.error("保存失败" + M.message);
|
|
1588
1576
|
} finally {
|
|
1589
1577
|
v.value = !1;
|
|
1590
1578
|
}
|
|
@@ -1593,390 +1581,387 @@ const dt = { class: "curd-container" }, pt = { class: "curd-search" }, mt = {
|
|
|
1593
1581
|
});
|
|
1594
1582
|
};
|
|
1595
1583
|
ne(async () => {
|
|
1596
|
-
if (
|
|
1597
|
-
const w = await
|
|
1584
|
+
if (a.serverConfig?.init) {
|
|
1585
|
+
const w = await a.serverConfig.init();
|
|
1598
1586
|
if (w.success && w.data) {
|
|
1599
|
-
const y = w.data || {},
|
|
1600
|
-
Object.assign(
|
|
1601
|
-
|
|
1602
|
-
}, 500),
|
|
1603
|
-
|
|
1587
|
+
const y = w.data || {}, s = y.dataExt ? JSON.parse(y.dataExt) : {};
|
|
1588
|
+
Object.assign(r, y || {}), Object.assign(f, s?.tableConfig || {}), Object.assign(L, s?.dialogConfig || {}), Object.assign($?.columns || [], s?.editorConfig || {}), D.pageSize = f.defaultPageSize || D.pageSize, f.visibleOperationButtons = (f.operationButtons || []).map((M) => M.type), console.log("curdConfig", r), console.log("tableConfig", f), console.log("dialogConfig", L), console.log("editorConfig", $), R.searchFormWidth = f.searchFormWidth && f.searchFormWidth !== "" ? f.searchFormWidth : R.searchFormWidth, R.searchLabelWidth = f.searchLabelWidth && f.searchLabelWidth !== "" ? f.searchLabelWidth : R.searchLabelWidth, o.setConfig({ curdConfig: r, searchConfig: R, tableConfig: f, editorConfig: $ }), W.value = o.initVisibleColumns(), O.value = o.formatSearchConfigForm(), F.data = o.formatFormConfigData(), A.value = o.formatFormRules(), T.value = o.hasGeometryField(), await o.loadDictionary(), setTimeout(() => {
|
|
1589
|
+
x();
|
|
1590
|
+
}, 500), de(() => {
|
|
1591
|
+
d.value = "100%";
|
|
1604
1592
|
});
|
|
1605
1593
|
} else
|
|
1606
|
-
|
|
1594
|
+
z.error("未查询到有效配置");
|
|
1607
1595
|
} else
|
|
1608
|
-
|
|
1609
|
-
}),
|
|
1610
|
-
w ?
|
|
1611
|
-
|
|
1612
|
-
}) :
|
|
1596
|
+
z.error("请配置init方法");
|
|
1597
|
+
}), q(N, (w) => {
|
|
1598
|
+
w ? de(() => {
|
|
1599
|
+
k.value = !0;
|
|
1600
|
+
}) : k.value = !1;
|
|
1613
1601
|
});
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1602
|
+
const Oe = (w) => {
|
|
1603
|
+
P.value = w;
|
|
1604
|
+
}, ze = (w) => {
|
|
1605
|
+
f.columns = w;
|
|
1618
1606
|
};
|
|
1619
1607
|
return t({
|
|
1620
1608
|
// 设置表单数据
|
|
1621
|
-
setTableData:
|
|
1622
|
-
getTableData: () =>
|
|
1623
|
-
}), (w, y) =>
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
label: m.searchFormLabel || m.columnLabel,
|
|
1637
|
-
style: Le(`width: ${I.searchFormWidth}px;`)
|
|
1638
|
-
}, {
|
|
1639
|
-
default: h(() => [
|
|
1640
|
-
m.showMethod === "slot" ? q(w.$slots, "search-" + m.columnProperty, {
|
|
1641
|
-
key: 0,
|
|
1642
|
-
scope: { ...w.scope, searchForm: S.value, data: S.value[m.columnProperty] }
|
|
1643
|
-
}, void 0, !0) : (d(), C(ce, {
|
|
1644
|
-
key: 1,
|
|
1645
|
-
modelValue: S.value[m.columnProperty],
|
|
1646
|
-
"onUpdate:modelValue": (G) => S.value[m.columnProperty] = G,
|
|
1647
|
-
item: m,
|
|
1648
|
-
dropdownOptions: _(n).getDictOptionsByCode(m.dictService)
|
|
1649
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "item", "dropdownOptions"]))
|
|
1650
|
-
]),
|
|
1651
|
-
_: 2
|
|
1652
|
-
}, 1032, ["label", "style"]))), 128)),
|
|
1653
|
-
b(z, { style: { "margin-left": "10px" } }, {
|
|
1654
|
-
default: h(() => [
|
|
1655
|
-
b($, {
|
|
1656
|
-
type: "primary",
|
|
1657
|
-
size: r.size,
|
|
1658
|
-
icon: "Search",
|
|
1659
|
-
onClick: A
|
|
1660
|
-
}, {
|
|
1661
|
-
default: h(() => [...y[6] || (y[6] = [
|
|
1662
|
-
B("查询", -1)
|
|
1663
|
-
])]),
|
|
1664
|
-
_: 1
|
|
1665
|
-
}, 8, ["size"]),
|
|
1666
|
-
b($, {
|
|
1667
|
-
type: "default",
|
|
1668
|
-
size: r.size,
|
|
1669
|
-
icon: "Refresh",
|
|
1670
|
-
onClick: fe
|
|
1671
|
-
}, {
|
|
1672
|
-
default: h(() => [...y[7] || (y[7] = [
|
|
1673
|
-
B("重置", -1)
|
|
1674
|
-
])]),
|
|
1675
|
-
_: 1
|
|
1676
|
-
}, 8, ["size"])
|
|
1677
|
-
]),
|
|
1678
|
-
_: 1
|
|
1679
|
-
})
|
|
1680
|
-
]),
|
|
1681
|
-
_: 3
|
|
1682
|
-
}, 8, ["label-width"])
|
|
1683
|
-
]),
|
|
1684
|
-
s.webFunction.length > 0 ? (d(), P("div", mt, [
|
|
1685
|
-
Y("div", ft, [
|
|
1686
|
-
r.permissions.add && s.webFunction.includes("add") ? (d(), C($, {
|
|
1687
|
-
key: 0,
|
|
1688
|
-
type: "primary",
|
|
1689
|
-
size: r.size,
|
|
1690
|
-
icon: "CirclePlus",
|
|
1691
|
-
onClick: he
|
|
1609
|
+
setTableData: Oe,
|
|
1610
|
+
getTableData: () => P.value
|
|
1611
|
+
}), (w, y) => (p(), S(B, null, [
|
|
1612
|
+
G("div", St, [
|
|
1613
|
+
G("div", Ft, [
|
|
1614
|
+
b(u(oe), {
|
|
1615
|
+
inline: !0,
|
|
1616
|
+
class: "form-inline",
|
|
1617
|
+
"label-width": R.searchLabelWidth
|
|
1618
|
+
}, {
|
|
1619
|
+
default: h(() => [
|
|
1620
|
+
(p(!0), S(B, null, J(R.columns, (s) => (p(), C(u(Z), {
|
|
1621
|
+
key: s.columnProperty,
|
|
1622
|
+
label: s.searchFormLabel || s.columnLabel,
|
|
1623
|
+
style: Ie(`width: ${R.searchFormWidth}px;`)
|
|
1692
1624
|
}, {
|
|
1693
|
-
default: h(() => [
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1625
|
+
default: h(() => [
|
|
1626
|
+
s.showMethod === "slot" ? K(w.$slots, "search-" + s.columnProperty, {
|
|
1627
|
+
key: 0,
|
|
1628
|
+
scope: { ...w.scope, searchForm: O.value, data: O.value[s.columnProperty] }
|
|
1629
|
+
}, void 0, !0) : (p(), C(he, {
|
|
1630
|
+
key: 1,
|
|
1631
|
+
modelValue: O.value[s.columnProperty],
|
|
1632
|
+
"onUpdate:modelValue": (M) => O.value[s.columnProperty] = M,
|
|
1633
|
+
item: s,
|
|
1634
|
+
dropdownOptions: u(o).getDictOptionsByCode(s.dictService)
|
|
1635
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "item", "dropdownOptions"]))
|
|
1636
|
+
]),
|
|
1637
|
+
_: 2
|
|
1638
|
+
}, 1032, ["label", "style"]))), 128)),
|
|
1639
|
+
b(u(Z), { style: { "margin-left": "10px" } }, {
|
|
1640
|
+
default: h(() => [
|
|
1641
|
+
b(u(I), {
|
|
1642
|
+
type: "primary",
|
|
1643
|
+
size: l.size,
|
|
1644
|
+
icon: "Search",
|
|
1645
|
+
onClick: x
|
|
1646
|
+
}, {
|
|
1647
|
+
default: h(() => [...y[6] || (y[6] = [
|
|
1648
|
+
U("查询", -1)
|
|
1649
|
+
])]),
|
|
1650
|
+
_: 1
|
|
1651
|
+
}, 8, ["size"]),
|
|
1652
|
+
b(u(I), {
|
|
1653
|
+
type: "default",
|
|
1654
|
+
size: l.size,
|
|
1655
|
+
icon: "Refresh",
|
|
1656
|
+
onClick: ke
|
|
1657
|
+
}, {
|
|
1658
|
+
default: h(() => [...y[7] || (y[7] = [
|
|
1659
|
+
U("重置", -1)
|
|
1660
|
+
])]),
|
|
1661
|
+
_: 1
|
|
1662
|
+
}, 8, ["size"])
|
|
1663
|
+
]),
|
|
1708
1664
|
_: 1
|
|
1709
|
-
}
|
|
1710
|
-
q(w.$slots, "table-actions", {}, void 0, !0)
|
|
1665
|
+
})
|
|
1711
1666
|
]),
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
}, null, 8, ["table-columns", "visible-columns"])
|
|
1724
|
-
])
|
|
1725
|
-
])) : N("", !0),
|
|
1726
|
-
Y("div", yt, [
|
|
1727
|
-
b(Ve, {
|
|
1728
|
-
ref_key: "tableRef",
|
|
1729
|
-
ref: a,
|
|
1730
|
-
data: f.value,
|
|
1731
|
-
border: "",
|
|
1732
|
-
stripe: "",
|
|
1733
|
-
size: r.size,
|
|
1734
|
-
height: u.value,
|
|
1735
|
-
"header-cell-style": { background: "#F5F7FA" }
|
|
1667
|
+
_: 3
|
|
1668
|
+
}, 8, ["label-width"])
|
|
1669
|
+
]),
|
|
1670
|
+
r.webFunction.length > 0 ? (p(), S("div", Vt, [
|
|
1671
|
+
G("div", Dt, [
|
|
1672
|
+
l.permissions.add && r.webFunction.includes("add") ? (p(), C(u(I), {
|
|
1673
|
+
key: 0,
|
|
1674
|
+
type: "primary",
|
|
1675
|
+
size: l.size,
|
|
1676
|
+
icon: "CirclePlus",
|
|
1677
|
+
onClick: Se
|
|
1736
1678
|
}, {
|
|
1737
|
-
default: h(() => [
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
key: 0,
|
|
1756
|
-
label: m.columnLabel,
|
|
1757
|
-
width: (m.width || "") + "px",
|
|
1758
|
-
fixed: m.fixed,
|
|
1759
|
-
"show-overflow-tooltip": !m.noWrap,
|
|
1760
|
-
align: m.align,
|
|
1761
|
-
"header-align": m.headerAlign
|
|
1762
|
-
}, {
|
|
1763
|
-
default: h((G) => [
|
|
1764
|
-
w.$slots["table-column-" + m.columnProperty] ? q(w.$slots, "table-column-" + m.columnProperty, {
|
|
1765
|
-
key: 0,
|
|
1766
|
-
scope: G
|
|
1767
|
-
}, void 0, !0) : (d(), P(R, { key: 1 }, [
|
|
1768
|
-
B(re(_(n).formatColumnValue(m, G?.row[m.columnProperty])), 1)
|
|
1769
|
-
], 64))
|
|
1770
|
-
]),
|
|
1771
|
-
_: 2
|
|
1772
|
-
}, 1032, ["label", "width", "fixed", "show-overflow-tooltip", "align", "header-align"])) : N("", !0)
|
|
1773
|
-
], 64))), 128)),
|
|
1774
|
-
b(X, {
|
|
1775
|
-
align: c.operationAlign,
|
|
1776
|
-
fixed: "right",
|
|
1777
|
-
width: c.operationWidth,
|
|
1778
|
-
label: "操作"
|
|
1779
|
-
}, {
|
|
1780
|
-
default: h((m) => [
|
|
1781
|
-
c.visibleOperationButtons.includes("detail") ? (d(), C($, {
|
|
1782
|
-
key: 0,
|
|
1783
|
-
type: "primary",
|
|
1784
|
-
plain: "",
|
|
1785
|
-
size: c.operationSize,
|
|
1786
|
-
onClick: (G) => we(m.row)
|
|
1787
|
-
}, {
|
|
1788
|
-
default: h(() => [...y[10] || (y[10] = [
|
|
1789
|
-
B("详情", -1)
|
|
1790
|
-
])]),
|
|
1791
|
-
_: 1
|
|
1792
|
-
}, 8, ["size", "onClick"])) : N("", !0),
|
|
1793
|
-
c.visibleOperationButtons.includes("edit") && r.permissions.edit ? (d(), C($, {
|
|
1794
|
-
key: 1,
|
|
1795
|
-
type: "success",
|
|
1796
|
-
plain: "",
|
|
1797
|
-
size: c.operationSize,
|
|
1798
|
-
onClick: (G) => be(m.row)
|
|
1799
|
-
}, {
|
|
1800
|
-
default: h(() => [...y[11] || (y[11] = [
|
|
1801
|
-
B("编辑", -1)
|
|
1802
|
-
])]),
|
|
1803
|
-
_: 1
|
|
1804
|
-
}, 8, ["size", "onClick"])) : N("", !0),
|
|
1805
|
-
c.visibleOperationButtons.includes("delete") && r.permissions.delete ? (d(), C($, {
|
|
1806
|
-
key: 2,
|
|
1807
|
-
type: "danger",
|
|
1808
|
-
plain: "",
|
|
1809
|
-
size: c.operationSize,
|
|
1810
|
-
onClick: (G) => Ce(m.row)
|
|
1811
|
-
}, {
|
|
1812
|
-
default: h(() => [...y[12] || (y[12] = [
|
|
1813
|
-
B("删除", -1)
|
|
1814
|
-
])]),
|
|
1815
|
-
_: 1
|
|
1816
|
-
}, 8, ["size", "onClick"])) : N("", !0),
|
|
1817
|
-
q(w.$slots, "table-column-action", { scope: m }, void 0, !0)
|
|
1818
|
-
]),
|
|
1819
|
-
_: 3
|
|
1820
|
-
}, 8, ["align", "width"])
|
|
1821
|
-
]),
|
|
1822
|
-
_: 3
|
|
1823
|
-
}, 8, ["data", "size", "height"])
|
|
1679
|
+
default: h(() => [...y[8] || (y[8] = [
|
|
1680
|
+
U("新增", -1)
|
|
1681
|
+
])]),
|
|
1682
|
+
_: 1
|
|
1683
|
+
}, 8, ["size"])) : E("", !0),
|
|
1684
|
+
l.permissions.delete && r.webFunction.includes("batchDelete") ? (p(), C(u(I), {
|
|
1685
|
+
key: 1,
|
|
1686
|
+
type: "danger",
|
|
1687
|
+
size: l.size,
|
|
1688
|
+
icon: "Delete",
|
|
1689
|
+
onClick: Fe
|
|
1690
|
+
}, {
|
|
1691
|
+
default: h(() => [...y[9] || (y[9] = [
|
|
1692
|
+
U("批量删除", -1)
|
|
1693
|
+
])]),
|
|
1694
|
+
_: 1
|
|
1695
|
+
}, 8, ["size"])) : E("", !0),
|
|
1696
|
+
K(w.$slots, "table-actions", {}, void 0, !0)
|
|
1824
1697
|
]),
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
}, {
|
|
1869
|
-
default: h(() => [
|
|
1870
|
-
b(ae, null, {
|
|
1871
|
-
default: h(() => [
|
|
1872
|
-
b(ee, { span: 24 }, {
|
|
1873
|
-
default: h(() => [
|
|
1874
|
-
b(ae, null, {
|
|
1875
|
-
default: h(() => [
|
|
1876
|
-
(d(!0), P(R, null, K(M.formColumns, (m) => (d(), C(ee, {
|
|
1877
|
-
key: m.columnProperty,
|
|
1878
|
-
span: m.span || 12
|
|
1879
|
-
}, {
|
|
1880
|
-
default: h(() => [
|
|
1881
|
-
b(z, {
|
|
1882
|
-
label: m.columnLabel,
|
|
1883
|
-
prop: m.columnProperty
|
|
1884
|
-
}, {
|
|
1885
|
-
default: h(() => [
|
|
1886
|
-
i.value === "details" ? (d(), C(Ie, {
|
|
1887
|
-
key: 0,
|
|
1888
|
-
item: m,
|
|
1889
|
-
modelValue: L.data[m.columnProperty],
|
|
1890
|
-
"onUpdate:modelValue": (G) => L.data[m.columnProperty] = G,
|
|
1891
|
-
dropdownOptions: _(n).getDictOptionsByColumnProperty(m.columnProperty)
|
|
1892
|
-
}, null, 8, ["item", "modelValue", "onUpdate:modelValue", "dropdownOptions"])) : (d(), P(R, { key: 1 }, [
|
|
1893
|
-
m.showMethod === "slot" ? q(w.$slots, "form-" + m.columnProperty, {
|
|
1894
|
-
key: 0,
|
|
1895
|
-
item: m,
|
|
1896
|
-
scope: { ...w.scope, formData: L.data, data: L.data[m.columnProperty] }
|
|
1897
|
-
}, void 0, !0) : (d(), C(ce, {
|
|
1898
|
-
key: 1,
|
|
1899
|
-
item: m,
|
|
1900
|
-
modelValue: L.data[m.columnProperty],
|
|
1901
|
-
"onUpdate:modelValue": (G) => L.data[m.columnProperty] = G,
|
|
1902
|
-
dropdownOptions: _(n).getDictOptionsByColumnProperty(m.columnProperty),
|
|
1903
|
-
currentOperationType: i.value
|
|
1904
|
-
}, null, 8, ["item", "modelValue", "onUpdate:modelValue", "dropdownOptions", "currentOperationType"]))
|
|
1905
|
-
], 64))
|
|
1906
|
-
]),
|
|
1907
|
-
_: 2
|
|
1908
|
-
}, 1032, ["label", "prop"])
|
|
1909
|
-
]),
|
|
1910
|
-
_: 2
|
|
1911
|
-
}, 1032, ["span"]))), 128))
|
|
1912
|
-
]),
|
|
1913
|
-
_: 3
|
|
1914
|
-
})
|
|
1915
|
-
]),
|
|
1916
|
-
_: 3
|
|
1917
|
-
})
|
|
1918
|
-
]),
|
|
1919
|
-
_: 3
|
|
1920
|
-
})
|
|
1921
|
-
]),
|
|
1922
|
-
_: 3
|
|
1923
|
-
}, 8, ["model", "rules", "label-width", "class"])
|
|
1924
|
-
]),
|
|
1925
|
-
_: 3
|
|
1926
|
-
}, 8, ["span"]),
|
|
1927
|
-
x.value ? (d(), C(ee, {
|
|
1698
|
+
G("div", Pt, [
|
|
1699
|
+
K(w.$slots, "table-actions-right", {}, void 0, !0),
|
|
1700
|
+
b(gt, {
|
|
1701
|
+
columns: f.columns,
|
|
1702
|
+
data: P.value
|
|
1703
|
+
}, null, 8, ["columns", "data"]),
|
|
1704
|
+
b(Ct, {
|
|
1705
|
+
"table-columns": f.columns,
|
|
1706
|
+
"visible-columns": W.value,
|
|
1707
|
+
"onUpdate:visibleColumns": y[0] || (y[0] = (s) => W.value = s),
|
|
1708
|
+
"onUpdate:columns": ze
|
|
1709
|
+
}, null, 8, ["table-columns", "visible-columns"])
|
|
1710
|
+
])
|
|
1711
|
+
])) : E("", !0),
|
|
1712
|
+
G("div", Lt, [
|
|
1713
|
+
b(u(Be), {
|
|
1714
|
+
ref_key: "tableRef",
|
|
1715
|
+
ref: i,
|
|
1716
|
+
data: P.value,
|
|
1717
|
+
border: "",
|
|
1718
|
+
stripe: "",
|
|
1719
|
+
size: l.size,
|
|
1720
|
+
height: d.value,
|
|
1721
|
+
"header-cell-style": { background: "#F5F7FA" }
|
|
1722
|
+
}, {
|
|
1723
|
+
default: h(() => [
|
|
1724
|
+
f.showIndex ? (p(), C(u(Q), {
|
|
1725
|
+
key: 0,
|
|
1726
|
+
type: "index",
|
|
1727
|
+
width: f.indexWidth,
|
|
1728
|
+
label: "#",
|
|
1729
|
+
align: "center"
|
|
1730
|
+
}, null, 8, ["width"])) : E("", !0),
|
|
1731
|
+
l.permissions.delete && r.webFunction.includes("batchDelete") ? (p(), C(u(Q), {
|
|
1732
|
+
key: 1,
|
|
1733
|
+
type: "selection",
|
|
1734
|
+
width: "55",
|
|
1735
|
+
align: "center"
|
|
1736
|
+
})) : E("", !0),
|
|
1737
|
+
(p(!0), S(B, null, J(f.columns, (s) => (p(), S(B, {
|
|
1738
|
+
key: s.prop
|
|
1739
|
+
}, [
|
|
1740
|
+
W.value.includes(s.columnProperty) ? (p(), C(u(Q), {
|
|
1928
1741
|
key: 0,
|
|
1929
|
-
|
|
1930
|
-
|
|
1742
|
+
label: s.columnLabel,
|
|
1743
|
+
width: (s.width || "") + "px",
|
|
1744
|
+
fixed: s.fixed,
|
|
1745
|
+
"show-overflow-tooltip": !s.noWrap,
|
|
1746
|
+
align: s.align,
|
|
1747
|
+
"header-align": s.headerAlign
|
|
1931
1748
|
}, {
|
|
1932
|
-
default: h(() => [
|
|
1933
|
-
|
|
1749
|
+
default: h((M) => [
|
|
1750
|
+
w.$slots["table-column-" + s.columnProperty] ? K(w.$slots, "table-column-" + s.columnProperty, {
|
|
1934
1751
|
key: 0,
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
geomType: w.geomType
|
|
1940
|
-
}, null, 8, ["modelValue", "currentOperationType", "mapViewData", "geomType"])) : N("", !0)
|
|
1752
|
+
scope: M
|
|
1753
|
+
}, void 0, !0) : (p(), S(B, { key: 1 }, [
|
|
1754
|
+
U(re(u(o).formatColumnValue(s, M?.row[s.columnProperty])), 1)
|
|
1755
|
+
], 64))
|
|
1941
1756
|
]),
|
|
1942
|
-
_:
|
|
1943
|
-
},
|
|
1944
|
-
]),
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
i.value !== "details" ? {
|
|
1951
|
-
name: "footer",
|
|
1952
|
-
fn: h(() => [
|
|
1953
|
-
b($, {
|
|
1954
|
-
type: "primary",
|
|
1955
|
-
onClick: ke,
|
|
1956
|
-
loading: v.value
|
|
1757
|
+
_: 2
|
|
1758
|
+
}, 1032, ["label", "width", "fixed", "show-overflow-tooltip", "align", "header-align"])) : E("", !0)
|
|
1759
|
+
], 64))), 128)),
|
|
1760
|
+
b(u(Q), {
|
|
1761
|
+
align: f.operationAlign,
|
|
1762
|
+
fixed: "right",
|
|
1763
|
+
width: f.operationWidth,
|
|
1764
|
+
label: "操作"
|
|
1957
1765
|
}, {
|
|
1958
|
-
default: h(() => [
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1766
|
+
default: h((s) => [
|
|
1767
|
+
f.visibleOperationButtons.includes("detail") ? (p(), C(u(I), {
|
|
1768
|
+
key: 0,
|
|
1769
|
+
type: "primary",
|
|
1770
|
+
plain: "",
|
|
1771
|
+
size: f.operationSize,
|
|
1772
|
+
onClick: (M) => Pe(s.row)
|
|
1773
|
+
}, {
|
|
1774
|
+
default: h(() => [...y[10] || (y[10] = [
|
|
1775
|
+
U("详情", -1)
|
|
1776
|
+
])]),
|
|
1777
|
+
_: 1
|
|
1778
|
+
}, 8, ["size", "onClick"])) : E("", !0),
|
|
1779
|
+
f.visibleOperationButtons.includes("edit") && l.permissions.edit ? (p(), C(u(I), {
|
|
1780
|
+
key: 1,
|
|
1781
|
+
type: "success",
|
|
1782
|
+
plain: "",
|
|
1783
|
+
size: f.operationSize,
|
|
1784
|
+
onClick: (M) => Le(s.row)
|
|
1785
|
+
}, {
|
|
1786
|
+
default: h(() => [...y[11] || (y[11] = [
|
|
1787
|
+
U("编辑", -1)
|
|
1788
|
+
])]),
|
|
1789
|
+
_: 1
|
|
1790
|
+
}, 8, ["size", "onClick"])) : E("", !0),
|
|
1791
|
+
f.visibleOperationButtons.includes("delete") && l.permissions.delete ? (p(), C(u(I), {
|
|
1792
|
+
key: 2,
|
|
1793
|
+
type: "danger",
|
|
1794
|
+
plain: "",
|
|
1795
|
+
size: f.operationSize,
|
|
1796
|
+
onClick: (M) => Te(s.row)
|
|
1797
|
+
}, {
|
|
1798
|
+
default: h(() => [...y[12] || (y[12] = [
|
|
1799
|
+
U("删除", -1)
|
|
1800
|
+
])]),
|
|
1801
|
+
_: 1
|
|
1802
|
+
}, 8, ["size", "onClick"])) : E("", !0),
|
|
1803
|
+
K(w.$slots, "table-column-action", { scope: s }, void 0, !0)
|
|
1804
|
+
]),
|
|
1805
|
+
_: 3
|
|
1806
|
+
}, 8, ["align", "width"])
|
|
1807
|
+
]),
|
|
1808
|
+
_: 3
|
|
1809
|
+
}, 8, ["data", "size", "height"])
|
|
1810
|
+
]),
|
|
1811
|
+
f.showPagination ? (p(), S("div", Tt, [
|
|
1812
|
+
b(u(Re), {
|
|
1813
|
+
"current-page": D.currentPage,
|
|
1814
|
+
"onUpdate:currentPage": y[1] || (y[1] = (s) => D.currentPage = s),
|
|
1815
|
+
"page-size": D.pageSize,
|
|
1816
|
+
"onUpdate:pageSize": y[2] || (y[2] = (s) => D.pageSize = s),
|
|
1817
|
+
total: D.total,
|
|
1818
|
+
layout: "total, sizes, prev, pager, next",
|
|
1819
|
+
background: "",
|
|
1820
|
+
size: l.size,
|
|
1821
|
+
onSizeChange: Ve,
|
|
1822
|
+
onCurrentChange: De
|
|
1823
|
+
}, null, 8, ["current-page", "page-size", "total", "size"])
|
|
1824
|
+
])) : E("", !0)
|
|
1825
|
+
]),
|
|
1826
|
+
b(u(be), {
|
|
1827
|
+
title: L.title,
|
|
1828
|
+
"close-on-click-modal": !1,
|
|
1829
|
+
"close-on-press-escape": !1,
|
|
1830
|
+
width: L.formDialogWidth,
|
|
1831
|
+
modelValue: N.value,
|
|
1832
|
+
"onUpdate:modelValue": y[5] || (y[5] = (s) => N.value = s),
|
|
1833
|
+
"destroy-on-close": !0,
|
|
1834
|
+
draggable: "",
|
|
1835
|
+
"append-to-body": !0,
|
|
1836
|
+
"align-center": ""
|
|
1837
|
+
}, xe({
|
|
1838
|
+
default: h(() => [
|
|
1839
|
+
b(u(le), null, {
|
|
1840
|
+
default: h(() => [
|
|
1841
|
+
b(u(X), {
|
|
1842
|
+
span: T.value ? 24 - T.value.span : 24
|
|
1965
1843
|
}, {
|
|
1966
|
-
default: h(() => [
|
|
1967
|
-
|
|
1968
|
-
|
|
1844
|
+
default: h(() => [
|
|
1845
|
+
b(u(oe), {
|
|
1846
|
+
ref_key: "formRef",
|
|
1847
|
+
ref: m,
|
|
1848
|
+
model: F.data,
|
|
1849
|
+
rules: A.value,
|
|
1850
|
+
size: "default",
|
|
1851
|
+
"label-width": L.labelWidth,
|
|
1852
|
+
"label-suffix": ":",
|
|
1853
|
+
class: ee({ "curd-form-details": c.value === "details" })
|
|
1854
|
+
}, {
|
|
1855
|
+
default: h(() => [
|
|
1856
|
+
b(u(le), null, {
|
|
1857
|
+
default: h(() => [
|
|
1858
|
+
b(u(X), { span: 24 }, {
|
|
1859
|
+
default: h(() => [
|
|
1860
|
+
b(u(le), null, {
|
|
1861
|
+
default: h(() => [
|
|
1862
|
+
(p(!0), S(B, null, J($.formColumns, (s) => (p(), C(u(X), {
|
|
1863
|
+
key: s.columnProperty,
|
|
1864
|
+
span: s.span || 12
|
|
1865
|
+
}, {
|
|
1866
|
+
default: h(() => [
|
|
1867
|
+
b(u(Z), {
|
|
1868
|
+
label: s.columnLabel,
|
|
1869
|
+
prop: s.columnProperty
|
|
1870
|
+
}, {
|
|
1871
|
+
default: h(() => [
|
|
1872
|
+
c.value === "details" ? (p(), C(Ke, {
|
|
1873
|
+
key: 0,
|
|
1874
|
+
item: s,
|
|
1875
|
+
modelValue: F.data[s.columnProperty],
|
|
1876
|
+
"onUpdate:modelValue": (M) => F.data[s.columnProperty] = M,
|
|
1877
|
+
dropdownOptions: u(o).getDictOptionsByColumnProperty(s.columnProperty)
|
|
1878
|
+
}, null, 8, ["item", "modelValue", "onUpdate:modelValue", "dropdownOptions"])) : (p(), S(B, { key: 1 }, [
|
|
1879
|
+
s.showMethod === "slot" ? K(w.$slots, "form-" + s.columnProperty, {
|
|
1880
|
+
key: 0,
|
|
1881
|
+
item: s,
|
|
1882
|
+
scope: { ...w.scope, formData: F.data, data: F.data[s.columnProperty] }
|
|
1883
|
+
}, void 0, !0) : (p(), C(he, {
|
|
1884
|
+
key: 1,
|
|
1885
|
+
item: s,
|
|
1886
|
+
modelValue: F.data[s.columnProperty],
|
|
1887
|
+
"onUpdate:modelValue": (M) => F.data[s.columnProperty] = M,
|
|
1888
|
+
dropdownOptions: u(o).getDictOptionsByColumnProperty(s.columnProperty),
|
|
1889
|
+
currentOperationType: c.value
|
|
1890
|
+
}, null, 8, ["item", "modelValue", "onUpdate:modelValue", "dropdownOptions", "currentOperationType"]))
|
|
1891
|
+
], 64))
|
|
1892
|
+
]),
|
|
1893
|
+
_: 2
|
|
1894
|
+
}, 1032, ["label", "prop"])
|
|
1895
|
+
]),
|
|
1896
|
+
_: 2
|
|
1897
|
+
}, 1032, ["span"]))), 128))
|
|
1898
|
+
]),
|
|
1899
|
+
_: 3
|
|
1900
|
+
})
|
|
1901
|
+
]),
|
|
1902
|
+
_: 3
|
|
1903
|
+
})
|
|
1904
|
+
]),
|
|
1905
|
+
_: 3
|
|
1906
|
+
})
|
|
1907
|
+
]),
|
|
1908
|
+
_: 3
|
|
1909
|
+
}, 8, ["model", "rules", "label-width", "class"])
|
|
1910
|
+
]),
|
|
1911
|
+
_: 3
|
|
1912
|
+
}, 8, ["span"]),
|
|
1913
|
+
T.value ? (p(), C(u(X), {
|
|
1914
|
+
key: 0,
|
|
1915
|
+
span: T.value ? T.value.span : 0,
|
|
1916
|
+
style: { padding: "0 10px" }
|
|
1917
|
+
}, {
|
|
1918
|
+
default: h(() => [
|
|
1919
|
+
k.value ? (p(), C(mt, {
|
|
1920
|
+
key: 0,
|
|
1921
|
+
modelValue: F.data.wktstr,
|
|
1922
|
+
"onUpdate:modelValue": y[3] || (y[3] = (s) => F.data.wktstr = s),
|
|
1923
|
+
currentOperationType: c.value,
|
|
1924
|
+
mapViewData: l.mapViewData,
|
|
1925
|
+
geomType: r.geomType
|
|
1926
|
+
}, null, 8, ["modelValue", "currentOperationType", "mapViewData", "geomType"])) : E("", !0)
|
|
1927
|
+
]),
|
|
1969
1928
|
_: 1
|
|
1970
|
-
})
|
|
1929
|
+
}, 8, ["span"])) : E("", !0)
|
|
1971
1930
|
]),
|
|
1972
|
-
|
|
1973
|
-
}
|
|
1974
|
-
]),
|
|
1975
|
-
|
|
1976
|
-
|
|
1931
|
+
_: 3
|
|
1932
|
+
})
|
|
1933
|
+
]),
|
|
1934
|
+
_: 2
|
|
1935
|
+
}, [
|
|
1936
|
+
c.value !== "details" ? {
|
|
1937
|
+
name: "footer",
|
|
1938
|
+
fn: h(() => [
|
|
1939
|
+
b(u(I), {
|
|
1940
|
+
type: "primary",
|
|
1941
|
+
onClick: Me,
|
|
1942
|
+
loading: v.value
|
|
1943
|
+
}, {
|
|
1944
|
+
default: h(() => [...y[13] || (y[13] = [
|
|
1945
|
+
U("确定", -1)
|
|
1946
|
+
])]),
|
|
1947
|
+
_: 1
|
|
1948
|
+
}, 8, ["loading"]),
|
|
1949
|
+
b(u(I), {
|
|
1950
|
+
onClick: y[4] || (y[4] = (s) => N.value = !1)
|
|
1951
|
+
}, {
|
|
1952
|
+
default: h(() => [...y[14] || (y[14] = [
|
|
1953
|
+
U("取消", -1)
|
|
1954
|
+
])]),
|
|
1955
|
+
_: 1
|
|
1956
|
+
})
|
|
1957
|
+
]),
|
|
1958
|
+
key: "0"
|
|
1959
|
+
} : void 0
|
|
1960
|
+
]), 1032, ["title", "width", "modelValue"])
|
|
1961
|
+
], 64));
|
|
1977
1962
|
}
|
|
1978
|
-
}),
|
|
1963
|
+
}), xt = /* @__PURE__ */ _(Ot, [["__scopeId", "data-v-de5218c7"]]);
|
|
1979
1964
|
export {
|
|
1980
|
-
|
|
1981
|
-
|
|
1965
|
+
xt as CurdForm,
|
|
1966
|
+
xt as default
|
|
1982
1967
|
};
|