文毅 vor 1 Jahr
Ursprung
Commit
1311aedafa

+ 0 - 12
h5/.env

@@ -1,12 +0,0 @@
-# port 端口号
-VITE_PORT = 8888
-
-# open 运行 npm run dev 时自动打开浏览器
-VITE_OPEN = false
-
-# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
-VITE_PUBLIC_PATH = "/admin/"
-VITE_OUTPUT_DIR= "../api/public/admin"
-VITE_APP_API_SIGN_SECRET = "api_sign_secret"
-# VITE_PUBLIC_PATH = /vue-next-admin-preview/
-# VITE_APP_API_SIGN_SECRET = YCKJ2015

+ 1 - 1
h5/.env.development

@@ -2,4 +2,4 @@
 ENV = 'development'
 
 # 本地环境接口地址
-VITE_API_URL = 'http://localhost:8888/'
+VITE_API_URL = 'http://192.168.0.170:8880/public/index.php'

+ 1 - 1
h5/.env.test

@@ -5,7 +5,7 @@ VITE_PORT = 8888
 VITE_OPEN = false
 
 # public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
-VITE_PUBLIC_PATH = "/test/"
+VITE_PUBLIC_PATH = "./"
 VITE_OUTPUT_DIR= "../api/public/test"
 VITE_APP_API_SIGN_SECRET = "api_sign_secret"
 # VITE_PUBLIC_PATH = /vue-next-admin-preview/

+ 1 - 0
h5/.eslintrc.js

@@ -72,5 +72,6 @@ module.exports = {
 		'no-case-declarations': 'off',
 		'no-console': 'error',
 		'no-redeclare': 'off',
+        'semi': 'never',
 	},
 };

+ 151 - 0
h5/README.md

@@ -0,0 +1,151 @@
+<div align="center">
+	<img src="https://img-blog.csdnimg.cn/9efd5420327a46b7bd6d93524a97229d.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbHl0LXRvcA==,size_14,color_FFFFFF,t_70,g_se,x_16">
+	<p align="center">
+	    <a href="https://v3.vuejs.org/" target="_blank">
+	        <img src="https://img.shields.io/badge/vue.js-vue3.x-green" alt="vue">
+	    </a>
+	    <a href="https://element-plus.gitee.io/#/zh-CN/component/changelog" target="_blank">
+	        <img src="https://img.shields.io/badge/element--plus-%3E1.0.0-blue" alt="element plus">
+	    </a>
+		<a href="https://www.tslang.cn/" target="_blank">
+	        <img src="https://img.shields.io/badge/typescript-%3E4.0.0-blue" alt="typescript">
+	    </a>
+		<a href="https://vitejs.dev/" target="_blank">
+		    <img src="https://img.shields.io/badge/vite-%3E2.0.0-yellow" alt="vite">
+		</a>
+		<a href="https://gitee.com/lyt-top/vue-next-admin/blob/master/LICENSE" target="_blank">
+		    <img src="https://img.shields.io/badge/license-MIT-success" alt="license">
+		</a>
+	</p>
+	<p>&nbsp;</p>
+</div>
+
+#### 🌈 介绍
+
+基于 vue3.x + CompositionAPI setup 语法糖 + typescript + vite + element plus + vue-router-next + pinia 技术,适配手机、平板、pc 的后台开源免费模板,希望减少工作量,帮助大家实现快速开发。
+
+#### ⛱️ 线上预览
+
+- vue3.x 版本预览(vue-next-admin)<a href="https://lyt-top.gitee.io/vue-next-admin-preview/#/login" target="_blank">https://lyt-top.gitee.io/vue-next-admin-preview/#/login</a>
+- vue2.x 版本预览(vue-prev-admin)<a href="https://lyt-top.gitee.io/vue-prev-admin-preview/#/login" target="_blank">https://lyt-top.gitee.io/vue-prev-admin-preview/#/login</a>
+
+#### 💒 代码仓库
+
+- vue3.x 版本 <a href="https://gitee.com/lyt-top/vue-next-admin" target="_blank">https://gitee.com/lyt-top/vue-next-admin</a>
+- vue2.x 版本 <a href="https://gitee.com/lyt-top/vue-next-admin/tree/vue-prev-admin" target="_blank">https://gitee.com/lyt-top/vue-next-admin/tree/vue-prev-admin</a>
+
+#### 🚧 安装 cnpm、yarn
+
+- 复制代码(桌面 cmd 运行) `npm install -g cnpm --registry=https://registry.npm.taobao.org`
+- 复制代码(桌面 cmd 运行) `npm install -g yarn`
+
+#### 🏭 环境支持
+
+| Edge      | Firefox      | Chrome      | Safari      |
+| --------- | ------------ | ----------- | ----------- |
+| Edge ≥ 88 | Firefox ≥ 78 | Chrome ≥ 87 | Safari ≥ 13 |
+
+> 由于 Vue3 不再支持 IE11,故而 ElementPlus 也不支持 IE11 及之前版本。
+
+#### ⚡ 使用说明
+
+建议使用 cnpm,因为 yarn 有时会报错。<a href="http://nodejs.cn/" target="_blank">node 版本 > 14.18+/16+</a>
+
+> Vite 不再支持 Node 12 / 13 / 15,因为上述版本已经进入了 EOL 阶段。现在你必须使用 Node 14.18+ / 16+ 版本。
+
+```bash
+# 克隆项目
+git clone https://gitee.com/lyt-top/vue-next-admin.git
+
+# 进入项目
+cd vue-next-admin
+
+# 安装依赖
+cnpm install
+
+# 运行项目
+cnpm run dev
+
+# 打包发布
+cnpm run build
+```
+
+#### 📚 开发文档
+
+- 查看开发文档:<a href="https://lyt-top.gitee.io/vue-next-admin-doc-preview" target="_blank">vue-next-admin-doc</a>
+
+#### 💯 学习交流加 QQ 群
+
+> 若加群了没同意(一般秒过),那就是群满了(500 人群),请换一个群试试。群会定期清理半年(6 个月)未发言的群友,资源有限,请谅解。建议勿加多群,可能会误伤!微信群由于只有 `7天有效` 就不放这里了。
+
+- 1 群:<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=RdUY97Vx0T0vZ_1OOu-X1yFNkWgDwbjC&jump_from=webapi">665452019</a>
+- 2 群:<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=zVfy3gNy7pNWVK3kMduDzwU369PZg2fw&jump_from=webapi">766356862</a>
+- 3 群:<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=02EWb5P2JkP-8iwzaDadgFdxA0HSHPpn&jump_from=webapi">795345435</a>
+- 4 群:<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=0gTFO04WwkeZZ6R4lju6gucbeXHK-wNd&jump_from=webapi">736626228</a>
+
+  <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=RdUY97Vx0T0vZ_1OOu-X1yFNkWgDwbjC&jump_from=webapi">
+  	<img src="https://img-blog.csdnimg.cn/35e00f12a3fe4820892ec630ca72f15f.png" width="220" height="220" alt="vue-next-admin 讨论群1" title="vue-next-admin 讨论群1"/>
+  </a>
+  <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=zVfy3gNy7pNWVK3kMduDzwU369PZg2fw&jump_from=webapi">
+  	<img src="https://img-blog.csdnimg.cn/5f1b548abd9f434eb41edde31d1c1fa9.png" width="220" height="220" alt="vue-next-admin 讨论群2" title="vue-next-admin 讨论群2"/>
+  </a>
+  <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=02EWb5P2JkP-8iwzaDadgFdxA0HSHPpn&jump_from=webapi">
+  	<img src="https://img-blog.csdnimg.cn/70c8a012dd304246bddeac2184c4ab3a.png" width="220" height="220" alt="vue-next-admin 讨论群3" title="vue-next-admin 讨论群3"/>
+  </a>
+  <a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=0gTFO04WwkeZZ6R4lju6gucbeXHK-wNd&jump_from=webapi">
+  	<img src="https://img-blog.csdnimg.cn/e5c9704eed1342bc9d9e74b37203402d.png" width="220" height="220" alt="vue-next-admin 讨论群4" title="vue-next-admin 讨论群4"/>
+  </a>
+
+#### 💒 集成后端
+
+- <a target="_blank" href="https://github.com/PandaGoAdmin/PandaX">@熊猫 PandaGoAdmin</a>
+- <a target="_blank" href="https://toscode.gitee.com/GionConnection/gopro_free">@甜蜜蜜 GoPro 平台</a>
+- <a target="_blank" href="https://gitee.com/GionConnection/niupi-free">@甜蜜蜜 NiuPi 平台</a>
+- <a target="_blank" href="https://gitee.com/tiger1103/gfast/tree/os-v3/">@游子 GFast-V3</a>
+- <a target="_blank" href="https://gitee.com/diygw/diygw-ui-php/">@diygw.com gw-ui-php</a>
+- <a target="_blank" href="https://gitee.com/zsvg/vboot-net">@zsvg vboot-net</a>
+- <a target="_blank" href="https://gitee.com/zsvg/vboot-java">@zsvg vboot-java</a>
+- <a target="_blank" href="https://gitee.com/wonderful-code/buildadmin">@青红造了个白 buildadmin</a>
+- <a target="_blank" href="https://github.com/xiaodingding/iotfast">@Goodwell iotfast(一个开源的物联网平台)</a>
+
+#### ❤️ 鸣谢列表
+
+- <a href="https://github.com/vuejs/vue" target="_blank">vue</a>
+- <a href="https://github.com/vuejs/vue-next" target="_blank">vue-next</a>
+- <a href="https://github.com/ElemeFE/element" target="_blank">element-ui</a>
+- <a href="https://github.com/element-plus/element-plus" target="_blank">element-plus</a>
+- <a href="https://github.com/vuejs/vue-router-next" target="_blank">vue-router-next</a>
+- <a href="https://github.com/vuejs/pinia" target="_blank">pinia</a>
+- <a href="https://github.com/apache/echarts" target="_blank">echarts</a>
+- <a href="https://github.com/axios/axios" target="_blank">axios</a>
+- <a href="https://github.com/zenorocha/clipboard.js" target="_blank">clipboard</a>
+- <a href="https://github.com/inorganik/countUp.js" target="_blank">countUp</a>
+- <a href="https://github.com/developit/mitt" target="_blank">mitt</a>
+- <a href="https://github.com/rstacruz/nprogress" target="_blank">nprogress</a>
+- <a href="https://github.com/sindresorhus/screenfull.js" target="_blank">screenfull</a>
+- <a href="https://github.com/SortableJS/Sortable" target="_blank">sortablejs</a>
+- <a href="https://github.com/sass/sass" target="_blank">sass</a>
+- <a href="https://github.com/microsoft/TypeScript" target="_blank">typescript</a>
+- <a href="https://github.com/vitejs/vite" target="_blank">vite</a>
+- <a href="https://github.com/wangeditor-team/wangEditor" target="_blank">wangeditor</a>
+- <a href="https://github.com/fengyuanchen/cropperjs" target="_blank">cropperjs</a>
+- <a href="https://github.com/davidshimjs/qrcodejs" target="_blank">qrcodejs</a>
+- <a href="https://github.com/crabbly/Print.js" target="_blank">print-js</a>
+- <a href="https://github.com/jbaysolutions/vue-grid-layout" target="_blank">vue-grid-layout</a>
+- <a href="https://github.com/antoniandre/splitpanes" target="_blank">splitpanes</a>
+- <a href="https://github.com/jsplumb/jsplumb" target="_blank">jsplumb</a>
+- <a href="https://github.com/hxj9102/table2excel" target="_blank">js-table2excel</a>
+
+#### 💕 特别感谢
+
+特别感谢老哥们的建议、指导与帮忙。谢谢!
+
+- <a href="https://gitee.com/click33/sa-plus" target="_blank">@省长</a>
+- <a href="https://gitee.com/jskz/Jskz-SpringCloud" target="_blank">@唐参</a>
+- <a href="https://gitee.com/chuange" target="_blank">@川歌</a>
+- @华仔
+
+#### 💌 支持作者
+
+如果觉得框架不错,或者已经在使用了,希望你可以去 <a target="_blank" href="https://github.com/lyt-Top/vue-next-admin">Github</a> 或者
+<a target="_blank" href="https://gitee.com/lyt-top/vue-next-admin">Gitee</a> 帮我点个 ⭐ Star,这将是对我极大的鼓励与支持。

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 6843
h5/package-lock.json


