Commit 0a0b22af by huangqy

提交下

Signed-off-by: huangqy <huangqy@junmp.com.cn>
parents
# dependencies
**/node_modules
.idea
.DS_Store
# misc
npm-debug.log*
yarn-error.log
yarn.lock
package-lock.json
*bak
# visual studio code
.vscode
.history
*.log
functions/*
.temp/**
.eslintcache
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/index/index"
}
};
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
\ No newline at end of file
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../node_modules/mini-ali-ui/es/am-icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/search-bar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/loading/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/auto-size-img/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/title/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/container/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/topitem/topitem?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/top/top?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/button/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/page-result/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/badge/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/tab-content/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-secondary/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/applyBorrowCar/applyBorrowCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderList/orderList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/keyList/keyList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderDetail/orderDetail?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carUseLog/carUseLog?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysUser/sysUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysCar/sysCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/addCar/addCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysSetting/sysSetting?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
if(!self.__appxInited) {
self.__appxInited = 1;
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
if( navigator.userAgent && (navigator.userAgent.indexOf('LyraVM') > 0 || navigator.userAgent.indexOf('AlipayIDE') > 0) ) {
var AFAppX = self.AFAppX.getAppContext ? self.AFAppX.getAppContext().AFAppX : self.AFAppX;
} else {
importScripts('https://appx/af-appx.worker.min.js');
var AFAppX = self.AFAppX;
}
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
self.App = AFAppX.App;
self.my = AFAppX.bridge || AFAppX.abridge;
self.abridge = self.my;
self.Component = AFAppX.WorkerComponent || function(){};
self.$global = AFAppX.$global;
self.requirePlugin = AFAppX.requirePlugin;
if(AFAppX.registerApp) {
AFAppX.registerApp({
appJSON: appXAppJson,
});
}
if(AFAppX.compilerConfig){ AFAppX.compilerConfig.component2 = true; }
function success() {
require('../../app');
require('../../node_modules/mini-ali-ui/es/am-icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/search-bar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/loading/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/auto-size-img/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/title/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/container/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/topitem/topitem?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/top/top?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/button/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/page-result/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/badge/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/tab-content/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-secondary/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/applyBorrowCar/applyBorrowCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderList/orderList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/keyList/keyList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderDetail/orderDetail?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carUseLog/carUseLog?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysUser/sysUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysCar/sysCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/addCar/addCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysSetting/sysSetting?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/index/index"
}
};
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
importScripts(`https://appx/af-appx.worker.min.js`);
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../node_modules/mini-ali-ui/es/am-icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/search-bar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/loading/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/auto-size-img/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/title/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/container/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/topitem/topitem?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/top/top?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/button/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/page-result/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/badge/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/tab-content/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-secondary/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/applyBorrowCar/applyBorrowCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderList/orderList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/keyList/keyList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderDetail/orderDetail?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carUseLog/carUseLog?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysUser/sysUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysCar/sysCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/addCar/addCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysSetting/sysSetting?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=43)}({0:function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var originalBridgeCall=self.AlipayJSBridge&&self.AlipayJSBridge.call,originalFetch=self.fetch,originImportScripts=self.importScripts,originEval="function"==typeof self.__eval?self.__eval:self.eval;exports.getUserAgent=function(){return navigator.swuserAgent||navigator.userAgent||""},exports.debug=console.log.bind(console),exports.checkIOS=function(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(exports.getUserAgent())},exports.isLyra=function(){return Boolean(self.__LyraWSWorkerOrigin)},exports.callInternalAPI=function(e,t){var n={data:{method:e,param:t},action:"internalAPI"},o=encodeURIComponent(JSON.stringify(n));originalFetch?originalFetch("https://alipay.kylinBridge/?data="+o,{mode:"no-cors"}).then((function(){})).catch((function(){})):originalBridgeCall&&originalBridgeCall("internalAPI",{method:e,param:t})},exports.getStartupParams=function(){return self.__appxStartupParams&&self.__appxStartupParams.appId?self.__appxStartupParams:self.AFAppX&&self.AFAppX.bridge&&self.AFAppX.bridge.callSync&&self.AFAppX.bridge.callSync("getStartupParams")||{}},exports.getBridge=function(){return self.AFAppX.bridge};var appxImported=!1,appxImportListener=[];exports.runAfterAppx=function(e){if(self.AFAppX)return appxImported=!0,void e();self.importScripts=function(e){originImportScripts(e),!appxImported&&/af-appx\.worker\.min\.js$/.test(e)&&(appxImported=!0,appxImportListener.forEach((function(e){return e()})),appxImportListener=[])},appxImportListener.push(e)},exports.evaluateScript=function(expression){return"function"==typeof eval?eval(expression):"function"==typeof originEval?(self.eval=originEval,eval(expression)):void 0}},10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),r=n(0),s=n(2),a=n(5),i=function(){r.getBridge().call("showRemoteDebugPanel",{status:"connecting",text:"远程调试准备中",buttonTitle:"退出"})},c=function(){r.getBridge().call("showRemoteDebugPanel",{status:"connected",text:"远程调试已连接",buttonTitle:"退出"})},u=function(){r.getBridge().call("showRemoteDebugPanel",{status:"disconnected",text:"远程调试已断开",buttonTitle:"退出"})};t.SocketConn={messageQueue:[],socketTask:null,send:function(e){var t=this,n="string"==typeof e?e:JSON.stringify(e);n.length>5242880?r.debug("[bugme] socket send failed, size: ",n.length):this.socketTask?(this.messageQueue.length&&(this.messageQueue.forEach((function(e){t.socketTask.send({data:e})})),this.messageQueue=[]),this.socketTask.send({data:n})):this.messageQueue.push(n)},close:function(){this.socketTask?this.socketTask.close():r.getBridge().showToast({content:"请点击右上角关闭按钮退出",duration:1e3})},connect:function(e){var t=this,n=r.getBridge(),o=n.connectSocket({url:e,multiple:!0}),s=function(){t.socketTask||(t.socketTask=o,t.onopen(),r.debug("[bugme] websocket connected"))};o.onOpen((function(){s()})),o.onMessage((function(e){t.socketTask||s(),t.onmessage(e)})),o.onClose((function(){t.onclose()})),o.onError((function(){t.socketTask||(u(),n.showToast({content:"本次真机调试已结束,请重新生成调试版本",duration:2e3}))}))},open:function(){var e=this,t=r.getStartupParams(),n=t.channelId,o=t.channelAuthPair,s=t.remoteCh,c=self.__LyraWSWorkerOrigin;if(n||c){i();var u=a.wssConfig.default.openchannel;s&&a.wssConfig[s]&&a.wssConfig[s].openchannel&&(u=a.wssConfig[s].openchannel);var l=r.getBridge(),p=c?c+"/worker":"wss://"+u+"/group/connect/"+n+"?scene=tinyAppDebug&roleType=TINYAPP&roleId=0";if(o&&(p+="?"+o.key+"="+o.value),r.checkIOS()&&!r.isLyra()){this.connect(p);var f=l.connectSocket;l.connectSocket=function(e){if(e&&e.multiple)return f(e);l.showToast({content:"iOS 真机调试暂不支持 connectSocket JSAPI",duration:1e3})},l.onSocketOpen=l.offSocketOpen=l.onSocketMessage=l.offSocketMessage=l.closeSocket=function(){}}else setTimeout((function(){e.connect(p)}),1200)}else r.debug("[bugme] missing channelId in startup params")},onopen:function(){var e=r.getBridge(),t=e.getSystemInfoSync();this.send({method:s.RemoteXMethods.Connect,params:{userAgent:r.getUserAgent(),sdkVersion:e.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system}}),c()},onmessage:function(e){try{var t=JSON.parse(e.data.data),n=t.method,a=t.id,i=t.params;if(n===s.RemoteXMethods.Disconnect)this.close();else if(n===s.RemoteXMethods.EvaluteScript){if(i&&i.code)try{var c=r.evaluateScript(i.code);this.send({returnId:a,payload:o.stringify(c)})}catch(e){r.debug("[remoteX worker evaluateScript] ",e)}}else n===s.RemoteXMethods.Ping&&this.send({method:s.RemoteXMethods.Pong,params:{returnId:a}})}catch(t){r.debug("RemoteX onSocketMessage error",t,e)}},onclose:function(){this.socketTask=null,this.messageQueue=[],u(),[1,2].forEach((function(e){r.getBridge().call("closeSocket",{socketTaskId:e})}))}}},11:function(e,t){var n="\\x"+("0"+"~".charCodeAt(0).toString(16)).slice(-2),o="\\"+n,r=new RegExp(n,"g"),s=new RegExp(o,"g"),a=new RegExp("(?:^|([^\\\\]))"+o),i=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},c=String;function u(e,t,n){return t instanceof Array?function(e,t,n){for(var o=0,r=t.length;o<r;o++)t[o]=u(e,t[o],n);return t}(e,t,n):t instanceof c?t.length?n.hasOwnProperty(t)?n[t]:n[t]=function(e,t){for(var n=0,o=t.length;n<o;e=e[t[n++].replace(s,"~")]);return e}(e,t.split("~")):e:t instanceof Object?function(e,t,n){for(var o in t)t.hasOwnProperty(o)&&(t[o]=u(e,t[o],n));return t}(e,t,n):t}var l={stringify:function(e,t,s,a){return l.parser.stringify(e,function(e,t,s){var a,c,u=!1,l=!!t,p=[],f=[e],d=[e],g=[s?"~":"[Circular]"],m=e,h=1;return l&&(c="object"==typeof t?function(e,n){return""!==e&&t.indexOf(e)<0?void 0:n}:t),function(e,t){return l&&(t=c.call(this,e,t)),u?(m!==this&&(a=h-i.call(f,this)-1,h-=a,f.splice(h,f.length),p.splice(h-1,p.length),m=this),"object"==typeof t&&t?(i.call(f,t)<0&&f.push(m=t),h=f.length,(a=i.call(d,t))<0?(a=d.push(t)-1,s?(p.push((""+e).replace(r,n)),g[a]="~"+p.join("~")):g[a]=g[0]):t=g[a]):"string"==typeof t&&s&&(t=t.replace(n,o).replace("~",n))):u=!0,t}}(e,t,!a),s)},parse:function(e,t){return l.parser.parse(e,function(e){return function(t,r){var s="string"==typeof r;return s&&"~"===r.charAt(0)?new c(r.slice(1)):(""===t&&(r=u(r,r,{})),s&&(r=r.replace(a,"$1~").replace(o,n)),e?e.call(this,t,r):r)}}(t))},parser:JSON};e.exports=l},2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Connect="RemoteX.connect",e.Disconnect="RemoteX.disconnect",e.PageChanged="RemoteX.pageChanged",e.DataChanged="RemoteX.dataChanged",e.EvaluteScript="RemoteX.evaluteScript",e.syncStorage="RemoteX.syncStorage",e.requestWillBeSent="RemoteX.requestWillBeSent",e.requestFinished="RemoteX.requestFinished",e.Ping="RemoteX.ping",e.Pong="RemoteX.pong"}(t.RemoteXMethods||(t.RemoteXMethods={}))},43:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(44),r=n(47),s=n(0);s.runAfterAppx((function(){setTimeout((function(){s.debug("[bugme] run after appx"),s.getStartupParams().isRemoteX||s.isLyra()?(s.debug("[bugme] remotex mode"),o.registerRemoteX()):(s.debug("[bugme] preview mode"),r.registerPreview())}),1e3)}))},44:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=n(0),s=n(45);t.registerRemoteX=function(){if(self.navigator){r.debug("[bugme] start to register remotex"),s.listenEvents(),o.SocketConn.open(),self.bugmeAPI={send:function(e){o.SocketConn.send(e)}};if(self.document&&self.document.dispatchEvent)try{self.document.dispatchEvent("bugmeInjected")}catch(e){self.document.dispatchEvent(new CustomEvent("bugmeInjected"))}else self.dispatchEvent&&self.dispatchEvent(new CustomEvent("bugmeInjected"))}}},45:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(0),s=n(10),a=n(46);function i(e){if(!e||"object"!=typeof e)return{};var t={};return Object.keys(e).forEach((function(n){t[n]=""+e[n]})),t}var c=/^https?:\/\/hpmweb\.alipay\.com/,u=function(e){c.test(e.url)||s.SocketConn.send({method:o.RemoteXMethods.requestWillBeSent,params:{reqId:e.requestId,url:e.url,method:(e.method||"GET").toUpperCase(),body:e.postBody,headers:i(e.headers)}})},l=function(e){c.test(e.url)||s.SocketConn.send({method:o.RemoteXMethods.requestFinished,params:{reqId:e.requestId,url:e.url,status:e.status,body:e.body,headers:i(e.headers)}})},p=function(e){c.test(e.url)||s.SocketConn.send({method:o.RemoteXMethods.requestFinished,params:{reqId:e.requestId,url:e.url,status:null}})},f=function(e){var t={};Object.keys(e.data).forEach((function(n){try{t[n]=JSON.parse(e.data[n]).APDataStorage}catch(e){}})),s.SocketConn.send({method:o.RemoteXMethods.syncStorage,params:{data:t}})};t.listenEvents=function(){var e=r.getBridge();e.on(a.ERiverWorkerEvent.PageResume,(function(){s.SocketConn.send({method:o.RemoteXMethods.PageChanged})})),e.on(a.ERiverWorkerEvent.DebugPanelClick,(function(){s.SocketConn.close()})),r.checkIOS()&&!r.isLyra()?(e.on(a.ERiverDebugEvent.networkRequest,(function(e){var t=e.data;u(t)})),e.on(a.ERiverDebugEvent.networkResponse,(function(e){var t=e.data;l(t)})),e.on(a.ERiverDebugEvent.networkError,(function(e){var t=e.data;p(t)})),e.on(a.ERiverDebugEvent.storageChanged,(function(e){var t=e.data;f(t)}))):e.on(a.ERiverDebugEvent.debugConsole,(function(e){var t,n=e.data,o=n.type,r=n.content;try{t=JSON.parse(r)}catch(e){return}switch(o){case a.ERiverDebugEvent.networkRequest:u(t);break;case a.ERiverDebugEvent.networkResponse:l(t);break;case a.ERiverDebugEvent.networkError:p(t);break;case a.ERiverDebugEvent.storageChanged:f(t)}}))}},46:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.networkRequest="tinyAppRemoteDebug_network_request",e.networkResponse="tinyAppRemoteDebug_network_response",e.networkError="tinyAppRemoteDebug_network_error",e.storageChanged="tinyAppRemoteDebug_storage",e.debugConsole="onTinyDebugConsole",e.vconsoleMessage="onMessageFromVConsole"}(t.ERiverDebugEvent||(t.ERiverDebugEvent={})),function(e){e.PageResume="pageResume",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick"}(t.ERiverWorkerEvent||(t.ERiverWorkerEvent={}))},47:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),r=n(0),s=function(e,t){return void 0===t?"©undefined":null===t?"©null":t===-1/0?"©- Infinity":t===1/0?"©Infinity":"number"==typeof t&&isNaN(t)?"©NaN":"function"==typeof t?"©function":t},a=Function,i=function(e){try{if(e.fromVConsoleToWorker){var t=e.requestId;if("exec"===e.method){try{new a("requestId","sendBack","var res = "+e.script+";console.log(res);")(t,(function(e){return r.callInternalAPI("tinyDebugConsole",{type:"msgFromWorkerToVConsole",content:o.stringify({requestId:t,returnValue:e},s)})}))}catch(e){console.error(e.name+":"+e.message)}}}}catch(e){}};t.registerPreview=function(){setTimeout((function(){self.document?self.document.addEventListener("push",(function(e){try{var t=e.data.param;i(JSON.parse(t.content||t.data.content))}catch(e){}})):self.addEventListener&&self.addEventListener("push",(function(e){try{var t=JSON.parse(JSON.parse(e.data.text()).param.data.content);i(t)}catch(e){}}))}),10),["log","info","error","debug","warn"].forEach((function(e){var t="o"+e;console[t]||(console[t]=console[e],console[e]=function(){for(var n,a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];console[t].apply(console,a);try{n=o.stringify(a.map((function(e){return e instanceof Error?e.name+": "+e.message:e})),s)}catch(e){return void console.error(e.name+": "+e.message)}r.callInternalAPI("tinyDebugConsole",{content:n,type:"console_"+e})})}))}},5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wssConfig={default:{openchannel:"openchannel.alipay.com",hpmweb:"hpmweb.alipay.com"},1:{openchannel:"miniprogram.alipay.com",hpmweb:"hpmweb.alipay.com"}}}});
if(!self.__appxInited) {
self.__appxInited = 1;
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('./importScripts$');
var AFAppX = self.AFAppX;
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
self.App = AFAppX.App;
self.my = AFAppX.bridge || AFAppX.abridge;
self.abridge = self.my;
self.Component = AFAppX.WorkerComponent || function(){};
self.$global = AFAppX.$global;
self.requirePlugin = AFAppX.requirePlugin;
if(AFAppX.registerApp) {
AFAppX.registerApp({
appJSON: appXAppJson,
});
}
if(AFAppX.compilerConfig){ AFAppX.compilerConfig.component2 = true; }
function success() {
require('../../app');
require('../../node_modules/mini-ali-ui/es/am-icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/search-bar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/loading/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/auto-size-img/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/title/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/container/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/topitem/topitem?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../src/components/top/top?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/button/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/page-result/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/badge/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tabs/tab-content/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/list/list-secondary/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/filter/filter-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/applyBorrowCar/applyBorrowCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderList/orderList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/keyList/keyList?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/orderDetail/orderDetail?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carUseLog/carUseLog?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysUser/sysUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysCar/sysCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/addCar/addCar?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysSetting/sysSetting?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/carTj/carTj?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/changeCrop/changeCrop?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
.page-container {
background-color: #f5f5f5;
}
.page-submit {
position: fixed;
bottom: 10rpx;
width: 100%;
}
.submit-btn {
width: 90%;
margin: auto;
border-radius: 20rpx;
}
App({
// 全局变量,获取方法getApp().globalData
globalData: {
// 域名,用于发送请求
host: 'http://192.168.3.101:15556',
service: 'http://192.168.3.90:8044',
userInfo : {}
},
onLaunch(options) {
},
onShow(options) {
},
onHide() {
console.log('App Hide');
},
});
{
"pages": [
"pages/index/index",
"pages/dashboard/dashboard",
"pages/my/my",
"pages/myApply/myApply",
"pages/applyBorrowCar/applyBorrowCar",
"pages/orderList/orderList",
"pages/keyList/keyList",
"pages/orderDetail/orderDetail",
"pages/carUseLog/carUseLog",
"pages/sysUser/sysUser",
"pages/sysCar/sysCar",
"pages/addCar/addCar",
"pages/sysSetting/sysSetting",
"pages/carTj/carTj",
"pages/changeCrop/changeCrop",
"pages/myApply/myApply"
],
"window": {
"defaultTitle": "智能车辆钥匙管理小程序",
"titleBarColor": "#2074D4",
"allowsBounceVertical": "YES",
"pullRefresh": true
}
}
{
"component2": true
}
\ No newline at end of file
{
"dependencies": {
"antd-mini": "^0.0.8",
"dingtalk-design-libs": "^0.0.24",
"gdt-jsapi": "^1.9.39",
"mini-ali-ui": "^1.4.1"
}
}
<view>
<form onSubmit="handleSubmit" onReset="onReset">
<input-item data-field="carType" placeholder="请输入" value="{{carType}}" layer="vertical" name="carType" clear="{{true}}" onClear="onClear">汽车品牌</input-item>
<input-item data-field="carNumber" placeholder="请输入" value="{{carNumber}}" layer="vertical" name="carNumber" clear="{{true}}" onClear="onClear">汽车车牌</input-item>
<view class="page-submit">
<button type="primary" formType="submit" class="submit-btn">提交</button>
</view>
</form>
</view>
import http from '../../src/http';
import util from '../../src/libs/util';
Page({
data: {
id: ''
},
onLoad(query) {
if (query.id) {
this.setData({
id: query.id,
carNumber: query.carNumber,
carType: query.carType
})
}
},
onClear(e) {
this.setData({
[e.target.dataset.field]: ''
});
},
handleSubmit(e) {
let formData = {}
formData = e.detail.value
formData.id = this.data.id
formData.tenant_id = getApp().globalData.tenantId
formData.create_by = getApp().globalData.userInfo.realname
http.post(getApp().globalData.service + '/api/T_Equipment/AddOrUpdateEquipment', formData).then(res => {
if(res.Success) {
dd.redirectTo({
url: '../sysCar/sysCar'
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
});
{
"defaultTitle": "车辆操作",
"usingComponents": {
"input-item": "mini-ali-ui/es/input-item/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"multi-liner": "mini-ali-ui/es/multi-liner/index"
},
"allowsBounceVertical": "NO"
}
<view>
<form onSubmit="handleSubmit" onReset="onReset">
<input-item data-field="borrow_code" value="{{borrow_code}}" layer="vertical" name="borrow_code" disabled='true'>用车单号</input-item>
<input-item data-field="name" value="{{name}}" layer="vertical" name="name" disabled='true'>申请人</input-item>
<picker-item
data-field="carType"
placeholder="请选择"
value="{{carType}}"
layer="vertical"
name="carType"
onPickerTap="carTypePickerChange">车辆种类</picker-item>
<picker-item
data-field="isPolice"
placeholder="请选择"
value="{{isPolice}}"
layer="vertical"
name="isPolice"
onPickerTap="isPoliceCarPickerChange">车辆类型</picker-item>
<picker-item
data-field="reason"
placeholder="请选择"
value="{{reason}}"
layer="vertical"
name="reason"
onPickerTap="reasonPickerChange">任务类型</picker-item>
<picker-item data-field="start_time" placeholder="请选择" value="{{start_time}}" layer="vertical" name="start_time" onPickerTap="dateStartPicker">开始用车时间</picker-item>
<picker-item
data-field="end_time"
placeholder="请选择"
value="{{end_time}}"
layer="vertical"
name="end_time"
onPickerTap="dateEndPicker">用车结束时间</picker-item>
<input-item data-field="timeNumber" value="{{timeNumber}}" layer="vertical" name="timeNumber" disabled='true'>时长</input-item>
<input-item data-field="destination" placeholder="请输入" value="{{destination}}" layer="vertical" name="destination" clear="{{true}}" onClear="onClear">任务地点</input-item>
<view class="page-submit">
<button type="primary" formType="submit" class="submit-btn">提交</button>
</view>
</form>
</view>
import http from '../../src/http';
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
Page({
data: {
borrow_code : '',
name: '',
destination: '',
start_time : '',
end_time : '',
reason: '',
isPoliceCar: '',
policeCar: '',
carType: '',
timeNumber: '',
carTypeList: ['5座', '7座', '中型面包车'],
isPoliceCarList: ['警车', '非警车'],
reasons: ['区内执法执勤', '市内出差', '市外出差', '省外出差'],
url: {
getProcess: '/api/Sys_Process/GetProcess',
save: '/api/T_Borrow/SaveOrUpdate'
}
},
onLoad() {
this.getBorrowCode()
},
getBorrowCode(){
http.get('/jeecg/sys/fillRule/testFillRule', {ruleCode: 'shop_order_num'}).then(res => {
if (res.success) {
this.setData({
borrow_code : res.result,
name : getApp().globalData.userInfo.name,
});
} else {
util.ddToast({ type: 'fail', text: res.msg })
}
})
},
onClear(e) {
this.setData({
[e.target.dataset.field]: ''
});
},
dateStartPicker() {
const _this = this
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
success: (res) => {
this.setData({
start_time: res.date,
timeNumber: (_this.data.end_time && res.date) ? _this.getIntervalHour(res.date, _this.data.end_time) : 0
})
}
})
},
dateEndPicker() {
const _this = this
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
success: (res) => {
this.setData({
end_time: res.date,
timeNumber: (_this.data.start_time && res.date) ? _this.getIntervalHour(_this.data.start_time, res.date) : 0
})
}
})
},
getIntervalHour(dt1,dt2) {
if(typeof(dt1)=="string") {
dt1=new Date(dt1.replace(/-/,'/'));
dt2=new Date(dt2.replace(/-/,'/'));
}
var res = dt2-dt1;
if(isNaN(res))
throw Error("invalid dates arguments");
return Math.trunc(res/(1000*60*60));
},
carTypePickerChange() {
my.showActionSheet({
title: '选择车辆种类',
items: this.data.carTypeList,
cancelButtonText: '取消',
success: (res) => {
this.setData({
carType: this.data.carTypeList[res.index]
});
},
});
},
isPoliceCarPickerChange() {
my.showActionSheet({
title: '选择车辆类型',
items: this.data.isPoliceCarList,
cancelButtonText: '取消',
success: (res) => {
this.setData({
isPolice: this.data.isPoliceCarList[res.index],
isPoliceCar: res.index
});
},
});
},
reasonPickerChange() {
my.showActionSheet({
title: '选择工作内容',
items: this.data.reasons,
cancelButtonText: '取消',
success: (res) => {
this.setData({
reason: this.data.reasons[res.index]
});
},
});
},
onBzInput(e) {
this.setData({
bz: e.detail.value
});
},
handleSubmit(e) {
let formData = {}
formData = e.detail.value
formData.userid = getApp().globalData.userInfo.userId
formData.carType = this.data.carType
formData.isPoliceCar = this.data.isPoliceCar
formData.reason = this.data.reason
formData.start_time = this.data.start_time
formData.end_time = this.data.end_time
if (!formData.carType) {
return util.ddToast({ type: 'fail', text: '请选择车辆种类' })
}
if (!this.data.isPolice) {
return util.ddToast({ type: 'fail', text: '请选择车辆类型' })
}
if (!formData.reason) {
return util.ddToast({ type: 'fail', text: '请选择任务类型' })
}
if (!formData.destination) {
return util.ddToast({ type: 'fail', text: '请输入任务地点' })
}
if (!formData.start_time) {
return util.ddToast({ type: 'fail', text: '请选择开始时间' })
}
if (!formData.end_time) {
return util.ddToast({ type: 'fail', text: '请选择结束时间' })
}
if (formData.timeNumber < 0) {
return util.ddToast({ type: 'fail', text: '时长不能为负数' })
}
let code = ''
if (formData.timeNumber < 24 && (formData.reason == '区内执法执勤' || formData.reason == '市内出差')) {
code = 'bmldsh'
}
else if (formData.reason == '省外出差' || formData.timeNumber > 120) {
code = 'zwsh'
} else {
code = 'jbksh'
}
const _this = this
http.post(getApp().globalData.service + this.data.url.getProcess, {code: code, stepId: "",flowGateway: ""}).then(res => {
if(res.Success) {
formData = Object.assign(formData, res.result)
http.post(getApp().globalData.service + _this.data.url.save, formData).then(res => {
if (res.Success) {
dd.redirectTo({
url: '../orderList/orderList'
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
});
{
"defaultTitle": "用车申请",
"usingComponents": {
"input-item": "mini-ali-ui/es/input-item/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"multi-liner": "mini-ali-ui/es/multi-liner/index"
},
"allowsBounceVertical": "NO"
}
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
}
.row-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
margin-top: 12rpx;
}
.container {
background: #eeeeee;
padding: 24rpx 0rpx 0rpx 0rpx;
height: 100%;
}
.container-item {
margin-bottom: 10rpx;
}
.item {
background: #fff;
height: 170rpx;
padding-top: 5rpx;
display: flex;
align-items: center;
justify-content: center;
}
.select {
display: flex;
height: 100rpx;
align-items: center;
justify-content: space-around;
}
.select .box {
display: flex;
align-items: center;
}
.select .box .name {
color: #999;
/* font-size: 26rpx; */
}
.select .box .active {
color: #212121;
/* font-size: 26rpx; */
}
.select .box image {
color: #999;
font-size: 35rpx;
position: relative;
top: -5rpx;
}
.filter-line {
border-bottom: 1px solid #f6f6f6;
}
.am-picker-content {
padding: 180rpx;
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<popup show="{{showTop}}" position="top" zIndex="{{999}}" mask="{{true}}" onClose="onPopupClose">
<view>
<picker-item
data-field="start_time"
value="{{start_time}}"
name="start_time"
onPickerTap="dateStartPicker">开始时间</picker-item>
<picker-item
data-field="end_time"
value="{{end_time}}"
name="end_time"
onPickerTap="dateEndPicker">结束时间</picker-item>
<button size="default" type="primary" onTap="dateSearch">确定</button>
</view>
</popup>
<view class="select">
<view class="box" a:for="{{select}}" a:key="{{index}}" data-index="{{index}}" onTap="skipSelect">
<view class="name">{{item.title}}</view>
<image class="row-arrow" src="http://122.112.148.157:5000/updateImg/箭头下.png" mode="aspectFill"></image>
</view>
</view>
<view class="filter-line" />
<page-result
type="empty"
brief ="当前并无用车统计数据"
local="{{false}}" a:if='{{tjList.length === 0}}'/>
<view a:else>
<block a:for="{{tjList}}">
<list-item
index="{{index}}"
arrow="{{false}}"
last="{{index === (tjList.length - 1)}}">
{{item.realname}}
<list-secondary
title="{{item.sumCount}}次"
slot="extra" />
</list-item>
</block>
</view>
</scroll-view>
import http from '../../src/http'
import util from '../../src/libs/util';
Page({
data: {
pageNo: 1,
pageSize: 10,
carNumber: '',
carList: [],
showTop: false,
select: [
{
title: '选择时间',
open: false
}
]
},
onLoad() {
this.getTjList()
},
getTjList() {
let data = {
tenant_id: getApp().globalData.tenantId,
start_time: this.data.start_time,
end_time: this.data.end_time,
}
http.post(getApp().globalData.service + '/api/T_Tj/RenTj', data).then(res => {
if (res.Success) {
this.setData({
tjList:res.result
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
bindObjPickerChange(e) {
this.setData({
arrIndex: e.detail.value,
carNumber: this.data.carList[e.detail.value]
});
this.getTjList()
},
onPullDownRefresh() {
// 页面被下拉
this.getTjList();
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getTjList();
},
skipSelect(e) {
if (e.target.dataset.index === 0) {
this.setData({
showTop: true
})
}
},
onPopupClose() {
this.setData({
showTop: false,
});
},
handleCallBack(data) {
this.setData({
carNumber: data[0].value,
show: false
})
this.getTjList()
},
dateStartPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始出车时间',
success: (res) => {
this.setData({
start_time: res.date,
});
},
});
},
dateEndPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始结束时间',
success: (res) => {
this.setData({
end_time: res.date,
});
},
});
},
dateSearch() {
this.setData({
showTop: false
});
this.getTjList()
}
});
{
"defaultTitle": "用车统计",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"list-secondary": "mini-ali-ui/es/list/list-secondary/index",
"tag": "mini-ali-ui/es/tag/index",
"filter": "mini-ali-ui/es/filter/index",
"filter-item": "mini-ali-ui/es/filter/filter-item/index",
"popup": "mini-ali-ui/es/popup/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"flex": "mini-ali-ui/es/flex/index",
"flex-item": "mini-ali-ui/es/flex/flex-item/index"
}
}
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
}
.row-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
margin-top: 12rpx;
}
.container {
background: #eeeeee;
padding: 24rpx 0rpx 0rpx 0rpx;
height: 100%;
}
.container-item {
margin-bottom: 10rpx;
}
.item {
background: #fff;
height: 170rpx;
padding-top: 5rpx;
display: flex;
align-items: center;
justify-content: center;
}
.select {
display: flex;
height: 100rpx;
align-items: center;
justify-content: space-around;
}
.select .box {
display: flex;
align-items: center;
}
.select .box .name {
color: #999;
/* font-size: 26rpx; */
}
.select .box .active {
color: #212121;
/* font-size: 26rpx; */
}
.select .box image {
color: #999;
font-size: 35rpx;
position: relative;
top: -5rpx;
}
.filter-line {
border-bottom: 1px solid #f6f6f6;
}
.am-picker-content {
padding: 180rpx;
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<filter show="{{show}}" max="{{1}}" equalRows="{{3}}">
<block a:for="{{car}}">
<filter-item value="{{item.carNumber}}" id="{{item.id}}" onChange="handleCallBack" selected="{{item.selected}}" key="filter-item-{{key}}" />
</block>
</filter>
<popup show="{{showTop}}" position="top" zIndex="{{999}}" mask="{{true}}" onClose="onPopupClose">
<view>
<picker-item
data-field="start_time"
value="{{start_time}}"
name="start_time"
onPickerTap="dateStartPicker">开始时间</picker-item>
<picker-item
data-field="end_time"
value="{{end_time}}"
name="end_time"
onPickerTap="dateEndPicker">结束时间</picker-item>
<button size="default" type="primary" onTap="dateSearch">确定</button>
</view>
</popup>
<view class="select">
<view class="box" a:for="{{select}}" a:key="{{index}}" data-index="{{index}}" onTap="skipSelect">
<view class="name">{{item.title}}</view>
<image class="row-arrow" src="http://122.112.148.157:5000/updateImg/箭头下.png" mode="aspectFill"></image>
</view>
</view>
<view class="filter-line" />
<page-result
type="empty"
brief ="当前并无用车数据"
local="{{false}}" a:if='{{logList.length === 0}}'/>
<view a:else>
<block a:for="{{logList}}">
<list-item
index="{{index}}"
arrow="{{false}}"
upperSubtitle="{{item.upTime}}"
last="{{index === (logList.length - 1)}}">
{{item.realname}}
<tag a:if="{{item.type === 0 }}" type="warning" size="sm" slot="afterTitle">取车</tag>
<tag a:if="{{item.type === 1 }}" type="success" size="sm" slot="afterTitle">还车</tag>
<list-secondary
title="{{item.carNumber}}"
subtitle="{{item.carType}}"
slot="extra" />
</list-item>
</block>
</view>
</scroll-view>
import http from '../../src/http'
import util from '../../src/libs/util';
Page({
data: {
pageNo: 1,
pageSize: 10,
carNumber: '',
carList: [],
showTop: false,
select: [
{
title: '选择车辆',
open: false
},
{
title: '选择时间',
open: false
}
]
},
onLoad() {
this.getLogList()
this.getCarList()
},
getCarList() {
http.post(getApp().globalData.service + '/api/T_Equipment/EquipmentPageList', {pageSize: 20, tenant_id: getApp().globalData.tenantId}).then(res => {
if (res.Success) {
this.setData({
car: res.result.records,
carList: res.result.records.map(i => i.carNumber)
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
getLogList() {
let data = {
tenant_id: getApp().globalData.tenantId,
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
userid: getApp().globalData.userInfo.roleCodeList.find(i => i === 'ld') ? '' : getApp().globalData.userInfo.userId,
carNumber: this.data.carNumber,
start_time: this.data.start_time,
end_time: this.data.end_time,
}
http.post(getApp().globalData.service + '/api/T_Equipment/HistoryEquPageList', data).then(res => {
if (res.Success) {
this.setData({
logList:res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
bindObjPickerChange(e) {
this.setData({
arrIndex: e.detail.value,
carNumber: this.data.carList[e.detail.value]
});
this.getLogList()
},
onPullDownRefresh() {
// 页面被下拉
this.getLogList();
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getLogList();
},
skipSelect(e) {
if (e.target.dataset.index === 0) {
this.setData({
show: true
})
}
if (e.target.dataset.index === 1) {
this.setData({
showTop: true
})
}
},
onPopupClose() {
this.setData({
showTop: false,
});
},
handleCallBack(data) {
this.setData({
carNumber: data[0].value,
show: false
})
this.getLogList()
},
dateStartPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始出车时间',
success: (res) => {
this.setData({
start_time: res.date,
});
},
});
},
dateEndPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始结束时间',
success: (res) => {
this.setData({
end_time: res.date,
});
},
});
},
dateSearch() {
this.setData({
showTop: false
});
this.getLogList()
}
});
{
"defaultTitle": "用车记录",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"list-secondary": "mini-ali-ui/es/list/list-secondary/index",
"tag": "mini-ali-ui/es/tag/index",
"filter": "mini-ali-ui/es/filter/index",
"filter-item": "mini-ali-ui/es/filter/filter-item/index",
"popup": "mini-ali-ui/es/popup/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"flex": "mini-ali-ui/es/flex/index",
"flex-item": "mini-ali-ui/es/flex/flex-item/index"
}
}
.page-center {
position:absolute;
left: 18%;
top: 18%;
}
/* .my-picker {
background: #EFEFF4;
} */
.submit-btn {
margin-top: 50rpx;
}
\ No newline at end of file
<view>
<view class="page-center">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onSubmit="searchSubmit"
onClear="handleClear"
showCancelButton="{{false}}" />
<picker-view value="{{value}}" onChange="onChange" class="my-picker">
<picker-view-column>
<block a:for="{{departList}}">
<view key="{{index}}">{{item.departName}}</view>
</block>
</picker-view-column>
</picker-view>
<button type="primary" class="submit-btn" onTap="handleSubmit">加入部门</button>
</view>
</view>
import http from '../../src/http';
import login from '../../src/api/login';
import util, {fuzzyQuery} from '../../src/libs/util.js';
Page({
data: {
url: {
getDepart: '/jeecg/sys/sysDepart/listAll',
bindTenant: '/jeecg/zzdApi/bindSysDepart'
},
departList: [],
value: [0],
searchValue: '',
},
onLoad(query) {
// 页面加载
this.initDepart()
},
initDepart() {
const _this = this
http.get(this.data.url.getDepart).then(res => {
if (res.success) {
_this.setData({
departList: res.result
})
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
searchSubmit() {
let departName = fuzzyQuery(this.data.departList.map(i => i.departName), this.data.searchValue)[0]
let index = this.data.departList.findIndex(i => i.departName === departName)
this.setData({
value: [index]
})
},
handleInput(value) {
this.setData({
searchValue: value,
});
},
handleClear() {
this.setData({
searchValue: '',
});
},
onChange(e) {
this.setData({
value: e.detail.value
});
},
handleSubmit() {
const depart = this.data.departList[this.data.value[0]]
http.post(getApp().globalData.host + this.data.url.bindTenant, { username: getApp().globalData.userInfo.userId, departIds: depart.id}).then(res => {
if (res.success) {
login()
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
});
{
"usingComponents": {
"search-bar": "mini-ali-ui/es/search-bar/index"
},
"allowsBounceVertical": "NO"
}
\ No newline at end of file
.myList {
margin-top: 1px;
}
\ No newline at end of file
<view>
工作台
</view>
\ No newline at end of file
Page({
data: {
},
onLoad() {},
});
{
"usingComponents": {}
}
.page-center {
position:absolute;
left: 18%;
top: 18%;
}
/* .my-picker {
background: #EFEFF4;
} */
.submit-btn {
margin-top: 50rpx;
}
.row{
height: 60rpx;
line-height: 60rpx;
}
<view>
</view>
\ No newline at end of file
import login from '../../src/api/login';
import {
openAuthMiniApp,
disposeAuthData,
offAuthListener
} from "dingtalk-design-libs/biz/openAuthMiniApp";
import dd from 'gdt-jsapi';
Page({
data: {
url: {
getTenantList: '/api/Sys_Tenant/GetTenantList'
},
tenantList: [],
value: [0],
searchValue: '',
showLogo: true,
corpId: '',
},
onLoad() {
login()
},
openApp() {
return openAuthMiniApp({
path: "pages/home/home", // 不要改
panelHeight: "percent50",
extraData: {
clientId: "suitew8zkh41ltgnypjgl", // 应用ID(唯一标识)
rpcScope: "Contact.User.Read",
fieldScope: "Contact.User.mobile",
type: 0,
ext: JSON.stringify({}),
from: "",
},
});
},
onShow(e) {
disposeAuthData((options) => {
if (options.status == 'ok') {
dd.setStorage({
key: 'grantAuth',
data: 'success'
})
login()
}
});
},
onHide(){
offAuthListener();
},
onUnload() {
offAuthListener();
},
openCancelPage() {
return openAuthMiniApp({
path: "pages/cancel/index", // 不要改
panelHeight: "percent50",
extraData: {
clientId: "suitew8zkh41ltgnypjgl", // 应用ID(唯一标识)
rpcScope: "Contact.User.Read",
fieldScope: "Contact.User.mobile",
type: 0,
ext: JSON.stringify({}),
from: "",
},
success: (res) => {
console.log(JSON.stringify(res));
},
fail: (res) => {
console.log(JSON.stringify(res));
},
});
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
{
"usingComponents": {
"search-bar": "mini-ali-ui/es/search-bar/index"
},
"allowsBounceVertical": "NO"
}
\ No newline at end of file
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-content .am-list-content{
flex: unset;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
flex: 1;
text-align: right;
}
.row-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
\ No newline at end of file
<view>
<list>
<view slot="header">
柜门钥匙列表
</view>
<block a:for="{{carList}}">
<list-item thumb={{item.carNumber? "../../src/assets/hasKey.png" : "../../src/assets/noKey.png"}}
index="{{index}}"
arrow="{{false}}"
last="{{index === (carList.length - 1)}}"
class="row-content"
key="{{index}}">
{{item.device_name}}-{{item.name}}
<view
slot="extra" class="row-extra">
<view>
{{item.carNumber}}
</view>
<tag a:if ={{item.state ==="订单中"}} size="sm" type="primary">{{item.state}}</tag>
<tag a:if ={{item.state ==="正常"}} size="sm" type="success">{{item.state}}</tag>
<tag a:if ={{item.state ==="空箱"}} size="sm" type="success">{{item.state}}</tag>
</view>
</list-item>
</block>
</list>
</view>
import dd from 'gdt-jsapi';
import http from '../../src/http/index'
import util from '../../src/libs/util'
Page({
data: {
carList: []
},
onLoad(query) {
this.getCarList()
},
getCarList () {
const _this = this
http.post(getApp().globalData.service + "/api/T_Equipment/CarList", {tenant_id: getApp().globalData.tenantId}).then(res => {
if (res.Success) {
_this.setData({
carList: res.result
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
onPullDownRefresh() {
// 页面被下拉
this.getCarList();
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
});
{
"defaultTitle": "钥匙监控",
"usingComponents": {
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"tag": "mini-ali-ui/es/tag/index"
}
}
.grid {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.grid-item {
width: 20%;
text-align: center;
padding-top: 28%;
margin-left: 4%;
position: relative;
border-radius: 10rpx;
background-color: white;
}
.grid-item-wrapper {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.grid-icon {
width: 64rpx;
height: 64rpx;
}
.grid-text {
color: #696969;
font-size: 28rpx;
line-height: 1;
margin-top: 28rpx;
}
.mgt15 {
margin-top: 15rpx;
}
\ No newline at end of file
<view class="page-container">
<!--顶部-->
<top personalGeneralInfo="{{personalGeneralInfo}}" insInfo='{{insInfo}}'/>
<!-- 订单 -->
<view class="mgt15" a:if="{{showOrder}}">
<container title="我的订单" thumb="../../src/assets/order.png" icon="arrow" onActionTap="showOrder">
<view class="grid" key="grid">
<view a:for="{{list}}" key="{{item.entitle}}" class="grid-item" onTap="onItemTap" data-index="{{index}}">
<view class="grid-item-wrapper">
<image src="{{item.icon}}" class="grid-icon" mode="aspectFit" />
<text class="grid-text">{{item.title}}</text>
</view>
</view>
</view>
</container>
</view>
<!--列表-->
<view class="mgt15">
<list>
<block a:for="{{menuList}}">
<list-item key="{{index}}" thumb="{{item.thumb}}" arrow="right" onClick="handleMenuTap" data-info="{{item.page}}">{{ item.title }}</list-item>
</block>
</list>
</view>
</view>
\ No newline at end of file
import { JY_MENU_QUERY, SHY_MENU_QUERY, SYS_MENU_QUERY, BMD_MENU_QUERY } from '../../src/common/constant';
import dd from 'gdt-jsapi';
Page({
data: {
radius: true,
personalGeneralInfo: {},
showOrder: true,
list: [
{
entitle: '待我审批',
icon: '../../src/assets/wait.png',
page: '../orderList/orderList?arrIndex=0',
title: '待我审批'
},
{
entitle: '我的申请',
icon: '../../src/assets/wait.png',
page: '../orderList/orderList?arrIndex=0',
title: '我的申请'
},
{
entitle: '审批通过',
icon: '../../src/assets/disagree.png',
page: '../orderList/orderList?arrIndex=1',
title: '审批通过'
},
{
entitle: '订单完成',
icon: '../../src/assets/finish.png',
page: '../orderList/orderList?arrIndex=3',
title: '订单完成'
},
],
menuList: []
},
handleMenuTap(e) {
dd.navigateTo({
url: e.target.dataset.info
})
},
showOrder() {
dd.navigateTo({
url: '../orderList/orderList'
})
},
onItemTap(event) {
let index = event.target.dataset.index
dd.navigateTo({
url: this.data.list[index].page
})
},
onLoad() {
let myMenu = []
if (getApp().globalData.userInfo.roleCodeList.find(i => i ==='gly')) {
myMenu = myMenu.concat(SYS_MENU_QUERY)
}
if (getApp().globalData.userInfo.roleCodeList.find(i => i ==='jy')) {
myMenu = myMenu.concat(JY_MENU_QUERY)
}
if (getApp().globalData.userInfo.roleCodeList.find(i => i ==='ld')) {
myMenu = myMenu.concat(SHY_MENU_QUERY)
}
if (getApp().globalData.userInfo.roleCodeList.find(i => i ==='bmd')) {
myMenu = myMenu.concat(BMD_MENU_QUERY)
this.setData({
showOrder: false
})
}
let obj = {}
let result = myMenu.reduce((item, next) => {
obj[next.thumb] ? '' : obj[next.thumb] = true && item.push(next)
return item
}, [])
this.setData({
personalGeneralInfo: {
userName: getApp().globalData.userInfo.name,
company: getApp().globalData.userInfo.sysDepart.departName,
avatar: getApp().globalData.userInfo.avatar
},
menuList: result
});
},
});
{
"defaultTitle": "我的",
"component": false,
"usingComponents": {
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"container": "mini-ali-ui/es/container/index",
"title": "mini-ali-ui/es/title/index",
"top": "../../src/components/top/top"
},
"allowsBounceVertical": "NO"
}
\ No newline at end of file
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
}
.row-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
.container {
background: #F5F5F5;
padding: 24rpx;
height: 100%;
}
.container-item {
margin-bottom: 10rpx;
}
.item {
background: #eeeeee;
text-align: left;
height: 220rpx;
padding-top: 5rpx;
}
.item-concent{
padding: 10rpx 10rpx;
font-size: 30rpx;
}
.txte-warn{
margin-left: 12rpx;
color: #FF8C00;
font-size: 30rpx;
}
.txte-success{
margin-left: 12rpx;
color: #67c23a;
font-size: 28rpx;
}
.txte-danger{
margin-left: 12rpx;
color: #f56c6c;
font-size: 28rpx;
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<view>
<picker onChange="bindObjPickerChange" value="{{arrIndex}}" range="{{stateObjectArray}}" range-key="name">
<view class="row">
<view class="row-title">选择订单状态</view>
<view class="row-extra">当前选择:{{stateObjectArray[arrIndex].name}}</view>
<image class="row-arrow" src="https://img.alicdn.com/tfs/TB1oVprf4vbeK8jSZPfXXariXXa-48-48.png" mode="aspectFill" />
</view>
</picker>
</view>
<page-result
type="empty"
brief ="当前并无订单数据"
local="{{false}}" a:if='{{orderList.length === 0}}'/>
<view a:for="{{orderList}}" a:else>
<view className="container">
<container className="container-item" title = '{{item.realname}}发起的用车申请'
icon="arrow"
thumb="{{ item.returnTime ? (item.returnTime > item.end_time) ? '../../src/assets/overtime.png' : '../../src/assets/car.png' : '../../src/assets/car.png' }}"
onActionTap = "showPage" data-id="{{item.id}}">
<view class="item" onTap="showPage" data-id="{{item.id}}">
<view class="item-concent">订单编号: {{item.borrow_code}}</view>
<view class="item-concent">用车时间: {{item.start_time}}</view>
<view class="item-concent">车辆: {{ item.detailsList ? item.detailsList[0].carNumber : ''}}</view>
<view class="item-concent">订单状态:
<text class="txte-warn">{{ item.stateValue }}</text>
</view>
</view>
</container>
</view>
</view>
</scroll-view>
import http from '../../src/http'
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
Page({
data: {
stateObjectArray: [
{
id: 1,
name: '待审批'
},
{
id: 2,
name: '待派车'
},
{
id: 3,
name: '待取车'
},
{
id: 4,
name: '待归还'
},
{
id: 5,
name: '已完成'
},
{
id: 6,
name: '驳回'
},
{
id: 7,
name: '全部'
},
],
arrIndex: 6,
pageNo: 1,
pageSize: 10
},
onLoad(query) {
if (query.arrIndex) {
this.setData({
arrIndex: query.arrIndex
});
}
this.getOrderList()
},
getOrderList() {
let state = this.data.stateObjectArray[this.data.arrIndex].id
let data = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
type: 0,
state: state === 7 ? '' : state,
userid: getApp().globalData.userInfo.userId
}
http.post(getApp().globalData.service + '/api/T_Borrow/GetPageList', data).then(res => {
if (res.Success) {
this.setData({
orderList: res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
bindObjPickerChange(e) {
this.setData({
arrIndex: e.detail.value,
pageSize: 10
});
this.getOrderList()
},
onPullDownRefresh() {
this.setData({
pageSize: 10
})
this.getOrderList()
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
showPage(event) {
let _id = event.target.dataset.id
dd.navigateTo({
url: '../orderDetail/orderDetail?id=' + _id
})
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getOrderList();
},
});
{
"defaultTitle": "我的申请",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"tabs": "mini-ali-ui/es/tabs/index",
"tab-content": "mini-ali-ui/es/tabs/tab-content/index",
"button": "mini-ali-ui/es/button/index",
"container": "mini-ali-ui/es/container/index",
"title": "mini-ali-ui/es/title/index",
"flex": "mini-ali-ui/es/flex/index",
"flex-item": "mini-ali-ui/es/flex/flex-item/index"
}
}
.am-title {
padding:var(--am-title-paddingLR,12px) var(--am-title-paddingB,12px)
}
.demo-steps-class {
margin-bottom: 20rpx;
}
.am-tabs-content-wrap {
background-color:#f1f1f1
}
.form-row {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
margin-top: 15rpx;
background-color:#fff
}
.form-row-label {
width: 45%;
font-size: 26rpx;
margin: 10rpx;
text-align: left;
color: #000;
}
.form-row-label-single {
width: 45%;
padding: 20rpx 10rpx;
font-size: 31rpx;
text-align: left;
color: #000;
}
.form-row-label-all {
width: wrap;
padding: 20rpx 10rpx;
font-size: 26rpx;
text-align: left;
color: #000;
}
.form-line {
height: 1px;
background-color: #ddd;
margin-left: 30rpx;
}
.row-arrow {
width: 25rpx;
height: 25rpx;
margin-left: 10rpx;
margin-top: 10rpx;
}
.txte-tip {
font-size: 31rpx;
color: #ff834c;
}
.submit-approve-btn {
width: 80%;
border-radius: 20rpx;
margin-left: 40rpx;
}
\ No newline at end of file
<view>
<title style="margin-top: 20rpx">基本信息</title>
<view class="form-row">
<view class="form-row-label-single">用车单号:</view>
<view class="form-row-label-single">{{orderInfo.borrow_code}}</view>
<view class="form-row-label-single">申请人:</view>
<view class="form-row-label-single">{{orderInfo.realname}}</view>
<view class="form-row-label-single">目的地:</view>
<view class="form-row-label-single">{{orderInfo.destination}}</view>
<view class="form-row-label-single">派车状态:</view>
<text class="form-row-label-single txte-tip" a:if="{{orderInfo.state === 0}}">待审批</text>
<text class="form-row-label-single txte-tip" a:if="{{orderInfo.state === 1}}">待取车</text>
<text class="form-row-label-single txte-tip" a:if="{{orderInfo.state === 2}}">待还车</text>
<text class="form-row-label-single txte-tip" a:if="{{orderInfo.state === 3}}">已完成</text>
<text class="form-row-label-single txte-tip" a:if="{{orderInfo.state === 4}}">驳回</text>
<view class="form-row-label-single">开始用车时间:</view>
<view class="form-row-label-single">{{orderInfo.start_time}}</view>
<view class="form-row-label-single">预计返回时间:</view>
<view class="form-row-label-single">{{orderInfo.end_time}}</view>
<view class="form-row-label-single">工作内容:</view>
<view class="form-row-label-single">{{orderInfo.reason}}</view>
<view class="form-row-label-single">备注:</view>
<view class="form-row-label-single">{{orderInfo.bz}}</view>
<block a:if="{{orderInfo.state !== 0}}">
<view class="form-row-label-single">车辆:</view>
<view class="form-row-label-single">{{orderInfo.carNumber}}</view>
</block>
</view>
<picker onChange="carPickerChange" value="{{index}}" range="{{carNumberList}}" a:if="{{orderInfo.state == 0}}">
<view class="form-row">
<view class="form-row-label-single">车辆:</view>
<view class="form-row-label-single">{{carNumberList[index] ? carNumberList[index] : '请选择车辆'}}
<image class="row-arrow" src="http://122.112.148.157:5000/updateImg/箭头下.png" mode="aspectFill"></image>
</view>
</view>
</picker>
<view a:if={{orderInfo.state !== 0}}>
<title style="margin-top: 20rpx">审批信息</title>
<view class="form-row">
<view class="form-row-label-single">审批人:</view>
<view class="form-row-label-single">{{orderInfo.sh_username}}</view>
<view class="form-row-label-single">审批意见:</view>
<view class="form-row-label-single">{{orderInfo.sh_idea}}</view>
<view class="form-row-label-single">审批时间:</view>
<view class="form-row-label-single">{{orderInfo.sh_time}}</view>
</view>
</view>
<view a:if={{orderInfo.state === 3 || orderInfo.state === 2}}>
<title style="margin-top: 20rpx">用车信息</title>
<view class="form-row">
<view class="form-row-label-single">取车时间:</view>
<view class="form-row-label-single">{{orderInfo.pickTime}}</view>
<view class="form-row-label-single">还车时间:</view>
<view class="form-row-label-single">{{orderInfo.returnTime}}</view>
</view>
</view>
<view a:if={{showSubmit}}>
<title style="margin-top: 20rpx">审核意见</title>
<multi-liner placeholder="请输入审核意见" value="{{shIdea}}" onInput="onInput" last="{{true}}" auto-height="{{true}}" controlled="{{true}}"/>
<view class="page-submit">
<flex>
<flex-item><button type="ghost" size="mini" class="submit-approve-btn" onTap="agree" data-result="no">拒绝</button></flex-item>
<flex-item><button type="primary" size="mini" class="submit-approve-btn" onTap="agree" data-result="yes">同意</button></flex-item>
</flex>
</view>
</view>
</view>
\ No newline at end of file
import http from '../../src/http'
import util from '../../src/libs/util';
Page({
data: {
orderInfo: {},
shIdea: '',
id: '',
carNumberList: [],
carList: [],
equipment_id: '',
showSubmit: false
},
onLoad(query) {
if (query.id) {
this.setData({
id: query.id
})
this.getCarList(query.id)
}
},
getById(id) {
const _this = this
http.post(getApp().globalData.service + '/api/T_Borrow/GetId', {id:id}).then(res => {
if (res.Success) {
let index = _this.data.carNumberList.findIndex(i => i === res.result.carNumber)
this.setData({
orderInfo: res.result,
index: index,
equipment_id: _this.data.carList[index] ? _this.data.carList[index].carId : '',
showSubmit: res.result.state === 0 && getApp().globalData.userInfo.roleCodeList.find(i => i === 'ld') ? true : false
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
onInput (e) {
this.setData({
shIdea: e.detail.value,
});
},
agree (event) {
const result = event.target.dataset.result
let formData = {
id: this.data.id,
sh_idea: this.data.shIdea ? this.data.shIdea : result === 'yes' ? '同意' : '驳回',
sh_userid: getApp().globalData.userInfo.userId,
type: result === 'yes' ? 0 : 1,
equipment_id: this.data.equipment_id
}
http.post(getApp().globalData.service + '/api/T_Borrow/Approve', formData).then(res => {
if (res.Success) {
dd.navigateTo({
url: '../orderList/orderList'
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
getCarList(id) {
const _this = this
// http.post(getApp().globalData.service + "/api/T_Equipment/CarList", {tenant_id: getApp().globalData.tenantId}).then(res => {
// if (res.Success) {
// _this.setData({
// carNumberList: res.result.filter(i => i.state === '正常').map(j => {return j.carNumber}),
// carList: res.result.filter(i => i.state === '正常')
// })
this.getById(id)
// } else {
// util.ddToast({ type: 'fail', text: res.Message })
// }
//})
},
carPickerChange(e) {
this.setData({
index: e.detail.value,
equipment_id: this.data.carList[e.detail.value].carId
});
},
});
{
"usingComponents": {
"button": "mini-ali-ui/es/button/index",
"title": "mini-ali-ui/es/title/index",
"card": "mini-ali-ui/es/card/index",
"list": "mini-ali-ui/es/list/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"flex": "mini-ali-ui/es/flex/index",
"flex-item": "mini-ali-ui/es/flex/flex-item/index",
"multi-liner": "mini-ali-ui/es/multi-liner/index"
},
"allowsBounceVertical": "NO"
}
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
}
.row-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
.container {
background: #F5F5F5;
padding: 24rpx;
height: 100%;
}
.container-item {
margin-bottom: 10rpx;
}
.item {
background: #eeeeee;
text-align: left;
height: 220rpx;
padding-top: 5rpx;
}
.item-concent{
padding: 10rpx 10rpx;
font-size: 30rpx;
}
.txte-warn{
margin-left: 12rpx;
color: #FF8C00;
font-size: 30rpx;
}
.txte-success{
margin-left: 12rpx;
color: #67c23a;
font-size: 28rpx;
}
.txte-danger{
margin-left: 12rpx;
color: #f56c6c;
font-size: 28rpx;
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<view>
<picker onChange="bindObjPickerChange" value="{{arrIndex}}" range="{{stateObjectArray}}" range-key="name">
<view class="row">
<view class="row-title">选择订单状态</view>
<view class="row-extra">当前选择:{{stateObjectArray[arrIndex].name}}</view>
<image class="row-arrow" src="https://img.alicdn.com/tfs/TB1oVprf4vbeK8jSZPfXXariXXa-48-48.png" mode="aspectFill" />
</view>
</picker>
</view>
<page-result
type="empty"
brief ="当前并无订单数据"
local="{{false}}" a:if='{{orderList.length === 0}}'/>
<view a:for="{{orderList}}" a:else>
<view className="container">
<container className="container-item" title = '{{item.realname}}发起的用车审批'
icon="arrow"
thumb="{{ item.returnTime ? (item.returnTime > item.end_time) ? '../../src/assets/overtime.png' : '../../src/assets/car.png' : '../../src/assets/car.png' }}"
onActionTap = "showPage" data-id="{{item.id}}">
<view class="item" onTap="showPage" data-id="{{item.id}}">
<view class="item-concent">订单编号: {{item.borrow_code}}</view>
<view class="item-concent">用车时间: {{item.start_time}}</view>
<view class="item-concent">车辆: {{item.carNumber}}</view>
<view class="item-concent">订单状态:
<text class="txte-warn" a:if="{{item.state === 0}}">待审批</text>
<text class="txte-warn" a:if="{{item.state === 1}}">待取车</text>
<text class="txte-warn" a:if="{{item.state === 2}}">待归还</text>
<text class="txte-success" a:if="{{item.state === 3}}">已完成</text>
<text class="txte-danger" a:if="{{item.state === 4}}">驳回</text>
</view>
</view>
</container>
</view>
</view>
</scroll-view>
import http from '../../src/http'
import util from '../../src/libs/util';
import login from '../../src/api/login';
Page({
data: {
stateObjectArray: [
{
id: 1,
name: '待审批'
},
{
id: 2,
name: '待派车'
},
{
id: 3,
name: '待取车'
},
{
id: 4,
name: '待归还'
},
{
id: 5,
name: '已完成'
},
{
id: 6,
name: '驳回'
},
{
id: 7,
name: '全部'
},
],
arrIndex: 5,
pageNo: 1,
pageSize: 10
},
onLoad(query) {
if (query.arrIndex) {
this.setData({
arrIndex: query.arrIndex
});
}
this.getOrderList()
},
getOrderList() {
let state = this.data.stateObjectArray[this.data.arrIndex].id
let data = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
type: 0,
userid: getApp().globalData.userInfo.userId
}
http.post(getApp().globalData.service + '/api/T_Borrow/GetPageList', data).then(res => {
if (res.Success) {
this.setData({
orderList:res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
bindObjPickerChange(e) {
this.setData({
arrIndex: e.detail.value,
pageSize: 10
});
this.getOrderList()
},
onPullDownRefresh() {
this.setData({
pageSize: 10
})
this.getOrderList()
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
showPage(event) {
let _id = event.target.dataset.id
dd.navigateTo({
url: '../orderDetail/orderDetail?id=' + _id
})
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getOrderList();
},
});
{
"defaultTitle": "我的订单",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"tabs": "mini-ali-ui/es/tabs/index",
"tab-content": "mini-ali-ui/es/tabs/tab-content/index",
"button": "mini-ali-ui/es/button/index",
"container": "mini-ali-ui/es/container/index",
"title": "mini-ali-ui/es/title/index",
"flex": "mini-ali-ui/es/flex/index",
"flex-item": "mini-ali-ui/es/flex/flex-item/index"
}
}
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 90vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onSubmit="searchSubmit"
onClear="handleClear"
showCancelButton="{{false}}" />
<page-result
type="empty"
brief ="当前并无车辆数据"
local="{{false}}" a:if='{{carList.length === 0}}'/>
<view a:for="{{carList}}" a:else>
<list-item>
<view slot="extra">
<button size="mini" type="primary" onTap="editCar" data-info="{{item}}">编辑</button>
</view>
<avatar name="{{item.carNumber}}" desc="{{item.carType}}" src="http://122.112.148.157:5000/updateImg/汽车.png" />
</list-item>
</view>
<view class="page-submit">
<button type="primary" formType="submit" class="submit-btn" onTap="addCar">新增</button>
</view>
</scroll-view>
\ No newline at end of file
import http from '../../src/http/index'
import util from '../../src/libs/util'
Page({
data: {
pageNo: 1,
pageSize: 10,
searchValue: ''
},
onLoad() {
this.setData({
userId: getApp().globalData.userInfo.userId
})
this.getCarList()
},
handleInput(value) {
this.setData({
searchValue: value,
});
},
handleClear() {
this.setData({
searchValue: '',
});
this.getCarList()
},
searchSubmit() {
this.getCarList()
},
getCarList() {
let data = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
tenant_id: getApp().globalData.tenantId,
carNumber: this.data.searchValue
}
http.post(getApp().globalData.service + '/api/T_Equipment/EquipmentPageList', data).then(res => {
if (res.Success) {
this.setData({
carList: res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
onPullDownRefresh() {
this.setData({
pageSize: 10
})
this.getCarList()
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getCarList();
},
addCar() {
dd.redirectTo({
url: '../addCar/addCar'
})
},
editCar(e) {
let car = e.target.targetDataset.info
dd.redirectTo({
url: '../addCar/addCar?id=' +car.id + '&carNumber=' + car.carNumber + '&carType=' + car.carType
})
}
});
{
"defaultTitle": "车辆管理",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"search-bar": "mini-ali-ui/es/search-bar/index",
"avatar": "antd-mini/es/Avatar/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"modal": "mini-ali-ui/es/modal/index"
}
}
.rectangle {
//position: fixed;
//top: 100px;
padding: 0 14px;
margin-top: 20px;
}
.dialog {
position: fixed;
bottom: 18px;
}
.content {
color: #fff;
}
.opt-button {
width: 51px;
height: 27px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 12px;
border: #68BAF7 solid 1rpx;
}
.add-home {
width: 72px;
height: 27px;
display: flex;
justify-content: center;
align-items: center;
background-color: #56ADEB;
color: #fff;
font-size: 14px;
}
.am-tips-dialog .am-button {
border: none;
}
.row {
display: flex;
align-items: center;
padding: 0 30rpx;
background-color: white;
}
.row-title {
flex: 1;
padding-top: 28rpx;
padding-bottom: 28rpx;
font-size: 34rpx;
color: #000;
}
.row-extra {
flex-basis: initial;
font-size: 32rpx;
color: #888;
margin-right: 12px;
}
\ No newline at end of file
<view>
<tips-dialog iconUrl="{{useIcon ? 'https://gw.alipayobjects.com/zos/rmsportal/AzRAgQXlnNbEwQRvEwiu.png' : ''}}"
iconSize="36"
type="rectangle"
className="rectangle"
onCloseTap="onCloseTap"
show="{{showRectangle}}"
arrowPosition="{{arrowPositions[arrowPosIndex]}}">
<view class="content"
slot="content">
选错单位,是否重新选择?
</view>
<am-button a:if="{{useButton}}"
slot="operation"
shape="capsule"
capsuleSize="small"
onTap="onRectangleTap">立即选择</am-button>
<!-- <view slot="operation" class="add-home" onTap="onRectangleTap">立即添加</view> -->
</tips-dialog>
</view>
\ No newline at end of file
import util from '../../src/libs/util.js';
Page({
data: {
showRectangle: false,
showDialog: true,
arrowPositions: [
'bottom-left',
'bottom-center',
'bottom-right',
'top-left',
'top-center',
'top-right',
'left',
'right',
],
arrowPosIndex: 3,
useButton: true,
},
onLoad() {
if (getApp().globalData.userInfo.roleCodeList.find(i => i === 'jy')) {
this.setData({
showRectangle: true
})
}
},
onCloseTap() {
this.setData({
showRectangle: false,
});
},
onRectangleTap() {
util.db.remove('appInfo').then(res => {
dd.navigateTo({
url: '../index/index'
})
})
},
});
{
"defaultTitle": "设置",
"usingComponents": {
"tips-dialog": "mini-ali-ui/es/tips/tips-dialog/index",
"am-button": "mini-ali-ui/es/button/index",
"am-icon": "mini-ali-ui/es/am-icon/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"input-item": "mini-ali-ui/es/input-item/index"
}
}
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onSubmit="searchSubmit"
onClear="handleClear"
showCancelButton="{{false}}" />
<page-result
type="empty"
brief ="当前并无用户数据"
local="{{false}}" a:if='{{userList.length === 0}}'/>
<view a:for="{{userList}}" a:else>
<list-item onClick="onItemClick" data-id="{{item.id}}">
<avatar name="{{item.realname + ' (' + (item.roleCodeTxt[0] == 'jy' ? '普通用户' : item.roleCodeTxt[0] == 'ld' ? '领导' : item.roleCodeTxt[0] === 'gly' ? '系统管理员' : '白名单') + ')'}}" desc="{{item.phone}}" src="{{item.avatar}}" />
</list-item>
</view>
<modal
show="{{modalOpened}}"
showClose="{{false}}"
onButtonClick="onButtonClick"
buttons="{{buttons}}"
>
<view slot="header">温馨提示</view>
系统管理员无法变更, 是否交接?
</modal>
<modal
show="{{qrCodeModal}}"
onModalClick="onModalClick"
onModalClose="onModalClose"
>
<view style="margin: 20px 0 10px 0;">用钉钉扫一扫,交接为系统管理员</view>
<image mode="widthFix" style="width: 100%;" src="{{qrCode}}"/>
<view slot="footer" onTap="onChangeRole">我知道了</view>
</modal>
</scroll-view>
\ No newline at end of file
import http from '../../src/http/index'
import util from '../../src/libs/util'
Page({
data: {
pageNo: 1,
pageSize: 10,
searchValue: '',
roleList: [
{roleId: 'e51758fa916c881624b046d26bd09230', name: '领导'},
{roleId: '1429329085694271710', name: '白名单'},
{roleId: '1429329085699571714', name: '普通用户'},
],
modalOpened: false,
buttons: [
{ text: '取消' },
{ text: '确定', extClass: 'buttonBold' },
],
},
onLoad() {
this.setData({
userId: getApp().globalData.userInfo.userId
})
this.getUserList()
},
handleInput(value) {
this.setData({
searchValue: value,
});
},
handleClear() {
this.setData({
searchValue: '',
});
this.getUserList()
},
searchSubmit() {
this.getUserList()
},
onModalClick() {
this.setData({
qrCodeModal: false,
});
},
onModalClose() {
this.setData({
qrCodeModal: false,
});
},
onChangeRole() {
dd.redirectTo({ url: '/pages/index/index' })
},
getUserList() {
let params = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
tenantId: getApp().globalData.tenantId,
realname: "*" + this.data.searchValue + "*"
}
http.get('/jeecg/sys/user/list', params).then(res => {
if (res.success) {
this.setData({
userList: res.result.records
})
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
onPullDownRefresh() {
this.setData({
pageSize: 10
})
this.getUserList()
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getUserList();
},
onItemClick(e) {
if (e.target.dataset.id === getApp().globalData.userInfo.userId) {
this.setData({
modalOpened: true,
});
} else {
my.showActionSheet({
title: '选择角色',
items: this.data.roleList.map(i => i.name),
cancelButtonText: '取消',
success: (res) => {
http.get('/jeecg/dingTalk/scan',{type: 3, userId: e.target.dataset.id, roleId: this.data.roleList[res.index].roleId, time: new Date().getTime()}).then(res => {
if (res.success) {
this.getUserList();
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
})
}
},
onButtonClick(e) {
const { target: { dataset } } = e;
this.setData({
modalOpened: false,
});
if (dataset.index === 1) {
http.get('/jeecg/dingTalk/qrCode', {tenantId: getApp().globalData.tenantId, time: new Date().getTime()}).then(res => {
this.setData({
qrCodeModal: true,
qrCode: "data:image/jpg;base64," + res.result,
})
})
}
}
});
{
"defaultTitle": "用户管理",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"search-bar": "mini-ali-ui/es/search-bar/index",
"avatar": "antd-mini/es/Avatar/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"modal": "mini-ali-ui/es/modal/index"
}
}
import http from '../http';
import util from '../libs/util';
import dd from 'gdt-jsapi';
function login() {
getApp().globalData.userInfo = {userId: '15957116480', name: '黄麒宇', roleCodeList: ['jy'],sysDepart: {id: '813f982a4b71457a92003463120a2725', departName: '办公室'}}
if (!getApp().globalData.userInfo.sysDepart) {
dd.redirectTo({ url: '/pages/changeCrop/changeCrop' })
} else {
dd.redirectTo({ url: '/pages/my/my' })
}
// 获取免登授权码
// dd.getAuthCode({}).then(res => {
// if (res.code) {
// http.get('/jeecg/zzdApi/getUserInfo', {authCode: res.code}).then(res => {
// if(res.success){
// getApp().globalData.userInfo = res.result.userInfo
// if (!res.result.userInfo.sysDepart) {
// dd.redirectTo({ url: '/pages/changeCrop/changeCrop' })
// } else {
// dd.redirectTo({ url: '/pages/my/my' })
// }
// } else {
// util.ddToast({ type: 'fail', text: res.message })
// }
// })
// }
// })
}
export default login
// 首页底部文案
export const ABOUT_COPY = {
copy: '本服务由浙江钧普科技股份有限公司提供',
telTitle: '当前版本号:',
tel: 'V1.0.6',
};
export const JY_MENU_QUERY = [
{
thumb: '../../src/assets/carApply.png',
page: '../applyBorrowCar/applyBorrowCar',
title: '用车申请'
},
{
thumb: '../../src/assets/myApply.png',
page: '../myApply/myApply',
title: '我的申请'
},
{
thumb: '../../src/assets/carUseLog.png',
page: '../carUseLog/carUseLog',
title: '用车记录'
},
]
export const SHY_MENU_QUERY = [
{
thumb: '../../src/assets/monitor.png',
page: '../keyList/keyList',
title: '钥匙监控'
},
{
thumb: '../../src/assets/carUseLog.png',
page: '../carUseLog/carUseLog',
title: '用车记录'
},
{
thumb: '../../src/assets/tj.png',
page: '../carTj/carTj',
title: '用车统计'
},
]
export const SYS_MENU_QUERY = [
{
thumb: '../../src/assets/user.png',
page: '../sysUser/sysUser',
title: '用户管理'
},
{
thumb: '../../src/assets/car.png',
page: '../sysCar/sysCar',
title: '车辆管理'
},
{
thumb: '../../src/assets/carApply.png',
page: '../applyBorrowCar/applyBorrowCar',
title: '用车申请'
},
{
thumb: '../../src/assets/carUseLog.png',
page: '../carUseLog/carUseLog',
title: '用车记录'
},
{
thumb: '../../src/assets/monitor.png',
page: '../keyList/keyList',
title: '钥匙监控'
},
]
export const BMD_MENU_QUERY = [
{
thumb: '../../src/assets/carUseLog.png',
page: '../carUseLog/carUseLog',
title: '用车记录'
}
]
\ No newline at end of file
@charset "utf-8";
.borderBottomDDD {
border-bottom: 1rpx solid #ddd;
}
.borderTopDDD {
border-top: 1rpx solid #ddd;
}
.top-wrapper {
background-color: #2074D4;
}
.top-wrapper .top-title {
padding: 10rpx 36rpx 40rpx 36rpx;
}
.top-wrapper .top-title .auth-btn {
text-align: center;
margin: auto 36rpx;
padding: 24rpx 32rpx;
border: 1rpx solid #fff;
border-radius: 4rpx;
}
.top-wrapper .top-title .auth-btn .auth-title {
color: #fff;
opacity: 1;
font-size: 32rpx;
}
.top-wrapper .top-title .auth-btn .auth-info {
margin-top: 7rpx;
font-size: 24rpx;
color: #F0F7FF;
opacity: 0.6;
}
.top-wrapper .top-title .top-content {
display: flex;
justify-content: space-between;
color: #fff;
}
.top-wrapper .top-title .top-content .left-content .name {
font-size: 40rpx;
}
.top-wrapper .top-title .top-content .left-content .company {
font-size: 30rpx;
opacity: 0.8;
}
.top-wrapper .top-title .top-content .right-content {
display: flex;
width: 0.5rem;
justify-content: flex-end;
align-items: center;
}
.top-wrapper .top-title .top-content .right-content image {
width: 16rpx;
height: 29rpx;
}
.top-wrapper .top-status {
display: flex;
justify-content: flex-start;
padding: 0 32rpx 66rpx 32rpx;
}
.am-list-extra {
flex: 1;
}
.top-icon {
width: 70rpx;
height: 70rpx;
margin: 10rpx 20rpx 0rpx 0rpx;
}
<!--顶部-->
<view class="top-wrapper" a:if="{{personalGeneralInfo}}">
<list-item>
<!-- <view slot="extra">
<image src="http://122.112.148.157:5000/updateImg/scan.png" class="top-icon" mode="aspectFit" onTap="onTap"/>
</view> -->
<avatar name="{{personalGeneralInfo.userName}}" desc="{{personalGeneralInfo.company}}" src="{{personalGeneralInfo.avatar}}" />
</list-item>
</view>
import http from '../../http'
import util from '../../libs/util'
Component({
mixins: [],
data: {
image: '../../assets/my.png',
},
props: {
personalGeneralInfo : {}
},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {
onHrefDetail() {
console.log('点击了用户信息')
},
onTap() {
my.scan({
scanType: ['qrCode','barCode'],
success: (res) => {
http.get('/jeecg/dingTalk/scan?userId='+ getApp().globalData.userInfo.userId + '&' + res.code).then(res => {
if (res.success) {
dd.redirectTo({ url: '/pages/index/index' })
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
});
}
},
});
{
"component": true,
"usingComponents": {
"topitem": "../topitem/topitem",
"avatar": "antd-mini/es/Avatar/index",
"list-item": "mini-ali-ui/es/list/list-item/index"
}
}
\ No newline at end of file
.top-item-wrapper {
width: 210rpx;
padding: 0 20rpx;
text-align: center;
}
.top-item-wrapper:not(:first-child) {
border-left: 1rpx solid rgba(255, 255, 255, 0.21);
}
.top-item-wrapper .title {
font-size: 28rpx;
color: #F0F7FF;
opacity: 0.6;
}
.top-item-wrapper .txt {
margin-top: 20rpx;
word-break: break-all;
font-size: 32rpx;
color: #fff;
}
<view class="top-item-wrapper">
<view class="title">{{title}}</view>
<view class="txt">{{txt}}</view>
</view>
\ No newline at end of file
Component({
mixins: [],
// 组件内部数据
data: {},
// 可给外部传入的属性添加默认值
props: {
title: '',
txt: '',
},
didMount() {},
didUpdate() {},
didUnmount() {},
// 自定义方法
methods: {},
});
{
"component": true
}
\ No newline at end of file
import dd from 'gdt-jsapi';
import util from '/src/libs/util.js'
// http对象
const http = {
// 通用get方法
get: function(url, data) {
dd.showLoading()
return new Promise((resolve, reject) => {
dd.httpRequest({
url: getApp().globalData.host + url,
method: 'GET',
data: data,
dataType: 'json',
complete: (res) => {
if (res.status === 200) {
resolve(res.data)
} else {
reject(res)
handleError(res)
}
dd.hideLoading()
}
})
})
},
// 通用post方法
post: function(url, data) {
dd.showLoading()
return new Promise((resolve, reject) => {
dd.httpRequest({
url: url,
method: 'POST',
data: JSON.stringify(data),
dataType: 'json',
headers: {
"Content-Type": "application/json"
},
complete: (res) => {
if (res.status === 200) {
resolve(res.data)
} else {
reject(res)
handleError(res)
}
dd.hideLoading()
}
})
})
}
}
// 错误处理方法
function handleError(err) {
let message = '请求错误'
if (err.error) {
// 判断错误码
switch (err.error) {
case 4: message = '设置错误'; break
case 11: message = '无权跨域'; break
case 12: message = '网络出错'; break
case 13: message = '超时'; break
case 14: message = '解码失败'; break
case 19: message = 'HTTP错误'; break
default: break
}
}
util.ddToast({ type: 'fail', text: message })
}
export default http
\ No newline at end of file
import dd from 'gdt-jsapi';
// 工具类对象
const util = {
// 合并url和query参数
formatUrl(url, params) {
if (!params) {
return url
}
let _url = url + '?'
for (let key in params) {
_url += `${key}=${params[key]}&`
}
return _url.substr(0, _url.length - 1)
},
// 格式化日期
formatDate(fmt, date) {
var o = {
"M+": date.getMonth() + 1,
"d+": date.getDate(),
"H+": date.getHours(),
"m+": date.getMinutes(),
"s+": date.getSeconds(),
"q+": Math.floor((date.getMonth() + 3) / 3),
"S": date.getMilliseconds()
}
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length))
}
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)))
}
return fmt
},
// 全局toast
ddToast({ type, text, interval }) {
dd.showToast({
type: type,
content: text,
duration: interval
})
},
// 暂停函数
sleep(duration) {
return new Promise(resolve => {
setTimeout(resolve, duration)
})
},
// 设置导航栏
setNavigationBar({ title, reset, backgroundColor }) {
dd.setNavigationBar({
title: title,
reset: reset,
backgroundColor: backgroundColor
})
},
// 深拷贝,不会拷贝函数
cloneDeep(obj) {
if (typeof obj !== 'object') {
return obj
}
let temp = {}
temp = JSON.parse(JSON.stringify(obj))
return temp
},
/**
* @desc 防抖函数
* @param {需要防抖的函数} func
* @param {延迟时间} wait
* @param {是否立即执行} immediate
*/
debounce(func, wait = 500, immediate = true) {
let timeout
return function(...args) {
let context = this
if (timeout) clearTimeout(timeout)
if (immediate) {
let callNow = !timeout
timeout = setTimeout(function() {
timeout = null
}, wait)
if (callNow) func.apply(context, args)
} else {
timeout = setTimeout(function() {
func.apply(context, args)
}, wait)
}
}
},
// debounce(func, delay) {
// let timer
// return function() {
// let args = arguments
// clearTimeout(timer)
// timer = setTimeout(() => {
// func.apply(this, args)
// }, delay || 1000)
// }
// },
// 判断a和b是否相等
equal(a, b) {
if (typeof a === 'function' || typeof b === 'function') {
return false
}
if (typeof a !== typeof b) {
return false
}
if (typeof a === 'object') {
return JSON.stringify(a) === JSON.stringify(b)
}
return a === b
},
/**
* 使用indexof方法实现模糊查询
* @param {Array} list 进行查询的数组
* @param {String} keyWord 查询的关键词
* @return {Array} 查询的结果
*/
fuzzyQuery(list, keyWord) {
var arr = [];
for (var i = 0; i < list.length; i++) {
if (list[i].indexOf(keyWord) >= 0) {
arr.push(list[i]);
}
}
return arr;
},
// 本地缓存,默认区分用户
db: {
// 写
set(path, data) {
return new Promise((resolve, reject) => {
dd.setStorage({
key: path,
data,
complete: (result) => {
resolve(result)
}
})
})
},
// 读
get(path) {
return new Promise((resolve, reject) => {
dd.getStorage({
key: path,
complete: (result) => {
resolve(result.data)
}
})
})
},
// 删除
remove(path) {
return new Promise((resolve, reject) => {
dd.removeStorage({
key: path,
complete: (result) => {
resolve(result)
}
})
})
}
},
// 根据当前页面路由获取菜单数据
getMenu(route) {
return new Promise((resolve, reject) => {
this.db.get({ dbName: 'menu', user: true }).then(data => {
for (let i = 0; i < data.length; i++) {
let arr = data[i].mobile_url.split(';')
if (arr.includes(`/${route}`)) {
resolve(this.cloneDeep(data[i]))
break
}
}
resolve(false)
})
})
},
// 根据id获取组件实例
getComponentById(componentId) {
if (!componentId) {
return false
}
let currentPage = getCurrentPages().slice(-1)[0]
let instances = function(id) {
return this.$getComponentBy((instance) => { return instance.props.id === id }, { returnOnFirstMatch: true })
}.apply(currentPage, [componentId])
return instances.length ? instances[0] : false
},
// 通用基础组件校验
baseValidate(componentArr) {
let key = ''
for (let i = 0; i < componentArr.length; i++) {
let c = componentArr[i]
key = c.label
if (c.component === 'e-subform') {
for (let j = 0; j < c.children.length; j++) {
let sf = c.children[j]
for (let k = 0; k < sf.length; k++) {
if (sf[k].status === 'error') {
key += `-${j + 1}`
util.ddToast({ type: 'fail', text: `${sf[k].label}${key}${sf[k].notice}` })
return false
}
}
}
} else {
if (c.status === 'error') {
util.ddToast({ type: 'fail', text: key + c.notice })
return false
}
}
}
return true
}
}
// 初始化缓存路径
function pathInit({ dbName = 'db', path = '', user = true, validator = () => true, defaultValue = '' }) {
const uuid = getApp().globalData.userInfo.userid || 'ghost-uuid'
const currentPath = `${dbName}.${user ? `user.${uuid}` : 'public'}${path ? `.${path}` : ''}`
const value = dd.getStorageSync({ key: currentPath }).data
if (!(value !== undefined && validator(value))) {
dd.setStorageSync({
key: currentPath,
data: defaultValue
})
}
return currentPath
}
export default util
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论