zsysview 0.0.26 → 0.0.28

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.
Files changed (45) hide show
  1. package/dist/backup-BKq6sQjF.js +519 -0
  2. package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-Ca489fLF.js +43 -0
  3. package/dist/change_password-DHURkzza.js +135 -0
  4. package/dist/department-nsjoJXue.js +410 -0
  5. package/dist/desktop-CcKDaeCI.js +9 -0
  6. package/dist/http_api_v1-CkjqXdob.js +1008 -0
  7. package/dist/index-BGMV_V_g.js +6688 -0
  8. package/dist/{index-BaFHeDAF.js → index-DG0x9mYD.js} +105 -105
  9. package/dist/index.es-DrN1BLo5.js +170 -0
  10. package/dist/log-4jRKPEKy.js +163 -0
  11. package/dist/login-Df4BMtP8.js +111 -0
  12. package/dist/main-CaR_6gzq.js +293 -0
  13. package/dist/message-CVTa4Hb1.js +26 -0
  14. package/dist/position-UV9V8NKa.js +311 -0
  15. package/dist/role-Co7zqJq3.js +405 -0
  16. package/dist/self-CZaIzR2G.js +102 -0
  17. package/dist/sys-BZgBUI3k.js +30 -0
  18. package/dist/user-D8k4kb-7.js +650 -0
  19. package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-JGPGvAqL.js +72 -0
  20. package/dist/zsys_eventBus-CZOk9fTb.js +178 -0
  21. package/dist/zsys_time-4KclnYJN.js +17 -0
  22. package/dist/zsyslist.vue_vue_type_script_setup_true_lang-C714Dj9O.js +465 -0
  23. package/dist/zsysview.es.js +1 -1
  24. package/package.json +1 -1
  25. package/dist/backup-BrCAKHW5.js +0 -519
  26. package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-DxqktuR5.js +0 -43
  27. package/dist/change_password-CY87a5gc.js +0 -135
  28. package/dist/department-BDW7DB5F.js +0 -410
  29. package/dist/desktop-DgyBqclt.js +0 -9
  30. package/dist/http_api_v1-BQLGtV9G.js +0 -1008
  31. package/dist/index-DXGp4B8l.js +0 -6688
  32. package/dist/index.es-BcGc183Q.js +0 -170
  33. package/dist/log-2ZY0HGuh.js +0 -163
  34. package/dist/login-BAuvM04T.js +0 -111
  35. package/dist/main-CxdkVN-C.js +0 -293
  36. package/dist/message-CdVUOGzt.js +0 -26
  37. package/dist/position-D7wr1m96.js +0 -311
  38. package/dist/role-M_ZYR2ta.js +0 -405
  39. package/dist/self-DAB-5Co8.js +0 -102
  40. package/dist/sys-BjlP52cg.js +0 -30
  41. package/dist/user-CEaf7VIW.js +0 -650
  42. package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-BYahBvHu.js +0 -72
  43. package/dist/zsys_eventBus-DDrk0Aw8.js +0 -178
  44. package/dist/zsys_time-DHEMuVgo.js +0 -17
  45. package/dist/zsyslist.vue_vue_type_script_setup_true_lang-Bl1QXOML.js +0 -466