+ 2 - 1
h5/package.json

@@ -42,7 +42,8 @@
 		"vue-clipboard3": "^2.0.0",
 		"vue-grid-layout": "^3.0.0-beta1",
 		"vue-i18n": "^9.2.2",
-		"vue-router": "^4.1.6"
+		"vue-router": "^4.1.6",
+		"vue-vuecmf-dialog": "^1.4.8"
 	},
 	"devDependencies": {
 		"@types/node": "^18.11.13",

+ 96 - 254
h5/src/api/Urls.ts

@@ -1,258 +1,100 @@
+/**
+ * gzs:后台接口地址
+ */
 const Urls = {
-    // 登录
-    index: {
-        login: "/admin/index/login",
-        balanceUpload: "/balance/index/upload",
-        message: "/admin/message/list",
-        messageEdit: "/admin/message/edit",
-    },
-    // 菜单列表
-    common: {
-        menuList: "/admin/menu/list"
-    },
-    // 上传类
-    upload: {
-        file: "/admin/upload/file"
-    },
+	// 登录
+	index: {
+		login: '/admin/login/doLogin',
+		balanceUpload: '/balance/index/upload',
+		message: '/admin/message/list',
+		messageEdit: '/admin/message/edit',
+	},
+	// 菜单列表
+	common: {
+		menuList: '/admin/index/statistics',
+	},
+	// 上传类
+	upload: {
+		file: '/admin/upload/file',
+	},
+	//账号模块
+	admin: {
+		init: 'admin/admin/init', //初始化
+		list: '/admin/admin/list',
+		detail: 'admin/admin/detail', //详情
+		edit: 'admin/admin/edit', //更新
+		add: 'admin/admin/add', //添加
+		delete: 'admin/admin/delete', //删除/批量删除
+		resetPwd: 'admin/admin/resetPwd', //重置密码
+	},
+	//仓库模型
+	repertory: {
+		list: '/admin/repo/page',
+		add: '/admin/repo/create', //创建仓库
+		edit: '/admin/repo/update', //仓库更新
+		delete: '/admin/repo/delete', //仓库删除
+		all: '/admin/repo/all', //所有仓库
+		IoDetail: '/admin/IoDetail/page', //首页详情
+		export: '/admin/io/export', //出入库导出
+	},
+	//物品模型
+	good: {
+		list: '/admin/good/page',
+		add: '/admin/good/create',
+		edit: '/admin/good/update', //物品更新
+		delete: '/admin/good/delete', //物品删除
+		export: '/admin/good/export', //物品导出
+		import: '/admin/good/import', //物品导入
+		no: '/admin/good/get/no', //扫码枪
+	},
+	//出入库/盘点模型
+	orderInout: {
+		// init: "admin/order_inout/init",//初始化
+		list: '/admin/io/page',
+		add: '/admin/io/create', //创建出入库/盘点
+		detail: '/admin/io/info', //出入库/盘点详情
+		info: '/admin/stock/get/good-repo', //仓库更新
+		reset: '/admin/io/revert', //回滚订单
+	},
+	//调拨
+	transfer: {
+		list: '/admin/allocation/page',
+		add: '/admin/allocation/create', //创建调拨
+		detail: '/admin/allocation/info', //库存详情
+		reset: '/admin/allocation/revert', //回滚订单
+	},
+	//物品分类模型
+	goodClass: {
+		list: '/admin/GoodClass/page',
+		add: '/admin/GoodClass/create', //分类新增
+		edit: '/admin/GoodClass/update', //分类更新
+		delete: '/admin/GoodClass/delete', //分类删除
+		all: '/admin/GoodClass/all', //所有分类
+		// detail: "/admin/good_class/detail",//分类详情
+	},
+	//在途库存
+	realinventory: {
+		list: '/admin/stock/page',
+		detail: '/admin/IoDetail/transits', //在途明细
+		export: '/admin/stock/export', //库存导出
+		edit: '/admin/io/complete', //完成在途/借出
+	},
+	//以下准备弃用
 
-    /* 基础数据 */
-    // 公司信息
-    company: {
-         detail: "/admin/company/detail", //企业详情
-         edit: "/admin/company/edit", //更新企业信息
-    },
-    // 角色权限
-    role: {
-        init: "admin/role/init", //初始化
-        list: "admin/role/list", //列表
-        detail: "admin/role/detail", //详情
-        edit: "admin/role/edit", //更新
-        add: "admin/role/add", //添加
-        del: "admin/role/del", //删除/批量删除
-    },
-    // 部门人员
-    department: {
-        init: "/admin/department/init", //部门初始化
-        list: "/admin/department/list", //部门列表
-        detail: "/admin/department/detail", //部门详情
-        add: "/admin/department/add", //部门添加
-        edit: "/admin/department/edit", //部门更新
-        del: "/admin/department/del", //部门删除/批量删除
-        initAdmin: "admin/admin/init", //人员初始化
-        listAdmin: "/admin/admin/list", //人员列表
-        addAdmin: "/admin/admin/add", //人员添加
-        detailAdmin: "/admin/admin/detail", //人员详情
-        editAdmin: "/admin/admin/edit", //人员更新
-        delAdmin: "/admin/admin/del", //人员删除/批量删除
-        resetPassword: "/admin/admin/resetPassword", //重置密码
-        passAdmin: "/admin/admin/pass", //审核
-        rePassAdmin: "/admin/admin/rePass", //反审核
-        import: "admin/admin/import", //人员导入
-        export: "admin/admin/export", //人员导出
-    },
-    // 机台管理
-    machine: {
-        init: "/admin/machine/init", //初始化
-        list: "/admin/machine/list", //列表
-        add: "/admin/machine/add", //添加
-        edit: "/admin/machine/edit", //更新
-        del: "/admin/machine/del", //删除/批量删除
-        pass: "/admin/machine/pass", //审核
-        rePass: "/admin/machine/rePass", //反审核
-        import: "admin/machine/import", //机台导入
-        export: "admin/machine/export", //机台导出
-    },
-    // 计量单位
-    unitMeasurement: {
-        init: "/admin/unitMeasurement/init", //初始化
-        list: "/admin/unitMeasurement/list", //列表
-        add: "/admin/unitMeasurement/add", //添加
-        edit: "/admin/unitMeasurement/edit", //更新
-        del: "/admin/unitMeasurement/del", //删除/批量删除
-        pass: "/admin/unitMeasurement/pass", //审核
-        rePass: "/admin/unitMeasurement/rePass", //反审核
-        import: "admin/unitMeasurement/import", //导入
-        export: "admin/unitMeasurement/export", //导出
-    },
-    // 产品类别
-    productType: {
-        init: "admin/productType/init", //初始化
-        list: "admin/productType/list", //列表
-        add: "admin/productType/add", //添加
-        edit: "admin/productType/edit", //更新
-        del: "admin/productType/del", //删除/批量删除
-        pass: "/admin/productType/pass", //审核
-        rePass: "/admin/productType/rePass", //反审核
-        import: "admin/productType/import", //导入
-        export: "admin/productType/export", //导出
-    },
-    // 产品管理
-    product: {
-        init: "admin/product/init", //初始化
-        list: "admin/product/list", //列表
-        add: "admin/product/add", //添加
-        edit: "admin/product/edit", //更新
-        del: "admin/product/del", //删除/批量删除
-        pass: "/admin/product/pass", //审核
-        rePass: "/admin/product/rePass", //反审核
-        detail: "admin/product/detail", //详情
-        import: "admin/product/import", //导入
-        export: "admin/product/export", //导出
-        productProcedureDetail: "/admin/productProcedure/detail", //工序设置详情
-        productProcedureEdit: "/admin/productProcedure/edit", //工序设置更新
-    },
-    // 工序管理
-    procedure: {
-        init: "admin/procedure/init", //初始化
-        list: "admin/procedure/list", //列表
-        add: "admin/procedure/add", //添加
-        edit: "admin/procedure/edit", //更新
-        del: "admin/procedure/del", //删除/批量删除
-        detail: "admin/procedure/detail", //详情
-        import: "admin/procedure/import", //导入
-        export: "admin/procedure/export", //导出
-    },
-    // 工资项目
-    salaryItem: {
-        init: "admin/salaryItem/init", //初始化
-        list: "admin/salaryItem/list", //列表
-        detail: "admin/salaryItem/detail", //详情
-        add: "admin/salaryItem/add", //添加
-        edit: "admin/salaryItem/edit", //更新
-        del: "admin/salaryItem/del", //删除/批量删除
-        pass: "/admin/salaryItem/pass", //审核
-        rePass: "/admin/salaryItem/rePass", //反审核
-    },
-    // 车间管理
-    workershop: {
-        list: "admin/workshop/list", //列表
-        detail: "admin/workshop/detail", //详情
-        add: "admin/workshop/add", //添加
-        edit: "admin/workshop/edit", //更新
-        del: "admin/workshop/del", //删除/批量删除
-        pass: "admin/workshop/pass", //审核
-        rePass: "admin/workshop/rePass", //反审核
-    },
-    // 包装工序(收缩编码)
-    procedurePackage: {
-        init: "admin/procedurePackage/init", //初始化
-        list: "admin/procedurePackage/list", //列表
-        detail: "admin/procedurePackage/detail", //详情
-        add: "admin/procedurePackage/add", //添加
-        edit: "admin/procedurePackage/edit", //更新
-        del: "admin/procedurePackage/del", //删除/批量删除
-        pass: "admin/procedurePackage/pass", //审核
-        rePass: "admin/procedurePackage/rePass", //反审核
-        import: "admin/procedurePackage/import", //导入
-        export: "admin/procedurePackage/export", //导出
-    },
-
-    /* 工资模块 */
-    // 班次管理
-    classes: {
-        init: "admin/classes/init", //初始化
-        list: "admin/classes/list", //列表
-        detail: "admin/classes/detail", //详情
-        add: "admin/classes/add", //添加
-        edit: "admin/classes/edit", //更新
-        del: "admin/classes/del", //删除/批量删除
-        pass: "/admin/classes/pass", //审核
-        rePass: "/admin/classes/rePass", //反审核
-    },
-    // 排班管理(考勤管理)
-    rostering: {
-        init: "/admin/rostering/init", //初始化
-        list: "admin/rostering/list", //列表
-        edit: "admin/rostering/edit", //更新
-        detail: "admin/rostering/detail", //详情
-        import: "admin/rostering/import", //排班导入
-        export: "admin/rostering/export", //排班导出
-        index: "api/rostering/index", //一键排班
-    },
-    // 考勤管理(考勤报表)
-    rosteringRecord: {
-        init: "/admin/rosteringRecord/init", //初始化
-        list: "admin/rosteringRecord/list", //列表
-        edit: "admin/rosteringRecord/edit", //更新
-        detail: "admin/rosteringRecord/detail", //详情
-        index: "api/rosteringRecord/index", //考勤统计
-    },
-    // 包装记录
-    packing: {
-        initDetail: "/admin/packing/initDetail", //初始化
-        init: "/admin/packing/init", //初始化
-        list: "admin/packing/list", //列表
-        edit: "admin/packing/edit", //更新
-        del: "admin/packing/del", //删除/批量删除
-        add: "admin/packing/add", //添加
-        detail: "admin/packing/detail", //详情
-    },
-    // 非包装记录
-    noPacking: {
-        init: "/admin/noPacking/init", //初始化
-        list: "admin/noPacking/list", //列表
-        edit: "admin/noPacking/edit", //更新
-        del: "admin/noPacking/del", //删除/批量删除
-        add: "admin/noPacking/add", //添加
-        detail: "admin/noPacking/detail", //详情
-    },
-    // 拆包管理
-    unPacking: {
-        init: "/admin/unPacking/init", //初始化
-        list: "/admin/unPacking/list", //列表
-        detail: "/admin/unPacking/detail", //详情
-        open: "/admin/unPacking/open", //拆包
-    },
-
-    /* 报表管理*/
-    // 计时工资总表
-    salary_hourly: {
-        init: "admin/salary_hourly/init", //初始化
-        list: "admin/salary_hourly/list", //列表
-        detail: "admin/salary_hourly/detail", //详情
-        add: "admin/salary_hourly/add", //添加
-        edit: "admin/salary_hourly/edit", //更新
-        del: "admin/salary_hourly/del", //删除/批量删除
-    },
-    // 计件工资总表
-    salary_rate: {
-        init: "admin/salary_rate/init", //初始化
-        list: "admin/salary_rate/list", //列表
-        detail: "admin/salary_rate/detail", //详情
-        add: "admin/salary_rate/add", //添加
-        edit: "admin/salary_rate/edit", //更新
-        del: "admin/salary_rate/del", //删除/批量删除
-    },
-    // 机台产能报表
-    machineCapacity: {
-        init: "admin/machineCapacity/init", //初始化
-        list: "admin/machineCapacity/list", //列表
-        detail: "admin/machineCapacity/detail", //详情
-        add: "admin/machineCapacity/add", //添加
-        edit: "admin/machineCapacity/edit", //更新
-        del: "admin/machineCapacity/del", //删除/批量删除
-    },
-    // 员工工资表
-    salary: {
-        init: "admin/salary/init", //初始化
-        list: "admin/salary/list", //列表
-        detail: "admin/salary/detail", //详情
-        add: "admin/salary/add", //添加
-        edit: "admin/salary/edit", //批量更新
-        del: "admin/salary/del", //删除/批量删除
-        submit: "admin/salary/submit", //提交更新
-        index: "api/salary/index", //工资计算
-        editSingle: "/admin/salary/editSingle", //更新
-    },
-    // 库存查询
-    salaryRateStock: {
-        init: "/admin/salaryRateStock/init", //初始化
-        list: "/admin/salaryRateStock/list", //列表
-    },
-    // 数据看板
-    statistics: {
-        init: "admin/statistics/init", //初始化
-        detail: "admin/statistics/detail", //详情
-    },
+	/* 基础数据 */
+	// 公司信息
+	company: {
+		detail: '/admin/company/detail', //企业详情
+		edit: '/admin/company/edit', //更新企业信息
+	},
+	// 角色权限
+	role: {
+		init: 'admin/role/init', //初始化
+		list: 'admin/role/list', //列表
+		detail: 'admin/role/detail', //详情
+		edit: 'admin/role/edit', //更新
+		add: 'admin/role/add', //添加
+		del: 'admin/role/del', //删除/批量删除
+	},
 };
 export default Urls;

+ 2 - 0
h5/src/api/login/index.ts

@@ -2,6 +2,8 @@ import request from '/@/utils/request';
 
 /**
  * (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参)
+ * ↑假的,别信,估计他是把post(url, data, config)当成post(url, config)了
+ * trythis:await axios.post('https://echo.apifox.com/post', {a:2}, {params:{b:1}})
  *
  * 登录api接口集合
  * @method signIn 用户登录

+ 1 - 1
h5/src/api/login/login.ts

@@ -3,7 +3,7 @@ import Urls from "../Urls";
 const Login = {
     async login(param: object) {
         let url = Urls.index.login;
-        let res = await Http.get(url, param);
+        let res = await Http.post(url, param);
         return res;
     }
 };

+ 1 - 1
h5/src/api/menu/index.ts

@@ -19,7 +19,7 @@ export function useMenuApi() {
 		getMenuAdmin: async (params?: object) => {
 			//TODO: 要改成远程获取
 			let res: any = await Menu.getList();
-			menus = res.data.menu;
+			menus = res.data;
 			// Session.set('menus',menus);
 			// backEndTest(menus,res.data.role);
 			console.log('menus',menus);

+ 31 - 50
h5/src/config.ts

@@ -1,62 +1,43 @@
-import { Local, Session } from '/@/utils/storage';
 /**
  * 系统设置
  */
 const config = {
-    /**
-     * 版本号
-     */
-    version: "V23.02.09.1.Test",
-    /**
-     * 请求接口域名
-     */
-    file: "http://ssl.ycxxkj.com:38071",
-    host: "http://ssl.ycxxkj.com:38071/index.php",
-    /**
-     * 接口签名密钥
-     */
-    apiSignKey: "32a1ff74699ff2d6ce4c497cb94cb5c8",
-}
+	/**
+	 * 版本号
+	 */
+	version: 'V1.0.0',
+	/**
+	 * 请求接口域名
+	 */
+	file: 'http://ssl.ycxxkj.com:38071',
+	host: 'http://ssl.ycxxkj.com:38071/index.php',
+	/**
+	 * 接口签名密钥
+	 */
+	apiSignKey: '32a1ff74699ff2d6ce4c497cb94cb5c8',
+};
 let env = import.meta.env;
 console.log("==env.Mode:==", env.MODE);
 if (env.MODE == "development") {
-    // config.file = "http://192.168.0.83:6969";
-    // config.host = "http://192.168.0.83:6969/index.php";
-    // config.file = "http://ssl.ycxxkj.com:38071";
-	// config.host = "http://ssl.ycxxkj.com:38071/index.php";
-    config.file = "http://192.168.0.126:6969";
-	config.host = "http://192.168.0.126:6969/index.php";
-    // config.file = "http://192.168.0.173:6969";
-	// config.host = "http://192.168.0.173:6969/index.php";
-	// config.domain = "http://192.168.0.173:6969";
-}
-if (env.MODE == "release") {
-    //本地
-    config.file = "http://192.168.0.83:5252";
-    config.host = "http://192.168.0.83:5252/index.php";
-    //公网
-    // config.file = "http://nxlz.ycxxkj.com:38071";
-    // config.host = "http://nxlz.ycxxkj.com:38071/index.php";
+    config.file = "http://192.168.0.170:8880";
+    config.host = "http://192.168.0.170:8880/public/index.php";
+    // config.host = "http://localhost:80/index.php";
+    // config.host = "http://local81.lzj/simple_storage/api/public/index.php";
 }
