vue2-client 1.6.48 → 1.7.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/.env +15 -15
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +1 -1
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +667 -667
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1 -1
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +468 -462
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +1 -1
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +8 -2
- package/src/base-client/components/common/Upload/Upload.vue +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +2 -2
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +1 -1
- package/src/base-client/components/common/XForm/XForm.vue +2 -2
- package/src/base-client/components/common/XForm/XFormItem.vue +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +12 -4
- package/src/base-client/components/common/XImportExcel/XImportExcel.vue +1 -1
- package/src/base-client/components/common/XTable/XTable.vue +506 -505
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +1 -1
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +1 -1
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +1 -1
- package/src/config/default/setting.config.js +46 -46
- package/src/layouts/header/HeaderNotice.vue +1 -1
- package/src/layouts/header/InstitutionDetail.vue +2 -2
- package/src/pages/CreateQueryPage.vue +84 -84
- package/src/pages/login/Login.vue +4 -1
- package/src/pages/report/ReportTableHome.vue +1 -1
- package/src/pages/system/dictionary/index.vue +43 -43
- package/src/pages/system/file/index.vue +3 -3
- package/src/pages/system/monitor/loginInfor/index.vue +36 -36
- package/src/pages/system/monitor/operLog/index.vue +36 -36
- package/src/router/async/router.map.js +0 -2
- package/src/services/api/DictionaryDetailsViewApi.js +1 -1
- package/src/services/api/LogDetailsViewApi.js +3 -3
- package/src/services/api/QueryParamsDetailsViewApi.js +1 -1
- package/src/services/api/TicketDetailsViewApi.js +15 -15
- package/src/services/api/common.js +137 -123
- package/src/services/api/commonTempTable.js +3 -3
- package/src/services/api/logininfor/index.js +1 -1
- package/src/services/api/manage.js +2 -2
- package/src/pages/system/queryParams/index.vue +0 -43
|
@@ -1,123 +1,137 @@
|
|
|
1
|
-
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
2
|
-
import notification from 'ant-design-vue/lib/notification'
|
|
3
|
-
import message from 'ant-design-vue/lib/message'
|
|
4
|
-
import { blobValidate } from '@vue2-client/utils/common'
|
|
5
|
-
import errorCode from '@vue2-client/utils/errorCode'
|
|
6
|
-
import { saveAs } from 'file-saver'
|
|
7
|
-
import { post } from '@vue2-client/services/api/restTools'
|
|
8
|
-
|
|
9
|
-
const commonApi = {
|
|
10
|
-
// 获取表格列配置
|
|
11
|
-
|
|
12
|
-
// 通用查询
|
|
13
|
-
query: 'logic/commonQuery',
|
|
14
|
-
// 表单查询
|
|
15
|
-
queryWithResource: 'logic/commonQueryWithResource',
|
|
16
|
-
// 通用新增/修改
|
|
17
|
-
addOrModify: 'logic/commonAddOrModify',
|
|
18
|
-
// 通用删除
|
|
19
|
-
delete: 'logic/commonDelete',
|
|
20
|
-
// 获取字典键列表
|
|
21
|
-
getDictionaryParam: '/api/
|
|
22
|
-
// 获取所有员工及其部门的级联菜单数据
|
|
23
|
-
getEmpTree: '/api/
|
|
24
|
-
// 导入数据
|
|
25
|
-
importData: 'logic/importData',
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
export function
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
export function
|
|
52
|
-
return post('/api/' + serviceName + '/' + commonApi.
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
*/
|
|
58
|
-
export function
|
|
59
|
-
return post('/api/' + serviceName + '/' + commonApi.
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
export function
|
|
66
|
-
return post('/api/' + serviceName + '/' + commonApi.
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
export function
|
|
73
|
-
return post('/api/' + serviceName + '/' + commonApi.
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
*/
|
|
79
|
-
export function
|
|
80
|
-
return post('/api/' + serviceName + '/' + commonApi.
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
1
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
2
|
+
import notification from 'ant-design-vue/lib/notification'
|
|
3
|
+
import message from 'ant-design-vue/lib/message'
|
|
4
|
+
import { blobValidate } from '@vue2-client/utils/common'
|
|
5
|
+
import errorCode from '@vue2-client/utils/errorCode'
|
|
6
|
+
import { saveAs } from 'file-saver'
|
|
7
|
+
import { post } from '@vue2-client/services/api/restTools'
|
|
8
|
+
|
|
9
|
+
const commonApi = {
|
|
10
|
+
// 获取表格列配置
|
|
11
|
+
getConfig: 'logic/getLiuliConfiguration',
|
|
12
|
+
// 通用查询
|
|
13
|
+
query: 'logic/commonQuery',
|
|
14
|
+
// 表单查询
|
|
15
|
+
queryWithResource: 'logic/commonQueryWithResource',
|
|
16
|
+
// 通用新增/修改
|
|
17
|
+
addOrModify: 'logic/commonAddOrModify',
|
|
18
|
+
// 通用删除
|
|
19
|
+
delete: 'logic/commonDelete',
|
|
20
|
+
// 获取字典键列表
|
|
21
|
+
getDictionaryParam: '/api/system/logic/getDictionaryParam',
|
|
22
|
+
// 获取所有员工及其部门的级联菜单数据
|
|
23
|
+
getEmpTree: '/api/system/logic/getEmpTree',
|
|
24
|
+
// 导入数据
|
|
25
|
+
importData: 'logic/importData',
|
|
26
|
+
// 导出数据
|
|
27
|
+
exportData: 'logic/commonExport',
|
|
28
|
+
// 下载数据
|
|
29
|
+
download: 'resource/download',
|
|
30
|
+
// 通用上传
|
|
31
|
+
upload: '/resource/upload'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function getConfigUrl (serviceName = 'system') {
|
|
35
|
+
return '/api/' + serviceName + '/' + commonApi.getConfig
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 带缓存查询的表格配置文件查询
|
|
40
|
+
* @param queryParamsName 配置名称
|
|
41
|
+
* @param serviceName 命名空间名称
|
|
42
|
+
* @param callback 回调函数
|
|
43
|
+
*/
|
|
44
|
+
export function getColumnsJson (queryParamsName, serviceName = 'system', callback) {
|
|
45
|
+
indexedDB.getByWeb(queryParamsName, getConfigUrl(serviceName), { configName: queryParamsName }, callback)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 通用查询
|
|
50
|
+
*/
|
|
51
|
+
export function query (parameter, serviceName = 'system') {
|
|
52
|
+
return post('/api/' + serviceName + '/' + commonApi.query, parameter, null)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 通用表单查询
|
|
57
|
+
*/
|
|
58
|
+
export function queryWithResource (parameter, serviceName = 'system') {
|
|
59
|
+
return post('/api/' + serviceName + '/' + commonApi.queryWithResource, parameter, null)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 通用新增/修改
|
|
64
|
+
*/
|
|
65
|
+
export function addOrModify (parameter, serviceName = 'system') {
|
|
66
|
+
return post('/api/' + serviceName + '/' + commonApi.addOrModify, parameter, null)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 通用删除
|
|
71
|
+
*/
|
|
72
|
+
export function remove (parameter, serviceName = 'system') {
|
|
73
|
+
return post('/api/' + serviceName + '/' + commonApi.delete, parameter, null)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 通用导入
|
|
78
|
+
*/
|
|
79
|
+
export function importData (parameter, serviceName = 'system') {
|
|
80
|
+
return post('/api/' + serviceName + '/' + commonApi.importData, parameter, null)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 通用导出
|
|
85
|
+
*/
|
|
86
|
+
export function exportData (parameter, serviceName = 'system') {
|
|
87
|
+
return post('/api/' + serviceName + '/' + commonApi.exportData, parameter, null)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 通用上传
|
|
92
|
+
*/
|
|
93
|
+
export function upload (parameter, serviceName = 'system', config) {
|
|
94
|
+
return post('/api/' + serviceName + '/' + commonApi.upload, parameter, config)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 通用下载
|
|
98
|
+
export function download (parameter, filename, serviceName = 'system') {
|
|
99
|
+
const notificationKey = 'download'
|
|
100
|
+
notification.open({
|
|
101
|
+
key: notificationKey,
|
|
102
|
+
message: '正在下载数据,请稍候',
|
|
103
|
+
duration: null,
|
|
104
|
+
icon: h => {
|
|
105
|
+
return h(
|
|
106
|
+
'a-icon',
|
|
107
|
+
{
|
|
108
|
+
props: {
|
|
109
|
+
type: 'loading'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
return post('/api/' + serviceName + '/' + commonApi.download, parameter, {
|
|
116
|
+
responseType: 'blob'
|
|
117
|
+
}).then(async (data) => {
|
|
118
|
+
const isLogin = await blobValidate(data)
|
|
119
|
+
if (isLogin) {
|
|
120
|
+
const blob = new Blob([data])
|
|
121
|
+
saveAs(blob, filename)
|
|
122
|
+
message.success('下载成功')
|
|
123
|
+
} else {
|
|
124
|
+
const resText = await data.text()
|
|
125
|
+
const rspObj = JSON.parse(resText)
|
|
126
|
+
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
|
127
|
+
message.error(errMsg)
|
|
128
|
+
}
|
|
129
|
+
notification.close(notificationKey)
|
|
130
|
+
}).catch((r) => {
|
|
131
|
+
message.error('功能尚未实现,敬请期待!')
|
|
132
|
+
// message.error('下载文件出现错误,请联系管理员!')
|
|
133
|
+
notification.close(notificationKey)
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { commonApi }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const CommonTempTable = {
|
|
2
2
|
// 初始化子表
|
|
3
|
-
initApplySubTable: '/api/
|
|
3
|
+
initApplySubTable: '/api/system/logic/initApplySubTable',
|
|
4
4
|
// 创建临时表,根据配置文件动态生成
|
|
5
|
-
createTempTable: '/api/
|
|
5
|
+
createTempTable: '/api/system/logic/createTempTable',
|
|
6
6
|
// 向临时表中插入数据
|
|
7
|
-
insertDataToTempTable: '/api/
|
|
7
|
+
insertDataToTempTable: '/api/system/logic/insertDataToTempTable'
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export { CommonTempTable }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const manageApi = {
|
|
2
2
|
// 查询:获取字典键列表
|
|
3
|
-
getDictionaryValue: '/api/
|
|
3
|
+
getDictionaryValue: '/api/system/logic/getDictionaryValue',
|
|
4
4
|
// 查询:获取省市区街道三级分类
|
|
5
|
-
getDivisionsOhChina: '/api/
|
|
5
|
+
getDivisionsOhChina: '/api/system/logic/getDivisionsOhChina'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { manageApi }
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-card :bordered="false">
|
|
3
|
-
<query-params-details-view
|
|
4
|
-
v-if="selectId"
|
|
5
|
-
:id="selectId"
|
|
6
|
-
:visible.sync="detailVisible"
|
|
7
|
-
/>
|
|
8
|
-
<x-form-table
|
|
9
|
-
:queryParamsName="queryParamsName"
|
|
10
|
-
title="查询配置"
|
|
11
|
-
@action="toDetail">
|
|
12
|
-
</x-form-table>
|
|
13
|
-
</a-card>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
18
|
-
import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
name: 'QueryParams',
|
|
22
|
-
components: {
|
|
23
|
-
XFormTable,
|
|
24
|
-
QueryParamsDetailsView
|
|
25
|
-
},
|
|
26
|
-
data () {
|
|
27
|
-
return {
|
|
28
|
-
// 选中的编号
|
|
29
|
-
selectId: undefined,
|
|
30
|
-
// 查询配置文件名
|
|
31
|
-
queryParamsName: 'queryParams',
|
|
32
|
-
// 是否显示详情抽屉
|
|
33
|
-
detailVisible: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
toDetail (record, id) {
|
|
38
|
-
this.selectId = id + ''
|
|
39
|
-
this.detailVisible = true
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
</script>
|