zsysview 0.0.16 → 0.0.18
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 +19 -3
- package/dist/backup-BwHGMFM9.js +519 -0
- package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-B-s19d7a.js +42 -0
- package/dist/change_password-Cvx2fsBt.js +135 -0
- package/dist/department-D19P31la.js +410 -0
- package/dist/desktop-IlIshTtF.js +9 -0
- package/dist/http_api_v1-DFc71lD8.js +2755 -0
- package/dist/index-C_d1JnWR.js +49346 -0
- package/dist/index.es-BcGc183Q.js +170 -0
- package/dist/log-sQxXMuk2.js +163 -0
- package/dist/login-CN37wrzM.js +111 -0
- package/dist/main-B5GBQKz0.js +292 -0
- package/dist/message-Dd0EkBmy.js +26 -0
- package/dist/position-DfWT0ovL.js +312 -0
- package/dist/role-CNn2CuOU.js +405 -0
- package/dist/self-CraGrpq3.js +102 -0
- package/dist/sys-BjlP52cg.js +30 -0
- package/dist/user-CYvTCZB6.js +651 -0
- package/dist/vite.svg +1 -0
- package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-DTE_uo5w.js +72 -0
- package/dist/zsys_eventBus-Dc_JZwH4.js +36 -0
- package/dist/zsys_time-DHEMuVgo.js +17 -0
- package/dist/zsyslist.vue_vue_type_script_setup_true_lang-CiKZqB0j.js +465 -0
- package/dist/zsysview.css +1 -0
- package/dist/zsysview.es.js +2 -0
- package/package.json +34 -20
- package/assets/default_avatar.png +0 -0
- package/assets/default_logo.png +0 -0
- package/assets/default_logo_40.png +0 -0
- package/assets/login_bg.jpg +0 -0
- package/components/export/export_dialog.vue +0 -150
- package/components/export/export_progress.vue +0 -62
- package/components/list/zsyslist.vue +0 -164
- package/components/list/zsyslist_content.vue +0 -29
- package/components/list/zsyslist_header.vue +0 -62
- package/components/message/index.ts +0 -3
- package/components/message/message.ts +0 -35
- package/components/zsys_delbutton.vue +0 -60
- package/core/app.ts +0 -32
- package/core/common/common.ts +0 -29
- package/core/common/zsys_eventBus.ts +0 -45
- package/core/common/zsys_time.ts +0 -26
- package/core/httpapi/http_api_return_data.ts +0 -43
- package/core/httpapi/http_api_v1.ts +0 -151
- package/core/httpapi/http_axios.ts +0 -54
- package/core/router copy.ts +0 -148
- package/core/router.ts +0 -149
- package/core/runtime.ts +0 -14
- package/core/user_token.ts +0 -17
- package/css/common.css +0 -16
- package/css/style.css +0 -79
- package/index.ts +0 -0
- package/view/app.vue +0 -10
- package/view/backup/backup.vue +0 -308
- package/view/building.vue +0 -22
- package/view/department/department.vue +0 -111
- package/view/department/department_edit_dialog.vue +0 -267
- package/view/desktop/desktop.vue +0 -11
- package/view/log/log.vue +0 -60
- package/view/log/log_setting.vue +0 -41
- package/view/login.vue +0 -91
- package/view/main/breadcrumb.vue +0 -41
- package/view/main/main.vue +0 -60
- package/view/main/userHeader.vue +0 -73
- package/view/main/userMenu.vue +0 -132
- package/view/main/userMenuItem.vue +0 -49
- package/view/position/position.vue +0 -58
- package/view/position/position_edit_dialog.vue +0 -203
- package/view/role/role.vue +0 -72
- package/view/role/role_edit_dialog.vue +0 -271
- package/view/self/change_password.vue +0 -97
- package/view/self/self.vue +0 -62
- package/view/sys/sys.vue +0 -19
- package/view/user/change_user_password_dialog.vue +0 -155
- package/view/user/user.vue +0 -110
- package/view/user/user_edit_dialog.vue +0 -283
package/css/common.css
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#app {
|
|
2
|
-
height: 100%; width: 100%;position: absolute;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
body{
|
|
6
|
-
padding: 0px; margin: 0px;
|
|
7
|
-
/* background-image: url("/src/assets/zsys/login/bg.jpg"); */
|
|
8
|
-
/* background-size: 100% 100%;
|
|
9
|
-
background-position: revert; */
|
|
10
|
-
/* !!!background-size: cover; */
|
|
11
|
-
/* background-repeat: no-repeat; */
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.main_btn{
|
|
15
|
-
width: 100px;
|
|
16
|
-
}
|
package/css/style.css
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
a {
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #646cff;
|
|
19
|
-
text-decoration: inherit;
|
|
20
|
-
}
|
|
21
|
-
a:hover {
|
|
22
|
-
color: #535bf2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
place-items: center;
|
|
29
|
-
min-width: 320px;
|
|
30
|
-
min-height: 100vh;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
font-size: 3.2em;
|
|
35
|
-
line-height: 1.1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
button {
|
|
39
|
-
border-radius: 8px;
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
padding: 0.6em 1.2em;
|
|
42
|
-
font-size: 1em;
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
font-family: inherit;
|
|
45
|
-
background-color: #1a1a1a;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition: border-color 0.25s;
|
|
48
|
-
}
|
|
49
|
-
button:hover {
|
|
50
|
-
border-color: #646cff;
|
|
51
|
-
}
|
|
52
|
-
button:focus,
|
|
53
|
-
button:focus-visible {
|
|
54
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.card {
|
|
58
|
-
padding: 2em;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#app {
|
|
62
|
-
max-width: 1280px;
|
|
63
|
-
margin: 0 auto;
|
|
64
|
-
padding: 2rem;
|
|
65
|
-
text-align: center;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@media (prefers-color-scheme: light) {
|
|
69
|
-
:root {
|
|
70
|
-
color: #213547;
|
|
71
|
-
background-color: #ffffff;
|
|
72
|
-
}
|
|
73
|
-
a:hover {
|
|
74
|
-
color: #747bff;
|
|
75
|
-
}
|
|
76
|
-
button {
|
|
77
|
-
background-color: #f9f9f9;
|
|
78
|
-
}
|
|
79
|
-
}
|
package/index.ts
DELETED
|
File without changes
|
package/view/app.vue
DELETED
package/view/backup/backup.vue
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<breadcrumb />
|
|
3
|
-
<div style="padding: 0px 20px">
|
|
4
|
-
<el-tabs v-model="activeName">
|
|
5
|
-
<el-tab-pane label="备份记录" name="list">
|
|
6
|
-
<el-alert
|
|
7
|
-
title="如需还原备份点,请联系技术人员。"
|
|
8
|
-
type="info"
|
|
9
|
-
show-icon
|
|
10
|
-
:closable="false"
|
|
11
|
-
style="width: 450px"
|
|
12
|
-
/>
|
|
13
|
-
<zsyslist :config="listconfig" module="backup" style="margin-top: 10px">
|
|
14
|
-
<template #headermain>
|
|
15
|
-
<el-button class="main_btn" type="primary" @click="startBackup"
|
|
16
|
-
>立即备份</el-button
|
|
17
|
-
>
|
|
18
|
-
</template>
|
|
19
|
-
<template #content>
|
|
20
|
-
<el-table-column prop="item_name" label="备份点" min-width="240" />
|
|
21
|
-
<el-table-column prop="size_desc" label="大小" width="200" />
|
|
22
|
-
<!-- <el-table-column label="操作" width="60">
|
|
23
|
-
<template #default="{ row }">
|
|
24
|
-
<el-space>
|
|
25
|
-
<el-link type="primary">删除</el-link> -->
|
|
26
|
-
<!-- <el-link type="primary"
|
|
27
|
-
@click="view.edit_id = BigInt(row.position_id); view.edit_dialog_show = true;">修改</el-link> -->
|
|
28
|
-
<!-- <zsys_delbutton :id="BigInt(row.position_id)"
|
|
29
|
-
:api_url="HttpApiV1.url_position_del" /> -->
|
|
30
|
-
<!-- </el-space>
|
|
31
|
-
</template>
|
|
32
|
-
</el-table-column> -->
|
|
33
|
-
</template>
|
|
34
|
-
</zsyslist>
|
|
35
|
-
</el-tab-pane>
|
|
36
|
-
<el-tab-pane label="设置" name="setting">
|
|
37
|
-
<el-form label-width="100px" style="margin-top: 10px">
|
|
38
|
-
<el-form-item label="自动备份">
|
|
39
|
-
<el-switch v-model="form.auto" />
|
|
40
|
-
</el-form-item>
|
|
41
|
-
<div v-if="form.auto">
|
|
42
|
-
<el-form-item label="备份频次">
|
|
43
|
-
<el-space>
|
|
44
|
-
<el-select v-model="form.plan" style="width: 150px">
|
|
45
|
-
<el-option label="每天" value="Everyday" />
|
|
46
|
-
<el-option label="每周一" value="Monday" />
|
|
47
|
-
<el-option label="每月第一天" value="FirstDayOfMonth" />
|
|
48
|
-
</el-select>
|
|
49
|
-
<el-select v-model="form.hour" style="width: 100px">
|
|
50
|
-
<el-option label="00点" value="00" />
|
|
51
|
-
<el-option label="01点" value="01" />
|
|
52
|
-
<el-option label="02点" value="02" />
|
|
53
|
-
<el-option label="03点" value="03" />
|
|
54
|
-
<el-option label="04点" value="04" />
|
|
55
|
-
<el-option label="05点" value="05" />
|
|
56
|
-
<el-option label="06点" value="06" />
|
|
57
|
-
<el-option label="07点" value="07" />
|
|
58
|
-
<el-option label="08点" value="08" />
|
|
59
|
-
<el-option label="09点" value="09" />
|
|
60
|
-
<el-option label="10点" value="10" />
|
|
61
|
-
<el-option label="11点" value="11" />
|
|
62
|
-
<el-option label="12点" value="12" />
|
|
63
|
-
<el-option label="13点" value="13" />
|
|
64
|
-
<el-option label="14点" value="14" />
|
|
65
|
-
<el-option label="15点" value="15" />
|
|
66
|
-
<el-option label="16点" value="16" />
|
|
67
|
-
<el-option label="17点" value="17" />
|
|
68
|
-
<el-option label="18点" value="18" />
|
|
69
|
-
<el-option label="19点" value="19" />
|
|
70
|
-
<el-option label="20点" value="20" />
|
|
71
|
-
<el-option label="21点" value="21" />
|
|
72
|
-
<el-option label="22点" value="22" />
|
|
73
|
-
<el-option label="23点" value="23" />
|
|
74
|
-
</el-select>
|
|
75
|
-
<el-select v-model="form.minute" style="width: 100px">
|
|
76
|
-
<el-option label="00分" value="00" />
|
|
77
|
-
<el-option label="15分" value="15" />
|
|
78
|
-
<el-option label="30分" value="30" />
|
|
79
|
-
<el-option label="45分" value="45" />
|
|
80
|
-
</el-select>
|
|
81
|
-
</el-space>
|
|
82
|
-
</el-form-item>
|
|
83
|
-
<el-form-item label="备份路径">
|
|
84
|
-
<el-space direction="vertical" :size="2" alignment="stretch">
|
|
85
|
-
<el-input style="width: 500px" />
|
|
86
|
-
<el-text type="info"
|
|
87
|
-
>如果您使用的是物理主机,并且不具备磁盘阵列功能,强烈建议备份路径设置到第二个硬盘/U盘</el-text
|
|
88
|
-
>
|
|
89
|
-
</el-space>
|
|
90
|
-
</el-form-item>
|
|
91
|
-
<el-form-item label="保存选项">
|
|
92
|
-
<el-select v-model="form.keep" style="width: 200px">
|
|
93
|
-
<el-option label="保留最近20个备份" value="lastkeep20" />
|
|
94
|
-
<el-option label="保留最近10个备份" value="lastkeep10" />
|
|
95
|
-
</el-select>
|
|
96
|
-
</el-form-item>
|
|
97
|
-
<el-divider content-position="left" style="width: 400px"
|
|
98
|
-
>上传FTP</el-divider
|
|
99
|
-
>
|
|
100
|
-
|
|
101
|
-
<el-form-item label="启用/关闭">
|
|
102
|
-
<el-switch v-model="form.use_ftp" />
|
|
103
|
-
<el-text type="info" style="margin-left: 10px"
|
|
104
|
-
>上传FTP可以解决本机备份空间不足的问题</el-text
|
|
105
|
-
>
|
|
106
|
-
</el-form-item>
|
|
107
|
-
<div v-if="form.use_ftp">
|
|
108
|
-
<el-form-item label="FTP主机地址">
|
|
109
|
-
<el-space>
|
|
110
|
-
<el-input v-model="form.f_host" style="width: 300px" />
|
|
111
|
-
<el-text>端口</el-text>
|
|
112
|
-
<el-input-number
|
|
113
|
-
v-model="form.f_port"
|
|
114
|
-
:min="1"
|
|
115
|
-
:max="65535"
|
|
116
|
-
:value-on-clear="21"
|
|
117
|
-
style="width: 120px"
|
|
118
|
-
controls-position="right"
|
|
119
|
-
/>
|
|
120
|
-
<!-- <el-input v-model="form.f_port" style="width: 80px;" /> -->
|
|
121
|
-
</el-space>
|
|
122
|
-
</el-form-item>
|
|
123
|
-
<el-form-item label="FTP用户">
|
|
124
|
-
<el-input v-model="form.f_u" style="width: 200px" />
|
|
125
|
-
</el-form-item>
|
|
126
|
-
<el-form-item label="FTP密码">
|
|
127
|
-
<el-space direction="vertical" :size="2" alignment="stretch">
|
|
128
|
-
<el-input
|
|
129
|
-
v-model="form.f_p"
|
|
130
|
-
type="password"
|
|
131
|
-
style="width: 200px"
|
|
132
|
-
/>
|
|
133
|
-
<el-text type="info"
|
|
134
|
-
>这里不显示保存的密码,要修改时才输入</el-text
|
|
135
|
-
>
|
|
136
|
-
</el-space>
|
|
137
|
-
</el-form-item>
|
|
138
|
-
<el-form-item label="FTP目录名">
|
|
139
|
-
<el-space direction="vertical" :size="2" alignment="stretch">
|
|
140
|
-
<el-input v-model="form.f_path" style="width: 200px" />
|
|
141
|
-
<el-text type="info"
|
|
142
|
-
>多台机器备份到同一个FTP时可按目录名区分</el-text
|
|
143
|
-
>
|
|
144
|
-
</el-space>
|
|
145
|
-
</el-form-item>
|
|
146
|
-
<el-form-item label="TLS">
|
|
147
|
-
<el-switch v-model="form.f_tls" />
|
|
148
|
-
</el-form-item>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
<el-form-item>
|
|
152
|
-
<el-button type="primary" @click="saveConfig">应用设置</el-button>
|
|
153
|
-
</el-form-item>
|
|
154
|
-
</el-form>
|
|
155
|
-
</el-tab-pane>
|
|
156
|
-
</el-tabs>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<department_edit_dialog :id="view.edit_id" v-model="view.edit_dialog_show" />
|
|
160
|
-
</template>
|
|
161
|
-
|
|
162
|
-
<script setup lang="ts">
|
|
163
|
-
import breadcrumb from "../main/breadcrumb.vue";
|
|
164
|
-
import { ref, reactive, onMounted } from "vue";
|
|
165
|
-
import { HttpApiV1 as http, HttpApiV1 } from "../../core/httpapi/http_api_v1";
|
|
166
|
-
// import zsys_delbutton from "@/components/zsys/zsys_delbutton.vue";
|
|
167
|
-
import zsyslist from "../../components/list/zsyslist.vue";
|
|
168
|
-
import { type ListConfig } from "../../components/list/zsyslist.vue";
|
|
169
|
-
// import { zsysEventBus } from "@/utils/zsys_eventBus";
|
|
170
|
-
import { ZSYSMessage } from "../../components/message";
|
|
171
|
-
|
|
172
|
-
const activeName = ref("list");
|
|
173
|
-
|
|
174
|
-
// const eventBus = zsysEventBus();
|
|
175
|
-
|
|
176
|
-
//============列表控件===========================
|
|
177
|
-
const listconfig: ListConfig = reactive({
|
|
178
|
-
ApiUrl: HttpApiV1.url_backup_list,
|
|
179
|
-
QuickConditionsGroups: [],
|
|
180
|
-
HideBottomToolbar: true,
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
const view = reactive({
|
|
184
|
-
edit_id: BigInt(0),
|
|
185
|
-
edit_dialog_show: false,
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
interface BackupConfig {
|
|
189
|
-
auto: number;
|
|
190
|
-
plan: string;
|
|
191
|
-
hour: string;
|
|
192
|
-
minute: string;
|
|
193
|
-
path: string;
|
|
194
|
-
keep: string;
|
|
195
|
-
use_ftp: number;
|
|
196
|
-
f_host: string;
|
|
197
|
-
f_port: number;
|
|
198
|
-
f_u: string;
|
|
199
|
-
f_p: string;
|
|
200
|
-
f_path: string;
|
|
201
|
-
f_tls: number;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const form = reactive({
|
|
205
|
-
auto: true,
|
|
206
|
-
plan: "Everyday",
|
|
207
|
-
hour: "01",
|
|
208
|
-
minute: "00",
|
|
209
|
-
path: "",
|
|
210
|
-
keep: "keep20",
|
|
211
|
-
use_ftp: false,
|
|
212
|
-
f_host: "",
|
|
213
|
-
f_port: 21,
|
|
214
|
-
f_u: "",
|
|
215
|
-
f_p: "",
|
|
216
|
-
f_path: "",
|
|
217
|
-
f_tls: true,
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
const startBackup = async () => {
|
|
221
|
-
try {
|
|
222
|
-
let res = await http.Post(http.url_backup_start, {});
|
|
223
|
-
if (res.IsSuccess) {
|
|
224
|
-
ZSYSMessage.ShowSuccess("开始备份");
|
|
225
|
-
} else {
|
|
226
|
-
ZSYSMessage.ShowError(res.message);
|
|
227
|
-
}
|
|
228
|
-
} catch (e) {
|
|
229
|
-
console.log(e);
|
|
230
|
-
ZSYSMessage.ShowError("启动备份失败");
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
async function saveConfig() {
|
|
235
|
-
try {
|
|
236
|
-
let data = {
|
|
237
|
-
auto: form.auto ? 1 : 0,
|
|
238
|
-
plan: form.plan,
|
|
239
|
-
hour: form.hour,
|
|
240
|
-
minute: form.minute,
|
|
241
|
-
path: form.path,
|
|
242
|
-
keep: form.keep,
|
|
243
|
-
use_ftp: form.use_ftp ? 1 : 0,
|
|
244
|
-
f_host: form.f_host,
|
|
245
|
-
f_port: form.f_port,
|
|
246
|
-
f_u: form.f_u,
|
|
247
|
-
f_p: form.f_p,
|
|
248
|
-
f_path: form.f_path,
|
|
249
|
-
f_tls: form.f_tls ? 1 : 0,
|
|
250
|
-
};
|
|
251
|
-
let res = await http.Post(http.url_backup_config_save, data);
|
|
252
|
-
if (res.IsSuccess) {
|
|
253
|
-
ZSYSMessage.ShowSuccess("保存成功");
|
|
254
|
-
} else {
|
|
255
|
-
ZSYSMessage.ShowError(res.message);
|
|
256
|
-
}
|
|
257
|
-
} catch (e) {
|
|
258
|
-
console.log(e);
|
|
259
|
-
ZSYSMessage.ShowError("保存配置失败");
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
async function getConfig() {
|
|
264
|
-
try {
|
|
265
|
-
let res = await HttpApiV1.Post(HttpApiV1.url_backup_config_get, {});
|
|
266
|
-
if (res.IsSuccess) {
|
|
267
|
-
let data = res.data as BackupConfig;
|
|
268
|
-
form.auto = data.auto == 1 ? true : false;
|
|
269
|
-
form.plan = data.plan;
|
|
270
|
-
form.hour = data.hour;
|
|
271
|
-
form.minute = data.minute;
|
|
272
|
-
form.path = data.path;
|
|
273
|
-
form.keep = data.keep;
|
|
274
|
-
form.use_ftp = data.use_ftp == 1 ? true : false;
|
|
275
|
-
form.f_host = data.f_host;
|
|
276
|
-
form.f_port = data.f_port;
|
|
277
|
-
form.f_u = data.f_u;
|
|
278
|
-
form.f_p = data.f_p;
|
|
279
|
-
form.f_path = data.f_path;
|
|
280
|
-
form.f_tls = data.f_tls == 1 ? true : false;
|
|
281
|
-
} else {
|
|
282
|
-
ZSYSMessage.ShowError("获取备份配置失败");
|
|
283
|
-
}
|
|
284
|
-
} catch (e) {
|
|
285
|
-
ZSYSMessage.ShowError("获取备份配置失败");
|
|
286
|
-
console.log(e);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// //====基础
|
|
291
|
-
onMounted(() => {
|
|
292
|
-
getConfig();
|
|
293
|
-
// eventBus.on('aud', aud_event);
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
// onUnmounted(() => {
|
|
297
|
-
// eventBus.off('aud', aud_event);
|
|
298
|
-
// })
|
|
299
|
-
|
|
300
|
-
// // 处理aud事件
|
|
301
|
-
// const aud_event = (payload: { module: string, id: bigint }) => {
|
|
302
|
-
// if (payload.module = 'department') {
|
|
303
|
-
// getData()
|
|
304
|
-
// }
|
|
305
|
-
// };
|
|
306
|
-
</script>
|
|
307
|
-
|
|
308
|
-
<style scoped></style>
|
package/view/building.vue
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<breadcrumb />
|
|
3
|
-
<div style="padding: 0px 20px; margin-top: 20px;">
|
|
4
|
-
<el-result icon="info" title="该功能开发中">
|
|
5
|
-
<template #sub-title>
|
|
6
|
-
<p>请期待</p>
|
|
7
|
-
</template>
|
|
8
|
-
<!-- <template #extra>
|
|
9
|
-
<el-button type="primary">Back</el-button>
|
|
10
|
-
</template> -->
|
|
11
|
-
</el-result>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
import breadcrumb from './breadcrumb.vue';
|
|
17
|
-
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<style scoped>
|
|
21
|
-
|
|
22
|
-
</style>
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<breadcrumb />
|
|
3
|
-
<div style="padding: 0px 20px;">
|
|
4
|
-
<el-tabs v-model="activeName">
|
|
5
|
-
<el-tab-pane label="组织架构" name="first">
|
|
6
|
-
<el-row>
|
|
7
|
-
<el-col :span="24">
|
|
8
|
-
<el-space :size="4" wrap>
|
|
9
|
-
<el-button class="main_btn" type="primary"
|
|
10
|
-
@click="view.edit_id = 0n; view.edit_dialog_show = true">新建</el-button>
|
|
11
|
-
<el-tooltip content="刷新列表数据">
|
|
12
|
-
<el-button :icon="Refresh" @click="refresh" />
|
|
13
|
-
</el-tooltip>
|
|
14
|
-
</el-space>
|
|
15
|
-
</el-col>
|
|
16
|
-
</el-row>
|
|
17
|
-
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="department_id">
|
|
18
|
-
<el-table-column prop="department_title" label="名称" min-width="300" />
|
|
19
|
-
<el-table-column prop="department_sort" label="排序" width="80" />
|
|
20
|
-
<el-table-column prop="department_title" label="操作" width="130">
|
|
21
|
-
<template #default="{ row }">
|
|
22
|
-
<el-space>
|
|
23
|
-
<el-link type="primary"
|
|
24
|
-
@click="view.edit_id = BigInt(row.department_id); view.edit_dialog_show = true;">查看和编辑</el-link>
|
|
25
|
-
<zsys_delbutton :id="BigInt(row.department_id)"
|
|
26
|
-
:api_url="HttpApiV1.url_department_del" />
|
|
27
|
-
</el-space>
|
|
28
|
-
</template>
|
|
29
|
-
</el-table-column>
|
|
30
|
-
<template #empty>
|
|
31
|
-
<el-empty description="无相关部门数据" :image-size="100" />
|
|
32
|
-
</template>
|
|
33
|
-
</el-table>
|
|
34
|
-
</el-tab-pane>
|
|
35
|
-
<el-tab-pane label="类型设置" name="second">
|
|
36
|
-
<el-alert title="暂只支持创建普通部门节点" type="info" show-icon :closable="false" />
|
|
37
|
-
</el-tab-pane>
|
|
38
|
-
</el-tabs>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<department_edit_dialog :id="view.edit_id" v-model="view.edit_dialog_show" />
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<script setup lang="ts">
|
|
45
|
-
import breadcrumb from '../main/breadcrumb.vue';
|
|
46
|
-
import { ref, reactive, onMounted, onUnmounted } from 'vue'
|
|
47
|
-
import { HttpApiV1 as http, HttpApiV1 } from '../../core/httpapi/http_api_v1';
|
|
48
|
-
import { Refresh } from '@element-plus/icons-vue'
|
|
49
|
-
import zsys_delbutton from '../../components/zsys_delbutton.vue';
|
|
50
|
-
import { zsysEventBus } from '../../core/common/zsys_eventBus';
|
|
51
|
-
import department_edit_dialog from './department_edit_dialog.vue';
|
|
52
|
-
|
|
53
|
-
const activeName = ref('first')
|
|
54
|
-
|
|
55
|
-
const eventBus = zsysEventBus()
|
|
56
|
-
|
|
57
|
-
//============列表控件===========================
|
|
58
|
-
interface Department {
|
|
59
|
-
department_id: bigint
|
|
60
|
-
department_sort: number
|
|
61
|
-
department_title: string
|
|
62
|
-
children?: Department[]
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const tableData = ref<Department[]>([])
|
|
66
|
-
|
|
67
|
-
const view = reactive({
|
|
68
|
-
edit_id: BigInt(0),
|
|
69
|
-
edit_dialog_show: false,
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
const refresh = () => {
|
|
73
|
-
getData()
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const getData = async () => {
|
|
77
|
-
try {
|
|
78
|
-
let res = await http.Post(http.url_department_list, {})
|
|
79
|
-
if (res.IsSuccess) {
|
|
80
|
-
tableData.value = (res.data as { listdata: Department[] })?.listdata
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
} catch (e) {
|
|
84
|
-
console.log(e);
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
//=============新建和编辑弹窗
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
//====基础
|
|
93
|
-
onMounted(() => {
|
|
94
|
-
eventBus.on('aud', aud_event);
|
|
95
|
-
getData()
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
onUnmounted(() => {
|
|
99
|
-
eventBus.off('aud', aud_event);
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
// 处理aud事件
|
|
103
|
-
const aud_event = (payload: { module: string, id: bigint }) => {
|
|
104
|
-
if (payload.module = 'department') {
|
|
105
|
-
getData()
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
</script>
|
|
110
|
-
|
|
111
|
-
<style scoped></style>
|