-if (env.MODE == "test") {
-    //本地
-    // config.file = "http://192.168.0.83:6969";
-    // config.host = "http://192.168.0.83:6969/index.php";
-    //公网
-    config.file = "http://ssl.ycxxkj.com:38071";
-    config.host = "http://ssl.ycxxkj.com:38071/index.php";
+if (env.MODE == 'release') {
+	//本地
+	config.file = 'http://192.168.0.83:5252';
+
+	config.host = 'http://192.168.0.83:5252/index.php';
+	//公网
+	// config.file = "http://nxlz.ycxxkj.com:38071";
+	// config.host = "http://nxlz.ycxxkj.com:38071/index.php";
 }
-if (env.MODE == "customer") {
-    //公网
-    config.file = "http://ssl.ycxxkj.com:38071";
-    config.host = "http://ssl.ycxxkj.com:38071/index.php";
+if (env.MODE == 'test') {
+	//公网
+	config.file = 'https://php80.ycxxkj.com/lechang_storage_test/api';
+	config.host = 'https://php80.ycxxkj.com/lechang_storage_test/api/public/index.php';
 }
 
-// 如果需要自动获取接口地址
-// console.log('href',window.location.href);
-// console.log('host',window.location.host);
-// config.file = Local.get('file') ? Local.get('file') : 'http://'+window.location.host;
-// config.host = Local.get('host') ? Local.get('host') : config.file+'/index.php';
-
-console.log("==config:==", config);
+console.log('==config:==', config);
 export default config;

+ 18 - 4
h5/src/i18n/lang/zh-cn.ts

@@ -1,13 +1,26 @@
 // 定义内容
+//gzs: 语言包
 export default {
 	router: {
 		home: '首页',
+		admin: '账号管理',
+		adminRole: "角色管理",
+		adminMng: "账号管理",
 		underlying: '基础数据',
-			underlyingRoleManage: '账号权限02',
-			underlyingDepartment: '部门人员03',
+		dataRepertory: '仓库管理',
+		orderInout: "出入库管理",
+		dataGood: '物品管理',
+		dataGoodClass:'物品分类',
+		orderTransfer:'调拨',
+		orderInventory:'盘点',
+		inventoryRealinventory:'在途库存',
+		inventoryIntransit:'实时库存',
+		// 以下的会废弃
+		underlyingRoleManage: '账号权限02',
+		underlyingDepartment: '部门人员03',
 		system: '系统设置',
-			systemBaseSettings: '基础设置25',
-			systemMessage: '通知中心26',
+		systemBaseSettings: '设置中心',
+		systemMessage: '通知中心26',
 		limits: '权限管理',
 		limitsFrontEnd: '前端控制',
 		limitsFrontEndPage: '页面权限',
@@ -168,6 +181,7 @@ export default {
 		fourIsWartermark: '开启水印',
 		fourWartermarkText: '水印文案',
 		fiveTitle: '其它设置',
+		fivePageSize: "分页大小",
 		fiveTagsStyle: 'Tagsview 风格',
 		fiveAnimation: '主页面切换动画',
 		fiveColumnsAsideStyle: '分栏高亮风格',

+ 0 - 28
h5/src/layout/navBars/breadcrumb/index.vue

@@ -15,33 +15,8 @@ import { storeToRefs } from 'pinia';
 import { useRoutesList } from '/@/stores/routesList';
 import { useThemeConfig } from '/@/stores/themeConfig';
 import mittBus from '/@/utils/mitt';
-import Index from '/@/api/index.ts';
 
 const userFun = ref();
-const getList = async() => {
-	let newsList = [];
-	let res = await Index.message(state.param);
-	if(res.code != 0){
-		return console.log(res.msg);
-	}
-	res.data.data.forEach((item:any) => {
-		if(item.is_read==0){
-			newsList.push({
-				label: item.title,
-				value: item.content,
-				time: item.update_time,
-				is_read: item.is_read,
-			});
-		}
-	});
-	if(newsList.length<=0){
-		console.log('newsList.length',newsList.length);
-		userFun.value.isDot(false);
-	}else{
-		console.log('newsList.length',newsList.length);
-		userFun.value.isDot(true);
-	}
-}
 
 // 引入组件
 const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
@@ -122,9 +97,6 @@ onMounted(() => {
 	mittBus.on('getBreadcrumbIndexSetFilterRoutes', () => {
 		setFilterRoutes();
 	});
-	setTimeout(()=>{
-		getList();
-	},500)
 });
 // 页面卸载时
 onUnmounted(() => {

+ 8 - 0
h5/src/layout/navBars/breadcrumb/setings.vue

@@ -289,6 +289,14 @@
 				<!-- 其它设置 -->
 				<el-divider content-position="left">{{ $t('message.layout.fiveTitle') }}</el-divider>
 				<div class="layout-breadcrumb-seting-bar-flex mt15">
+					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fivePageSize') }}</div>
+					<div class="layout-breadcrumb-seting-bar-flex-value">
+						<el-select v-model="getThemeConfig.pageSize" placeholder="请选择" size="default" style="width: 90px" @change="setLocalThemeConfig">
+							<el-option v-for="(item, index) in getThemeConfig.pageSizeArray" :label="item" :value="item"></el-option>
+						</el-select>
+					</div>
+				</div>
+				<div class="layout-breadcrumb-seting-bar-flex mt15">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fiveTagsStyle') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
 						<el-select v-model="getThemeConfig.tagsStyle" placeholder="请选择" size="default" style="width: 90px" @change="setLocalThemeConfig">

+ 10 - 0
h5/src/layout/navMenu/subItem.vue

@@ -47,3 +47,13 @@ const onALinkClick = (val: RouteItem) => {
 	other.handleOpenLink(val);
 };
 </script>
+<style >
+.el-sub-menu__title {
+	color: var(--next-bg-menuBarColor);
+	/* color: var(--next-bg-menuBarColor) !important; */
+}
+.el-menu-item {
+	color: var(--next-bg-menuBarColor);
+	/* color: #fff !important; */
+}
+</style>

+ 3 - 1
h5/src/main.ts

@@ -15,5 +15,7 @@ const app = createApp(App);
 
 directive(app);
 other.elSvg(app);
+/*导入 vue-vuecmf-dialog  组件*/
+import VuecmfDialog from "vue-vuecmf-dialog"
 
-app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t }).use(i18n).use(VueGridLayout).mount('#app');
+app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t }).use(i18n).use(VueGridLayout).use(VuecmfDialog).mount('#app');

+ 176 - 30
h5/src/router/route.ts

@@ -31,7 +31,8 @@ declare module 'vue-router' {
 }
 
 /**
- * 定义动态路由
+ * gzs:路由,左菜单从这里添加 
+ * 定z义动态路由
  * 前端添加路由,请在顶级节点的 `children 数组` 里添加
  * @description 未开启 isRequestRoutes 为 true 时使用(前端控制路由),开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据
  * @description 各字段请查看 `/@/views/system/menu/component/addMenu.vue 下的 ruleForm`
@@ -63,10 +64,43 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 				},
 			},
 			{
-				path: '/underlying',
-				name: 'underlying',
+				path: '/admin',
+				name: 'admin',
 				component: () => import('/@/layout/routerView/parent.vue'),
-				redirect: '/underlying/company',
+				redirect: '/admin/admin',
+				meta: {
+					title: 'message.router.admin',
+					isLink: '',
+					isHide: false,
+					isKeepAlive: true,
+					isAffix: false,
+					isIframe: false,
+					roles: ['admin'],
+					icon: 'iconfont icon-gerenzhongxin', 
+				},
+				children: [
+					{
+						path: '/admin/admin',
+						name: 'adminMng',
+						component: () => import('/@/views/admin/admin/index.vue'),
+						meta: {
+							title: 'message.router.adminMng', //管理员管理
+							isLink: '',
+							isHide: false,
+							isKeepAlive: true,
+							isAffix: false,
+							isIframe: false,
+							roles: ['admin'],
+							icon: 'iconfont icon-gerenzhongxin',
+						},
+					},
+				],
+			},
+			{
+				path: '/data',
+				name: 'data',
+				component: () => import('/@/layout/routerView/parent.vue'),
+				redirect: '/data/index',
 				meta: {
 					title: 'message.router.underlying',
 					isLink: '',
@@ -75,15 +109,15 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 					isAffix: false,
 					isIframe: false,
 					roles: ['admin'],
-					icon: 'iconfont icon-xitongshezhi',
+					icon: 'iconfont icon-caidan',
 				},
 				children: [
 					{
-						path: '/underlying/roleManage',
-						name: 'underlyingRoleManage',
-						component: () => import('/@/views/underlying/roleManage/index.vue'),
+						path: '/data/repertory',
+						name: 'dataRepertory',//gzs:name一定不能重复
+						component: () => import('/@/views/data/repertory.vue'),//gzs:仓库管理页面文件的路径
 						meta: {
-							title: 'message.router.underlyingRoleManage', //角色权限
+							title: 'message.router.dataRepertory', //gzs:左侧菜单栏显示的名称
 							isLink: '',
 							isHide: false,
 							isKeepAlive: true,
@@ -94,66 +128,178 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 						},
 					},
 					{
-						path: '/underlying/department',
-						name: 'underlyingDepartment',
-						component: () => import('/@/views/underlying/department/index.vue'),
+						path: '/data/good',
+						name: 'dataGood',//gzs:name一定不能重复
+						component: () => import('/@/views/data/good.vue'),//gzs:仓库管理页面文件的路径
 						meta: {
-							title: 'message.router.underlyingDepartment', //部门人员
+							title: 'message.router.dataGood', //gzs:左侧菜单栏显示的名称
 							isLink: '',
 							isHide: false,
 							isKeepAlive: true,
-							isAffix: false,
+							isAffix: false, 
+							isIframe: false,
+							roles: ['admin'],
+							icon: 'iconfont icon-caidan',
+						},
+					},
+					{
+						path: '/data/print',
+						name: 'printGood',//gzs:name一定不能重复
+						component: () => import('/@/views/data/print.vue'),//gzs:仓库管理页面文件的路径
+						meta: {
+							title: '打印机', //gzs:左侧菜单栏显示的名称
+							isLink: '',
+							isHide: true,
+							isKeepAlive: true,
+							isAffix: false, 
 							isIframe: false,
 							roles: ['admin'],
 							icon: 'iconfont icon-caidan',
 						},
 					},
+					
 				],
 			},
 			{
-				path: '/system',
-				name: 'system',
+				path: '/order',
+				name: 'order',
 				component: () => import('/@/layout/routerView/parent.vue'),
-				redirect: '/system/baseSettings',
+				redirect: '/data/index',
 				meta: {
-					title: 'message.router.system',
+					title: '出入库业务',
 					isLink: '',
 					isHide: false,
 					isKeepAlive: true,
 					isAffix: false,
 					isIframe: false,
 					roles: ['admin'],
-					icon: 'iconfont icon-xitongshezhi',
+					icon: 'iconfont icon-zhongduancanshu',
 				},
 				children: [
 					{
-						path: '/system/baseSettings',
-						name: 'systemBaseSettings',
-						component: () => import('/@/views/system/baseSettings/index.vue'),
+						path: '/order/inout',
+						name: 'orderInout',//gzs:name一定不能重复
+						component: () => import('/@/views/order/inout.vue'),//gzs:仓库管理页面文件的路径
 						meta: {
-							title: 'message.router.systemBaseSettings',
+							title: 'message.router.orderInout', //gzs:左侧菜单栏显示的名称
 							isLink: '',
 							isHide: false,
 							isKeepAlive: true,
 							isAffix: false,
 							isIframe: false,
 							roles: ['admin'],
-							icon: 'iconfont icon-caidan',
+							icon: 'iconfont icon-zhongduancanshu',
 						},
 					},
 					{
-						path: '/system/message',
-						name: 'systemMessage',
-						component: () => import('/@/views/system/message/index.vue'),
+						path: '/order/transfer',//调拨
+						name: 'orderTransfer',//gzs:name一定不能重复
+						component: () => import('/@/views/order/transfer.vue'),//gzs:仓库管理页面文件的路径
 						meta: {
-							title: 'message.router.systemMessage',
+							title: 'message.router.orderTransfer', //gzs:左侧菜单栏显示的名称
 							isLink: '',
-							isHide: true,
+							isHide: false,
 							isKeepAlive: true,
 							isAffix: false,
 							isIframe: false,
 							roles: ['admin'],
-							icon: 'iconfont icon-caidan',
+							icon: 'iconfont icon-zhongduancanshu',
+						},
+					},
+					{
+						path: '/order/inventory',//盘点
+						name: 'orderInventory',//gzs:name一定不能重复
+						component: () => import('/@/views/order/inventory.vue'),//gzs:仓库管理页面文件的路径
+						meta: {
+							title: 'message.router.orderInventory', //gzs:左侧菜单栏显示的名称
+							isLink: '',
+							isHide: false,
+							isKeepAlive: true,
+							isAffix: false,
+							isIframe: false,
+							roles: ['admin'],
+							icon: 'iconfont icon-zhongduancanshu',
+						},
+					},
+				],
+			},
+			{
+				path: '/inventory',
+				name: 'inventory',
+				component: () => import('/@/layout/routerView/parent.vue'),
+				redirect: '/data/index',
+				meta: {
+					title: '库存报表',
+					isLink: '',
+					isHide: false,
+					isKeepAlive: true,
+					isAffix: false,
+					isIframe: false,
+					roles: ['admin'],
+					icon: 'iconfont icon-zhongduancanshuchaxun',
+				},
+				children: [
+					{
+						path: '/inventory/realinventory',//在途库存
+						name: 'inventoryRealinventory',//gzs:name一定不能重复
+						component: () => import('/@/views/inventory/realinventory.vue'),//gzs:仓库管理页面文件的路径
+						meta: {
+						title: 'message.router.inventoryRealinventory', //gzs:左侧菜单栏显示的名称
+						isLink: '',
+						isHide: false,
+						isKeepAlive: true,
+						isAffix: false,
+						isIframe: false,
+						roles: ['admin'],
+						icon: 'iconfont icon-zhongduancanshuchaxun',
+						},
+					},
+					{
+						path: '/inventory/intransit',//实时库存
+						name: 'inventoryIntransit',//gzs:name一定不能重复
+						component: () => import('/@/views/inventory/intransit.vue'),//gzs:仓库管理页面文件的路径
+						meta: {
+						title: 'message.router.inventoryIntransit', //gzs:左侧菜单栏显示的名称
+						isLink: '',
+						isHide: false,
+						isKeepAlive: true,
+						isAffix: false,
+						isIframe: false,
+						roles: ['admin'],
+						icon: 'iconfont icon-zhongduancanshuchaxun',
+						},
+					},
+				],
+			},
+			{
+				path: '/system',
+				name: 'system',
+				component: () => import('/@/layout/routerView/parent.vue'),
+				redirect: '/system/baseSettings',
+				meta: {
+					title: 'message.router.system',
+					isLink: '',
+					isHide: false,
+					isKeepAlive: true,
+					isAffix: false,
+					isIframe: false,
+					roles: ['admin'],
+					icon: 'iconfont icon-xitongshezhi',
+				},
+				children: [
+					{
+						path: '/system/baseSettings',
+						name: 'systemBaseSettings',
+						component: () => import('/@/views/system/baseSettings/index.vue'),
+						meta: {
+							title: 'message.router.systemBaseSettings',
+							isLink: '',
+							isHide: false,
+							isKeepAlive: true,
+							isAffix: false,
+							isIframe: false,
+							roles: ['admin'],
+							icon: 'iconfont icon-xitongshezhi',
 						},
 					},
 				],

+ 10 - 5
h5/src/stores/themeConfig.ts

@@ -1,3 +1,4 @@
+import { fa } from 'element-plus/es/locale';
 import { defineStore } from 'pinia';
 
 /**
@@ -131,21 +132,25 @@ export const useThemeConfig = defineStore('themeConfig', {
 			 * 后端控制路由
 			 */
 			// 是否开启后端控制路由
-			isRequestRoutes: true,
+			isRequestRoutes: false,
 
 			/**
 			 * 全局网站标题 / 副标题
 			 */
 			// 网站主标题(菜单导航、浏览器当前网页标题)
-			globalTitle: '计件工资管理系统',
+			globalTitle: '简易仓储管理系统',
 			// 网站副标题(登录页顶部文字)
-			globalViceTitle: '韶能集团广东绿洲生态科技有限公司',
+			globalViceTitle: '简易仓储管理系统',
 			// 网站副标题(登录页顶部文字)(专注、免费、开源、维护、解疑)
-			globalViceTitleMsg: '计件工资管理系统',
+			globalViceTitleMsg: 'v1.0.1',
 			// 默认初始语言,可选值"<zh-cn|en|zh-tw>",默认 zh-cn
 			globalI18n: 'zh-cn',
 			// 默认全局组件大小,可选值"<large|'default'|small>",默认 'large'
-			globalComponentSize: 'large',
+			globalComponentSize: 'default',
+			//默认分页大小数组
+			pageSizeArray: [10, 20, 30, 40, 50, 100],
+			//默认分页大小
+			pageSize: 20,
 		},
 	}),
 	actions: {

+ 3 - 1
h5/src/theme/index.scss

@@ -1,7 +1,9 @@
 @import './app.scss';
 @import 'common/transition.scss';
+@import './common/ycCommon.scss';
+@import './common/ycIndex.scss';
 @import './other.scss';
 @import './element.scss';
 @import './media/media.scss';
 @import './waves.scss';
-@import './dark.scss';
+@import './dark.scss';

+ 2 - 0
h5/src/types/pinia.d.ts

@@ -87,5 +87,7 @@ declare interface ThemeConfigState {
 		globalViceTitleMsg: string;
 		globalI18n: string;
 		globalComponentSize: string;
+		pageSizeArray: number[];
+		pageSize: number;
 	};
 }

