feat: 添加部分国际化处理
@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
<meta name="renderer" content="webkit" />
|
<meta name="renderer" content="webkit" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
|
||||||
<title>海关编码查询系统</title>
|
<title>清关编码查询系统</title>
|
||||||
<link rel="icon" href="./favicon.ico" />
|
<link rel="icon" href="./favicon.ico" />
|
||||||
<script>
|
<script>
|
||||||
window.process = {};
|
window.process = {};
|
||||||
|
@ -57,6 +57,7 @@ buttons:DataAdmin: Data Admin
|
|||||||
buttons:Audit: Audit
|
buttons:Audit: Audit
|
||||||
buttons:Feedback: Feedback
|
buttons:Feedback: Feedback
|
||||||
buttons:ErrorRecovery: Report Code Error
|
buttons:ErrorRecovery: Report Code Error
|
||||||
|
buttons:Operation: Operation
|
||||||
search:Total: Total
|
search:Total: Total
|
||||||
search:History: History
|
search:History: History
|
||||||
search:Collect: Collect
|
search:Collect: Collect
|
||||||
@ -204,3 +205,55 @@ role:buttons:deletePermission: Delete Role Permission
|
|||||||
role:buttons:updatePermission: Update Role Permission
|
role:buttons:updatePermission: Update Role Permission
|
||||||
role:buttons:permissiomInfo: Role Permissiom Info
|
role:buttons:permissiomInfo: Role Permissiom Info
|
||||||
role:buttons:permissionDataList: Rolr Permission Data List
|
role:buttons:permissionDataList: Rolr Permission Data List
|
||||||
|
menus.review.tag.account: Account
|
||||||
|
menus.review.tag.userName: User Name
|
||||||
|
menus.review.tag.department: Department
|
||||||
|
menus.review.tag.htsCode: HTS Code
|
||||||
|
menus.review.tag.description: Description
|
||||||
|
menus.review.tag.feedbackHtsCode: Feedback HTS Code
|
||||||
|
menus.review.tag.feedbackDescription: Feedback Description
|
||||||
|
menus.review.tag.status: Status
|
||||||
|
menus.import.tag.htsDataImport: HTS Data Import
|
||||||
|
menus.import.tag.account: Account
|
||||||
|
menus.import.tag.userName: User Name
|
||||||
|
menus.import.tag.department: Department
|
||||||
|
menus.import.tag.htsCode: HTS Code
|
||||||
|
menus.import.tag.description: Description
|
||||||
|
menus.import.tag.status: Status
|
||||||
|
menus.import.tag.loadTime: Load Time
|
||||||
|
menus.maintenance.tag.dataMaintenance: Data Maintenance
|
||||||
|
menus.maintenance.tag.account: Account
|
||||||
|
menus.maintenance.tag.username: Username
|
||||||
|
menus.maintenance.tag.department: Department
|
||||||
|
menus.maintenance.tag.htsCode: HTS Code
|
||||||
|
menus.maintenance.tag.description: Description
|
||||||
|
menus.maintenance.tag.status: Status
|
||||||
|
menus.maintenance.tag.loadTime: Load Time
|
||||||
|
menus.home.tag.queryStatisticsToday: Query Statistics Today
|
||||||
|
menus.home.tag.queryStatisticsCurrentMonth: Query Statistics in the Current Month
|
||||||
|
menus.home.tag.queryStatisticsLastMonth: Query Statistics in Last Month
|
||||||
|
menus.home.tag.statisticsDataSummary: Statistics Data Summary
|
||||||
|
menus.home.tag.queryStatisticsLast14Days: Query statistics within the last 14 days
|
||||||
|
menus.home.tag.success: Success
|
||||||
|
menus.home.tag.failed: Failed
|
||||||
|
menus.home.tag.queryLogDisplay: Query Log Display
|
||||||
|
menus.HTSCodeQuery.tag.enterText: Enter Text
|
||||||
|
menus.HTSCodeQuery.tag.inputDescriptionText: Input Description Text of Product
|
||||||
|
menus.HTSCodeQuery.tag.queryResults: Query Results
|
||||||
|
menus.HTSCodeQuery.tag.transID: TransID
|
||||||
|
menus.HTSCodeQuery.tag.bestMatchedHTSCode: Best-Matched HTS Code
|
||||||
|
menus.HTSCodeQuery.tag.standardDescription: Standard Description
|
||||||
|
menus.QueryStatistics.tag.account: Account
|
||||||
|
menus.QueryStatistics.tag.nickName: Nick Name
|
||||||
|
menus.QueryStatistics.tag.queryDateRange: Query Date Range
|
||||||
|
menus.QueryStatistics.tag.startDate: Start Date
|
||||||
|
menus.QueryStatistics.tag.endDate: End Date
|
||||||
|
menus.QueryStatistics.tag.queryLogs: Query Logs
|
||||||
|
menus.QueryStatistics.tag.transID: TransID
|
||||||
|
menus.QueryStatistics.tag.operatorAccount: Account
|
||||||
|
menus.QueryStatistics.tag.operatorNickName: Nick Name
|
||||||
|
menus.QueryStatistics.tag.queryNumber: Query Number
|
||||||
|
menus.QueryStatistics.tag.resultNumber: Result Number
|
||||||
|
menus.QueryStatistics.tag.queryTime: Query time
|
||||||
|
menus.QueryStatistics.tag.status: Status
|
||||||
|
menus.QueryStatistics.tag.operationTime: Operation Time
|
||||||
|
@ -57,6 +57,7 @@ buttons:DataAdmin: 数据管理
|
|||||||
buttons:Audit: 审核
|
buttons:Audit: 审核
|
||||||
buttons:Feedback: 反馈
|
buttons:Feedback: 反馈
|
||||||
buttons:ErrorRecovery: 纠错
|
buttons:ErrorRecovery: 纠错
|
||||||
|
buttons:Operation: 操作
|
||||||
search:Total: 共
|
search:Total: 共
|
||||||
search:History: 搜索历史
|
search:History: 搜索历史
|
||||||
search:Collect: 收藏
|
search:Collect: 收藏
|
||||||
@ -204,3 +205,55 @@ role:buttons:deletePermission: 删除角色权限
|
|||||||
role:buttons:updatePermission: 更新角色权限
|
role:buttons:updatePermission: 更新角色权限
|
||||||
role:buttons:permissiomInfo: 角色权限详情
|
role:buttons:permissiomInfo: 角色权限详情
|
||||||
role:buttons:permissionDataList: 角色权限列表
|
role:buttons:permissionDataList: 角色权限列表
|
||||||
|
menus.review.tag.account: 用户账号
|
||||||
|
menus.review.tag.userName: 用户名称(昵称)
|
||||||
|
menus.review.tag.department: 所属部门
|
||||||
|
menus.review.tag.htsCode: 编码
|
||||||
|
menus.review.tag.description: 描述
|
||||||
|
menus.review.tag.feedbackHtsCode: 反馈编码
|
||||||
|
menus.review.tag.feedbackDescription: 反馈描述
|
||||||
|
menus.review.tag.status: 审核状态
|
||||||
|
menus.import.tag.htsDataImport: 编码数据导入
|
||||||
|
menus.import.tag.account: 用户账号
|
||||||
|
menus.import.tag.userName: 用户名称(昵称)
|
||||||
|
menus.import.tag.department: 所属部门
|
||||||
|
menus.import.tag.htsCode: 编码
|
||||||
|
menus.import.tag.description: 描述
|
||||||
|
menus.import.tag.status: 审核状态
|
||||||
|
menus.import.tag.loadTime: 创建时间
|
||||||
|
menus.maintenance.tag.dataMaintenance: 数据维护
|
||||||
|
menus.maintenance.tag.account: 用户账号
|
||||||
|
menus.maintenance.tag.username: 用户名称(昵称)
|
||||||
|
menus.maintenance.tag.department: 所属部门
|
||||||
|
menus.maintenance.tag.htsCode: 编码
|
||||||
|
menus.maintenance.tag.description: 编码描述
|
||||||
|
menus.maintenance.tag.status: 审核状态
|
||||||
|
menus.maintenance.tag.loadTime: 创建时间
|
||||||
|
menus.home.tag.queryStatisticsToday: 今日查询
|
||||||
|
menus.home.tag.queryStatisticsCurrentMonth: 当月查询
|
||||||
|
menus.home.tag.queryStatisticsLastMonth: 上月查询
|
||||||
|
menus.home.tag.statisticsDataSummary: 数据概览
|
||||||
|
menus.home.tag.queryStatisticsLast14Days: 近14天内查询统计
|
||||||
|
menus.home.tag.success: 成功查询
|
||||||
|
menus.home.tag.failed: 失败查询
|
||||||
|
menus.home.tag.queryLogDisplay: 查询动态
|
||||||
|
menus.HTSCodeQuery.tag.enterText: 查询文本
|
||||||
|
menus.HTSCodeQuery.tag.inputDescriptionText: 请输入商品文本描述
|
||||||
|
menus.HTSCodeQuery.tag.queryResults: 查询结果
|
||||||
|
menus.HTSCodeQuery.tag.transID: 查询ID
|
||||||
|
menus.HTSCodeQuery.tag.bestMatchedHTSCode: 匹配编码
|
||||||
|
menus.HTSCodeQuery.tag.standardDescription: 编码描述
|
||||||
|
menus.QueryStatistics.tag.account: 用户账号
|
||||||
|
menus.QueryStatistics.tag.nickName: 用户名称
|
||||||
|
menus.QueryStatistics.tag.queryDateRange: 查询日期
|
||||||
|
menus.QueryStatistics.tag.startDate: 开始日期
|
||||||
|
menus.QueryStatistics.tag.endDate: 结束日期
|
||||||
|
menus.QueryStatistics.tag.queryLogs: 查询日志
|
||||||
|
menus.QueryStatistics.tag.transID: 查询ID
|
||||||
|
menus.QueryStatistics.tag.operatorAccount: 操作人员账号
|
||||||
|
menus.QueryStatistics.tag.operatorNickName: 操作人员昵称
|
||||||
|
menus.QueryStatistics.tag.queryNumber: 查询统计
|
||||||
|
menus.QueryStatistics.tag.resultNumber: 结果统计
|
||||||
|
menus.QueryStatistics.tag.queryTime: 查询耗时
|
||||||
|
menus.QueryStatistics.tag.status: 查询状态
|
||||||
|
menus.QueryStatistics.tag.operationTime: 操作时间
|
||||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
public/logo.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 11 KiB |
@ -29,8 +29,10 @@ export const getQueryTemplateAPI = (type: string) => {
|
|||||||
/**
|
/**
|
||||||
* 导入编码
|
* 导入编码
|
||||||
*/
|
*/
|
||||||
export const getAddCodeAPI = (id: string) => {
|
export const postAddCodeByFileAPI = (ids: string[]) => {
|
||||||
return http.request<null>("get", `/api/code/addCode/${id}`);
|
return http.request<null>("post", `/api/code/addCode`, {
|
||||||
|
data: { ids }
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**导入编码 */
|
/**导入编码 */
|
||||||
@ -329,5 +331,5 @@ export const putCodeFeedbackAuditAPI = (data: {
|
|||||||
|
|
||||||
/**全部审核通过 */
|
/**全部审核通过 */
|
||||||
export const putCodeFeedbackAuditAllAPI = () => {
|
export const putCodeFeedbackAuditAllAPI = () => {
|
||||||
return http.request<null>("put", `/api/codeImportAudit/all`);
|
return http.request<null>("put", `/api/code/codeImportAudit/all`);
|
||||||
};
|
};
|
||||||
|
@ -1 +1,21 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path fill="#386BF3" d="M410.558.109c0 210.974-300.876 361.752-300.876 633.548 0 174.943 134.704 316.787 300.876 316.787s300.877-141.817 300.877-316.787C711.408 361.752 410.558 210.974 410.558.109"/><path fill="#C3D2FB" d="M613.469 73.665c0 211.055-300.877 361.914-300.877 633.547C312.592 882.156 447.296 1024 613.47 1024s300.876-141.817 300.876-316.788C914.29 435.58 613.469 284.72 613.469 73.665"/><path fill="#303F5B" d="M312.592 707.212c0-183.713 137.636-312.171 226.723-441.39 81.702 106.112 172.12 218.74 172.12 367.726A309.755 309.755 0 0 1 420.36 950.064a323.1 323.1 0 0 1-107.769-242.852z"/></svg>
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 270 270">
|
||||||
|
<path d="M0 0 C1.36125 1.051875 1.36125 1.051875 2.75 2.125 C3.30042969 2.52074219 3.85085937 2.91648437 4.41796875 3.32421875 C13.8543532 10.59419264 18.11157544 20.56746459 19.75 32.125 C20.72580174 40.57736715 18.99122512 49.85794825 14.5 57.125 C12.51620871 59.84141823 12.51620871 59.84141823 12.97265625 62.1394043 C14.49474868 66.02733699 18.36128434 68.70717472 21.4453125 71.43945312 C24.48924374 74.29589584 25.64450545 75.70302181 26.69140625 79.890625 C26.75 83.125 26.75 83.125 25.6875 85.0625 C22.72907589 86.68486161 21.10770956 86.63792861 17.75 86.125 C15.06228021 84.06110039 12.87543338 81.58637314 10.625 79.0625 C9.4260771 77.72739371 8.21559957 76.40254624 6.9921875 75.08984375 C6.4647998 74.4980835 5.93741211 73.90632324 5.39404297 73.29663086 C3.79886364 71.88047596 3.79886364 71.88047596 1.66577148 72.38330078 C-0.9992254 73.41506586 -3.44814305 74.72935386 -5.95703125 76.08984375 C-15.89335149 80.57557605 -28.71855898 80.84413383 -39.0078125 77.171875 C-45.29514087 74.23632796 -50.60856962 70.28214486 -55.25 65.125 C-56.4875 63.8565625 -56.4875 63.8565625 -57.75 62.5625 C-64.90980544 53.83931932 -67.08365334 42.10143571 -66.25 31.125 C-64.97619012 22.8452358 -62.34898714 16.72770989 -57.25 10.125 C-56.38375 8.825625 -56.38375 8.825625 -55.5 7.5 C-40.71610665 -8.10522076 -18.31902485 -10.56866818 0 0 Z M-48.25 18.125 C-53.41683593 26.15434892 -53.96893435 33.78883866 -53.25 43.125 C-51.15840251 51.66190063 -46.85677454 57.64847901 -39.4375 62.375 C-31.331041 66.96946193 -23.52536958 68.3500924 -14.375 66.0625 C-6.3403315 63.44542381 -0.4903105 58.44997084 3.77734375 51.21484375 C7.68887286 42.8105543 8.35418594 33.60582963 5.1875 24.8125 C0.99087777 15.80511569 -5.05516002 10.71360589 -14.25 7.125 C-27.1460754 3.22618651 -39.64301154 8.22964737 -48.25 18.125 Z " fill="#1196DA" transform="translate(114.25,59.875)"/>
|
||||||
|
<path d="M0 0 C5.30902304 3.24880514 8.74478532 6.88027158 10.41796875 12.94140625 C11.49008786 19.3854064 10.1916547 24.62341189 6.41796875 29.94140625 C2.10821061 34.59358353 -2.17502756 36.74729305 -8.45703125 37.25390625 C-14.0032511 37.08678851 -18.09381365 35.19286196 -22.33203125 31.62890625 C-26.91051282 26.16016438 -28.20743411 21.75600194 -27.99609375 14.6953125 C-27.10151842 8.74554264 -24.10156683 5.126644 -19.45703125 1.50390625 C-13.39626943 -1.78998605 -6.49509214 -2.66288951 0 0 Z M-14.58203125 13.94140625 C-15.69906129 16.84568436 -15.82738835 18.26195582 -14.76953125 21.19140625 C-13.68803757 23.09215549 -13.68803757 23.09215549 -11.58203125 23.94140625 C-7.45138499 24.31755751 -7.45138499 24.31755751 -3.70703125 22.81640625 C-2.05348594 20.06049741 -2.18837557 18.09065173 -2.58203125 14.94140625 C-4.01980806 12.85662987 -5.18001364 12.12901447 -7.45703125 11.06640625 C-10.65366707 10.87836885 -12.13256371 11.95535149 -14.58203125 13.94140625 Z " fill="#1196DA" transform="translate(66.58203125,147.05859375)"/>
|
||||||
|
<path d="M0 0 C4.04286986 2.85119425 6.2789402 6.00960037 8.1640625 10.63671875 C9.29171487 17.1771025 8.4323604 22.60832546 4.7890625 28.26171875 C0.48306032 32.62819849 -3.75157129 35.53784349 -9.9609375 35.63671875 C-15.89230373 35.49695165 -20.29103088 33.83985513 -24.74609375 29.90625 C-28.49277262 25.83187327 -30.16504832 21.54279513 -30.2421875 16.02734375 C-29.8043815 9.50403439 -27.62321328 5.48843485 -22.7734375 1.01171875 C-15.46994862 -3.97602975 -7.73376404 -4.39068277 0 0 Z M-16.2109375 11.32421875 C-17.88461106 14.56696127 -17.18648871 16.8472895 -16.2109375 20.26171875 C-14.08548386 22.48727978 -14.08548386 22.48727978 -11.2109375 23.26171875 C-8.03658316 22.44967462 -6.52913175 21.579913 -4.2109375 19.26171875 C-3.8842268 16.1906382 -3.72955474 14.11121774 -5.2734375 11.38671875 C-8.80195677 9.33790111 -12.62920488 9.4214233 -16.2109375 11.32421875 Z " fill="#1196DA" transform="translate(48.2109375,29.73828125)"/>
|
||||||
|
<path d="M0 0 C4.74786917 2.63977795 7.49205526 5.98562381 10.125 10.75 C11.76948069 17.02892629 11.25798768 21.86410803 8.15625 27.48046875 C5.21835045 31.62256549 1.63445802 34.76768066 -3.1875 36.375 C-9.72042104 37.11377944 -15.05636176 36.96492516 -20.4609375 32.97265625 C-25.43835879 28.36685239 -27.48523776 24.20444619 -27.8125 17.375 C-27.52172337 11.61035337 -26.39217684 7.44798674 -22.1875 3.375 C-15.04345591 -1.6368594 -8.22982751 -3.64573667 0 0 Z M-13.625 13 C-15.45842415 15.32778301 -15.45842415 15.32778301 -15.25 18.4375 C-14.41368888 21.50064782 -14.41368888 21.50064782 -11.9375 23.3125 C-8.76012632 24.54012165 -7.35465106 24.57338148 -4.1875 23.375 C-1.87467413 19.90576119 -1.76271414 18.45294425 -2.1875 14.375 C-3.1875 12.375 -3.1875 12.375 -5.1875 11.375 C-8.84009739 10.83099613 -10.5308886 10.93725907 -13.625 13 Z " fill="#1196DA" transform="translate(177.1875,81.625)"/>
|
||||||
|
<path d="M0 0 C1 1.9375 1 1.9375 1 4 C-1 7 -1 7 -3.390625 7.765625 C-12.90426604 9.37722539 -12.90426604 9.37722539 -18 8 C-18.6875 5.6875 -18.6875 5.6875 -19 3 C-16.26130067 -0.68182757 -12.8224875 -1.02805042 -8.515625 -1.77734375 C-5.16308394 -2.07407487 -2.93391053 -1.65502645 0 0 Z " fill="#1196DA" transform="translate(120,170)"/>
|
||||||
|
<path d="M0 0 C1.125 4.75 1.125 4.75 0 7 C-0.66 7 -1.32 7 -2 7 C-2.20625 7.556875 -2.4125 8.11375 -2.625 8.6875 C-4.58139204 11.9777957 -6.85741004 13.84332061 -10 16 C-12.875 15.8125 -12.875 15.8125 -15 15 C-15.8125 12.8125 -15.8125 12.8125 -16 10 C-13.8125 7.5 -13.8125 7.5 -11 5 C-10.29875 4.0925 -9.5975 3.185 -8.875 2.25 C-6.03663139 -1.15604233 -4.01485002 -1.24598794 0 0 Z " fill="#1196DA" transform="translate(159,144)"/>
|
||||||
|
<path d="M0 0 C3.46994964 2.87751921 5.85604358 5.93155553 7.5625 10.125 C7.6761928 12.75476384 7.26058569 14.54745284 6.5625 17.125 C3.9375 17.6875 3.9375 17.6875 0.5625 17.125 C-3.92727185 12.48040843 -6.16536461 7.52018159 -6.4375 1.125 C-3.88913516 -0.66829378 -2.99661379 -1.07570751 0 0 Z " fill="#1196DA" transform="translate(27.4375,136.875)"/>
|
||||||
|
<path d="M0 0 C3.68113523 1.95004375 7.04922266 4.04922266 10 7 C9.44444444 11.55555556 9.44444444 11.55555556 8 13 C1.63503995 12.86739667 -3.40472079 10.44210323 -8 6 C-8.5625 2.625 -8.5625 2.625 -8 0 C-4.97047792 -1.51476104 -3.26753849 -0.84713961 0 0 Z " fill="#1296DA" transform="translate(132,25)"/>
|
||||||
|
<path d="M0 0 C2.4375 1.5546875 2.4375 1.5546875 3.6875 4.671875 C3.935 5.91195312 4.1825 7.15203125 4.4375 8.4296875 C4.705625 9.66460937 4.97375 10.89953125 5.25 12.171875 C5.4375 15.5546875 5.4375 15.5546875 4 18 C3.484375 18.51304687 2.96875 19.02609375 2.4375 19.5546875 C0.7875 19.2246875 -0.8625 18.8946875 -2.5625 18.5546875 C-3.26255949 16.47554086 -3.94712244 14.39117164 -4.625 12.3046875 C-5.00785156 11.14453125 -5.39070312 9.984375 -5.78515625 8.7890625 C-6.8646692 4.29742069 -6.8646692 4.29742069 -5.5625 1.5546875 C-2.5625 -0.4453125 -2.5625 -0.4453125 0 0 Z " fill="#1196DA" transform="translate(19.5625,114.4453125)"/>
|
||||||
|
<path d="M0 0 C0.8971875 0.309375 0.8971875 0.309375 1.8125 0.625 C3.20012807 5.13897084 2.33199959 7.62545949 0.4375 11.875 C-0.02398437 12.93203125 -0.48546875 13.9890625 -0.9609375 15.078125 C-2.1875 17.625 -2.1875 17.625 -3.1875 18.625 C-5.625 18.875 -5.625 18.875 -8.1875 18.625 C-10.1875 15.625 -10.1875 15.625 -10.0625 12.9375 C-6.35717509 -1.08980144 -6.35717509 -1.08980144 0 0 Z " fill="#1196DA" transform="translate(25.1875,68.375)"/>
|
||||||
|
<path d="M0 0 C2 2 2 2 2.125 4.375 C0.60970877 7.91067953 -1.2275263 8.68164376 -4.66015625 10.21484375 C-8.35545599 11.45483582 -12.09895336 12.04268104 -16 12 C-17 11 -17 11 -17.0625 7.9375 C-17.041875 6.968125 -17.02125 5.99875 -17 5 C-15.29870914 4.15238178 -13.58856916 3.3225132 -11.875 2.5 C-10.92367187 2.0359375 -9.97234375 1.571875 -8.9921875 1.09375 C-5.74220782 -0.09423213 -3.43217655 -0.35002367 0 0 Z " fill="#1196DA" transform="translate(73,20)"/>
|
||||||
|
<path d="M0 0 C1.06863281 0.01804687 2.13726562 0.03609375 3.23828125 0.0546875 C4.04652344 0.07789063 4.85476562 0.10109375 5.6875 0.125 C6.3475 1.775 7.0075 3.425 7.6875 5.125 C5.3091056 8.14878786 4.18616316 9.05705283 0.3046875 9.5859375 C-1.54769531 9.54339844 -1.54769531 9.54339844 -3.4375 9.5 C-4.67757812 9.48710937 -5.91765625 9.47421875 -7.1953125 9.4609375 C-10.3125 9.125 -10.3125 9.125 -12.3125 7.125 C-12.25 4.625 -12.25 4.625 -11.3125 2.125 C-7.49287074 0.09797653 -4.27495571 -0.09395507 0 0 Z " fill="#1296DA" transform="translate(90.3125,15.875)"/>
|
||||||
|
<path d="M0 0 C1.44470266 4.5890555 0.49157578 7.01684845 -1.625 11.25 C-2.13289062 12.30703125 -2.64078125 13.3640625 -3.1640625 14.453125 C-5 17 -5 17 -7.59375 17.9296875 C-10 18 -10 18 -11.875 16.875 C-13 15 -13 15 -12.71484375 12.67578125 C-11.98784211 9.95449098 -11.03978441 7.77843039 -9.6875 5.3125 C-9.07455078 4.16201172 -9.07455078 4.16201172 -8.44921875 2.98828125 C-5.91094031 -0.49415467 -4.10944249 -1.36981416 0 0 Z " fill="#1196DA" transform="translate(171,124)"/>
|
||||||
|
<path d="M0 0 C1 1 1 1 1.375 3.3125 C1 6 1 6 -1.125 8.125 C-6.18215647 11.42314553 -9.82153828 13.57474062 -16 13 C-17 12 -17 12 -17.3359375 9.640625 C-17 7 -17 7 -15.1015625 5.234375 C-14.28429687 4.74453125 -13.46703125 4.2546875 -12.625 3.75 C-11.81289062 3.24984375 -11.00078125 2.7496875 -10.1640625 2.234375 C-6.48672802 0.13683403 -4.27568063 -0.18194386 0 0 Z " fill="#1196DA" transform="translate(141,159)"/>
|
||||||
|
<path d="M0 0 C2.00720923 0.28674418 4.0085944 0.61866701 6 1 C6.10826289 3.4178712 6.18739789 5.83087556 6.25 8.25 C6.30027344 9.27287109 6.30027344 9.27287109 6.3515625 10.31640625 C6.4215705 13.92181813 6.29151719 15.64068812 3.984375 18.484375 C3.00210937 19.23460937 3.00210937 19.23460937 2 20 C-0.5 19.1875 -0.5 19.1875 -3 17 C-3.92570796 11.31094041 -3.44662205 6.2256154 -1 1 C-0.67 0.67 -0.34 0.34 0 0 Z " fill="#1295DA" transform="translate(15,91)"/>
|
||||||
|
<path d="M0 0 C2.75264783 0.50128091 5.02674884 1.00929033 7.4453125 2.4453125 C8.7578125 4.5703125 8.7578125 4.5703125 9.4453125 6.4453125 C8.5078125 8.5078125 8.5078125 8.5078125 6.4453125 10.4453125 C0.77341296 10.87551646 -4.6647085 9.19592569 -9.5546875 6.4453125 C-10.6796875 4.4453125 -10.6796875 4.4453125 -10.5546875 2.4453125 C-7.54932713 -1.64314852 -4.59434811 -0.62954624 0 0 Z " fill="#1196DA" transform="translate(111.5546875,17.5546875)"/>
|
||||||
|
<path d="M0 0 C0.9384375 0.08765625 1.876875 0.1753125 2.84375 0.265625 C5.41684842 0.73483707 7.24624737 1.45302915 9.5 2.75 C9.625 5.125 9.625 5.125 9.5 7.75 C7.5 9.75 7.5 9.75 5.58203125 10.015625 C-6.31629116 9.93370884 -6.31629116 9.93370884 -9.5 6.75 C-9.54063832 5.08382885 -9.542721 3.41611905 -9.5 1.75 C-6.14339362 -0.30829637 -3.88095533 -0.40515468 0 0 Z " fill="#1196DA" transform="translate(87.5,169.25)"/>
|
||||||
|
<path d="M0 0 C3.49174867 3.49174867 4.80968526 7.90653788 5.25 12.75 C5 15 5 15 3 17 C0.5625 16.9375 0.5625 16.9375 -2 16 C-3.6875 13.6875 -3.6875 13.6875 -5 11 C-5.5878125 10.071875 -5.5878125 10.071875 -6.1875 9.125 C-7.3564174 6.06783142 -7.12449831 3.23695593 -7 0 C-4.24438552 -1.37780724 -2.90228766 -0.92023755 0 0 Z " fill="#1195DA" transform="translate(165,57)"/>
|
||||||
|
<path d="M0 0 C3.4789233 0.37705094 4.54337977 1.49254476 6.953125 3.98046875 C7.63890625 4.66496094 8.3246875 5.34945312 9.03125 6.0546875 C10.89312163 8.54733339 11.44668441 10.21055283 11.703125 13.29296875 C10.578125 15.16796875 10.578125 15.16796875 8.703125 16.29296875 C5.28410798 16.10492281 3.94597538 15.52204926 1.4296875 13.1484375 C0.73617187 12.26800781 0.04265625 11.38757812 -0.671875 10.48046875 C-1.38085938 9.60777344 -2.08984375 8.73507813 -2.8203125 7.8359375 C-4.296875 5.29296875 -4.296875 5.29296875 -4.0859375 3.03125 C-2.95134344 0.53177299 -2.80311349 0.35753999 0 0 Z " fill="#1296DA" transform="translate(147.296875,37.70703125)"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 11 KiB |
1
src/assets/login/avatar1.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path fill="#386BF3" d="M410.558.109c0 210.974-300.876 361.752-300.876 633.548 0 174.943 134.704 316.787 300.876 316.787s300.877-141.817 300.877-316.787C711.408 361.752 410.558 210.974 410.558.109"/><path fill="#C3D2FB" d="M613.469 73.665c0 211.055-300.877 361.914-300.877 633.547C312.592 882.156 447.296 1024 613.47 1024s300.876-141.817 300.876-316.788C914.29 435.58 613.469 284.72 613.469 73.665"/><path fill="#303F5B" d="M312.592 707.212c0-183.713 137.636-312.171 226.723-441.39 81.702 106.112 172.12 218.74 172.12 367.726A309.755 309.755 0 0 1 420.36 950.064a323.1 323.1 0 0 1-107.769-242.852z"/></svg>
|
After Width: | Height: | Size: 706 B |
@ -14,7 +14,7 @@ import { message } from "../message";
|
|||||||
// 相关配置请参考:www.axios-js.com/zh-cn/docs/#axios-request-config-1
|
// 相关配置请参考:www.axios-js.com/zh-cn/docs/#axios-request-config-1
|
||||||
const defaultConfig: AxiosRequestConfig = {
|
const defaultConfig: AxiosRequestConfig = {
|
||||||
// 请求超时时间
|
// 请求超时时间
|
||||||
timeout: 60000,
|
timeout: 3600000,
|
||||||
headers: {
|
headers: {
|
||||||
Accept: "application/json, text/plain, */*",
|
Accept: "application/json, text/plain, */*",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
@ -29,7 +29,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '纠错'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '纠错'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="编码描述" prop="description" label-width="120px">
|
<el-form-item
|
||||||
|
:label="t('menus.HTSCodeQuery.tag.standardDescription')"
|
||||||
|
prop="description"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.description"
|
v-model="newFormInline.description"
|
||||||
placeholder="请输入编码描述~"
|
placeholder="请输入编码描述~"
|
||||||
@ -76,6 +80,8 @@ import { ref, reactive } from "vue";
|
|||||||
import ReCol from "@/components/ReCol";
|
import ReCol from "@/components/ReCol";
|
||||||
import type { FormRules } from "element-plus";
|
import type { FormRules } from "element-plus";
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
const { t } = useI18n();
|
||||||
interface PropsInfo {
|
interface PropsInfo {
|
||||||
/**方式 */
|
/**方式 */
|
||||||
way: string;
|
way: string;
|
||||||
|
@ -6,10 +6,14 @@
|
|||||||
:model="form"
|
:model="form"
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] flex justify-between items-center"
|
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] flex justify-between items-center"
|
||||||
>
|
>
|
||||||
<el-form-item label="查询文本" prop="query_text" class="w-[50%]">
|
<el-form-item
|
||||||
|
:label="t('menus.HTSCodeQuery.tag.enterText')"
|
||||||
|
prop="query_text"
|
||||||
|
class="w-[50%]"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.query_text"
|
v-model="form.query_text"
|
||||||
placeholder="请输入商品文本描述~"
|
:placeholder="`${t('menus.HTSCodeQuery.tag.inputDescriptionText')}~`"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
clearable
|
clearable
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@ -115,7 +119,11 @@
|
|||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
<PureTableBar title="查询结果" :columns="columns" @refresh="onSearch">
|
<PureTableBar
|
||||||
|
:title="t('menus.HTSCodeQuery.tag.queryResults')"
|
||||||
|
:columns="columns"
|
||||||
|
@refresh="onSearch"
|
||||||
|
>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('code:btn:export')"
|
v-if="hasAuth('code:btn:export')"
|
||||||
@ -201,7 +209,7 @@
|
|||||||
'纠错',
|
'纠错',
|
||||||
row.result_text[0],
|
row.result_text[0],
|
||||||
row.query_text,
|
row.query_text,
|
||||||
row.result_text[0].code ?? ''
|
row.result_text[0]?.code ?? ''
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -4,11 +4,7 @@ import { type Ref, ref, reactive, h } from "vue";
|
|||||||
import * as XLSX from "xlsx";
|
import * as XLSX from "xlsx";
|
||||||
import type { PaginationProps } from "@pureadmin/table";
|
import type { PaginationProps } from "@pureadmin/table";
|
||||||
import type { QueryCodeResult, QueryResult, QueryResultItem } from "types/code";
|
import type { QueryCodeResult, QueryResult, QueryResultItem } from "types/code";
|
||||||
import {
|
import { ElMessageBox, type UploadUserFile } from "element-plus";
|
||||||
ElMessageBox,
|
|
||||||
type UploadProps,
|
|
||||||
type UploadUserFile
|
|
||||||
} from "element-plus";
|
|
||||||
import {
|
import {
|
||||||
getQueryCodeAPI,
|
getQueryCodeAPI,
|
||||||
getQueryTemplateAPI,
|
getQueryTemplateAPI,
|
||||||
@ -18,6 +14,7 @@ import {
|
|||||||
import { deleteFileAPI, postUploadFileAPI } from "@/api/file";
|
import { deleteFileAPI, postUploadFileAPI } from "@/api/file";
|
||||||
import { getKeyList, cloneDeep } from "@pureadmin/utils";
|
import { getKeyList, cloneDeep } from "@pureadmin/utils";
|
||||||
import { addDialog } from "@/components/ReDialog";
|
import { addDialog } from "@/components/ReDialog";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
export const useIndex = (tableRef: Ref) => {
|
export const useIndex = (tableRef: Ref) => {
|
||||||
/**
|
/**
|
||||||
@ -85,25 +82,27 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
reserveSelection: true // 数据刷新后保留选项
|
reserveSelection: true // 数据刷新后保留选项
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询ID",
|
label: transformI18n("menus.HTSCodeQuery.tag.transID"),
|
||||||
prop: "id"
|
prop: "id"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询文本",
|
label: transformI18n("menus.HTSCodeQuery.tag.enterText"),
|
||||||
prop: "query_text"
|
prop: "query_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "匹配编码",
|
label: transformI18n("menus.HTSCodeQuery.tag.bestMatchedHTSCode"),
|
||||||
prop: "result_text",
|
prop: "result_text",
|
||||||
formatter: ({ result_text }) => {
|
formatter: ({ result_text }) => {
|
||||||
if (result_text.length > 0) {
|
if (result_text.length > 0) {
|
||||||
return result_text[0]["code"].replace(/(\d{2})/g, "$1.").slice(0, -1);
|
return result_text[0]["code"]
|
||||||
|
? result_text[0]["code"].replace(/(\d{2})/g, "$1.").slice(0, -1)
|
||||||
|
: "";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码描述",
|
label: transformI18n("menus.HTSCodeQuery.tag.standardDescription"),
|
||||||
prop: "result_text",
|
prop: "result_text",
|
||||||
formatter: ({ result_text }) => {
|
formatter: ({ result_text }) => {
|
||||||
if (result_text.length > 0) {
|
if (result_text.length > 0) {
|
||||||
@ -113,7 +112,7 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: transformI18n("buttons:Operation"),
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 250,
|
width: 250,
|
||||||
slot: "operation"
|
slot: "operation"
|
||||||
@ -129,7 +128,22 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
});
|
});
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
queryResult.value = res.data;
|
queryResult.value = res.data;
|
||||||
dataList.value = res.data.response_result;
|
// dataList.value = res.data.response_result;
|
||||||
|
let response_result = res.data.response_result;
|
||||||
|
|
||||||
|
// 确保 response_result 是 JSON 字符串
|
||||||
|
if (typeof response_result === "string") {
|
||||||
|
try {
|
||||||
|
dataList.value = JSON.parse(response_result);
|
||||||
|
dataList.value.forEach((item: any) => {
|
||||||
|
item.result_text = JSON.parse(item.result_text);
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.error("JSON 解析失败:", error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataList.value = response_result; // 如果已经是对象,则直接赋值
|
||||||
|
}
|
||||||
pagination.total = res.data.result_count;
|
pagination.total = res.data.result_count;
|
||||||
}
|
}
|
||||||
message(res.msg, {
|
message(res.msg, {
|
||||||
@ -145,7 +159,6 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
const resetForm = (formEl: any) => {
|
const resetForm = (formEl: any) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
onSearch();
|
|
||||||
};
|
};
|
||||||
/** 当CheckBox选择项发生变化时会触发该事件 */
|
/** 当CheckBox选择项发生变化时会触发该事件 */
|
||||||
const handleSelectionChange = async (val: any) => {
|
const handleSelectionChange = async (val: any) => {
|
||||||
@ -218,6 +231,7 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uploadStatus.value = true;
|
uploadStatus.value = true;
|
||||||
|
loading.value = true;
|
||||||
for (const file of fileList.value) {
|
for (const file of fileList.value) {
|
||||||
if (file.status === "success") {
|
if (file.status === "success") {
|
||||||
const data = await getQueryCodeAPI(fileId.value);
|
const data = await getQueryCodeAPI(fileId.value);
|
||||||
@ -242,7 +256,22 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
message(`查询成功!`, { type: "success" });
|
message(`查询成功!`, { type: "success" });
|
||||||
queryResult.value = data.data;
|
queryResult.value = data.data;
|
||||||
dataList.value = data.data.response_result;
|
// dataList.value = data.data.response_result;
|
||||||
|
let response_result = data.data.response_result;
|
||||||
|
|
||||||
|
// 确保 response_result 是 JSON 字符串
|
||||||
|
if (typeof response_result === "string") {
|
||||||
|
try {
|
||||||
|
dataList.value = JSON.parse(response_result);
|
||||||
|
dataList.value.forEach((item: any) => {
|
||||||
|
item.result_text = JSON.parse(item.result_text);
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.error("JSON 解析失败:", error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataList.value = response_result; // 如果已经是对象,则直接赋值
|
||||||
|
}
|
||||||
pagination.total = data.data.result_count;
|
pagination.total = data.data.result_count;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -253,28 +282,32 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
uploadStatus.value = false;
|
uploadStatus.value = false;
|
||||||
|
loading.value = false;
|
||||||
};
|
};
|
||||||
/**移除文件 */
|
/** 移除文件 */
|
||||||
const beforeRemove: UploadProps["beforeRemove"] = async uploadFile => {
|
const beforeRemove = async uploadFile => {
|
||||||
return ElMessageBox.confirm(`是否移除 ${uploadFile.name} ?`).then(
|
return ElMessageBox.confirm(`是否移除 ${uploadFile.name} ?`).then(
|
||||||
async () => {
|
async () => {
|
||||||
if (uploadFile.status === "success") {
|
if (uploadFile.status === "success") {
|
||||||
const fileId = fileIds.value.filter(
|
const fileObj = fileIds.value.find(
|
||||||
item => item.filename === uploadFile.name
|
item => item.name === uploadFile.name
|
||||||
)[0]["fileId"];
|
);
|
||||||
const res = await deleteFileAPI(fileId);
|
if (fileObj) {
|
||||||
if (res.code === 200) {
|
const res = await deleteFileAPI(fileObj.id);
|
||||||
message(res.msg, { type: "success" });
|
if (res.success) {
|
||||||
return true;
|
message(res.msg, { type: "success" });
|
||||||
} else {
|
fileIds.value = fileIds.value.filter(
|
||||||
message(res.msg, { type: "error" });
|
item => item.id !== fileObj.id
|
||||||
return false;
|
);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message(res.msg, { type: "error" });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
},
|
return true;
|
||||||
() => false
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const handleDetail = (row: QueryResultItem) => {
|
const handleDetail = (row: QueryResultItem) => {
|
||||||
@ -283,11 +316,15 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
};
|
};
|
||||||
/**导出为excel */
|
/**导出为excel */
|
||||||
const exportToExcel = (dataList: QueryCodeResult[], filename: string) => {
|
const exportToExcel = (dataList: QueryCodeResult[], filename: string) => {
|
||||||
|
if (!dataList.length) {
|
||||||
|
message("暂无数据导出!", { type: "error", duration: 5000 });
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (dataList.length) {
|
if (dataList.length) {
|
||||||
const headers = [
|
const headers = [
|
||||||
"序号",
|
"序号",
|
||||||
"查询批次ID",
|
"查询批次ID",
|
||||||
"查询文本(总)",
|
// "查询文本(总)",
|
||||||
"查询统计",
|
"查询统计",
|
||||||
"结果统计",
|
"结果统计",
|
||||||
"查询状态",
|
"查询状态",
|
||||||
@ -308,13 +345,19 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
const data = [];
|
const data = [];
|
||||||
let index = 1;
|
let index = 1;
|
||||||
for (const jsonData of dataList) {
|
for (const jsonData of dataList) {
|
||||||
|
if (typeof jsonData !== "object") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const batchId = jsonData.id;
|
const batchId = jsonData.id;
|
||||||
const queryText = jsonData.query;
|
// const queryText = jsonData.query;
|
||||||
const queryCount = jsonData.query_count;
|
const queryCount = jsonData.query_count;
|
||||||
const resultCount = jsonData.result_count;
|
const resultCount = jsonData.result_count;
|
||||||
const status = jsonData.status === 1 ? "成功" : "失败";
|
const status = jsonData.status === 1 ? "成功" : "失败";
|
||||||
const costTime = jsonData.cost_time;
|
const costTime = jsonData.cost_time;
|
||||||
const operationTime = jsonData.operation_time;
|
const operationTime = jsonData.operation_time;
|
||||||
|
if (typeof jsonData.response_result === "string") {
|
||||||
|
jsonData.response_result = JSON.parse(jsonData.response_result);
|
||||||
|
}
|
||||||
|
|
||||||
jsonData.response_result.forEach(response => {
|
jsonData.response_result.forEach(response => {
|
||||||
const queryId = response.id;
|
const queryId = response.id;
|
||||||
@ -324,7 +367,7 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
const row = [
|
const row = [
|
||||||
index++,
|
index++,
|
||||||
batchId,
|
batchId,
|
||||||
queryText,
|
// queryText,
|
||||||
queryCount,
|
queryCount,
|
||||||
resultCount,
|
resultCount,
|
||||||
status,
|
status,
|
||||||
@ -334,7 +377,9 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
queryTextDetail,
|
queryTextDetail,
|
||||||
queryStatus
|
queryStatus
|
||||||
];
|
];
|
||||||
|
if (typeof response.result_text === "string") {
|
||||||
|
response.result_text = JSON.parse(response.result_text);
|
||||||
|
}
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < 5; i++) {
|
||||||
if (i < response.result_text.length) {
|
if (i < response.result_text.length) {
|
||||||
const match = response.result_text[i];
|
const match = response.result_text[i];
|
||||||
@ -366,14 +411,17 @@ export const useIndex = (tableRef: Ref) => {
|
|||||||
|
|
||||||
const ids = getKeyList(curSelected, "id");
|
const ids = getKeyList(curSelected, "id");
|
||||||
|
|
||||||
let dataList = dataJson.response_result; // 拷贝的数据
|
let dataList = JSON.parse(dataJson.response_result); // 拷贝的数据
|
||||||
|
|
||||||
let selecteList = dataList.filter((item: QueryResult) =>
|
let selecteList = dataList.filter((item: QueryResult) =>
|
||||||
ids.includes(item.id)
|
ids.includes(item.id)
|
||||||
); // 筛选出选中的数据
|
); // 筛选出选中的数据
|
||||||
|
|
||||||
// 仅赋值导出的数据,不修改原始数据
|
// 仅赋值导出的数据,不修改原始数据
|
||||||
let exportData = { ...dataJson, response_result: selecteList };
|
let exportData = {
|
||||||
|
...dataJson,
|
||||||
|
response_result: selecteList
|
||||||
|
};
|
||||||
|
|
||||||
exportToExcel([exportData], "查询结果");
|
exportToExcel([exportData], "查询结果");
|
||||||
};
|
};
|
||||||
|
@ -2,21 +2,34 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<el-card v-if="queryInfo" shadow="never" class="mt-2">
|
<el-card v-if="queryInfo" shadow="never" class="mt-2">
|
||||||
<el-descriptions title="查询基本信息" border :column="4">
|
<el-descriptions title="查询基本信息" border :column="4">
|
||||||
<el-descriptions-item align="center" label="操作时间">{{
|
<el-descriptions-item
|
||||||
dayjs(queryInfo.operation_time).format("YYYY-MM-DD HH:mm:ss")
|
align="center"
|
||||||
}}</el-descriptions-item>
|
:label="t('menus.QueryStatistics.tag.operationTime')"
|
||||||
<el-descriptions-item align="center" label="耗时"
|
>{{
|
||||||
|
dayjs(queryInfo.operation_time).format("YYYY-MM-DD HH:mm:ss")
|
||||||
|
}}</el-descriptions-item
|
||||||
|
>
|
||||||
|
<el-descriptions-item
|
||||||
|
align="center"
|
||||||
|
:label="t('menus.QueryStatistics.tag.queryTime')"
|
||||||
>{{ queryInfo.cost_time.toFixed(2) }} ms</el-descriptions-item
|
>{{ queryInfo.cost_time.toFixed(2) }} ms</el-descriptions-item
|
||||||
>
|
>
|
||||||
<el-descriptions-item align="center" label="查询统计">{{
|
<el-descriptions-item
|
||||||
queryInfo.query_count
|
align="center"
|
||||||
}}</el-descriptions-item>
|
:label="t('menus.QueryStatistics.tag.queryNumber')"
|
||||||
<el-descriptions-item align="center" label="结果统计">{{
|
>{{ queryInfo.query_count }}</el-descriptions-item
|
||||||
queryInfo.result_count
|
>
|
||||||
}}</el-descriptions-item>
|
<el-descriptions-item
|
||||||
|
align="center"
|
||||||
|
:label="t('menus.QueryStatistics.tag.resultNumber')"
|
||||||
|
>{{ queryInfo.result_count }}</el-descriptions-item
|
||||||
|
>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
<PureTableBar title="查询结果" :columns="columns">
|
<PureTableBar
|
||||||
|
:title="t('menus.HTSCodeQuery.tag.queryResults')"
|
||||||
|
:columns="columns"
|
||||||
|
>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
v-if="hasAuth('code:btn:export')"
|
v-if="hasAuth('code:btn:export')"
|
||||||
@ -144,7 +157,7 @@
|
|||||||
item.id
|
item.id
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item align="center" label="海关编码">{{
|
<el-descriptions-item align="center" label="海关编码">{{
|
||||||
item.code.replace(/(\d{2})/g, "$1.").slice(0, -1)
|
item.code ? item.code.replace(/(\d{2})/g, "$1.").slice(0, -1) : ""
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item align="center" label="编码描述">{{
|
<el-descriptions-item align="center" label="编码描述">{{
|
||||||
item.description
|
item.description
|
||||||
@ -196,6 +209,7 @@ import { addDialog } from "@/components/ReDialog";
|
|||||||
//import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
//import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
//import { $t } from "@/plugins/i18n";
|
//import { $t } from "@/plugins/i18n";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
//const router = useRouter();
|
//const router = useRouter();
|
||||||
const getParameter = isEmpty(route.params) ? route.query : route.params;
|
const getParameter = isEmpty(route.params) ? route.query : route.params;
|
||||||
@ -263,25 +277,27 @@ const columns: TableColumnList = [
|
|||||||
reserveSelection: true // 数据刷新后保留选项
|
reserveSelection: true // 数据刷新后保留选项
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询ID",
|
label: transformI18n("menus.QueryStatistics.tag.transID"),
|
||||||
prop: "id"
|
prop: "id"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询文本",
|
label: transformI18n("menus.HTSCodeQuery.tag.enterText"),
|
||||||
prop: "query_text"
|
prop: "query_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "匹配编码",
|
label: transformI18n("menus.HTSCodeQuery.tag.bestMatchedHTSCode"),
|
||||||
prop: "result_text",
|
prop: "result_text",
|
||||||
formatter: ({ result_text }) => {
|
formatter: ({ result_text }) => {
|
||||||
if (result_text.length > 0) {
|
if (result_text.length > 0) {
|
||||||
return result_text[0]["code"].replace(/(\d{2})/g, "$1.").slice(0, -1);
|
return result_text[0]["code"]
|
||||||
|
? result_text[0]["code"].replace(/(\d{2})/g, "$1.").slice(0, -1)
|
||||||
|
: "";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码描述",
|
label: transformI18n("menus.HTSCodeQuery.tag.standardDescription"),
|
||||||
prop: "result_text",
|
prop: "result_text",
|
||||||
formatter: ({ result_text }) => {
|
formatter: ({ result_text }) => {
|
||||||
if (result_text.length > 0) {
|
if (result_text.length > 0) {
|
||||||
@ -291,7 +307,7 @@ const columns: TableColumnList = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: transformI18n("buttons:Operation"),
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 250,
|
width: 250,
|
||||||
slot: "operation"
|
slot: "operation"
|
||||||
@ -299,12 +315,27 @@ const columns: TableColumnList = [
|
|||||||
];
|
];
|
||||||
/**获取查询结果 */
|
/**获取查询结果 */
|
||||||
const getQueryInfo = async () => {
|
const getQueryInfo = async () => {
|
||||||
|
loading.value = true;
|
||||||
const res = await getCodeLogInfoAPI(getParameter.detailsId as string);
|
const res = await getCodeLogInfoAPI(getParameter.detailsId as string);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
queryInfo.value = res.data;
|
queryInfo.value = res.data;
|
||||||
dataList.value = JSON.parse(
|
|
||||||
res.data.response_result.replace(/'/g, '"').replace(/None/g, "null")
|
let response_result = res.data.response_result;
|
||||||
);
|
// 确保 response_result 是 JSON 字符串
|
||||||
|
if (typeof response_result === "string") {
|
||||||
|
try {
|
||||||
|
dataList.value = JSON.parse(response_result);
|
||||||
|
dataList.value.forEach((item: any) => {
|
||||||
|
item.result_text = JSON.parse(item.result_text);
|
||||||
|
});
|
||||||
|
pagination.total = dataList.value.length;
|
||||||
|
} catch (error) {
|
||||||
|
console.error("JSON 解析失败:", error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataList.value = response_result; // 如果已经是对象,则直接赋值
|
||||||
|
pagination.total = dataList.value.length;
|
||||||
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -336,7 +367,7 @@ const exportToExcel = (dataList: QueryCodeLogInfo[], filename: string) => {
|
|||||||
"查询人昵称",
|
"查询人昵称",
|
||||||
"查询人部门ID",
|
"查询人部门ID",
|
||||||
"查询人部门",
|
"查询人部门",
|
||||||
"查询文本(总)",
|
// "查询文本(总)",
|
||||||
"查询统计",
|
"查询统计",
|
||||||
"结果统计",
|
"结果统计",
|
||||||
"查询状态",
|
"查询状态",
|
||||||
@ -363,21 +394,25 @@ const exportToExcel = (dataList: QueryCodeLogInfo[], filename: string) => {
|
|||||||
const opeartion_nickname = jsonData.operator_nickname;
|
const opeartion_nickname = jsonData.operator_nickname;
|
||||||
const department_id = jsonData.department_id;
|
const department_id = jsonData.department_id;
|
||||||
const department_name = jsonData.department_name;
|
const department_name = jsonData.department_name;
|
||||||
const queryText = jsonData.request_params;
|
// const queryText = jsonData.request_params;
|
||||||
const queryCount = jsonData.query_count;
|
const queryCount = jsonData.query_count;
|
||||||
const resultCount = jsonData.result_count;
|
const resultCount = jsonData.result_count;
|
||||||
const status = jsonData.status === 1 ? "成功" : "失败";
|
const status = jsonData.status === 1 ? "成功" : "失败";
|
||||||
const costTime = jsonData.cost_time;
|
const costTime = jsonData.cost_time;
|
||||||
const operationTime = jsonData.operation_time;
|
const operationTime = jsonData.operation_time;
|
||||||
jsonData.response_result = JSON.parse(
|
if (typeof jsonData.response_result === "string") {
|
||||||
jsonData.response_result.replace(/'/g, '"').replace(/None/g, "null")
|
jsonData.response_result = JSON.parse(jsonData.response_result);
|
||||||
);
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
jsonData.response_result.forEach(response => {
|
jsonData.response_result.forEach(response => {
|
||||||
const queryId = response.id;
|
const queryId = response.id;
|
||||||
const queryTextDetail = response.query_text;
|
const queryTextDetail = response.query_text;
|
||||||
const queryStatus = response.status === 1 ? "成功" : "失败";
|
const queryStatus = response.status === 1 ? "成功" : "失败";
|
||||||
|
|
||||||
|
if (typeof response.result_text === "string") {
|
||||||
|
response.result_text = JSON.parse(response.result_text);
|
||||||
|
}
|
||||||
const row = [
|
const row = [
|
||||||
index++,
|
index++,
|
||||||
batchId,
|
batchId,
|
||||||
@ -386,7 +421,7 @@ const exportToExcel = (dataList: QueryCodeLogInfo[], filename: string) => {
|
|||||||
opeartion_nickname,
|
opeartion_nickname,
|
||||||
department_id,
|
department_id,
|
||||||
department_name,
|
department_name,
|
||||||
queryText,
|
// queryText,
|
||||||
queryCount,
|
queryCount,
|
||||||
resultCount,
|
resultCount,
|
||||||
status,
|
status,
|
||||||
@ -423,14 +458,17 @@ const onbatchExport = async () => {
|
|||||||
|
|
||||||
const ids = getKeyList(curSelected, "id");
|
const ids = getKeyList(curSelected, "id");
|
||||||
|
|
||||||
let dataList = dataJson.response_result; // 拷贝的数据
|
let dataList = JSON.parse(dataJson.response_result); // 拷贝的数据
|
||||||
|
|
||||||
let selecteList = dataList.filter((item: QueryResult) =>
|
let selecteList = dataList.filter((item: QueryResult) =>
|
||||||
ids.includes(item.id)
|
ids.includes(item.id)
|
||||||
); // 筛选出选中的数据
|
); // 筛选出选中的数据
|
||||||
|
|
||||||
// 仅赋值导出的数据,不修改原始数据
|
// 仅赋值导出的数据,不修改原始数据
|
||||||
let exportData = { ...dataJson, response_result: selecteList };
|
let exportData = {
|
||||||
|
...dataJson,
|
||||||
|
response_result: JSON.stringify(selecteList)
|
||||||
|
};
|
||||||
|
|
||||||
exportToExcel([exportData], "查询结果");
|
exportToExcel([exportData], "查询结果");
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,10 @@
|
|||||||
:model="form"
|
:model="form"
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto"
|
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户账号" prop="username">
|
<el-form-item
|
||||||
|
:label="t('menus.QueryStatistics.tag.account')"
|
||||||
|
prop="username"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.username"
|
v-model="form.username"
|
||||||
placeholder="请输入用户账号~"
|
placeholder="请输入用户账号~"
|
||||||
@ -14,7 +17,10 @@
|
|||||||
class="!w-[150px]"
|
class="!w-[150px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户名称" prop="nickname">
|
<el-form-item
|
||||||
|
:label="t('menus.QueryStatistics.tag.nickName')"
|
||||||
|
prop="nickname"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nickname"
|
v-model="form.nickname"
|
||||||
placeholder="请输入用户名称~"
|
placeholder="请输入用户名称~"
|
||||||
@ -23,8 +29,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="hasAuth('code:btn:admin')"
|
v-if="hasAuth('code:btn:logAdmin')"
|
||||||
label="所属部门:"
|
:label="t('menus.maintenance.tag.department')"
|
||||||
prop="department_id"
|
prop="department_id"
|
||||||
>
|
>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -47,7 +53,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="查询时间" prop="timeRange">
|
<el-form-item
|
||||||
|
:label="t('menus.QueryStatistics.tag.queryDateRange')"
|
||||||
|
prop="timeRange"
|
||||||
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.timeRange"
|
v-model="form.timeRange"
|
||||||
:shortcuts="getPickerShortcuts()"
|
:shortcuts="getPickerShortcuts()"
|
||||||
@ -74,7 +83,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<PureTableBar title="查询日志" :columns="columns" @refresh="onSearch">
|
<PureTableBar
|
||||||
|
:title="t('menus.QueryStatistics.tag.queryLogs')"
|
||||||
|
:columns="columns"
|
||||||
|
@refresh="onSearch"
|
||||||
|
>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
v-if="hasAuth('code:btn:export')"
|
v-if="hasAuth('code:btn:export')"
|
||||||
|
@ -14,6 +14,7 @@ import { message } from "@/utils/message";
|
|||||||
import { cloneDeep, getKeyList, handleTree } from "@pureadmin/utils";
|
import { cloneDeep, getKeyList, handleTree } from "@pureadmin/utils";
|
||||||
import type { DepartmentInfo } from "types/system";
|
import type { DepartmentInfo } from "types/system";
|
||||||
import { getDepartmentListAPI } from "@/api/system";
|
import { getDepartmentListAPI } from "@/api/system";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
export const useQueryLog = (tableRef: Ref) => {
|
export const useQueryLog = (tableRef: Ref) => {
|
||||||
/**查询表单 */
|
/**查询表单 */
|
||||||
@ -45,29 +46,29 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
reserveSelection: true // 数据刷新后保留选项
|
reserveSelection: true // 数据刷新后保留选项
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询ID",
|
label: transformI18n("menus.QueryStatistics.tag.transID"),
|
||||||
prop: "id"
|
prop: "id"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作人员账号",
|
label: transformI18n("menus.QueryStatistics.tag.operatorAccount"),
|
||||||
prop: "operator_name",
|
prop: "operator_name",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作人员昵称",
|
label: transformI18n("menus.QueryStatistics.tag.operatorNickName"),
|
||||||
prop: "operator_nickname",
|
prop: "operator_nickname",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询统计",
|
label: transformI18n("menus.QueryStatistics.tag.queryNumber"),
|
||||||
prop: "query_count"
|
prop: "query_count"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "结果统计",
|
label: transformI18n("menus.QueryStatistics.tag.resultNumber"),
|
||||||
prop: "result_count"
|
prop: "result_count"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询耗时",
|
label: transformI18n("menus.QueryStatistics.tag.queryTime"),
|
||||||
prop: "cost_time",
|
prop: "cost_time",
|
||||||
cellRenderer: ({ row, props }) => (
|
cellRenderer: ({ row, props }) => (
|
||||||
<el-tag
|
<el-tag
|
||||||
@ -80,7 +81,7 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "查询状态",
|
label: transformI18n("menus.QueryStatistics.tag.status"),
|
||||||
prop: "status",
|
prop: "status",
|
||||||
cellRenderer: ({ row, props }) => (
|
cellRenderer: ({ row, props }) => (
|
||||||
<el-tag size={props.size} style={tagStyle.value(row.status)}>
|
<el-tag size={props.size} style={tagStyle.value(row.status)}>
|
||||||
@ -89,14 +90,14 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作时间",
|
label: transformI18n("menus.QueryStatistics.tag.operationTime"),
|
||||||
prop: "operation_time",
|
prop: "operation_time",
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
formatter: ({ operation_time }) =>
|
formatter: ({ operation_time }) =>
|
||||||
dayjs(operation_time).format("YYYY-MM-DD HH:mm:ss")
|
dayjs(operation_time).format("YYYY-MM-DD HH:mm:ss")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: transformI18n("buttons:Operation"),
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 100,
|
width: 100,
|
||||||
slot: "operation"
|
slot: "operation"
|
||||||
@ -167,6 +168,7 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
pagination.currentPage = res.data.page;
|
pagination.currentPage = res.data.page;
|
||||||
pagination.pageSize = res.data.pageSize;
|
pagination.pageSize = res.data.pageSize;
|
||||||
}
|
}
|
||||||
|
message(res.msg, { type: res.success ? "success" : "error" });
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -325,7 +327,7 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
"查询人昵称",
|
"查询人昵称",
|
||||||
"查询人部门ID",
|
"查询人部门ID",
|
||||||
"查询人部门",
|
"查询人部门",
|
||||||
"查询文本(总)",
|
// "查询文本(总)",
|
||||||
"查询统计",
|
"查询统计",
|
||||||
"结果统计",
|
"结果统计",
|
||||||
"查询状态",
|
"查询状态",
|
||||||
@ -352,21 +354,23 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
const opeartion_nickname = jsonData.operator_nickname;
|
const opeartion_nickname = jsonData.operator_nickname;
|
||||||
const department_id = jsonData.department_id;
|
const department_id = jsonData.department_id;
|
||||||
const department_name = jsonData.department_name;
|
const department_name = jsonData.department_name;
|
||||||
const queryText = jsonData.request_params;
|
// const queryText = jsonData.request_params;
|
||||||
const queryCount = jsonData.query_count;
|
const queryCount = jsonData.query_count;
|
||||||
const resultCount = jsonData.result_count;
|
const resultCount = jsonData.result_count;
|
||||||
const status = jsonData.status === 1 ? "成功" : "失败";
|
const status = jsonData.status === 1 ? "成功" : "失败";
|
||||||
const costTime = jsonData.cost_time;
|
const costTime = jsonData.cost_time;
|
||||||
const operationTime = jsonData.operation_time;
|
const operationTime = jsonData.operation_time;
|
||||||
jsonData.response_result = JSON.parse(
|
if (typeof jsonData.response_result === "string") {
|
||||||
jsonData.response_result.replace(/'/g, '"').replace(/None/g, "null")
|
jsonData.response_result = JSON.parse(jsonData.response_result);
|
||||||
);
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
jsonData.response_result.forEach(response => {
|
jsonData.response_result.forEach(response => {
|
||||||
const queryId = response.id;
|
const queryId = response.id;
|
||||||
const queryTextDetail = response.query_text;
|
const queryTextDetail = response.query_text;
|
||||||
const queryStatus = response.status === 1 ? "成功" : "失败";
|
const queryStatus = response.status === 1 ? "成功" : "失败";
|
||||||
|
if (typeof response.result_text === "string") {
|
||||||
|
response.result_text = JSON.parse(response.result_text);
|
||||||
|
}
|
||||||
const row = [
|
const row = [
|
||||||
index++,
|
index++,
|
||||||
batchId,
|
batchId,
|
||||||
@ -375,7 +379,7 @@ export const useQueryLog = (tableRef: Ref) => {
|
|||||||
opeartion_nickname,
|
opeartion_nickname,
|
||||||
department_id,
|
department_id,
|
||||||
department_name,
|
department_name,
|
||||||
queryText,
|
// queryText,
|
||||||
queryCount,
|
queryCount,
|
||||||
resultCount,
|
resultCount,
|
||||||
status,
|
status,
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="反馈编码" prop="code">
|
<el-form-item :label="t('menus.review.tag.htsCode')" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.code"
|
v-model="newFormInline.code"
|
||||||
placeholder="请输入反馈编码~"
|
placeholder="请输入反馈编码~"
|
||||||
@ -29,7 +29,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="编码描述" prop="description">
|
<el-form-item
|
||||||
|
:label="t('menus.review.tag.description')"
|
||||||
|
prop="description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.description"
|
v-model="newFormInline.description"
|
||||||
placeholder="请输入编码描述~"
|
placeholder="请输入编码描述~"
|
||||||
@ -40,7 +43,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="反馈编码" prop="feedback_code">
|
<el-form-item
|
||||||
|
:label="t('menus.review.tag.feedbackHtsCode')"
|
||||||
|
prop="feedback_code"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.feedback_code"
|
v-model="newFormInline.feedback_code"
|
||||||
placeholder="请输入反馈编码~"
|
placeholder="请输入反馈编码~"
|
||||||
@ -51,7 +57,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="反馈描述" prop="feedback_description">
|
<el-form-item
|
||||||
|
:label="t('menus.review.tag.feedbackDescription')"
|
||||||
|
prop="feedback_description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.feedback_description"
|
v-model="newFormInline.feedback_description"
|
||||||
placeholder="请输入反馈编码描述~"
|
placeholder="请输入反馈编码描述~"
|
||||||
@ -73,7 +82,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="用户账号" prop="username">
|
<el-form-item :label="t('menus.review.tag.account')" prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.username"
|
v-model="newFormInline.username"
|
||||||
placeholder="请输入用户账号~"
|
placeholder="请输入用户账号~"
|
||||||
@ -84,7 +93,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="用户名称" prop="nickname">
|
<el-form-item :label="t('menus.review.tag.userName')" prop="nickname">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.nickname"
|
v-model="newFormInline.nickname"
|
||||||
placeholder="请输入用户名称~"
|
placeholder="请输入用户名称~"
|
||||||
@ -95,7 +104,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="所属部门" prop="department_name">
|
<el-form-item
|
||||||
|
:label="t('menus.review.tag.department')"
|
||||||
|
prop="department_name"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.department_name"
|
v-model="newFormInline.department_name"
|
||||||
placeholder="请输入所属部门~"
|
placeholder="请输入所属部门~"
|
||||||
@ -106,7 +118,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="创建时间" prop="create_time">
|
<el-form-item
|
||||||
|
:label="t('menus.import.tag.loadTime')"
|
||||||
|
prop="create_time"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:value="
|
:value="
|
||||||
dayjs(newFormInline.create_time).format('YYYY-MM-DD HH:mm:ss')
|
dayjs(newFormInline.create_time).format('YYYY-MM-DD HH:mm:ss')
|
||||||
@ -132,7 +147,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="审核状态" prop="status">
|
<el-form-item :label="t('menus.review.tag.status')" prop="status">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="newFormInline.status"
|
v-model="newFormInline.status"
|
||||||
placeholder="请选择状态~"
|
placeholder="请选择状态~"
|
||||||
@ -155,7 +170,9 @@ import dayjs from "dayjs";
|
|||||||
import { ref, reactive } from "vue";
|
import { ref, reactive } from "vue";
|
||||||
import ReCol from "@/components/ReCol";
|
import ReCol from "@/components/ReCol";
|
||||||
import type { FormRules } from "element-plus";
|
import type { FormRules } from "element-plus";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
|
const { t } = useI18n();
|
||||||
interface PropsInfo {
|
interface PropsInfo {
|
||||||
/**方式 */
|
/**方式 */
|
||||||
way: string;
|
way: string;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:model="form"
|
:model="form"
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]"
|
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户账号" prop="usename">
|
<el-form-item :label="t('menus.review.tag.account')" prop="usename">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.username"
|
v-model="form.username"
|
||||||
placeholder="请输入用户账号~"
|
placeholder="请输入用户账号~"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户名称" prop="nickname">
|
<el-form-item :label="t('menus.review.tag.userName')" prop="nickname">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nickname"
|
v-model="form.nickname"
|
||||||
placeholder="请输入用户昵称~"
|
placeholder="请输入用户昵称~"
|
||||||
@ -22,17 +22,23 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="反馈编码" prop="code">
|
<el-form-item
|
||||||
|
:label="t('menus.review.tag.feedbackHtsCode')"
|
||||||
|
prop="feedback_code"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.code"
|
v-model="form.feedback_code"
|
||||||
placeholder="请输入反馈编码~"
|
placeholder="请输入反馈编码~"
|
||||||
clearable
|
clearable
|
||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="反馈内容" prop="feedback">
|
<el-form-item
|
||||||
|
:label="t('menus.review.tag.feedbackDescription')"
|
||||||
|
prop="feedback_description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.feedback"
|
v-model="form.feedback_description"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入反馈内容~"
|
placeholder="请输入反馈内容~"
|
||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
@ -40,7 +46,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="hasAuth('code:data:feedbackAdmin')"
|
v-if="hasAuth('code:data:feedbackAdmin')"
|
||||||
label="所属部门:"
|
:label="t('menus.review.tag.department')"
|
||||||
prop="department_id"
|
prop="department_id"
|
||||||
>
|
>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -89,7 +95,11 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<PureTableBar title="数据反馈" :columns="columns" @refresh="onSearch">
|
<PureTableBar
|
||||||
|
:title="t('menus:DataFeedback')"
|
||||||
|
:columns="columns"
|
||||||
|
@refresh="onSearch"
|
||||||
|
>
|
||||||
<template v-slot="{ size, dynamicColumns }">
|
<template v-slot="{ size, dynamicColumns }">
|
||||||
<div
|
<div
|
||||||
v-if="selectedNum > 0"
|
v-if="selectedNum > 0"
|
||||||
|
@ -16,6 +16,7 @@ import {
|
|||||||
import { getKeyList, handleTree } from "@pureadmin/utils";
|
import { getKeyList, handleTree } from "@pureadmin/utils";
|
||||||
import type { DepartmentInfo } from "types/system";
|
import type { DepartmentInfo } from "types/system";
|
||||||
import { getDepartmentListAPI } from "@/api/system";
|
import { getDepartmentListAPI } from "@/api/system";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
export const useCode = (tableRef: Ref) => {
|
export const useCode = (tableRef: Ref) => {
|
||||||
/**
|
/**
|
||||||
@ -94,40 +95,40 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
reserveSelection: true // 数据刷新后保留选项
|
reserveSelection: true // 数据刷新后保留选项
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户账号",
|
label: transformI18n("menus.review.tag.account"),
|
||||||
prop: "username",
|
prop: "username",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户昵称",
|
label: transformI18n("menus.review.tag.userName"),
|
||||||
prop: "nickname",
|
prop: "nickname",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "所属部门",
|
label: transformI18n("menus.review.tag.department"),
|
||||||
prop: "department_name",
|
prop: "department_name",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码",
|
label: transformI18n("menus.review.tag.htsCode"),
|
||||||
prop: "code",
|
prop: "code",
|
||||||
formatter: ({ code }) =>
|
formatter: ({ code }) =>
|
||||||
code ? code.replace(/(\d{2})/g, "$1.").slice(0, -1) : ""
|
code ? code.replace(/(\d{2})/g, "$1.").slice(0, -1) : ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "描述",
|
label: transformI18n("menus.review.tag.description"),
|
||||||
prop: "description"
|
prop: "description"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "反馈编码",
|
label: transformI18n("menus.review.tag.feedbackHtsCode"),
|
||||||
prop: "feedback_code"
|
prop: "feedback_code"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "反馈描述",
|
label: transformI18n("menus.review.tag.feedbackDescription"),
|
||||||
prop: "feedback_description"
|
prop: "feedback_description"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "审核状态",
|
label: transformI18n("menus.review.tag.status"),
|
||||||
prop: "status",
|
prop: "status",
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
cellRenderer: ({ row, props }) => (
|
cellRenderer: ({ row, props }) => (
|
||||||
@ -137,13 +138,13 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建时间",
|
label: transformI18n("menus.import.tag.loadTime"),
|
||||||
prop: "create_time",
|
prop: "create_time",
|
||||||
formatter: ({ create_time }) =>
|
formatter: ({ create_time }) =>
|
||||||
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
|
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: transformI18n("buttons:Operation"),
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 250,
|
width: 250,
|
||||||
slot: "operation"
|
slot: "operation"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
>
|
>
|
||||||
<el-row :gutter="30">
|
<el-row :gutter="30">
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item :label="t('menus.import.tag.account')" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.code"
|
v-model="newFormInline.code"
|
||||||
placeholder="请输入编码~"
|
placeholder="请输入编码~"
|
||||||
@ -18,7 +18,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="描述" prop="description">
|
<el-form-item
|
||||||
|
:label="t('menus.import.tag.description')"
|
||||||
|
prop="description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.description"
|
v-model="newFormInline.description"
|
||||||
placeholder="请输入编码描述~"
|
placeholder="请输入编码描述~"
|
||||||
@ -40,7 +43,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="用户账号" prop="username">
|
<el-form-item :label="t('menus.import.tag.account')" prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.username"
|
v-model="newFormInline.username"
|
||||||
placeholder="请输入用户账号~"
|
placeholder="请输入用户账号~"
|
||||||
@ -51,7 +54,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="用户名称" prop="nickname">
|
<el-form-item :label="t('menus.import.tag.userName')" prop="nickname">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.nickname"
|
v-model="newFormInline.nickname"
|
||||||
placeholder="请输入用户名称~"
|
placeholder="请输入用户名称~"
|
||||||
@ -62,7 +65,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="所属部门" prop="department_name">
|
<el-form-item
|
||||||
|
:label="t('menus.import.tag.department')"
|
||||||
|
prop="department_name"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.department_name"
|
v-model="newFormInline.department_name"
|
||||||
placeholder="请输入所属部门~"
|
placeholder="请输入所属部门~"
|
||||||
@ -73,7 +79,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="创建时间" prop="create_time">
|
<el-form-item
|
||||||
|
:label="t('menus.import.tag.loadTime')"
|
||||||
|
prop="create_time"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:value="
|
:value="
|
||||||
dayjs(newFormInline.create_time).format('YYYY-MM-DD HH:mm:ss')
|
dayjs(newFormInline.create_time).format('YYYY-MM-DD HH:mm:ss')
|
||||||
@ -99,7 +108,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
<re-col v-if="newFormInline.way !== '新增'" :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="审核状态" prop="status">
|
<el-form-item :label="t('menus.import.tag.status')" prop="status">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="newFormInline.status"
|
v-model="newFormInline.status"
|
||||||
placeholder="请选择状态~"
|
placeholder="请选择状态~"
|
||||||
@ -123,6 +132,8 @@ import { ref, reactive } from "vue";
|
|||||||
import ReCol from "@/components/ReCol";
|
import ReCol from "@/components/ReCol";
|
||||||
import type { FormRules } from "element-plus";
|
import type { FormRules } from "element-plus";
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
const { t } = useI18n();
|
||||||
interface PropsInfo {
|
interface PropsInfo {
|
||||||
id: string;
|
id: string;
|
||||||
/**方式 */
|
/**方式 */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:model="form"
|
:model="form"
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]"
|
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户账号" prop="usename">
|
<el-form-item :label="t('menus.import.tag.account')" prop="usename">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.username"
|
v-model="form.username"
|
||||||
placeholder="请输入用户账号~"
|
placeholder="请输入用户账号~"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户名称" prop="nickname">
|
<el-form-item :label="t('menus.import.tag.userName')" prop="nickname">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nickname"
|
v-model="form.nickname"
|
||||||
placeholder="请输入用户昵称~"
|
placeholder="请输入用户昵称~"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item :label="t('menus.import.tag.htsCode')" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.code"
|
v-model="form.code"
|
||||||
placeholder="请输入编码"
|
placeholder="请输入编码"
|
||||||
@ -30,7 +30,10 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编码描述" prop="description">
|
<el-form-item
|
||||||
|
:label="t('menus.import.tag.description')"
|
||||||
|
prop="description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.description"
|
v-model="form.description"
|
||||||
clearable
|
clearable
|
||||||
@ -40,7 +43,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="hasAuth('code:data:importAdmin')"
|
v-if="hasAuth('code:data:importAdmin')"
|
||||||
label="所属部门:"
|
:label="t('menus.import.tag.department')"
|
||||||
prop="department_id"
|
prop="department_id"
|
||||||
>
|
>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -63,6 +66,18 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="t('menus.review.tag.status')" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="form.status"
|
||||||
|
class="!w-[200px]"
|
||||||
|
placeholder="请选择审核状态"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option label="审核通过" :value="1" />
|
||||||
|
<el-option label="审核未通过" :value="2" />
|
||||||
|
<el-option label="待审核" :value="3" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="导入时间" prop="timeRange">
|
<el-form-item label="导入时间" prop="timeRange">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.timeRange"
|
v-model="form.timeRange"
|
||||||
@ -89,7 +104,11 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<PureTableBar title="编码导入" :columns="columns" @refresh="onSearch">
|
<PureTableBar
|
||||||
|
:title="t('menus.import.tag.htsDataImport')"
|
||||||
|
:columns="columns"
|
||||||
|
@refresh="onSearch"
|
||||||
|
>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('code:btn:add')"
|
v-if="hasAuth('code:btn:add')"
|
||||||
@ -119,6 +138,7 @@
|
|||||||
drag
|
drag
|
||||||
action="#"
|
action="#"
|
||||||
:limit="10"
|
:limit="10"
|
||||||
|
multiple
|
||||||
class="w-full"
|
class="w-full"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
|
@ -8,7 +8,7 @@ import type { CodeImportInfo } from "types/code";
|
|||||||
import {
|
import {
|
||||||
deleteCodeImportAPI,
|
deleteCodeImportAPI,
|
||||||
deleteCodeImportListAPI,
|
deleteCodeImportListAPI,
|
||||||
getAddCodeAPI,
|
postAddCodeByFileAPI,
|
||||||
getCodeImportListAPI,
|
getCodeImportListAPI,
|
||||||
getCodeTemplateAPI,
|
getCodeTemplateAPI,
|
||||||
postAddCodeAPI,
|
postAddCodeAPI,
|
||||||
@ -17,14 +17,11 @@ import {
|
|||||||
putUpdateCodeImportAPI
|
putUpdateCodeImportAPI
|
||||||
} from "@/api/code";
|
} from "@/api/code";
|
||||||
import { getKeyList, handleTree } from "@pureadmin/utils";
|
import { getKeyList, handleTree } from "@pureadmin/utils";
|
||||||
import {
|
import { ElMessageBox, type UploadUserFile } from "element-plus";
|
||||||
ElMessageBox,
|
|
||||||
type UploadProps,
|
|
||||||
type UploadUserFile
|
|
||||||
} from "element-plus";
|
|
||||||
import { deleteFileAPI, postUploadFileAPI } from "@/api/file";
|
import { deleteFileAPI, postUploadFileAPI } from "@/api/file";
|
||||||
import type { DepartmentInfo } from "types/system";
|
import type { DepartmentInfo } from "types/system";
|
||||||
import { getDepartmentListAPI } from "@/api/system";
|
import { getDepartmentListAPI } from "@/api/system";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
export const useCode = (tableRef: Ref) => {
|
export const useCode = (tableRef: Ref) => {
|
||||||
/**
|
/**
|
||||||
@ -70,7 +67,6 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
const fileList = ref<UploadUserFile[]>([]);
|
const fileList = ref<UploadUserFile[]>([]);
|
||||||
/**上传成功后文件列表 */
|
/**上传成功后文件列表 */
|
||||||
const fileIds = ref([]);
|
const fileIds = ref([]);
|
||||||
const fileId = ref<string>("");
|
|
||||||
/**上传按钮状态 */
|
/**上传按钮状态 */
|
||||||
const uploadStatus = ref<boolean>(false);
|
const uploadStatus = ref<boolean>(false);
|
||||||
|
|
||||||
@ -110,31 +106,31 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
reserveSelection: true // 数据刷新后保留选项
|
reserveSelection: true // 数据刷新后保留选项
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户账号",
|
label: transformI18n("menus.import.tag.account"),
|
||||||
prop: "username",
|
prop: "username",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户昵称",
|
label: transformI18n("menus.import.tag.userName"),
|
||||||
prop: "nickname",
|
prop: "nickname",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "所属部门",
|
label: transformI18n("menus.import.tag.department"),
|
||||||
prop: "department_name",
|
prop: "department_name",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码",
|
label: transformI18n("menus.import.tag.htsCode"),
|
||||||
prop: "code",
|
prop: "code",
|
||||||
formatter: ({ code }) => code.replace(/(\d{2})/g, "$1.").slice(0, -1)
|
formatter: ({ code }) => code.replace(/(\d{2})/g, "$1.").slice(0, -1)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码描述",
|
label: transformI18n("menus.import.tag.description"),
|
||||||
prop: "description"
|
prop: "description"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "审核状态",
|
label: transformI18n("menus.import.tag.status"),
|
||||||
prop: "status",
|
prop: "status",
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
cellRenderer: ({ row, props }) => (
|
cellRenderer: ({ row, props }) => (
|
||||||
@ -144,13 +140,13 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建时间",
|
label: transformI18n("menus.import.tag.loadTime"),
|
||||||
prop: "create_time",
|
prop: "create_time",
|
||||||
formatter: ({ create_time }) =>
|
formatter: ({ create_time }) =>
|
||||||
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
|
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: transformI18n("buttons:Operation"),
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 250,
|
width: 250,
|
||||||
slot: "operation"
|
slot: "operation"
|
||||||
@ -408,68 +404,77 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**处理文件上传 */
|
/** 处理文件上传 */
|
||||||
const handleUpload = async () => {
|
const handleUpload = async () => {
|
||||||
if (fileList.value.length === 0) {
|
if (fileList.value.length === 0) {
|
||||||
message("请先上传文件!", { type: "error", duration: 5000 });
|
message("请先选择文件!", { type: "error", duration: 5000 });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadStatus.value = true;
|
uploadStatus.value = true;
|
||||||
|
|
||||||
for (const file of fileList.value) {
|
for (const file of fileList.value) {
|
||||||
if (file.status === "success") {
|
if (file.status === "success") continue; // 已上传成功的跳过
|
||||||
// const data =
|
|
||||||
await getAddCodeAPI(fileId.value);
|
|
||||||
// if (data.success) {
|
|
||||||
// message("导入成功", { type: "success" });
|
|
||||||
// await onSearch();
|
|
||||||
// }
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const res = await postUploadFileAPI({
|
const res = await postUploadFileAPI({ file: file.raw });
|
||||||
file: file.raw
|
|
||||||
});
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
file.status = "success";
|
file.status = "success";
|
||||||
fileId.value = res.data.id;
|
fileIds.value.push(res.data); // 记录成功上传的文件ID
|
||||||
message(`${res.data.name}上传成功!`, { type: "success" });
|
message(`${res.data.name} 上传成功!`, { type: "success" });
|
||||||
fileIds.value.push(res.data);
|
|
||||||
// const data =
|
|
||||||
await getAddCodeAPI(fileId.value);
|
|
||||||
// if (data.success) {
|
|
||||||
// message(`导入成功!`, { type: "success" });
|
|
||||||
// await onSearch();
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
file.status = "fail";
|
file.status = "fail";
|
||||||
|
message(`${file.name} 上传失败!`, { type: "error" });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
file.status = "fail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadStatus.value = false;
|
uploadStatus.value = false;
|
||||||
|
|
||||||
|
// 只有在至少有一个文件上传成功时才进行批量导入
|
||||||
|
if (fileIds.value.length > 0) {
|
||||||
|
try {
|
||||||
|
const data = await postAddCodeByFileAPI(
|
||||||
|
getKeyList(fileIds.value, "id")
|
||||||
|
);
|
||||||
|
if (data.success) {
|
||||||
|
message("批量导入成功!", { type: "success" });
|
||||||
|
await onSearch();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
message("批量导入失败!", { type: "error" });
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
/**移除文件 */
|
/** 移除文件 */
|
||||||
const beforeRemove: UploadProps["beforeRemove"] = async uploadFile => {
|
const beforeRemove = async uploadFile => {
|
||||||
return ElMessageBox.confirm(`是否移除 ${uploadFile.name} ?`).then(
|
return ElMessageBox.confirm(`是否移除 ${uploadFile.name} ?`).then(
|
||||||
async () => {
|
async () => {
|
||||||
if (uploadFile.status === "success") {
|
if (uploadFile.status === "success") {
|
||||||
const fileId = fileIds.value.filter(
|
const fileObj = fileIds.value.find(
|
||||||
item => item.filename === uploadFile.name
|
item => item.name === uploadFile.name
|
||||||
)[0]["fileId"];
|
);
|
||||||
const res = await deleteFileAPI(fileId);
|
if (fileObj) {
|
||||||
if (res.code === 200) {
|
const res = await deleteFileAPI(fileObj.id);
|
||||||
message(res.msg, { type: "success" });
|
if (res.code === 200) {
|
||||||
return true;
|
message(res.msg, { type: "success" });
|
||||||
} else {
|
fileIds.value = fileIds.value.filter(
|
||||||
message(res.msg, { type: "error" });
|
item => item.id !== fileObj.id
|
||||||
return false;
|
);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message(res.msg, { type: "error" });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
},
|
return true;
|
||||||
() => false
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/**部门列表 */
|
/**部门列表 */
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
ref="ruleFormRef"
|
ref="ruleFormRef"
|
||||||
:model="newFormInline"
|
:model="newFormInline"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="82px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<el-row :gutter="30">
|
<el-row :gutter="30">
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item :label="t('menus.maintenance.tag.htsCode')" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.code"
|
v-model="newFormInline.code"
|
||||||
placeholder="请输入编码~"
|
placeholder="请输入编码~"
|
||||||
@ -17,7 +17,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</re-col>
|
</re-col>
|
||||||
<re-col :value="24" :xm="24" :sm="24">
|
<re-col :value="24" :xm="24" :sm="24">
|
||||||
<el-form-item label="描述" prop="description">
|
<el-form-item
|
||||||
|
:label="t('menus.maintenance.tag.description')"
|
||||||
|
prop="description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newFormInline.description"
|
v-model="newFormInline.description"
|
||||||
placeholder="请输入编码描述~"
|
placeholder="请输入编码描述~"
|
||||||
@ -35,6 +38,8 @@ import { ref, reactive } from "vue";
|
|||||||
import ReCol from "@/components/ReCol";
|
import ReCol from "@/components/ReCol";
|
||||||
import type { FormRules } from "element-plus";
|
import type { FormRules } from "element-plus";
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
const { t } = useI18n();
|
||||||
interface PropsInfo {
|
interface PropsInfo {
|
||||||
code: string;
|
code: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:model="form"
|
:model="form"
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]"
|
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]"
|
||||||
>
|
>
|
||||||
<el-form-item label="用户账号" prop="usename">
|
<el-form-item :label="t('menus.maintenance.tag.account')" prop="usename">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.username"
|
v-model="form.username"
|
||||||
placeholder="请输入用户账号~"
|
placeholder="请输入用户账号~"
|
||||||
@ -14,7 +14,10 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户名称" prop="nickname">
|
<el-form-item
|
||||||
|
:label="t('menus.maintenance.tag.username')"
|
||||||
|
prop="nickname"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nickname"
|
v-model="form.nickname"
|
||||||
placeholder="请输入用户昵称~"
|
placeholder="请输入用户昵称~"
|
||||||
@ -22,7 +25,7 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item :label="t('menus.maintenance.tag.htsCode')" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.code"
|
v-model="form.code"
|
||||||
placeholder="请输入编码"
|
placeholder="请输入编码"
|
||||||
@ -30,7 +33,10 @@
|
|||||||
class="!w-[200px]"
|
class="!w-[200px]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编码描述" prop="description">
|
<el-form-item
|
||||||
|
:label="t('menus.maintenance.tag.description')"
|
||||||
|
prop="description"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.description"
|
v-model="form.description"
|
||||||
clearable
|
clearable
|
||||||
@ -40,7 +46,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="hasAuth('code:data:importAdmin')"
|
v-if="hasAuth('code:data:importAdmin')"
|
||||||
label="所属部门:"
|
:label="t('menus.maintenance.tag.department')"
|
||||||
prop="department_id"
|
prop="department_id"
|
||||||
>
|
>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -89,7 +95,11 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<PureTableBar title="数据维护" :columns="columns" @refresh="onSearch">
|
<PureTableBar
|
||||||
|
:title="t('menus.maintenance.tag.dataMaintenance')"
|
||||||
|
:columns="columns"
|
||||||
|
@refresh="onSearch"
|
||||||
|
>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('code:btn:add')"
|
v-if="hasAuth('code:btn:add')"
|
||||||
@ -116,6 +126,7 @@
|
|||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
|
multiple
|
||||||
drag
|
drag
|
||||||
action="#"
|
action="#"
|
||||||
:limit="10"
|
:limit="10"
|
||||||
|
@ -8,21 +8,18 @@ import type { CodeInfo } from "types/code";
|
|||||||
import {
|
import {
|
||||||
deleteCodeAPI,
|
deleteCodeAPI,
|
||||||
deleteCodeListAPI,
|
deleteCodeListAPI,
|
||||||
getAddCodeAPI,
|
postAddCodeByFileAPI,
|
||||||
getCodeListAPI,
|
getCodeListAPI,
|
||||||
getCodeTemplateAPI,
|
getCodeTemplateAPI,
|
||||||
postAddCodeAPI,
|
postAddCodeAPI,
|
||||||
putUpdateCodeAPI
|
putUpdateCodeAPI
|
||||||
} from "@/api/code";
|
} from "@/api/code";
|
||||||
import { getKeyList, handleTree } from "@pureadmin/utils";
|
import { getKeyList, handleTree } from "@pureadmin/utils";
|
||||||
import {
|
import { ElMessageBox, type UploadUserFile } from "element-plus";
|
||||||
ElMessageBox,
|
|
||||||
type UploadProps,
|
|
||||||
type UploadUserFile
|
|
||||||
} from "element-plus";
|
|
||||||
import { deleteFileAPI, postUploadFileAPI } from "@/api/file";
|
import { deleteFileAPI, postUploadFileAPI } from "@/api/file";
|
||||||
import type { DepartmentInfo } from "types/system";
|
import type { DepartmentInfo } from "types/system";
|
||||||
import { getDepartmentListAPI } from "@/api/system";
|
import { getDepartmentListAPI } from "@/api/system";
|
||||||
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
|
|
||||||
export const useCode = (tableRef: Ref) => {
|
export const useCode = (tableRef: Ref) => {
|
||||||
/**
|
/**
|
||||||
@ -67,7 +64,6 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
const fileList = ref<UploadUserFile[]>([]);
|
const fileList = ref<UploadUserFile[]>([]);
|
||||||
/**上传成功后文件列表 */
|
/**上传成功后文件列表 */
|
||||||
const fileIds = ref([]);
|
const fileIds = ref([]);
|
||||||
const fileId = ref<string>("");
|
|
||||||
/**上传按钮状态 */
|
/**上传按钮状态 */
|
||||||
const uploadStatus = ref<boolean>(false);
|
const uploadStatus = ref<boolean>(false);
|
||||||
/**
|
/**
|
||||||
@ -81,37 +77,37 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
reserveSelection: true // 数据刷新后保留选项
|
reserveSelection: true // 数据刷新后保留选项
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户账号",
|
label: transformI18n("menus.maintenance.tag.account"),
|
||||||
prop: "username",
|
prop: "username",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户昵称",
|
label: transformI18n("menus.maintenance.tag.username"),
|
||||||
prop: "nickname",
|
prop: "nickname",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "所属部门",
|
label: transformI18n("menus.maintenance.tag.department"),
|
||||||
prop: "department_name",
|
prop: "department_name",
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码",
|
label: transformI18n("menus.maintenance.tag.htsCode"),
|
||||||
prop: "code",
|
prop: "code",
|
||||||
formatter: ({ code }) => code.replace(/(\d{2})/g, "$1.").slice(0, -1)
|
formatter: ({ code }) => code.replace(/(\d{2})/g, "$1.").slice(0, -1)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "编码描述",
|
label: transformI18n("menus.maintenance.tag.description"),
|
||||||
prop: "description"
|
prop: "description"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建时间",
|
label: transformI18n("menus.maintenance.tag.loadTime"),
|
||||||
prop: "create_time",
|
prop: "create_time",
|
||||||
formatter: ({ create_time }) =>
|
formatter: ({ create_time }) =>
|
||||||
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
|
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: transformI18n("buttons:Operation"),
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 250,
|
width: 250,
|
||||||
slot: "operation"
|
slot: "operation"
|
||||||
@ -347,68 +343,77 @@ export const useCode = (tableRef: Ref) => {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**处理文件上传 */
|
/** 处理文件上传 */
|
||||||
const handleUpload = async () => {
|
const handleUpload = async () => {
|
||||||
if (fileList.value.length === 0) {
|
if (fileList.value.length === 0) {
|
||||||
message("请先上传文件!", { type: "error", duration: 5000 });
|
message("请先选择文件!", { type: "error", duration: 5000 });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadStatus.value = true;
|
uploadStatus.value = true;
|
||||||
|
|
||||||
for (const file of fileList.value) {
|
for (const file of fileList.value) {
|
||||||
if (file.status === "success") {
|
if (file.status === "success") continue; // 已上传成功的跳过
|
||||||
// const data =
|
|
||||||
await getAddCodeAPI(fileId.value);
|
|
||||||
// if (data.success) {
|
|
||||||
// message("导入成功!", { type: "success" });
|
|
||||||
// await onSearch();
|
|
||||||
// }
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const res = await postUploadFileAPI({
|
const res = await postUploadFileAPI({ file: file.raw });
|
||||||
file: file.raw
|
|
||||||
});
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
file.status = "success";
|
file.status = "success";
|
||||||
fileId.value = res.data.id;
|
fileIds.value.push(res.data); // 记录成功上传的文件ID
|
||||||
message(`${res.data.name}上传成功!`, { type: "success" });
|
message(`${res.data.name} 上传成功!`, { type: "success" });
|
||||||
fileIds.value.push(res.data);
|
|
||||||
// const data =
|
|
||||||
await getAddCodeAPI(fileId.value);
|
|
||||||
// if (data.success) {
|
|
||||||
// message(`导入成功!`, { type: "success" });
|
|
||||||
// await onSearch();
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
file.status = "fail";
|
file.status = "fail";
|
||||||
|
message(`${file.name} 上传失败!`, { type: "error" });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
file.status = "fail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadStatus.value = false;
|
uploadStatus.value = false;
|
||||||
|
|
||||||
|
// 只有在至少有一个文件上传成功时才进行批量导入
|
||||||
|
if (fileIds.value.length > 0) {
|
||||||
|
try {
|
||||||
|
const data = await postAddCodeByFileAPI(
|
||||||
|
getKeyList(fileIds.value, "id")
|
||||||
|
);
|
||||||
|
if (data.success) {
|
||||||
|
message("批量导入成功!", { type: "success" });
|
||||||
|
await onSearch();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
message("批量导入失败!", { type: "error" });
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
/**移除文件 */
|
/** 移除文件 */
|
||||||
const beforeRemove: UploadProps["beforeRemove"] = async uploadFile => {
|
const beforeRemove = async uploadFile => {
|
||||||
return ElMessageBox.confirm(`是否移除 ${uploadFile.name} ?`).then(
|
return ElMessageBox.confirm(`是否移除 ${uploadFile.name} ?`).then(
|
||||||
async () => {
|
async () => {
|
||||||
if (uploadFile.status === "success") {
|
if (uploadFile.status === "success") {
|
||||||
const fileId = fileIds.value.filter(
|
const fileObj = fileIds.value.find(
|
||||||
item => item.filename === uploadFile.name
|
item => item.name === uploadFile.name
|
||||||
)[0]["fileId"];
|
);
|
||||||
const res = await deleteFileAPI(fileId);
|
if (fileObj) {
|
||||||
if (res.code === 200) {
|
const res = await deleteFileAPI(fileObj.id);
|
||||||
message(res.msg, { type: "success" });
|
if (res.code === 200) {
|
||||||
return true;
|
message(res.msg, { type: "success" });
|
||||||
} else {
|
fileIds.value = fileIds.value.filter(
|
||||||
message(res.msg, { type: "error" });
|
item => item.id !== fileObj.id
|
||||||
return false;
|
);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message(res.msg, { type: "error" });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
},
|
return true;
|
||||||
() => false
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/**部门列表 */
|
/**部门列表 */
|
||||||
|
@ -256,6 +256,7 @@ export const useLogin = (tableRef: Ref) => {
|
|||||||
pagination.currentPage = res.data.page;
|
pagination.currentPage = res.data.page;
|
||||||
pagination.pageSize = res.data.pageSize;
|
pagination.pageSize = res.data.pageSize;
|
||||||
}
|
}
|
||||||
|
message(res.msg, { type: res.success ? "success" : "error" });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -257,7 +257,7 @@ export function useOperation(tableRef: Ref) {
|
|||||||
pagination.total = res.data.total;
|
pagination.total = res.data.total;
|
||||||
pagination.currentPage = res.data.page;
|
pagination.currentPage = res.data.page;
|
||||||
}
|
}
|
||||||
|
message(res.msg, { type: res.success ? "success" : "error" });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -306,7 +306,7 @@ export function useOperation(tableRef: Ref) {
|
|||||||
pagination.currentPage = res.data.page;
|
pagination.currentPage = res.data.page;
|
||||||
pagination.pageSize = res.data.pageSize;
|
pagination.pageSize = res.data.pageSize;
|
||||||
}
|
}
|
||||||
|
message(res.msg, { type: res.success ? "success" : "error" });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -115,6 +115,7 @@ export const useDepartment = () => {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
dataList.value = handleTree(res.data.result, "id", "parent_id"); // 处理成树结构
|
dataList.value = handleTree(res.data.result, "id", "parent_id"); // 处理成树结构
|
||||||
}
|
}
|
||||||
|
message(res.msg, { type: res.success ? "success" : "error" });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -129,6 +129,7 @@ export const usePermission = () => {
|
|||||||
let newData = res.data.result;
|
let newData = res.data.result;
|
||||||
dataList.value = handleTree(newData, "id", "parent_id"); // 处理成树结构
|
dataList.value = handleTree(newData, "id", "parent_id"); // 处理成树结构
|
||||||
}
|
}
|
||||||
|
message(res.msg, { type: res.success ? "success" : "error" });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -278,7 +278,7 @@ export const useUser = (tableRef: Ref, treeRef: Ref) => {
|
|||||||
*/
|
*/
|
||||||
const onSearch = async () => {
|
const onSearch = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { data } = await getUserListAPI({
|
const { data, msg, success } = await getUserListAPI({
|
||||||
page: pagination.currentPage,
|
page: pagination.currentPage,
|
||||||
pageSize: pagination.pageSize,
|
pageSize: pagination.pageSize,
|
||||||
department_id: form.department_id,
|
department_id: form.department_id,
|
||||||
@ -292,7 +292,7 @@ export const useUser = (tableRef: Ref, treeRef: Ref) => {
|
|||||||
dataList.value = data.result;
|
dataList.value = data.result;
|
||||||
pagination.total = data.total;
|
pagination.total = data.total;
|
||||||
pagination.currentPage = data.page;
|
pagination.currentPage = data.page;
|
||||||
|
message(msg, { type: success ? "success" : "error" });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useDark, useECharts } from "@pureadmin/utils";
|
import { useDark, useECharts } from "@pureadmin/utils";
|
||||||
import { type PropType, ref, computed, watch, nextTick } from "vue";
|
import { type PropType, ref, computed, watch, nextTick } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dates: {
|
dates: {
|
||||||
@ -34,7 +36,7 @@ watch(
|
|||||||
container: ".bar-card",
|
container: ".bar-card",
|
||||||
color: ["#28a745", "#dc3545"], // 绿色成功,红色失败
|
color: ["#28a745", "#dc3545"], // 绿色成功,红色失败
|
||||||
title: {
|
title: {
|
||||||
text: "近14天内查询统计",
|
text: t("menus.home.tag.queryStatisticsLast14Days"),
|
||||||
left: "center", // 标题居中
|
left: "center", // 标题居中
|
||||||
top: 10, // 标题放在顶部
|
top: 10, // 标题放在顶部
|
||||||
textStyle: {
|
textStyle: {
|
||||||
@ -56,7 +58,7 @@ watch(
|
|||||||
bottom: "50px"
|
bottom: "50px"
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ["成功查询", "失败查询"],
|
data: [t("menus.home.tag.success"), t("menus.home.tag.failed")],
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: "#606266",
|
color: "#606266",
|
||||||
fontSize: "0.875rem"
|
fontSize: "0.875rem"
|
||||||
@ -89,7 +91,7 @@ watch(
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "成功查询",
|
name: t("menus.home.tag.success"),
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
@ -103,7 +105,7 @@ watch(
|
|||||||
data: props.successData
|
data: props.successData
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "失败查询",
|
name: t("menus.home.tag.failed"),
|
||||||
type: "line",
|
type: "line",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
|
@ -18,6 +18,8 @@ import { QueryCodeLogInfo } from "types/code";
|
|||||||
import { getCodeLogListAPI } from "@/api/code";
|
import { getCodeLogListAPI } from "@/api/code";
|
||||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||||
import { $t } from "@/plugins/i18n";
|
import { $t } from "@/plugins/i18n";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { isDark } = useDark();
|
const { isDark } = useDark();
|
||||||
const getRandomIntBetween = (min: number, max: number) => {
|
const getRandomIntBetween = (min: number, max: number) => {
|
||||||
@ -273,7 +275,9 @@ onMounted(async () => {
|
|||||||
>
|
>
|
||||||
<el-card class="line-card" shadow="never">
|
<el-card class="line-card" shadow="never">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<span class="text-md font-medium"> 今日查询 </span>
|
<span class="text-md font-medium">
|
||||||
|
{{ t("menus.home.tag.queryStatisticsToday") }}</span
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="w-8 h-8 flex justify-center items-center rounded-md"
|
class="w-8 h-8 flex justify-center items-center rounded-md"
|
||||||
:style="{
|
:style="{
|
||||||
@ -317,7 +321,9 @@ onMounted(async () => {
|
|||||||
>
|
>
|
||||||
<el-card class="line-card" shadow="never">
|
<el-card class="line-card" shadow="never">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<span class="text-md font-medium"> 当月查询 </span>
|
<span class="text-md font-medium">
|
||||||
|
{{ t("menus.home.tag.queryStatisticsCurrentMonth") }}
|
||||||
|
</span>
|
||||||
<div
|
<div
|
||||||
class="w-8 h-8 flex justify-center items-center rounded-md"
|
class="w-8 h-8 flex justify-center items-center rounded-md"
|
||||||
:style="{
|
:style="{
|
||||||
@ -357,7 +363,9 @@ onMounted(async () => {
|
|||||||
>
|
>
|
||||||
<el-card class="line-card" shadow="never">
|
<el-card class="line-card" shadow="never">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<span class="text-md font-medium"> 上月查询 </span>
|
<span class="text-md font-medium">
|
||||||
|
{{ t("menus.home.tag.queryStatisticsLastMonth") }}
|
||||||
|
</span>
|
||||||
<div
|
<div
|
||||||
class="w-8 h-8 flex justify-center items-center rounded-md"
|
class="w-8 h-8 flex justify-center items-center rounded-md"
|
||||||
:style="{
|
:style="{
|
||||||
@ -400,7 +408,9 @@ onMounted(async () => {
|
|||||||
>
|
>
|
||||||
<el-card class="bar-card" shadow="never">
|
<el-card class="bar-card" shadow="never">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<span class="text-md font-medium">数据概览</span>
|
<span class="text-md font-medium">{{
|
||||||
|
t("menus.home.tag.statisticsDataSummary")
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between items-start mt-3">
|
<div class="flex justify-between items-start mt-3">
|
||||||
<ChartBar
|
<ChartBar
|
||||||
@ -443,7 +453,7 @@ onMounted(async () => {
|
|||||||
@change="onChange"
|
@change="onChange"
|
||||||
/>
|
/>
|
||||||
<div class="text-md font-medium mt-3 text-center w-full">
|
<div class="text-md font-medium mt-3 text-center w-full">
|
||||||
查询动态
|
{{ t("menus.home.tag.queryLogDisplay") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar max-height="500" class="mt-3 !h-[518px]">
|
<el-scrollbar max-height="500" class="mt-3 !h-[518px]">
|
||||||
|