@qqt-product/system 0.0.2 → 0.0.17
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/index.es.js +53481 -10448
- package/dist/index.umd.js +94 -22
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2881 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2874 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2882 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2867 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2867 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2879 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +38 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2875 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2867 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2890 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +222 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +32 -7
- package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +25 -4
- package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1208 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2866 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2875 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +24 -11
- package/.eslintignore +0 -4
- package/.eslintrc.cjs +0 -22
- package/.prettierignore +0 -4
- package/.prettierrc.cjs +0 -41
- package/.vscode/extensions.json +0 -3
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/dist/vite.svg +0 -1
- package/index.html +0 -13
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -8
- package/src/lib/components/QAccountList/index.ts +0 -6
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -191
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -241
- package/src/lib/components/QAccountList/src/QAccountList.vue +0 -530
- package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
- package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -137
- package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
- package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -166
- package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
- package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -124
- package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
- package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -196
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -122
- package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
- package/src/lib/components/QI18nList/index.ts +0 -6
- package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
- package/src/lib/components/QI18nList/src/QI18nList.vue +0 -361
- package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
- package/src/lib/components/QImChatGroupList/index.ts +0 -6
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -94
- package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
- package/src/lib/components/QMqRecordList/index.ts +0 -6
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -105
- package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
- package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
- package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
- package/src/lib/components/QPermissionDataList/index.ts +0 -6
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
- package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -244
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -163
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
- package/src/lib/components/QQuartzJobList/index.ts +0 -6
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -263
- package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
- package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
- package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
- package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
- package/src/lib/components/QRoleList/index.ts +0 -6
- package/src/lib/components/QRoleList/src/QRoleList.vue +0 -288
- package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
- package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
- package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
- package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
- package/src/lib/components/QRoleList/src/useConfigData.ts +0 -33
- package/src/lib/components/QSupplierAccountList/index.ts +0 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -302
- package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
- package/src/lib/components/QUsageList/index.ts +0 -6
- package/src/lib/components/QUsageList/src/QUsageList.vue +0 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +0 -20
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
- package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
- package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
- package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1807
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
- package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
- package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
- package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
- package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
- package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
- package/src/lib/components/QcustomConfigList/index.ts +0 -6
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -268
- package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
- package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
- package/src/lib/components/QcustomConfigList/style/index.less +0 -3
- package/src/lib/components/QsysConfigList/index.ts +0 -6
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -125
- package/src/lib/components/QsysConfigList/src/types.ts +0 -1
- package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
- package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
- package/src/lib/components/QsysConfigList/style/index.less +0 -3
- package/src/lib/components/index.ts +0 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -143
- package/src/lib/components/integratedNodesList/src/index.vue +0 -136
- package/src/lib/components/integratedReportList/src/index.vue +0 -86
- package/src/lib/components/integratedReportSearchList/src/index.vue +0 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -50
- package/src/lib/components/loginLogList/src/index.vue +0 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +0 -63
- package/src/lib/components/operateLogList/src/index.vue +0 -57
- package/src/lib/index.ts +0 -15
- package/src/lib/utils/constant.ts +0 -1
- package/src/lib/utils/global.hook.ts +0 -337
- package/src/lib/utils/global.types.ts +0 -49
- package/src/lib/utils/regexp.ts +0 -143
- package/src/main.ts +0 -11
- package/src/vite-env.d.ts +0 -13
- package/tsconfig.json +0 -24
- package/tsconfig.node.json +0 -9
- package/vite.config.ts +0 -61
- /package/dist/{index.es.d.ts → index.d.ts} +0 -0
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import type { MapObjectNoneType, customContentSlotParams, customEditSlotParams } from './types'
|
|
2
|
-
import { Ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
export function useColumnSlots(elsAccount: Ref) {
|
|
5
|
-
const purchaseOperation = [
|
|
6
|
-
{
|
|
7
|
-
label: '查看',
|
|
8
|
-
value: 'purchaseShow',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
label: '编辑',
|
|
12
|
-
value: 'purchaseEdit',
|
|
13
|
-
},
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
const saleOperation = [
|
|
17
|
-
{
|
|
18
|
-
label: '查看',
|
|
19
|
-
value: 'saleShow',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
label: '编辑',
|
|
23
|
-
value: 'saleEdit',
|
|
24
|
-
},
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
const purchaseOperation_defult = ({ row }: customContentSlotParams) => {
|
|
28
|
-
const optainLabel: string[] = []
|
|
29
|
-
for (const operation of purchaseOperation) {
|
|
30
|
-
for (const i in operation) {
|
|
31
|
-
if (i == 'value') {
|
|
32
|
-
if (row[operation.value] > 0) {
|
|
33
|
-
optainLabel.push(operation.label)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return [<span>{optainLabel.length == 0 ? '请选择' : optainLabel.join(',')}</span>]
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const purchaseOperation_edit = ({ row, column }: customEditSlotParams) => {
|
|
43
|
-
let operatioValue: any = []
|
|
44
|
-
for (const operation of purchaseOperation) {
|
|
45
|
-
for (const i in operation) {
|
|
46
|
-
if (i == 'value') {
|
|
47
|
-
if (row[operation.value] > 0) {
|
|
48
|
-
operatioValue.push(operation.value)
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const opts = purchaseOperation.map((n) => <a-select-option value={n.value}>{n.label}</a-select-option>)
|
|
54
|
-
const props = {
|
|
55
|
-
allowClear: true,
|
|
56
|
-
mode: 'multiple',
|
|
57
|
-
'default-value': operatioValue,
|
|
58
|
-
}
|
|
59
|
-
row[column.field] = operatioValue
|
|
60
|
-
const changeVal = (value: MapObjectNoneType) => {
|
|
61
|
-
if (!value) return
|
|
62
|
-
// const { msg = '' } = regExpOptions.find(n => n.value === value)
|
|
63
|
-
// row[column.property] = value
|
|
64
|
-
// row.alertMsg = msg // 正则验证提示语
|
|
65
|
-
for (const operation of purchaseOperation) {
|
|
66
|
-
if (value.includes(operation.value)) {
|
|
67
|
-
row[operation.value] = '1'
|
|
68
|
-
} else {
|
|
69
|
-
row[operation.value] = '0'
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
row[column.field] = value
|
|
73
|
-
|
|
74
|
-
operatioValue = value
|
|
75
|
-
}
|
|
76
|
-
const deselect = () => {
|
|
77
|
-
row[column.field] = []
|
|
78
|
-
for (const operation of purchaseOperation) {
|
|
79
|
-
row[operation.value] = '0'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return [
|
|
83
|
-
<a-select onDeselect={deselect} onChange={changeVal} {...props}>
|
|
84
|
-
{opts}
|
|
85
|
-
</a-select>,
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const saleOperation_default = ({ row }: customContentSlotParams) => {
|
|
90
|
-
const optainLabel: string[] = []
|
|
91
|
-
for (const operation of saleOperation) {
|
|
92
|
-
for (const i in operation) {
|
|
93
|
-
if (i == 'value') {
|
|
94
|
-
if (row[operation.value] > 0) {
|
|
95
|
-
optainLabel.push(operation.label)
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return [<span>{optainLabel.length == 0 ? '请选择' : optainLabel.join(',')}</span>]
|
|
101
|
-
}
|
|
102
|
-
const saleOperation_edit = ({ row, column }: customEditSlotParams) => {
|
|
103
|
-
let operatioValue: string[] = []
|
|
104
|
-
for (const operation of saleOperation) {
|
|
105
|
-
for (const i in operation) {
|
|
106
|
-
if (i == 'value') {
|
|
107
|
-
if (row[operation.value] > 0) {
|
|
108
|
-
operatioValue.push(operation.value)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
const opts = saleOperation.map((n) => <a-select-option value={n.value}>{n.label}</a-select-option>)
|
|
114
|
-
|
|
115
|
-
const props = {
|
|
116
|
-
allowClear: true,
|
|
117
|
-
mode: 'multiple',
|
|
118
|
-
'default-value': operatioValue,
|
|
119
|
-
}
|
|
120
|
-
row[column.property] = operatioValue
|
|
121
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
122
|
-
const changeVal = (value: any) => {
|
|
123
|
-
if (!value) return
|
|
124
|
-
// const { msg = '' } = regExpOptions.find(n => n.value === value)
|
|
125
|
-
// row[column.property] = value
|
|
126
|
-
// row.alertMsg = msg // 正则验证提示语
|
|
127
|
-
for (const operation of saleOperation) {
|
|
128
|
-
if (value.includes(operation.value)) {
|
|
129
|
-
row[operation.value] = '1'
|
|
130
|
-
} else {
|
|
131
|
-
row[operation.value] = '0'
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
row[column.property] = value
|
|
135
|
-
operatioValue = value
|
|
136
|
-
}
|
|
137
|
-
const deselect = () => {
|
|
138
|
-
row[column.property] = []
|
|
139
|
-
for (const operation of saleOperation) {
|
|
140
|
-
row[operation.value] = '0'
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return [
|
|
144
|
-
<a-select onDeselect={deselect} onChange={changeVal} {...props}>
|
|
145
|
-
{' '}
|
|
146
|
-
{opts}{' '}
|
|
147
|
-
</a-select>,
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const getCurrentLabel = (opts: MapObjectNoneType[], currentValue: MapObjectNoneType) => {
|
|
152
|
-
let str = null
|
|
153
|
-
if (opts && opts.length) {
|
|
154
|
-
const opt = opts.filter((item) => {
|
|
155
|
-
return item.value === currentValue
|
|
156
|
-
})
|
|
157
|
-
str = opt && opt.length ? opt[0].label : null
|
|
158
|
-
// console.log(str)
|
|
159
|
-
}
|
|
160
|
-
return str
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const getMultipleCurrentLabel = (opts: MapObjectNoneType[], currentValue: MapObjectNoneType) => {
|
|
164
|
-
let str: string | null = null
|
|
165
|
-
if (opts && opts.length && currentValue.length) {
|
|
166
|
-
const opt = opts.filter((item) => {
|
|
167
|
-
return currentValue.includes(item.value)
|
|
168
|
-
})
|
|
169
|
-
str = opt && opt.length ? opt.map((rs) => rs.label).join(',') : null
|
|
170
|
-
// console.log(str)
|
|
171
|
-
}
|
|
172
|
-
return str
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const defaultValue_default = ({ row }: customContentSlotParams) => {
|
|
176
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
177
|
-
let editor: any[] = []
|
|
178
|
-
if (row.fieldType == 'select' && row.dictCode) {
|
|
179
|
-
editor = [<span>{getCurrentLabel(row.defaultValueOpts, row.defaultValue)}</span>]
|
|
180
|
-
} else if (row.fieldType == 'multiple' && row.dictCode) {
|
|
181
|
-
editor = [<span>{getMultipleCurrentLabel(row.defaultValueOpts, row.defaultValue)}</span>]
|
|
182
|
-
} else if (row.fieldType == 'switch') {
|
|
183
|
-
editor = [<m-switch v-model={row.defaultValue} />]
|
|
184
|
-
} else {
|
|
185
|
-
editor = [<span>{row.defaultValue}</span>]
|
|
186
|
-
}
|
|
187
|
-
return editor
|
|
188
|
-
}
|
|
189
|
-
const defaultValue_edit = ({ row }: customEditSlotParams) => {
|
|
190
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
191
|
-
let editor: any[] = []
|
|
192
|
-
if (row.fieldType == 'select' && row.dictCode) {
|
|
193
|
-
editor = [<vxe-select v-model={row.defaultValue} options={row.defaultValueOpts} clearable />]
|
|
194
|
-
} else if (row.fieldType == 'multiple' && row.dictCode) {
|
|
195
|
-
if (row.defaultValue && typeof row.defaultValue === 'string') {
|
|
196
|
-
row.defaultValue = row.defaultValue.split(',')
|
|
197
|
-
}
|
|
198
|
-
editor = [<vxe-select v-model={row.defaultValue} options={row.defaultValueOpts} clearable multiple />]
|
|
199
|
-
} else if (row.fieldType == 'switch') {
|
|
200
|
-
editor = [<m-switch v-model={row.defaultValue} />]
|
|
201
|
-
} else {
|
|
202
|
-
editor = [<vxe-input clearable size="small" v-model={row.defaultValue} />]
|
|
203
|
-
}
|
|
204
|
-
return editor
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const defaultValue_header = () => {
|
|
208
|
-
const contentTile = `可使用租户登录后数据用作默认值,使用方式例如:${elsAccount}`
|
|
209
|
-
return [
|
|
210
|
-
<vxe-tooltip content={contentTile} enterable>
|
|
211
|
-
<span>
|
|
212
|
-
默认值
|
|
213
|
-
<i class="vxe-icon--question"></i>
|
|
214
|
-
</span>
|
|
215
|
-
</vxe-tooltip>,
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
const right_header = () => {
|
|
220
|
-
const renderContentTip = '扩展属性由开发人员选用'
|
|
221
|
-
const renderContent = '开发配置'
|
|
222
|
-
return [
|
|
223
|
-
<vxe-tooltip content={renderContentTip} enterable>
|
|
224
|
-
<span>
|
|
225
|
-
<i class="vxe-icon--edit-outline"></i>
|
|
226
|
-
{renderContent}
|
|
227
|
-
</span>
|
|
228
|
-
</vxe-tooltip>,
|
|
229
|
-
]
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
return {
|
|
233
|
-
purchaseOperation_defult,
|
|
234
|
-
purchaseOperation_edit,
|
|
235
|
-
saleOperation_default,
|
|
236
|
-
saleOperation_edit,
|
|
237
|
-
defaultValue_default,
|
|
238
|
-
defaultValue_edit,
|
|
239
|
-
defaultValue_header,
|
|
240
|
-
right_header,
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue'
|
|
2
|
-
import { VxeTableDefines, VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeGridConstructor } from 'vxe-table'
|
|
3
|
-
export interface MapObjectNoneType {
|
|
4
|
-
[pro: string]: any
|
|
5
|
-
}
|
|
6
|
-
export interface RequestConfig extends MapObjectNoneType {
|
|
7
|
-
baseURL?: string
|
|
8
|
-
headers?: object
|
|
9
|
-
timeout?: number
|
|
10
|
-
url?: string
|
|
11
|
-
params?: object
|
|
12
|
-
data?: object
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface ResponseData extends MapObjectNoneType {
|
|
16
|
-
code?: number
|
|
17
|
-
message?: string
|
|
18
|
-
result?: any
|
|
19
|
-
success?: boolean
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface HttpClient {
|
|
23
|
-
get(config: RequestConfig): Promise<ResponseData>
|
|
24
|
-
post(config: RequestConfig): Promise<ResponseData>
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const INJECT_HTTP = 'http'
|
|
28
|
-
|
|
29
|
-
export function getProperty<T, K extends keyof T>(o: T, name: K): T[K] {
|
|
30
|
-
return o[name] // o[name] is of type T[K]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type GridQConfigEditRef = {
|
|
34
|
-
[pro: string]: Ref
|
|
35
|
-
}
|
|
36
|
-
export interface GridQConfigUnkownObj {
|
|
37
|
-
sys?: string
|
|
38
|
-
sortOrder?: number
|
|
39
|
-
option?: any
|
|
40
|
-
row?: any
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface customContentSlotParams {
|
|
44
|
-
column: VxeTableDefines.ColumnInfo
|
|
45
|
-
columnIndex: number
|
|
46
|
-
$columnIndex: number
|
|
47
|
-
row: any
|
|
48
|
-
rowIndex: number
|
|
49
|
-
$rowIndex: number
|
|
50
|
-
isHidden: boolean
|
|
51
|
-
fixed: VxeColumnPropTypes.Fixed
|
|
52
|
-
type: string
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface customEditSlotParams {
|
|
56
|
-
column: VxeTableDefines.ColumnInfo
|
|
57
|
-
columnIndex: number
|
|
58
|
-
$columnIndex: number
|
|
59
|
-
row: any
|
|
60
|
-
rowIndex: number
|
|
61
|
-
$rowIndex: number
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface customActiveMethod {
|
|
65
|
-
row: any
|
|
66
|
-
rowIndex: number
|
|
67
|
-
column: VxeTableDefines.ColumnInfo
|
|
68
|
-
columnIndex: number
|
|
69
|
-
$table: VxeTableConstructor & VxeTablePrivateMethods
|
|
70
|
-
$grid: VxeGridConstructor | null | undefined
|
|
71
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue'
|
|
2
|
-
import { useConfigData } from './useConfigData'
|
|
3
|
-
import { MapObjectNoneType } from './types'
|
|
4
|
-
export function useConfigComputed() {
|
|
5
|
-
const showBusinessTips = computed(() => {
|
|
6
|
-
return sessionStorage.getItem('businessTipsShow') ? sessionStorage.getItem('businessTipsShow') : '1'
|
|
7
|
-
})
|
|
8
|
-
const gridHeight = computed(() => {
|
|
9
|
-
let minHeight = 200
|
|
10
|
-
const clientHeight = document.documentElement.clientHeight
|
|
11
|
-
minHeight = clientHeight - 200
|
|
12
|
-
return minHeight
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const commonDevelopTabs = computed(() => {
|
|
16
|
-
const { currentStep } = useConfigData()
|
|
17
|
-
console.log('commonDevelopTabscommonDevelopTabscommonDevelopTabscommonDevelopTabs', currentStep.value)
|
|
18
|
-
const currentStepFromConfig: MapObjectNoneType[] = []
|
|
19
|
-
const currentStepGridConfig = [
|
|
20
|
-
{ field: 'fixType', title: '冻结方式' },
|
|
21
|
-
{ field: 'fold', title: '是否折叠', helpText: '系统允许的折叠字段,字段类型应为文本 、文本域、数字、小数、日期,且字段不必填' },
|
|
22
|
-
]
|
|
23
|
-
const commonDevelopTabs: MapObjectNoneType[] = [
|
|
24
|
-
{ field: 'switchConfig', title: '渲染配置', children: [] },
|
|
25
|
-
{
|
|
26
|
-
field: 'verifyConfig',
|
|
27
|
-
title: '校验配置',
|
|
28
|
-
children: [
|
|
29
|
-
{ field: 'dataFormat', title: '数据格式' },
|
|
30
|
-
{ field: 'regex', title: '正则表达式' },
|
|
31
|
-
{ field: 'alertMsg', title: '正则验证提示语' },
|
|
32
|
-
{ field: 'alertMsgI18nKey', title: '提示语I18nKey' },
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
field: 'developPlus',
|
|
37
|
-
title: '增强开发',
|
|
38
|
-
children: [
|
|
39
|
-
{ field: 'callback', title: 'PC绑定函数' },
|
|
40
|
-
{ field: 'initFunction', title: 'M端绑定函数' },
|
|
41
|
-
{ field: 'extend', title: '扩展' },
|
|
42
|
-
{ field: 'fieldValidator', title: '自定义校验方法' },
|
|
43
|
-
{ field: 'formula', title: '计算公式' },
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
if (currentStep.value == 2) {
|
|
49
|
-
for (const i of commonDevelopTabs) {
|
|
50
|
-
if (i.field == 'switchConfig') i.children = [...currentStepFromConfig]
|
|
51
|
-
break
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (currentStep.value == 3) {
|
|
55
|
-
for (const i of commonDevelopTabs) {
|
|
56
|
-
if (i.field == 'switchConfig') i.children = [...currentStepGridConfig]
|
|
57
|
-
break
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
for (const [i, v] of commonDevelopTabs.entries()) {
|
|
61
|
-
if (v.field == 'switchConfig' && v.children.length == 0) {
|
|
62
|
-
commonDevelopTabs.splice(i, 1)
|
|
63
|
-
break
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return commonDevelopTabs
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
return {
|
|
71
|
-
showBusinessTips,
|
|
72
|
-
gridHeight,
|
|
73
|
-
commonDevelopTabs,
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { shallowRef, reactive, ref } from 'vue'
|
|
2
|
-
import * as customConfigEdits from './types'
|
|
3
|
-
// import { VxeTableInstance } from 'vxe-table'
|
|
4
|
-
// import type {}
|
|
5
|
-
export function useConfigData() {
|
|
6
|
-
//响应
|
|
7
|
-
const formRef = ref()
|
|
8
|
-
const groupGrid = ref()
|
|
9
|
-
const headGrid = ref()
|
|
10
|
-
const selectGrid = ref()
|
|
11
|
-
const dictCodeModal = ref()
|
|
12
|
-
const currentDictRow = ref()
|
|
13
|
-
const currentItemGrid = ref()
|
|
14
|
-
const itemGrid = ref()
|
|
15
|
-
const form = reactive({
|
|
16
|
-
templateName: '',
|
|
17
|
-
businessType: '',
|
|
18
|
-
company: '',
|
|
19
|
-
purchaseOrg: '',
|
|
20
|
-
purchaseGroup: '',
|
|
21
|
-
auditLayout: 'tab',
|
|
22
|
-
sortOrder: 1,
|
|
23
|
-
editLayout: 'tab',
|
|
24
|
-
examineLayout: 'tab',
|
|
25
|
-
defaultTypeFlag: false,
|
|
26
|
-
templateNumber: '',
|
|
27
|
-
templateVersion: '1',
|
|
28
|
-
extend: '',
|
|
29
|
-
id: '',
|
|
30
|
-
elsAccount: '',
|
|
31
|
-
})
|
|
32
|
-
const confirmLoading = ref<boolean>(true)
|
|
33
|
-
const currentStep = shallowRef<number>(0)
|
|
34
|
-
const companyCode = shallowRef<string>(`purchase_organization_info,org_name,org_code,org_category_code = "companyCode" && status="1"`)
|
|
35
|
-
const purchaseOrganization = shallowRef<string>(`purchase_organization_info,org_name,org_code,org_category_code = "purchaseOrganization" && status="1"`)
|
|
36
|
-
const purchaseGroup = shallowRef<string>(`purchase_organization_info,org_name,org_code,org_category_code = "purchaseGroup" && status="1"`)
|
|
37
|
-
const groupData = ref<customConfigEdits.MapObjectNoneType[]>()
|
|
38
|
-
const headData = ref<customConfigEdits.MapObjectNoneType[]>()
|
|
39
|
-
const itemData = ref<customConfigEdits.MapObjectNoneType[]>()
|
|
40
|
-
const fieldData = ref<customConfigEdits.MapObjectNoneType[]>()
|
|
41
|
-
const visible = ref<boolean>(false)
|
|
42
|
-
const drawerVisible = ref<boolean>(false)
|
|
43
|
-
const editorModalFlags = ref<boolean>(false)
|
|
44
|
-
const perviewOpen = shallowRef<boolean>(false)
|
|
45
|
-
const currentDrawer = ref<customConfigEdits.MapObjectNoneType>({})
|
|
46
|
-
const sampleCode = ref<string>()
|
|
47
|
-
const nowFieldType = ref<string>()
|
|
48
|
-
const currentRow = ref({})
|
|
49
|
-
const codeEditorFields = shallowRef<string[]>(['callback', 'initFunction', 'extend', 'fieldValidator'])
|
|
50
|
-
const switchFields = shallowRef<string[]>(['sys', 'mobile', 'audit'])
|
|
51
|
-
const headRules = shallowRef({
|
|
52
|
-
groupCode: [{ required: true, message: '请选择分组' }],
|
|
53
|
-
fieldName: [{ required: true, message: '请输入字段名' }],
|
|
54
|
-
fieldLabel: [{ required: true, message: '请输入字段描述' }],
|
|
55
|
-
fieldType: [{ required: true, message: '请选择字段类型' }],
|
|
56
|
-
})
|
|
57
|
-
const itemRules = shallowRef({
|
|
58
|
-
fieldName: [{ required: true, message: '请输入字段名' }],
|
|
59
|
-
fieldLabel: [{ required: true, message: '请输入字段描述' }],
|
|
60
|
-
fieldType: [{ required: true, message: '请选择字段类型' }],
|
|
61
|
-
})
|
|
62
|
-
const remoteJsFilePath = ref('')
|
|
63
|
-
//常量
|
|
64
|
-
const fieldTypeOptain = [
|
|
65
|
-
{ value: 'computed', label: '自动计算' },
|
|
66
|
-
{ value: 'input', label: '输入框' },
|
|
67
|
-
{ value: 'textArea', label: '文本域' },
|
|
68
|
-
{ value: 'select', label: '下拉列表' },
|
|
69
|
-
{ value: 'multiple', label: '下拉多选' },
|
|
70
|
-
{ value: 'date', label: '日期' },
|
|
71
|
-
{ value: 'number', label: '数字' },
|
|
72
|
-
{ value: 'float', label: '小数' },
|
|
73
|
-
{ value: 'switch', label: '开关' },
|
|
74
|
-
{ value: 'treeSelect', label: '树形下拉' },
|
|
75
|
-
{ value: 'codeEditorModel', label: '代码编辑器' },
|
|
76
|
-
{ value: 'selectModal', label: '弹窗选择' },
|
|
77
|
-
{ value: 'remoteSelect', label: '远程下拉搜索' },
|
|
78
|
-
{ value: 'image', label: '图片' },
|
|
79
|
-
{ value: 'richEditorModel', label: '富文本编辑器' },
|
|
80
|
-
{ value: 'ladderPrice', label: '阶梯价格' },
|
|
81
|
-
{ value: 'hiddenField', label: '隐藏域' },
|
|
82
|
-
{ value: 'customSelectModal', label: '自定义弹窗选择' },
|
|
83
|
-
{ value: 'currency', label: '货币(千分位)' },
|
|
84
|
-
{ value: 'cascader', label: '级联' },
|
|
85
|
-
{ value: 'color', label: '颜色' },
|
|
86
|
-
{ value: 'icon', label: '图标' },
|
|
87
|
-
]
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
formRef,
|
|
91
|
-
groupGrid,
|
|
92
|
-
form,
|
|
93
|
-
confirmLoading,
|
|
94
|
-
currentStep,
|
|
95
|
-
companyCode,
|
|
96
|
-
purchaseOrganization,
|
|
97
|
-
purchaseGroup,
|
|
98
|
-
groupData,
|
|
99
|
-
headData,
|
|
100
|
-
itemData,
|
|
101
|
-
headGrid,
|
|
102
|
-
fieldTypeOptain,
|
|
103
|
-
headRules,
|
|
104
|
-
fieldData,
|
|
105
|
-
visible,
|
|
106
|
-
selectGrid,
|
|
107
|
-
currentDrawer,
|
|
108
|
-
dictCodeModal,
|
|
109
|
-
currentDictRow,
|
|
110
|
-
currentItemGrid,
|
|
111
|
-
drawerVisible,
|
|
112
|
-
codeEditorFields,
|
|
113
|
-
editorModalFlags,
|
|
114
|
-
sampleCode,
|
|
115
|
-
nowFieldType,
|
|
116
|
-
switchFields,
|
|
117
|
-
itemRules,
|
|
118
|
-
itemGrid,
|
|
119
|
-
remoteJsFilePath,
|
|
120
|
-
perviewOpen,
|
|
121
|
-
currentRow,
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue'
|
|
2
|
-
import type { GridQConfigUnkownObj, customActiveMethod, MapObjectNoneType, HttpClient } from './types'
|
|
3
|
-
import { message } from '@qqt-product/ui'
|
|
4
|
-
// import { useConfigData } from './useConfigData'
|
|
5
|
-
|
|
6
|
-
export function useConfigMethods() {
|
|
7
|
-
const filterFieldNameMethod = ({ option, row }: GridQConfigUnkownObj) => {
|
|
8
|
-
const fieldName = row.fieldName.toLocaleLowerCase()
|
|
9
|
-
return fieldName.indexOf(option.data) !== -1
|
|
10
|
-
}
|
|
11
|
-
const filterFieldLabelMethod = ({ option, row }: GridQConfigUnkownObj) => {
|
|
12
|
-
const fieldLabel = row.fieldLabel.toLocaleLowerCase()
|
|
13
|
-
return fieldLabel.indexOf(option.data) !== -1
|
|
14
|
-
}
|
|
15
|
-
const filterGroupCodeMethod = ({ option, row }: GridQConfigUnkownObj) => {
|
|
16
|
-
const groupCode = row.groupCode.toLocaleLowerCase()
|
|
17
|
-
return groupCode.indexOf(option.data) !== -1
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const setGridValeByField = (currentRow: MapObjectNoneType, field: string, value: unknown) => {
|
|
21
|
-
currentRow.row[field] = value
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const changeFilterEvent = (evnt: Event, option: MapObjectNoneType, $panel: MapObjectNoneType) => {
|
|
25
|
-
$panel.changeOption(evnt, !!option.data, option)
|
|
26
|
-
}
|
|
27
|
-
const removeDictCode = (row: MapObjectNoneType) => {
|
|
28
|
-
row.dictCode = ''
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
filterFieldNameMethod,
|
|
32
|
-
filterFieldLabelMethod,
|
|
33
|
-
setGridValeByField,
|
|
34
|
-
changeFilterEvent,
|
|
35
|
-
filterGroupCodeMethod,
|
|
36
|
-
removeDictCode,
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function useConfigElsAccountMethods(elsAccount: Ref) {
|
|
41
|
-
const activeCellMethod = ({ row, column }: customActiveMethod) => {
|
|
42
|
-
const disabledFields = ['fieldName']
|
|
43
|
-
if (elsAccount.value != '100000' && row.sys == '1' && disabledFields.includes(column.property)) {
|
|
44
|
-
return false
|
|
45
|
-
} else {
|
|
46
|
-
return true
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
activeCellMethod,
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function useConigApiMethods(qHttp: HttpClient) {
|
|
56
|
-
const handleExportXls = function (fileName: string, headId: string, type: string, defineColumnCode: string, exportXlsUrl: string, callback: () => void) {
|
|
57
|
-
// confirmLoading.value = true
|
|
58
|
-
callback()
|
|
59
|
-
// console.log('isRef', isRef(confirmLoading))
|
|
60
|
-
fileName = fileName || '导出文件'
|
|
61
|
-
// const params = Object.assign({})
|
|
62
|
-
const params = {
|
|
63
|
-
fileName,
|
|
64
|
-
headId,
|
|
65
|
-
type,
|
|
66
|
-
defineColumnCode,
|
|
67
|
-
exportXlsUrl,
|
|
68
|
-
}
|
|
69
|
-
// this.$set(params, 'defineColumnCode', defineColumnCode)
|
|
70
|
-
// this.$set(params, 'headId', headId)
|
|
71
|
-
// this.$set(params, 'type', type)
|
|
72
|
-
// this.$set(params, 'fileName', fileName)
|
|
73
|
-
// qHttp.post(exportXlsUrl, params, params)
|
|
74
|
-
qHttp
|
|
75
|
-
.post({
|
|
76
|
-
url: exportXlsUrl,
|
|
77
|
-
params: params,
|
|
78
|
-
data: params,
|
|
79
|
-
responseType: 'blob',
|
|
80
|
-
})
|
|
81
|
-
.then((data) => {
|
|
82
|
-
// responseType为blob的请求,统一获取错误信息
|
|
83
|
-
if (data.type === 'application/json') {
|
|
84
|
-
const fileReader = new FileReader()
|
|
85
|
-
fileReader.onloadend = () => {
|
|
86
|
-
const jsonData = JSON.parse(fileReader.result as string)
|
|
87
|
-
message.error(jsonData.message)
|
|
88
|
-
}
|
|
89
|
-
fileReader.readAsText(data as Blob)
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
if (!data) {
|
|
93
|
-
message.error('文件下载失败')
|
|
94
|
-
return
|
|
95
|
-
}
|
|
96
|
-
// if ('msSaveBlob' in window.navigator) {
|
|
97
|
-
// window.navigator.msSaveBlob(new Blob([data as Blob]), fileName + '.xls')
|
|
98
|
-
// } else {
|
|
99
|
-
const url = window.URL.createObjectURL(new Blob([data as Blob]))
|
|
100
|
-
const link = document.createElement('a')
|
|
101
|
-
link.style.display = 'none'
|
|
102
|
-
link.href = url
|
|
103
|
-
link.setAttribute('download', fileName + '.xls')
|
|
104
|
-
document.body.appendChild(link)
|
|
105
|
-
link.click()
|
|
106
|
-
document.body.removeChild(link) //下载完成移除元素
|
|
107
|
-
window.URL.revokeObjectURL(url) //释放掉blob对象
|
|
108
|
-
// }
|
|
109
|
-
})
|
|
110
|
-
.finally(() => {
|
|
111
|
-
// confirmLoading.value = false
|
|
112
|
-
callback()
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return { handleExportXls }
|
|
117
|
-
}
|