@@ -0,0 +1,311 @@
1
+ import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createElementVNode, createCommentVNode, createTextVNode, createElementBlock, Fragment, unref } from "vue";
2
+ import { _ as _sfc_main$2 } from "./breadcrumb.vue_vue_type_script_setup_true_lang-Ca489fLF.js";
3
+ import { _ as _sfc_main$3 } from "./zsyslist.vue_vue_type_script_setup_true_lang-C714Dj9O.js";
4
+ import { H as HttpApiV1 } from "./http_api_v1-CkjqXdob.js";
5
+ import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
6
+ import { z as zsysEventBus, u as useMagicKeys, w as whenever } from "./zsys_eventBus-CZOk9fTb.js";
7
+ import { _ as _sfc_main$4 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-JGPGvAqL.js";
8
+ const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
9
+ __name: "position_edit_dialog",
10
+ props: {
11
+ modelValue: { type: Boolean, required: !0 },
12
+ // 控制显示隐藏
13
+ id: { type: BigInt, required: !0 }
14
+ },
15
+ emits: ["update:modelValue"],
16
+ setup(__props, { emit: __emit }) {
17
+ const eventBus = zsysEventBus(), inputRef = ref(null), props = __props, emit = __emit, visible = ref(!1);
18
+ watch(
19
+ () => props.modelValue,
20
+ (val) => {
21
+ visible.value = val;
22
+ },
23
+ { immediate: !0 }
24
+ ), watch(visible, (val) => {
25
+ emit("update:modelValue", val);
26
+ });
27
+ const open = () => {
28
+ view.isnew = props.id == 0n, getData();
29
+ }, close = () => {
30
+ visible.value = !1;
31
+ }, handleBeforeClose = (done) => {
32
+ ruleFormRef.value?.clearValidate(), done();
33
+ }, view = reactive({
34
+ loading: !0,
35
+ saving: !1,
36
+ donotClose: !1,
37
+ isnew: !0
38
+ }), ruleFormRef = ref(), form = ref({
39
+ position_id: props.id,
40
+ position_title: "",
41
+ position_notes: ""
42
+ }), rules = reactive({
43
+ position_title: [
44
+ { required: !0, message: "请输入职务名称", trigger: "blur" }
45
+ ]
46
+ }), getData = async () => {
47
+ if (view.loading = !0, form.value.position_id = props.id, props.id != 0n) {
48
+ view.donotClose = !1;
49
+ try {
50
+ let res = await HttpApiV1.Post(HttpApiV1.url_position_detail, { id: props.id });
51
+ if (res.IsSuccess) {
52
+ let data = res.data;
53
+ form.value = data;
54
+ }
55
+ } catch (e) {
56
+ console.log(e);
57
+ } finally {
58
+ }
59
+ } else
60
+ form.value.position_title = "", form.value.position_notes = "";
61
+ view.loading = !1;
62
+ }, saveData = async () => await HttpApiV1.Post(HttpApiV1.url_position_save, {
63
+ position_id: form.value.position_id,
64
+ position_title: form.value.position_title,
65
+ position_notes: form.value.position_notes
66
+ }), submitForm = (formEl) => {
67
+ formEl && formEl.validate(async (valid) => {
68
+ if (valid) {
69
+ view.saving = !0;
70
+ try {
71
+ let res = await saveData();
72
+ res.IsSuccess ? (view.donotClose ? setTimeout(() => {
73
+ focus();
74
+ }, 200) : close(), ZSYSMessage.ShowSuccess("保存成功"), eventBus.emit("aud", { module: "position", id: form.value.position_id })) : ZSYSMessage.ShowError(res.message);
75
+ } catch {
76
+ } finally {
77
+ view.saving = !1;
78
+ }
79
+ }
80
+ });
81
+ }, focus = () => {
82
+ inputRef.value?.focus(), inputRef.value?.select();
83
+ }, keys = useMagicKeys();
84
+ return whenever(keys.alt_s, () => {
85
+ visible.value && (console.log("Alt+S提交"), submitForm(ruleFormRef.value));
86
+ }), (_ctx, _cache) => {
87
+ const _component_el_input = resolveComponent("el-input"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_form = resolveComponent("el-form"), _component_el_checkbox = resolveComponent("el-checkbox"), _component_el_tooltip = resolveComponent("el-tooltip"), _component_el_text = resolveComponent("el-text"), _component_el_button = resolveComponent("el-button"), _component_el_dialog = resolveComponent("el-dialog"), _directive_loading = resolveDirective("loading");
88
+ return openBlock(), createBlock(_component_el_dialog, {
89
+ modelValue: visible.value,
90
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => visible.value = $event),
91
+ title: "职务",
92
+ "align-center": !0,
93
+ "before-close": handleBeforeClose,
94
+ onOpen: open,
95
+ width: "550",
96
+ draggable: !0,
97
+ overflow: !0,
98
+ onOpened: focus,
99
+ "destroy-on-close": ""
100
+ }, {
101
+ footer: withCtx(() => [
102
+ createElementVNode("div", _hoisted_1$1, [
103
+ form.value.position_id == 0n ? (openBlock(), createBlock(_component_el_tooltip, {
104
+ key: 0,
105
+ content: "保存成功后不关闭窗口"
106
+ }, {
107
+ default: withCtx(() => [
108
+ createVNode(_component_el_checkbox, {
109
+ modelValue: view.donotClose,
110
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => view.donotClose = $event),
111
+ label: "连续录入",
112
+ style: { "margin-right": "10px" }
113
+ }, null, 8, ["modelValue"])
114
+ ]),
115
+ _: 1
116
+ })) : createCommentVNode("", !0),
117
+ createVNode(_component_el_tooltip, {
118
+ content: "快捷键 Alt+S",
119
+ "show-after": 800
120
+ }, {
121
+ default: withCtx(() => [
122
+ createVNode(_component_el_button, {
123
+ type: "primary",
124
+ onClick: _cache[4] || (_cache[4] = ($event) => submitForm(ruleFormRef.value)),
125
+ disabled: view.loading,
126
+ loading: view.saving
127
+ }, {
128
+ default: withCtx(() => [
129
+ _cache[7] || (_cache[7] = createTextVNode("保存(", -1)),
130
+ createVNode(_component_el_text, {
131
+ tag: "ins",
132
+ style: { color: "white" }
133
+ }, {
134
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
135
+ createTextVNode("S", -1)
136
+ ])]),
137
+ _: 1
138
+ }),
139
+ _cache[8] || (_cache[8] = createTextVNode(")", -1))
140
+ ]),
141
+ _: 1
142
+ }, 8, ["disabled", "loading"])
143
+ ]),
144
+ _: 1
145
+ }),
146
+ createVNode(_component_el_button, { onClick: close }, {
147
+ default: withCtx(() => [..._cache[9] || (_cache[9] = [
148
+ createTextVNode("取消", -1)
149
+ ])]),
150
+ _: 1
151
+ })
152
+ ])
153
+ ]),
154
+ default: withCtx(() => [
155
+ withDirectives((openBlock(), createBlock(_component_el_form, {
156
+ onSubmit: _cache[2] || (_cache[2] = withModifiers(() => {
157
+ }, ["prevent"])),
158
+ ref_key: "ruleFormRef",
159
+ ref: ruleFormRef,
160
+ model: form.value,
161
+ rules,
162
+ style: { "padding-left": "10px", "padding-right": "10px" },
163
+ "label-width": "auto",
164
+ disabled: view.saving
165
+ }, {
166
+ default: withCtx(() => [
167
+ createVNode(_component_el_form_item, {
168
+ label: "职务名称",
169
+ prop: "position_title"
170
+ }, {
171
+ default: withCtx(() => [
172
+ createVNode(_component_el_input, {
173
+ ref_key: "inputRef",
174
+ ref: inputRef,
175
+ modelValue: form.value.position_title,
176
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.value.position_title = $event)
177
+ }, null, 8, ["modelValue"])
178
+ ]),
179
+ _: 1
180
+ }),
181
+ createVNode(_component_el_form_item, {
182
+ label: "备注",
183
+ prop: "position_notes"
184
+ }, {
185
+ default: withCtx(() => [
186
+ createVNode(_component_el_input, {
187
+ modelValue: form.value.position_notes,
188
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.value.position_notes = $event),
189
+ type: "textarea",
190
+ rows: 4
191
+ }, null, 8, ["modelValue"])
192
+ ]),
193
+ _: 1
194
+ })
195
+ ]),
196
+ _: 1
197
+ }, 8, ["model", "rules", "disabled"])), [
198
+ [_directive_loading, view.loading]
199
+ ])
200
+ ]),
201
+ _: 1
202
+ }, 8, ["modelValue"]);
203
+ };
204
+ }
205
+ }), _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
206
+ __name: "position",
207
+ setup(__props) {
208
+ const activeName = ref("first"), handleClick = (tab, event) => {
209
+ console.log(tab, event);
210
+ }, view = reactive({
211
+ edit_id: 0n,
212
+ edit_dialog_show: !1
213
+ }), listconfig = reactive({
214
+ ApiUrl: HttpApiV1.url_position_list,
215
+ QuickConditionsGroups: []
216
+ });
217
+ return (_ctx, _cache) => {
218
+ const _component_el_button = resolveComponent("el-button"), _component_el_table_column = resolveComponent("el-table-column"), _component_el_link = resolveComponent("el-link"), _component_el_space = resolveComponent("el-space"), _component_el_tab_pane = resolveComponent("el-tab-pane"), _component_el_tabs = resolveComponent("el-tabs");
219
+ return openBlock(), createElementBlock(Fragment, null, [
220
+ createVNode(_sfc_main$2),
221
+ createElementVNode("div", _hoisted_1, [
222
+ createVNode(_component_el_tabs, {
223
+ modelValue: activeName.value,
224
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeName.value = $event),
225
+ onTabClick: handleClick
226
+ }, {
227
+ default: withCtx(() => [
228
+ createVNode(_component_el_tab_pane, {
229
+ label: "全部职务",
230
+ name: "first"
231
+ }, {
232
+ default: withCtx(() => [
233
+ createVNode(_sfc_main$3, {
234
+ config: listconfig,
235
+ module: "position"
236
+ }, {
237
+ headermain: withCtx(() => [
238
+ createVNode(_component_el_button, {
239
+ class: "main_btn",
240
+ type: "primary",
241
+ onClick: _cache[0] || (_cache[0] = ($event) => {
242
+ view.edit_id = 0n, view.edit_dialog_show = !0;
243
+ })
244
+ }, {
245
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
246
+ createTextVNode("新建", -1)
247
+ ])]),
248
+ _: 1
249
+ })
250
+ ]),
251
+ content: withCtx(() => [
252
+ createVNode(_component_el_table_column, {
253
+ prop: "position_title",
254
+ label: "职务名称",
255
+ width: "140"
256
+ }),
257
+ createVNode(_component_el_table_column, {
258
+ prop: "position_notes",
259
+ label: "备注",
260
+ "min-width": "180"
261
+ }),
262
+ createVNode(_component_el_table_column, {
263
+ label: "操作",
264
+ width: "100"
265
+ }, {
266
+ default: withCtx(({ row }) => [
267
+ createVNode(_component_el_space, null, {
268
+ default: withCtx(() => [
269
+ createVNode(_component_el_link, {
270
+ type: "primary",
271
+ onClick: ($event) => {
272
+ view.edit_id = BigInt(row.position_id), view.edit_dialog_show = !0;
273
+ }
274
+ }, {
275
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
276
+ createTextVNode("修改", -1)
277
+ ])]),
278
+ _: 1
279
+ }, 8, ["onClick"]),
280
+ createVNode(_sfc_main$4, {
281
+ id: BigInt(row.position_id),
282
+ api_url: unref(HttpApiV1).url_position_del
283
+ }, null, 8, ["id", "api_url"])
284
+ ]),
285
+ _: 2
286
+ }, 1024)
287
+ ]),
288
+ _: 1
289
+ })
290
+ ]),
291
+ _: 1
292
+ }, 8, ["config"])
293
+ ]),
294
+ _: 1
295
+ })
296
+ ]),
297
+ _: 1
298
+ }, 8, ["modelValue"])
299
+ ]),
300
+ createVNode(_sfc_main$1, {
301
+ id: view.edit_id,
302
+ modelValue: view.edit_dialog_show,
303
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => view.edit_dialog_show = $event)
304
+ }, null, 8, ["id", "modelValue"])
305
+ ], 64);
306
+ };
307
+ }
308
+ });
309
+ export {
310
+ _sfc_main as default
311
+ };