Browse Source

新加交易

main
hulei 3 weeks ago
parent
commit
f3aa22bd3c

+ 2
- 0
ant-design-pro-vue3/src/locales/menu/cn.ts View File

@@ -81,6 +81,8 @@ export default {
81 81
     't2000.title': '柜面交易',
82 82
     't2000.t2000.title': '开户',
83 83
     't2001.t2001.title': '子账户开户',
84
+    't9042.t9042.title': '授权查询',
85
+
84 86
 
85 87
 
86 88
 }

+ 9
- 2
ant-design-pro-vue3/src/router/exampleRouterMap.ts View File

@@ -189,18 +189,25 @@ export const example: Router = {
189 189
             component: RouteView,
190 190
             meta: { title: 'menu.t2000.title' },
191 191
             children: [
192
-                {   //日期选择器
192
+                {   //对私开户
193 193
                     path: '/zp/t2000/T2000',
194 194
                     name: 't2000',
195 195
                     component: () => import('@/views/front/t2000/T2000.vue'),
196 196
                     meta: { title: 'menu.t2000.t2000.title' },
197 197
                 },
198
-                {   //日期选择器
198
+                {   //子账户开户
199 199
                     path: '/zp/t2001/T2001',
200 200
                     name: 't2001',
201 201
                     component: () => import('@/views/front/t2001/T2001.vue'),
202 202
                     meta: { title: 'menu.t2001.t2001.title' },
203 203
                 }
204
+                ,
205
+                {   //授权查询
206
+                    path: '/zp/t9042/T9042',
207
+                    name: 't9042',
208
+                    component: () => import('@/views/front/T9042/T9042.vue'),
209
+                    meta: { title: 'menu.t9042.t9042.title' },
210
+                }
204 211
             ]
205 212
         }
206 213
     ]

+ 341
- 0
ant-design-pro-vue3/src/views/front/T9042/T9042.vue View File

@@ -0,0 +1,341 @@
1
+<template>
2
+    <a-layout>
3
+        <a-layout-content>
4
+            <a-card title="授权查询" :bordered="false">
5
+                <a-form :model="form" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
6
+                    <a-row :gutter="24">
7
+                        <a-col :span="8">
8
+                            <a-form-item label="交易行号" required>
9
+                                <a-input v-model:value="form.unitNo" @blur="handleUnitNoBlur" :max-length="20" />
10
+                            </a-form-item>
11
+                        </a-col>
12
+                        <a-col :span="8">
13
+                            <a-form-item label="操作员号">
14
+                                <a-input v-model:value="form.tellerNo" />
15
+                            </a-form-item>
16
+                        </a-col>
17
+                        <a-col :span="8">
18
+                            <a-form-item label="授权类型" required>
19
+                                <a-select v-model:value="form.authType">
20
+                                    <a-select-option v-for="item in authTypes" :key="item.value" :value="item.value">
21
+                                        {{ item.label }}
22
+                                    </a-select-option>
23
+                                </a-select>
24
+                            </a-form-item>
25
+                        </a-col>
26
+                    </a-row>
27
+                    <a-row :gutter="24">
28
+                        <a-col :span="8">
29
+                            <a-form-item label="起始日期" required>
30
+                                <a-date-picker v-model:value="form.startDate" style="width: 100%" format="YYYYMMDD"
31
+                                    value-format="YYYYMMDD" />
32
+                            </a-form-item>
33
+                        </a-col>
34
+                        <a-col :span="8">
35
+                            <a-form-item label="终止日期" required>
36
+                                <a-date-picker v-model:value="form.endDate" style="width: 100%" format="YYYYMMDD"
37
+                                    value-format="YYYYMMDD" />
38
+                            </a-form-item>
39
+                        </a-col>
40
+                        <a-col :span="8">
41
+                            <a-form-item :wrapper-col="{ offset: 6 }">
42
+                                <a-button type="primary" @click="handleQuery">查询</a-button>
43
+                            </a-form-item>
44
+                        </a-col>
45
+                    </a-row>
46
+                </a-form>
47
+            </a-card>
48
+
49
+            <a-card :bordered="false" style="margin-top: 24px">
50
+                <div class="table-container">
51
+                    <a-table :data-source="taskList" :columns="visibleColumns" bordered :scroll="{ x: 'max-content' }"
52
+                        size="middle">
53
+                        <template #bodyCell="{ column, record }">
54
+                            <template v-if="column.dataIndex === 'action'">
55
+                                <a-button type="link" @click="handlePrint(record)">打印</a-button>
56
+                            </template>
57
+                            <template v-else-if="column.dataIndex === 'authDate'">
58
+                                {{ formatDateTime(record.authDate) }}
59
+                            </template>
60
+                        </template>
61
+                    </a-table>
62
+                </div>
63
+            </a-card>
64
+        </a-layout-content>
65
+    </a-layout>
66
+</template>
67
+
68
+<script lang="ts" setup>
69
+import { ref, reactive, onMounted, computed } from 'vue'
70
+import { message } from 'ant-design-vue'
71
+import dayjs from 'dayjs'
72
+import * as service from '../services';
73
+//import { useUserStore } from '@/stores/user'
74
+
75
+//const userStore = useUserStore()
76
+
77
+// 表单数据
78
+const form = reactive({
79
+    unitNo: '',
80
+    tellerNo: '',
81
+    authType: '',
82
+    startDate: '',
83
+    endDate: ''
84
+})
85
+
86
+// 授权类型选项
87
+const authTypes = ref([
88
+    { value: '0', label: '全部' },
89
+    { value: '1', label: '本地授权' },
90
+    { value: '2', label: '远程授权' },
91
+    { value: '3', label: '预授权' }
92
+])
93
+
94
+// 任务列表
95
+const taskList = ref<any[]>([])
96
+
97
+// 版本控制标志
98
+const flag = ref('')
99
+
100
+// 完整列配置
101
+const allColumns = ref([
102
+    { title: '申请日期', dataIndex: 'applyDate', key: 'applyDate', visible: true },
103
+    { title: '账号', dataIndex: 'account', key: 'account', visible: false },
104
+    { title: '户名', dataIndex: 'accountName', key: 'accountName', visible: false },
105
+    { title: '金额/基数', dataIndex: 'amount', key: 'amount', visible: true },
106
+    { title: '交易', dataIndex: 'trade', key: 'trade', visible: true },
107
+    { title: '申请机构号', dataIndex: 'applyOrgNo', key: 'applyOrgNo', visible: false },
108
+    { title: '申请柜员号', dataIndex: 'applyTellerNo', key: 'applyTellerNo', visible: true },
109
+    { title: '申请柜员名称', dataIndex: 'applyTellerName', key: 'applyTellerName', visible: false },
110
+    { title: '授权日期', dataIndex: 'authDate', key: 'authDate', visible: false },
111
+    { title: '授权机构号', dataIndex: 'authOrgNo', key: 'authOrgNo', visible: false },
112
+    { title: '授权柜员号', dataIndex: 'authTellerNo', key: 'authTellerNo', visible: true },
113
+    { title: '授权柜员名称', dataIndex: 'authTellerName', key: 'authTellerName', visible: false },
114
+    { title: '授权使用时间', dataIndex: 'authUseTime', key: 'authUseTime', visible: true },
115
+    { title: '授权岗位', dataIndex: 'authPost', key: 'authPost', visible: false },
116
+    { title: '授权级别', dataIndex: 'authLevel', key: 'authLevel', visible: false },
117
+    { title: '授权模式', dataIndex: 'authMode', key: 'authMode', visible: false },
118
+    { title: '核心流水', dataIndex: 'coreFlow', key: 'coreFlow', visible: true },
119
+    { title: '核心日期', dataIndex: 'coreDate', key: 'coreDate', visible: false },
120
+    { title: '授权业务描述', dataIndex: 'authBizDesc', key: 'authBizDesc', visible: false },
121
+    { title: '状态', dataIndex: 'status', key: 'status', visible: true },
122
+    { title: '附加信息', dataIndex: 'extraInfo', key: 'extraInfo', visible: false },
123
+    { title: '操作', dataIndex: 'action', key: 'action', visible: true }
124
+])
125
+
126
+// 计算可见列
127
+const visibleColumns = computed(() => {
128
+    return allColumns.value.filter(col => col.visible)
129
+})
130
+
131
+// 初始化页面
132
+onMounted(() => {
133
+    initPage()
134
+    // 获取版本配置
135
+    getSystemConfig().then(config => {
136
+        flag.value = config
137
+        console.log("版本号", flag.value);
138
+        updateColumnVisibility()
139
+    })
140
+})
141
+
142
+// 初始化页面数据
143
+const initPage = () => {
144
+    form.authType = '0'
145
+    form.startDate = dayjs().format('YYYYMMDD')
146
+    form.endDate = dayjs().format('YYYYMMDD')
147
+    //form.unitNo = userStore.kinbrNo || ''
148
+}
149
+
150
+// 更新列可见性
151
+const updateColumnVisibility = () => {
152
+    if (['V10', 'V13', 'V18', 'V21', 'V22', 'V23', 'V24'].includes(flag.value)) {
153
+        allColumns.value.forEach(col => {
154
+            if (['account', 'accountName', 'applyOrgNo', 'applyTellerName', 'authDate',
155
+                'authOrgNo', 'authTellerName', 'authPost', 'authLevel', 'authMode',
156
+                'coreDate', 'authBizDesc', 'extraInfo'].includes(col.key)) {
157
+                col.visible = false
158
+            }
159
+        })
160
+    }
161
+}
162
+
163
+// 绑定数据
164
+const bindGrid = async () => {
165
+    const startTime = form.startDate + '000000'
166
+    const endTime = form.endDate + '235959'
167
+
168
+    try {
169
+        const data = await getAuthRecords(form.unitNo, form.tellerNo, form.authType, startTime, endTime)
170
+        if (data) {
171
+            taskList.value = processData(data)
172
+        }
173
+    } catch (error) {
174
+        message.error('获取授权记录失败')
175
+    }
176
+}
177
+
178
+// 处理数据
179
+const processData = (data: string[]) => {
180
+    if (!data || data.length === 0) return []
181
+
182
+    // 针对返回的数据做排序
183
+    let list = [...data]
184
+
185
+    if (flag.value !== "V10" && flag.value !== "V18") {
186
+        list.sort((x, y) => {
187
+            try {
188
+                const tellerX = x.split('|')[6]
189
+                const tellerY = y.split('|')[6]
190
+                return tellerX.localeCompare(tellerY)
191
+            } catch {
192
+                return -1
193
+            }
194
+        })
195
+    } else {
196
+        // 齐丰-申请柜员号排序后,再以授权时间进行排序
197
+        list = list
198
+            .map(item => ({ item, parts: item.split('|') }))
199
+            .sort((a, b) => {
200
+                const tellerCompare = a.parts[6].localeCompare(b.parts[6])
201
+                return tellerCompare !== 0 ? tellerCompare : a.parts[8].localeCompare(b.parts[8])
202
+            })
203
+            .map(({ item }) => item)
204
+    }
205
+
206
+    const processedData: any[] = []
207
+    let prevItem: string[] | null = null
208
+
209
+    list.forEach(item => {
210
+        if (!item) return
211
+
212
+        const currentItem = item.replace(/null/g, '').split('|')
213
+
214
+        if (!prevItem) {
215
+            prevItem = currentItem
216
+            return
217
+        }
218
+
219
+        // 检查是否需要合并
220
+        if (currentItem[0] === prevItem[0] && currentItem[16] === prevItem[16]) {
221
+            // 合并授权岗位
222
+            if (currentItem[13] && currentItem[13] !== prevItem[13]) {
223
+                prevItem[13] = prevItem[13] ? `${prevItem[13]}/${currentItem[13]}` : currentItem[13]
224
+            }
225
+            // 更新附加信息
226
+            if (currentItem[20]) {
227
+                prevItem[20] = currentItem[20]
228
+            }
229
+        } else {
230
+            // 添加前一项到结果
231
+            processedData.push(createRecord(prevItem))
232
+            prevItem = currentItem
233
+        }
234
+    })
235
+
236
+    // 添加最后一项
237
+    if (prevItem) {
238
+        processedData.push(createRecord(prevItem))
239
+    }
240
+
241
+    return processedData
242
+}
243
+
244
+// 创建记录对象
245
+const createRecord = (parts: string[]) => {
246
+    return {
247
+        applyDate: parts[0],
248
+        account: parts[1],
249
+        accountName: parts[2],
250
+        amount: parts[3],
251
+        trade: parts[4],
252
+        applyOrgNo: parts[5],
253
+        applyTellerNo: parts[6],
254
+        applyTellerName: parts[7],
255
+        authDate: parts[8],
256
+        authOrgNo: parts[9],
257
+        authTellerNo: parts[10],
258
+        authTellerName: parts[11],
259
+        authUseTime: parts[12],
260
+        authPost: parts[13],
261
+        authLevel: parts[14],
262
+        authMode: parts[15],
263
+        coreFlow: parts[16],
264
+        coreDate: parts[17],
265
+        authBizDesc: parts[18],
266
+        status: parts[19],
267
+        extraInfo: parts[20]
268
+    }
269
+}
270
+
271
+// 查询按钮点击事件
272
+const handleQuery = () => {
273
+    alert("提交成功")
274
+    if (parseInt(form.startDate) > parseInt(form.endDate)) {
275
+        message.error('终止日期不能小于起始日期!')
276
+        return
277
+    }
278
+    bindGrid()
279
+}
280
+
281
+// 交易行号失去焦点事件
282
+const handleUnitNoBlur = async () => {
283
+    const isValid = await validateUnitNo(form.unitNo)
284
+    if (!isValid) {
285
+        message.error('该法人无此机构请重新输入!')
286
+    }
287
+}
288
+
289
+// 打印按钮点击事件
290
+const handlePrint = (record: any) => {
291
+    printRecord(record)
292
+}
293
+
294
+// 获取系统配置
295
+const getSystemConfig = async (): Promise<string> => {
296
+    return service.TT_SYSCONFIG_GetConfigValueByConfigID("123")
297
+}
298
+
299
+// 获取授权记录
300
+const getAuthRecords = async (unitNo: string, tellerNo: string, authType: string, startTime: string, endTime: string): Promise<string[]> => {
301
+
302
+
303
+
304
+    return []
305
+}
306
+
307
+// 验证交易行号
308
+const validateUnitNo = async (unitNo: string): Promise<boolean> => {
309
+    // 实际验证逻辑
310
+    return true
311
+}
312
+
313
+// 打印记录
314
+const printRecord = (record: any) => {
315
+    // 实际打印逻辑
316
+    console.log('打印记录:', record)
317
+}
318
+
319
+// 格式化日期时间
320
+const formatDateTime = (dateTime: string) => {
321
+    if (dateTime && dateTime.length === 14) {
322
+        return dayjs(dateTime).format('YYYY-MM-DD HH:mm:ss')
323
+    }
324
+    return dateTime
325
+}
326
+</script>
327
+
328
+<style scoped>
329
+.ant-card {
330
+    margin-bottom: 24px;
331
+}
332
+
333
+.table-container {
334
+    width: 100%;
335
+    overflow-x: auto;
336
+}
337
+
338
+:deep(.ant-table) {
339
+    min-width: 1800px;
340
+}
341
+</style>

+ 283
- 0
ant-design-pro-vue3/src/views/front/serviceManager/TradeHandle.ts View File

@@ -0,0 +1,283 @@
1
+import { ref } from 'vue'
2
+import { message } from 'ant-design-vue'
3
+//import { ServiceManager } from './ServiceManager'
4
+//import { TransitEntity, AttachFile } from './ServiceEntitys'
5
+//import { Platform } from './Platform'
6
+
7
+export enum Transit {
8
+    CallServer = 'CallServer',
9
+    CallAgn = 'CallAgn',
10
+    CallTips = 'CallTips',
11
+    CallAgnPay = 'CallAgnPay',
12
+    CallAgnTIPS = 'CallAgnTIPS',
13
+    CallAgnSecdistruct = 'CallAgnSecdistruct',
14
+    CallAgnMobileBanking = 'CallAgnMobileBanking'
15
+}
16
+
17
+export class TradeHandle {
18
+    /**
19
+     * 获取8583域定义
20
+     */
21
+    static async GetFdItemMap(type: string): Promise<any> {
22
+        const table = {
23
+            Code: '',
24
+            Type: '',
25
+            Length: '',
26
+            DotLength: '',
27
+            Description: '',
28
+            FieldType: '',
29
+            MaxLength: ''
30
+        }
31
+
32
+        const entity = new TransitEntity()
33
+        entity.ServiceName = 'TradeService'
34
+        entity.FuncName = 'GetFdItemMap'
35
+        entity.Parameters = { '1': type }
36
+
37
+        const tmpresult = await ServiceManager.GetInstance().Commit(entity)
38
+        let data = null
39
+        if (tmpresult && tmpresult.length === 1) {
40
+            data = tmpresult[0].AttachValue as string
41
+        }
42
+
43
+        if (data) {
44
+            const lines = data.split('\n')
45
+            return lines.map(line => {
46
+                const rows = line.split('|')
47
+                return {
48
+                    ...table,
49
+                    Code: rows[0],
50
+                    Type: rows[1],
51
+                    Length: rows[2],
52
+                    DotLength: rows[3],
53
+                    Description: rows[4],
54
+                    FieldType: rows[5],
55
+                    MaxLength: rows[6]
56
+                }
57
+            })
58
+        }
59
+        return []
60
+    }
61
+
62
+    /**
63
+     * 按照参数指示与外端进行通讯交互
64
+     */
65
+    static async DoTrade(
66
+        transit: string,
67
+        integrateData: Uint8Array,
68
+        kinBrno: string,
69
+        fileName: string,
70
+        fileData: Uint8Array,
71
+        args: any[],
72
+        serialNo: string
73
+    ): Promise<Uint8Array[]> {
74
+        const result: Uint8Array[] = []
75
+        try {
76
+            const entity = new TransitEntity()
77
+            entity.ServiceName = 'TradeService'
78
+            entity.FuncName = 'DoTradeByTransit'
79
+            entity.Parameters = {
80
+                '1': transit,
81
+                '3': kinBrno,
82
+                '4': fileName,
83
+                '6': '',
84
+                '7': serialNo
85
+            }
86
+
87
+            const data = new AttachFile()
88
+            data.AttachIndex = '2'
89
+            data.AttachType = 'ByteType'
90
+            data.AttachValue = integrateData
91
+            entity.AttachFiles.push(data)
92
+
93
+            const data1 = new AttachFile()
94
+            data1.AttachIndex = '5'
95
+            data1.AttachType = 'ByteType'
96
+            data1.AttachValue = fileData
97
+            entity.AttachFiles.push(data1)
98
+
99
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
100
+            if (tmpresult) {
101
+                tmpresult.forEach(attachFile => {
102
+                    result.push(attachFile.AttachValue as Uint8Array)
103
+                })
104
+            }
105
+        } catch (e) {
106
+            throw e
107
+        }
108
+        return result
109
+    }
110
+
111
+    /**
112
+     * 获取交易返回的附件信息数据
113
+     */
114
+    static async GetTradeFile(fileName: string): Promise<Uint8Array> {
115
+        const filePath = ServiceSettings.TempFilePath + fileName + 'dhcc'
116
+        return FilesHandle.GetFileData(filePath)
117
+    }
118
+
119
+    /**
120
+     * 清空交易附件信息
121
+     */
122
+    static async ClearvFile(fileName: string): Promise<boolean> {
123
+        let result = false
124
+        try {
125
+            const entity = new TransitEntity()
126
+            entity.ServiceName = 'UtilService'
127
+            entity.FuncName = 'SaveFile'
128
+            entity.Parameters = {
129
+                '1': fileName,
130
+                '3': 'false'
131
+            }
132
+
133
+            const data = new AttachFile()
134
+            data.AttachIndex = '2'
135
+            data.AttachType = 'ByteType'
136
+            data.AttachValue = new Uint8Array(0)
137
+            entity.AttachFiles.push(data)
138
+
139
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
140
+            if (tmpresult && tmpresult.length === 1) {
141
+                result = tmpresult[0].AttachValue as boolean
142
+            }
143
+        } catch (e) {
144
+            throw e
145
+        }
146
+        return result
147
+    }
148
+
149
+    /**
150
+     * 检查交易
151
+     */
152
+    static async Check(inf: CheckInfo): Promise<CheckResult | null> {
153
+        let result: CheckResult | null = null
154
+        try {
155
+            const entity = new TransitEntity()
156
+            entity.ServiceName = 'TradeService'
157
+            entity.FuncName = 'Check'
158
+
159
+            const data = new AttachFile()
160
+            data.AttachIndex = '1'
161
+            data.AttachType = 'TableType'
162
+            data.AttachValue = Platform.CommonFunction.ChangeEntityToTable([inf])
163
+            entity.AttachFiles.push(data)
164
+
165
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
166
+            if (tmpresult && tmpresult.length === 1) {
167
+                const rmpresult = Platform.CommonFunction.ChangeTableToEntitys<CheckResult>(
168
+                    tmpresult[0].AttachValue as DataTable
169
+                )
170
+                if (rmpresult.length > 0) {
171
+                    result = rmpresult[0]
172
+                }
173
+            }
174
+        } catch (e) {
175
+            throw e
176
+        }
177
+        return result
178
+    }
179
+
180
+    /**
181
+     * 复核操作
182
+     */
183
+    static async Super(
184
+        serialId: string,
185
+        SuperId: string,
186
+        taskid: string,
187
+        stat: number,
188
+        TellerNo: string,
189
+        tradedata: Record<string, string>,
190
+        pagedata: Uint8Array,
191
+        refuseReason: string
192
+    ): Promise<boolean> {
193
+        let result = false
194
+        try {
195
+            const entity = new TransitEntity()
196
+            entity.ServiceName = 'TradeService'
197
+            entity.FuncName = 'Super'
198
+            entity.Parameters = {
199
+                '1': serialId,
200
+                '2': SuperId,
201
+                '3': taskid,
202
+                '4': stat.toString(),
203
+                '5': TellerNo,
204
+                '6': Platform.CommonFunction.ChangeDicToStr(tradedata),
205
+                '8': refuseReason
206
+            }
207
+
208
+            const data = new AttachFile()
209
+            data.AttachIndex = '7'
210
+            data.AttachType = 'ByteType'
211
+            data.AttachValue = pagedata
212
+            entity.AttachFiles.push(data)
213
+
214
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
215
+            if (tmpresult && tmpresult.length === 1) {
216
+                result = tmpresult[0].AttachValue as boolean
217
+            }
218
+        } catch (e) {
219
+            throw e
220
+        }
221
+        return result
222
+    }
223
+
224
+    /**
225
+     * 授权验证操作
226
+     */
227
+    static async DoAuth(auth: string, pwd: string, lvl: string | null): Promise<AuthResult | null> {
228
+        let result: AuthResult | null = null
229
+        try {
230
+            const entity = new TransitEntity()
231
+            entity.ServiceName = 'TradeService'
232
+            entity.FuncName = 'DoAuth'
233
+            entity.Parameters = {
234
+                '1': auth,
235
+                '2': pwd,
236
+                '3': lvl || ''
237
+            }
238
+
239
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
240
+            if (tmpresult && tmpresult.length === 1) {
241
+                const rmpresult = Platform.CommonFunction.ChangeTableToEntitys<AuthResult>(
242
+                    tmpresult[0].AttachValue as DataTable
243
+                )
244
+                if (rmpresult.length > 0) {
245
+                    result = rmpresult[0]
246
+                }
247
+            }
248
+        } catch (e) {
249
+            throw e
250
+        }
251
+        return result
252
+    }
253
+}
254
+
255
+interface CheckInfo {
256
+    // ... 检查信息字段
257
+}
258
+
259
+interface CheckResult {
260
+    // ... 检查结果字段
261
+}
262
+
263
+interface AuthResult {
264
+    // ... 授权结果字段
265
+}
266
+
267
+interface AskSuperInfo {
268
+    // ... 申请复核信息字段
269
+}
270
+
271
+interface AskAuthInfo {
272
+    // ... 申请授权信息字段
273
+}
274
+
275
+interface PageData {
276
+    datas: Uint8Array
277
+    dataslength: number
278
+    // ... 其他字段
279
+}
280
+
281
+interface AuthTransRecords {
282
+    // ... 授权交易记录字段
283
+}

+ 58
- 0
ant-design-pro-vue3/src/views/front/services/TransitEntity.ts View File

@@ -0,0 +1,58 @@
1
+import { ref, reactive } from 'vue';
2
+
3
+interface AttachFile {
4
+    // 附件文件结构定义
5
+    // 根据实际业务需要补充具体属性
6
+}
7
+
8
+export class TransitEntity {
9
+    // 服务方法名
10
+    public FuncName: string = '';
11
+    // 服务类名
12
+    public ServiceName: string = '';
13
+    // 方法参数(以Dictionary方式,key为参数在方法中的位置,value为参数值)
14
+    public Parameters: Map<string, string> = new Map();
15
+    // 附件列表,特殊结构(转换成table结构)与大数据byte[]参数做为附件传递
16
+    public AttachFiles: AttachFile[] = [];
17
+    // 超时设置,单位ms
18
+    public Timeout: number = 0;
19
+
20
+    constructor() {
21
+        this.Parameters = new Map<string, string>();
22
+        this.AttachFiles = [];
23
+    }
24
+}
25
+
26
+// Vue 3 组合式API使用示例
27
+export function useTransitEntity() {
28
+    const transitEntity = reactive(new TransitEntity());
29
+
30
+    const setFuncName = (name: string) => {
31
+        transitEntity.FuncName = name;
32
+    };
33
+
34
+    const setServiceName = (name: string) => {
35
+        transitEntity.ServiceName = name;
36
+    };
37
+
38
+    const addParameter = (key: string, value: string) => {
39
+        transitEntity.Parameters.set(key, value);
40
+    };
41
+
42
+    const addAttachFile = (file: AttachFile) => {
43
+        transitEntity.AttachFiles.push(file);
44
+    };
45
+
46
+    const setTimeoutValue = (timeout: number) => {
47
+        transitEntity.Timeout = timeout;
48
+    };
49
+
50
+    return {
51
+        transitEntity,
52
+        setFuncName,
53
+        setServiceName,
54
+        addParameter,
55
+        addAttachFile,
56
+        setTimeoutValue
57
+    };
58
+}

+ 15
- 0
ant-design-pro-vue3/src/views/front/services/index.ts View File

@@ -0,0 +1,15 @@
1
+import request from "@/utils/request";
2
+import settings from "@/settings";
3
+const systemPrefix = settings.systemPrefix;
4
+// 查询机构层级列表
5
+export function queryDepartLevel(param) {
6
+    return request(`${systemPrefix}/im/dhc/sys/automake/system/department/param/departlevelListController.do`, {
7
+        method: 'post',
8
+        data: param,
9
+        requestType: 'form'
10
+    });
11
+}
12
+
13
+export function TT_SYSCONFIG_GetConfigValueByConfigID(param) {
14
+    return "V10"
15
+}

Loading…
Cancel
Save