上料/下料、报工/打印机配置/产线选择 、排产工单
| | |
| | | login(params) { |
| | | return http.post('/sys/login',params) |
| | | }, |
| | | |
| | | getLineList(){ |
| | | return http.get('base/factory/queryUserProductionLineList') |
| | | }, |
| | | /** |
| | | * ææºå·ç ç»å½ |
| | | */ |
| | |
| | | import modules from './modules' |
| | | import Vue from 'vue' |
| | | import Router from '@/plugin/uni-simple-router/index.js' |
| | | import { |
| | | ACCESS_TOKEN |
| | | } from '@/common/util/constants.js' |
| | | import { |
| | | isOAuth2AppEnv |
| | | } from '@/common/util/util.js' |
| | | import {ACCESS_TOKEN} from '@/common/util/constants.js' |
| | | |
| | | Vue.use(Router) |
| | | //åå§å |
| | | const router = new Router({ |
| | | |
| | | encodeURI: true, |
| | | routes: [...modules] //è·¯ç±è¡¨ |
| | | encodeURI:true, |
| | | routes: [...modules]//è·¯ç±è¡¨ |
| | | }); |
| | | |
| | | const whiteList = ['/pages/login/login', '/pages/login/loginOauth2'] |
| | | const whiteList = ['/pages/login/login'] |
| | | //å
¨å±è·¯ç±åç½®å®å« |
| | | router.beforeEach((to, from, next) => { |
| | | if (to.path == '/oauth2-app/login') { |
| | | let temp = location.href; |
| | | location.href = temp.replace('/oauth2-app/login', '/pages/login/loginOauth2') |
| | | return; |
| | | } |
| | | let token = uni.getStorageSync(ACCESS_TOKEN); |
| | | if (token) { |
| | | if (to.path === '/pages/login/login' || to.path === '/pages/login/loginOauth2') { |
| | | // if (from.path === '/pages/index/index') { |
| | | // return; |
| | | // } else { |
| | | // next() |
| | | // } |
| | | next({ |
| | | path: '/pages/index/index' |
| | | }) |
| | | } |
| | | next() |
| | | } else { |
| | | let token=uni.getStorageSync(ACCESS_TOKEN); |
| | | if(token){ |
| | | next() |
| | | }else{ |
| | | if (whiteList.indexOf(to.path) !== -1) { |
| | | // å¨å
ç»å½ç½ååï¼å¦æè¿å
¥ç页颿¯login页é¢å¹¶ä¸å½åæ¯OAuth2appç¯å¢ï¼å°±è¿å
¥OAuth2ç»å½é¡µé¢ |
| | | if (to.path === '/pages/login/login' && isOAuth2AppEnv()) { |
| | | next({ |
| | | path: '/pages/login/loginOauth2' |
| | | }) |
| | | } else { |
| | | // å¨å
ç»å½ç½ååï¼ç´æ¥è¿å
¥ |
| | | next() |
| | | } |
| | | } else { |
| | | // 妿å½åæ¯å¨OAuth2APPç¯å¢ï¼å°±è·³è½¬å°OAuth2ç»å½é¡µé¢ |
| | | let path = isOAuth2AppEnv() ? '/pages/login/loginOauth2' : '/pages/login/login'; |
| | | next({ |
| | | path: path |
| | | }) |
| | | next() |
| | | }else{ |
| | | next({ path: '/pages/login/login'}) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | // å
¨å±è·¯ç±åç½®å®å« |
| | | router.afterEach((to, from) => { |
| | | console.log("afterEach") |
| | | }); |
| | | export default router; |
| | | }) |
| | | export default router; |
| | |
| | | title: 'åå²ç¹æ£', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '/pages/checkList/checkListDetils/checkListDetils', |
| | | name: 'checkListDetils', |
| | |
| | | title: 'ç¹æ£-æ§è¡', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure', |
| | | name: 'ToDoListCheckSure', |
| | |
| | | title: 'éæ©è®¾å¤', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | path: '/pages/reportRepair/reportRepairList/reportRepairList', |
| | | name: 'reportRepairList', |
| | |
| | | title: 'æ¥ä¿®å表', |
| | | }, |
| | | }, |
| | | |
| | | |
| | | { |
| | | path: '/pages/annotation/annotationDetail', |
| | | name: 'annotationDetail', |
| | |
| | | meta: { |
| | | title: 'helloWorld', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/eam/production/ProductionManager/ProductionManager', |
| | | name: 'ProductionManager', |
| | | meta: { |
| | | title: 'ç产管ç', |
| | | }, |
| | | }, { |
| | | path: '/pages/eam/production/check/check', |
| | | name: 'check', |
| | | meta: { |
| | | title: 'é½å¥æ£æ¥', |
| | | }, |
| | | }, { |
| | | path: '/pages/eam/production/process/process', |
| | | name: 'process', |
| | | meta: { |
| | | title: 'å·¥èºç¹æ£', |
| | | }, |
| | | }, { |
| | | path: '/pages/eam/production/sample/sample', |
| | | name: 'process', |
| | | meta: { |
| | | title: 'æ ·ä»¶æ ¡éª', |
| | | }, |
| | | }, { |
| | | path: '/pages/eam/production/feed/feed', |
| | | name: 'process', |
| | | meta: { |
| | | title: '䏿', |
| | | }, |
| | | }, { |
| | | path: '/pages/eam/production/record/record', |
| | | name: 'record', |
| | | meta: { |
| | | title: 'æä½è®°å½', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/eam/quality/qualityInspection/qualityInspection', |
| | | name: 'qualityInspection', |
| | | meta: { |
| | | title: 'è´¨éæ£éª', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/pages/eam/quality/defectiveProductReview/defectiveProductReview', |
| | | name: 'defectiveProductReview', |
| | | meta: { |
| | | title: 'ä¸åæ ¼å审ç', |
| | | } |
| | | }, |
| | | { |
| | | path: '/pages/eam/quality/checkItem/checkItem', |
| | | name: 'checkItem', |
| | | meta: { |
| | | title: 'æ£éªé¡¹', |
| | | } |
| | | }, |
| | | { |
| | | path: '/pages/eam/quality/productionInspection/productionInspection', |
| | | name: 'productionInspection', |
| | | meta: { |
| | | title: 'ç产æ£éª', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/quality/qualityInspection/addInspection/addInspection', |
| | | name: 'addInspection', |
| | | meta: { |
| | | title: 'æ°å¢-ç产æ£éª', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/quality/checkItemDetail/checkItemDetail', |
| | | name: 'checkItemDetail', |
| | | meta: { |
| | | title: 'æ£éªæç»', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/quality/qualityInspectionDetail/qualityInspectionDetail', |
| | | name: 'qualityInspectionDetail', |
| | | meta: { |
| | | title: '详æ
', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/quality/inspectionDetail/inspectionDetail', |
| | | name: 'inspectionDetail', |
| | | meta: { |
| | | title: 'æ£éª-æç»', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/quality/reviewDocument/reviewDocument', |
| | | name: 'reviewDocument', |
| | | meta: { |
| | | title: '审çå', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/production/ToDoList/ToDoList', |
| | | name: 'ToDoList', |
| | | meta: { |
| | | title: '设å¤ç¹æ£', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/andon/andonCall/andonCall', |
| | | name: 'andonCall', |
| | | meta: { |
| | | title: 'å®ç¯å¼å«', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/andon/myInitiated/myInitiated', |
| | | name: 'myInitiated', |
| | | meta: { |
| | | title: 'æçåèµ·', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/andon/andonHandler/andonHandler', |
| | | name: 'andonHandler', |
| | | meta: { |
| | | title: 'å®ç¯å¤ç½®', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/andon/andonAction/andonAction', |
| | | name: 'andonAction', |
| | | meta: { |
| | | title: 'å®ç¯å¡«æ¥', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/andon/andonDetail/andonDetail', |
| | | name: 'andonAction', |
| | | meta: { |
| | | title: 'å®ç¯è¯¦æ
', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/production/report/report', |
| | | name: 'report', |
| | | meta: { |
| | | title: 'æ¥å·¥', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/andon/andonAdd/andonAdd', |
| | | name: 'andonAdd', |
| | | meta: { |
| | | title: 'æ°å¢-å®ç¯å·¥å', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/lineSelect/lineSelect', |
| | | name: 'lineSelect', |
| | | meta: { |
| | | title: 'éæ©äº§çº¿', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/selectUsers/selectUsers', |
| | | name: 'selectUsers', |
| | | meta: { |
| | | title: 'éæ©ç¨æ·', |
| | | } |
| | | |
| | | }, { |
| | | path: '/pages/eam/andon/andonRespond/andonRespond', |
| | | name: 'andonRespond', |
| | | meta: { |
| | | title: 'å®ç¯ååº', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/print-preview/print-preview', |
| | | name: 'print-preview', |
| | | meta: { |
| | | title: 'ç§»åºåé¢è§', |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/finished-product-preview/finished-product-preview', |
| | | name: 'finished-product-preview', |
| | | meta: { |
| | | title: 'æåæ ç¾é¢è§', |
| | | } |
| | | |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/inspection-tag-preview/inspection-tag-preview', |
| | | name: 'inspection-tag-preview', |
| | | meta: { |
| | | title: 'æ£éªæ ç¾é¢è§', |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | { |
| | | path: '/pages/eam/production/materialLoading/materialLoading', |
| | | name: 'materialLoading', |
| | | meta: { |
| | | title: '䏿', |
| | | } |
| | | |
| | | |
| | | }, |
| | | { |
| | | path: '/pages/eam/production/partBlanking/partBlanking', |
| | | name: 'partBlanking', |
| | | meta: { |
| | | title: '䏿', |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ] |
| | |
| | | let BASE_URL = '' |
| | | if (process.env.NODE_ENV == 'development') { |
| | | // let BASE_URL = 'http://192.168.1.14/jeecg-boot' |
| | | // if (process.env.NODE_ENV == 'development') { |
| | | |
| | | BASE_URL = '/jeecg-boot' // å¼åç¯å¢ |
| | | } else { |
| | | BASE_URL = '/jeecg-boot' // ç产ç¯å¢ |
| | | } |
| | | let staticDomainURL ='/sys/common/static'; |
| | | // let staticURL ='http://125.76.225.53:8086/jeecg-boot/sys/common/static/'; |
| | | let staticURL ='https://fastwoke.cn:8087/jeecg-boot/sys/common/static/'; |
| | | let BASE_URL = 'http://192.168.43.223:9989/' |
| | | |
| | | if (process.env.NODE_ENV == 'development') { |
| | | console.log(BASE_URL) |
| | | BASE_URL = uni.getStorageSync('base_url') ? uni.getStorageSync('base_url') : 'http://192.168.43.223:9989/' |
| | | |
| | | } else { |
| | | BASE_URL = uni.getStorageSync('base_url') ? uni.getStorageSync('base_url') : 'http://192.168.43.223:9989/' |
| | | } |
| | | let staticDomainURL = BASE_URL + '/sys/common/static'; |
| | | |
| | | const configService = { |
| | | apiUrl: BASE_URL, |
| | | staticDomainURL: staticDomainURL, |
| | | staticURL:staticURL |
| | | staticDomainURL: staticDomainURL |
| | | }; |
| | | |
| | | export default configService |
| | | export default configService |
| | |
| | | * å¸¸ç¨æå¡ |
| | | * useful server |
| | | */ |
| | | const icon_prefix="/static/home/128/" |
| | | const icon_prefix = "/static/home/128/" |
| | | |
| | | export const us = { |
| | | data:[ |
| | | { |
| | | title:"å¾
å", |
| | | icon:icon_prefix+"todo.png", |
| | | description:"å¾
åäºé¡¹", |
| | | useCount:1000, |
| | | page:'ToDoList' |
| | | }, |
| | | { |
| | | title:"å·²å", |
| | | icon:icon_prefix+"todoManger.png", |
| | | description:"å·²åäºé¡¹", |
| | | useCount:1000, |
| | | page:'TaskManagerList' |
| | | export const ps = { |
| | | data: [{ |
| | | title: "æäº§å·¥å", |
| | | icon: icon_prefix + "todo.png", |
| | | description: "æäº§å·¥å", |
| | | useCount: 1000, |
| | | page: 'ProductionManager' |
| | | }, |
| | | { |
| | | title:"æ«ä¸æ«", |
| | | icon:icon_prefix+"icon_sacan.png", |
| | | description:"æ«ç ", |
| | | useCount:10000, |
| | | page:'spare' |
| | | } |
| | | ] |
| | | title: "æ¥å·¥", |
| | | icon: icon_prefix + "icon_report.png", |
| | | description: "æ¥å·¥", |
| | | useCount: 1000, |
| | | page: 'report' |
| | | }, |
| | | { |
| | | title: "䏿", |
| | | icon: icon_prefix + "icon_into.png", |
| | | description: "䏿", |
| | | useCount: 1000, |
| | | page: 'materialLoading' |
| | | }, |
| | | { |
| | | title: "䏿", |
| | | icon: icon_prefix + "icon_out.png", |
| | | description: "䏿", |
| | | useCount: 1000, |
| | | page: 'ProductionManager' |
| | | }] |
| | | } |
| | | |
| | | |
| | | |
| | | export const us = { |
| | | data: [ |
| | | |
| | | { |
| | | title: "å¾
å", |
| | | icon: icon_prefix + "todo.png", |
| | | description: "å¾
åäºé¡¹", |
| | | useCount: 1000, |
| | | page: 'ToDoList' |
| | | }, |
| | | { |
| | | title: "å·²å", |
| | | icon: icon_prefix + "todoManger.png", |
| | | description: "å·²åäºé¡¹", |
| | | useCount: 1000, |
| | | page: 'TaskManagerList' |
| | | }, |
| | | { |
| | | title: "æ«ä¸æ«", |
| | | icon: icon_prefix + "icon_sacan.png", |
| | | description: "æ«ç ", |
| | | useCount: 10000, |
| | | page: 'spare' |
| | | } |
| | | ] |
| | | } |
| | | |
| | | |
| | |
| | | * other server å
¶ä»æå¡ |
| | | */ |
| | | export const os = { |
| | | data:[ |
| | | { |
| | | title:"å¾
ç¹æ£", |
| | | icon:icon_prefix+"xinwen.png", |
| | | description:"设å¤ç¹æ£", |
| | | useCount:10000, |
| | | page:'checkList' |
| | | },{ |
| | | title:"å¾
å¨ä¿", |
| | | icon:icon_prefix+"toupiao.png", |
| | | description:"设å¤å¨ä¿", |
| | | useCount:10000, |
| | | page:'baoZhou' |
| | | }, |
| | | { |
| | | title:"åå²ç¹æ£", |
| | | icon:icon_prefix+"icon_historicalInspection.png", |
| | | description:"åå²ç¹æ£", |
| | | useCount:10000, |
| | | page:'historicalInspection' |
| | | },{ |
| | | title:"åå²ä¿å
»", |
| | | icon:icon_prefix+"icon_historicalMaintenance.png", |
| | | description:"åå²ä¿å
»", |
| | | useCount:10000, |
| | | page:'historicalMaintenance' |
| | | } |
| | | ] |
| | | data: [{ |
| | | title: "å¾
ç¹æ£", |
| | | icon: icon_prefix + "xinwen.png", |
| | | description: "设å¤ç¹æ£", |
| | | useCount: 10000, |
| | | page: 'checkList' |
| | | }, { |
| | | title: "å¾
å¨ä¿", |
| | | icon: icon_prefix + "toupiao.png", |
| | | description: "设å¤å¨ä¿", |
| | | useCount: 10000, |
| | | page: 'baoZhou' |
| | | }, |
| | | { |
| | | title: "åå²ç¹æ£", |
| | | icon: icon_prefix + "icon_historicalInspection.png", |
| | | description: "åå²ç¹æ£", |
| | | useCount: 10000, |
| | | page: 'historicalInspection' |
| | | }, { |
| | | title: "åå²ä¿å
»", |
| | | icon: icon_prefix + "icon_historicalMaintenance.png", |
| | | description: "åå²ä¿å
»", |
| | | useCount: 10000, |
| | | page: 'historicalMaintenance' |
| | | }, |
| | | { |
| | | title: "åå²ç»´ä¿®", |
| | | icon: icon_prefix + "historicalRepair.png", |
| | | description: "åå²ç»´ä¿®", |
| | | useCount: 10000, |
| | | page: 'historicalRepair' |
| | | }, |
| | | { |
| | | title: "æ
éæ¥ä¿®", |
| | | icon: icon_prefix + "baoxiu.png", |
| | | description: "è®¾å¤æ¥ä¿®", |
| | | useCount: 10000, |
| | | page: 'reportRepair' |
| | | }, { |
| | | title: "å¾
ç»´ä¿®", |
| | | icon: icon_prefix + "repair.png", |
| | | description: "设å¤ç»´ä¿®", |
| | | useCount: 10000, |
| | | page: 'maintenanceReport' |
| | | }, |
| | | // { |
| | | // title: "设å¤å°è´¦", |
| | | // icon: icon_prefix + "repair.png", |
| | | // description: "设å¤å°è´¦", |
| | | // useCount: 10000, |
| | | // page: 'device' |
| | | // } |
| | | ] |
| | | } |
| | | |
| | | |
| | |
| | | * other server å
¶ä»æå¡ |
| | | */ |
| | | export const ws = { |
| | | data:[ |
| | | { |
| | | title:"æ¥ä¿®", |
| | | icon:icon_prefix+"baoxiu.png", |
| | | description:"è®¾å¤æ¥ä¿®", |
| | | useCount:10000, |
| | | page:'reportRepair' |
| | | },{ |
| | | title:"å¾
ç»´ä¿®", |
| | | icon:icon_prefix+"repair.png", |
| | | description:"设å¤ç»´ä¿®", |
| | | useCount:10000, |
| | | page:'maintenanceReport' |
| | | },{ |
| | | title:"åå²ç»´ä¿®", |
| | | icon:icon_prefix+"historicalRepair.png", |
| | | description:"åå²ç»´ä¿®", |
| | | useCount:10000, |
| | | page:'historicalRepair' |
| | | } |
| | | ] |
| | | data: [{ |
| | | title: "è´¨éæ£éª", |
| | | icon: icon_prefix + "icon_quality.png", |
| | | description: "è´¨éæ£éª", |
| | | useCount: 10000, |
| | | page: 'qualityInspection' |
| | | }, |
| | | { |
| | | title: "ä¸åæ ¼å审æ¹", |
| | | icon: icon_prefix + "icon_wait.png", |
| | | description: "ä¸åæ ¼å审æ¹", |
| | | useCount: 10000, |
| | | page: 'defectiveProductReview' |
| | | } |
| | | ] |
| | | } |
| | | |
| | | /** |
| | | * other server å®ç¯æå¡ |
| | | */ |
| | | export const as = { |
| | | data: [{ |
| | | title: "å®ç¯å¼å«", |
| | | icon: icon_prefix + "historicalRepair.png", |
| | | description: "å®ç¯å¼å«", |
| | | useCount: 10000, |
| | | page: 'andonCall' |
| | | }, |
| | | { |
| | | title: "å®ç¯å¤ç", |
| | | icon: icon_prefix + "historicalRepair.png", |
| | | description: "å®ç¯å¤ç", |
| | | useCount: 10000, |
| | | page: 'andonHandler' |
| | | } |
| | | ] |
| | | } |
| | |
| | | // }, |
| | | "modules" : { |
| | | "Maps" : {}, |
| | | "Push" : {} |
| | | "Push" : {}, |
| | | "Bluetooth" : {} |
| | | }, |
| | | /* 模åé
ç½® */ |
| | | "distribute" : { |
| | |
| | | "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH\" />", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\" />" |
| | | ] |
| | | }, |
| | | "ios" : {}, |
| | |
| | | } |
| | | }, |
| | | "h5" : { |
| | | "title" : "设å¤ç®¡ç", |
| | | "domain" : "fastwoke.cn", |
| | | "router" : { |
| | | "mode" : "hash", |
| | | "base" : "/h5/" |
| | | }, |
| | | "devServer" : { |
| | | "port" : 8086, |
| | | "https" : false, |
| | | "proxy" : { |
| | | /**é
ç½®æå¡å¨è·¯å¾**/ |
| | | "/jeecg-boot" : { |
| | | "target" : "https://192.168.4.20:8086", |
| | | "changeOrigin" : true, |
| | | "secure" : false |
| | | } |
| | | } |
| | | }, |
| | | "optimization" : { |
| | | "treeShaking" : { |
| | | "enable" : false |
| | | } |
| | | } |
| | | "title" : "Do it today", |
| | | "domain" : "myhjdc.cn" |
| | | } |
| | | } |
| | | /**é
ç½®æå¡å¨è·¯å¾**/// ç®æ æå¡å¨ |
| | |
| | | "lockfileVersion": 1, |
| | | "requires": true, |
| | | "dependencies": { |
| | | "@babel/runtime": { |
| | | "version": "7.28.3", |
| | | "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.28.3.tgz", |
| | | "integrity": "sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==" |
| | | }, |
| | | "@claviska/jquery-minicolors": { |
| | | "version": "2.3.6", |
| | | "resolved": "https://registry.npmmirror.com/@claviska/jquery-minicolors/-/jquery-minicolors-2.3.6.tgz", |
| | | "integrity": "sha512-8Ro6D4GCrmOl41+6w4NFhEOpx8vjxwVRI69bulXsFDt49uVRKhLU5TnzEV7AmOJrylkVq+ugnYNMiGHBieeKUQ==" |
| | | }, |
| | | "@dcloudio/uni-ui": { |
| | | "version": "1.5.7", |
| | | "resolved": "https://registry.npmmirror.com/@dcloudio/uni-ui/-/uni-ui-1.5.7.tgz", |
| | | "integrity": "sha512-DugxSIrQrze1FLdUOj9a+JEQ0bHGjnJTcGUK1mN/MivKg7nuKJBRWk5Ipa9sUdoBznX6ndz5h2e7Uao6x1CdCw==" |
| | | }, |
| | | "@hyoga/uni-socket.io": { |
| | | "version": "3.0.4", |
| | | "resolved": "https://registry.npmmirror.com/@hyoga/uni-socket.io/-/uni-socket.io-3.0.4.tgz", |
| | | "integrity": "sha512-m04M/ALXpTWcKoJGPDMzJosmzuopyAXF51DFN/qxLyXnbCFeQwsWOXT/XNLl4aWoBVGwQ7IptECFFRCA6z5C8A==" |
| | | }, |
| | | "@socket.io/component-emitter": { |
| | | "version": "3.1.2", |
| | | "resolved": "https://registry.npmmirror.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", |
| | | "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==" |
| | | }, |
| | | "@types/raf": { |
| | | "version": "3.4.3", |
| | | "resolved": "https://registry.npmmirror.com/@types/raf/-/raf-3.4.3.tgz", |
| | | "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==" |
| | | }, |
| | | "@wtto00/html2canvas": { |
| | | "version": "1.4.3", |
| | | "resolved": "https://registry.npmmirror.com/@wtto00/html2canvas/-/html2canvas-1.4.3.tgz", |
| | | "integrity": "sha512-jwsb+xL8N+gjrSNABSaFdxmWtE4c7RNFjP20lo1G7gs63Qqo1phhxVBTzxc/apDVh6LgXsU2l5bwKtXd9uz65w==", |
| | | "requires": { |
| | | "css-line-break": "^2.1.0", |
| | | "text-segmentation": "^1.0.3" |
| | | } |
| | | }, |
| | | "@zxing/library": { |
| | | "version": "0.21.3", |
| | |
| | | "resolved": "https://registry.npmmirror.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", |
| | | "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==" |
| | | }, |
| | | "ansi-regex": { |
| | | "version": "5.0.1", |
| | | "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", |
| | | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" |
| | | }, |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "atob": { |
| | | "version": "2.1.2", |
| | | "resolved": "https://registry.npmmirror.com/atob/-/atob-2.1.2.tgz", |
| | | "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" |
| | | }, |
| | | "base64-arraybuffer": { |
| | | "version": "1.0.2", |
| | | "resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", |
| | | "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==" |
| | | }, |
| | | "btoa": { |
| | | "version": "1.2.1", |
| | | "resolved": "https://registry.npmmirror.com/btoa/-/btoa-1.2.1.tgz", |
| | | "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" |
| | | }, |
| | | "bwip-js": { |
| | | "version": "4.7.0", |
| | | "resolved": "https://registry.npmmirror.com/bwip-js/-/bwip-js-4.7.0.tgz", |
| | | "integrity": "sha512-b7oQcgbWUl8rpcZayQ32SQrBCNteiZFuLkimKKBRlPwIHCeUN2VNeUE3HCMYShe04Evxd+ucS9uUAOsvNKjQbA==" |
| | | }, |
| | | "camelcase": { |
| | | "version": "5.3.1", |
| | | "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", |
| | | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" |
| | | }, |
| | | "canvg": { |
| | | "version": "3.0.11", |
| | | "resolved": "https://registry.npmmirror.com/canvg/-/canvg-3.0.11.tgz", |
| | | "integrity": "sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA==", |
| | | "requires": { |
| | | "@babel/runtime": "^7.12.5", |
| | | "@types/raf": "^3.4.0", |
| | | "core-js": "^3.8.3", |
| | | "raf": "^3.4.1", |
| | | "regenerator-runtime": "^0.13.7", |
| | | "rgbcolor": "^1.0.1", |
| | | "stackblur-canvas": "^2.0.0", |
| | | "svg-pathdata": "^6.0.3" |
| | | } |
| | | }, |
| | | "cliui": { |
| | | "version": "6.0.0", |
| | | "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", |
| | | "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", |
| | | "requires": { |
| | | "string-width": "^4.2.0", |
| | | "strip-ansi": "^6.0.0", |
| | | "wrap-ansi": "^6.2.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |
| | | }, |
| | | "core-js": { |
| | | "version": "3.45.1", |
| | | "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.45.1.tgz", |
| | | "integrity": "sha512-L4NPsJlCfZsPeXukyzHFlg/i7IIVwHSItR0wg0FLNqYClJ4MQYTYLbC7EkjKYRLZF2iof2MUgN0EGy7MdQFChg==" |
| | | }, |
| | | "css-line-break": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz", |
| | | "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", |
| | | "requires": { |
| | | "utrie": "^1.0.2" |
| | | } |
| | | }, |
| | | "debug": { |
| | | "version": "4.3.7", |
| | | "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.7.tgz", |
| | | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", |
| | | "requires": { |
| | | "ms": "^2.1.3" |
| | | } |
| | | }, |
| | | "decamelize": { |
| | | "version": "1.2.0", |
| | | "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz", |
| | | "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" |
| | | }, |
| | | "dijkstrajs": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz", |
| | | "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==" |
| | | }, |
| | | "dompurify": { |
| | | "version": "2.5.8", |
| | | "resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-2.5.8.tgz", |
| | | "integrity": "sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==", |
| | | "optional": true |
| | | }, |
| | | "emoji-regex": { |
| | | "version": "8.0.0", |
| | | "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", |
| | | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" |
| | | }, |
| | | "engine.io-client": { |
| | | "version": "6.6.3", |
| | | "resolved": "https://registry.npmmirror.com/engine.io-client/-/engine.io-client-6.6.3.tgz", |
| | | "integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==", |
| | | "requires": { |
| | | "@socket.io/component-emitter": "~3.1.0", |
| | | "debug": "~4.3.1", |
| | | "engine.io-parser": "~5.2.1", |
| | | "ws": "~8.17.1", |
| | | "xmlhttprequest-ssl": "~2.1.1" |
| | | } |
| | | }, |
| | | "engine.io-parser": { |
| | | "version": "5.2.3", |
| | | "resolved": "https://registry.npmmirror.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz", |
| | | "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==" |
| | | }, |
| | | "extend": { |
| | | "version": "3.0.2", |
| | | "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", |
| | | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" |
| | | }, |
| | | "fflate": { |
| | | "version": "0.8.2", |
| | | "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.8.2.tgz", |
| | | "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==" |
| | | }, |
| | | "file-saver": { |
| | | "version": "2.0.5", |
| | | "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", |
| | | "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" |
| | | }, |
| | | "find-up": { |
| | | "version": "4.1.0", |
| | | "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", |
| | | "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", |
| | | "requires": { |
| | | "locate-path": "^5.0.0", |
| | | "path-exists": "^4.0.0" |
| | | } |
| | | }, |
| | | "get-caller-file": { |
| | | "version": "2.0.5", |
| | | "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", |
| | | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" |
| | | }, |
| | | "hiprint": { |
| | | "version": "0.3.0", |
| | | "resolved": "https://registry.npmmirror.com/hiprint/-/hiprint-0.3.0.tgz", |
| | | "integrity": "sha512-Yuyw1qioGgO93Hkg13TCoIuglGB2C376Y/gPmGxjOTTbtosZrQxnjpTzy3vX+vzyF5a0/FnBXrkIBwOtDAqBZw==", |
| | | "requires": { |
| | | "@claviska/jquery-minicolors": "^2.3.6", |
| | | "canvg": "^3.0.10", |
| | | "html2canvas": "^1.4.1", |
| | | "jquery": "^3.6.0", |
| | | "jsbarcode": "^3.11.5", |
| | | "jspdf": "^2.5.1", |
| | | "nzh": "^1.0.8", |
| | | "socket.io-client": "^4.5.1" |
| | | } |
| | | }, |
| | | "html2canvas": { |
| | | "version": "1.4.1", |
| | | "resolved": "https://registry.npmmirror.com/html2canvas/-/html2canvas-1.4.1.tgz", |
| | | "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", |
| | | "requires": { |
| | | "css-line-break": "^2.1.0", |
| | | "text-segmentation": "^1.0.3" |
| | | } |
| | | }, |
| | | "html5-qrcode": { |
| | | "version": "2.3.8", |
| | | "resolved": "https://registry.npmmirror.com/html5-qrcode/-/html5-qrcode-2.3.8.tgz", |
| | | "integrity": "sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==" |
| | | }, |
| | | "openai": { |
| | | "version": "5.8.3", |
| | | "resolved": "https://registry.npmmirror.com/openai/-/openai-5.8.3.tgz", |
| | | "integrity": "sha512-IdotKmquCnpouTRvF9xRXVhMx6K5Sc8zkD6Usf+so+NTQ+qiJ8bLSCd7LBb8b/Rof7uYltlSxJhNp+spphKI4Q==" |
| | | "is-fullwidth-code-point": { |
| | | "version": "3.0.0", |
| | | "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", |
| | | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" |
| | | }, |
| | | "jquery": { |
| | | "version": "3.7.1", |
| | | "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz", |
| | | "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" |
| | | }, |
| | | "jsbarcode": { |
| | | "version": "3.12.1", |
| | | "resolved": "https://registry.npmmirror.com/jsbarcode/-/jsbarcode-3.12.1.tgz", |
| | | "integrity": "sha512-QZQSqIknC2Rr/YOUyOkCBqsoiBAOTYK+7yNN3JsqfoUtJtkazxNw1dmPpxuv7VVvqW13kA3/mKiLq+s/e3o9hQ==" |
| | | }, |
| | | "jspdf": { |
| | | "version": "2.5.2", |
| | | "resolved": "https://registry.npmmirror.com/jspdf/-/jspdf-2.5.2.tgz", |
| | | "integrity": "sha512-myeX9c+p7znDWPk0eTrujCzNjT+CXdXyk7YmJq5nD5V7uLLKmSXnlQ/Jn/kuo3X09Op70Apm0rQSnFWyGK8uEQ==", |
| | | "requires": { |
| | | "@babel/runtime": "^7.23.2", |
| | | "atob": "^2.1.2", |
| | | "btoa": "^1.2.1", |
| | | "canvg": "^3.0.6", |
| | | "core-js": "^3.6.0", |
| | | "dompurify": "^2.5.4", |
| | | "fflate": "^0.8.1", |
| | | "html2canvas": "^1.0.0-rc.5" |
| | | } |
| | | }, |
| | | "locate-path": { |
| | | "version": "5.0.0", |
| | | "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", |
| | | "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", |
| | | "requires": { |
| | | "p-locate": "^4.1.0" |
| | | } |
| | | }, |
| | | "lodash": { |
| | | "version": "4.17.21", |
| | | "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", |
| | | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" |
| | | }, |
| | | "ms": { |
| | | "version": "2.1.3", |
| | | "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", |
| | | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" |
| | | }, |
| | | "nzh": { |
| | | "version": "1.0.14", |
| | | "resolved": "https://registry.npmmirror.com/nzh/-/nzh-1.0.14.tgz", |
| | | "integrity": "sha512-wKgaqCSZdrySvB4RWop5g+v6IDv2IErsT6rjq06Bg0yiT9hiHYZO12GMGx/xweGVLcO2lDjX5RqWD0S/Jy9z5Q==" |
| | | }, |
| | | "p-limit": { |
| | | "version": "2.3.0", |
| | | "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", |
| | | "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", |
| | | "requires": { |
| | | "p-try": "^2.0.0" |
| | | } |
| | | }, |
| | | "p-locate": { |
| | | "version": "4.1.0", |
| | | "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", |
| | | "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", |
| | | "requires": { |
| | | "p-limit": "^2.2.0" |
| | | } |
| | | }, |
| | | "p-try": { |
| | | "version": "2.2.0", |
| | | "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", |
| | | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" |
| | | }, |
| | | "path-exists": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", |
| | | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" |
| | | }, |
| | | "performance-now": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz", |
| | | "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" |
| | | }, |
| | | "pngjs": { |
| | | "version": "5.0.0", |
| | | "resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-5.0.0.tgz", |
| | | "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==" |
| | | }, |
| | | "qrcode": { |
| | | "version": "1.5.4", |
| | | "resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.4.tgz", |
| | | "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", |
| | | "requires": { |
| | | "dijkstrajs": "^1.0.1", |
| | | "pngjs": "^5.0.0", |
| | | "yargs": "^15.3.1" |
| | | } |
| | | }, |
| | | "raf": { |
| | | "version": "3.4.1", |
| | | "resolved": "https://registry.npmmirror.com/raf/-/raf-3.4.1.tgz", |
| | | "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", |
| | | "requires": { |
| | | "performance-now": "^2.1.0" |
| | | } |
| | | }, |
| | | "regenerator-runtime": { |
| | | "version": "0.13.11", |
| | | "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", |
| | | "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" |
| | | }, |
| | | "require-directory": { |
| | | "version": "2.1.1", |
| | | "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", |
| | | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" |
| | | }, |
| | | "require-main-filename": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz", |
| | | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" |
| | | }, |
| | | "rgbcolor": { |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmmirror.com/rgbcolor/-/rgbcolor-1.0.1.tgz", |
| | | "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==" |
| | | }, |
| | | "set-blocking": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", |
| | | "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" |
| | | }, |
| | | "socket.io-client": { |
| | | "version": "4.8.1", |
| | | "resolved": "https://registry.npmmirror.com/socket.io-client/-/socket.io-client-4.8.1.tgz", |
| | | "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", |
| | | "requires": { |
| | | "@socket.io/component-emitter": "~3.1.0", |
| | | "debug": "~4.3.2", |
| | | "engine.io-client": "~6.6.1", |
| | | "socket.io-parser": "~4.2.4" |
| | | } |
| | | }, |
| | | "socket.io-parser": { |
| | | "version": "4.2.4", |
| | | "resolved": "https://registry.npmmirror.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz", |
| | | "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", |
| | | "requires": { |
| | | "@socket.io/component-emitter": "~3.1.0", |
| | | "debug": "~4.3.1" |
| | | } |
| | | }, |
| | | "stackblur-canvas": { |
| | | "version": "2.7.0", |
| | | "resolved": "https://registry.npmmirror.com/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz", |
| | | "integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==" |
| | | }, |
| | | "string-width": { |
| | | "version": "4.2.3", |
| | | "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", |
| | | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", |
| | | "requires": { |
| | | "emoji-regex": "^8.0.0", |
| | | "is-fullwidth-code-point": "^3.0.0", |
| | | "strip-ansi": "^6.0.1" |
| | | } |
| | | }, |
| | | "strip-ansi": { |
| | | "version": "6.0.1", |
| | | "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", |
| | | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", |
| | | "requires": { |
| | | "ansi-regex": "^5.0.1" |
| | | } |
| | | }, |
| | | "svg-pathdata": { |
| | | "version": "6.0.3", |
| | | "resolved": "https://registry.npmmirror.com/svg-pathdata/-/svg-pathdata-6.0.3.tgz", |
| | | "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==" |
| | | }, |
| | | "text-encoding": { |
| | | "version": "0.7.0", |
| | | "resolved": "https://registry.npmmirror.com/text-encoding/-/text-encoding-0.7.0.tgz", |
| | | "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==" |
| | | }, |
| | | "text-segmentation": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmmirror.com/text-segmentation/-/text-segmentation-1.0.3.tgz", |
| | | "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", |
| | | "requires": { |
| | | "utrie": "^1.0.2" |
| | | } |
| | | }, |
| | | "ts-custom-error": { |
| | | "version": "3.3.1", |
| | | "resolved": "https://registry.npmmirror.com/ts-custom-error/-/ts-custom-error-3.3.1.tgz", |
| | | "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==" |
| | | }, |
| | | "utrie": { |
| | | "version": "1.0.2", |
| | | "resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz", |
| | | "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", |
| | | "requires": { |
| | | "base64-arraybuffer": "^1.0.2" |
| | | } |
| | | }, |
| | | "vue-plugin-hiprint": { |
| | | "version": "0.0.60", |
| | | "resolved": "https://registry.npmmirror.com/vue-plugin-hiprint/-/vue-plugin-hiprint-0.0.60.tgz", |
| | | "integrity": "sha512-a5uOMn6Nr4qlYYaVNbQKwRZJa8UcNMTflfi6J430/NDtySJB+5ArE8I8+NLjgVV56x3/qdUBs/GWuZCX5Umv1w==", |
| | | "requires": { |
| | | "@claviska/jquery-minicolors": "^2.3.6", |
| | | "@wtto00/html2canvas": "^1.4.3", |
| | | "bwip-js": "^4.0.0", |
| | | "canvg": "^3.0.10", |
| | | "jquery": "^3.6.0", |
| | | "jsbarcode": "^3.11.5", |
| | | "jspdf": "^2.5.1", |
| | | "lodash": "^4.17.21", |
| | | "nzh": "^1.0.8", |
| | | "socket.io-client": "^4.5.1" |
| | | } |
| | | }, |
| | | "weapp-qrcode": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmmirror.com/weapp-qrcode/-/weapp-qrcode-1.0.0.tgz", |
| | | "integrity": "sha512-4sa3W0rGDVJ9QaeZpAKlAuUxVyjhDwiUqHyGK/jJMsRMXnhb4yO8qWU/pZruMo+iT5J6CraS67lDMFb1VY+RaA==", |
| | | "requires": { |
| | | "extend": "^3.0.2" |
| | | } |
| | | }, |
| | | "which-module": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", |
| | | "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" |
| | | }, |
| | | "wrap-ansi": { |
| | | "version": "6.2.0", |
| | | "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", |
| | | "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", |
| | | "requires": { |
| | | "ansi-styles": "^4.0.0", |
| | | "string-width": "^4.1.0", |
| | | "strip-ansi": "^6.0.0" |
| | | } |
| | | }, |
| | | "ws": { |
| | | "version": "8.17.1", |
| | | "resolved": "https://registry.npmmirror.com/ws/-/ws-8.17.1.tgz", |
| | | "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==" |
| | | }, |
| | | "xmlhttprequest-ssl": { |
| | | "version": "2.1.2", |
| | | "resolved": "https://registry.npmmirror.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz", |
| | | "integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==" |
| | | }, |
| | | "y18n": { |
| | | "version": "4.0.3", |
| | | "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", |
| | | "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" |
| | | }, |
| | | "yargs": { |
| | | "version": "15.4.1", |
| | | "resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz", |
| | | "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", |
| | | "requires": { |
| | | "cliui": "^6.0.0", |
| | | "decamelize": "^1.2.0", |
| | | "find-up": "^4.1.0", |
| | | "get-caller-file": "^2.0.1", |
| | | "require-directory": "^2.1.1", |
| | | "require-main-filename": "^2.0.0", |
| | | "set-blocking": "^2.0.0", |
| | | "string-width": "^4.2.0", |
| | | "which-module": "^2.0.0", |
| | | "y18n": "^4.0.0", |
| | | "yargs-parser": "^18.1.2" |
| | | } |
| | | }, |
| | | "yargs-parser": { |
| | | "version": "18.1.3", |
| | | "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz", |
| | | "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", |
| | | "requires": { |
| | | "camelcase": "^5.0.0", |
| | | "decamelize": "^1.2.0" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | ] |
| | | }, |
| | | "dependencies": { |
| | | "openai": "^5.8.3" |
| | | "@hyoga/uni-socket.io": "^3.0.4", |
| | | "hiprint": "^0.3.0", |
| | | "jsbarcode": "^3.12.1", |
| | | "openai": "^5.8.3", |
| | | "qrcode": "^1.5.4", |
| | | "text-encoding": "^0.7.0", |
| | | "vue-plugin-hiprint": "0.0.60", |
| | | "weapp-qrcode": "^1.0.0" |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/device/deviceDeils/deviceDeils", |
| | | "path": "pages/device/deviceDeils/deviceDeils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/device/deviceWebDeils/deviceWebDeils", |
| | | "style": { |
| | | "navigationBarTitleText": "设å¤è¯¦æ
" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoList", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/TaskManager/TaskManagerDeils/TaskManagerDeils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoListDeils/ToDoListDeils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/checkList/checkList", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/checkList/checkListDetils/checkListDetils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/baoZhou/baoZhou", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/baoZhou/baoZhouDetils/baoZhouDetils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/reportRepair/reportRepair", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/maintenanceReport/maintenanceReport", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/searEquipment/searEquipment", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/reportRepair/reportRepairList/reportRepairList", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/reportRepair/reportRepairDeils/reportRepairDeils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoSpareParts/ToDoSpareParts", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/selectEquipment/selectEquipment", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/historicalInspection/historicalInspection", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/historicalMaintenance/historicalMaintenance", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/historicalRepair/historicalRepair", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/ProductionManager/ProductionManager", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/text/text", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/check/check", |
| | | "style": { |
| | | |
| | | "navigationBarTitleText": "é½å¥æ£æ¥" |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/process/process", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/sample/sample", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/feed/feed", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/record/record", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/qualityInspection/qualityInspection", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/defectiveProductReview/defectiveProductReview", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/checkItem/checkItem", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/productionInspection/productionInspection", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/qualityInspection/addInspection/addInspection", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/checkItemDetail/checkItemDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/qualityInspectionDetail/qualityInspectionDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/inspectionDetail/inspectionDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/quality/reviewDocument/reviewDocument", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/ToDoList/ToDoList", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/andonCall/andonCall", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/myInitiated/myInitiated", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/andonHandler/andonHandler", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/andonAction/andonAction", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/andonDetail/andonDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/production/report/report", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/andonAdd/andonAdd", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/lineSelect/lineSelect", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/selectUsers/selectUsers", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/eam/andon/andonRespond/andonRespond", |
| | | "style": { |
| | | "navigationBarTitleText": "" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/print-preview/print-preview", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "pageOrientation": "landscape" // æ°å¢æ¨ªå±é
ç½®ï¼landscape è¡¨ç¤ºæ¨ªå± |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/finished-product-preview/finished-product-preview", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/device/deviceWebDeils/deviceWebDeils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设å¤è¯¦æ
" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoList", |
| | | "path" : "pages/inspection-tag-preview/inspection-tag-preview", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/TaskManager/TaskManagerDeils/TaskManagerDeils", |
| | | "path" : "pages/eam/production/materialLoading/materialLoading", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoListDeils/ToDoListDeils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/checkList/checkList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/checkList/checkListDetils/checkListDetils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/baoZhou/baoZhou", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/baoZhou/baoZhouDetils/baoZhouDetils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/reportRepair/reportRepair", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/maintenanceReport/maintenanceReport", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/searEquipment/searEquipment", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/reportRepair/reportRepairList/reportRepairList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/reportRepair/reportRepairDeils/reportRepairDeils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoSpareParts/ToDoSpareParts", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/selectEquipment/selectEquipment", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/historicalInspection/historicalInspection", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/historicalMaintenance/historicalMaintenance", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/historicalRepair/historicalRepair", |
| | | "path" : "pages/eam/production/partBlanking/partBlanking", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ], |
| | |
| | | </swiper-item> |
| | | </swiper> |
| | | |
| | | <!-- 设å¤ç»´ä¿® --> |
| | | |
| | | |
| | | <!-- å·¥ä½å° --> |
| | | <view class="cu-bar bg-white solid-bottom" :style="[{animation: 'show 0.5s 1'}]"> |
| | | <view class="action"> |
| | | <text class='cuIcon-title text-blue'></text>å·¥ä½å° |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="cu-list grid col-4 text-sm"> |
| | | <view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.05 + 's'}]" v-for="(item,index) in usList" :key="index" @tap="goPage(item.page)"> |
| | | <view class="padding text-center"> |
| | | <image :src="item.icon" style="width:28px;height:28px;"> |
| | | <view class="cu-tag badge margin-top-sm" style="margin-left:1.2em" v-if="getTtemDotInfo(item)"> |
| | | <block v-if="getTtemDotInfo(item)">{{getTtemDotInfo(item)}}</block> |
| | | </view> |
| | | </image> |
| | | <view class="margin-top-xs">{{item.title}}</view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="cu-list grid col-4 text-sm"> |
| | | <view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.05 + 's'}]" |
| | | v-for="(item, index) in usList" :key="index" @tap="goPage(item.page)"> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 设å¤ä¿å
» --> |
| | | <!-- 设å¤ç®¡ç --> |
| | | <view class="cu-bar bg-white solid-bottom margin-top" :style="[{animation: 'show 0.6s 1'}]"> |
| | | <view class="action"> |
| | | <text class='cuIcon-title text-yellow'></text>ä¿å
» |
| | | <text class='cuIcon-title text-yellow'></text>设å¤ç®¡ç |
| | | </view> |
| | | </view> |
| | | <view class="cu-list grid col-4 text-sm"> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- ç产管ç --> |
| | | <view class="cu-bar bg-white solid-bottom" :style="[{animation: 'show 0.5s 1'}]"> |
| | | <view class="action"> |
| | | <text class='cuIcon-title text-blue'></text>ç产管ç |
| | | </view> |
| | | </view> |
| | | <view class="cu-list grid col-4 text-sm"> |
| | | <view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.05 + 's'}]" |
| | | v-for="(item, index) in psList" :key="index" @tap="goPage(item.page)"> |
| | | <view class="padding text-center"> |
| | | <image :src="item.icon" style="width:28px;height:28px;"> |
| | | <view class="cu-tag badge margin-top-sm" style="margin-left:1.2em" |
| | | v-if="getTtemDotInfo(item)"></view> |
| | | </image> |
| | | <view class="margin-top-xs">{{ item.title }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 设å¤ç»´ä¿® --> |
| | | |
| | | |
| | | |
| | | <!-- è´¨é管ç --> |
| | | <view class="cu-bar bg-white solid-bottom margin-top" :style="[{animation: 'show 0.6s 1'}]"> |
| | | <view class="action"> |
| | | <text class='cuIcon-title text-blue'></text>ç»´ä¿® |
| | | <text class='cuIcon-title text-orange'></text>è´¨é管ç |
| | | </view> |
| | | </view> |
| | | <view class="cu-list grid col-4 text-sm"> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- å®ç¯ç®¡ç --> |
| | | <view class="cu-bar bg-white solid-bottom margin-top" :style="[{animation: 'show 0.6s 1'}]"> |
| | | <view class="action"> |
| | | <text class='cuIcon-title text-green'></text>å®ç¯ç®¡ç |
| | | </view> |
| | | </view> |
| | | <view class="cu-list grid col-4 text-sm"> |
| | | <view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.1 + 's'}]" |
| | | v-for="(item,index) in asList" :key="index" @tap="goPage(item.page)"> |
| | | <view class="padding text-center"> |
| | | <image :src="item.icon" style="width:28px;height:28px;"> |
| | | <view class="cu-tag badge margin-top-sm" style="margin-left:1.2em" |
| | | v-if="getTtemDotInfo(item)"></view> |
| | | </image> |
| | | <view class="margin-top-xs">{{item.title}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | </scroll-view> |
| | | <view class="cu-tabbar-height margin-top"></view> |
| | | </view> |
| | |
| | | import { |
| | | us, |
| | | os, |
| | | ws |
| | | ws, |
| | | ps, |
| | | as |
| | | } from '@/common/util/work.js' |
| | | import socket from '@/common/js-sdk/socket/socket.js' |
| | | export default { |
| | |
| | | props: { |
| | | cur: String, |
| | | }, |
| | | // watch: { |
| | | // cur: { |
| | | // immediate: true, |
| | | // handler: function(val, oldVal) { |
| | | // console.log('cur', val, oldVal) |
| | | // this.initMenu() |
| | | // }, |
| | | // }, |
| | | // }, |
| | | watch: { |
| | | cur: { |
| | | immediate: true, |
| | | handler: function(val, oldVal) { |
| | | console.log('cur', val, oldVal) |
| | | // å³ä½¿å¼æ²¡æååï¼ä¹ä¸»å¨è°ç¨ initMenu |
| | | this.initMenu() |
| | | }, |
| | | }, |
| | | cur: { |
| | | immediate: true, |
| | | handler: function(val, oldVal) { |
| | | console.log('cur', val, oldVal) |
| | | // å³ä½¿å¼æ²¡æååï¼ä¹ä¸»å¨è°ç¨ initMenu |
| | | this.initMenu() |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | link: '' |
| | | } |
| | | ], |
| | | middleApps: [{ |
| | | icon: 'line2_icon1.png', |
| | | title: '审æ¹', |
| | | 'text': '个人审æ¹' |
| | | }, |
| | | { |
| | | icon: 'line2_icon2.png', |
| | | title: '审æ¹ç¨¿', |
| | | 'text': '审æ¹è稿箱' |
| | | }, |
| | | ], |
| | | usList: us.data, |
| | | osList: os.data, |
| | | wsList: ws.data, |
| | | psList: ps.data, |
| | | asList: as.data, |
| | | msgCount: 0, |
| | | toDomsgCount: 0, |
| | | unExecRepairOrderCount: 0, |
| | |
| | | <!-- <spare v-if="PageCur=='spare'" :key="commponent4Key"></spare> --> |
| | | <view class="cu-bar tabbar bg-white shadow foot"> |
| | | <view :class="PageCur=='home'?'action text-green':'action text-gray'" @click="NavChange" data-cur="home"> |
| | | <view class='cuIcon-homefill'></view>é¦é¡µ |
| | | <view class='cuIcon-homefill'></view>å·¥ä½å° |
| | | </view> |
| | | <view :class="PageCur=='device'?'action text-green':'action text-gray'" @click="NavChange" data-cur="device"> |
| | | <view class='cuIcon-apps'></view>è®¾å¤ |
| | | </view> |
| | | <!-- <view :class="PageCur=='spare'?'action text-green':'action text-gray'" @click="NavChange" data-cur="spare"> |
| | | <view class='cuIcon-scan'></view>æ«ä¸æ« |
| | | </view> --> |
| | | <view :class="PageCur=='people'?'action text-green':'action text-gray'" @click="NavChange" |
| | | data-cur="people"> |
| | | <view class='cuIcon-people'></view>æç |
| | |
| | | commponent1Key: 0, |
| | | commponent2Key: 0, |
| | | commponent3Key: 0 |
| | | |
| | | |
| | | } |
| | | }, |
| | | onLoad: function() { |
| | |
| | | <template> |
| | | <view class="zai-box"> |
| | | <scroll-view scroll-y class="page"> |
| | | <view class="text-center" :style="[{animation: 'show ' + 0.4+ 's 1'}]"> |
| | | <image src="/static/logo-lx.png" mode='aspectFit' class="zai-logo "></image> |
| | | <view class="zai-title text-shadow ">设å¤ç®¡ç </view> |
| | | </view> |
| | | <view class="box padding-lr-xl login-paddingtop" :style="[{animation: 'show ' + 0.6+ 's 1'}]"> |
| | | <block v-if="loginWay==1"> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-people margin-right-xs"></text>è´¦å·:</view> |
| | | <input placeholder="请è¾å
¥è´¦å·" name="input" v-model="userName"></input> |
| | | </view> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-lock margin-right-xs"></text>å¯ç :</view> |
| | | <input class="uni-input" placeholder="请è¾å
¥å¯ç " :password="!showPassword" v-model="password" /> |
| | | <view class="action text-lg"> |
| | | <text :class="[showPassword ? 'cuIcon-attention' : 'cuIcon-attentionforbid']" |
| | | @click="changePassword"></text> |
| | | </view> |
| | | </view> |
| | | <view class="padding text-center margin-top"> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="onLogin"><text |
| | | space="emsp">{{loading ? "ç»å½ä¸...":" ç»å½ "}}</text> |
| | | </button> |
| | | <!-- <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" :class="[shape=='round'?'round':'']" |
| | | @tap="loginWay=3-loginWay">çä¿¡ç»å½ |
| | | </button> --> |
| | | </view> |
| | | </block> |
| | | <block v-else> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-mobile margin-right-xs"></text>ææºå·:</view> |
| | | <input placeholder="请è¾å
¥ææºå·" type="number" maxlength="11" v-model="phoneNo"></input> |
| | | </view> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-lock margin-right-xs"></text>éªè¯ç :</view> |
| | | <input class="uni-input" placeholder="请è¾å
¥éªè¯ç " v-model="smsCode" /> |
| | | <view class="action"> |
| | | <button class="cu-btn line-blue sm" :disabled="!isSendSMSEnable" @click="onSMSSend"> |
| | | {{ getSendBtnText }}</button> |
| | | </view> |
| | | </view> |
| | | <view class="padding text-center margin-top"> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="onSMSLogin"><text |
| | | space="emsp">{{loading ? "ç»å½ä¸...":" ç»å½ "}}</text> |
| | | </button> |
| | | <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="loginWay=1">è´¦æ·ç»å½ |
| | | </button> |
| | | </view> |
| | | </block> |
| | | <template> |
| | | <view class="zai-box"> |
| | | <scroll-view scroll-y class="page"> |
| | | <view class="text-center" :style="[{animation: 'show ' + 0.4+ 's 1'}]"> |
| | | <image src="/static/logo-lx.png" mode='aspectFit' class="zai-logo "></image> |
| | | <view class="zai-title text-shadow ">设å¤ç®¡ç </view> |
| | | </view> |
| | | <view class="box padding-lr-xl login-paddingtop" :style="[{animation: 'show ' + 0.6+ 's 1'}]"> |
| | | <block v-if="loginWay==1"> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-people margin-right-xs"></text>è´¦å·:</view> |
| | | <input placeholder="请è¾å
¥è´¦å·" name="input" v-model="userName"></input> |
| | | </view> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-lock margin-right-xs"></text>å¯ç :</view> |
| | | <input class="uni-input" placeholder="请è¾å
¥å¯ç " :password="!showPassword" v-model="password" /> |
| | | <view class="action text-lg"> |
| | | <text :class="[showPassword ? 'cuIcon-attention' : 'cuIcon-attentionforbid']" |
| | | @click="changePassword"></text> |
| | | </view> |
| | | </view> |
| | | <view class="padding text-center margin-top"> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="onLogin"><text |
| | | space="emsp">{{loading ? "ç»å½ä¸...":" ç»å½ "}}</text> |
| | | </button> |
| | | </view> |
| | | </block> |
| | | <block v-else> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-mobile margin-right-xs"></text>ææºå·:</view> |
| | | <input placeholder="请è¾å
¥ææºå·" type="number" maxlength="11" v-model="phoneNo"></input> |
| | | </view> |
| | | <view class="cu-form-group margin-top shadow-warp" :class="[shape=='round'?'round':'']"> |
| | | <view class="title"><text class="cuIcon-lock margin-right-xs"></text>éªè¯ç :</view> |
| | | <input class="uni-input" placeholder="请è¾å
¥éªè¯ç " v-model="smsCode" /> |
| | | <view class="action"> |
| | | <button class="cu-btn line-blue sm" :disabled="!isSendSMSEnable" @click="onSMSSend"> |
| | | {{ getSendBtnText }}</button> |
| | | </view> |
| | | </view> |
| | | <view class="padding text-center margin-top"> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="onSMSLogin"><text |
| | | space="emsp">{{loading ? "ç»å½ä¸...":" ç»å½ "}}</text> |
| | | </button> |
| | | <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="loginWay=1">è´¦æ·ç»å½ |
| | | </button> |
| | | </view> |
| | | </block> |
| | | |
| | | |
| | | <!-- #ifdef APP-PLUS --> |
| | | <view class="padding flex flex-direction text-center"> |
| | | å½åçæ¬:{{version}} |
| | | </view> |
| | | <!-- #endif --> |
| | | <!-- #ifdef APP-PLUS --> |
| | | <view class="padding flex flex-direction text-center"> |
| | | å½åçæ¬:{{version}} |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | </view> |
| | | </scroll-view> |
| | | <!-- ç»å½å è½½å¼¹çª --> |
| | | <view class="cu-load load-modal" v-if="loading"> |
| | | <!-- <view class="cuIcon-emojifill text-orange"></view> --> |
| | | <image src="/static/logo-lx.png" mode="aspectFit" class="round"></image> |
| | | <view class="gray-text">ç»å½ä¸...</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- ç»å½å è½½å¼¹çª --> |
| | | <view class="cu-load load-modal" v-if="loading"> |
| | | <image src="/static/logo-lx.png" mode="aspectFit" class="round"></image> |
| | | <view class="gray-text">ç»å½ä¸...</view> |
| | | </view> |
| | | |
| | | </template> |
| | | <!-- äº§çº¿éæ©å¼¹çª - ä»åºé¨å¼¹åº --> |
| | | <view class="line-modal-mask" v-if="showLineModal" @click="closeLineModal"></view> |
| | | <view class="line-modal" v-if="showLineModal" :class="{ 'line-modal-active': showLineModal }"> |
| | | <view class="line-modal-header"> |
| | | <view class="line-modal-title">éæ©äº§çº¿</view> |
| | | <text class="cuIcon-close" @click="closeLineModal"></text> |
| | | </view> |
| | | <view class="line-modal-content"> |
| | | <view v-if="lineLoading" class="loading-view"> |
| | | <view class="cu-load"></view> |
| | | <view class="text-gray">å 载产线ä¸...</view> |
| | | </view> |
| | | <view v-else-if="lineList.length === 0" class="empty-view"> |
| | | <text class="cuIcon-meh text-gray text-xl"></text> |
| | | <view class="text-gray">ææ å¯ç¨äº§çº¿</view> |
| | | </view> |
| | | <view class="line-item" v-for="(line, index) in lineList" :key="line.id" @click="selectLine(line)" |
| | | :class="{ 'line-item-selected': selectedLineId === line.id }"> |
| | | <view class="line-name">{{ line.name }}</view> |
| | | <text class="cuIcon-check text-blue" v-if="selectedLineId === line.id"></text> |
| | | </view> |
| | | </view> |
| | | <view class="line-modal-footer"> |
| | | <button class="cu-btn bg-blue lg" @click="confirmLineSelection" :disabled="!selectedLineId"> |
| | | ç¡®è®¤éæ© |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | ACCESS_TOKEN, |
| | | USER_NAME, |
| | | USER_INFO |
| | | } from "@/common/util/constants" |
| | | import { |
| | | mapActions |
| | | } from "vuex" |
| | | import configService from '@/common/service/config.service.js'; |
| | | <script> |
| | | import { |
| | | ACCESS_TOKEN, |
| | | USER_NAME, |
| | | USER_INFO |
| | | } from "@/common/util/constants" |
| | | import { |
| | | mapActions, |
| | | mapState, |
| | | mapGetters |
| | | } from "vuex" // æ°å¢mapGetters |
| | | import configService from '@/common/service/config.service.js'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | shape: '', //round åå½¢ |
| | | loading: false, |
| | | userName: '', |
| | | password: '', |
| | | phoneNo: '', |
| | | smsCode: '', |
| | | showPassword: false, //æ¯å¦æ¾ç¤ºææ |
| | | loginWay: 1, //1: è´¦å¯ï¼2ï¼éªè¯ç |
| | | smsCountDown: 0, |
| | | smsCountInterval: null, |
| | | toggleDelay: false, |
| | | version: '', |
| | | //ç¬¬ä¸æ¹ç»å½ç¸å
³ä¿¡æ¯ |
| | | thirdType: "", |
| | | thirdLoginInfo: "", |
| | | thirdLoginState: false, |
| | | bindingPhoneModal: false, |
| | | thirdUserUuid: '', |
| | | id: '', |
| | | url: { |
| | | bindingThirdPhone: '/sys/thirdLogin/bindingThirdPhone' |
| | | } |
| | | }; |
| | | }, |
| | | onLoad: function(options) { |
| | | this.id = options.id; |
| | | // #ifdef APP-PLUS |
| | | var that = this |
| | | plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) { |
| | | that.version = wgtinfo.version |
| | | }); |
| | | // #endif |
| | | }, |
| | | computed: { |
| | | isSendSMSEnable() { |
| | | return this.smsCountDown <= 0 && this.phoneNo.length > 4; |
| | | }, |
| | | getSendBtnText() { |
| | | if (this.smsCountDown > 0) { |
| | | return this.smsCountDown + 'ç§ååé'; |
| | | } else { |
| | | return 'åééªè¯ç '; |
| | | } |
| | | }, |
| | | canSMSLogin() { |
| | | return this.userName.length > 4 && this.smsCode.length > 4; |
| | | }, |
| | | canPwdLogin() { |
| | | return this.userName.length > 4 && this.password.length > 4; |
| | | }, |
| | | }, |
| | | methods: { |
| | | ...mapActions(["mLogin", "PhoneLogin", "ThirdLogin"]), |
| | | onLogin: function() { |
| | | if (!this.userName || this.userName.length == 0) { |
| | | this.$tip.toast('请填åç¨æ·å'); |
| | | return; |
| | | } |
| | | if (!this.password || this.password.length == 0) { |
| | | this.$tip.toast('请填åå¯ç '); |
| | | return; |
| | | } |
| | | let loginParams = { |
| | | username: this.userName, |
| | | password: this.password |
| | | } |
| | | this.loading = true; |
| | | this.mLogin(loginParams).then((res) => { |
| | | this.loading = false; |
| | | if (res.data.success) { |
| | | // #ifdef APP-PLUS |
| | | this.saveClientId() |
| | | // #endif |
| | | // #ifndef APP-PLUS |
| | | this.$tip.success('ç»å½æå!') |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }) |
| | | // if (this.id) { |
| | | // uni.navigateTo({ |
| | | // url: `/pages/device/deviceWebDeils/deviceWebDeils?equipmentId=${this.id}` |
| | | // }); |
| | | export default { |
| | | data() { |
| | | return { |
| | | shape: '', //round åå½¢ |
| | | loading: false, |
| | | userName: '', |
| | | password: '', |
| | | phoneNo: '', |
| | | smsCode: '', |
| | | showPassword: false, //æ¯å¦æ¾ç¤ºææ |
| | | loginWay: 1, //1: è´¦å¯ï¼2ï¼éªè¯ç |
| | | smsCountDown: 0, |
| | | smsCountInterval: null, |
| | | toggleDelay: false, |
| | | version: '', |
| | | //ç¬¬ä¸æ¹ç»å½ç¸å
³ä¿¡æ¯ |
| | | thirdType: "", |
| | | thirdLoginInfo: "", |
| | | thirdLoginState: false, |
| | | bindingPhoneModal: false, |
| | | thirdUserUuid: '', |
| | | id: '', |
| | | url: { |
| | | bindingThirdPhone: '/sys/thirdLogin/bindingThirdPhone' |
| | | }, |
| | | // äº§çº¿éæ©ç¸å
³ |
| | | showLineModal: false, // äº§çº¿å¼¹çªæ¯å¦æ¾ç¤º |
| | | lineList: [], // 产线å表 |
| | | selectedLineId: null, // å½åéä¸ç产线ID |
| | | lineLoading: false // 产线å è½½ç¶æ |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState(['currentLineId']), |
| | | ...mapGetters(['currentLineName']), // æ°å¢ï¼è·åå½å产线åç§°ï¼ç¨äºéªè¯ï¼ |
| | | isSendSMSEnable() { |
| | | return this.smsCountDown <= 0 && this.phoneNo.length > 4; |
| | | }, |
| | | getSendBtnText() { |
| | | if (this.smsCountDown > 0) { |
| | | return this.smsCountDown + 'ç§ååé'; |
| | | } else { |
| | | return 'åééªè¯ç '; |
| | | } |
| | | }, |
| | | canSMSLogin() { |
| | | return this.userName.length > 4 && this.smsCode.length > 4; |
| | | }, |
| | | canPwdLogin() { |
| | | return this.userName.length > 4 && this.password.length > 4; |
| | | }, |
| | | }, |
| | | onLoad: function(options) { |
| | | this.id = options.id; |
| | | // #ifdef APP-PLUS |
| | | var that = this |
| | | plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) { |
| | | that.version = wgtinfo.version |
| | | }); |
| | | // #endif |
| | | }, |
| | | methods: { |
| | | ...mapActions(["mLogin", "PhoneLogin", "ThirdLogin", "fetchLineList", "setCurrentLine"]), |
| | | |
| | | // } else { |
| | | // this.$tip.success('ç»å½æå!') |
| | | // this.$Router.replaceAll({ |
| | | // name: 'index' |
| | | // }) |
| | | // } |
| | | onLogin: function() { |
| | | if (!this.userName || this.userName.length == 0) { |
| | | this.$tip.toast('请填åç¨æ·å'); |
| | | return; |
| | | } |
| | | if (!this.password || this.password.length == 0) { |
| | | this.$tip.toast('请填åå¯ç '); |
| | | return; |
| | | } |
| | | let loginParams = { |
| | | username: this.userName, |
| | | password: this.password |
| | | } |
| | | this.loading = true; |
| | | this.mLogin(loginParams).then((res) => { |
| | | this.loading = false; |
| | | if (res.data.success) { |
| | | console.log('è´¦å·ç»å½æåï¼åå¤å¤çäº§çº¿éæ©'); |
| | | // #ifdef APP-PLUS |
| | | this.saveClientId() |
| | | // #endif |
| | | // #ifndef APP-PLUS |
| | | this.handleLoginSuccess() |
| | | // #endif |
| | | } else { |
| | | this.$tip.alert(res.data.message); |
| | | } |
| | | }).catch((err) => { |
| | | let msg = err.data.message || "请æ±åºç°é误ï¼è¯·ç¨ååè¯" |
| | | this.loading = false; |
| | | this.$tip.alert(msg); |
| | | }).finally(() => { |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | |
| | | saveClientId() { |
| | | var info = plus.push.getClientInfo(); |
| | | var cid = info.clientid; |
| | | this.$http.get("/sys/user/saveClientId", { |
| | | params: { |
| | | clientId: cid |
| | | } |
| | | }).then(res => { |
| | | console.log("res::saveClientId>", res) |
| | | this.handleLoginSuccess(); |
| | | }).catch(err => { |
| | | console.error('ä¿åclientId失败:', err); |
| | | this.handleLoginSuccess(); |
| | | }) |
| | | }, |
| | | |
| | | // #endif |
| | | } else { |
| | | this.$tip.alert(res.data.message); |
| | | } |
| | | }).catch((err) => { |
| | | let msg = err.data.message || "请æ±åºç°é误ï¼è¯·ç¨ååè¯" |
| | | this.loading = false; |
| | | this.$tip.alert(msg); |
| | | }).finally(() => { |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | saveClientId() { |
| | | var info = plus.push.getClientInfo(); |
| | | var cid = info.clientid; |
| | | this.$http.get("/sys/user/saveClientId", { |
| | | params: { |
| | | clientId: cid |
| | | } |
| | | }).then(res => { |
| | | console.log("res::saveClientId>", res) |
| | | this.$tip.success('ç»å½æå!') |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }) |
| | | }) |
| | | }, |
| | | changePassword() { |
| | | this.showPassword = !this.showPassword; |
| | | }, |
| | | onSMSSend() { |
| | | let smsParams = {}; |
| | | smsParams.mobile = this.phoneNo; |
| | | smsParams.smsmode = "0"; |
| | | let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/); |
| | | if (!smsParams.mobile || smsParams.mobile.length == 0) { |
| | | this.$tip.toast('请è¾å
¥ææºå·'); |
| | | return false |
| | | } |
| | | if (!checkPhone.test(smsParams.mobile)) { |
| | | this.$tip.toast('请è¾å
¥æ£ç¡®çææºå·'); |
| | | return false |
| | | } |
| | | this.$http.post("/sys/sms", smsParams).then(res => { |
| | | if (res.data.success) { |
| | | this.smsCountDown = 60; |
| | | this.startSMSTimer(); |
| | | } else { |
| | | this.smsCountDown = 0; |
| | | this.$tip.toast(res.data.message); |
| | | } |
| | | }); |
| | | }, |
| | | startSMSTimer() { |
| | | this.smsCountInterval = setInterval(() => { |
| | | this.smsCountDown--; |
| | | if (this.smsCountDown <= 0) { |
| | | clearInterval(this.smsCountInterval); |
| | | } |
| | | }, 1000); |
| | | }, |
| | | onSMSLogin() { |
| | | let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/); |
| | | changePassword() { |
| | | this.showPassword = !this.showPassword; |
| | | }, |
| | | |
| | | if (!this.phoneNo || this.phoneNo.length == 0) { |
| | | this.$tip.toast('è¯·å¡«åææºå·'); |
| | | return; |
| | | } |
| | | if (!checkPhone.test(this.phoneNo)) { |
| | | this.$tip.toast('请è¾å
¥æ£ç¡®çææºå·'); |
| | | return false |
| | | } |
| | | if (!this.smsCode || this.smsCode.length == 0) { |
| | | this.$tip.toast('请填çä¿¡éªè¯ç '); |
| | | return; |
| | | } |
| | | let loginParams = { |
| | | mobile: this.phoneNo, |
| | | captcha: this.smsCode |
| | | }; |
| | | this.PhoneLogin(loginParams).then((res) => { |
| | | console.log("res====ã", res) |
| | | if (res.data.success) { |
| | | this.$tip.success('ç»å½æå!') |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }) |
| | | } else { |
| | | this.$tip.error(res.data.message); |
| | | } |
| | | }).catch((err) => { |
| | | let msg = ((err.response || {}).data || {}).message || err.data.message || "请æ±åºç°é误ï¼è¯·ç¨ååè¯" |
| | | this.$tip.error(msg); |
| | | }); |
| | | }, |
| | | loginSuccess() { |
| | | // ç»éæåï¼éå®åå°ä¸»é¡µ |
| | | this.$Router.replace({ |
| | | name: 'index' |
| | | }) |
| | | }, |
| | | requestFailed(err) { |
| | | this.$message.warning("ç»å½å¤±è´¥") |
| | | }, |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.smsCountInterval) { |
| | | clearInterval(this.smsCountInterval); |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | onSMSSend() { |
| | | let smsParams = {}; |
| | | smsParams.mobile = this.phoneNo; |
| | | smsParams.smsmode = "0"; |
| | | let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/); |
| | | if (!smsParams.mobile || smsParams.mobile.length == 0) { |
| | | this.$tip.toast('请è¾å
¥ææºå·'); |
| | | return false |
| | | } |
| | | if (!checkPhone.test(smsParams.mobile)) { |
| | | this.$tip.toast('请è¾å
¥æ£ç¡®çææºå·'); |
| | | return false |
| | | } |
| | | this.$http.post("/sys/sms", smsParams).then(res => { |
| | | if (res.data.success) { |
| | | this.smsCountDown = 60; |
| | | this.startSMSTimer(); |
| | | } else { |
| | | this.smsCountDown = 0; |
| | | this.$tip.toast(res.data.message); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | <style> |
| | | .login-paddingtop { |
| | | padding-top: 100upx; |
| | | } |
| | | startSMSTimer() { |
| | | this.smsCountInterval = setInterval(() => { |
| | | this.smsCountDown--; |
| | | if (this.smsCountDown <= 0) { |
| | | clearInterval(this.smsCountInterval); |
| | | } |
| | | }, 1000); |
| | | }, |
| | | |
| | | .zai-box { |
| | | padding: 0 20upx; |
| | | padding-top: 100upx; |
| | | position: relative; |
| | | } |
| | | onSMSLogin() { |
| | | let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/); |
| | | |
| | | .zai-logo { |
| | | width: 200upx; |
| | | height: 150px; |
| | | } |
| | | if (!this.phoneNo || this.phoneNo.length == 0) { |
| | | this.$tip.toast('è¯·å¡«åææºå·'); |
| | | return; |
| | | } |
| | | if (!checkPhone.test(this.phoneNo)) { |
| | | this.$tip.toast('请è¾å
¥æ£ç¡®çææºå·'); |
| | | return false |
| | | } |
| | | if (!this.smsCode || this.smsCode.length == 0) { |
| | | this.$tip.toast('请填çä¿¡éªè¯ç '); |
| | | return; |
| | | } |
| | | let loginParams = { |
| | | mobile: this.phoneNo, |
| | | captcha: this.smsCode |
| | | }; |
| | | this.PhoneLogin(loginParams).then((res) => { |
| | | console.log("çä¿¡ç»å½æåï¼åå¤å¤çäº§çº¿éæ©"); |
| | | if (res.data.success) { |
| | | this.handleLoginSuccess(); |
| | | } else { |
| | | this.$tip.error(res.data.message); |
| | | } |
| | | }).catch((err) => { |
| | | let msg = ((err.response || {}).data || {}).message || err.data.message || "请æ±åºç°é误ï¼è¯·ç¨ååè¯" |
| | | this.$tip.error(msg); |
| | | }); |
| | | }, |
| | | |
| | | .zai-title { |
| | | font-size: 58upx; |
| | | color: #000000; |
| | | text-align: center; |
| | | } |
| | | // ç»å½æååçå¤ç |
| | | handleLoginSuccess() { |
| | | console.log('è¿å
¥handleLoginSuccessæ¹æ³'); |
| | | this.$tip.success('ç»å½æå!'); |
| | | |
| | | .input-placeholder, |
| | | .zai-input { |
| | | color: #94afce; |
| | | } |
| | | // æ£æ¥æ¯å¦å·²æä¿åç产线ï¼å
å«IDååç§°ï¼ |
| | | const savedLineId = uni.getStorageSync('currentLineId'); |
| | | const savedLineName = uni.getStorageSync('currentLineName'); |
| | | console.log('æ¬å°åå¨ç产线ID:', savedLineId, 'åç§°:', savedLineName); |
| | | |
| | | .zai-label { |
| | | padding: 60upx 0; |
| | | text-align: center; |
| | | font-size: 30upx; |
| | | color: #a7b6d0; |
| | | } |
| | | if (savedLineId && savedLineName) { |
| | | // å·²æå®æ´ç产线信æ¯ï¼ç´æ¥è¿å
¥é¦é¡µ |
| | | console.log('å·²æä¿åç产线ï¼ç´æ¥è¿å
¥é¦é¡µ'); |
| | | this.navigateToHome(); |
| | | } else { |
| | | // æ ä¿åç产线ï¼è·å产线å表并æ¾ç¤ºå¼¹çª |
| | | console.log('æ ä¿åç产线ï¼åå¤è·å产线å表'); |
| | | this.getLineListAndShowModal(); |
| | | } |
| | | }, |
| | | |
| | | .zai-btn { |
| | | background: #ff65a3; |
| | | color: #fff; |
| | | border: 0; |
| | | border-radius: 100upx; |
| | | font-size: 36upx; |
| | | } |
| | | // è·å产线å表并æ¾ç¤ºå¼¹çª |
| | | getLineListAndShowModal() { |
| | | console.log('è¿å
¥getLineListAndShowModalæ¹æ³'); |
| | | this.lineLoading = true; |
| | | this.lineList = []; |
| | | this.selectedLineId = null; |
| | | |
| | | .zai-btn:after { |
| | | border: 0; |
| | | } |
| | | // è°ç¨Vuex actionè·å产线å表 |
| | | this.fetchLineList().then(lineList => { |
| | | console.log('è·å产线å表æå:', lineList); |
| | | this.lineList = lineList || []; |
| | | this.lineLoading = false; |
| | | |
| | | /*æé®ç¹å»ææ*/ |
| | | .zai-btn.button-hover { |
| | | transform: translate(1upx, 1upx); |
| | | } |
| | | </style> |
| | | // 妿æäº§çº¿ï¼é»è®¤éä¸ç¬¬ä¸æ¡å¹¶æ¾ç¤ºå¼¹çª |
| | | if (this.lineList.length > 0) { |
| | | this.selectedLineId = this.lineList[0].id; |
| | | this.showLineModal = true; |
| | | console.log('产线å表ä¸ä¸ºç©ºï¼æ¾ç¤ºå¼¹çª'); |
| | | } else { |
| | | console.log('产线å表为空ï¼ä¸æ¾ç¤ºå¼¹çª'); |
| | | this.$tip.toast('æªè·åå°äº§çº¿æ°æ®ï¼è¯·è系管çå'); |
| | | this.navigateToHome(); |
| | | } |
| | | }).catch(err => { |
| | | console.error('è·å产线å表失败:', err); |
| | | this.lineLoading = false; |
| | | this.$tip.toast('è·å产线å表失败ï¼è¯·éè¯'); |
| | | |
| | | // 3ç§åéè¯ |
| | | setTimeout(() => { |
| | | this.getLineListAndShowModal(); |
| | | }, 3000); |
| | | }); |
| | | }, |
| | | |
| | | // éæ©äº§çº¿ |
| | | selectLine(line) { |
| | | console.log('éä¸ç产线:', line.id, line.name); // æå°éä¸ç产线åç§° |
| | | this.selectedLineId = line.id; |
| | | }, |
| | | |
| | | // ç¡®è®¤éæ©äº§çº¿ï¼è§¦åVuexä¿åIDååç§°ï¼ |
| | | confirmLineSelection() { |
| | | if (!this.selectedLineId) return; |
| | | |
| | | // è°ç¨setCurrentLineï¼Vuexä¼èªå¨åæ¥åç§° |
| | | this.setCurrentLine(this.selectedLineId).then(() => { |
| | | console.log('äº§çº¿éæ©æåï¼ID:', this.selectedLineId, 'åç§°:', this.currentLineName); |
| | | this.showLineModal = false; |
| | | this.navigateToHome(); |
| | | }); |
| | | }, |
| | | |
| | | // å
³éäº§çº¿éæ©å¼¹çª |
| | | closeLineModal() { |
| | | this.showLineModal = false; |
| | | }, |
| | | |
| | | // 跳转å°é¦é¡µ |
| | | navigateToHome() { |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }); |
| | | |
| | | }, |
| | | |
| | | loginSuccess() { |
| | | this.$Router.replace({ |
| | | name: 'index' |
| | | }) |
| | | }, |
| | | |
| | | requestFailed(err) { |
| | | this.$message.warning("ç»å½å¤±è´¥") |
| | | }, |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.smsCountInterval) { |
| | | clearInterval(this.smsCountInterval); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | /* åææ ·å¼ä¿æä¸å */ |
| | | .login-paddingtop { |
| | | padding-top: 100upx; |
| | | } |
| | | |
| | | .zai-box { |
| | | padding: 0 20upx; |
| | | padding-top: 100upx; |
| | | position: relative; |
| | | } |
| | | |
| | | .zai-logo { |
| | | width: 200upx; |
| | | height: 150px; |
| | | } |
| | | |
| | | .zai-title { |
| | | font-size: 58upx; |
| | | color: #000000; |
| | | text-align: center; |
| | | } |
| | | |
| | | .input-placeholder, |
| | | .zai-input { |
| | | color: #94afce; |
| | | } |
| | | |
| | | .zai-label { |
| | | padding: 60upx 0; |
| | | text-align: center; |
| | | font-size: 30upx; |
| | | color: #a7b6d0; |
| | | } |
| | | |
| | | .zai-btn { |
| | | background: #ff65a3; |
| | | color: #fff; |
| | | border: 0; |
| | | border-radius: 100upx; |
| | | font-size: 36upx; |
| | | } |
| | | |
| | | .zai-btn:after { |
| | | border: 0; |
| | | } |
| | | |
| | | .zai-btn.button-hover { |
| | | transform: translate(1upx, 1upx); |
| | | } |
| | | |
| | | /* äº§çº¿éæ©å¼¹çªæ ·å¼ */ |
| | | .line-modal-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | z-index: 998; |
| | | opacity: 0; |
| | | transition: opacity 0.3s ease; |
| | | } |
| | | |
| | | .line-modal { |
| | | position: fixed; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: -100%; |
| | | background-color: #fff; |
| | | border-top-left-radius: 20upx; |
| | | border-top-right-radius: 20upx; |
| | | z-index: 999; |
| | | transition: bottom 0.3s ease; |
| | | max-height: 80vh; |
| | | } |
| | | |
| | | .line-modal-active { |
| | | bottom: 0; |
| | | } |
| | | |
| | | .line-modal-active+.line-modal-mask { |
| | | opacity: 1; |
| | | } |
| | | |
| | | .line-modal-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 20upx 30upx; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | .line-modal-title { |
| | | font-size: 34upx; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .line-modal-content { |
| | | padding: 20upx; |
| | | overflow-y: auto; |
| | | max-height: calc(80vh - 180upx); |
| | | } |
| | | |
| | | .line-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 25upx 20upx; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | font-size: 30upx; |
| | | } |
| | | |
| | | .line-item-selected { |
| | | background-color: #f0f7ff; |
| | | } |
| | | |
| | | .line-item:last-child { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .line-modal-footer { |
| | | padding: 20upx 30upx; |
| | | border-top: 1px solid #eee; |
| | | } |
| | | |
| | | .loading-view { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 60upx 0; |
| | | } |
| | | |
| | | .empty-view { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 60upx 0; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view v-if="authIncludes('eam:reportRepair:add')" class="container"> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">è¿å</block> |
| | | <block slot="content">æ°å¢-æ¥ä¿®</block> |
| | |
| | | |
| | | |
| | | </view> |
| | | <view v-else class="container"> |
| | | <!-- <view v-else class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">è¿å</block> |
| | | <block slot="content">æ°å¢-æ¥ä¿®</block> |
| | |
| | | <view class="padding flex flex-direction"> |
| | | å½åç¨æ·æ²¡ææä½æé |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | <template> |
| | | <view> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="index"> |
| | | <block slot="backText">è¿å</block> |
| | | <block slot="content">æ«ä¸æ«</block> |
| | | </cu-custom> |
| | | <view class="scanCode"> |
| | | <mumu-get-qrcode :continue="true" @success='qrcodeSucess' @error="qrcodeError" |
| | | :definition="true"></mumu-get-qrcode> |
| | | </view> |
| | | </view> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="index"> |
| | | <block slot="backText">è¿å</block> |
| | | <block slot="content">ç§»åºåæå°</block> |
| | | </cu-custom> |
| | | |
| | | <view class="print-area"> |
| | | <button @click="previewTransferOrder" class="btn test" :loading="isLoading"> |
| | | {{ isLoading ? 'çæä¸...' : 'é¢è§ç§»åºå' }} |
| | | </button> |
| | | </view> |
| | | |
| | | <view class="status"> |
| | | é¢è§ç¶æ: {{ isPreview ? 'å·²çæé¢è§' : 'æªçæ' }} |
| | | </view> |
| | | <view class="log" v-if="logList.length > 0"> |
| | | <text class="log-title">æä½æ¥å¿:</text> |
| | | <view v-for="(log, index) in logList" :key="index" class="log-item"> |
| | | {{ log }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue'; |
| | | export default { |
| | | name: 'TransferOrderPrinter', |
| | | data() { |
| | | return { |
| | | NavBarColor: '#007AFF', |
| | | isPreview: false, |
| | | logList: [], |
| | | isLoading: false, |
| | | // ç§»åºåæ°æ®ï¼å®é
项ç®ä¸å¯ä»æ¥å£è·åï¼ |
| | | orderData: { |
| | | productionOrderNo: '112379', |
| | | productModel: 'G-639', |
| | | customerName: '䏿¹æ¥äº§', |
| | | materialNo: '120047854', |
| | | customerModel: '4200-51354', |
| | | productionBatch: '25159847', |
| | | factory: 'åææ°ç«ç¬å·¥å', |
| | | quantity: '73', |
| | | docCode: 'XHJ.QM.QMS009E', |
| | | qrCodeText: 'C2506080024' |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | // æ·»å æä½æ¥å¿ |
| | | addLog(message) { |
| | | const time = new Date().toLocaleTimeString(); |
| | | this.logList.unshift(`[${time}] ${message}`); |
| | | if (this.logList.length > 20) this.logList.pop(); |
| | | }, |
| | | |
| | | export default { |
| | | components: { |
| | | mumuGetQrcode // 注å |
| | | }, |
| | | name: 'spare', |
| | | data() { |
| | | return { |
| | | NavBarColor: this.NavBarColor, |
| | | hasNavigated: false // æ è®°æ¯å¦å·²ç»è·³è½¬ |
| | | }; |
| | | }, |
| | | // 使ç¨å¨çº¿APIçæäºç»´ç ï¼æ Canvasä¾èµï¼ |
| | | async generateQrCode(content) { |
| | | try { |
| | | this.addLog('å¼å§çæäºç»´ç ...'); |
| | | |
| | | // æ¹æ¡1: 使ç¨Base64ç¼ç å
å®¹ç´æ¥çæäºç»´ç ï¼æ¨èï¼ |
| | | const base64Content = encodeURIComponent(content); |
| | | // è¯¥é¾æ¥ä¼æ ¹æ®å
容çæäºç»´ç ï¼æ éåç«¯æ¯æ |
| | | return `https://api.qrserver.com/v1/create-qr-code/?data=${base64Content}&size=120x120`; |
| | | |
| | | // æ¹æ¡2: å¤ç¨APIï¼è¥æ¹æ¡1ä¸å¯ç¨ï¼ |
| | | // return `https://chart.googleapis.com/chart?chs=120x120&cht=qr&chl=${base64Content}`; |
| | | } catch (error) { |
| | | this.addLog(`äºç»´ç çæå¤±è´¥: ${error.message}`); |
| | | throw error; |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | navigateToDeviceDetails(equipmentId) { |
| | | this.hasNavigated = true; // æ è®°å·²ç»è·³è½¬ |
| | | uni.redirectTo({ |
| | | url: `/pages/device/deviceWebDeils/deviceWebDeils?equipmentId=${encodeURIComponent(equipmentId)}`, |
| | | success: () => { |
| | | console.log('Navigated to device details'); |
| | | }, |
| | | fail: (err) => { |
| | | console.error('Navigation failed:', err); |
| | | } |
| | | }); |
| | | }, |
| | | qrcodeSucess(data) { // æ«ç æå |
| | | setTimeout(() => { |
| | | let equipmentId; |
| | | try { |
| | | // å
¼å®¹æ§å¤çï¼ä¼å
使ç¨URLåURLSearchParamsï¼å¦æä¸å¯ç¨å使ç¨å符串解æ |
| | | if ('URL' in window && 'URLSearchParams' in window) { |
| | | const url = new URL(data); |
| | | const params = new URLSearchParams(url.hash.slice(1).split('?')[1]); |
| | | equipmentId = params.get('equipmentId'); |
| | | } else { |
| | | // åç¬¦ä¸²è§£ææ¹å¼ |
| | | const hashIndex = data.indexOf('#'); |
| | | if (hashIndex !== -1) { |
| | | const hashPart = data.substring(hashIndex + 1); |
| | | const paramIndex = hashPart.indexOf('?'); |
| | | if (paramIndex !== -1) { |
| | | const paramStr = hashPart.substring(paramIndex + 1); |
| | | const pairs = paramStr.split('&'); |
| | | for (let pair of pairs) { |
| | | const [key, value] = pair.split('='); |
| | | if (key === 'equipmentId') { |
| | | equipmentId = value; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // çæç§»åºåHTMLå¹¶é¢è§ |
| | | async generateTransferHTML() { |
| | | try { |
| | | this.isLoading = true; |
| | | this.addLog('å¼å§çæç§»åºå...'); |
| | | |
| | | if (equipmentId) { |
| | | // ç»å½æåä¸è·åå°equipmentIdï¼è·³è½¬å°è®¾å¤è¯¦æ
é¡µé¢ |
| | | this.navigateToDeviceDetails(equipmentId); |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: "äºç»´ç 䏿ªæ¾å°ææçequipmentId", |
| | | showCancel: false |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | uni.showModal({ |
| | | title: 'é误', |
| | | content: "è§£æURLåºéï¼è¯·æ£æ¥äºç»´ç å
容", |
| | | showCancel: false |
| | | }); |
| | | } |
| | | }, 200); // å¢å 100毫ç§çå»¶è¿ |
| | | }, |
| | | qrcodeError(err) { // æ«ç 失败 |
| | | uni.showModal({ |
| | | title: 'æå头ææå¤±è´¥', |
| | | content: 'æå头ææå¤±è´¥ï¼è¯·æ£æµå½åæµè§å¨æ¯å¦ææå头æéã', |
| | | success: () => { |
| | | uni.navigateBack({}); // è¿åå°ä¸ä¸é¡µ |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | // çæäºç»´ç å
容 |
| | | const qrContent = `ç产订åå·:${this.orderData.productionOrderNo},产ååå·:${this.orderData.productModel},客æ·åç§°:${this.orderData.customerName},ç©æå·:${this.orderData.materialNo},客æ·åå·:${this.orderData.customerModel},ç产æ¹å·:${this.orderData.productionBatch},ç产åå:${this.orderData.factory},æ°é:${this.orderData.quantity}`; |
| | | |
| | | // è°ç¨å¨çº¿APIçæäºç»´ç |
| | | const qrDataUrl = await this.generateQrCode(qrContent); |
| | | this.addLog('äºç»´ç çææå'); |
| | | |
| | | // å¤çlogoå¾çï¼ä½¿ç¨æ¬å°èµæºï¼ |
| | | const logoUrl = '/static/index_logo.png'; |
| | | |
| | | // çæç§»åºåHTMLå
容 |
| | | const htmlContent = ` |
| | | <!DOCTYPE html> |
| | | <html lang="zh-CN"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>ç§»åºå</title> |
| | | <style> |
| | | @media print { |
| | | @page { |
| | | size: A4 landscape; |
| | | margin: 15mm; |
| | | } |
| | | body { |
| | | -webkit-print-color-adjust: exact; |
| | | } |
| | | } |
| | | body { |
| | | margin: 0; |
| | | padding: 0; |
| | | font-family: "Microsoft YaHei", "SimHei", sans-serif; |
| | | } |
| | | .transfer-order { |
| | | width: 800px; |
| | | height: 550px; |
| | | border: 2px solid #000; |
| | | box-sizing: border-box; |
| | | margin: 20px auto; |
| | | padding: 15px; |
| | | } |
| | | .header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 0; |
| | | border-bottom: 2px solid #000; |
| | | margin-bottom: 15px; |
| | | } |
| | | .logo img { |
| | | width: 180px; |
| | | height: auto; |
| | | } |
| | | .doc-info { |
| | | text-align: right; |
| | | } |
| | | .doc-code { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | margin-bottom: 5px; |
| | | } |
| | | .doc-name { |
| | | font-size: 28px; |
| | | font-weight: bold; |
| | | text-align: center; |
| | | margin: 15px 0; |
| | | } |
| | | .divider { |
| | | border-top: 2px solid #000; |
| | | width: 200px; |
| | | margin: 0 auto 15px; |
| | | } |
| | | table { |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | table-layout: fixed; |
| | | } |
| | | table, th, td { |
| | | border: 1px solid #000; |
| | | padding: 10px; |
| | | font-size: 15px; |
| | | word-wrap: break-word; |
| | | } |
| | | .label-container { |
| | | display: flex; |
| | | gap: 15px; |
| | | flex-wrap: wrap; |
| | | padding: 5px 0; |
| | | } |
| | | .status-label { |
| | | display: inline-block; |
| | | padding: 8px 15px; |
| | | background-color: #f0f0f0; |
| | | border: 1px solid #ccc; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | } |
| | | table tr td:first-child { |
| | | width: 120px; |
| | | } |
| | | table tr td[colspan="4"] { |
| | | width: calc(100% - 120px); |
| | | } |
| | | .qrcode-area { |
| | | text-align: center; |
| | | vertical-align: middle; |
| | | } |
| | | .qrcode-area img { |
| | | width: 150px; |
| | | height: 150px; |
| | | display: block; |
| | | margin: 0 auto; |
| | | } |
| | | .qrcode-text { |
| | | margin-top: 10px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="transfer-order"> |
| | | <div class="header"> |
| | | <div class="logo"> |
| | | <img src="${logoUrl}" alt="ä¼ä¸logo"> |
| | | </div> |
| | | <div class="doc-info"> |
| | | <div class="doc-code">${this.orderData.docCode}</div> |
| | | </div> |
| | | </div> |
| | | <div class="doc-name">ç§»åºå</div> |
| | | <div class="divider"></div> |
| | | <table> |
| | | <tr> |
| | | <td>ç产订åå·</td> |
| | | <td>${this.orderData.productionOrderNo}</td> |
| | | <td>产ååå·</td> |
| | | <td>${this.orderData.productModel}</td> |
| | | <td rowspan="4" class="qrcode-area"> |
| | | <img src="${qrDataUrl}" alt="äºç»´ç "> |
| | | <div class="qrcode-text">${this.orderData.qrCodeText}</div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>客æ·åç§°</td> |
| | | <td>${this.orderData.customerName}</td> |
| | | <td>ç©æå·</td> |
| | | <td>${this.orderData.materialNo}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>客æ·åå·</td> |
| | | <td>${this.orderData.customerModel}</td> |
| | | <td>ç产æ¹å·</td> |
| | | <td>${this.orderData.productionBatch}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>ç产åå</td> |
| | | <td>${this.orderData.factory}</td> |
| | | <td>æ°é</td> |
| | | <td>${this.orderData.quantity}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ£éªç¶æ</td> |
| | | <td colspan="4"> |
| | | <div class="label-container"> |
| | | <span class="status-label">åæ ¼</span> |
| | | <span class="status-label">å·²æ£éª</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | `; |
| | | |
| | | // çæBlob龿¥å¹¶è·³è½¬é¢è§ |
| | | const blob = new Blob([htmlContent], { type: 'text/html' }); |
| | | const previewUrl = URL.createObjectURL(blob); |
| | | |
| | | uni.navigateTo({ |
| | | url: `/pages/print-preview/print-preview?previewUrl=${encodeURIComponent(previewUrl)}`, |
| | | success: () => { |
| | | this.isPreview = true; |
| | | this.addLog('ç§»åºåé¢è§çææå'); |
| | | }, |
| | | fail: (err) => { |
| | | this.addLog(`跳转é¢è§å¤±è´¥: ${err.errMsg}`); |
| | | } |
| | | }); |
| | | } catch (error) { |
| | | this.addLog(`çæå¤±è´¥: ${error.message}`); |
| | | uni.showToast({ title: 'çæå¤±è´¥', icon: 'none' }); |
| | | } finally { |
| | | this.isLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // 触åé¢è§ |
| | | previewTransferOrder() { |
| | | if (this.isLoading) return; |
| | | this.generateTransferHTML(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .scanCode { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | z-index: 99; |
| | | height: 100%; |
| | | width: 100%; |
| | | background-color: rgba(0, 0, 0, 0.7); |
| | | } |
| | | |
| | | .reader-box { |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | } |
| | | |
| | | .reader { |
| | | width: 540rpx; |
| | | height: 540rpx; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | <style scoped> |
| | | .print-area { |
| | | padding: 20rpx; |
| | | } |
| | | .btn { |
| | | width: 100%; |
| | | padding: 20rpx; |
| | | margin-bottom: 15rpx; |
| | | border-radius: 8rpx; |
| | | color: #fff; |
| | | font-size: 28rpx; |
| | | background-color: #FF9500; |
| | | } |
| | | .status { |
| | | padding: 20rpx; |
| | | font-size: 28rpx; |
| | | color: #666; |
| | | } |
| | | .log { |
| | | margin: 10rpx; |
| | | padding: 20rpx; |
| | | background-color: #f5f5f5; |
| | | border-radius: 10rpx; |
| | | } |
| | | .log-title { |
| | | font-weight: bold; |
| | | display: block; |
| | | margin-bottom: 10rpx; |
| | | color: #333; |
| | | } |
| | | .log-item { |
| | | font-size: 26rpx; |
| | | color: #666; |
| | | margin-bottom: 5rpx; |
| | | word-break: break-all; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true"> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="index"> |
| | | <block slot="backText">è¿å</block> |
| | | <block slot="content">å®ä½</block> |
| | | <block slot="content">ç½ç»æå°æºé
ç½®</block> |
| | | </cu-custom> |
| | | <map |
| | | style="width: 100%; height:500px;" |
| | | :latitude="latitude" |
| | | :longitude="longitude" |
| | | :markers="marker" |
| | | :scale="scale" |
| | | > |
| | | </map> |
| | | </view> |
| | | |
| | | <!-- æå°æºè®¾ç½®åºå --> |
| | | <view class="setting-area"> |
| | | <view class="input-item"> |
| | | <text>æå°æºIP:</text> |
| | | <uni-data-select v-model="printerIP" :localdata="printerList" @change="changePrinterList" |
| | | placeholder="è¯·éæ©" /> |
| | | <!-- <uni-easyinput v-model="printerIP" placeholder="ä¾å¦: 192.168.1.100" /> --> |
| | | </view> |
| | | <view class="input-item"> |
| | | <text>端å£å·:</text> |
| | | <uni-easyinput v-model="printerPort" type="number" placeholder="é»è®¤: 9100" value="9100" /> |
| | | </view> |
| | | <view class="input-item"> |
| | | <text>æå°æºåå·:</text> |
| | | <uni-data-select v-model="printerModel" :localdata="printerModels" placeholder="éæ©æå°æºåå·" /> |
| | | </view> |
| | | <!-- å¹³å°éå¶æç¤º --> |
| | | <view class="platform-tip" v-if="isMini || isH5"> |
| | | â ï¸ å°ç¨åº/H5 䏿¯æç´æ¥TCPè¿æ¥ï¼ééè¿å端ä¸è½¬ |
| | | </view> |
| | | <button @click="connectPrinter" :disabled="isConnected || (isMini || isH5)" class="btn primary"> |
| | | è¿æ¥æå°æºï¼ä»
APPæ¯æï¼ |
| | | </button> |
| | | <button @click="connectViaBackend" :disabled="isConnected" class="btn primary-outline" |
| | | v-if="isMini || isH5"> |
| | | éè¿åç«¯è¿æ¥æå°æº |
| | | </button> |
| | | <button @click="disconnectPrinter" :disabled="!isConnected" class="btn danger"> |
| | | æå¼è¿æ¥ |
| | | </button> |
| | | <button @click="testPrint" :disabled="!isConnected" class="btn test"> |
| | | æµè¯æå°ï¼ZPLæä»¤ï¼ |
| | | </button> |
| | | </view> |
| | | |
| | | <!-- æå°å
容åºå --> |
| | | <view class="print-area" v-if="isConnected"> |
| | | <text class="print-title">éæ©æå°æ¨¡æ¿:</text> |
| | | <button @click="printStockLabel" class="btn print">æå°æåå
¥åºæ ç¾</button> |
| | | <button @click="printTransferOrder" class="btn print">æå°ç§»åºå</button> |
| | | <button @click="printInspectionForm(1)" class="btn print">æå°æ£éªåA</button> |
| | | <button @click="printInspectionForm(2)" class="btn print">æå°æ£éªåB</button> |
| | | </view> |
| | | |
| | | <!-- ç¶ææ¾ç¤º --> |
| | | <view class="status"> |
| | | è¿æ¥ç¶æ: {{ isConnected ? 'å·²è¿æ¥ï¼TCPï¼' : 'æªè¿æ¥' }} |
| | | </view> |
| | | <view class="log" v-if="logList.length > 0"> |
| | | <text class="log-title">æä½æ¥å¿:</text> |
| | | <view v-for="(log, index) in logList" :key="index" class="log-item"> |
| | | {{ log }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // å¼å
¥è®¾å¤ä¿¡æ¯å¤æå¹³å°ï¼APP/å°ç¨åº/H5ï¼ |
| | | import { |
| | | getSystemInfo, |
| | | isApp, |
| | | isMini, |
| | | isH5 |
| | | } from 'common/util/system.js'; |
| | | import PrinterCommands from 'common/util/printer-commands.js'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | NavBarColor:this.NavBarColor, |
| | | id:0, // ä½¿ç¨ markerç¹å»äºä»¶ éè¦å¡«åid |
| | | title: 'map', |
| | | ãlatitude: 40.009704, //纬度 |
| | | ãã longitude: 116.374999, //ç»åº¦ |
| | | ãããmarker: [{ |
| | | ããid:0, |
| | | ããlatitude: 40.009704,//纬度 |
| | | ããlongitude: 116.374999,//ç»åº¦ |
| | | ããiconPath: '/static/location.png', //æ¾ç¤ºç徿 |
| | | ããrotate:0, // æè½¬åº¦æ° |
| | | ããwidth:20, //宽 |
| | | ããheight:20, //é« |
| | | ãã title:'ä½ å¨åªäº',//æ æ³¨ç¹å |
| | | ãã alpha:0.5, //éæåº¦ |
| | | ãã /* label:{//为æ è®°ç¹æè¾¹å¢å æ ç¾ //å èæ¯é¢è²H5䏿¯æ |
| | | ãã content:'å京å½ç¬å
¬å¸',//ææ¬ |
| | | ããã color:'red',//ææ¬é¢è² |
| | | ã fontSize:24,//æåå¤§å° |
| | | x:5,//labelçåæ ï¼åç¹æ¯ marker 对åºçç»çº¬åº¦ |
| | | y:1,//labelçåæ ï¼åç¹æ¯ marker 对åºçç»çº¬åº¦ |
| | | borderWidth:12,//è¾¹æ¡å®½åº¦ |
| | | borderColor:'pink',//è¾¹æ¡é¢è² |
| | | ã borderRadius:20,//è¾¹æ¡åè§ |
| | | ã bgColor:'black',//èæ¯è² |
| | | ã padding:5,//ææ¬è¾¹ç¼çç½ |
| | | textAlign:'right'//ææ¬å¯¹é½æ¹å¼ã |
| | | }, */ |
| | | callout:{//èªå®ä¹æ è®°ç¹ä¸æ¹çæ°æ³¡çªå£ ç¹å»ææ |
| | | ããcontent:'å京å½ç¬å
¬å¸',//ææ¬ |
| | | ããcolor:'#ffffff',//æåé¢è² |
| | | ããfontSize:14,//ææ¬å¤§å° |
| | | ããborderRadius:2,//è¾¹æ¡åè§ |
| | | ãã bgColor:'#00c16f',//èæ¯é¢è² |
| | | ããdisplay:'ALWAYS'//å¸¸æ¾ |
| | | } |
| | | // anchor:{//ç»çº¬åº¦å¨æ æ³¨å¾æ çéç¹ï¼é»è®¤åºè¾¹ä¸ç¹ |
| | | // x:0, åç¹ä¸ºç»åºçç»çº¬åº¦ |
| | | // y:0, |
| | | // } |
| | | |
| | | }], |
| | | scale:16,//å°å¾ç¼©æ¾ç¨åº¦ |
| | | ã ãcontrols:[{//å¨å°å¾ä¸æ¾ç¤ºæ§ä»¶ï¼æ§ä»¶ä¸éçå°å¾ç§»å¨ |
| | | ããid:1,//æ§ä»¶id |
| | | ããiconPath:'/static/login3.png',//æ¾ç¤ºç徿 |
| | | clickable:true, |
| | | ããposition:{//æ§ä»¶å¨å°å¾çä½ç½® |
| | | ããleft:15, |
| | | ããtop:15, |
| | | ããwidth:50, |
| | | ããheight:50 |
| | | ãã }, |
| | | ãã}], |
| | | ã ãcircles:[{//å¨å°å¾ä¸æ¾ç¤ºå |
| | | ããlatitude: 40.009704, |
| | | ããlongitude: 116.374999, |
| | | ããradius:50,//åå¾ |
| | | fillColor:"#ffffffAA",//å¡«å
é¢è² |
| | | ããcolor:"#55aaffAA",//æè¾¹çé¢è² |
| | | ãã strokeWidth:1//æè¾¹ç宽度 |
| | | }], |
| | | ã/* ãpolyline:[{//æå®ä¸ç³»ååæ ç¹ï¼ä»æ°ç»ç¬¬ä¸é¡¹è¿çº¿è³æåä¸é¡¹ |
| | | ããããpoints:[ |
| | | ãã{latitude: 40.009153,longitude: 116.374935}, |
| | | ãã {latitude: 40.009704,longitude: 116.374999}, |
| | | ãããã], |
| | | ããããcolor:"#0000AA",//线çé¢è² |
| | | ããããwidth:2,//线ç宽度 |
| | | ããããdottedLine:true,//æ¯å¦è线 |
| | | ããããarrowLine:true, //带ç®å¤´ç线 å¼åè
å·¥å
·æä¸æ¯æè¯¥å±æ§ |
| | | ãã}], */ |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getLocation() |
| | | name: 'NetworkPrinter', |
| | | data() { |
| | | return { |
| | | printerList: [], |
| | | NavBarColor: this.NavBarColor, |
| | | printerIP: '', // æé©¬æå°æºIPï¼éæ¿æ¢ä¸ºå®é
å¼ï¼ |
| | | printerPort: '9100', // æé©¬é»è®¤TCPç«¯å£ |
| | | printerModel: 'zebra', // é»è®¤ä¸ºæé©¬ç³»å |
| | | printerModels: [{ |
| | | value: 'epson', |
| | | text: 'ç±æ®ç(EPSON)ç³»å' |
| | | }, |
| | | { |
| | | value: 'zebra', |
| | | text: 'æé©¬(ZEBRA)ç³»å' // é䏿马 |
| | | }, |
| | | { |
| | | value: 'citizen', |
| | | text: '西éå(CITIZEN)ç³»å' |
| | | }, |
| | | { |
| | | value: 'generic', |
| | | text: 'éç¨ESC/POSå
¼å®¹' |
| | | } |
| | | ], |
| | | isConnected: false, |
| | | socketTask: null, // åçTCP Socketå®ä¾ï¼æ¿æ¢Socket.ioï¼ |
| | | logList: [], |
| | | isMini: false, // æ¯å¦ä¸ºå°ç¨åº |
| | | isH5: false, // æ¯å¦ä¸ºH5 |
| | | // å端ä¸è½¬æ¥å£å°åï¼å°ç¨åº/H5使ç¨ï¼ |
| | | url: { |
| | | list: 'base/printerConfig/queryUserPrinterConfigList' |
| | | }, |
| | | backendPrintUrl: '/api/printer/print' |
| | | }; |
| | | }, |
| | | methods: { |
| | | getLocation(){ |
| | | uni.getLocation({ |
| | | type: 'gcj02', |
| | | success: function (res) { |
| | | console.log('å½åä½ç½®çç»åº¦ï¼' + res.longitude); |
| | | console.log('å½åä½ç½®ç纬度ï¼' + res.latitude); |
| | | }, |
| | | fail: function (res) { |
| | | console.log('å½åä½ç½®çç»åº¦'); |
| | | } |
| | | onLoad() { |
| | | // åå§åï¼å¤æå½åå¹³å° |
| | | this.initPlatform(); |
| | | // å è½½ç¼åé
ç½® |
| | | this.loadPrinterConfig(); |
| | | }, |
| | | onUnload() { |
| | | // 页é¢éæ¯æ¶æå¼è¿æ¥ |
| | | this.disconnectPrinter(); |
| | | // ä¿åé
ç½® |
| | | this.savePrinterConfig(); |
| | | }, |
| | | created() { |
| | | this.getPrinterList() |
| | | }, |
| | | methods: { |
| | | changePrinterList(e) { |
| | | this.printerIP = e; |
| | | console.log(this.printerIP) |
| | | }, |
| | | getPrinterList() { |
| | | this.$http.get(this.url.list, { |
| | | params: {}, |
| | | |
| | | }).then(res => { |
| | | //设置åè¡¨æ°æ® |
| | | if (res.data.success) { |
| | | this.printerList = res.data.result |
| | | } else { |
| | | uni.showToast({ |
| | | icon: "error", |
| | | title: res.data.message, |
| | | duration: 2000 |
| | | }); |
| | | |
| | | } |
| | | }).catch(() => { |
| | | this.$tip.error("èç½å¤±è´¥") |
| | | }) |
| | | }, |
| | | |
| | | // åå§åå¹³å°ï¼å¤æAPP/å°ç¨åº/H5ï¼ |
| | | initPlatform() { |
| | | // ç´æ¥è°ç¨å¯¼å
¥çå½åæ¹æ³ï¼ä¸ä¼æ¥é |
| | | const systemInfo = getSystemInfo(); // æ£ç¡®ï¼è°ç¨å½å导åºç getSystemInfo 彿° |
| | | this.isApp = isApp(); // æ£ç¡®ï¼è°ç¨å½å导åºç isApp 彿° |
| | | this.isMini = isMini(); // æ£ç¡®ï¼è°ç¨å½å导åºç isMini 彿° |
| | | this.isH5 = isH5(); // æ£ç¡®ï¼è°ç¨å½å导åºç isH5 彿° |
| | | this.isMini = systemInfo.platform === 'mp-weixin' || systemInfo.platform === 'mp-alipay'; |
| | | this.isH5 = systemInfo.platform === 'h5'; |
| | | if (this.isMini || this.isH5) { |
| | | this.addLog(`å½åå¹³å°ï¼${this.isMini ? 'å°ç¨åº' : 'H5'}ï¼ééè¿å端ä¸è½¬`); |
| | | } |
| | | }, |
| | | |
| | | // å è½½ä¿åçæå°æºé
ç½® |
| | | loadPrinterConfig() { |
| | | const config = uni.getStorageSync('printerConfig'); |
| | | if (config) { |
| | | this.printerIP = config.ip || this.printerIP; |
| | | this.printerPort = config.port || this.printerPort; |
| | | this.printerModel = config.model || this.printerModel; |
| | | } |
| | | }, |
| | | |
| | | // ä¿åæå°æºé
ç½® |
| | | savePrinterConfig() { |
| | | uni.setStorageSync('printerConfig', { |
| | | ip: this.printerIP, |
| | | port: this.printerPort, |
| | | model: this.printerModel |
| | | }); |
| | | }, |
| | | |
| | | // æ·»å æ¥å¿ |
| | | addLog(message) { |
| | | const time = new Date().toLocaleTimeString(); |
| | | this.logList.unshift(`[${time}] ${message}`); |
| | | if (this.logList.length > 20) this.logList.pop(); |
| | | }, |
| | | |
| | | // 1. APP端ï¼ç´æ¥TCPè¿æ¥æé©¬æå°æºï¼æ ¸å¿ä¿®æ¹ï¼ |
| | | connectPrinter() { |
| | | if (!this.printerIP || !this.printerPort) { |
| | | uni.showToast({ |
| | | title: '请è¾å
¥IPå端å£', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // å
å
³éå·²æè¿æ¥ |
| | | if (this.socketTask) this.disconnectPrinter(); |
| | | |
| | | this.addLog(`æ£å¨TCPè¿æ¥ï¼${this.printerIP}:${this.printerPort}`); |
| | | // åçTCP Socketè¿æ¥ï¼type: 'tcp' å¿
é¡»æå®ï¼ |
| | | this.socketTask = uni.createSocket({ |
| | | url: `tcp://${this.printerIP}:${this.printerPort}`, |
| | | type: 'tcp', // æç¡®æå®ä¸ºTCPè¿æ¥ï¼æé©¬æå°æºä»
æ¯æTCPï¼ |
| | | success: () => { |
| | | this.addLog('Socketå建æåï¼çå¾
è¿æ¥...'); |
| | | // çå¬è¿æ¥æå |
| | | this.socketTask.onOpen(() => { |
| | | this.isConnected = true; |
| | | this.addLog('æé©¬æå°æºè¿æ¥æåï¼TCPï¼'); |
| | | this.savePrinterConfig(); |
| | | uni.showToast({ |
| | | title: 'è¿æ¥æå', |
| | | icon: 'success' |
| | | }); |
| | | }); |
| | | // çå¬è¿æ¥é误 |
| | | this.socketTask.onError((err) => { |
| | | this.isConnected = false; |
| | | this.addLog(`è¿æ¥å¤±è´¥ï¼${err.errMsg || '端å£è¢«å ç¨ææå°æºç¦»çº¿'}`); |
| | | uni.showToast({ |
| | | title: 'è¿æ¥å¤±è´¥ï¼æ£æ¥IP/端å£', |
| | | icon: 'none' |
| | | }); |
| | | }); |
| | | // çå¬è¿æ¥æå¼ |
| | | this.socketTask.onClose((res) => { |
| | | this.isConnected = false; |
| | | this.addLog(`è¿æ¥æå¼ï¼${res.reason || 'æªç¥åå '}`); |
| | | // è¢«å¨æå¼æ¶å°è¯éè¿ï¼å¯éï¼ |
| | | if (res.code !== 1000) { |
| | | setTimeout(() => this.connectPrinter(), 3000); |
| | | } |
| | | }); |
| | | }, |
| | | fail: (err) => { |
| | | this.addLog(`å建Socket失败ï¼${err.errMsg}`); |
| | | uni.showToast({ |
| | | title: 'åå»ºè¿æ¥å¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 2. å°ç¨åº/H5ï¼éè¿å端ä¸è½¬è¿æ¥ï¼æ°å¢ï¼ |
| | | connectViaBackend() { |
| | | // å端ä¸è½¬æ éå端建ç«TCPï¼ä»
éä¿åé
置并éªè¯å端è¿éæ§ |
| | | if (!this.printerIP || !this.printerPort) { |
| | | uni.showToast({ |
| | | title: '请è¾å
¥IPå端å£', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | this.addLog(`éè¿å端éªè¯æå°æºï¼${this.printerIP}:${this.printerPort}`); |
| | | // è°ç¨å端æ¥å£éªè¯æå°æºç¶æ |
| | | uni.request({ |
| | | url: '/api/printer/checkStatus', |
| | | method: 'POST', |
| | | data: { |
| | | ip: this.printerIP, |
| | | port: this.printerPort |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.success) { |
| | | this.isConnected = true; // æ 记为âåç«¯å·²è¿æ¥â |
| | | this.addLog('åç«¯è¿æ¥æå°æºæå'); |
| | | this.savePrinterConfig(); |
| | | uni.showToast({ |
| | | title: 'åç«¯è¿æ¥æå', |
| | | icon: 'success' |
| | | }); |
| | | } else { |
| | | this.addLog(`åç«¯è¿æ¥å¤±è´¥ï¼${res.data.message}`); |
| | | uni.showToast({ |
| | | title: res.data.message, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | this.addLog(`å端æ¥å£å¼å¸¸ï¼${err.errMsg}`); |
| | | uni.showToast({ |
| | | title: 'å端æ¥å£ä¸å¯ç¨', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // æå¼è¿æ¥ |
| | | disconnectPrinter() { |
| | | if (this.socketTask) { |
| | | this.socketTask.close({ |
| | | success: () => { |
| | | this.isConnected = false; |
| | | this.socketTask = null; |
| | | this.addLog('å·²æå¼TCPè¿æ¥'); |
| | | uni.showToast({ |
| | | title: 'å·²æå¼è¿æ¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | } else if (this.isConnected && (this.isMini || this.isH5)) { |
| | | // å端ä¸è½¬åºæ¯ï¼éç¥å端æå¼ |
| | | uni.request({ |
| | | url: '/api/printer/disconnect' |
| | | }); |
| | | this.isConnected = false; |
| | | this.addLog('å·²éç¥å端æå¼è¿æ¥'); |
| | | uni.showToast({ |
| | | title: 'å·²æå¼è¿æ¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 3. åéZPLæä»¤ï¼æ ¸å¿ä¿®æ¹ï¼ç´æ¥åéäºè¿å¶æä»¤ï¼æ¿æ¢Socket.io emitï¼ |
| | | sendZplCommand(zplCode, retry = 2) { |
| | | return new Promise((resolve, reject) => { |
| | | // åºåAPPç´è¿åå端ä¸è½¬ |
| | | if (this.isMini || this.isH5) { |
| | | // å°ç¨åº/H5ï¼éè¿å端åéZPL |
| | | uni.request({ |
| | | url: this.backendPrintUrl, |
| | | method: 'POST', |
| | | data: { |
| | | ip: this.printerIP, |
| | | port: this.printerPort, |
| | | zplCode: zplCode |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.success) resolve(res.data); |
| | | else if (retry > 0) { |
| | | this.addLog(`å端æå°å¤±è´¥ï¼éè¯(${retry}次)...`); |
| | | setTimeout(() => this.sendZplCommand(zplCode, retry - 1).then( |
| | | resolve).catch(reject), 1000); |
| | | } else reject(new Error(res.data.message || 'å端æå°å¤±è´¥')); |
| | | }, |
| | | fail: (err) => reject(new Error(`å端请æ±å¤±è´¥ï¼${err.errMsg}`)) |
| | | }); |
| | | } else { |
| | | // APP端ï¼ç´æ¥TCPåéZPLï¼äºè¿å¶æ ¼å¼ï¼ |
| | | if (!this.socketTask || !this.isConnected) { |
| | | reject(new Error('æªå»ºç«TCPè¿æ¥')); |
| | | return; |
| | | } |
| | | // ZPLæä»¤è½¬ä¸ºUint8Arrayï¼é¿å
ç¼ç é®é¢ï¼ |
| | | const buffer = new Uint8Array(Buffer.from(zplCode)); |
| | | this.socketTask.send({ |
| | | data: buffer, |
| | | success: () => { |
| | | this.addLog('ZPLæä»¤åéæå'); |
| | | resolve({ |
| | | success: true |
| | | }); |
| | | }, |
| | | fail: (err) => { |
| | | if (retry > 0) { |
| | | this.addLog(`æä»¤åé失败ï¼éè¯(${retry}次)...`); |
| | | setTimeout(() => this.sendZplCommand(zplCode, retry - 1).then( |
| | | resolve).catch(reject), 1000); |
| | | } else reject(new Error(`åé失败ï¼${err.errMsg}`)); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 4. æå»ºæé©¬ZPLæä»¤ï¼æ ¸å¿ä¿®æ¹ï¼éé
䏿ãäºç»´ç ï¼ |
| | | buildZpl(data, templateType) { |
| | | const commands = new PrinterCommands(this.printerModel); |
| | | // æé©¬ä¸ç¨ZPLæä»¤æå»ºï¼è¦çPrinterCommandsä¸å¯¹åºæ¹æ³ï¼ |
| | | switch (templateType) { |
| | | case 'test': |
| | | // æµè¯é¡µï¼å«ä¸æåç®åææ¬ï¼è§£å³ä¹±ç ï¼ |
| | | return `^XA^CI28^CFSIMSUN,30^FO50,50^FDæé©¬æå°æºæµè¯é¡µï¼ä¸æï¼^FS^FO50,100^FDå½åæ¶é´ï¼${new Date().toLocaleString()}^FS^XZ`; |
| | | case 'stockLabel': |
| | | // æåå
¥åºæ ç¾ï¼å«äºç»´ç ï¼ZPLåç^BQæä»¤ï¼ |
| | | return `^XA |
| | | ^CI28^CFSIMSUN,24 // UTF-8ç¼ç + 䏿åä½ï¼SIMSUNéæåä¸ä¼ å°æå°æºï¼ |
| | | ^FO30,30^FD订åå·ï¼${data.orderNo}^FS |
| | | ^FO30,70^FD客æ·ï¼${data.customer}^FS |
| | | ^FO30,110^FDç©æå·ï¼${data.materialNo}^FS |
| | | ^FO30,150^FDæ¹æ¬¡å·ï¼${data.batchNo}^FS |
| | | ^FO30,190^FDè§æ ¼ï¼${data.spec}^FS |
| | | ^FO30,230^FDæ°éï¼${data.quantity}ä»¶^FS |
| | | ^FO220,30^BQN,2,10 // äºç»´ç ï¼QR Codeï¼çº éç级2ï¼å¤§å°10 |
| | | ^FDQA,ç©æ:${data.materialNo},æ¹æ¬¡:${data.batchNo}^FS // QAåç¼=QR Codeï¼å
å®¹ä¸ºç©æ+æ¹æ¬¡ |
| | | ^XZ`.replace(/\s+/g, ''); // å»é¤å¤ä½ç©ºæ ¼ï¼é¿å
è§£æé误 |
| | | case 'transferOrder': |
| | | // ç§»åºåï¼ç±»ä¼¼å
¥åºæ ç¾ï¼è°æ´å段 |
| | | return `^XA |
| | | ^CI28^CFSIMSUN,24 |
| | | ^FO30,30^FDç§»åºåå·ï¼${data.orderNo}^FS |
| | | ^FO30,70^FD客æ·ï¼${data.customer}^FS |
| | | ^FO30,110^FDç©æå·ï¼${data.materialNo}^FS |
| | | ^FO30,150^FDæ¹æ¬¡å·ï¼${data.batchNo}^FS |
| | | ^FO30,190^FDå·¥åï¼${data.factory}^FS |
| | | ^FO220,30^BQN,2,10 |
| | | ^FDQA,ç§»åºå:${data.orderNo},æ°é:${data.quantity}^FS |
| | | ^XZ`.replace(/\s+/g, ''); |
| | | case 'inspectionA': |
| | | case 'inspectionB': |
| | | // æ£éªåï¼å¤è¡æ£éªé¡¹ |
| | | let inspectionItems = ''; |
| | | data.items.forEach((item, idx) => { |
| | | inspectionItems += `^FO30,${110 + idx * 40}^FD${item.name}ï¼${item.result}^FS`; |
| | | }); |
| | | return `^XA |
| | | ^CI28^CFSIMSUN,24 |
| | | ^FO30,30^FDæ£éªåå·ï¼${data.formNo}^FS |
| | | ^FO30,70^FDæ£éªåï¼${data.inspector}^FS |
| | | ${inspectionItems} |
| | | ^FO220,30^BQN,2,10 |
| | | ^FDQA,æ£éªå:${data.formNo},ç©æ:${data.materialNo}^FS |
| | | ^XZ`.replace(/\s+/g, ''); |
| | | default: |
| | | throw new Error('æªç¥æ¨¡æ¿ç±»å'); |
| | | } |
| | | }, |
| | | |
| | | // æµè¯æå°ï¼ZPLæä»¤ï¼ |
| | | async testPrint() { |
| | | try { |
| | | const zplCode = this.buildZpl({}, 'test'); |
| | | await this.sendZplCommand(zplCode); |
| | | this.addLog('æµè¯é¡µæå°æåï¼ZPLæä»¤ï¼'); |
| | | uni.showToast({ |
| | | title: 'æµè¯æå°æå', |
| | | icon: 'success' |
| | | }); |
| | | } catch (error) { |
| | | this.addLog(`æµè¯æå°å¤±è´¥ï¼${error.message}`); |
| | | uni.showToast({ |
| | | title: 'æå°å¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // æå°æåå
¥åºæ ç¾ï¼ä½¿ç¨ZPLï¼ |
| | | async printStockLabel() { |
| | | try { |
| | | const data = { |
| | | orderNo: '11263797', |
| | | customer: 'åå©', |
| | | model: '6608268440', |
| | | materialNo: '120026829', |
| | | batchNo: '25219773', |
| | | spec: 'G3-700A', |
| | | quantity: 100, |
| | | date: '2023/06/07' |
| | | }; |
| | | const zplCode = this.buildZpl(data, 'stockLabel'); |
| | | await this.sendZplCommand(zplCode); |
| | | this.addLog('æåå
¥åºæ ç¾æå°æå'); |
| | | uni.showToast({ |
| | | title: 'æå°æå', |
| | | icon: 'success' |
| | | }); |
| | | } catch (error) { |
| | | this.addLog(`æå°å¤±è´¥ï¼${error.message}`); |
| | | uni.showToast({ |
| | | title: 'æå°å¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // æå°ç§»åºåï¼ä½¿ç¨ZPLï¼ |
| | | async printTransferOrder() { |
| | | try { |
| | | const data = { |
| | | orderNo: '112379', |
| | | productModel: 'G-639', |
| | | customer: '䏿¹æ¥äº§', |
| | | materialNo: '120047854', |
| | | customerModel: '4200-51354', |
| | | batchNo: '25159847', |
| | | factory: 'åææ°ç«ç¬å·¥å', |
| | | quantity: 73 |
| | | }; |
| | | const zplCode = this.buildZpl(data, 'transferOrder'); |
| | | await this.sendZplCommand(zplCode); |
| | | this.addLog('ç§»åºåæå°æå'); |
| | | uni.showToast({ |
| | | title: 'æå°æå', |
| | | icon: 'success' |
| | | }); |
| | | } catch (error) { |
| | | this.addLog(`æå°å¤±è´¥ï¼${error.message}`); |
| | | uni.showToast({ |
| | | title: 'æå°å¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // æå°æ£éªåï¼ä½¿ç¨ZPLï¼ |
| | | async printInspectionForm(type) { |
| | | try { |
| | | const data = { |
| | | formNo: type === 1 ? 'JYD-20250801' : 'JYD-20250802', |
| | | materialNo: '120026829', |
| | | batchNo: '25219773', |
| | | inspector: 'å¼ ä¸', |
| | | date: new Date().toLocaleDateString(), |
| | | items: [{ |
| | | name: 'å¤è§', |
| | | result: 'åæ ¼' |
| | | }, |
| | | { |
| | | name: '尺寸', |
| | | result: 'åæ ¼' |
| | | }, |
| | | { |
| | | name: 'æ§è½', |
| | | result: type === 1 ? 'åæ ¼' : 'å¾
æ£' |
| | | } |
| | | ] |
| | | }; |
| | | const zplCode = this.buildZpl(data, `inspection${type === 1 ? 'A' : 'B'}`); |
| | | await this.sendZplCommand(zplCode); |
| | | this.addLog(`æ£éªå${type}æå°æå`); |
| | | uni.showToast({ |
| | | title: 'æå°æå', |
| | | icon: 'success' |
| | | }); |
| | | } catch (error) { |
| | | this.addLog(`æå°å¤±è´¥ï¼${error.message}`); |
| | | uni.showToast({ |
| | | title: 'æå°å¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | |
| | | <style scoped> |
| | | .platform-tip { |
| | | color: #FF3B30; |
| | | font-size: 24rpx; |
| | | margin-bottom: 15rpx; |
| | | padding: 10rpx; |
| | | background-color: #FFF8F8; |
| | | border-radius: 8rpx; |
| | | } |
| | | |
| | | .btn.primary-outline { |
| | | background-color: #fff; |
| | | color: #007AFF; |
| | | border: 1rpx solid #007AFF; |
| | | } |
| | | |
| | | .container { |
| | | padding-bottom: 20rpx; |
| | | } |
| | | |
| | | .setting-area, |
| | | .print-area { |
| | | padding: 20rpx; |
| | | background-color: #fff; |
| | | margin: 10rpx; |
| | | border-radius: 10rpx; |
| | | } |
| | | |
| | | .input-item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | border-bottom: 1rpx solid #eee; |
| | | padding-bottom: 10rpx; |
| | | } |
| | | |
| | | .input-item text { |
| | | width: 140rpx; |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | } |
| | | |
| | | .uni-easyinput { |
| | | flex: 1; |
| | | } |
| | | |
| | | .btn { |
| | | width: 100%; |
| | | padding: 20rpx; |
| | | margin-bottom: 15rpx; |
| | | border-radius: 8rpx; |
| | | color: #fff; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .primary { |
| | | background-color: #007AFF; |
| | | } |
| | | |
| | | .danger { |
| | | background-color: #FF3B30; |
| | | } |
| | | |
| | | .print { |
| | | background-color: #00C853; |
| | | } |
| | | |
| | | .test { |
| | | background-color: #FF9500; |
| | | } |
| | | |
| | | .print-title { |
| | | display: block; |
| | | font-size: 28rpx; |
| | | color: #666; |
| | | margin-bottom: 15rpx; |
| | | } |
| | | |
| | | .status { |
| | | padding: 20rpx; |
| | | font-size: 28rpx; |
| | | color: #666; |
| | | } |
| | | |
| | | .log { |
| | | margin: 10rpx; |
| | | padding: 20rpx; |
| | | background-color: #f5f5f5; |
| | | border-radius: 10rpx; |
| | | } |
| | | |
| | | .log-title { |
| | | font-weight: bold; |
| | | display: block; |
| | | margin-bottom: 10rpx; |
| | | color: #333; |
| | | } |
| | | |
| | | .log-item { |
| | | font-size: 26rpx; |
| | | color: #666; |
| | | margin-bottom: 5rpx; |
| | | word-break: break-all; |
| | | } |
| | | </style> |
| | |
| | | <text class="text-grey">å®ä½</text> |
| | | </view> |
| | | </navigator> --> |
| | | <navigator class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.4s'}]" url="/pages/user/location" hover-class="none"> |
| | | <view class="content" > |
| | | <text class="cuIcon-news text-cyan"></text> |
| | | <text class="text-grey">æå°æº</text> |
| | | </view> |
| | | </navigator> |
| | | <navigator class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.4s'}]" url="/pages/lineSelect/lineSelect" hover-class="none"> |
| | | <view class="content" > |
| | | <text class="cuIcon-location text-cyan"></text> |
| | | <text class="text-grey">产线</text> |
| | | </view> |
| | | </navigator> |
| | | <navigator class="cu-item arrow animation-slide-bottom" url="/pages/user/userdetail" :style="[{animationDelay: '0.6s'}]"> |
| | | <view class="content"> |
| | | <text class="cuIcon-settingsfill text-cyan"></text> |
| | |
| | | import api from "@/api/api" |
| | | import MinCache from '@/common/util/MinCache.js' |
| | | import { |
| | | ACCESS_TOKEN, |
| | | USER_NAME, |
| | | USER_INFO, |
| | | X_TENANT_ID |
| | | ACCESS_TOKEN, |
| | | USER_NAME, |
| | | USER_INFO, |
| | | X_TENANT_ID |
| | | } from "@/common/util/constants" |
| | | |
| | | Vue.use(Vuex) |
| | | |
| | | export default new Vuex.Store({ |
| | | state: { |
| | | auth: [], |
| | | token: '', |
| | | userid: '', |
| | | username: '', |
| | | realname: '', |
| | | welcome: '', |
| | | avatar: '' |
| | | }, |
| | | mutations: { |
| | | SET_AUTH(state, auth) { |
| | | state.auth = auth |
| | | }, |
| | | SET_TOKEN: (state, token) => { |
| | | state.token = token |
| | | }, |
| | | SET_NAME: (state, { |
| | | username, |
| | | realname, |
| | | welcome |
| | | }) => { |
| | | state.username = username |
| | | state.realname = realname |
| | | state.welcome = welcome |
| | | }, |
| | | SET_AVATAR: (state, avatar) => { |
| | | state.avatar = avatar |
| | | } |
| | | }, |
| | | actions: { |
| | | // ç»å½ |
| | | mLogin({ |
| | | commit |
| | | }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | api.login(userInfo).then(response => { |
| | | if (response.data.code == 200) { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |
| | | uni.setStorageSync(ACCESS_TOKEN, result.token); |
| | | uni.setStorageSync("isLogin", true); |
| | | uni.setStorageSync("userId", userInfo.id); |
| | | uni.setStorageSync(USER_INFO, userInfo); |
| | | commit('SET_TOKEN', result.token) |
| | | commit('SET_AVATAR', userInfo.avatar) |
| | | commit('SET_NAME', { |
| | | username: userInfo.username, |
| | | realname: userInfo.realname |
| | | }) |
| | | resolve(response) |
| | | } else { |
| | | resolve(response) |
| | | } |
| | | }).catch(error => { |
| | | console.log("catch===>response", response) |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | //ææºå·ç»å½ |
| | | PhoneLogin({ |
| | | commit |
| | | }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | api.phoneNoLogin(userInfo).then(response => { |
| | | if (response.data.code == 200) { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |
| | | uni.setStorageSync(ACCESS_TOKEN, result.token); |
| | | uni.setStorageSync(USER_INFO, userInfo); |
| | | commit('SET_TOKEN', result.token) |
| | | commit('SET_NAME', { |
| | | username: userInfo.username, |
| | | realname: userInfo.realname |
| | | }) |
| | | commit('SET_AVATAR', userInfo.avatar) |
| | | resolve(response) |
| | | } else { |
| | | reject(response) |
| | | } |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | // ç¬¬ä¸æ¹ç»å½ |
| | | ThirdLogin({ |
| | | commit |
| | | }, param) { |
| | | return new Promise((resolve, reject) => { |
| | | api.thirdLogin(param.token, param.thirdType).then(response => { |
| | | if (response.data.code == '200') { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |
| | | uni.setStorageSync(ACCESS_TOKEN, result.token); |
| | | uni.setStorageSync(USER_INFO, userInfo); |
| | | uni.setStorageSync("userId", userInfo.id); |
| | | uni.setStorageSync(X_TENANT_ID, userInfo.loginTenantId); |
| | | state: { |
| | | auth: [], |
| | | token: '', |
| | | userid: '', |
| | | username: '', |
| | | realname: '', |
| | | welcome: '', |
| | | avatar: '', |
| | | user: {}, // è¡¥å
ç¨æ·ä¿¡æ¯å¯¹è±¡ |
| | | tenantId: '', // è¡¥å
ç§æ·ID |
| | | // 产线管çç¸å
³ç¶æ |
| | | lineList: [], // 产线å表 |
| | | currentLineId: uni.getStorageSync('currentLineId') || null, // å½åéä¸ç产线ID |
| | | currentLineName: uni.getStorageSync('currentLineName') || '', // å½åéä¸ç产线åç§° |
| | | currentLineInfo: null, // å½åéä¸ç产线详ç»ä¿¡æ¯ |
| | | currentLineType: uni.getStorageSync('currentLineType') || '' // æ°å¢ï¼å½åéä¸ç产线类å |
| | | }, |
| | | mutations: { |
| | | SET_AUTH(state, auth) { |
| | | state.auth = auth |
| | | }, |
| | | SET_TOKEN: (state, token) => { |
| | | state.token = token |
| | | }, |
| | | SET_NAME: (state, { |
| | | username, |
| | | realname, |
| | | welcome |
| | | }) => { |
| | | state.username = username |
| | | state.realname = realname |
| | | state.welcome = welcome |
| | | }, |
| | | SET_AVATAR: (state, avatar) => { |
| | | state.avatar = avatar |
| | | }, |
| | | SET_ID: (state, id) => { |
| | | state.userid = id |
| | | }, |
| | | SET_INFO: (state, userInfo) => { |
| | | state.user = userInfo |
| | | }, |
| | | SET_TENANTID: (state, tenantId) => { |
| | | state.tenantId = tenantId |
| | | }, |
| | | // 产线ç¸å
³mutations |
| | | SET_LINE_LIST(state, list) { |
| | | state.lineList = list |
| | | console.log('Vuex SET_LINE_LIST: 产线åè¡¨å·²æ´æ°', list); |
| | | }, |
| | | SET_CURRENT_LINE_ID(state, lineId) { |
| | | state.currentLineId = lineId |
| | | uni.setStorageSync('currentLineId', lineId) |
| | | |
| | | commit('SET_TOKEN', result.token) |
| | | commit('SET_AVATAR', userInfo.avatar) |
| | | commit('SET_NAME', { |
| | | username: userInfo.username, |
| | | realname: userInfo.realname |
| | | }) |
| | | commit('SET_ID', userInfo.id) |
| | | commit('SET_INFO', userInfo) |
| | | commit('SET_TENANTID', userInfo.loginTenantId) |
| | | resolve(response) |
| | | } else { |
| | | reject(response) |
| | | } |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | // ç»åº |
| | | Logout({ |
| | | commit, |
| | | state |
| | | }) { |
| | | return new Promise((resolve) => { |
| | | let logoutToken = state.token; |
| | | commit('SET_TOKEN', '') |
| | | uni.removeStorageSync(ACCESS_TOKEN) |
| | | api.logout(logoutToken).then(() => { |
| | | resolve() |
| | | }).catch(() => { |
| | | resolve() |
| | | }) |
| | | }) |
| | | }, |
| | | saveAuth({ |
| | | commit |
| | | }, auth) { |
| | | commit('SET_AUTH', auth) |
| | | } |
| | | }, |
| | | getters: { |
| | | getAuth: state => state.auth, |
| | | token: state => state.token, |
| | | username: state => { |
| | | state.userid = uni.getStorageSync(USER_INFO).username; |
| | | return state.username |
| | | }, |
| | | nickname: state => { |
| | | state.userid = uni.getStorageSync(USER_INFO).realname; |
| | | return state.user.realname |
| | | }, |
| | | avatar: state => { |
| | | state.userid = uni.getStorageSync(USER_INFO).avatar; |
| | | return state.user.avatar |
| | | }, |
| | | userid: state => { |
| | | state.userid = uni.getStorageSync(USER_INFO).id; |
| | | return state.userid |
| | | }, |
| | | } |
| | | // åæ¥æ´æ°å½å产线信æ¯ãåç§°åç±»å |
| | | if (lineId && state.lineList.length > 0) { |
| | | state.currentLineInfo = state.lineList.find(line => line.id === lineId) || null |
| | | // ä»äº§çº¿ä¿¡æ¯ä¸æååç§°å¹¶ä¿å |
| | | state.currentLineName = state.currentLineInfo ? state.currentLineInfo.name : '' |
| | | // æ°å¢ï¼ä»äº§çº¿ä¿¡æ¯ä¸æåç±»åå¹¶ä¿å |
| | | state.currentLineType = state.currentLineInfo ? state.currentLineInfo.type : '' |
| | | |
| | | uni.setStorageSync('currentLineName', state.currentLineName) |
| | | // æ°å¢ï¼å°ç±»å忥ä¿åå°æ¬å°åå¨ |
| | | uni.setStorageSync('currentLineType', state.currentLineType) |
| | | } else { |
| | | state.currentLineInfo = null |
| | | state.currentLineName = '' |
| | | state.currentLineType = '' // æ°å¢ï¼æ¸
空类å |
| | | |
| | | uni.removeStorageSync('currentLineName') |
| | | uni.removeStorageSync('currentLineType') // æ°å¢ï¼æ¸
餿¬å°åå¨çç±»å |
| | | } |
| | | console.log('Vuex SET_CURRENT_LINE_ID: å½å产线IDå·²æ´æ°', lineId); |
| | | console.log('Vuex SET_CURRENT_LINE_NAME: å½å产线åç§°å·²æ´æ°', state.currentLineName); |
| | | console.log('Vuex SET_CURRENT_LINE_TYPE: å½å产线类åå·²æ´æ°', state.currentLineType); // æ°å¢ï¼æå°ç±»åä¿¡æ¯ |
| | | } |
| | | }, |
| | | actions: { |
| | | // è´¦å·ç»å½ |
| | | mLogin({ |
| | | commit |
| | | }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | api.login(userInfo).then(response => { |
| | | if (response.data.code == 200) { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |
| | | uni.setStorageSync(ACCESS_TOKEN, result.token); |
| | | uni.setStorageSync("isLogin", true); |
| | | uni.setStorageSync("userId", userInfo.id); |
| | | uni.setStorageSync(USER_INFO, userInfo); |
| | | commit('SET_TOKEN', result.token) |
| | | commit('SET_AVATAR', userInfo.avatar) |
| | | commit('SET_NAME', { |
| | | username: userInfo.username, |
| | | realname: userInfo.realname |
| | | }) |
| | | commit('SET_ID', userInfo.id) |
| | | commit('SET_INFO', userInfo) |
| | | resolve(response) |
| | | } else { |
| | | resolve(response) |
| | | } |
| | | }).catch(error => { |
| | | console.log("ç»å½å¤±è´¥:", error) |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | // ææºå·ç»å½ |
| | | PhoneLogin({ |
| | | commit |
| | | }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | api.phoneNoLogin(userInfo).then(response => { |
| | | if (response.data.code == 200) { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |
| | | uni.setStorageSync(ACCESS_TOKEN, result.token); |
| | | uni.setStorageSync(USER_INFO, userInfo); |
| | | commit('SET_TOKEN', result.token) |
| | | commit('SET_NAME', { |
| | | username: userInfo.username, |
| | | realname: userInfo.realname |
| | | }) |
| | | commit('SET_AVATAR', userInfo.avatar) |
| | | commit('SET_ID', userInfo.id) |
| | | commit('SET_INFO', userInfo) |
| | | resolve(response) |
| | | } else { |
| | | reject(response) |
| | | } |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | // ç¬¬ä¸æ¹ç»å½ |
| | | ThirdLogin({ |
| | | commit |
| | | }, param) { |
| | | return new Promise((resolve, reject) => { |
| | | api.thirdLogin(param.token, param.thirdType).then(response => { |
| | | if (response.data.code == '200') { |
| | | const result = response.data.result |
| | | const userInfo = result.userInfo |
| | | uni.setStorageSync(ACCESS_TOKEN, result.token); |
| | | uni.setStorageSync(USER_INFO, userInfo); |
| | | uni.setStorageSync("userId", userInfo.id); |
| | | uni.setStorageSync(X_TENANT_ID, userInfo.loginTenantId); |
| | | |
| | | commit('SET_TOKEN', result.token) |
| | | commit('SET_AVATAR', userInfo.avatar) |
| | | commit('SET_NAME', { |
| | | username: userInfo.username, |
| | | realname: userInfo.realname |
| | | }) |
| | | commit('SET_ID', userInfo.id) |
| | | commit('SET_INFO', userInfo) |
| | | commit('SET_TENANTID', userInfo.loginTenantId) |
| | | resolve(response) |
| | | } else { |
| | | reject(response) |
| | | } |
| | | }).catch(error => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | // ç»åº |
| | | Logout({ |
| | | commit, |
| | | state |
| | | }) { |
| | | return new Promise((resolve) => { |
| | | let logoutToken = state.token; |
| | | commit('SET_TOKEN', '') |
| | | uni.removeStorageSync(ACCESS_TOKEN) |
| | | uni.removeStorageSync("isLogin") |
| | | uni.removeStorageSync("userId") |
| | | // æ¸
é¤äº§çº¿éæ©ç¶æ |
| | | commit('SET_CURRENT_LINE_ID', null) |
| | | api.logout(logoutToken).then(() => { |
| | | resolve() |
| | | }).catch(() => { |
| | | resolve() |
| | | }) |
| | | }) |
| | | }, |
| | | saveAuth({ |
| | | commit |
| | | }, auth) { |
| | | commit('SET_AUTH', auth) |
| | | }, |
| | | |
| | | // è·å产线å表ï¼å·²å
å«typeåæ®µï¼ |
| | | fetchLineList({ commit, state }) { |
| | | return new Promise((resolve, reject) => { |
| | | api.getLineList({ |
| | | headers: { |
| | | 'Authorization': `Bearer ${state.token}` |
| | | } |
| | | }).then(response => { |
| | | console.log('fetchLineListæ¥å£è¿ååå§æ°æ®:', response); |
| | | if (response.data.code === 200) { |
| | | const lineList = (response.data.result || []).map(line => ({ |
| | | id: line.value, |
| | | name: line.text, |
| | | type: line.type // ç¡®ä¿æ å°typeåæ®µ |
| | | })); |
| | | commit('SET_LINE_LIST', lineList); |
| | | resolve(lineList); |
| | | } else { |
| | | reject(new Error(`è·å产线å表失败: ${response.data.message || 'æªç¥é误'}`)); |
| | | } |
| | | }).catch(error => { |
| | | console.error('è·å产线å表åºé:', error); |
| | | reject(error); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 设置å½å产线ï¼ä¿æä¸åï¼ç±»åéè¿mutationèªå¨åæ¥ï¼ |
| | | setCurrentLine({ commit }, lineId) { |
| | | return new Promise((resolve) => { |
| | | commit('SET_CURRENT_LINE_ID', lineId) |
| | | resolve() |
| | | }) |
| | | } |
| | | }, |
| | | getters: { |
| | | getAuth: state => state.auth, |
| | | token: state => state.token, |
| | | username: state => state.username || uni.getStorageSync(USER_INFO)?.username || '', |
| | | nickname: state => state.realname || uni.getStorageSync(USER_INFO)?.realname || '', |
| | | avatar: state => state.avatar || uni.getStorageSync(USER_INFO)?.avatar || '', |
| | | userid: state => state.userid || uni.getStorageSync(USER_INFO)?.id || '', |
| | | // 产线ç¸å
³getters |
| | | lineList: state => state.lineList, |
| | | currentLineId: state => state.currentLineId, |
| | | currentLineName: state => state.currentLineName, |
| | | currentLineInfo: state => state.currentLineInfo, |
| | | currentLineType: state => state.currentLineType, // æ°å¢ï¼è·åå½å产线类åçgetter |
| | | hasSelectedLine: state => !!state.currentLineId |
| | | } |
| | | }) |