From 046c93c0e6f045b4493931e032480757c86ba4ec Mon Sep 17 00:00:00 2001 From: "2090205686@qq.com" Date: Fri, 30 May 2025 17:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=BC=80=E5=8F=91=EF=BC=88=E5=AE=A2=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=8C=E5=AE=A2=E6=88=B7=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E8=AE=BE=E7=BD=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.staging | 11 - .env.test | 12 + package.json | 3 +- src/assets/styles/custom.scss | 172 +++++++++++ src/assets/styles/index.scss | 3 +- src/components/tableComponent.vue | 357 ++++++++++++++++++++++ src/layout/components/Sidebar/Logo.vue | 6 - src/layout/components/Sidebar/index.vue | 3 +- src/main.js | 1 + src/router/index.js | 44 ++- src/views/customer/customerCategory.vue | 319 ++++++++++++++++++++ src/views/customer/customerManage.vue | 379 ++++++++++++++++++++++++ src/views/index.vue | 4 +- 14 files changed, 1291 insertions(+), 25 deletions(-) delete mode 100644 .env.staging create mode 100644 .env.test create mode 100644 src/assets/styles/custom.scss create mode 100644 src/components/tableComponent.vue create mode 100644 src/views/customer/customerCategory.vue create mode 100644 src/views/customer/customerManage.vue diff --git a/.env.development b/.env.development index 4bc47a7..a1c6593 100644 --- a/.env.development +++ b/.env.development @@ -6,4 +6,4 @@ VITE_APP_ENV = 'development' # 开发环境 VITE_APP_BASE_API = 'http://192.168.18.9:8080/' -VITE_APP_PLATFORM = 'http://192.168.18.99/platform' \ No newline at end of file +VITE_APP_PLATFORM = 'http://localhost:9000/platform' \ No newline at end of file diff --git a/.env.staging b/.env.staging deleted file mode 100644 index 1ed5bda..0000000 --- a/.env.staging +++ /dev/null @@ -1,11 +0,0 @@ -# 页面标题 -VITE_APP_TITLE = 运营云后台管理系统 - -# 生产环境配置 -VITE_APP_ENV = 'staging' - -# 生产环境 -VITE_APP_BASE_API = '/stage-api' - -# 是否在打包时开启压缩,支持 gzip 和 brotli -VITE_BUILD_COMPRESS = gzip \ No newline at end of file diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..6f9491b --- /dev/null +++ b/.env.test @@ -0,0 +1,12 @@ +# 页面标题 +VITE_APP_TITLE = 运营云后台管理系统 + +# 测试环境配置 +VITE_APP_ENV = 'production' + +# 测试环境 +VITE_APP_BASE_API = 'http://192.168.18.99:8080/' +VITE_APP_PLATFORM = 'http://192.168.18.99/platform' + +# 是否在打包时开启压缩,支持 gzip 和 brotli +VITE_BUILD_COMPRESS = gzip \ No newline at end of file diff --git a/package.json b/package.json index 89764d4..e5623d3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "dev": "vite", "build:prod": "vite build", - "build:stage": "vite build --mode staging", + "build:test": "vite build --mode test", "preview": "vite preview" }, "repository": { @@ -28,6 +28,7 @@ "js-beautify": "1.14.11", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", + "mockjs": "^1.1.0", "nprogress": "0.2.0", "pinia": "2.1.7", "splitpanes": "3.1.5", diff --git a/src/assets/styles/custom.scss b/src/assets/styles/custom.scss new file mode 100644 index 0000000..11e890a --- /dev/null +++ b/src/assets/styles/custom.scss @@ -0,0 +1,172 @@ +.app-container { + .container-custom { + width: 100%; + overflow: hidden; /* 防止全局滚动条 */ + + .search-box { + overflow: hidden; + margin: 0 0 16px 0; + padding: 16px 8px 0 16px; + border-radius: 16px; + background: #fff; + } + .search-bar { + display: flex; + flex-shrink: 0; /* 禁止收缩 */ + min-height: 100px; + + .search-bar-left { + flex: 1; + } + + .search-bar-right { + width: 100px; + text-align: center; + } + + .demo-form-inline { + text-align: left; + } + + .el-form--inline .el-form-item { + margin-right: 30px; + } + + .demo-form-inline .el-input { + --el-input-width: 160px; + } + + .demo-form-inline .el-select { + --el-select-width: 160px; + } + + .demo-form-inline .el-date-picker { + --el-select-width: 160px; + } + .el-form .el-form-item__label { + font-weight: 400; + } + } + .table-cont { + min-height: 300px; + border-radius: 16px; + overflow: hidden; + background-color: #fff; + position: relative; + .el-icon-custom { + vertical-align: middle; + cursor: pointer; + } + } + + /* 自定义弹窗样式 */ + .traceability-dialog { + background: transparent; + box-shadow: none; + border-radius: 16px !important; + } + + /* 主要内容区域 */ + .dialog-content { + display: flex; + flex-direction: column; + align-items: center; + background: white; + border-radius: 8px; + padding: 0 0 20px 0; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + } + + /* 产品信息 */ + .product-info { + width: 100%; + display: flex; + justify-content: space-between; + margin-bottom: 20px; + font-size: 14px; + color: #666; + } + + .product-name { + font-weight: bold; + color: #333; + } + + /* 二维码图片 */ + .qrcode-image { + width: 200px; + height: 200px; + margin: 0 auto; + } + + /* 下载区域 */ + .download-section { + display: flex; + align-items: center; + margin: 0 0 10px 0; + color: #25bf82; + cursor: pointer; + font-size: 12px; + line-height: 18px; + } + + .download-icon { + margin-left: 8px; + font-size: 16px; + } + + /* 遗传编码区域 */ + .code-section { + display: flex; + align-items: center; + margin: 10px 0; + background: rgba(37, 191, 130, 0.1); + border-radius: 4px; + } + + .genetic-code { + font-family: monospace; + font-size: 14px; + color: #25bf82; + display: inline-block; + max-width: 250px; + padding: 0 10px; + } + + .copy-icon { + margin-left: 10px; + color: #409eff; + cursor: pointer; + font-size: 16px; + } + + /* 关闭按钮 */ + .close-button { + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: -60px; + color: white; + font-size: 30px; + cursor: pointer; + transition: all 0.3s; + } + // 表格中文本的颜色 + .color-gray { + color: #5a5a5a; + } + .color-orange { + color: orange; + } + .color-green { + color: green; + } + .color-red { + color: red; + } + } +} +.customer-control { + position: absolute; + height: 100%; +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index efc1ddd..9446cf6 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -123,7 +123,8 @@ aside { //main-container全局样式 .app-container { - padding: 20px; + padding: 16px; + background-color: #f5f5f5; } .components-container { diff --git a/src/components/tableComponent.vue b/src/components/tableComponent.vue new file mode 100644 index 0000000..b34b22f --- /dev/null +++ b/src/components/tableComponent.vue @@ -0,0 +1,357 @@ + + + + + diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 0f40699..dba707a 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -33,9 +33,6 @@ import logoY from "@/assets/logo/yunying.png"; import useSettingsStore from "@/store/modules/settings"; import variables from "@/assets/styles/variables.module.scss"; -import useUserStore from "@/store/modules/user"; -const userStore = useUserStore(); - defineProps({ collapse: { type: Boolean, @@ -82,9 +79,6 @@ function getUser() { } getUser(); -onMounted(() => { - console.log(userStore.loginType); -}); diff --git a/src/views/customer/customerManage.vue b/src/views/customer/customerManage.vue new file mode 100644 index 0000000..027f864 --- /dev/null +++ b/src/views/customer/customerManage.vue @@ -0,0 +1,379 @@ + + + diff --git a/src/views/index.vue b/src/views/index.vue index 1710be0..f2cdc7e 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -74,9 +74,9 @@

平台首页:http://192.168.18.99:88/platformhttp://47.109.205.240/platform