+ 31 - 34
h5/src/utils/net/Http.ts

@@ -1,40 +1,37 @@
-import Sign from "./Sign.js";
-const tagInfo = "/utils/net/Http.ts";
-import to from "await-to-js";
+import Sign from './Sign.js';
+const tagInfo = '/utils/net/Http.ts';
+import to from 'await-to-js';
 import request from '../request.ts';
 import { Session } from '/@/utils/storage';
 const Http = {
+	async post(url: string, param: object = {}): Promise<any> {
+		console.log(tagInfo, 'get param', param);
 
-    async post(url: string, param: object = {}): Promise<any> {
-        param = this.combineData(param);
-        console.log(tagInfo, "get param", param);
-
-        let [err, res] = await to(request.post(url, param));
-        if (err) {
-            return { code: 999, data: err, msg: "请求失败" };
-        }
-        return res;
-    },
-    async get(url: string, param: object = {}): Promise<any> {
-        //param = sign(param);
-        let [err, res] = await to(request.get(url, { params: this.combineData(param) }));
-        if (err) {
-            console.log('err',err);
-            return { code: 999, data: err, msg: "请求失败" };
-        }
-        return res;
-    },
-    combineData(param: any = {}): any {
-        // 在请求发送之前做一些处理
-        // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
-        // config.headers['X-Token'] = token;
-        if (Session.get('token')) {
-            param.token = `${Session.get('token')}`;
-        }
-        param = Sign(param);
-        console.log(tagInfo, "http:param", param);
-        return param;
-    }
-}
+		let response = await request.post(url, param, { headers: { token: Session.get('token') } }).catch((err) => {
+			return { code: 999, data: err, msg: '请求失败' };
+		});
+		return response;
+	},
+	async get(url: string, param: object = {}): Promise<any> {
+		//param = sign(param);
+		let [err, res] = await to(request.get(url, { params: this.combineData(param) }));
+		if (err) {
+			console.log('err', err);
+			return { code: 999, data: err, msg: '请求失败' };
+		}
+		return res;
+	},
+	combineData(param: any = {}): any {
+		// 在请求发送之前做一些处理
+		// 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
+		// config.headers['X-Token'] = token;
+		if (Session.get('token')) {
+			param.token = `${Session.get('token')}`;
+		}
+		// param = Sign(param);
+		console.log(tagInfo, 'http:param', param);
+		return param;
+	},
+};
 
 export default Http;

