@luzhaoqi/test 0.0.43 → 0.0.45
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/dict-Bd5ZD5ia.mjs +66 -0
- package/dist/dict-uCj2Cg8O.mjs +172 -0
- package/dist/dictEdit-E8D81oHu.mjs +187 -0
- package/dist/index-4RzD8CJ3.mjs +82 -0
- package/dist/index-LkpiywJu.mjs +55 -0
- package/dist/index-MSlWQFbz.mjs +246 -0
- package/dist/index-_InmB_Fg.mjs +31498 -0
- package/dist/index-dLUx1A_Y.mjs +104 -0
- package/dist/index-mBDnOF1n.mjs +160 -0
- package/dist/index-p4HI9ccu.mjs +19 -0
- package/dist/index-tF_j39Si.mjs +120 -0
- package/dist/index-uFC6rZY7.mjs +6853 -0
- package/dist/layout-CT9WEYrm.mjs +11 -0
- package/dist/main-gPpx1WZq.mjs +36094 -0
- package/dist/style.css +2 -2
- package/dist/test-xFpnSxbr.mjs +41 -0
- package/dist/type-XKne415H.mjs +157 -0
- package/dist/typeEdit-VqWP1Hpc.mjs +146 -0
- package/dist/z-ui3.mjs +35 -27607
- package/dist/z-ui3.umd.js +185 -79
- package/package.json +5 -2
@@ -0,0 +1,41 @@
|
|
1
|
+
import { getCurrentInstance as l, computed as n, onMounted as m, resolveComponent as o, openBlock as f, createElementBlock as g, createTextVNode as e, toDisplayString as c, unref as s, createVNode as r, withCtx as a } from "vue";
|
2
|
+
const h = {
|
3
|
+
__name: "test",
|
4
|
+
setup(y) {
|
5
|
+
const t = l().proxy.$z, i = n(() => t.$store.dict.getDictByCode("sys_status")), u = n(() => t.$store.tagsView.visitedViews);
|
6
|
+
m(() => {
|
7
|
+
t.$store.dict.setDictByCode("sys_status");
|
8
|
+
});
|
9
|
+
const _ = () => {
|
10
|
+
t.$store.settings.changeSetting({
|
11
|
+
key: "theme",
|
12
|
+
value: "ccc",
|
13
|
+
meta: {
|
14
|
+
title: "1112"
|
15
|
+
}
|
16
|
+
});
|
17
|
+
};
|
18
|
+
return (C, $) => {
|
19
|
+
const d = o("z-container"), p = o("z-button");
|
20
|
+
return f(), g("div", null, [
|
21
|
+
e(c(s(u)) + " ", 1),
|
22
|
+
r(d, { ref: "content" }, {
|
23
|
+
default: a(() => [
|
24
|
+
e("11111")
|
25
|
+
]),
|
26
|
+
_: 1
|
27
|
+
}, 512),
|
28
|
+
e(" " + c(s(i)) + " ", 1),
|
29
|
+
r(p, { onClick: _ }, {
|
30
|
+
default: a(() => [
|
31
|
+
e("点击")
|
32
|
+
]),
|
33
|
+
_: 1
|
34
|
+
})
|
35
|
+
]);
|
36
|
+
};
|
37
|
+
}
|
38
|
+
};
|
39
|
+
export {
|
40
|
+
h as default
|
41
|
+
};
|
@@ -0,0 +1,157 @@
|
|
1
|
+
import { getCurrentInstance as N, ref as d, computed as U, onMounted as D, resolveComponent as c, openBlock as m, createBlock as h, unref as _, withCtx as t, createVNode as o, withKeys as v, createElementBlock as O, Fragment as K, renderList as A, createTextVNode as p } from "vue";
|
2
|
+
import E from "./typeEdit-VqWP1Hpc.mjs";
|
3
|
+
import { l as M, e as S } from "./dict-Bd5ZD5ia.mjs";
|
4
|
+
import { a as F } from "./index-_InmB_Fg.mjs";
|
5
|
+
import "./main-gPpx1WZq.mjs";
|
6
|
+
const J = {
|
7
|
+
__name: "type",
|
8
|
+
setup(I) {
|
9
|
+
const i = N().proxy.$z, $ = F(), g = d({
|
10
|
+
api: M,
|
11
|
+
columns: [
|
12
|
+
{ label: "字典编号", type: "index", width: 90 },
|
13
|
+
{ label: "字典名称", prop: "dictName" },
|
14
|
+
{ label: "字典类型", prop: "dictType" },
|
15
|
+
{ label: "状态", prop: "status", slot: !0 },
|
16
|
+
{ label: "备注", prop: "remark" },
|
17
|
+
{ label: "创建时间", prop: "createTime" },
|
18
|
+
{ label: "操作", prop: "menu", width: "200", slot: !0 }
|
19
|
+
]
|
20
|
+
}), f = U(() => i.$store.dict.getDictByCode("sys_status"));
|
21
|
+
D(() => {
|
22
|
+
i.$store.dict.setDictByCode("sys_status");
|
23
|
+
});
|
24
|
+
const b = d(), k = d(), s = () => {
|
25
|
+
b.value.handleQuery();
|
26
|
+
}, y = (a, n) => {
|
27
|
+
k.value.show(a, n);
|
28
|
+
}, C = (a) => {
|
29
|
+
i.$modal.confirm("是否确认删除名称为" + a.dictName + "的数据项?", "警告", {
|
30
|
+
confirmButtonText: "确定",
|
31
|
+
cancelButtonText: "取消",
|
32
|
+
type: "warning"
|
33
|
+
}).then(() => {
|
34
|
+
S(a.id).then((n) => {
|
35
|
+
n && (i.$modal.msgSuccess("删除成功"), s());
|
36
|
+
}).catch((n) => {
|
37
|
+
console.log(n), i.$modal.msgError("删除失败");
|
38
|
+
});
|
39
|
+
});
|
40
|
+
}, w = (a) => {
|
41
|
+
$.push(`/example/dictValue/${a.dictType}`);
|
42
|
+
};
|
43
|
+
return (a, n) => {
|
44
|
+
const V = c("el-input"), r = c("el-form-item"), x = c("el-option"), T = c("el-select"), u = c("el-button"), B = c("z-dict-tag"), z = c("z-list");
|
45
|
+
return m(), h(z, {
|
46
|
+
ref_key: "list",
|
47
|
+
ref: b,
|
48
|
+
tableOption: _(g)
|
49
|
+
}, {
|
50
|
+
form: t(({ queryParams: e }) => [
|
51
|
+
o(r, { label: "字典名称" }, {
|
52
|
+
default: t(() => [
|
53
|
+
o(V, {
|
54
|
+
modelValue: e.dictName,
|
55
|
+
"onUpdate:modelValue": (l) => e.dictName = l,
|
56
|
+
placeholder: "请输入字典名称",
|
57
|
+
clearable: "",
|
58
|
+
onKeyup: v(s, ["enter", "native"])
|
59
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
60
|
+
]),
|
61
|
+
_: 2
|
62
|
+
}, 1024),
|
63
|
+
o(r, { label: "字典类型" }, {
|
64
|
+
default: t(() => [
|
65
|
+
o(V, {
|
66
|
+
modelValue: e.dictType,
|
67
|
+
"onUpdate:modelValue": (l) => e.dictType = l,
|
68
|
+
placeholder: "请输入字典类型",
|
69
|
+
clearable: "",
|
70
|
+
onKeyup: v(s, ["enter", "native"])
|
71
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
72
|
+
]),
|
73
|
+
_: 2
|
74
|
+
}, 1024),
|
75
|
+
o(r, { label: "状态" }, {
|
76
|
+
default: t(() => [
|
77
|
+
o(T, {
|
78
|
+
modelValue: e.status,
|
79
|
+
"onUpdate:modelValue": (l) => e.status = l,
|
80
|
+
clearable: ""
|
81
|
+
}, {
|
82
|
+
default: t(() => [
|
83
|
+
(m(!0), O(K, null, A(_(f), (l) => (m(), h(x, {
|
84
|
+
key: l.value,
|
85
|
+
label: l.label,
|
86
|
+
value: l.value
|
87
|
+
}, null, 8, ["label", "value"]))), 128))
|
88
|
+
]),
|
89
|
+
_: 2
|
90
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
91
|
+
]),
|
92
|
+
_: 2
|
93
|
+
}, 1024)
|
94
|
+
]),
|
95
|
+
leftMenu: t(() => [
|
96
|
+
o(u, {
|
97
|
+
onClick: n[0] || (n[0] = (e) => y("add", {})),
|
98
|
+
icon: "el-icon-plus",
|
99
|
+
type: "primary",
|
100
|
+
plain: ""
|
101
|
+
}, {
|
102
|
+
default: t(() => [
|
103
|
+
p("新增字典类型")
|
104
|
+
]),
|
105
|
+
_: 1
|
106
|
+
})
|
107
|
+
]),
|
108
|
+
status: t((e) => [
|
109
|
+
o(B, {
|
110
|
+
options: _(f),
|
111
|
+
value: e.row.status
|
112
|
+
}, null, 8, ["options", "value"])
|
113
|
+
]),
|
114
|
+
menu: t((e) => [
|
115
|
+
o(u, {
|
116
|
+
link: "",
|
117
|
+
onClick: (l) => y("edit", e.row)
|
118
|
+
}, {
|
119
|
+
default: t(() => [
|
120
|
+
p("编辑")
|
121
|
+
]),
|
122
|
+
_: 2
|
123
|
+
}, 1032, ["onClick"]),
|
124
|
+
o(u, {
|
125
|
+
link: "",
|
126
|
+
onClick: (l) => w(e.row)
|
127
|
+
}, {
|
128
|
+
default: t(() => [
|
129
|
+
p("详情")
|
130
|
+
]),
|
131
|
+
_: 2
|
132
|
+
}, 1032, ["onClick"]),
|
133
|
+
o(u, {
|
134
|
+
link: "",
|
135
|
+
onClick: (l) => C(e.row)
|
136
|
+
}, {
|
137
|
+
default: t(() => [
|
138
|
+
p("删除")
|
139
|
+
]),
|
140
|
+
_: 2
|
141
|
+
}, 1032, ["onClick"])
|
142
|
+
]),
|
143
|
+
default: t(() => [
|
144
|
+
o(E, {
|
145
|
+
ref_key: "dialog",
|
146
|
+
ref: k,
|
147
|
+
onOk: s
|
148
|
+
}, null, 512)
|
149
|
+
]),
|
150
|
+
_: 1
|
151
|
+
}, 8, ["tableOption"]);
|
152
|
+
};
|
153
|
+
}
|
154
|
+
};
|
155
|
+
export {
|
156
|
+
J as default
|
157
|
+
};
|
@@ -0,0 +1,146 @@
|
|
1
|
+
import { getCurrentInstance as b, computed as R, onMounted as A, ref as r, resolveComponent as i, openBlock as v, createBlock as y, unref as l, isRef as E, withCtx as d, createVNode as s, createElementBlock as F, Fragment as O, renderList as S, createTextVNode as I, toDisplayString as L } from "vue";
|
2
|
+
import { f as M, g as h } from "./dict-Bd5ZD5ia.mjs";
|
3
|
+
import "./main-gPpx1WZq.mjs";
|
4
|
+
import "./index-_InmB_Fg.mjs";
|
5
|
+
const W = {
|
6
|
+
__name: "typeEdit",
|
7
|
+
emits: ["ok"],
|
8
|
+
setup(G, { expose: k, emit: x }) {
|
9
|
+
const p = b().proxy.$z;
|
10
|
+
b();
|
11
|
+
const N = R(() => p.$store.dict.getDictByCode("sys_status"));
|
12
|
+
A(() => {
|
13
|
+
p.$store.dict.setDictByCode("sys_status");
|
14
|
+
});
|
15
|
+
const c = r(!1), f = r(""), m = r(!1), g = () => ({
|
16
|
+
id: void 0,
|
17
|
+
dictName: void 0,
|
18
|
+
dictType: void 0,
|
19
|
+
status: void 0,
|
20
|
+
remark: void 0
|
21
|
+
}), t = r(g()), C = r({
|
22
|
+
dictName: [{ required: !0, message: "请输入字典名称", trigger: "blur" }],
|
23
|
+
dictType: [{ required: !0, message: "请输入字典类型", trigger: "blur" }],
|
24
|
+
status: [{ required: !0, message: "请选择状态", trigger: "change" }]
|
25
|
+
}), _ = r(), D = (u, e) => {
|
26
|
+
switch (u) {
|
27
|
+
case "add":
|
28
|
+
m.value = !1, f.value = "新增";
|
29
|
+
break;
|
30
|
+
case "edit":
|
31
|
+
m.value = !1, f.value = "编辑", V(e);
|
32
|
+
break;
|
33
|
+
case "view":
|
34
|
+
m.value = !0, f.value = "详情", V(e);
|
35
|
+
break;
|
36
|
+
}
|
37
|
+
c.value = !0;
|
38
|
+
}, V = (u) => {
|
39
|
+
const e = p.$utils._.cloneDeep(t.value);
|
40
|
+
for (const o in e)
|
41
|
+
u[o] !== void 0 && (e[o] = u[o]);
|
42
|
+
t.value = e;
|
43
|
+
}, w = () => {
|
44
|
+
_.value.resetFields(), t.value = g();
|
45
|
+
}, T = (u) => {
|
46
|
+
_.value.validate((e) => {
|
47
|
+
if (e) {
|
48
|
+
const o = t.value.id ? M : h, n = t.value.id ? "修改成功!" : "提交成功!";
|
49
|
+
o(p.$utils._.cloneDeep(t.value)).then(() => {
|
50
|
+
u(n), $("ok");
|
51
|
+
});
|
52
|
+
}
|
53
|
+
});
|
54
|
+
}, $ = x;
|
55
|
+
return k({ show: D, form: t }), (u, e) => {
|
56
|
+
const o = i("el-input"), n = i("el-form-item"), B = i("el-radio"), U = i("el-radio-group"), q = i("el-form"), z = i("z-dialog");
|
57
|
+
return v(), y(z, {
|
58
|
+
modelValue: l(c),
|
59
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => E(c) ? c.value = a : null),
|
60
|
+
title: l(f),
|
61
|
+
width: "30%",
|
62
|
+
disabled: l(m),
|
63
|
+
onCancel: w,
|
64
|
+
onOk: T
|
65
|
+
}, {
|
66
|
+
default: d(() => [
|
67
|
+
s(q, {
|
68
|
+
ref_key: "formRef",
|
69
|
+
ref: _,
|
70
|
+
model: l(t),
|
71
|
+
"label-width": "80px",
|
72
|
+
rules: l(C),
|
73
|
+
disabled: l(m)
|
74
|
+
}, {
|
75
|
+
default: d(() => [
|
76
|
+
s(n, {
|
77
|
+
label: "字典名称",
|
78
|
+
prop: "dictName"
|
79
|
+
}, {
|
80
|
+
default: d(() => [
|
81
|
+
s(o, {
|
82
|
+
modelValue: l(t).dictName,
|
83
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => l(t).dictName = a)
|
84
|
+
}, null, 8, ["modelValue"])
|
85
|
+
]),
|
86
|
+
_: 1
|
87
|
+
}),
|
88
|
+
s(n, {
|
89
|
+
label: "字典类型",
|
90
|
+
prop: "dictType"
|
91
|
+
}, {
|
92
|
+
default: d(() => [
|
93
|
+
s(o, {
|
94
|
+
modelValue: l(t).dictType,
|
95
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => l(t).dictType = a)
|
96
|
+
}, null, 8, ["modelValue"])
|
97
|
+
]),
|
98
|
+
_: 1
|
99
|
+
}),
|
100
|
+
s(n, {
|
101
|
+
label: "状态",
|
102
|
+
prop: "status"
|
103
|
+
}, {
|
104
|
+
default: d(() => [
|
105
|
+
s(U, {
|
106
|
+
modelValue: l(t).status,
|
107
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => l(t).status = a)
|
108
|
+
}, {
|
109
|
+
default: d(() => [
|
110
|
+
(v(!0), F(O, null, S(l(N), (a) => (v(), y(B, {
|
111
|
+
key: a.value,
|
112
|
+
value: a.value
|
113
|
+
}, {
|
114
|
+
default: d(() => [
|
115
|
+
I(L(a.label), 1)
|
116
|
+
]),
|
117
|
+
_: 2
|
118
|
+
}, 1032, ["value"]))), 128))
|
119
|
+
]),
|
120
|
+
_: 1
|
121
|
+
}, 8, ["modelValue"])
|
122
|
+
]),
|
123
|
+
_: 1
|
124
|
+
}),
|
125
|
+
s(n, { label: "备注" }, {
|
126
|
+
default: d(() => [
|
127
|
+
s(o, {
|
128
|
+
type: "textarea",
|
129
|
+
modelValue: l(t).remark,
|
130
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => l(t).remark = a)
|
131
|
+
}, null, 8, ["modelValue"])
|
132
|
+
]),
|
133
|
+
_: 1
|
134
|
+
})
|
135
|
+
]),
|
136
|
+
_: 1
|
137
|
+
}, 8, ["model", "rules", "disabled"])
|
138
|
+
]),
|
139
|
+
_: 1
|
140
|
+
}, 8, ["modelValue", "title", "disabled"]);
|
141
|
+
};
|
142
|
+
}
|
143
|
+
};
|
144
|
+
export {
|
145
|
+
W as default
|
146
|
+
};
|