diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..bf7edd8 Binary files /dev/null and b/.DS_Store differ diff --git a/App.vue b/App.vue index 9d01108..96333d0 100644 --- a/App.vue +++ b/App.vue @@ -21,43 +21,46 @@ /*每个页面公共css */ @import '@/uni_modules/uni-scss/index.scss'; /* #ifndef APP-NVUE */ - @import '@/static/customicons.css'; + @import '@/static/customicons.css'; + @import 'uni.scss'; + /* #endif */ + // 设置整个项目的背景色 page { - background-color: #060B26; - color: #fff; + background-color: $uni-bg-color-default !important; + color: $uni-text-color-inverse; } - /* #endif */ .example-info { font-size: 14px; - color: #333; + color: $uni-text-color; padding: 10px; } .page_padding{padding: 14px;} .page_content{padding: 0 12px 10px;} //内容框 - .contentboxsty{border-radius: 8px;background: #1C2755;} + .contentboxsty{border-radius: 8px;background: $uni-bg-color-primary;} //没有底部边框 .noborbot{border-bottom:none !important} .t-icon{background-repeat: no-repeat;} - .icon22{width: 22px;height: 22px;} + .icon22{width: 22px;height: 22px;} + //字体大小 - .font12{font-size: $uni-font-size-sm;} - .font13{font-size:13px;} - .font14{font-size: $uni-font-size-base;} - .font15{font-size: 15px!important;} + .font12{font-size: 12px;} + .font13{font-size: 13px;} + .font14{font-size: 14px;} + .font15{font-size: 15px;} .font20{font-size: 20px;} .font22{font-size: 22px;} .font24{font-size: 24px;} .font35{font-size: 35px;} - .font_bold{font-weight: bold;} + .font_bold{font-weight: bold;} + //文字颜色 - .text_color_black{color: #000;} - .theme_color{color: #009688 }//主题绿 + .text_color_black{color: $uni-text-color-default;} + .theme_color{color: $uni-text-color-primary } //主题绿 //按钮颜色 - .but_color{background: #009688 !important;} - // .text_{color: #00B68D;} + .but_color{background: $uni-color-primary !important;} //布局 .flex_layout{display: flex;} @@ -71,33 +74,121 @@ .padd_left12{padding-left:12px;} //margin .mar_top12{margin-top: 12px;} - .page_list{margin-bottom: 12px;padding:0 12px;} + .page_list{margin-bottom: 12px;padding:0 12px;} + //有详情的列表 - .detail_list{margin-bottom: 12px; + .detail_list{ + margin-bottom: 12px; .list_top{ display: flex; padding:12px; font-size: 14px; border-radius: 8px 8px 0px 0px; background: linear-gradient(90deg, rgba(61, 84, 176, 0.70) 5.83%, rgba(58, 77, 158, 0.00) 73.76%); - .top_left{flex: 1;} + .top_left{flex: 1;display: flex;align-items: center; font-weight: bold;} + .top_right{display: flex;align-items: center;font-weight: bold;} + .top_right .arrow{margin-left: 5px;font-weight: normal;} } - .list_content{padding:12px;} + .list_content{padding:12px;position: relative;} + .list_content .card_right{position: absolute;top: 12px;right: 12px;} + + .card_right{ + display: flex; + flex-direction: column; + .status{ + padding: 3px 10px; + background: $uni-bg-color-success-dark; + color: $uni-text-color-success; + border-radius: 4px; + font-size: 12px; + } + .success{ + background: $uni-bg-color-success-dark; + color: $uni-text-color-success; + } + .warning{ + background: $uni-bg-color-warning-dark; + color: $uni-text-color-warning; + } + .error{ + background: $uni-bg-color-error-dark; + color: $uni-text-color-danger; + } + } + } + .flexBox .detail_list:first-child{ + margin-top: 2px; + } + // 检索固定 + .headerViewFixed{ + background: $uni-bg-color-default; } //页面固定按钮 .bottom_but{ - width: 100%; - position: fixed; - bottom: 0px; - background-color: #060B26; - border-top: 1px solid #2E3249; - height: 80px; + width: 100%; + position: fixed; + bottom: 0px; + background-color: #060B26; + border-top: 1px solid #2E3249; + height: 80px; // bottom: 40px;bottom: 40px;position: fixed;width: calc(100% - 28px); view{width: 50%;text-align: center;margin: 0 20px;border-radius: 19px;background: #DDD;line-height: 38px;height: 38px;margin-top: 6px;} } //底部固定添加按钮 - .page_bottom_button{width: 100%;position: fixed;bottom: 0px;background-color: #060B26;border-top: 1px solid #2E3249;height: 80px; + .page_bottom_button{ + width: 100%;position: fixed;bottom: 0px;background-color: #060B26;border-top: 1px solid #2E3249;height: 80px; .page_add{display: flex;justify-content: center;margin: 7px 20px;border-radius: 17.5px;background: #1C2755;line-height: 35px;} } - .bot_padding{padding-bottom: 100px;} + .bot_padding{padding-bottom: 100px;} + + .placeholderStyle{ + color: $uni-text-color-placeholder; + font-size: 14px; + } + + // 圆形进度条 + .progressBg{ + position: absolute; + left: 2px; + top: 2px; + z-index: 20; + background: $uni-bg-color-primary; + width: 98px; + height: 98px; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + border-radius: 50%; + } + .progressBox{ + background: $uni-bg-color-default-dark; + width: 90px; + height: 90px; + border-radius: 50%; + margin: 0 auto; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } + .circle-progress { + width: 102px; + height: 102px; + position: relative; + overflow: hidden; + background: $uni-bg-color-primary; + } + + .circle-progress__bar { + position: absolute; + z-index: 10; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; + height: 100%; + border-radius: 50%; + background-image: conic-gradient($uni-color-primary 0%, $uni-color-primary var(--progress), transparent 0); + } diff --git a/components/customTabBar/index.vue b/components/customTabBar/index.vue index 0d3c209..0127595 100644 --- a/components/customTabBar/index.vue +++ b/components/customTabBar/index.vue @@ -4,7 +4,7 @@ - + @@ -38,9 +38,9 @@ export default { }, { id: 1, - path: '/pages/person/person', - // icon: '/static/logo.png', - // selectIcon: '/static/logo.png', + path: '', + icon: '/static/sweep.png', + selectIcon: '', text: '扫一扫', // 通过类名class控制样式大小 centerItem: true @@ -60,11 +60,34 @@ export default { this.currentItem = this.currentPage }, methods: { - changeItem (item) { - uni.switchTab({ - url: item.path - }) - } + changeItem (item) { + if(item.centerItem){ + this.scanQRCode(); + return + } + uni.switchTab({ + url: item.path + }) + }, + scanQRCode(){ + uni.scanCode({ + success: (res) => { + console.log('扫码结果:' + res.result); + uni.showModal({ + title: '扫码结果', + content: res.result, + showCancel: false + }); + }, + fail: (err) => { + console.error('扫码失败:' + err); + uni.showToast({ + title: '扫码失败', + icon: 'none' + }); + } + }); + } } }; @@ -74,18 +97,32 @@ view { margin: 0; box-sizing: border-box; } +.tabbar-container::before{ + content: ''; + position: absolute; + left: 10%; + top: 0; + z-index: 10; + height: 1px; + width: 80%; + background-image: linear-gradient(90deg, $uni-border-color-default, $uni-color-primary 50%, $uni-border-color-default); + background-size: 100% 1px; + background-repeat:no-repeat; + z-index: 1; +} .tabbar-container { position: fixed; bottom: 0rpx; left: 0rpx; width: 100%; height: 110rpx; - box-shadow: 0 0 5px #999; display: flex; align-items: center; padding: 5rpx 0; - color: #999999; - background: #131E3B; + color: $uni-text-color-grey; + background: $uni-border-color-default; + box-shadow: 0 2px 4px $uni-border-shadow-color-default; + /* 针对tabbar的统一处理 */ .tabbar-item { width: 33.33%; @@ -111,7 +148,7 @@ view { } // 被选中的导航栏字体 .item-active { - color: #fff; + color: $uni-text-color-inverse; } } @@ -119,15 +156,26 @@ view { .center-item { display: block; position: relative; + z-index: 20; .item-top { flex-shrink: 0; width: 100rpx; height: 100rpx; position: absolute; - top: -50rpx; + top: -60rpx; left: calc(50% - 50rpx); border-radius: 50%; - box-shadow: 0 0 5px #999; + box-shadow: 0 2px 4px $uni-border-shadow-color-default; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + border: 2px solid $uni-text-color-inverse; + .img{ + width: 100%; + height: 100%; + border-radius: 50%; + } } .item-bottom { position: absolute; @@ -136,7 +184,7 @@ view { .item-active { position: absolute; bottom: 5rpx; - color: #1fff; + color: $uni-text-color-inverse; } } } diff --git a/components/loadMore/index.vue b/components/loadMore/index.vue new file mode 100644 index 0000000..3a577ad --- /dev/null +++ b/components/loadMore/index.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/components/progressBar.vue b/components/progressBar.vue index 0b71300..de9117b 100644 --- a/components/progressBar.vue +++ b/components/progressBar.vue @@ -1,19 +1,14 @@ @@ -48,7 +43,7 @@ export default { } - \ No newline at end of file diff --git a/main.js b/main.js index e0f84df..b0d1d26 100644 --- a/main.js +++ b/main.js @@ -1,11 +1,22 @@ -import "./static/iconfont/iconfont.css" -import "./static/iconfont/iconfont-weapp/iconfont-weapp-icon.css" +import "./static/iconfont/iconfont.css" +import './static/css/app.css'; +import "./static/iconfont/iconfont-weapp/iconfont-weapp-icon.css" + +// 全局组件 +import searchView from './components/searchView/index' +import loadMore from './components/loadMore/index' +import progressBar from './components/progressBar' // #ifndef VUE3 import Vue from 'vue' -import App from './App' -import svg from './static/iconfont/svg.js' +import App from './App' +import svg from './static/iconfont/svg.js' + +Vue.component('search-view',searchView); +Vue.component('load-more',loadMore); +Vue.component('progress-bar',progressBar); + Vue.use(svg); @@ -25,7 +36,13 @@ import request from "./utils/api.js" import publicMethods from "./utils/public.js" export function createApp() { - const app = createSSRApp(App) + const app = createSSRApp(App) + + // 全局注册组件 + app.component('searchView', searchView); + app.component('loadMore', loadMore); + app.component('progressBar', progressBar); + app.config.globalProperties.$api = request; app.config.globalProperties.$wf = publicMethods; return { diff --git a/manifest.json b/manifest.json index a4b2d30..3dff693 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "mes-mobile01", + "name" : "mes-mobile", "appid" : "__UNI__41DB0F2", "description" : "", "versionName" : "1.0.0", @@ -52,9 +52,14 @@ /* 小程序特有相关 */ "appid" : "wx38dc81b0eef130a3", "setting" : { - "urlCheck" : false + "urlCheck" : false, + "postcss" : true, + "es6" : true, + "minified" : true }, - "usingComponents" : true + "usingComponents" : true, + "libVersion":"latest" }, - "vueVersion" : "3" + "vueVersion" : "3", + "locale" : "zh-Hans" } diff --git a/pages.json b/pages.json index 41078b0..890e916 100644 --- a/pages.json +++ b/pages.json @@ -35,7 +35,6 @@ "path" : "pages/login/login", "style" : { - // "navigationBarTitleText" : "登录", "enablePullDownRefresh" : false, "navigationStyle": "custom" } @@ -45,7 +44,10 @@ "style" : { "navigationBarTitleText" : "生产工单管理", - "enablePullDownRefresh" : false + "enablePullDownRefresh" : true, + "pullToRefresh":{ + "color":"red" + } } }, { @@ -184,13 +186,21 @@ "enablePullDownRefresh" : false } }], - "globalStyle": { + "globalStyle": { "navigationBarTextStyle": "white", "navigationBarTitleText": "德木自动化系统", - "navigationBarBackgroundColor": "#060B26", + "navigationBarBackgroundColor": "#060B26", + "backgroundColor":"#060B26", + "backgroundTextStyle":"light", "app-plus": { - "background": "#efeff4" - } + "background": "#060B26" + }, + "mp-weixin":{ + "background":"#060B26", + "pullToRefresh":{ + "color":"#060B26" + } + } }, "condition" : { //模式配置,仅开发期间生效 "current": 0, //当前激活的模式(list 的索引项) diff --git a/pages/index/index.vue b/pages/index/index.vue index 6136833..baa8510 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -25,7 +25,7 @@ ▴2.89% - + 1,567 @@ -43,7 +43,7 @@ ▴2.89% - + 1,567 @@ -61,7 +61,7 @@ ▴2.89% - + 1,567 @@ -79,7 +79,7 @@ ▴2.89% - + 1,567 @@ -97,7 +97,7 @@ ▴2.89% - + 1,567 @@ -115,7 +115,7 @@ ▴2.89% - + 1,567 @@ -166,14 +166,6 @@ 生产工单 - - - 工单进度 - - - - 工单出材率 - 生产报表 @@ -187,11 +179,19 @@ 排程管理 + + + + 工单进度 + + + + 工单出材率 - + @@ -205,8 +205,8 @@ 设备状态 - - + + 设备报修 @@ -300,7 +300,7 @@ .name{flex:1;} .accounticon{ margin-right: 5px; - color: #fff; + color: $uni-text-color-inverse; font-size: 20px; } .notifyicon{font-size: 20px;padding-right: 20px;} @@ -312,33 +312,43 @@ .content_title{line-height: 25px;font-size: 16px;padding: 15px 0;} .device_data{display: flex;flex-wrap: wrap; .device_module{ - width: calc(50% - 12px); /* 计算每个块的宽度(根据需要调整)*/ + width: calc(50% - 6px); /* 计算每个块的宽度(根据需要调整)*/ + // background-color: #ccc; /* 设置背景色(根据需要调整)*/ + background: $uni-bg-color-primary; margin:6px; - background-color: #ccc; /* 设置背景色(根据需要调整)*/ - padding: 10px; - background: #1C2755; + padding: 10px 14px; border-radius: 8px; display: flex; .module_left{width: 60%; - .icon_background{width: 32px;height: 32px;background: #6576B7;border-radius: 8px; display: flex;align-items: center;justify-content: center;margin-bottom: 4px;} + .icon_background{width: 32px;height: 32px;background: $uni-bg-color-info;border-radius: 8px; display: flex;align-items: center;justify-content: center;margin-bottom: 4px;} } .module_right{width: 40%; - .top{float: right;font-size: 10px;padding: 2px 4px;background: rgba(103,194,58,0.3);border-radius: 4px;color: #67C23A;} + .top{ + display: flex;flex-direction: column; font-size: 10px;padding: 2px 4px;background: rgba(103,194,58,0.3);border-radius: 4px;color: $uni-text-color-success; + } + .num{ + margin-top: 6px; + } } + } + .device_module:nth-child(even){ + margin-right: 0; + } + .device_module:nth-child(odd){ + margin-left: 0; } } - .energy_data{padding: 12px; height: 64px; display: flex;align-items: center;background: #1C2755;border-radius: 8px; - .energy_icon{color: #009688;font-size: 24px;margin-right: 8px;} + .energy_data{padding: 12px; height: 64px; display: flex;align-items: center;background: $uni-bg-color-primary;border-radius: 8px; + .energy_icon{color: $uni-text-color-primary;font-size: 24px;margin-right: 8px;} .energy_image{flex: 1;text-align: center; image{width: 86px;height: 32px;} } - .energy_number{color: #FA3758;} + .energy_number{color: $uni-text-color-danger;} } .content_data{ - // view{display: inline-block;width: 25%;} - padding: 10px 0;display: flex;position: relative;align-items: center;text-align: center;height: 98px; + padding: 10px 0;display: flex;position: relative;align-items: center;justify-content:flex-start;height: 98px; .content_module{ - width: 25%;margin: 10px 1%;height: 98px;display: flex;align-items: center;justify-content: center;flex-direction: column;background-color: #009688;border-radius: 8px; + width: calc(25% - 7px);margin: 10px 4px;height: 98px;display: flex;align-items: center;justify-content: center;flex-direction: column;background-color: $uni-color-primary;border-radius: 8px; .contenticon{font-size: 24px;width: 32px;height: 32px;background-repeat: no-repeat;} .contentname{padding-top: 2px;font-size: 12px;} } diff --git a/pages/index/materialYield.vue b/pages/index/materialYield.vue index 1430158..6e2b30a 100644 --- a/pages/index/materialYield.vue +++ b/pages/index/materialYield.vue @@ -1,50 +1,49 @@