+ 2 - 2
h5/src/utils/request.ts

@@ -2,13 +2,12 @@ import axios from 'axios';
 import { ElMessage, ElMessageBox } from 'element-plus';
 import { Session } from '/@/utils/storage';
 import config from '../config';
-import router from '../router';
 
 // 配置新建一个 axios 实例
 const service = axios.create({
 	baseURL: config.host,// import.meta.env.VITE_API_URL as any,
 	timeout: 50000,
-	headers: { 'Content-Type': 'application/json' },
+	headers: { 'Content-Type': 'application/json', 'Accept': '*/*', 'token': Session.get('token') },
 });
 
 // 添加请求拦截器
@@ -43,6 +42,7 @@ service.interceptors.response.use(
 	(response) => {
 		// 对响应数据做点什么
 		const res = response.data;
+		console.log('axios res:', response)
 		//console.log("service.interceptors.response", response, res);
 		if (res.code && res.code !== 0) {
 			// 刷新页面

Datei-Diff unterdrückt, da er zu groß ist
+ 45 - 44
h5/src/utils/ruleReg.ts


+ 3 - 126
h5/src/utils/utils.ts

@@ -1,6 +1,4 @@
 import ruleReg from '/@/utils/ruleReg.ts';
-const synth = window.speechSynthesis;
-const msg = new SpeechSynthesisUtterance();
 const Utils = {
     /**
      * @description 深拷贝的方法
@@ -71,81 +69,14 @@ const Utils = {
         return `${year}-${month}-${day}`;
     },
 
-    // 获取当前时间
-    getTime(format: string = ""){
-        let date = new Date(); //创建时间对象
-        let hours = date.getHours(); //当前年份
-        let minutes:string|number = date.getMinutes(); //当前月份
-        let seconds:string|number = date.getSeconds(); //当前日期
-        minutes = minutes<10 ? '0'+minutes : String(minutes);
-        seconds = seconds<10 ? '0'+seconds : String(seconds);
-        if(format == 'count'){
-            return `${seconds}`;
-        }
-        if(format == 'desc'){
-            return `${hours}:${minutes}`;
-        }
-        return `${hours}:${minutes}:${seconds}`;
-    },
-
-    // 计算今天星期几
-    getWeek(date: any){
-        let week = new Date(date).getDay();
-        switch(Number(week)){
-            case 0:
-                return "星期天";
-            case 1:
-                return "星期一";
-            case 2:
-                return "星期二";
-            case 3:
-                return "星期三";
-            case 4:
-                return "星期四";
-            case 5:
-                return "星期五";
-            case 6:
-                return "星期六";
-        }
-    },
-
-    // 计算当前日期后n天,传负数可以计算前n天  Utils.recentTime(i,"yyyy-MM-dd",date)
-    recentTime(day:any,fmt:any,time:any){ 
-        //获取当前时间的毫秒值
-        let now = (time? new Date(time) :new Date()).getTime();
-        // 获取前后n天时间
-        let recent = new Date(now+day*24*60*60*1000)
-        
-        // key:正则匹配表达式,value:对应的时间、日期
-        let fmtObj = {
-            'M+': recent.getMonth()+1, 		//月份
-            'd+': recent.getDate(),  		//日
-            'h+': recent.getHours(), 		//时
-            'm+': recent.getMinutes(),		//分
-            's+': recent.getSeconds(),		//秒
-        }
-        // 获取匹配年份替换
-        if(/(y+)/.test(fmt)){
-            //RegExp.$1 匹配结果,替换成对应的长度。如:yyyy就替换成整个年份2021,yy就替换成后两位21,以此类推
-            fmt = fmt.replace(RegExp.$1,(recent.getFullYear()+'').substr(4-RegExp.$1.length))
-        }
-        for(let key in fmtObj){
-            if(new RegExp(`(${key})`).test(fmt)){
-                //日期,时、分、秒替换,判断fmt是否需要补0,如:yyyy-M-d h:m:s 不补0,yyyy-MM-dd hh:mm:ss 则自动补0
-                fmt = fmt.replace(RegExp.$1,RegExp.$1.length==1 ? fmtObj[key] : ('00'+fmtObj[key]).substr((''+fmtObj[key]).length))
-            }
-        }
-        return fmt
-    },
-
     /**
      * @description 获取当前日期(自定义格式)
      * @param format 
-     * @returns y-m-d, y-m, y-m-d H:M:S
+     * @returns y-m-d H:M:S, y-m-d, y-m, H:M:S, H:M
      */
     getDateFormat(format: string){
         if(!ruleReg.emptyReg(format)){
-            return '请传入日期格式,支持的格式:y-m-d, y-m, y-m-d H:M:S';
+            return '请传入日期格式,支持的格式:y-m-d H:M:S, y-m-d, y-m, H:M:S, H:M';
         }
         let result;
         let date = new Date();
@@ -170,20 +101,14 @@ const Utils = {
             case 'y-m':
                 result = `${y}-${m}`;
                 break;
-            case 'm-d':
-                result = `${m}-${d}`;
-                break;
             case 'H:M:S':
                 result = `${H}:${M}:${S}`;
                 break;
             case 'H:M':
                 result = `${H}:${M}`;
                 break;
-            case 'M:S':
-                result = `${M}:${S}`;
-                break;
             default:
-                result = `日期格式'${format}'不正确,支持的格式:y-m-d, y-m, y-m-d H:M:S`;
+                result = `日期格式'${format}'不正确,支持的格式:y-m-d H:M:S, y-m-d, y-m, H:M:S, H:M`;
                 break;
         }
         return result;
@@ -199,53 +124,5 @@ const Utils = {
         let random = Math.random() * (m - n) + n;
         return random.toFixed(0);
     },
-
-    //时间戳转换为时间(Calendar.vue)
-    timeToken(token: any){
-        let date = new Date(token);
-        let H: string | number = date.getHours();
-        let M: string | number = date.getMinutes();
-        let S: string | number = date.getSeconds();
-        H = H<10 ? `0${H}` : H;
-        M = M<10 ? `0${M}` : M;
-        S = S<10 ? `0${S}` : S;
-        return `${H}:${M}:${S}`;
-    },
-
-    /**
-     * 这个方法接受一个形如"YYYY-MM-DDTHH:mm:ss"格式的字符串作为预设时间,
-     * 返回一个布尔值,表示当前时间和预设时间之间的差值是否小于10分钟。
-     * 具体实现中,我们首先获取当前时间和预设时间的时间戳,然后计算它们之间的时间差,
-     * 最后判断时间差是否小于10分钟(单位为毫秒)。
-     * @param presetTime 
-     * @returns 
-     */
-    isWithin10Minutes(presetTime: any) {
-        // 获取当前时间和预设时间的时间戳(单位:毫秒)
-        const currentTime = Date.now();
-        const presetTimeMillis = new Date(presetTime).getTime();
-      
-        // 计算时间差(单位:毫秒)
-        const timeDiff = Math.abs(currentTime - presetTimeMillis);
-      
-        // 判断时间差是否小于10分钟(单位:毫秒)
-        return timeDiff < 10 * 60 * 1000;
-    },
-
-    // 语音播报的函数
-    handleSpeak(text: string){
-        msg.text = text; // 文字内容: 小朋友,你是否有很多问号
-        msg.lang = "zh-CN"; // 使用的语言:中文
-        msg.volume = 1; // 声音音量:1
-        msg.rate = 1; // 语速:1
-        msg.pitch = 1; // 音高:1
-        synth.speak(msg); // 播放
-    },
-    // 语音停止
-    handleStop(e: any){
-        msg.text = e;
-        msg.lang = "zh-CN";
-        synth.cancel(msg);
-    },
 }
 export default Utils;

+ 326 - 69
h5/src/views/home/index.vue

@@ -1,46 +1,175 @@
 <template>
 	<div class="home-container layout-pd">
-		<el-card class="box-card" v-if="state.isNum1>0">
-			<template #header>
-				<div class="card-header">
-					<span>基础数据</span>
+		<div class="tbox">
+			<div class="tboxct">
+				<div class="tbimg">
+					<img class="tboxctimg" src="../../assets/pd.png" />
 				</div>
-			</template>
-			<div class="disflex">
-				<div v-for="(item,index) in state.list1" :key="index" class="text mb18 mr24" @click="routerLink(item.path)">
-					<div v-if="item.isShow">
-						<el-image style="width: 100px; height: 100px" :src="item.url" />
-						<div class="text mt10">{{item.text}}</div>
-					</div>
+				<div class="tboxctr">
+					<div class="tboxctrt">今日出入库</div>
+					<div class="tboxctrb">{{ state.menus.ioCount }}</div>
 				</div>
 			</div>
-		</el-card>
-
-		<el-card class="box-card mt20" v-if="state.isNum4>0">
-			<template #header>
-				<div class="card-header">
-					<span>系统设置</span>
+			<div class="tboxct">
+				<div class="tbimg">
+					<img class="tboxctimg" src="../../assets/ck.png" />
 				</div>
-			</template>
-			<div class="disflex">
-				<div v-for="(item,index) in state.list4" :key="index" class="text mb18 mr24" @click="routerLink(item.path)">
-					<div v-if="item.isShow">
-						<el-image style="width: 100px; height: 100px" :src="item.url" />
-						<div class="text mt10">{{item.text}}</div>
-					</div>
+				<div class="tboxctr">
+					<div class="tboxctrt">盘点</div>
+					<div class="tboxctrb">{{ state.menus.checkCount }}</div>
+				</div>
+			</div>
+			<div class="tboxct">
+				<div class="tbimg">
+					<img class="tboxctimg" src="../../assets/ck.png" />
+				</div>
+				<div class="tboxctr">
+					<div class="tboxctrt"> 调拨</div>
+					<div class="tboxctrb">{{ state.menus.allcationCount }}</div>
 				</div>
 			</div>
-		</el-card>
+			<div class="tboxct">
+				<div class="tbimg">
+					<img class="tboxctimg" src="../../assets/rk.png" />
+				</div>
+				<div class="tboxctr">
+					<div class="tboxctrt"> 物品总数</div>
+					<div class="tboxctrb">{{ state.menus.goodTotal }}</div>
+				</div>
+			</div>
+			<div class="tboxct">
+				<div class="tbimg">
+					<img class="tboxctimg" src="../../assets/cktal.png" />
+				</div>
+				<div class="tboxctr">
+					<div class="tboxctrt">仓库总数</div>
+					<div class="tboxctrb">{{ state.menus.repoCount }}</div>
+				</div>
+			</div>
+		</div>
+		<el-row gutter="10">
+			<el-col :span="6">
+				<el-card class="box-card mt20">
+					<template #header>
+						<div class="card-header">
+							<span>账号管理</span>
+						</div>
+					</template>
+					<div class="disflex">
+						<div v-for="(item, index) in state.list1" :key="index" class="text mb18 mr15"
+							@click="routerLink(item.path)">
+							<div>
+								<el-image style="width: 100px; height: 100px" :src="item.url" />
+								<div class="text mt10">{{ item.text }}</div>
+							</div>
+						</div>
+					</div>
+				</el-card>
+				<el-card class="box-card mt20">
+					<template #header>
+						<div class="card-header">
+							<span>出入库业务</span>
+						</div>
+					</template>
+					<div class="disflex">
+						<div v-for="(item, index) in state.list3" :key="index" class="text mb18 mr15"
+							@click="routerLink(item.path)">
+							<div>
+								<el-image style="width: 100px; height: 100px" :src="item.url" />
+								<div class="text mt10">{{ item.text }}</div>
+							</div>
+						</div>
+					</div>
+				</el-card>
+			</el-col>
+			<el-col :span="6">
+				<el-card class="box-card mt20">
+					<template #header>
+						<div class="card-header">
+							<span>基础数据</span>
+						</div>
+					</template>
+					<div class="disflex">
+						<div v-for="(item, index) in state.list2" :key="index" class="text mb18 mr15"
+							@click="routerLink(item.path)">
+							<div>
+								<el-image style="width: 100px; height: 100px" :src="item.url" />
+								<div class="text mt10">{{ item.text }}</div>
+							</div>
+						</div>
+					</div>
+				</el-card>
+				<el-card class="box-card mt20">
+					<template #header>
+						<div class="card-header">
+							<span>库存报表</span>
+						</div>
+					</template>
+					<div class="disflex">
+						<div v-for="(item, index) in state.list4" :key="index" class="text mb18 mr15"
+							@click="routerLink(item.path)">
+							<div>
+								<el-image style="width: 100px; height: 100px" :src="item.url" />
+								<div class="text mt10">{{ item.text }}</div>
+							</div>
+						</div>
+					</div>
+				</el-card>
+			</el-col>
+			<el-col :span="12" class="">
+				<el-card class="box-card mt20">
+					<template #header>
+						<div class="card-header">
+							<span>最新出入库数据</span>
+						</div>
+					</template>
+					<el-card class="box-card ">
+						<!-- 列表 -->
+						<el-table :data="state.tableData" height="374">
+							<!-- props绑定数据表的字段,lable填写中文 -->
+							<el-table-column prop="id" label="序号" width="" />
+							<el-table-column prop="io_id" label="订单号" width="" />
+							<el-table-column prop="good_name" label="物品名称" width="150" />
+							<el-table-column prop="repo_name" label="仓库" width="150" />
+							<el-table-column prop="date" label="日期" width="100" />
+							<el-table-column label="出/入" width="">
+								<template #default="scope">
+									<div style="display: flex; align-items: center">
+										<el-image style="width: 40px;" v-if="scope.row.type == 1"
+											:src="config.file + '/public/static/left.png'" />
+										<el-image style="width: 40px;" v-else
+											:src="config.file + '/public/static/right.png'" />
+									</div>
+								</template>
+							</el-table-column>
+							<el-table-column prop="num" label="数量" width="" />
+						</el-table>
+					</el-card>
+				</el-card>
+			</el-col>
+		</el-row>
+		<div class="box">v1.1.7</div>
 	</div>
 </template>
 
 <script setup lang="ts" name="home">
-import { onMounted, reactive } from 'vue';
-import config from '/@/config.ts';
+import { onMounted, reactive, computed } from 'vue';
+import { ElMessage, ElMessageBox } from 'element-plus';
+import { storeToRefs } from 'pinia';
+import { useThemeConfig } from '/@/stores/themeConfig';
+import config from '/@/config';
 import router from '/@/router';
+import Repertory from '/@/api/model/Repertory';
 import { Session } from '/@/utils/storage';
 import { useMenuApi } from '/@/api/menu/index';
 
+// 定义变量内容
+const storesThemeConfig = useThemeConfig();
+const { themeConfig } = storeToRefs(storesThemeConfig);
+// 获取布局配置信息
+const getThemeConfig = computed(() => {
+	return themeConfig.value;
+});
 // 引入 api 请求接口
 const menuApi = useMenuApi();
 
@@ -48,95 +177,223 @@ const menuApi = useMenuApi();
 const state = reactive({
 	list1: [
 		{
-			url: config.file + '/static/tinified/Group57.png',
-			text: '账号权限02',
-			path: 'underlyingRoleManage',
+			url: config.file + '/public/static/zhgl.png',
+			text: '账号管理',
+			path: 'adminMng',
+		},
+	],
+	list2: [
+		{
+			url: config.file + '/public/static/ckgl.png',
+			text: '仓库管理',
+			path: 'dataRepertory',
 		},
 		{
-			url: config.file + '/static/tinified/Group58.png',
-			text: '部门人员03',
-			path: 'underlyingDepartment',
+			url: config.file + '/public/static/wpgl.png',
+			text: '物品管理',
+			path: 'dataGood',
+		},
+	],
+	list3: [
+		{
+			url: config.file + '/public/static/crkgl.png',
+			text: '出入库管理',
+			path: 'orderInout',
+		},
+		{
+			url: config.file + '/public/static/db.png',
+			text: '调拨',
+			path: 'orderTransfer',
+		},
+		{
+			url: config.file + '/public/static/pdd.png',
+			text: '盘点',
+			path: 'orderInventory',
 		},
 	],
 	list4: [
 		{
-			url: config.file + '/static/tinified/Group76.png',
-			text: '基础设置25',
-			path: 'systemBaseSettings',
+			url: config.file + '/public/static/ztkc.png',
+			text: '在途库存',
+			path: 'inventoryRealinventory',
+		},
+		{
+			url: config.file + '/public/static/sskc.png',
+			text: '实时库存',
+			path: 'inventoryIntransit',
 		},
 	],
 	codes: [] as any,
+	menus: [] as any,
 	isNum1: 0,
+	isNum2: 0,
+	isNum3: 0,
 	isNum4: 0,
+	params: {
+		pageSize: getThemeConfig.value.pageSize, //分页大小
+		page: 1, //当前页面
+	},
+	tableData: [] as any,
 });
+/**
+ * 页面初始化方法,有就写逻辑,没有可以留空
+ */
+const init = async () => {
+	let res = await Repertory.IoDetail({
+		pageParams: {
+			page: state.params.page,
+			size: state.params.pageSize
+		}
+	});
+	if (res.code != 0) {
+		ElMessage.error(res.msg);
+		return;
+	}
+	state.tableData = res.data.data;
+};
 const routerLink = (path: any) => {
-	router.replace({name: path});
+	router.replace({ name: path });
 }
-onMounted(async()=>{
+onMounted(async () => {
 	let menus = await menuApi.getMenuAdmin();
-	// let menus = Session.get('menus');
-	// console.log('menus',menus.data);
+	// let menuss = Session.get('menus');
+	console.log('menus', menus);
+	state.menus = menus.data
 	await treeFormat(menus.data);
-	await menuAdmin(state.list1,1);
-	await menuAdmin(state.list4,4);
+	await menuAdmin(state.list1, 1);
+	await menuAdmin(state.list2, 2);
+	await menuAdmin(state.list3, 3);
+	await menuAdmin(state.list4, 4);
 })
 //权限处理
-const menuAdmin = (menu_list:any,index:number) => {
+const menuAdmin = (menu_list: any, index: number) => {
 	let isNum = 0;
-	menu_list.forEach((item:any)=>{
+	menu_list.forEach((item: any) => {
 		item.isShow = false;
-		state.codes.forEach((item2:any)=>{
-			if(item.path==item2){
+		state.codes.forEach((item2: any) => {
+			if (item.path == item2) {
 				item.isShow = true;
 				isNum += 1;
 			}
 		})
 	})
-	switch(index){
+	switch (index) {
 		case 1:
 			state.isNum1 = isNum;
 			break;
+		case 2:
+			state.isNum2 = isNum;
+			break;
+		case 3:
+			state.isNum3 = isNum;
+			break;
 		case 4:
 			state.isNum4 = isNum;
 			break;
 	}
-	// console.log('menu_list',menu_list);
-	// console.log('state.isNum1',state.isNum1);
-	// console.log('state.isNum4',state.isNum4);
 	return menu_list;
 }
 // 树状列表处理
-const treeFormat = (tree_list:any) => {
-	tree_list.forEach((item:any)=>{
+const treeFormat = (tree_list: any) => {
+	tree_list.forEach((item: any) => {
 		state.codes.push(item.name);
-		if(item.children){
+		if (item.children) {
 			treeFormat(item.children);
 		}
 	})
 }
+/**
+ * 页面加载时事件
+ */
+onMounted(async () => {
+	init();
+});
 </script>
 
 <style scoped lang="scss">
-	.disflex{
-		display: flex;
-		flex-wrap: wrap;
+.box {
+	margin-top: 50px;
+	text-align: center;
+}
+
+.disflex {
+	display: flex;
+	flex-wrap: wrap;
+}
+
+.card-header {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+
+	span {
+		font-size: 20px;
+		font-family: PingFang SC-Semibold, PingFang SC;
+		font-weight: 600;
+		color: #000000;
+		line-height: 23px;
+		letter-spacing: 2px;
 	}
-	.card-header {
+}
+
+.text {
+	font-size: 14px;
+	text-align: center;
+	cursor: pointer;
+}
+
+.tbox {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	width: 100%;
+	height: 112px;
+	background-image: url(../../assets/bg.png);
+	border-radius: 25px;
+
+	.tboxct {
+		width: 100%;
 		display: flex;
-		justify-content: space-between;
 		align-items: center;
-		span{
-			font-size: 20px;
-			font-family: PingFang SC-Semibold, PingFang SC;
-			font-weight: 600;
-			color: #000000;
-			line-height: 23px;
-			letter-spacing: 2px;
+		border-right: 1px solid #FFFFFF;
+
+		.tbimg {
+			width: 50px;
+			height: 50px;
+			background-color: rgba(255, 255, 255, 0.1);
+			border-radius: 32px;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-left: 32px;
+
+			.tboxctimg {
+				width: 24px;
+				height: 24px;
+			}
 		}
+
+		.tboxctr {
+			color: #FFFFFF;
+			margin-left: 16px;
+
+			.tboxctrt {
+				font-size: 14px;
+			}
+
+			.tboxctrb {
+				font-weight: bold;
+				font-size: 24px;
+			}
+		}
+
 	}
-	.text {
-		font-size: 14px;
-		text-align: center;
-		cursor: pointer;
+
+	.tboxct:last-child {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		border-right: 0px solid #FFFFFF;
 	}
+}
 </style>

+ 6 - 6
h5/src/views/home/index_custom.vue

@@ -1,20 +1,20 @@
 <template>
-    <div class="home-container layout-pd">
-		  <h1>欢迎使用{{state.name}}</h1>
-		  <span>{{state.version}}</span>
-    </div>
+	<div class="home-container layout-pd">
+		<h1>欢迎使用{{ state.name }}</h1>
+		<span>{{ state.version }}</span>
+	</div>
 </template>
 
 <script setup lang="ts">
 //  name="home"
-import { reactive } from '@vue/reactivity';
+import { reactive } from 'vue';
 import { Local, Session } from '/@/utils/storage';
 import config from '/@/config.ts';
 const themeConfig = Local.get('themeConfig');
 const state = reactive({
 	name: themeConfig.globalTitle,
 	version: config.version,
-})
+});
 </script>
 
 <style scoped lang="scss">

+ 40 - 36
h5/src/views/login/component/account.vue

@@ -45,7 +45,7 @@
 			</el-col>
 			<el-col :span="1"></el-col>
 			<el-col :span="8">
-				<el-button class="login-content-code" v-waves @click="flushCode()">{{state.codeNum}}</el-button>
+				<el-button class="login-content-code" v-waves @click="flushCode()">{{ state.codeNum }}</el-button>
 			</el-col>
 		</el-form-item>
 
@@ -99,47 +99,50 @@ const state = reactive({
 });
 
 // 读取缓存
-let user_name = localStorage.getItem("user_name");
-let pass_word = localStorage.getItem("pass_word");
-if(user_name){
+let user_name = localStorage.getItem('user_name');
+let pass_word = localStorage.getItem('pass_word');
+if (user_name) {
 	state.ruleForm.phone = user_name;
 	state.checked1 = true;
-	console.log('state.checked1',state.checked1)
+	console.log('state.checked1', state.checked1);
 }
-if(pass_word){
+if (pass_word) {
 	state.ruleForm.password = pass_word;
 }
 // 监视是否勾选记住账号和密码
-watch(()=>state.checked1,(newValue,oldValue)=>{
-	console.log(newValue,oldValue);
-	// 清除缓存
-	if(newValue==false){
-		let user_name = localStorage.getItem("user_name");
-		let pass_word = localStorage.getItem("pass_word");
-		if(user_name){
-			localStorage.removeItem("user_name");
+watch(
+	() => state.checked1,
+	(newValue, oldValue) => {
+		console.log(newValue, oldValue);
+		// 清除缓存
+		if (newValue == false) {
+			let user_name = localStorage.getItem('user_name');
+			let pass_word = localStorage.getItem('pass_word');
+			if (user_name) {
+				localStorage.removeItem('user_name');
+			}
+			if (pass_word) {
+				localStorage.removeItem('pass_word');
+			}
 		}
-		if(pass_word){
-			localStorage.removeItem("pass_word");
+		if (newValue == true) {
+			localStorage.setItem('user_name', state.ruleForm.phone);
+			localStorage.setItem('pass_word', state.ruleForm.password);
 		}
 	}
-	if(newValue==true){
-		localStorage.setItem("user_name",state.ruleForm.phone);
-		localStorage.setItem("pass_word",state.ruleForm.password);
-	}
-});
+);
 
-onMounted(()=>{
+onMounted(() => {
 	flushCode();
-})
+});
 
 const flushCode = () => {
 	state.codeNum = '';
-	for(let i=0;i<4;i++){
-		state.codeNum += Number(9*Math.random()).toFixed(0);
+	for (let i = 0; i < 4; i++) {
+		state.codeNum += Number(9 * Math.random()).toFixed(0);
 	}
 	console.log(state.codeNum);
-}
+};
 
 // 时间获取
 const currentTime = computed(() => {
@@ -147,24 +150,24 @@ const currentTime = computed(() => {
 });
 // 登录
 const onSignIn = async () => {
-	if(state.ruleForm.code!=state.codeNum){
-		return ElMessage.error("验证码不正确");
+	if (state.ruleForm.code != state.codeNum) {
+		return ElMessage.error('验证码不正确');
 	}
 	let res = await Login.login(state.ruleForm);
-	if(res.code!=0){
+	if (res.code != 0) {
 		return ElMessage.error(res.msg);
 	}
-	if(res.data.is_pass!==1&&res.data.is_root!==1){
+	/* if (res.data.is_pass !== 1 && res.data.is_root !== 1) {
 		Session.clear();
 		return ElMessage.warning('抱歉,您的账号未审核通过,请联系管理员');
-	}
+	} */
 	state.loading.signIn = true;
-	Session.set('userInfo',res.data);
+	Session.set('userInfo', res.data);
 
 	// 设置缓存记住账号和密码
-	if(state.checked1==true){
-		localStorage.setItem("user_name",state.ruleForm.phone);
-		localStorage.setItem("pass_word",state.ruleForm.password);
+	if (state.checked1 == true) {
+		localStorage.setItem('user_name', state.ruleForm.phone);
+		localStorage.setItem('pass_word', state.ruleForm.password);
 	}
 
 	// 存储 token 到浏览器缓存
@@ -192,6 +195,7 @@ const onSignIn = async () => {
 // 登录成功后的跳转
 const signInSuccess = (isNoPower: boolean | undefined) => {
 	if (isNoPower) {
+		console.log('lzj500🚀 ~ file: account.vue:198 ~ signInSuccess ~ isNoPower:', isNoPower);
 		ElMessage.warning('抱歉,您没有登录权限');
 		Session.clear();
 	} else {
@@ -221,7 +225,7 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
 </script>
 
 <style scoped lang="scss">
-.checked-box{
+.checked-box {
 	position: absolute;
 	margin-top: -25px;
 }

+ 20 - 10
h5/src/views/system/baseSettings/index.vue

@@ -1,17 +1,27 @@
 <template>
-    <div>
-        <SystemConfig/>
-        <!-- <Balance/> -->
-    </div>
+	<el-card shadow="hover">
+		<template #header>
+			<div class="card-header">
+				<span>运行参数</span>
+			</div>
+		</template>
+		<Setting code="wechat" name="微信配置">
+			<template #form="{ content }">
+				<el-form-item label="AppId">
+					<el-input v-model="content.app_id" />
+				</el-form-item>
+				<el-form-item label="AppSecret">
+					<el-input type="password" v-model="content.app_secret" />
+				</el-form-item>
+			</template>
+		</Setting>
+	</el-card>
 </template>
 
 <script lang="ts" setup name="systemBaseSettings">
-    import { onMounted, reactive, toRefs, defineAsyncComponent } from 'vue';
+import { defineAsyncComponent } from 'vue';
 
-    const SystemConfig = defineAsyncComponent(() => import('/@/views/system/baseSettings/components/systemConfig.vue'));
-    const Balance = defineAsyncComponent(() => import('/@/views/system/baseSettings/components/balance.vue'));
+const Setting = defineAsyncComponent(() => import('./components/Setting.vue'));
 </script>
 
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 2 - 1
h5/vite.config.ts

@@ -45,13 +45,14 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
 					entryFileNames: `assets/[name].[hash].js`,
 					chunkFileNames: `assets/[name].[hash].js`,
 					assetFileNames: `assets/[name].[hash].[ext]`,
-					compact: true,
+					// compact: true,
 					manualChunks: {
 						vue: ['vue', 'vue-router', 'pinia'],
 						echarts: ['echarts'],
 					},
 				},
 			},
+            sourcemap: true
 		},
 		css: { preprocessorOptions: { css: { charset: false } } },
 		define: {