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/package.json
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "zsysview",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "zsysview",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.18",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/zsysview.umd.js",
|
|
10
|
+
"module": "./dist/zsysview.es.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/zsysview.es.js",
|
|
14
|
+
"require": "./dist/zsysview.umd.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"dev": "vite",
|
|
19
|
+
"build": "vue-tsc -b && vite build",
|
|
20
|
+
"preview": "vite preview"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"element-plus": "^2.11.5",
|
|
24
|
+
"vue": "^3.5.22"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^24.6.0",
|
|
28
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
29
|
+
"@vue/tsconfig": "^0.8.1",
|
|
30
|
+
"typescript": "~5.9.3",
|
|
31
|
+
"vite": "^7.1.7",
|
|
32
|
+
"vue-tsc": "^3.1.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
Binary file
|
package/assets/default_logo.png
DELETED
|
Binary file
|
|
Binary file
|
package/assets/login_bg.jpg
DELETED
|
Binary file
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
<!-- ReusableDialog.vue -->
|
|
2
|
-
<template>
|
|
3
|
-
<el-dialog v-model="visible" title="导出" :align-center="true" :before-close="handleBeforeClose" @open="open"
|
|
4
|
-
width="800" :draggable="true" :overflow="true" @opened="focus" destroy-on-close :close-on-click-modal="false">
|
|
5
|
-
<!-- 默认插槽放主要内容 -->
|
|
6
|
-
<el-form @submit.prevent ref="ruleFormRef" :model="form" :rules="rules"
|
|
7
|
-
style="padding-left: 10px;padding-right: 10px;" label-width="auto" v-show="view.exporting == false">
|
|
8
|
-
<el-form-item label="字段选项" prop="role_title">
|
|
9
|
-
<el-radio-group v-model="form.columnOption">
|
|
10
|
-
<el-radio value="all">全部支持的字段</el-radio>
|
|
11
|
-
<el-radio v-if="props.exportColumn ? true : false" value="custom">自定义</el-radio>
|
|
12
|
-
</el-radio-group>
|
|
13
|
-
</el-form-item>
|
|
14
|
-
<el-form-item label="自定义" v-show="form.columnOption == 'custom'">
|
|
15
|
-
<!-- v-model="form.permission_value" :data="permission_option" -->
|
|
16
|
-
<el-transfer v-model="form.exportColumnWanted" :data="props.exportColumn" :titles="['可选', '已选']" :props="{
|
|
17
|
-
key: 'ColumnName',
|
|
18
|
-
label: 'ColumnTitle',
|
|
19
|
-
}">
|
|
20
|
-
<template #left-empty>
|
|
21
|
-
<el-empty :image-size="60" description="无可选项" />
|
|
22
|
-
</template>
|
|
23
|
-
<template #right-empty>
|
|
24
|
-
<el-empty :image-size="60" description="请从左侧选择" />
|
|
25
|
-
</template>
|
|
26
|
-
</el-transfer>
|
|
27
|
-
</el-form-item>
|
|
28
|
-
</el-form>
|
|
29
|
-
|
|
30
|
-
<export_progress v-show="view.exporting" :export-id="view.exportId"></export_progress>
|
|
31
|
-
|
|
32
|
-
<!-- 底部按钮区插槽 -->
|
|
33
|
-
<template #footer>
|
|
34
|
-
<div style="display: flex;justify-content: right;">
|
|
35
|
-
<el-button type="primary" @click="startExport" v-show="view.exporting == false">开始导出</el-button>
|
|
36
|
-
<!-- <el-button @click="close">取消</el-button> -->
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
</template>
|
|
40
|
-
</el-dialog>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script setup lang="ts">
|
|
44
|
-
import { ref, watch, reactive } from 'vue';
|
|
45
|
-
import { HttpApiV1 as http } from '../../core/httpapi/http_api_v1';
|
|
46
|
-
import { ZSYSMessage } from '../../components/message';
|
|
47
|
-
import type { FormInstance, FormRules, ElInput } from 'element-plus'
|
|
48
|
-
import { useMagicKeys, whenever } from '@vueuse/core'
|
|
49
|
-
import export_progress from './export_progress.vue';
|
|
50
|
-
const inputRef = ref<InstanceType<typeof ElInput> | null>(null)
|
|
51
|
-
const props = defineProps({
|
|
52
|
-
modelValue: { type: Boolean, required: true }, // 控制显示隐藏
|
|
53
|
-
exportUrl: { type: String, required: true },
|
|
54
|
-
exportColumn: { type: [] }
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const emit = defineEmits<{
|
|
58
|
-
(e: 'update:modelValue', value: boolean): void;
|
|
59
|
-
// (e: 'confirm'): void;
|
|
60
|
-
// (e: 'close'): void;
|
|
61
|
-
}>();
|
|
62
|
-
|
|
63
|
-
const visible = ref(false);
|
|
64
|
-
|
|
65
|
-
// 同步外部 v-model 变化
|
|
66
|
-
watch(
|
|
67
|
-
() => props.modelValue,
|
|
68
|
-
(val) => {
|
|
69
|
-
visible.value = val;
|
|
70
|
-
},
|
|
71
|
-
{ immediate: true }
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
// 内部状态变化通知外部
|
|
75
|
-
watch(visible, (val) => {
|
|
76
|
-
emit('update:modelValue', val);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//弹窗显示时的处理
|
|
80
|
-
const open = () => {
|
|
81
|
-
view.exporting = false
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// const close = () => {
|
|
85
|
-
// visible.value = false;
|
|
86
|
-
// // emit('close');
|
|
87
|
-
// };
|
|
88
|
-
|
|
89
|
-
const handleBeforeClose = (done: () => void) => {
|
|
90
|
-
ruleFormRef.value?.clearValidate();
|
|
91
|
-
// 可以在这里添加关闭前的拦截逻辑
|
|
92
|
-
done();
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
const view = reactive({
|
|
96
|
-
exporting: false,// 导出框当前的状态
|
|
97
|
-
exportId:0n//导出id
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
//^^^^^^^^^^^^^^^上方为对话框功能^^^^^^^^^^^^^^^
|
|
103
|
-
|
|
104
|
-
//===============下方为数据部分===============
|
|
105
|
-
//开始请求后台导出
|
|
106
|
-
async function startExport() {
|
|
107
|
-
view.exporting = true
|
|
108
|
-
let res = await http.Post(props.exportUrl, {})
|
|
109
|
-
if (res.IsSuccess) {
|
|
110
|
-
view.exportId=BigInt(res.data as unknown as bigint)
|
|
111
|
-
} else {
|
|
112
|
-
ZSYSMessage.ShowError(res.message)
|
|
113
|
-
view.exporting = false
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
//=================表单
|
|
118
|
-
const ruleFormRef = ref<FormInstance>()
|
|
119
|
-
const form = ref({
|
|
120
|
-
columnOption: 'all',
|
|
121
|
-
exportColumnWanted: []
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
const rules = reactive<FormRules<typeof form>>({
|
|
125
|
-
|
|
126
|
-
})
|
|
127
|
-
//=================
|
|
128
|
-
|
|
129
|
-
const focus = () => {
|
|
130
|
-
inputRef.value?.focus()
|
|
131
|
-
inputRef.value?.select()
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
//==========快捷键
|
|
135
|
-
const keys = useMagicKeys()
|
|
136
|
-
|
|
137
|
-
whenever(keys.alt_s, () => {
|
|
138
|
-
if (visible.value) {
|
|
139
|
-
console.log('Alt+S提交')
|
|
140
|
-
}
|
|
141
|
-
// 在这里执行你的业务逻辑
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
</script>
|
|
145
|
-
|
|
146
|
-
<style scoped>
|
|
147
|
-
.el-transfer /deep/ .el-transfer-panel {
|
|
148
|
-
width: 240px;
|
|
149
|
-
}
|
|
150
|
-
</style>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="padding-left: 20px; padding-right: 20px; padding-top: 6px;">
|
|
3
|
-
<div v-if="view.state == 1" style="font-size: x-large;">正在导出</div>
|
|
4
|
-
<div v-if="view.state == 2" style="font-size: x-large;">导出完成</div>
|
|
5
|
-
<div style="font-size:large; margin-top: 10px;">
|
|
6
|
-
累计处理: {{ view.progress }}
|
|
7
|
-
</div>
|
|
8
|
-
<el-progress v-if="view.state == 1" :percentage="50" :indeterminate="true" style="margin-top: 10px;">
|
|
9
|
-
{{ view.progress }}
|
|
10
|
-
</el-progress>
|
|
11
|
-
<el-space v-if="view.state == 2" wrap style="font-size:large; margin-top: 10px;">
|
|
12
|
-
<el-text>文件(点击下载):</el-text>
|
|
13
|
-
<el-link v-for="item of view.file_ids" :href="http.url_export_file+'?id='+item.toString()" target="_blank"
|
|
14
|
-
underline="always" type="primary">文件{{ item.toString() }}</el-link>
|
|
15
|
-
</el-space>
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script setup lang="ts">
|
|
22
|
-
import { reactive, watch, type PropType } from 'vue';
|
|
23
|
-
import { HttpApiV1 as http } from '../../core/httpapi/http_api_v1';
|
|
24
|
-
const props = defineProps({
|
|
25
|
-
exportId: { type: BigInt as unknown as PropType<bigint>, required: true }
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const view = reactive({
|
|
29
|
-
state: 1,
|
|
30
|
-
progress: 0n,
|
|
31
|
-
file_ids: [] as bigint[]
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
watch(props, (newVal) => {
|
|
36
|
-
if (newVal.exportId != 0n) {
|
|
37
|
-
var intervalId = setInterval(async () => {
|
|
38
|
-
let xRes = await http.Post(http.url_export_detail, { id: props.exportId })
|
|
39
|
-
if (xRes.IsSuccess) {
|
|
40
|
-
let data = xRes.data as {
|
|
41
|
-
progress: bigint,
|
|
42
|
-
state: number,
|
|
43
|
-
file_ids: string
|
|
44
|
-
}
|
|
45
|
-
view.progress = data.progress
|
|
46
|
-
view.state = data.state
|
|
47
|
-
view.file_ids = []
|
|
48
|
-
let fs = data.file_ids.split(',')
|
|
49
|
-
for (let f of fs) {
|
|
50
|
-
view.file_ids.push(BigInt(f))
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (view.state != 1) { clearInterval(intervalId) }
|
|
54
|
-
}
|
|
55
|
-
// completeExport()
|
|
56
|
-
}, 3600);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style scoped></style>
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-loading="view.loading">
|
|
3
|
-
<!-- 工具条 -->
|
|
4
|
-
<zsyslist_header
|
|
5
|
-
:config="config"
|
|
6
|
-
v-model:query="query"
|
|
7
|
-
@refresh="GetListData()"
|
|
8
|
-
>
|
|
9
|
-
<template #headermain>
|
|
10
|
-
<slot name="headermain"></slot>
|
|
11
|
-
</template>
|
|
12
|
-
</zsyslist_header>
|
|
13
|
-
|
|
14
|
-
<!-- 列表内容 -->
|
|
15
|
-
<el-table :data="data.listdata" style="width: 100%" :stripe="true">
|
|
16
|
-
<slot name="content"></slot>
|
|
17
|
-
<template #empty>
|
|
18
|
-
<el-empty description="无相关数据" :image-size="100" />
|
|
19
|
-
</template>
|
|
20
|
-
</el-table>
|
|
21
|
-
|
|
22
|
-
<!-- 分页 -->
|
|
23
|
-
<el-pagination
|
|
24
|
-
v-if="config.HideBottomToolbar != true"
|
|
25
|
-
v-model:current-page="currentPage"
|
|
26
|
-
v-model:page-size="pageSize"
|
|
27
|
-
:page-sizes="[30, 50, 100, 150, 200]"
|
|
28
|
-
layout="total, sizes, prev, next, pager, jumper"
|
|
29
|
-
:total="total"
|
|
30
|
-
prev-text="上一页"
|
|
31
|
-
next-text="下一页"
|
|
32
|
-
@change="pageChange"
|
|
33
|
-
style="margin-top: 6px; margin-bottom: 6px"
|
|
34
|
-
>
|
|
35
|
-
</el-pagination>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script setup lang="ts">
|
|
40
|
-
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
|
41
|
-
import zsyslist_header from "./zsyslist_header.vue";
|
|
42
|
-
import { HttpApiV1 as http } from "../../core/httpapi/http_api_v1";
|
|
43
|
-
import { zsysEventBus } from "../../core/common/zsys_eventBus";
|
|
44
|
-
const eventBus = zsysEventBus();
|
|
45
|
-
const view = reactive({
|
|
46
|
-
loading: false,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
//获取应用层的配置
|
|
50
|
-
// const props = defineProps(['config'])
|
|
51
|
-
const props = defineProps({
|
|
52
|
-
config: { type: Object, required: true },
|
|
53
|
-
module: { type: String, default: "" },
|
|
54
|
-
// closeOnClickModal: { type: Boolean, default: true }
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
console.log("zlist", props.module);
|
|
58
|
-
|
|
59
|
-
const config: ListConfig = props.config as ListConfig;
|
|
60
|
-
const query = reactive({ keyword: "" });
|
|
61
|
-
const currentPage = ref(1);
|
|
62
|
-
const pageSize = ref(30);
|
|
63
|
-
const total = ref(0);
|
|
64
|
-
|
|
65
|
-
const data = ref({} as ListData); //后台返回的数据
|
|
66
|
-
// console.log(data.value.count);
|
|
67
|
-
|
|
68
|
-
// 定义整个列表控件的功能
|
|
69
|
-
export interface ListConfig {
|
|
70
|
-
ApiUrl: string;
|
|
71
|
-
QuickConditionsGroups?: QuickConditionsGroup[]; //快捷查询条件组
|
|
72
|
-
HideBottomToolbar?: boolean; //隐藏底部工具条
|
|
73
|
-
KeywordTip?: string; //快捷查询提示
|
|
74
|
-
ExportUrl?: string; //导出功能接口
|
|
75
|
-
ExportColumn?: ExportColumn[]; //支持导出的字段选项,如果没有的话,就是全部支持字段
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface ExportColumn {
|
|
79
|
-
ColumnTitle: string;
|
|
80
|
-
ColumnName: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
//快捷查询条件结构
|
|
84
|
-
export interface QuickConditionsGroup {
|
|
85
|
-
Label: string; //快捷查询组的标题
|
|
86
|
-
QuickConditions: SqlQueryParam[]; //快捷查询组的选项
|
|
87
|
-
Select: number; //选中的选项的下标
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
//查询条件结构
|
|
91
|
-
interface SqlQueryParam {
|
|
92
|
-
label: string;
|
|
93
|
-
column: string | null;
|
|
94
|
-
condition?: string | null;
|
|
95
|
-
value?: number | string | null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
//列表数据返回值
|
|
99
|
-
interface ListData {
|
|
100
|
-
count: number;
|
|
101
|
-
listdata: [];
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// const config = defineProps<ListConfig>()
|
|
105
|
-
// 使用 toRefs 保持响应性
|
|
106
|
-
// const { user } = toRefs(props)
|
|
107
|
-
// const userName = computed(() => user.value.name)
|
|
108
|
-
|
|
109
|
-
const GetListData = async () => {
|
|
110
|
-
view.loading = true;
|
|
111
|
-
let q = {
|
|
112
|
-
page_size: pageSize.value,
|
|
113
|
-
page_index: currentPage.value,
|
|
114
|
-
user_query_param: GetUserQueryParam(),
|
|
115
|
-
keyword: query.keyword,
|
|
116
|
-
};
|
|
117
|
-
let res = await http.Post(config.ApiUrl, q);
|
|
118
|
-
if (res.IsSuccess) {
|
|
119
|
-
let d = res.data as ListData;
|
|
120
|
-
data.value = d;
|
|
121
|
-
total.value = d.count;
|
|
122
|
-
}
|
|
123
|
-
view.loading = false;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
//provide("refresh_list",GetListData)//提供给子组件调用
|
|
127
|
-
// 处理aud事件
|
|
128
|
-
const aud_event = (payload: { module: string; id: bigint }) => {
|
|
129
|
-
console.log("aud_event:", payload);
|
|
130
|
-
if (payload.module == props.module || payload.module == "all") {
|
|
131
|
-
GetListData();
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
const GetUserQueryParam = (): SqlQueryParam[] => {
|
|
136
|
-
let re: SqlQueryParam[] = [];
|
|
137
|
-
for (const g of config.QuickConditionsGroups || []) {
|
|
138
|
-
if (g.QuickConditions[g.Select].column != null) {
|
|
139
|
-
re.push(g.QuickConditions[g.Select]);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return re;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
onMounted(() => {
|
|
146
|
-
eventBus.on("aud", aud_event);
|
|
147
|
-
GetListData();
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
onUnmounted(() => {
|
|
151
|
-
eventBus.off("aud", aud_event);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
//==============分页功能===================================
|
|
155
|
-
|
|
156
|
-
const pageChange = (pageindex: number, size: number) => {
|
|
157
|
-
currentPage.value = pageindex;
|
|
158
|
-
pageSize.value = size;
|
|
159
|
-
console.log(currentPage.value, pageSize.value);
|
|
160
|
-
GetListData();
|
|
161
|
-
};
|
|
162
|
-
</script>
|
|
163
|
-
|
|
164
|
-
<style scoped></style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
|
|
3
|
-
<el-table :data="tableData" style="width: 100%" stripe="true">
|
|
4
|
-
<slot name="content"></slot>
|
|
5
|
-
<!-- <el-table-column prop="date" label="ID" width="180" />
|
|
6
|
-
<el-table-column prop="name" label="IP" width="180" />
|
|
7
|
-
<el-table-column prop="address" label="时间" width="180"/>
|
|
8
|
-
<el-table-column prop="address" label="操作人" width="180"/>
|
|
9
|
-
<el-table-column prop="address" label="日志内容" /> -->
|
|
10
|
-
</el-table>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script setup lang="ts">
|
|
14
|
-
const tableData = [
|
|
15
|
-
{
|
|
16
|
-
date: '2016-05-03',
|
|
17
|
-
name: 'Tom',
|
|
18
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
19
|
-
},{
|
|
20
|
-
date: '2016-05-03',
|
|
21
|
-
name: 'Tom',
|
|
22
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style scoped>
|
|
28
|
-
|
|
29
|
-
</style>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-row>
|
|
3
|
-
<el-col :span="24">
|
|
4
|
-
<el-space :size="4" wrap>
|
|
5
|
-
<slot name="headermain"></slot>
|
|
6
|
-
<el-tooltip content="刷新列表数据">
|
|
7
|
-
<el-button :icon="Refresh" @click="refresh" />
|
|
8
|
-
</el-tooltip>
|
|
9
|
-
<el-tooltip v-if="config.KeywordTip?true:false" :show-after="800" :content="config.KeywordTip?config.KeywordTip:'快捷搜索'">
|
|
10
|
-
<el-input style="width: 160px;" :placeholder="config.KeywordTip?config.KeywordTip:'快捷搜索'" :prefix-icon="Search" v-model="query.keyword"
|
|
11
|
-
clearable @keyup.enter.native="refresh" />
|
|
12
|
-
</el-tooltip>
|
|
13
|
-
<!-- <el-tooltip content="打开/关闭高级搜索功能">
|
|
14
|
-
<el-button>高级搜索</el-button>
|
|
15
|
-
</el-tooltip> -->
|
|
16
|
-
<!-- <el-button>排序</el-button> -->
|
|
17
|
-
<el-tooltip v-if="config.ExportUrl?true:false" content="将查询的结果全部导出">
|
|
18
|
-
<el-button @Click="view.exportDialogShow=true">导出</el-button>
|
|
19
|
-
</el-tooltip>
|
|
20
|
-
<!-- <el-button>批量操作</el-button> -->
|
|
21
|
-
</el-space>
|
|
22
|
-
</el-col>
|
|
23
|
-
</el-row>
|
|
24
|
-
|
|
25
|
-
<el-row style="margin-top: 8px;" v-for="v in config.QuickConditionsGroups">
|
|
26
|
-
<el-col :span="24">
|
|
27
|
-
<el-space :size="4" wrap>
|
|
28
|
-
<el-text>{{ v.Label }}</el-text>
|
|
29
|
-
<el-radio-group v-model="v.Select" size="small">
|
|
30
|
-
<el-radio-button v-for="q, index in v.QuickConditions" :value="index" @change="refresh">{{ q.label
|
|
31
|
-
}}</el-radio-button>
|
|
32
|
-
</el-radio-group>
|
|
33
|
-
</el-space>
|
|
34
|
-
</el-col>
|
|
35
|
-
</el-row>
|
|
36
|
-
<el-divider style="margin-top: 4px; margin-bottom: 4px;" />
|
|
37
|
-
<!-- 导出 -->
|
|
38
|
-
<export_dialog v-model="view.exportDialogShow" :export-url="config.ExportUrl" :export-column="config.ExportColumn"></export_dialog>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script setup lang="ts">
|
|
42
|
-
import { defineProps,reactive } from 'vue'
|
|
43
|
-
import { Refresh, Search } from '@element-plus/icons-vue'
|
|
44
|
-
import export_dialog from '../export/export_dialog.vue';
|
|
45
|
-
|
|
46
|
-
const props = defineProps(['config', 'query'])
|
|
47
|
-
const config = props.config
|
|
48
|
-
const query = props.query
|
|
49
|
-
|
|
50
|
-
const view = reactive({
|
|
51
|
-
exportDialogShow:false
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const emit = defineEmits<{
|
|
55
|
-
(e: 'refresh'): void
|
|
56
|
-
}>()
|
|
57
|
-
|
|
58
|
-
const refresh = () => { emit('refresh') }
|
|
59
|
-
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style scoped></style>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ElMessage } from "element-plus";
|
|
2
|
-
import type { MessageOptions} from "element-plus";
|
|
3
|
-
import type { App } from 'vue'
|
|
4
|
-
export class ZSYSMessage{
|
|
5
|
-
static show(msgType: 'success' | 'warning' | 'info' | 'error' = 'info', msg:string): void {
|
|
6
|
-
const options: MessageOptions = {
|
|
7
|
-
message: msg,
|
|
8
|
-
type: msgType,
|
|
9
|
-
plain: true,
|
|
10
|
-
duration: 3000, // 3秒后消失
|
|
11
|
-
showClose: false
|
|
12
|
-
};
|
|
13
|
-
ElMessage(options);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
static ShowInfo(msg:string)
|
|
17
|
-
{
|
|
18
|
-
ZSYSMessage.show('info', msg)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static ShowSuccess(msg:string)
|
|
22
|
-
{
|
|
23
|
-
ZSYSMessage.show('success', msg)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static ShowError(msg:string)
|
|
27
|
-
{
|
|
28
|
-
ZSYSMessage.show('error', msg)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
install=(app:App)=>{
|
|
32
|
-
app.component(ZSYSMessage.name as string,ZSYSMessage)
|
|
33
|
-
return app
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-popconfirm @confirm="confirm" title="确认要删除吗?" v-if="!view.loading" confirm-button-text="删除"
|
|
3
|
-
cancel-button-text="取消" confirm-button-type="danger">
|
|
4
|
-
<template #reference>
|
|
5
|
-
<el-link type="primary">删除</el-link>
|
|
6
|
-
</template>
|
|
7
|
-
</el-popconfirm>
|
|
8
|
-
<el-popover v-if="view.loading" :visible="view.loading" :width="40" placement="top" content="正在删除">
|
|
9
|
-
<template #reference>
|
|
10
|
-
<el-link type="primary" style="margin-left: 6px;" disabled>删除</el-link>
|
|
11
|
-
</template>
|
|
12
|
-
</el-popover>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
import { reactive, type PropType } from 'vue'
|
|
17
|
-
import { HttpApiV1 as http } from '../core/httpapi/http_api_v1'
|
|
18
|
-
import { ZSYSMessage } from '../components/message'
|
|
19
|
-
import { zsysEventBus } from '../core/common/zsys_eventBus'
|
|
20
|
-
const eventBus = zsysEventBus()
|
|
21
|
-
const view = reactive({
|
|
22
|
-
loading: false
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const props = defineProps({
|
|
26
|
-
id: { type: BigInt as unknown as PropType<bigint>, required: true },
|
|
27
|
-
api_url: { type: String, required: true },
|
|
28
|
-
module: { type: String, default:'all' }
|
|
29
|
-
// closeOnClickModal: { type: Boolean, default: true }
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// const refresh_list=inject<() => void>('refresh_list')
|
|
33
|
-
// console.log(refresh_list);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const confirm = async () => {
|
|
37
|
-
view.loading = true
|
|
38
|
-
try {
|
|
39
|
-
let res = await http.Post(props.api_url, { id: props.id })
|
|
40
|
-
if (res.IsSuccess) {
|
|
41
|
-
view.loading = false
|
|
42
|
-
ZSYSMessage.ShowSuccess("删除成功")
|
|
43
|
-
console.log('aud',props.module);
|
|
44
|
-
console.log(props.module);
|
|
45
|
-
|
|
46
|
-
eventBus.emit("aud", {module:props.module, id: props.id })
|
|
47
|
-
} else {
|
|
48
|
-
ZSYSMessage.ShowError("删除失败")
|
|
49
|
-
}
|
|
50
|
-
} catch (e) {
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
view.loading = false
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<style scoped></style>
|
package/core/app.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import '../css/common.css'
|
|
3
|
-
import app from '../view/app.vue'
|
|
4
|
-
import {createPinia} from 'pinia'
|
|
5
|
-
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
|
6
|
-
|
|
7
|
-
import ElementPlus from 'element-plus' //导入 ElementPlus 组件库的所有模块和功能
|
|
8
|
-
import 'element-plus/dist/index.css' //导入 ElementPlus 组件库所需的全局 CSS 样式
|
|
9
|
-
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//路由
|
|
13
|
-
import {initRouter} from './router.ts' //导入路由模块
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const zsysapp=createApp(app)
|
|
17
|
-
|
|
18
|
-
const pinia=createPinia()
|
|
19
|
-
pinia.use(piniaPluginPersistedstate)
|
|
20
|
-
|
|
21
|
-
// addFrameRouter({path:'/desktop',component:()=>import('../../test_view/test_desktop.vue')})
|
|
22
|
-
|
|
23
|
-
zsysapp.use(initRouter()) //将 Vue Router 插件注册到 Vue 应用中
|
|
24
|
-
zsysapp.use(ElementPlus,{locale: zhCn}) //将 ElementPlus 插件注册到 Vue 应用中
|
|
25
|
-
zsysapp.use(pinia)
|
|
26
|
-
//从后台获取全局信息
|
|
27
|
-
// import {GetPublish}from '../core/runtime.ts'
|
|
28
|
-
// GetPublish(zsysapp)
|
|
29
|
-
zsysapp.mount('#app')
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export default zsysapp
|