From 1c7532e0def9c26cce436ff74b03294648c39af9 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Mon, 27 Jul 2026 17:19:36 +0800 Subject: [PATCH] fix bug --- AGENTS.md | 108 ++- index.html | 3 +- package.json | 3 + pnpm-lock.yaml | 701 +++++++++++++++++ public/img/左侧背景放底部.png | Bin 90229 -> 0 bytes public/img/系统首页顶部背景图.png | Bin 116064 -> 0 bytes src/api/base/cargo-type.js | 73 ++ src/api/common.js | 12 + src/components/basic-container/main.vue | 5 + src/components/cron-editor/main.vue | 12 +- src/components/empty-pagination/main.vue | 11 +- src/components/third-register/main.vue | 2 +- .../vehicle-attachment-upload/main.vue | 364 +++++++++ src/config/website.js | 4 +- src/lang/zh.js | 4 +- src/main.js | 16 + src/option/base/common-address.js | 11 +- src/option/job/jobinfo.js | 7 +- src/option/job/jobserver.js | 7 +- src/option/system/authlock.js | 5 +- src/option/system/authlog.js | 5 +- src/option/system/dict.js | 14 +- src/option/system/dictbiz.js | 14 +- src/option/system/user.js | 14 +- src/option/tool/code.js | 9 +- src/option/tool/codesetting.js | 9 +- src/option/tool/formsetting.js | 9 +- src/option/transportCapacity/driver.js | 15 +- .../transportCapacity/transport-ship.js | 5 +- .../transportCapacity/transport-vehicle.js | 5 +- src/option/vehicle/accident-record.js | 48 +- .../vehicle/annual-inspection-record.js | 47 +- src/option/vehicle/etc-record.js | 91 ++- src/option/vehicle/insurance-record.js | 11 +- src/option/vehicle/mileage-record.js | 76 +- src/option/vehicle/oil-electric-record.js | 24 +- src/option/vehicle/other-expense-record.js | 100 +-- src/option/vehicle/tire-replacement-record.js | 41 +- src/option/vehicle/transport-change-record.js | 22 +- src/option/vehicle/violation-record.js | 47 +- src/page/index/logo.vue | 8 +- src/page/index/search.vue | 2 +- src/page/index/sidebar/sidebarItem.vue | 6 +- src/page/index/top/index.vue | 2 +- src/page/index/top/top-color.vue | 5 +- src/page/index/top/top-lock.vue | 2 +- src/page/index/top/top-menu.vue | 4 +- src/page/index/top/top-search.vue | 2 +- src/router/avue-router.js | 2 +- src/store/modules/common.js | 9 +- src/styles/common.scss | 22 +- src/styles/element-ui.scss | 380 ++++++++- src/styles/theme/go.scss | 10 +- src/styles/theme/index.scss | 47 ++ src/styles/top.scss | 7 +- src/utils/coordinate.js | 54 ++ src/utils/dialog-form-label.js | 136 ++++ src/utils/import-excel.js | 76 ++ src/utils/pagination.js | 167 ++++ src/views/authority/apikey.vue | 14 +- src/views/authority/apiscope.vue | 21 +- src/views/authority/datascope.vue | 21 +- src/views/authority/ratelimit.vue | 16 +- src/views/authority/role.vue | 9 +- src/views/base/airport-master.vue | 278 +++++-- src/views/base/cargo-type.vue | 705 +++++++++++++++++ src/views/base/common-address.vue | 38 + src/views/base/currency.vue | 56 +- src/views/base/customer-type.vue | 5 +- src/views/base/fee-item.vue | 29 +- src/views/base/port-terminal.vue | 732 +++++++++++++----- src/views/base/railway-station.vue | 257 ++++-- src/views/base/region.vue | 218 +++++- src/views/data/record.vue | 7 +- src/views/desk/notice-composition.vue | 5 +- src/views/desk/notice.vue | 5 +- src/views/flow/deploy.vue | 2 +- src/views/flow/follow.vue | 7 +- src/views/flow/manager.vue | 7 +- src/views/flow/model.vue | 5 +- src/views/monitor/log/api.vue | 5 +- src/views/monitor/log/error.vue | 5 +- src/views/monitor/log/usual.vue | 5 +- src/views/report/reportlist.vue | 5 +- src/views/resource/attach.vue | 5 +- src/views/resource/oss.vue | 9 +- src/views/resource/sms.vue | 9 +- src/views/system/authlock.vue | 4 +- src/views/system/client.vue | 5 +- src/views/system/dept.vue | 5 +- src/views/system/menu.vue | 12 +- src/views/system/param.vue | 2 +- src/views/system/post.vue | 5 +- src/views/system/tenant.vue | 5 +- src/views/system/tenantdatasource.vue | 7 +- src/views/system/tenantpackage.vue | 5 +- src/views/system/topmenu.vue | 5 +- src/views/system/user.vue | 2 +- src/views/system/userinfo.vue | 4 +- src/views/tool/datasource.vue | 7 +- src/views/transportCapacity/driver.vue | 145 +++- src/views/transportCapacity/ship.vue | 230 +++++- src/views/transportCapacity/vehicle.vue | 148 +++- src/views/util/demo/dict-classic.vue | 5 +- src/views/util/demo/dict-horizontal.vue | 5 +- src/views/util/demo/dict-vertical.vue | 5 +- src/views/util/form-detail.vue | 2 +- src/views/util/form.vue | 2 +- src/views/vehicle/accident-record.vue | 76 +- .../vehicle/annual-inspection-record.vue | 35 +- .../vehicle/credit-score-quantification.vue | 167 ++-- src/views/vehicle/customer-archive.vue | 164 +++- src/views/vehicle/etc-record.vue | 23 +- src/views/vehicle/insurance-record.vue | 286 +++++-- src/views/vehicle/maintenance-plan.vue | 216 +++++- src/views/vehicle/maintenance-record.vue | 221 ++++-- src/views/vehicle/mileage-record.vue | 187 ++++- src/views/vehicle/oil-electric-record.vue | 78 +- src/views/vehicle/other-expense-record.vue | 81 +- src/views/vehicle/tire-replacement-record.vue | 37 +- src/views/vehicle/transport-change-record.vue | 63 +- src/views/vehicle/violation-record.vue | 104 ++- src/views/work/claim.vue | 5 +- src/views/work/done.vue | 5 +- src/views/work/process/leave/detail.vue | 2 +- src/views/work/process/leave/handle.vue | 2 +- src/views/work/send.vue | 5 +- src/views/work/start.vue | 5 +- src/views/work/todo.vue | 5 +- 币种汇率管理-需求卡.md | 184 +++++ 模块需求卡生成规范.md | 23 +- 需求卡/货物类型管理需求卡.md | 348 +++++++++ 132 files changed, 7066 insertions(+), 1241 deletions(-) delete mode 100644 public/img/左侧背景放底部.png delete mode 100644 public/img/系统首页顶部背景图.png create mode 100644 src/api/base/cargo-type.js create mode 100644 src/components/vehicle-attachment-upload/main.vue create mode 100644 src/utils/coordinate.js create mode 100644 src/utils/dialog-form-label.js create mode 100644 src/utils/import-excel.js create mode 100644 src/utils/pagination.js create mode 100644 src/views/base/cargo-type.vue create mode 100644 币种汇率管理-需求卡.md create mode 100644 需求卡/货物类型管理需求卡.md diff --git a/AGENTS.md b/AGENTS.md index 1187987..8dcc271 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,9 +1,11 @@ # AGENTS.md + 本文件用于指导 Codex (Codex.ai/code) 在 Saber3 代码仓库中工作时的行为规范。 > 本规范适用于 Saber3 前端工程的所有开发任务,为强制性条款。除非用户显式豁免,任何条目都不得忽视或删减。 > > 作为 AI 助手参与本项目开发时,你必须: +> > - 每次输出前深度理解 BladeX 微服务架构体系、Saber3 前端工程结构和 Vue 3 技术栈特征 > - 当回答依赖外部知识时,先查询 Vue 3、Element Plus、Avue、Vite 等官方文档 > - 若需求含糊,先复述已知信息并列出关键澄清问题 @@ -20,18 +22,18 @@ ### 1.1 技术栈 -| 技术 | 版本 | 用途 | -| ------------------ | -------- | ------------------ | -| Vue | ^3.5.13 | 核心框架 | -| Element Plus | ^2.10.1 | UI 组件库 | -| @smallwei/avue | ^3.7.2 | 增强型 CRUD 组件库 | -| Vue Router | ^4.3.2 | 路由管理 | -| Vuex | ^4.1.0 | 状态管理 | -| Axios | ^1.8.3 | HTTP 客户端 | -| Vite | ^5.4.19 | 构建工具 | -| vue-i18n | ^11.1.3 | 国际化 | -| Sass | ^1.85.1 | CSS 预处理器 | -| crypto-js / sm-crypto | - | 加密(AES / SM2) | +| 技术 | 版本 | 用途 | +| --------------------- | ------- | ------------------ | +| Vue | ^3.5.13 | 核心框架 | +| Element Plus | ^2.10.1 | UI 组件库 | +| @smallwei/avue | ^3.7.2 | 增强型 CRUD 组件库 | +| Vue Router | ^4.3.2 | 路由管理 | +| Vuex | ^4.1.0 | 状态管理 | +| Axios | ^1.8.3 | HTTP 客户端 | +| Vite | ^5.4.19 | 构建工具 | +| vue-i18n | ^11.1.3 | 国际化 | +| Sass | ^1.85.1 | CSS 预处理器 | +| crypto-js / sm-crypto | - | 加密(AES / SM2) | --- @@ -91,27 +93,36 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 ` - 命名约定:列表 `getList(current, size, params)`、详情 `getDetail(id)`、新增 `add(row)`、更新 `update(row)`、删除 `remove(ids)`、树形 `getXxxTree()` - 后端微服务前缀:`/blade-system/`、`/blade-resource/`、`/blade-flow/`、`/blade-desk/`、`/blade-log/`、`/blade-develop/` -### 3.4 认证机制 +### 3.4 批量导入失败文件下载规范 + +- 所有批量导入功能如果存在部分数据无法导入、校验失败或后端处理异常,前端必须支持自动下载后端返回的导入失败 Excel。 +- 失败 Excel 的字段顺序必须与原导入模板保持一致,并在最后一列追加“导入失败原因”。 +- 前端上传接口需支持 `blob` 响应;Avue 默认上传无法可靠处理文件流时,应使用 `httpRequest` 或独立 API 方法自定义上传。 +- 前端需根据响应 `content-type` 或 Blob 类型区分 JSON 成功响应与 Excel 文件流:成功时提示并刷新列表,失败文件流时下载失败明细并提示“部分数据导入失败,已下载失败明细”。 +- 批量导入失败明细文件命名统一包含业务名称、`导入失败明细` 和时间戳,例如 `货物类型导入失败明细YYYY-MM-DD HH:mm:ss.xlsx`。 +- 批量导入的前端预校验与后端导入校验必须与新增、编辑表单校验保持一致,包括必填、长度、格式、枚举范围、父子级联关系和金额/日期等业务规则;新增、编辑校验调整时,必须同步更新导入校验。 + +### 3.5 认证机制 - OAuth2:`Basic` 头传递 `clientId:clientSecret`(Base64 编码) - Token:请求头 `Blade-Auth: bearer {token}`,支持 AES 加密模式 - 存储:`saber3-access-token` / `saber3-refresh-token`(通过 `utils/auth.js` 管理) - 401 自动刷新 Token,并发请求排队等待;登录密码使用 SM2 国密加密 -### 3.5 路由系统 +### 3.6 路由系统 - 静态路由:`router/page/` + `router/views/` - 动态路由:`avue-router.js` 将后端菜单数据转换为 Vue Router 路由 - 多级路由自动扁平化为二级,支持 keep-alive 跨层级缓存 - 外部链接自动转换为 iframe 路由,支持 Token 透传 -### 3.6 权限控制 +### 3.7 权限控制 - 路由守卫:`permission.js` 控制登录态、锁屏、标签页 - 按钮权限:`store.getters.permission`,格式 `{module}_{action}`(如 `dict_add`) - 管理员判断:`userInfo.authority.includes('admin')` -### 3.7 多租户 +### 3.8 多租户 通过 `website.tenantMode` 控制开关,管理组租户编号 `000000`,后端自动通过请求头传递租户信息。 @@ -124,6 +135,7 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 ` 项目同时支持 **Options API**(主流,绝大多数现有页面)和 **Composition API**(新组件可选)。 **选择原则**: + - 修改现有页面:保持该页面原有风格,不混用 - 新建 CRUD 页面:调用 `avue-design` Skill 生成,或参考现有页面手动编写 - 新建复杂交互页面:可使用 Composition API + ` + + diff --git a/src/config/website.js b/src/config/website.js index c3d1bcc..ac5bb96 100644 --- a/src/config/website.js +++ b/src/config/website.js @@ -5,7 +5,7 @@ export default { title: '运输板块数字化管理平台', logo: 'X', key: 'saber', //配置主键,目前用于存储 - indexTitle: 'TMS物流运输管理系统', + indexTitle: '运输板块数字化管理平台', clientId: 'saber3', // 客户端id clientSecret: 'saber3_secret', // 客户端密钥 tenantMode: true, // 是否开启租户模式 @@ -53,7 +53,7 @@ export default { //水印配置 watermark: { mode: false, - text: 'TMS物流运输管理系统', + text: '运输板块数字化管理平台', }, //oauth2配置 oauth2: { diff --git a/src/lang/zh.js b/src/lang/zh.js index a20c5d0..836bbfa 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -1,5 +1,5 @@ export default { - title: 'TMS物流运输管理系统', + title: '运输板块数字化管理平台', confirmTip: '提示', logoutTip: '退出系统, 是否继续?', submitText: '确定', @@ -79,7 +79,7 @@ export default { }, login: { title: '登录 ', - info: 'TMS物流运输管理系统', + info: '运输板块数字化管理平台', tenantId: '请输入租户ID', name: '请输入姓名', username: '请输入账号', diff --git a/src/main.js b/src/main.js index a9fd7fa..f272a6b 100644 --- a/src/main.js +++ b/src/main.js @@ -13,6 +13,8 @@ import '@smallwei/avue/lib/index.css'; import avueUeditor from 'avue-plugin-ueditor'; import crudCommon from '@/mixins/crud.js'; import { getScreen, findColumn } from './utils/util'; +import { setupPaginationEnhancer } from './utils/pagination'; +import { setupDialogFormLabelAlign } from './utils/dialog-form-label'; import './permission'; import error from './error'; import App from './App.vue'; @@ -28,6 +30,7 @@ import cronEditor from './components/cron-editor/main.vue'; import basicBlock from './components/basic-block/main.vue'; import basicContainer from './components/basic-container/main.vue'; import emptyPagination from './components/empty-pagination/main.vue'; +import vehicleAttachmentUpload from './components/vehicle-attachment-upload/main.vue'; import thirdRegister from './components/third-register/main.vue'; import flowDesign from './components/flow-design/main.vue'; import flowDesignStep from './components/flow-design-step/main.vue'; @@ -47,6 +50,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component('basicContainer', basicContainer); app.component('basicBlock', basicBlock); app.component('emptyPagination', emptyPagination); +app.component('vehicleAttachmentUpload', vehicleAttachmentUpload); app.component('highlight', highlight); app.component('codeEditor', codeEditor); app.component('cronEditor', cronEditor); @@ -72,6 +76,16 @@ app.use(ElementPlus, { app.use(Avue, { axios, calcHeight: 10, + crudOption: { + searchIcon: true, + searchIndex: 8, + searchLabelWidth: 160, + searchMenuSpan: 24, + searchMenuPosition: 'right', + menuWidth: 220, + }, + labelPosition: 'right', + labelWidth: 'auto', locale: language, i18n: (key, options) => i18n.global.t(key, options), }); @@ -81,3 +95,5 @@ app.use(VueClipboard, { appendToBody: true, // 这可以帮助解决一些更复杂的使用场景下的问题 }); app.mount('#app'); +setupPaginationEnhancer(); +setupDialogFormLabelAlign(); diff --git a/src/option/base/common-address.js b/src/option/base/common-address.js index 44be9ca..013062f 100644 --- a/src/option/base/common-address.js +++ b/src/option/base/common-address.js @@ -11,7 +11,10 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ dialogWidth: 980, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, indexLabel: '序号', @@ -83,16 +86,14 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ { label: '经度', prop: 'longitude', - type: 'number', - precision: 6, + formslot: true, minWidth: 120, rules: [{ validator: validateLongitude, trigger: 'blur' }], }, { label: '纬度', prop: 'latitude', - type: 'number', - precision: 6, + formslot: true, minWidth: 120, rules: [{ validator: validateLatitude, trigger: 'blur' }], }, diff --git a/src/option/job/jobinfo.js b/src/option/job/jobinfo.js index b4de472..7f7f04b 100644 --- a/src/option/job/jobinfo.js +++ b/src/option/job/jobinfo.js @@ -120,13 +120,16 @@ export default { calcHeight: 30, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, grid: true, - labelWidth: 180, + labelWidth: 'auto', menuWidth: 350, dialogWidth: 1200, dialogClickModal: false, diff --git a/src/option/job/jobserver.js b/src/option/job/jobserver.js index 27914be..13c495e 100644 --- a/src/option/job/jobserver.js +++ b/src/option/job/jobserver.js @@ -3,13 +3,16 @@ export default { calcHeight: 30, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, grid: true, - labelWidth: 100, + labelWidth: 'auto', menuWidth: 350, dialogClickModal: false, column: [ diff --git a/src/option/system/authlock.js b/src/option/system/authlock.js index 1c8601c..3642e59 100644 --- a/src/option/system/authlock.js +++ b/src/option/system/authlock.js @@ -12,7 +12,10 @@ export const LOCK_STATUS_DIC = [ export const authLockOption = { tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, addBtn: false, diff --git a/src/option/system/authlog.js b/src/option/system/authlog.js index af3456f..4d35c4d 100644 --- a/src/option/system/authlog.js +++ b/src/option/system/authlog.js @@ -10,7 +10,10 @@ export const GRANT_TYPE_DIC = [ export const authLogOption = { tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, addBtn: false, diff --git a/src/option/system/dict.js b/src/option/system/dict.js index aac2d8a..d74e0ab 100644 --- a/src/option/system/dict.js +++ b/src/option/system/dict.js @@ -3,7 +3,10 @@ export const optionParent = { calcHeight: 32, tip: false, searchShow: true, - searchMenuSpan: 10, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, @@ -92,7 +95,10 @@ export const optionChild = { calcHeight: 95, tip: false, searchShow: true, - searchMenuSpan: 10, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', tree: true, border: true, index: true, @@ -105,8 +111,8 @@ export const optionChild = { { label: '字典编号', prop: 'code', - addDisabled: true, - editDisabled: true, + addDisplay: false, + editDisplay: false, search: true, span: 24, rules: [ diff --git a/src/option/system/dictbiz.js b/src/option/system/dictbiz.js index 18a884b..e5a07ea 100644 --- a/src/option/system/dictbiz.js +++ b/src/option/system/dictbiz.js @@ -3,7 +3,10 @@ export const optionParent = { calcHeight: 32, tip: false, searchShow: true, - searchMenuSpan: 10, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, @@ -93,7 +96,10 @@ export const optionChild = { calcHeight: 95, tip: false, searchShow: true, - searchMenuSpan: 10, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', tree: true, border: true, index: true, @@ -106,8 +112,8 @@ export const optionChild = { { label: '字典编号', prop: 'code', - addDisabled: true, - editDisabled: true, + addDisplay: false, + editDisplay: false, search: true, span: 24, rules: [ diff --git a/src/option/system/user.js b/src/option/system/user.js index 89ac5c9..c881bb9 100644 --- a/src/option/system/user.js +++ b/src/option/system/user.js @@ -23,7 +23,10 @@ export const userOption = safe => { calcHeight: 150, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, @@ -353,13 +356,16 @@ export const userOption = safe => { export const platformOption = { tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, viewBtn: true, dialogClickModal: false, - menuWidth: 120, + menuWidth: 220, editBtnText: '配置', column: [ { @@ -475,7 +481,7 @@ export const excelOption = { export const platformFormOption = { submitBtn: false, emptyBtn: false, - labelWidth: 100, + labelWidth: 'auto', column: [ { label: '用户账号', diff --git a/src/option/tool/code.js b/src/option/tool/code.js index 2447102..f04857e 100644 --- a/src/option/tool/code.js +++ b/src/option/tool/code.js @@ -6,11 +6,14 @@ export const codeOption = { dialogWidth: 900, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, - labelWidth: 120, + labelWidth: 'auto', menuWidth: 350, viewBtn: true, dialogClickModal: false, @@ -376,7 +379,7 @@ export const codeOption = { }; export const genOption = { - labelWidth: 120, + labelWidth: 'auto', column: [ { label: '上级菜单', diff --git a/src/option/tool/codesetting.js b/src/option/tool/codesetting.js index 2d53d2c..4cc2082 100644 --- a/src/option/tool/codesetting.js +++ b/src/option/tool/codesetting.js @@ -3,14 +3,17 @@ export default { calcHeight: 50, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, grid: true, selection: true, - labelWidth: 120, - searchLabelWidth: 100, + labelWidth: 'auto', + searchLabelWidth: 160, menuWidth: 320, dialogClickModal: false, column: [ diff --git a/src/option/tool/formsetting.js b/src/option/tool/formsetting.js index 9fb0b62..32c793f 100644 --- a/src/option/tool/formsetting.js +++ b/src/option/tool/formsetting.js @@ -3,14 +3,17 @@ export default { calcHeight: 50, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, grid: true, selection: true, - labelWidth: 120, - searchLabelWidth: 100, + labelWidth: 'auto', + searchLabelWidth: 160, menuWidth: 320, dialogWidth: 500, dialogClickModal: false, diff --git a/src/option/transportCapacity/driver.js b/src/option/transportCapacity/driver.js index 1d04f17..0e73b34 100644 --- a/src/option/transportCapacity/driver.js +++ b/src/option/transportCapacity/driver.js @@ -3,7 +3,10 @@ export const option = { calcHeight: 32, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, @@ -71,7 +74,17 @@ export const option = { { label: '所属组织', prop: 'organizationName', + type: 'cascader', search: true, + emitPath: false, + checkStrictly: true, + filterable: true, + dicData: [], + props: { + label: 'label', + value: 'value', + children: 'children', + }, width: 140, }, { diff --git a/src/option/transportCapacity/transport-ship.js b/src/option/transportCapacity/transport-ship.js index 167eb16..74dc53c 100644 --- a/src/option/transportCapacity/transport-ship.js +++ b/src/option/transportCapacity/transport-ship.js @@ -3,7 +3,10 @@ export const option = { calcHeight: 32, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, diff --git a/src/option/transportCapacity/transport-vehicle.js b/src/option/transportCapacity/transport-vehicle.js index 572b315..5523a36 100644 --- a/src/option/transportCapacity/transport-vehicle.js +++ b/src/option/transportCapacity/transport-vehicle.js @@ -3,7 +3,10 @@ export const option = { calcHeight: 32, tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, selection: true, diff --git a/src/option/vehicle/accident-record.js b/src/option/vehicle/accident-record.js index d7ebc04..8b55c90 100644 --- a/src/option/vehicle/accident-record.js +++ b/src/option/vehicle/accident-record.js @@ -33,21 +33,26 @@ export const accidentResponsibilityDic = [ export const option = { height: 'auto', calcHeight: 32, - dialogWidth: 1050, - labelPosition: 'top', + dialogWidth: 960, + labelPosition: 'right', + labelWidth: 'auto', + searchLabelWidth: 160, tip: false, searchBtnText: '查询', emptyBtnText: '重置', saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, column: [ { label: '车船类型', @@ -57,6 +62,7 @@ export const option = { dicData: vehicleTypeDic, value: '车辆', search: true, + span: 24, rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }], }, { @@ -66,6 +72,8 @@ export const option = { formslot: true, search: true, minWidth: 140, + span: 12, + placeholder: '输入车牌号/船号查询选择', rules: [ { required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, @@ -78,6 +86,8 @@ export const option = { format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', minWidth: 140, + span: 12, + placeholder: '请选择,日期选择器', rules: [{ required: true, message: '请选择事故发生日期', trigger: 'click' }], }, { @@ -85,6 +95,8 @@ export const option = { prop: 'accidentLocation', minWidth: 200, overHidden: true, + span: 12, + placeholder: '请输入,100字内', rules: [{ max: 100, message: '最多 100 个字符', trigger: 'blur' }], }, { @@ -94,6 +106,8 @@ export const option = { dicData: accidentNatureDic, search: true, minWidth: 120, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择事故性质', trigger: 'change' }], }, { @@ -103,6 +117,8 @@ export const option = { dicData: accidentResponsibilityDic, search: true, minWidth: 120, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择事故责任', trigger: 'change' }], }, { @@ -112,6 +128,8 @@ export const option = { precision: 2, append: '元', minWidth: 140, + span: 12, + placeholder: '请输入', rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, { @@ -121,17 +139,20 @@ export const option = { precision: 2, append: '元', minWidth: 140, + span: 12, + placeholder: '请输入', rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, { - label: '事故原因', + label: '事故原因及损坏情况', prop: 'accidentReasonDamage', type: 'textarea', - minRows: 3, + minRows: 4, span: 24, search: true, minWidth: 220, overHidden: true, + placeholder: '请输入,500字以内', rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }], }, { @@ -142,24 +163,16 @@ export const option = { span: 24, minWidth: 180, overHidden: true, + placeholder: '请输入,200字以内', rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], }, { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '事故评定开始日期', @@ -203,7 +216,6 @@ export const option = { type: 'date', format: 'YYYY-MM-DD 00:00:00', valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -215,7 +227,6 @@ export const option = { type: 'date', format: 'YYYY-MM-DD 23:59:59', valueFormat: 'YYYY-MM-DD 23:59:59', - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -261,6 +272,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/annual-inspection-record.js b/src/option/vehicle/annual-inspection-record.js index f94bdf2..7e43d88 100644 --- a/src/option/vehicle/annual-inspection-record.js +++ b/src/option/vehicle/annual-inspection-record.js @@ -32,21 +32,26 @@ export const shipInspectionTypeDic = [ export const option = { height: 'auto', calcHeight: 32, - dialogWidth: 1050, - labelPosition: 'top', + dialogWidth: 960, + labelPosition: 'right', + labelWidth: 'auto', + searchLabelWidth: 160, tip: false, searchBtnText: '查询', emptyBtnText: '重置', saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, column: [ { label: '车船类型', @@ -56,6 +61,7 @@ export const option = { dicData: vehicleTypeDic, value: '车辆', search: true, + span: 24, rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }], }, { @@ -65,6 +71,8 @@ export const option = { formslot: true, search: true, minWidth: 140, + span: 12, + placeholder: '输入车牌号/船号查询选择', rules: [ { required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, @@ -77,6 +85,8 @@ export const option = { format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', minWidth: 140, + span: 12, + placeholder: '请选择,日期选择器', rules: [{ required: true, message: '请选择检测评定日期', trigger: 'click' }], }, { @@ -86,6 +96,8 @@ export const option = { format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', minWidth: 140, + span: 12, + placeholder: '请输入', rules: [{ required: true, message: '请选择有效期截止日', trigger: 'click' }], }, { @@ -94,6 +106,8 @@ export const option = { type: 'select', dicData: vehicleTechnicalLevelDic, minWidth: 130, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择车辆技术等级', trigger: 'change' }], }, { @@ -103,18 +117,24 @@ export const option = { dicData: shipInspectionTypeDic, display: false, minWidth: 130, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择船舶检验类型', trigger: 'change' }], }, { label: '客车类型及等级', prop: 'passengerTypeLevel', minWidth: 150, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, { label: '检测评定单位', prop: 'inspectionUnit', minWidth: 160, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, { @@ -124,6 +144,8 @@ export const option = { precision: 2, append: '元', minWidth: 100, + span: 12, + placeholder: '请输入', rules: [ { required: true, message: '请输入费用', trigger: 'blur' }, { validator: validateNonNegative, trigger: 'blur' }, @@ -133,6 +155,8 @@ export const option = { label: '评定(复核)单位', prop: 'assessmentUnit', minWidth: 160, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, { @@ -143,24 +167,16 @@ export const option = { span: 24, minWidth: 180, overHidden: true, + placeholder: '请输入,200字以内', rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], }, { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '检测评定开始日期', @@ -204,7 +220,6 @@ export const option = { type: 'date', format: 'YYYY-MM-DD 00:00:00', valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -216,7 +231,6 @@ export const option = { type: 'date', format: 'YYYY-MM-DD 23:59:59', valueFormat: 'YYYY-MM-DD 23:59:59', - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -262,6 +276,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/etc-record.js b/src/option/vehicle/etc-record.js index 7839b40..9c4158f 100644 --- a/src/option/vehicle/etc-record.js +++ b/src/option/vehicle/etc-record.js @@ -22,17 +22,26 @@ const maskEtcCardNo = value => { export const option = { height: 'auto', calcHeight: 32, - dialogWidth: 980, - labelPosition: 'top', + dialogWidth: 960, + labelPosition: 'right', + labelWidth: 'auto', + searchLabelWidth: 160, tip: false, + searchBtnText: '查询', + emptyBtnText: '重置', + saveBtnText: '提交', + updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, menuFixed: 'right', column: [ { @@ -42,22 +51,13 @@ export const option = { formslot: true, search: true, minWidth: 140, + span: 12, + placeholder: '输入车牌号模糊查询选择', rules: [ { required: true, message: '请输入车牌号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, ], }, - { - label: 'ETC卡号', - prop: 'etcCardNo', - formatter: row => maskEtcCardNo(row.etcCardNo), - search: true, - minWidth: 220, - rules: [ - { required: true, message: '请输入ETC卡号', trigger: 'blur' }, - { max: 30, message: '最多 30 个字符', trigger: 'blur' }, - ], - }, { label: '入口时间', prop: 'entryTime', @@ -65,6 +65,21 @@ export const option = { format: 'YYYY-MM-DD HH:mm', valueFormat: 'YYYY-MM-DD HH:mm:ss', minWidth: 170, + span: 12, + placeholder: '请选择,日期选择器', + }, + { + label: 'ETC卡号', + prop: 'etcCardNo', + formatter: row => maskEtcCardNo(row.etcCardNo), + search: true, + minWidth: 220, + span: 12, + placeholder: '请输入', + rules: [ + { required: true, message: '请输入ETC卡号', trigger: 'blur' }, + { max: 30, message: '最多 30 个字符', trigger: 'blur' }, + ], }, { label: '出口时间', @@ -73,18 +88,38 @@ export const option = { format: 'YYYY-MM-DD HH:mm', valueFormat: 'YYYY-MM-DD HH:mm:ss', minWidth: 170, + span: 12, + placeholder: '请选择,日期选择器', rules: [{ required: true, message: '请选择出口时间', trigger: 'click' }], }, { label: '入口站', prop: 'entryStation', minWidth: 150, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, + { + label: '交易金额', + prop: 'transactionAmount', + type: 'number', + precision: 2, + append: '元', + minWidth: 130, + span: 12, + placeholder: '请输入', + rules: [ + { required: true, message: '请输入交易金额', trigger: 'blur' }, + { validator: validateNonNegative, trigger: 'blur' }, + ], + }, { label: '出口站', prop: 'exitStation', minWidth: 150, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, { @@ -94,18 +129,7 @@ export const option = { minWidth: 120, addDisplay: false, editDisplay: false, - }, - { - label: '交易金额', - prop: 'transactionAmount', - type: 'number', - precision: 2, - append: '元', - minWidth: 130, - rules: [ - { required: true, message: '请输入交易金额', trigger: 'blur' }, - { validator: validateNonNegative, trigger: 'blur' }, - ], + viewDisplay: false, }, { label: '备注', @@ -115,24 +139,16 @@ export const option = { span: 24, minWidth: 180, overHidden: true, + placeholder: '请输入,200字以内', rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], }, { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '组织', @@ -185,6 +201,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/insurance-record.js b/src/option/vehicle/insurance-record.js index ff8b9cf..8b0a0c2 100644 --- a/src/option/vehicle/insurance-record.js +++ b/src/option/vehicle/insurance-record.js @@ -30,24 +30,26 @@ export const ocrTemplateDic = [ ]; export const option = { - title: '保险记录(OCR)', height: 'auto', calcHeight: 32, dialogWidth: 1100, - labelPosition: 'top', + labelPosition: 'right', tip: false, searchBtnText: '查询', emptyBtnText: '重置', saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, column: [ { label: '车船类型', @@ -243,6 +245,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/mileage-record.js b/src/option/vehicle/mileage-record.js index 15de4f1..76b388d 100644 --- a/src/option/vehicle/mileage-record.js +++ b/src/option/vehicle/mileage-record.js @@ -12,71 +12,109 @@ const validateNonNegative = (rule, value, callback) => { } }; +export const vehicleTypeDic = [ + { label: '车辆', value: '车辆' }, + { label: '船舶', value: '船舶' }, +]; + export const option = { - title: '里程记录(无船)', height: 'auto', calcHeight: 32, dialogWidth: 980, - labelPosition: 'top', + labelPosition: 'right', tip: false, searchBtnText: '查询', emptyBtnText: '重置', saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, menuFixed: 'right', column: [ { - label: '车牌号', + label: '车船类型', + prop: 'vehicleType', + type: 'radio', + dicData: vehicleTypeDic, + value: '车辆', + search: true, + minWidth: 110, + rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }], + }, + { + label: '车牌号/船号', prop: 'vehicleNo', slot: true, formslot: true, search: true, minWidth: 130, rules: [ - { required: true, message: '请输入车牌号', trigger: 'blur' }, + { required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, ], }, { - label: '上月统计日里程表示值(km)', + label: '上月统计里程数', prop: 'previousMonthMileage', type: 'number', precision: 2, + append: '公里', minWidth: 210, + slot: true, rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, { - label: '本月统计日里程表示值(km)', + label: '本月统计里程数', prop: 'currentMonthMileage', type: 'number', precision: 2, + append: '公里', minWidth: 210, + slot: true, rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, { - label: '本月行驶里程(km)', + label: '本月行驶里程数', prop: 'monthlyMileage', type: 'number', precision: 2, + append: '公里', minWidth: 170, + slot: true, rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, { - label: '累计行驶里程(km)', + label: '累计行驶里程数', prop: 'totalMileage', type: 'number', precision: 2, + append: '公里', minWidth: 170, + slot: true, rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, + { + label: '里程单位', + prop: 'mileageUnit', + type: 'select', + dicData: [ + { label: '公里', value: '公里' }, + { label: '海里', value: '海里' }, + ], + value: '公里', + hide: true, + display: false, + search: false, + }, { label: '备注', prop: 'remark', @@ -90,37 +128,28 @@ export const option = { { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { - label: '累计行驶里程开始值', + label: '累计行驶里程', prop: 'totalMileageStart', type: 'number', precision: 2, search: true, + searchSpan: 8, hide: true, addDisplay: false, editDisplay: false, viewDisplay: false, }, { - label: '累计行驶里程结束值', + label: '累计行驶里程数结束值', prop: 'totalMileageEnd', type: 'number', precision: 2, - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -202,6 +231,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/oil-electric-record.js b/src/option/vehicle/oil-electric-record.js index f02b113..f778c71 100644 --- a/src/option/vehicle/oil-electric-record.js +++ b/src/option/vehicle/oil-electric-record.js @@ -26,16 +26,19 @@ export const option = { height: 'auto', calcHeight: 32, dialogWidth: 980, - labelPosition: 'top', + labelPosition: 'right', tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, menuFixed: 'right', column: [ { @@ -85,6 +88,7 @@ export const option = { formslot: true, search: true, minWidth: 150, + placeholder: '输入车牌号/船号查询选择', rules: [ { required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, @@ -159,19 +163,10 @@ export const option = { { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '交易开始时间', @@ -237,7 +232,6 @@ export const option = { type: 'date', format: 'YYYY-MM-DD 00:00:00', valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -249,7 +243,6 @@ export const option = { type: 'date', format: 'YYYY-MM-DD 23:59:59', valueFormat: 'YYYY-MM-DD 23:59:59', - search: true, hide: true, addDisplay: false, editDisplay: false, @@ -295,6 +288,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/other-expense-record.js b/src/option/vehicle/other-expense-record.js index b4f5548..3837963 100644 --- a/src/option/vehicle/other-expense-record.js +++ b/src/option/vehicle/other-expense-record.js @@ -30,37 +30,28 @@ export const expenseTypeDic = [ export const option = { height: 'auto', calcHeight: 32, - dialogWidth: 980, - labelPosition: 'top', + dialogWidth: 960, + labelPosition: 'right', + labelWidth: 'auto', + searchLabelWidth: 160, tip: false, + searchBtnText: '查询', + emptyBtnText: '重置', + saveBtnText: '提交', + updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, menuFixed: 'right', column: [ - { - label: '费用日期', - prop: 'expenseDate', - type: 'date', - format: 'YYYY-MM-DD', - valueFormat: 'YYYY-MM-DD', - minWidth: 140, - rules: [{ required: true, message: '请选择费用日期', trigger: 'click' }], - }, - { - label: '其他费用类型', - prop: 'expenseType', - type: 'select', - dicData: expenseTypeDic, - search: true, - minWidth: 150, - rules: [{ required: true, message: '请选择其他费用类型', trigger: 'change' }], - }, { label: '车船类型', prop: 'vehicleType', @@ -69,6 +60,7 @@ export const option = { value: '车辆', search: true, minWidth: 110, + span: 24, rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }], }, { @@ -78,11 +70,49 @@ export const option = { formslot: true, search: true, minWidth: 150, + span: 12, + placeholder: '输入车牌号/船号查询选择', rules: [ { required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, ], }, + { + label: '费用日期', + prop: 'expenseDate', + type: 'date', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + minWidth: 140, + span: 12, + placeholder: '请选择,日期选择器', + rules: [{ required: true, message: '请选择费用日期', trigger: 'click' }], + }, + { + label: '费用类型', + prop: 'expenseType', + type: 'select', + dicData: expenseTypeDic, + search: true, + minWidth: 150, + span: 12, + placeholder: '请选择', + rules: [{ required: true, message: '请选择费用类型', trigger: 'change' }], + }, + { + label: '金额', + prop: 'amount', + type: 'number', + precision: 2, + append: '元', + minWidth: 120, + span: 12, + placeholder: '请输入', + rules: [ + { required: true, message: '请输入金额', trigger: 'blur' }, + { validator: validateNonNegative, trigger: 'blur' }, + ], + }, { label: '数据来源', prop: 'dataSource', @@ -90,18 +120,7 @@ export const option = { minWidth: 120, addDisplay: false, editDisplay: false, - }, - { - label: '金额', - prop: 'amount', - type: 'number', - precision: 2, - append: '元', - minWidth: 120, - rules: [ - { required: true, message: '请输入金额', trigger: 'blur' }, - { validator: validateNonNegative, trigger: 'blur' }, - ], + viewDisplay: false, }, { label: '备注', @@ -111,24 +130,16 @@ export const option = { span: 24, minWidth: 180, overHidden: true, + placeholder: '请输入,200字以内', rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], }, { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '费用日期', @@ -194,6 +205,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/tire-replacement-record.js b/src/option/vehicle/tire-replacement-record.js index 352a890..ad8f39f 100644 --- a/src/option/vehicle/tire-replacement-record.js +++ b/src/option/vehicle/tire-replacement-record.js @@ -21,24 +21,28 @@ const validatePositiveInteger = (rule, value, callback) => { }; export const option = { - title: '换胎记录(无船)', height: 'auto', calcHeight: 32, - dialogWidth: 980, - labelPosition: 'top', + dialogWidth: 960, + labelPosition: 'right', + labelWidth: 'auto', + searchLabelWidth: 160, tip: false, searchBtnText: '查询', emptyBtnText: '重置', saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, column: [ { label: '车牌号', @@ -47,6 +51,8 @@ export const option = { formslot: true, search: true, minWidth: 130, + span: 12, + placeholder: '输入车牌号查询选择', rules: [ { required: true, message: '请输入车牌号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, @@ -56,6 +62,8 @@ export const option = { label: '处理人', prop: 'handler', minWidth: 120, + span: 12, + placeholder: '请输入', rules: [{ max: 20, message: '最多 20 个字符', trigger: 'blur' }], }, { @@ -65,12 +73,16 @@ export const option = { format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', minWidth: 130, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择换胎时间', trigger: 'click' }], }, { label: '轮胎品牌', prop: 'tireBrand', minWidth: 140, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, { @@ -79,6 +91,8 @@ export const option = { type: 'number', precision: 0, minWidth: 110, + span: 12, + placeholder: '请输入', rules: [{ validator: validatePositiveInteger, trigger: 'blur' }], }, { @@ -88,6 +102,8 @@ export const option = { precision: 2, append: '元', minWidth: 120, + span: 12, + placeholder: '请输入', rules: [ { required: true, message: '请输入换胎费用', trigger: 'blur' }, { validator: validateNonNegative, trigger: 'blur' }, @@ -98,6 +114,8 @@ export const option = { prop: 'replacementDescription', minWidth: 180, overHidden: true, + span: 24, + placeholder: '请输入', rules: [{ max: 200, message: '最多 200 个字符', trigger: 'blur' }], }, { @@ -108,24 +126,16 @@ export const option = { span: 24, minWidth: 180, overHidden: true, + placeholder: '请输入', rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }], }, { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '创建时间', @@ -203,6 +213,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/transport-change-record.js b/src/option/vehicle/transport-change-record.js index 0fa65a1..e517913 100644 --- a/src/option/vehicle/transport-change-record.js +++ b/src/option/vehicle/transport-change-record.js @@ -17,16 +17,19 @@ export const option = { height: 'auto', calcHeight: 32, dialogWidth: 980, - labelPosition: 'top', + labelPosition: 'right', tip: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, menuFixed: 'right', column: [ { @@ -46,6 +49,7 @@ export const option = { formslot: true, search: true, minWidth: 140, + placeholder: '输入车牌号/船号模糊查询选择', rules: [{ max: 30, message: '最多 30 个字符', trigger: 'blur' }], }, { @@ -83,19 +87,10 @@ export const option = { { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '创建时间', @@ -173,6 +168,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/option/vehicle/violation-record.js b/src/option/vehicle/violation-record.js index 6972aec..ac593c4 100644 --- a/src/option/vehicle/violation-record.js +++ b/src/option/vehicle/violation-record.js @@ -41,21 +41,26 @@ export const processStatusDic = [ export const option = { height: 'auto', calcHeight: 32, - dialogWidth: 1100, - labelPosition: 'top', + dialogWidth: 960, + labelPosition: 'right', + labelWidth: 'auto', + searchLabelWidth: 160, tip: false, searchBtnText: '查询', emptyBtnText: '重置', saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 24, + searchIcon: true, + searchIndex: 8, + searchMenuPosition: 'right', border: true, index: true, viewBtn: true, selection: true, dialogClickModal: false, - menuWidth: 180, + menuWidth: 220, column: [ { label: '车船类型', @@ -65,6 +70,7 @@ export const option = { dicData: vehicleTypeDic, value: '车辆', search: true, + span: 24, rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }], }, { @@ -74,6 +80,8 @@ export const option = { formslot: true, search: true, minWidth: 140, + span: 12, + placeholder: '输入车牌号/船号查询选择', rules: [ { required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { max: 30, message: '最多 30 个字符', trigger: 'blur' }, @@ -85,6 +93,8 @@ export const option = { formslot: true, search: true, minWidth: 120, + span: 12, + placeholder: '请输入', rules: [ { required: true, message: '请输入驾驶人/船长', trigger: 'blur' }, { max: 20, message: '最多 20 个字符', trigger: 'blur' }, @@ -96,6 +106,8 @@ export const option = { type: 'select', dicData: violationTypeDic, minWidth: 120, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择类型', trigger: 'change' }], }, { @@ -104,6 +116,8 @@ export const option = { minWidth: 180, overHidden: true, display: false, + span: 12, + placeholder: '请输入', rules: [ { required: true, message: '请输入事项', trigger: 'blur' }, { max: 100, message: '最多 100 个字符', trigger: 'blur' }, @@ -116,6 +130,8 @@ export const option = { format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', minWidth: 170, + span: 12, + placeholder: '请选择', rules: [{ required: true, message: '请选择时间', trigger: 'click' }], }, { @@ -123,6 +139,8 @@ export const option = { prop: 'location', minWidth: 180, overHidden: true, + span: 12, + placeholder: '请输入', rules: [ { required: true, message: '请输入地点', trigger: 'blur' }, { max: 100, message: '最多 100 个字符', trigger: 'blur' }, @@ -135,6 +153,8 @@ export const option = { precision: 2, append: '元', minWidth: 100, + span: 12, + placeholder: '请输入', rules: [{ validator: validateNonNegative, trigger: 'blur' }], }, { @@ -143,12 +163,16 @@ export const option = { type: 'number', precision: 0, minWidth: 110, + span: 12, + placeholder: '请输入', rules: [{ validator: validateDeductPoints, trigger: 'blur' }], }, { label: '被罚单位', prop: 'penaltyUnit', minWidth: 150, + span: 12, + placeholder: '请输入', rules: [{ max: 50, message: '最多 50 个字符', trigger: 'blur' }], }, { @@ -160,6 +184,7 @@ export const option = { search: true, clearable: true, minWidth: 120, + span: 12, rules: [{ required: true, message: '请选择状态', trigger: 'change' }], }, { @@ -170,6 +195,7 @@ export const option = { span: 24, minWidth: 220, overHidden: true, + placeholder: '请输入', rules: [ { required: true, message: '请输入过程描述', trigger: 'blur' }, { max: 500, message: '最多 500 个字符', trigger: 'blur' }, @@ -183,24 +209,16 @@ export const option = { span: 24, minWidth: 220, overHidden: true, + placeholder: '请输入', rules: [{ max: 500, message: '最多 500 个字符', trigger: 'blur' }], }, { label: '附件', prop: 'attachments', - type: 'upload', - listType: 'text', - multiple: true, - accept: '.jpg,.jpeg,.png,.pdf', - propsHttp: { - res: 'data', - url: 'link', - name: 'name', - }, - action: '/blade-resource/oss/endpoint/put-file', span: 24, minWidth: 100, slot: true, + formslot: true, }, { label: '创建时间', @@ -278,6 +296,7 @@ export const option = { }; export const excelOption = { + labelPosition: 'right', submitBtn: false, emptyBtn: false, column: [ diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue index 9b7fa02..985a92b 100644 --- a/src/page/index/logo.vue +++ b/src/page/index/logo.vue @@ -30,12 +30,10 @@ export default { diff --git a/src/views/base/common-address.vue b/src/views/base/common-address.vue index f43933d..ce60353 100644 --- a/src/views/base/common-address.vue +++ b/src/views/base/common-address.vue @@ -133,6 +133,26 @@ + + + + { if (value === undefined || value === null || value === '') { callback(new Error('经度不能为空')); + } else if (!isCoordinateInput(value)) { + callback(new Error('经度最多保留6位小数')); } else if (Number(value) < -180 || Number(value) > 180) { callback(new Error('经度范围为 -180 到 180')); } else { @@ -199,6 +222,8 @@ export default { const validateLatitude = (rule, value, callback) => { if (value === undefined || value === null || value === '') { callback(new Error('纬度不能为空')); + } else if (!isCoordinateInput(value)) { + callback(new Error('纬度最多保留6位小数')); } else if (Number(value) < -90 || Number(value) > 90) { callback(new Error('纬度范围为 -90 到 90')); } else { @@ -319,6 +344,9 @@ export default { this.form.longitude = source.longitude; this.form.latitude = source.latitude; }, + handleCoordinateInput(prop, value) { + this.form[prop] = normalizeCoordinateInput(value); + }, clearTypeRelatedFields(siteCode = '') { this.form.sourceId = undefined; this.form.siteCode = siteCode; @@ -356,6 +384,8 @@ export default { detailAddress: String(row.detailAddress || '').trim(), regionCode: String(row.regionCode || '').trim(), regionName: String(row.regionName || '').trim(), + longitude: normalizeCoordinateInput(row.longitude), + latitude: normalizeCoordinateInput(row.latitude), contactName: String(row.contactName || '').trim(), contactPhone: String(row.contactPhone || '').trim(), remark: String(row.remark || '').trim(), @@ -400,6 +430,10 @@ export default { return false; } if (row.longitude !== undefined && row.longitude !== null && row.longitude !== '') { + if (!isCoordinateInput(row.longitude)) { + this.$message.warning('经度最多保留6位小数'); + return false; + } if (Number(row.longitude) < -180 || Number(row.longitude) > 180) { this.$message.warning('经度范围为 -180 到 180'); return false; @@ -407,6 +441,10 @@ export default { row.longitude = Number(row.longitude).toFixed(6); } if (row.latitude !== undefined && row.latitude !== null && row.latitude !== '') { + if (!isCoordinateInput(row.latitude)) { + this.$message.warning('纬度最多保留6位小数'); + return false; + } if (Number(row.latitude) < -90 || Number(row.latitude) > 90) { this.$message.warning('纬度范围为 -90 到 90'); return false; diff --git a/src/views/base/currency.vue b/src/views/base/currency.vue index 76fcf0d..2ed1f7d 100644 --- a/src/views/base/currency.vue +++ b/src/views/base/currency.vue @@ -90,7 +90,7 @@ - +