zsysview 0.0.26 → 0.0.27
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/backup-DgoJ-AYS.js +519 -0
- package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-CGEOrj8x.js +43 -0
- package/dist/change_password-CfTKlKzq.js +135 -0
- package/dist/department-SWj0HA-l.js +410 -0
- package/dist/desktop-le1cI27_.js +9 -0
- package/dist/http_api_v1-d9smAbJZ.js +1008 -0
- package/dist/index-BZZm3CTh.js +6688 -0
- package/dist/{index-BaFHeDAF.js → index-DG0x9mYD.js} +105 -105
- package/dist/index.es-DrN1BLo5.js +170 -0
- package/dist/log-D-BDBVS7.js +163 -0
- package/dist/login-DUn4tmOp.js +111 -0
- package/dist/main-Bgkb3hrI.js +293 -0
- package/dist/message-CVTa4Hb1.js +26 -0
- package/dist/position-D7u-VoeU.js +311 -0
- package/dist/role-CyCsBm0V.js +405 -0
- package/dist/self-BRTR2NdM.js +102 -0
- package/dist/sys-BZgBUI3k.js +30 -0
- package/dist/user-cl8kQwmL.js +650 -0
- package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-Dqud3QQ4.js +72 -0
- package/dist/zsys_eventBus-CZOk9fTb.js +178 -0
- package/dist/zsys_time-4KclnYJN.js +17 -0
- package/dist/zsyslist.vue_vue_type_script_setup_true_lang-BE2Kl33t.js +466 -0
- package/dist/zsysview.es.js +1 -1
- package/package.json +1 -1
- package/dist/backup-BrCAKHW5.js +0 -519
- package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-DxqktuR5.js +0 -43
- package/dist/change_password-CY87a5gc.js +0 -135
- package/dist/department-BDW7DB5F.js +0 -410
- package/dist/desktop-DgyBqclt.js +0 -9
- package/dist/http_api_v1-BQLGtV9G.js +0 -1008
- package/dist/index-DXGp4B8l.js +0 -6688
- package/dist/index.es-BcGc183Q.js +0 -170
- package/dist/log-2ZY0HGuh.js +0 -163
- package/dist/login-BAuvM04T.js +0 -111
- package/dist/main-CxdkVN-C.js +0 -293
- package/dist/message-CdVUOGzt.js +0 -26
- package/dist/position-D7wr1m96.js +0 -311
- package/dist/role-M_ZYR2ta.js +0 -405
- package/dist/self-DAB-5Co8.js +0 -102
- package/dist/sys-BjlP52cg.js +0 -30
- package/dist/user-CEaf7VIW.js +0 -650
- package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-BYahBvHu.js +0 -72
- package/dist/zsys_eventBus-DDrk0Aw8.js +0 -178
- package/dist/zsys_time-DHEMuVgo.js +0 -17
- package/dist/zsyslist.vue_vue_type_script_setup_true_lang-Bl1QXOML.js +0 -466
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { defineComponent, ref, reactive, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "./breadcrumb.vue_vue_type_script_setup_true_lang-CGEOrj8x.js";
|
|
3
|
+
import { H as HttpApiV1 } from "./http_api_v1-d9smAbJZ.js";
|
|
4
|
+
import { u as useRouter } from "./index-BZZm3CTh.js";
|
|
5
|
+
import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
|
|
6
|
+
import { h } from "./index.es-DrN1BLo5.js";
|
|
7
|
+
const _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "change_password",
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const ruleFormRef = ref(), r = useRouter(), goBack = () => {
|
|
11
|
+
r.back();
|
|
12
|
+
}, view = reactive({
|
|
13
|
+
isloading: !1
|
|
14
|
+
}), form_data = reactive({
|
|
15
|
+
old_p: "",
|
|
16
|
+
new_p1: "",
|
|
17
|
+
new_p2: ""
|
|
18
|
+
}), rules = reactive({
|
|
19
|
+
old_p: [
|
|
20
|
+
{ required: !0, message: "请输入旧密码", trigger: "blur" }
|
|
21
|
+
],
|
|
22
|
+
new_p1: [
|
|
23
|
+
{ required: !0, message: "请输入新密码", trigger: "blur" },
|
|
24
|
+
{ min: 6, max: 18, message: "密码长度为6-18位", trigger: "blur" }
|
|
25
|
+
],
|
|
26
|
+
new_p2: [
|
|
27
|
+
{ required: !0, message: "请输入新密码", trigger: "blur" },
|
|
28
|
+
{ min: 6, max: 18, message: "密码长度为6-18位", trigger: "blur" }
|
|
29
|
+
]
|
|
30
|
+
}), submitForm = (formEl) => {
|
|
31
|
+
formEl && formEl.validate((valid) => {
|
|
32
|
+
valid ? (view.isloading = !0, HttpApiV1.Post(HttpApiV1.url_change_password, {
|
|
33
|
+
old_p: h.hashStr(form_data.old_p),
|
|
34
|
+
new_p: h.hashStr(form_data.new_p1)
|
|
35
|
+
}).then((res) => {
|
|
36
|
+
res.IsSuccess ? (ZSYSMessage.ShowSuccess("密码修改成功"), r.back()) : ZSYSMessage.ShowError("密码修改失败");
|
|
37
|
+
}).catch((err) => {
|
|
38
|
+
console.log(err);
|
|
39
|
+
}).finally(() => {
|
|
40
|
+
view.isloading = !1;
|
|
41
|
+
})) : console.log("error submit!");
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
const _component_el_input = resolveComponent("el-input"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_button = resolveComponent("el-button"), _component_el_form = resolveComponent("el-form");
|
|
46
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
47
|
+
createVNode(_sfc_main$1),
|
|
48
|
+
createElementVNode("div", _hoisted_1, [
|
|
49
|
+
createVNode(_component_el_form, {
|
|
50
|
+
ref_key: "ruleFormRef",
|
|
51
|
+
ref: ruleFormRef,
|
|
52
|
+
"label-width": "auto",
|
|
53
|
+
style: { "max-width": "400px", "margin-left": "80px" },
|
|
54
|
+
rules,
|
|
55
|
+
model: form_data,
|
|
56
|
+
"status-icon": ""
|
|
57
|
+
}, {
|
|
58
|
+
default: withCtx(() => [
|
|
59
|
+
createVNode(_component_el_form_item, {
|
|
60
|
+
label: "旧密码",
|
|
61
|
+
prop: "old_p"
|
|
62
|
+
}, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
createVNode(_component_el_input, {
|
|
65
|
+
modelValue: form_data.old_p,
|
|
66
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form_data.old_p = $event),
|
|
67
|
+
size: "large",
|
|
68
|
+
"show-password": ""
|
|
69
|
+
}, null, 8, ["modelValue"])
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
}),
|
|
73
|
+
createVNode(_component_el_form_item, {
|
|
74
|
+
label: "新密码",
|
|
75
|
+
prop: "new_p1"
|
|
76
|
+
}, {
|
|
77
|
+
default: withCtx(() => [
|
|
78
|
+
createVNode(_component_el_input, {
|
|
79
|
+
modelValue: form_data.new_p1,
|
|
80
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form_data.new_p1 = $event),
|
|
81
|
+
size: "large",
|
|
82
|
+
"show-password": ""
|
|
83
|
+
}, null, 8, ["modelValue"])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}),
|
|
87
|
+
createVNode(_component_el_form_item, {
|
|
88
|
+
label: "再次输入新密码",
|
|
89
|
+
prop: "new_p2"
|
|
90
|
+
}, {
|
|
91
|
+
default: withCtx(() => [
|
|
92
|
+
createVNode(_component_el_input, {
|
|
93
|
+
modelValue: form_data.new_p2,
|
|
94
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form_data.new_p2 = $event),
|
|
95
|
+
size: "large",
|
|
96
|
+
"show-password": ""
|
|
97
|
+
}, null, 8, ["modelValue"])
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}),
|
|
101
|
+
createVNode(_component_el_form_item, { style: { "margin-left": "120px" } }, {
|
|
102
|
+
default: withCtx(() => [
|
|
103
|
+
createVNode(_component_el_button, {
|
|
104
|
+
type: "primary",
|
|
105
|
+
onClick: _cache[3] || (_cache[3] = ($event) => submitForm(ruleFormRef.value)),
|
|
106
|
+
loading: view.isloading
|
|
107
|
+
}, {
|
|
108
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
109
|
+
createTextVNode("确认修改", -1)
|
|
110
|
+
])]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["loading"]),
|
|
113
|
+
createVNode(_component_el_button, {
|
|
114
|
+
onClick: goBack,
|
|
115
|
+
disabled: view.isloading
|
|
116
|
+
}, {
|
|
117
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
118
|
+
createTextVNode("返回", -1)
|
|
119
|
+
])]),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 8, ["disabled"])
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
})
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["rules", "model"])
|
|
128
|
+
])
|
|
129
|
+
], 64);
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
export {
|
|
134
|
+
_sfc_main as default
|
|
135
|
+
};
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createElementVNode, createCommentVNode, createTextVNode, onMounted, onUnmounted, createElementBlock, Fragment, unref } from "vue";
|
|
2
|
+
import { _ as _sfc_main$2 } from "./breadcrumb.vue_vue_type_script_setup_true_lang-CGEOrj8x.js";
|
|
3
|
+
import { H as HttpApiV1 } from "./http_api_v1-d9smAbJZ.js";
|
|
4
|
+
import { j as refresh_default } from "./index-DG0x9mYD.js";
|
|
5
|
+
import { _ as _sfc_main$3 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-Dqud3QQ4.js";
|
|
6
|
+
import { z as zsysEventBus, u as useMagicKeys, w as whenever } from "./zsys_eventBus-CZOk9fTb.js";
|
|
7
|
+
import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
|
|
8
|
+
const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "department_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
|
+
});
|
|
39
|
+
props.id == 0n && (view.isnew = !0);
|
|
40
|
+
function convertDepartmentToParentOption(alldept) {
|
|
41
|
+
let re = [];
|
|
42
|
+
for (let i = 0; i < alldept.length; i++) {
|
|
43
|
+
const result = {
|
|
44
|
+
value: alldept[i].department_id.toString(),
|
|
45
|
+
label: alldept[i].department_title
|
|
46
|
+
};
|
|
47
|
+
alldept[i].children && alldept[i]?.children.length > 0 && (result.children = convertDepartmentToParentOption(alldept[i].children)), re.push(result);
|
|
48
|
+
}
|
|
49
|
+
return re;
|
|
50
|
+
}
|
|
51
|
+
const getParentOption = async () => {
|
|
52
|
+
let res = await HttpApiV1.Post(HttpApiV1.url_department_list, {});
|
|
53
|
+
return res.IsSuccess ? res.data.listdata : [];
|
|
54
|
+
}, parent_option = ref([]), ruleFormRef = ref(), form = ref({
|
|
55
|
+
department_id: props.id,
|
|
56
|
+
department_title: "",
|
|
57
|
+
department_sort: 9999,
|
|
58
|
+
parent_id_str: ""
|
|
59
|
+
}), rules = reactive({
|
|
60
|
+
department_title: [
|
|
61
|
+
{ required: !0, message: "请输入名称", trigger: "blur" }
|
|
62
|
+
]
|
|
63
|
+
}), getData = async () => {
|
|
64
|
+
if (view.loading = !0, parent_option.value = convertDepartmentToParentOption(await getParentOption()), console.log(parent_option), form.value.department_id = props.id, props.id != 0n) {
|
|
65
|
+
view.donotClose = !1;
|
|
66
|
+
try {
|
|
67
|
+
let res = await HttpApiV1.Post(HttpApiV1.url_department_detail, { id: props.id });
|
|
68
|
+
if (res.IsSuccess) {
|
|
69
|
+
let data = res.data;
|
|
70
|
+
form.value.department_id = data.department_id, form.value.department_title = data.department_title;
|
|
71
|
+
let pid_str = data.parent_id.toString();
|
|
72
|
+
form.value.parent_id_str = pid_str == "0" ? "" : pid_str, form.value.department_sort = data.department_sort;
|
|
73
|
+
}
|
|
74
|
+
} catch (e) {
|
|
75
|
+
console.log(e);
|
|
76
|
+
} finally {
|
|
77
|
+
}
|
|
78
|
+
} else
|
|
79
|
+
form.value.department_title = "";
|
|
80
|
+
view.loading = !1;
|
|
81
|
+
}, saveData = async () => await HttpApiV1.Post(HttpApiV1.url_department_save, {
|
|
82
|
+
department_id: form.value.department_id,
|
|
83
|
+
department_title: form.value.department_title,
|
|
84
|
+
department_sort: form.value.department_sort,
|
|
85
|
+
parent_id: BigInt(form.value.parent_id_str)
|
|
86
|
+
}), submitForm = (formEl) => {
|
|
87
|
+
formEl && formEl.validate(async (valid) => {
|
|
88
|
+
if (valid) {
|
|
89
|
+
view.saving = !0;
|
|
90
|
+
try {
|
|
91
|
+
let res = await saveData();
|
|
92
|
+
res.IsSuccess ? (view.donotClose ? (form.value.department_id = 0n, setTimeout(() => {
|
|
93
|
+
focus();
|
|
94
|
+
}, 200)) : close(), ZSYSMessage.ShowSuccess("保存成功"), eventBus.emit("aud", { module: "department", id: form.value.department_id })) : ZSYSMessage.ShowError(res.message);
|
|
95
|
+
} catch {
|
|
96
|
+
} finally {
|
|
97
|
+
view.saving = !1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}, focus = () => {
|
|
102
|
+
inputRef.value?.focus(), inputRef.value?.select();
|
|
103
|
+
}, keys = useMagicKeys();
|
|
104
|
+
return whenever(keys.alt_s, () => {
|
|
105
|
+
visible.value && (console.log("Alt+S提交"), submitForm(ruleFormRef.value));
|
|
106
|
+
}), (_ctx, _cache) => {
|
|
107
|
+
const _component_el_input = resolveComponent("el-input"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_tree_select = resolveComponent("el-tree-select"), _component_el_input_number = resolveComponent("el-input-number"), _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");
|
|
108
|
+
return openBlock(), createBlock(_component_el_dialog, {
|
|
109
|
+
modelValue: visible.value,
|
|
110
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => visible.value = $event),
|
|
111
|
+
title: "组织架构节点",
|
|
112
|
+
"align-center": !0,
|
|
113
|
+
"before-close": handleBeforeClose,
|
|
114
|
+
onOpen: open,
|
|
115
|
+
width: "550",
|
|
116
|
+
draggable: !0,
|
|
117
|
+
overflow: !0,
|
|
118
|
+
onOpened: focus,
|
|
119
|
+
"destroy-on-close": "",
|
|
120
|
+
"close-on-click-modal": !1
|
|
121
|
+
}, {
|
|
122
|
+
footer: withCtx(() => [
|
|
123
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
124
|
+
view.isnew ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
125
|
+
key: 0,
|
|
126
|
+
content: "保存成功后不关闭窗口"
|
|
127
|
+
}, {
|
|
128
|
+
default: withCtx(() => [
|
|
129
|
+
createVNode(_component_el_checkbox, {
|
|
130
|
+
modelValue: view.donotClose,
|
|
131
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => view.donotClose = $event),
|
|
132
|
+
label: "连续录入",
|
|
133
|
+
style: { "margin-right": "10px" }
|
|
134
|
+
}, null, 8, ["modelValue"])
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
})) : createCommentVNode("", !0),
|
|
138
|
+
createVNode(_component_el_tooltip, {
|
|
139
|
+
content: "快捷键 Alt+S",
|
|
140
|
+
"show-after": 800
|
|
141
|
+
}, {
|
|
142
|
+
default: withCtx(() => [
|
|
143
|
+
createVNode(_component_el_button, {
|
|
144
|
+
type: "primary",
|
|
145
|
+
onClick: _cache[5] || (_cache[5] = ($event) => submitForm(ruleFormRef.value)),
|
|
146
|
+
disabled: view.loading,
|
|
147
|
+
loading: view.saving
|
|
148
|
+
}, {
|
|
149
|
+
default: withCtx(() => [
|
|
150
|
+
_cache[8] || (_cache[8] = createTextVNode("保存(", -1)),
|
|
151
|
+
createVNode(_component_el_text, {
|
|
152
|
+
tag: "ins",
|
|
153
|
+
style: { color: "white" }
|
|
154
|
+
}, {
|
|
155
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
156
|
+
createTextVNode("S", -1)
|
|
157
|
+
])]),
|
|
158
|
+
_: 1
|
|
159
|
+
}),
|
|
160
|
+
_cache[9] || (_cache[9] = createTextVNode(")", -1))
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 8, ["disabled", "loading"])
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}),
|
|
167
|
+
createVNode(_component_el_button, { onClick: close }, {
|
|
168
|
+
default: withCtx(() => [..._cache[10] || (_cache[10] = [
|
|
169
|
+
createTextVNode("取消", -1)
|
|
170
|
+
])]),
|
|
171
|
+
_: 1
|
|
172
|
+
})
|
|
173
|
+
])
|
|
174
|
+
]),
|
|
175
|
+
default: withCtx(() => [
|
|
176
|
+
withDirectives((openBlock(), createBlock(_component_el_form, {
|
|
177
|
+
onSubmit: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
178
|
+
}, ["prevent"])),
|
|
179
|
+
ref_key: "ruleFormRef",
|
|
180
|
+
ref: ruleFormRef,
|
|
181
|
+
model: form.value,
|
|
182
|
+
rules,
|
|
183
|
+
style: { "padding-left": "10px", "padding-right": "10px" },
|
|
184
|
+
"label-width": "auto",
|
|
185
|
+
disabled: view.saving
|
|
186
|
+
}, {
|
|
187
|
+
default: withCtx(() => [
|
|
188
|
+
createVNode(_component_el_form_item, {
|
|
189
|
+
label: "名称",
|
|
190
|
+
prop: "department_title"
|
|
191
|
+
}, {
|
|
192
|
+
default: withCtx(() => [
|
|
193
|
+
createVNode(_component_el_input, {
|
|
194
|
+
ref_key: "inputRef",
|
|
195
|
+
ref: inputRef,
|
|
196
|
+
modelValue: form.value.department_title,
|
|
197
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.value.department_title = $event),
|
|
198
|
+
style: { width: "300px" }
|
|
199
|
+
}, null, 8, ["modelValue"])
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}),
|
|
203
|
+
createVNode(_component_el_form_item, {
|
|
204
|
+
label: "上级部门/组织",
|
|
205
|
+
prop: "de"
|
|
206
|
+
}, {
|
|
207
|
+
default: withCtx(() => [
|
|
208
|
+
createVNode(_component_el_tree_select, {
|
|
209
|
+
modelValue: form.value.parent_id_str,
|
|
210
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.value.parent_id_str = $event),
|
|
211
|
+
data: parent_option.value,
|
|
212
|
+
"check-strictly": "",
|
|
213
|
+
"render-after-expand": !0,
|
|
214
|
+
"show-checkbox": "",
|
|
215
|
+
"check-on-click-node": "",
|
|
216
|
+
placeholder: "不选代表无上级",
|
|
217
|
+
style: { width: "240px" },
|
|
218
|
+
clearable: ""
|
|
219
|
+
}, null, 8, ["modelValue", "data"])
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
}),
|
|
223
|
+
createVNode(_component_el_form_item, {
|
|
224
|
+
label: "排序",
|
|
225
|
+
prop: "department_sort"
|
|
226
|
+
}, {
|
|
227
|
+
default: withCtx(() => [
|
|
228
|
+
createVNode(_component_el_input_number, {
|
|
229
|
+
modelValue: form.value.department_sort,
|
|
230
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form.value.department_sort = $event),
|
|
231
|
+
min: 1
|
|
232
|
+
}, null, 8, ["modelValue"])
|
|
233
|
+
]),
|
|
234
|
+
_: 1
|
|
235
|
+
})
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["model", "rules", "disabled"])), [
|
|
239
|
+
[_directive_loading, view.loading]
|
|
240
|
+
])
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
}, 8, ["modelValue"]);
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
}), _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
247
|
+
__name: "department",
|
|
248
|
+
setup(__props) {
|
|
249
|
+
const activeName = ref("first"), eventBus = zsysEventBus(), tableData = ref([]), view = reactive({
|
|
250
|
+
edit_id: BigInt(0),
|
|
251
|
+
edit_dialog_show: !1
|
|
252
|
+
}), refresh = () => {
|
|
253
|
+
getData();
|
|
254
|
+
}, getData = async () => {
|
|
255
|
+
try {
|
|
256
|
+
let res = await HttpApiV1.Post(HttpApiV1.url_department_list, {});
|
|
257
|
+
res.IsSuccess && (tableData.value = res.data?.listdata);
|
|
258
|
+
} catch (e) {
|
|
259
|
+
console.log(e);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
onMounted(() => {
|
|
263
|
+
eventBus.on("aud", aud_event), getData();
|
|
264
|
+
}), onUnmounted(() => {
|
|
265
|
+
eventBus.off("aud", aud_event);
|
|
266
|
+
});
|
|
267
|
+
const aud_event = (payload) => {
|
|
268
|
+
(payload.module = "department") && getData();
|
|
269
|
+
};
|
|
270
|
+
return (_ctx, _cache) => {
|
|
271
|
+
const _component_el_button = resolveComponent("el-button"), _component_el_tooltip = resolveComponent("el-tooltip"), _component_el_space = resolveComponent("el-space"), _component_el_col = resolveComponent("el-col"), _component_el_row = resolveComponent("el-row"), _component_el_table_column = resolveComponent("el-table-column"), _component_el_link = resolveComponent("el-link"), _component_el_empty = resolveComponent("el-empty"), _component_el_table = resolveComponent("el-table"), _component_el_tab_pane = resolveComponent("el-tab-pane"), _component_el_alert = resolveComponent("el-alert"), _component_el_tabs = resolveComponent("el-tabs");
|
|
272
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
273
|
+
createVNode(_sfc_main$2),
|
|
274
|
+
createElementVNode("div", _hoisted_1, [
|
|
275
|
+
createVNode(_component_el_tabs, {
|
|
276
|
+
modelValue: activeName.value,
|
|
277
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeName.value = $event)
|
|
278
|
+
}, {
|
|
279
|
+
default: withCtx(() => [
|
|
280
|
+
createVNode(_component_el_tab_pane, {
|
|
281
|
+
label: "组织架构",
|
|
282
|
+
name: "first"
|
|
283
|
+
}, {
|
|
284
|
+
default: withCtx(() => [
|
|
285
|
+
createVNode(_component_el_row, null, {
|
|
286
|
+
default: withCtx(() => [
|
|
287
|
+
createVNode(_component_el_col, { span: 24 }, {
|
|
288
|
+
default: withCtx(() => [
|
|
289
|
+
createVNode(_component_el_space, {
|
|
290
|
+
size: 4,
|
|
291
|
+
wrap: ""
|
|
292
|
+
}, {
|
|
293
|
+
default: withCtx(() => [
|
|
294
|
+
createVNode(_component_el_button, {
|
|
295
|
+
class: "main_btn",
|
|
296
|
+
type: "primary",
|
|
297
|
+
onClick: _cache[0] || (_cache[0] = ($event) => {
|
|
298
|
+
view.edit_id = 0n, view.edit_dialog_show = !0;
|
|
299
|
+
})
|
|
300
|
+
}, {
|
|
301
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
302
|
+
createTextVNode("新建", -1)
|
|
303
|
+
])]),
|
|
304
|
+
_: 1
|
|
305
|
+
}),
|
|
306
|
+
createVNode(_component_el_tooltip, { content: "刷新列表数据" }, {
|
|
307
|
+
default: withCtx(() => [
|
|
308
|
+
createVNode(_component_el_button, {
|
|
309
|
+
icon: unref(refresh_default),
|
|
310
|
+
onClick: refresh
|
|
311
|
+
}, null, 8, ["icon"])
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
})
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
})
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
})
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
}),
|
|
324
|
+
createVNode(_component_el_table, {
|
|
325
|
+
data: tableData.value,
|
|
326
|
+
style: { width: "100%", "margin-bottom": "20px" },
|
|
327
|
+
"row-key": "department_id"
|
|
328
|
+
}, {
|
|
329
|
+
empty: withCtx(() => [
|
|
330
|
+
createVNode(_component_el_empty, {
|
|
331
|
+
description: "无相关部门数据",
|
|
332
|
+
"image-size": 100
|
|
333
|
+
})
|
|
334
|
+
]),
|
|
335
|
+
default: withCtx(() => [
|
|
336
|
+
createVNode(_component_el_table_column, {
|
|
337
|
+
prop: "department_title",
|
|
338
|
+
label: "名称",
|
|
339
|
+
"min-width": "300"
|
|
340
|
+
}),
|
|
341
|
+
createVNode(_component_el_table_column, {
|
|
342
|
+
prop: "department_sort",
|
|
343
|
+
label: "排序",
|
|
344
|
+
width: "80"
|
|
345
|
+
}),
|
|
346
|
+
createVNode(_component_el_table_column, {
|
|
347
|
+
prop: "department_title",
|
|
348
|
+
label: "操作",
|
|
349
|
+
width: "130"
|
|
350
|
+
}, {
|
|
351
|
+
default: withCtx(({ row }) => [
|
|
352
|
+
createVNode(_component_el_space, null, {
|
|
353
|
+
default: withCtx(() => [
|
|
354
|
+
createVNode(_component_el_link, {
|
|
355
|
+
type: "primary",
|
|
356
|
+
onClick: ($event) => {
|
|
357
|
+
view.edit_id = BigInt(row.department_id), view.edit_dialog_show = !0;
|
|
358
|
+
}
|
|
359
|
+
}, {
|
|
360
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
361
|
+
createTextVNode("查看和编辑", -1)
|
|
362
|
+
])]),
|
|
363
|
+
_: 1
|
|
364
|
+
}, 8, ["onClick"]),
|
|
365
|
+
createVNode(_sfc_main$3, {
|
|
366
|
+
id: BigInt(row.department_id),
|
|
367
|
+
api_url: unref(HttpApiV1).url_department_del
|
|
368
|
+
}, null, 8, ["id", "api_url"])
|
|
369
|
+
]),
|
|
370
|
+
_: 2
|
|
371
|
+
}, 1024)
|
|
372
|
+
]),
|
|
373
|
+
_: 1
|
|
374
|
+
})
|
|
375
|
+
]),
|
|
376
|
+
_: 1
|
|
377
|
+
}, 8, ["data"])
|
|
378
|
+
]),
|
|
379
|
+
_: 1
|
|
380
|
+
}),
|
|
381
|
+
createVNode(_component_el_tab_pane, {
|
|
382
|
+
label: "类型设置",
|
|
383
|
+
name: "second"
|
|
384
|
+
}, {
|
|
385
|
+
default: withCtx(() => [
|
|
386
|
+
createVNode(_component_el_alert, {
|
|
387
|
+
title: "暂只支持创建普通部门节点",
|
|
388
|
+
type: "info",
|
|
389
|
+
"show-icon": "",
|
|
390
|
+
closable: !1
|
|
391
|
+
})
|
|
392
|
+
]),
|
|
393
|
+
_: 1
|
|
394
|
+
})
|
|
395
|
+
]),
|
|
396
|
+
_: 1
|
|
397
|
+
}, 8, ["modelValue"])
|
|
398
|
+
]),
|
|
399
|
+
createVNode(_sfc_main$1, {
|
|
400
|
+
id: view.edit_id,
|
|
401
|
+
modelValue: view.edit_dialog_show,
|
|
402
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => view.edit_dialog_show = $event)
|
|
403
|
+
}, null, 8, ["id", "modelValue"])
|
|
404
|
+
], 64);
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
export {
|
|
409
|
+
_sfc_main as default
|
|
410
|
+
};
|