From f74c51cbb7a8e4ccd3d151efc6ce0ff0ce22e35b Mon Sep 17 00:00:00 2001 From: z Date: Wed, 10 Jan 2024 13:52:16 +0800 Subject: [PATCH] init --- package-lock.json | 20 +++ package.json | 1 + src/assets/css/common.scss | 6 +- src/assets/css/element.scss | 7 +- src/assets/js/asyncRouter.js | 41 +++++++ src/assets/js/constant.js | 2 +- src/assets/js/useListData.js | 7 +- src/components/layout/index.vue | 2 +- src/request/hazard_investigation.js | 6 + src/request/risk_control.js | 2 + .../inventory_management/batch_printing.vue | 34 +++++ .../components/inspection_route.vue | 45 +------ .../components/insurance_coverage_select.vue | 79 ++++++++++++ .../{qr_code.vue => list_qr_code.vue} | 0 .../components/part_qr_code.vue | 28 +++++ .../components/part_qr_code_dialog.vue | 34 +++++ .../inventory_management/index.vue | 49 ++++++-- .../insurance_coverage.vue | 113 +++++++++++++++++ .../inventory_management/part_qr_code.vue | 88 +++++++++++++ .../inventory_management/print.vue | 116 ++++++++++++++++++ 20 files changed, 616 insertions(+), 64 deletions(-) create mode 100644 src/views/hazard_investigation/inventory_management/batch_printing.vue create mode 100644 src/views/hazard_investigation/inventory_management/components/insurance_coverage_select.vue rename src/views/hazard_investigation/inventory_management/components/{qr_code.vue => list_qr_code.vue} (100%) create mode 100644 src/views/hazard_investigation/inventory_management/components/part_qr_code.vue create mode 100644 src/views/hazard_investigation/inventory_management/components/part_qr_code_dialog.vue create mode 100644 src/views/hazard_investigation/inventory_management/insurance_coverage.vue create mode 100644 src/views/hazard_investigation/inventory_management/part_qr_code.vue create mode 100644 src/views/hazard_investigation/inventory_management/print.vue diff --git a/package-lock.json b/package-lock.json index f20eba9..c24d045 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "throttle-debounce": "^5.0.0", "v-viewer": "^3.0.11", "vue": "^3.4.3", + "vue-draggable-plus": "^0.3.4", "vue-router": "^4.2.5", "vue3-pdfjs": "^0.1.6", "vue3-print-nb": "^0.1.4", @@ -1304,6 +1305,12 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/sortablejs": { + "version": "1.15.7", + "resolved": "https://registry.npmmirror.com/@types/sortablejs/-/sortablejs-1.15.7.tgz", + "integrity": "sha512-PvgWCx1Lbgm88FdQ6S7OGvLIjWS66mudKPlfdrWil0TjsO5zmoZmzoKiiwRShs1dwPgrlkr0N4ewuy0/+QUXYQ==", + "peer": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.16", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", @@ -5561,6 +5568,19 @@ } } }, + "node_modules/vue-draggable-plus": { + "version": "0.3.4", + "resolved": "https://registry.npmmirror.com/vue-draggable-plus/-/vue-draggable-plus-0.3.4.tgz", + "integrity": "sha512-3HyaQiJZLrhr6fdD66cS2O4HOsxyo8rfrdcvFctmsduRnBTMYwPsLmONN1WU7RGWHQoBBodt5l2PeRCvblgP3A==", + "peerDependencies": { + "@types/sortablejs": "^1.15.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/vue-eslint-parser": { "version": "9.3.2", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.2.tgz", diff --git a/package.json b/package.json index d7eb5c1..2433df9 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "throttle-debounce": "^5.0.0", "v-viewer": "^3.0.11", "vue": "^3.4.3", + "vue-draggable-plus": "^0.3.4", "vue-router": "^4.2.5", "vue3-pdfjs": "^0.1.6", "vue3-print-nb": "^0.1.4", diff --git a/src/assets/css/common.scss b/src/assets/css/common.scss index e5770b4..8952074 100644 --- a/src/assets/css/common.scss +++ b/src/assets/css/common.scss @@ -126,7 +126,7 @@ h1, h2, h3, h4, h5, h6 { font-size: revert; } -#app { +.layout-container { background-color: #030f2f; min-height: 100vh; background-image: url("/src/assets/images/public/bg.jpg"); @@ -288,7 +288,7 @@ div::-webkit-scrollbar-track { margin: 3mm; } -.page_break{ +.page_break { page-break-after: always; } @@ -296,6 +296,7 @@ div::-webkit-scrollbar-track { .el-descriptions__label.el-descriptions__cell.is-bordered-label { color: #000 !important; } + .el-descriptions { --el-text-color-primary: #000 !important; } @@ -308,6 +309,7 @@ div::-webkit-scrollbar-track { border-collapse: collapse; width: 100%; display: table; + font-size: 12px; td, th { border: 1px solid var(--el-border-color); diff --git a/src/assets/css/element.scss b/src/assets/css/element.scss index fa1f984..6321c2b 100644 --- a/src/assets/css/element.scss +++ b/src/assets/css/element.scss @@ -275,11 +275,6 @@ --el-border-color-light: var(--el-border-color); } -.el-divider__text { - font-size: 16px !important; - font-weight: 700 !important; -} - .el-dialog { background: transparent !important; --el-dialog-margin-top: 50px !important; @@ -336,6 +331,8 @@ } .el-divider__text { + font-size: 16px !important; + font-weight: 700 !important; background-color: var(--el-fill-color-blank) !important; color: var(--el-text-color-regular) !important; } diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js index ead626f..79d5e99 100644 --- a/src/assets/js/asyncRouter.js +++ b/src/assets/js/asyncRouter.js @@ -202,6 +202,47 @@ export default [ path: "", component: "hazard_investigation/inventory_management/index", }, + { + path: "/hazard_investigation/inventory_management/print", + meta: { + title: "打印", + activeMenu: "/hazard_investigation/inventory_management", + }, + component: "hazard_investigation/inventory_management/print", + }, + { + path: "/hazard_investigation/inventory_management/part_qr_code", + meta: { + title: "部位二维码", + activeMenu: "/hazard_investigation/inventory_management", + }, + component: "children", + children: [ + { + path: "", + component: + "hazard_investigation/inventory_management/part_qr_code", + }, + { + path: "/hazard_investigation/inventory_management/part_qr_code/batch_printing", + meta: { + title: "批量打印", + activeMenu: "/hazard_investigation/inventory_management", + }, + component: + "hazard_investigation/inventory_management/batch_printing", + }, + ], + }, + { + path: "/hazard_investigation/inventory_management/insurance_coverage", + meta: { + title: "设置包保责任类型", + activeMenu: "/hazard_investigation/inventory_management", + }, + component: + "hazard_investigation/inventory_management/insurance_coverage", + }, ], }, ], diff --git a/src/assets/js/constant.js b/src/assets/js/constant.js index 394d053..24b68cd 100644 --- a/src/assets/js/constant.js +++ b/src/assets/js/constant.js @@ -17,7 +17,7 @@ export const MENU = [ { title: "综合管理", model: MODEL["5"] }, ]; -export const styleText = +export const PRINT_STYLE = '"; diff --git a/src/assets/js/useListData.js b/src/assets/js/useListData.js index a04f3e1..504d865 100644 --- a/src/assets/js/useListData.js +++ b/src/assets/js/useListData.js @@ -9,7 +9,7 @@ import { getDataType } from "@/assets/js/utils.js"; * @param options.immediate {Boolean?} 是否立即执行接口函数(默认是) * @param options.usePagination {Boolean?} 是否使用分页(默认是) * @param options.key {String?} 返回的存放数组的key(默认varList) - * @return {Object} 返回对象包含以下属性:list 表格数据,pagination 分页数据,searchForm 搜索表单数据,tableRef 表格实例,responseData 后台所有返回值,fnGetData 获取数据函数,fnResetPagination 重置分页函数 + * @return {Object} 返回对象包含以下属性:list 表格数据,pagination 分页数据,searchForm 搜索表单数据,tableRef 表格实例,fnGetData 获取数据函数,fnResetPagination 重置分页函数 */ export default function useListData(api, options = {}) { @@ -35,7 +35,6 @@ export default function useListData(api, options = {}) { throw new Error("options.otherParams必须是一个对象"); if (options.callbackFn && getDataType(options.callbackFn) !== "Function") throw new Error("options.callbackFn必须是一个函数"); - const responseData = ref({}); const list = ref([]); const pagination = ref({ currentPage: 1, @@ -57,8 +56,7 @@ export default function useListData(api, options = {}) { ...(getDataType(otherParams) === "Object" ? otherParams : {}), }); list.value = resData[key]; - pagination.value.total = resData.page.totalResult; - responseData.value = resData; + if (usePagination) pagination.value.total = resData.page.totalResult; options.callbackFn && options.callbackFn(list.value, resData); }; immediate && fnGetData().then(); @@ -78,7 +76,6 @@ export default function useListData(api, options = {}) { pagination, searchForm, tableRef, - responseData, fnGetData: async (otherParams) => await fnGetData(otherParams), fnResetPagination: async (otherParams) => await fnResetPagination(otherParams), diff --git a/src/components/layout/index.vue b/src/components/layout/index.vue index 578493a..8af1d0e 100644 --- a/src/components/layout/index.vue +++ b/src/components/layout/index.vue @@ -1,5 +1,5 @@