yc-project-template 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # yc-project-template
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Recommended Browser Setup
10
+
11
+ - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
+ - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
+ - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
+ - Firefox:
15
+ - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
+ - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
17
+
18
+ ## Type Support for `.vue` Imports in TS
19
+
20
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
21
+
22
+ ## Customize configuration
23
+
24
+ See [Vite Configuration Reference](https://vite.dev/config/).
25
+
26
+ ## Project Setup
27
+
28
+ ```sh
29
+ pnpm install
30
+ ```
31
+
32
+ ### Compile and Hot-Reload for Development
33
+
34
+ ```sh
35
+ pnpm dev
36
+ ```
37
+
38
+ ### Type-Check, Compile and Minify for Production
39
+
40
+ ```sh
41
+ pnpm build
42
+ ```
43
+
44
+ ### Lint with [ESLint](https://eslint.org/)
45
+
46
+ ```sh
47
+ pnpm lint
48
+ ```
@@ -0,0 +1,77 @@
1
+ import { defineComponent as s, reactive as p, ref as c, onMounted as i, createElementBlock as d, openBlock as g } from "vue";
2
+ import { r as m, _ as f } from "./globalComponents-NGC1jMmM.js";
3
+ const _ = (t) => m.post("/app/pageQueryApp", t), b = { class: "app-manage" }, u = /* @__PURE__ */ s({
4
+ name: "AppManage",
5
+ __name: "AppManage",
6
+ setup(t) {
7
+ p({
8
+ name: "",
9
+ code: ""
10
+ });
11
+ const a = p({
12
+ loading: !1,
13
+ tableColumn: [
14
+ {
15
+ prop: "name",
16
+ label: "应用名称",
17
+ width: 180
18
+ },
19
+ {
20
+ prop: "code",
21
+ label: "应用编码"
22
+ },
23
+ {
24
+ prop: "accessUrl",
25
+ label: "访问地址",
26
+ width: 180
27
+ },
28
+ {
29
+ prop: "createdBy",
30
+ label: "创建人"
31
+ },
32
+ // {
33
+ // prop: 'name',
34
+ // label: '创建方式',
35
+ // width: 180,
36
+ // },
37
+ {
38
+ prop: "creationDate",
39
+ label: "创建时间"
40
+ },
41
+ {
42
+ prop: "name",
43
+ label: "状态",
44
+ width: 180
45
+ },
46
+ {
47
+ prop: "age",
48
+ label: "操作"
49
+ }
50
+ ]
51
+ }), n = c([]), l = {
52
+ pageSize: 10,
53
+ currentPage: 1,
54
+ total: 0
55
+ }, r = async () => {
56
+ try {
57
+ const e = await _({
58
+ name: "",
59
+ code: "",
60
+ page: 1,
61
+ pageSize: 10
62
+ });
63
+ n.value = e.table, l.total = e.total, a.loading = !1;
64
+ } catch {
65
+ a.loading = !1;
66
+ } finally {
67
+ a.loading = !1;
68
+ }
69
+ };
70
+ return i(() => {
71
+ r();
72
+ }), (o, e) => (g(), d("div", b, "欢迎使用玉柴星网智云前端项目模板!"));
73
+ }
74
+ }), A = /* @__PURE__ */ f(u, [["__scopeId", "data-v-986bfc0d"]]);
75
+ export {
76
+ A as default
77
+ };
@@ -0,0 +1,88 @@
1
+ import { n as E, o as T, _ as L } from "./globalComponents-NGC1jMmM.js";
2
+ import { defineComponent as O, ref as S, watch as b, createBlock as s, openBlock as l, withCtx as B, createElementVNode as r, createCommentVNode as p, toDisplayString as R, normalizeClass as V } from "vue";
3
+ const z = { class: "yc-dept-tree-node" }, I = { class: "yc-dept-tree-node-icon" }, M = { class: "yc-dept-tree-node-title" }, j = { class: "yc-dept-tree-arrow-icon" }, q = /* @__PURE__ */ O({
4
+ name: "DeptTree",
5
+ __name: "DeptTree",
6
+ props: {
7
+ data: { default: () => [] },
8
+ deptName: { default: "" }
9
+ },
10
+ emits: ["currentChange", "deptOperation"],
11
+ setup(i, { expose: g, emit: h }) {
12
+ const d = S();
13
+ g({
14
+ filter: (e) => {
15
+ d.value?.filter(e);
16
+ }
17
+ });
18
+ const u = i;
19
+ b(
20
+ () => u.deptName,
21
+ (e) => {
22
+ d.value?.filter(e);
23
+ }
24
+ );
25
+ const m = (e, t) => e ? t.name && typeof t.name == "string" && t.name.includes(e) : !0, _ = h, f = (e, t) => {
26
+ }, N = (e, t, o) => {
27
+ }, v = (e, t, o) => {
28
+ }, D = (e, t, o) => {
29
+ }, w = (e, t, o, a) => {
30
+ }, y = (e, t, o, a) => {
31
+ }, k = (e, t, o) => t.data.label === "Level two 3-1" ? o !== "inner" : !0, C = (e) => !e.data.label.includes("Level three 3-1-1"), x = (e) => {
32
+ _("currentChange", e);
33
+ };
34
+ return (e, t) => {
35
+ const o = T, a = E;
36
+ return l(), s(a, {
37
+ ref_key: "treeRef",
38
+ ref: d,
39
+ class: "yc-dept-tree",
40
+ "allow-drop": k,
41
+ "allow-drag": C,
42
+ data: i.data,
43
+ "node-key": "code",
44
+ "current-node-key": "system",
45
+ "highlight-current": !0,
46
+ "check-on-click-node": !0,
47
+ "filter-node-method": m,
48
+ onNodeDragStart: f,
49
+ onNodeDragEnter: N,
50
+ onNodeDragLeave: v,
51
+ onNodeDragOver: D,
52
+ onNodeDragEnd: w,
53
+ onNodeDrop: y,
54
+ onCurrentChange: x
55
+ }, {
56
+ default: B(({ node: n, data: c }) => [
57
+ r("div", z, [
58
+ r("div", I, [
59
+ c.icon ? (l(), s(o, {
60
+ key: 0,
61
+ name: c.icon,
62
+ width: "14",
63
+ height: "14"
64
+ }, null, 8, ["name"])) : p("", !0)
65
+ ]),
66
+ r("div", M, R(c.name), 1),
67
+ r("div", j, [
68
+ n.childNodes && n.childNodes.length > 0 ? (l(), s(o, {
69
+ key: 0,
70
+ name: n.expanded ? "arrow-up" : "arrow-down",
71
+ width: "14",
72
+ height: "14",
73
+ class: V({
74
+ "is-arrow-down": !n.expanded,
75
+ "is-arrow-up": n.expanded
76
+ })
77
+ }, null, 8, ["name", "class"])) : p("", !0)
78
+ ])
79
+ ])
80
+ ]),
81
+ _: 1
82
+ }, 8, ["data"]);
83
+ };
84
+ }
85
+ }), G = /* @__PURE__ */ L(q, [["__scopeId", "data-v-f2c7f001"]]);
86
+ export {
87
+ G as default
88
+ };
@@ -0,0 +1,157 @@
1
+ import { g as B, E as F, h as j, i as q, d as I, v as M, m as N } from "./globalComponents-NGC1jMmM.js";
2
+ import { E as O, a as T } from "./el-form-item-DGYKf4A6.js";
3
+ /* empty css */
4
+ import { defineComponent as A, ref as u, reactive as G, createBlock as V, openBlock as g, withCtx as l, createVNode as t, createTextVNode as m, withDirectives as L } from "vue";
5
+ const Q = /* @__PURE__ */ A({
6
+ name: "DictionaryModal",
7
+ __name: "DictionaryModal",
8
+ emits: ["confirm"],
9
+ setup(z, { expose: b, emit: y }) {
10
+ const s = u(!1), n = u(!1), c = u("新增字典"), p = u(), o = G({
11
+ name: "",
12
+ code: "",
13
+ description: "",
14
+ status: "启用"
15
+ }), E = {
16
+ code: [{ required: !0, message: "请输入字典编码", trigger: "blur" }],
17
+ name: [{ required: !0, message: "请输入字典名称", trigger: "blur" }]
18
+ }, k = y, x = (d, e = "新增字典") => {
19
+ n.value = !1, s.value = !0, c.value = e, Object.keys(o).forEach((r) => {
20
+ delete o[r];
21
+ }), Object.assign(o, {
22
+ name: "",
23
+ code: "",
24
+ description: "",
25
+ status: "启用",
26
+ ...d
27
+ });
28
+ }, f = () => {
29
+ s.value = !1, p.value?.resetFields();
30
+ }, w = async () => {
31
+ try {
32
+ await p.value?.validate(), n.value = !0, (await N(o)).code === "ok" ? (k("confirm", { ...o }), f()) : n.value = !1;
33
+ } catch {
34
+ n.value = !1;
35
+ }
36
+ };
37
+ return b({
38
+ open: x
39
+ }), (d, e) => {
40
+ const r = F, i = T, _ = q, C = j, D = O, v = I, U = B, R = M;
41
+ return g(), V(U, {
42
+ modelValue: s.value,
43
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => s.value = a),
44
+ title: c.value,
45
+ width: "500px",
46
+ "close-on-click-modal": !1,
47
+ onClose: f
48
+ }, {
49
+ footer: l(() => [
50
+ t(v, { onClick: f }, {
51
+ default: l(() => [...e[7] || (e[7] = [
52
+ m("取消", -1)
53
+ ])]),
54
+ _: 1
55
+ }),
56
+ L((g(), V(v, {
57
+ type: "primary",
58
+ onClick: w
59
+ }, {
60
+ default: l(() => [...e[8] || (e[8] = [
61
+ m("确定", -1)
62
+ ])]),
63
+ _: 1
64
+ })), [
65
+ [R, n.value]
66
+ ])
67
+ ]),
68
+ default: l(() => [
69
+ t(D, {
70
+ ref_key: "formRef",
71
+ ref: p,
72
+ model: o,
73
+ rules: E,
74
+ "label-width": "100px"
75
+ }, {
76
+ default: l(() => [
77
+ t(i, {
78
+ label: "字典编码",
79
+ prop: "code"
80
+ }, {
81
+ default: l(() => [
82
+ t(r, {
83
+ modelValue: o.code,
84
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => o.code = a),
85
+ placeholder: "请输入字典编码"
86
+ }, null, 8, ["modelValue"])
87
+ ]),
88
+ _: 1
89
+ }),
90
+ t(i, {
91
+ label: "字典名称",
92
+ prop: "name"
93
+ }, {
94
+ default: l(() => [
95
+ t(r, {
96
+ modelValue: o.name,
97
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => o.name = a),
98
+ placeholder: "请输入字典名称"
99
+ }, null, 8, ["modelValue"])
100
+ ]),
101
+ _: 1
102
+ }),
103
+ t(i, {
104
+ label: "字典描述",
105
+ prop: "description"
106
+ }, {
107
+ default: l(() => [
108
+ t(r, {
109
+ modelValue: o.description,
110
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => o.description = a),
111
+ placeholder: "请输入字典描述",
112
+ type: "textarea",
113
+ rows: 3
114
+ }, null, 8, ["modelValue"])
115
+ ]),
116
+ _: 1
117
+ }),
118
+ t(i, {
119
+ label: "状态",
120
+ prop: "status"
121
+ }, {
122
+ default: l(() => [
123
+ t(C, {
124
+ modelValue: o.status,
125
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => o.status = a)
126
+ }, {
127
+ default: l(() => [
128
+ t(_, { label: "启用" }, {
129
+ default: l(() => [...e[5] || (e[5] = [
130
+ m("启用", -1)
131
+ ])]),
132
+ _: 1
133
+ }),
134
+ t(_, { label: "禁用" }, {
135
+ default: l(() => [...e[6] || (e[6] = [
136
+ m("禁用", -1)
137
+ ])]),
138
+ _: 1
139
+ })
140
+ ]),
141
+ _: 1
142
+ }, 8, ["modelValue"])
143
+ ]),
144
+ _: 1
145
+ })
146
+ ]),
147
+ _: 1
148
+ }, 8, ["model"])
149
+ ]),
150
+ _: 1
151
+ }, 8, ["modelValue", "title"]);
152
+ };
153
+ }
154
+ });
155
+ export {
156
+ Q as default
157
+ };
@@ -0,0 +1,173 @@
1
+ import { g as j, E as B, j as F, h as I, i as N, d as q, v as M, k as T } from "./globalComponents-NGC1jMmM.js";
2
+ import { E as A, a as G } from "./el-form-item-DGYKf4A6.js";
3
+ /* empty css */
4
+ import { defineComponent as L, ref as i, reactive as z, createBlock as v, openBlock as b, withCtx as t, createVNode as o, createTextVNode as m, withDirectives as H } from "vue";
5
+ const W = /* @__PURE__ */ L({
6
+ name: "DictionaryValueModal",
7
+ __name: "DictionaryValueModal",
8
+ emits: ["confirm"],
9
+ setup(J, { expose: g, emit: y }) {
10
+ const s = i(!1), r = i(!1), c = i("新增字典值"), p = i(), l = z({
11
+ name: "",
12
+ code: "",
13
+ displayOrder: 1,
14
+ description: "",
15
+ status: "启用"
16
+ }), E = {
17
+ code: [{ required: !0, message: "请输入字典值编码", trigger: "blur" }],
18
+ name: [{ required: !0, message: "请输入字典值名称", trigger: "blur" }]
19
+ }, k = y, x = (u, e = "新增字典值") => {
20
+ r.value = !1, s.value = !0, c.value = e, Object.keys(l).forEach((n) => {
21
+ delete l[n];
22
+ }), Object.assign(l, {
23
+ name: "",
24
+ code: "",
25
+ displayOrder: 1,
26
+ description: "",
27
+ status: "启用",
28
+ ...u
29
+ });
30
+ }, f = () => {
31
+ s.value = !1, p.value?.resetFields();
32
+ }, w = async () => {
33
+ try {
34
+ await p.value?.validate(), r.value = !0, (await T(l)).code === "ok" ? (k("confirm", { ...l }), f()) : r.value = !1;
35
+ } catch {
36
+ r.value = !1;
37
+ }
38
+ };
39
+ return g({
40
+ open: x
41
+ }), (u, e) => {
42
+ const n = B, d = G, C = F, _ = N, O = I, D = A, V = q, U = j, R = M;
43
+ return b(), v(U, {
44
+ modelValue: s.value,
45
+ "onUpdate:modelValue": e[5] || (e[5] = (a) => s.value = a),
46
+ title: c.value,
47
+ width: "500px",
48
+ "close-on-click-modal": !1,
49
+ onClose: f
50
+ }, {
51
+ footer: t(() => [
52
+ o(V, { onClick: f }, {
53
+ default: t(() => [...e[8] || (e[8] = [
54
+ m("取消", -1)
55
+ ])]),
56
+ _: 1
57
+ }),
58
+ H((b(), v(V, {
59
+ type: "primary",
60
+ onClick: w
61
+ }, {
62
+ default: t(() => [...e[9] || (e[9] = [
63
+ m("确定", -1)
64
+ ])]),
65
+ _: 1
66
+ })), [
67
+ [R, r.value]
68
+ ])
69
+ ]),
70
+ default: t(() => [
71
+ o(D, {
72
+ ref_key: "formRef",
73
+ ref: p,
74
+ model: l,
75
+ rules: E,
76
+ "label-width": "100px"
77
+ }, {
78
+ default: t(() => [
79
+ o(d, {
80
+ label: "字典值编码",
81
+ prop: "code"
82
+ }, {
83
+ default: t(() => [
84
+ o(n, {
85
+ modelValue: l.code,
86
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => l.code = a),
87
+ placeholder: "请输入字典值编码"
88
+ }, null, 8, ["modelValue"])
89
+ ]),
90
+ _: 1
91
+ }),
92
+ o(d, {
93
+ label: "字典值名称",
94
+ prop: "name"
95
+ }, {
96
+ default: t(() => [
97
+ o(n, {
98
+ modelValue: l.name,
99
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => l.name = a),
100
+ placeholder: "请输入字典值名称"
101
+ }, null, 8, ["modelValue"])
102
+ ]),
103
+ _: 1
104
+ }),
105
+ o(d, {
106
+ label: "显示顺序",
107
+ prop: "displayOrder"
108
+ }, {
109
+ default: t(() => [
110
+ o(C, {
111
+ modelValue: l.displayOrder,
112
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => l.displayOrder = a),
113
+ min: 1,
114
+ placeholder: "请输入显示顺序"
115
+ }, null, 8, ["modelValue"])
116
+ ]),
117
+ _: 1
118
+ }),
119
+ o(d, {
120
+ label: "字典值描述",
121
+ prop: "description"
122
+ }, {
123
+ default: t(() => [
124
+ o(n, {
125
+ modelValue: l.description,
126
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => l.description = a),
127
+ placeholder: "请输入字典值描述",
128
+ type: "textarea",
129
+ rows: 3
130
+ }, null, 8, ["modelValue"])
131
+ ]),
132
+ _: 1
133
+ }),
134
+ o(d, {
135
+ label: "状态",
136
+ prop: "status"
137
+ }, {
138
+ default: t(() => [
139
+ o(O, {
140
+ modelValue: l.status,
141
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => l.status = a)
142
+ }, {
143
+ default: t(() => [
144
+ o(_, { label: "启用" }, {
145
+ default: t(() => [...e[6] || (e[6] = [
146
+ m("启用", -1)
147
+ ])]),
148
+ _: 1
149
+ }),
150
+ o(_, { label: "禁用" }, {
151
+ default: t(() => [...e[7] || (e[7] = [
152
+ m("禁用", -1)
153
+ ])]),
154
+ _: 1
155
+ })
156
+ ]),
157
+ _: 1
158
+ }, 8, ["modelValue"])
159
+ ]),
160
+ _: 1
161
+ })
162
+ ]),
163
+ _: 1
164
+ }, 8, ["model"])
165
+ ]),
166
+ _: 1
167
+ }, 8, ["modelValue", "title"]);
168
+ };
169
+ }
170
+ });
171
+ export {
172
+ W as default
173
+ };