Commit b72c1a89 authored by 李苏's avatar 李苏 💬

调整

parent 4d8e87ac
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/gavel-oa-app.iml" filepath="$PROJECT_DIR$/.idea/gavel-oa-app.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
{ {
"name": "wcs", "name" : "格物OA",
"appid": "__UNI__A57940D", "appid" : "__UNI__8620B14",
"description": "浙江中能变压器WMS", "description" : "格物OA",
"versionName": "1", "versionName" : "1",
"versionCode": 100, "versionCode" : 100,
"transformPx": false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus": { "app-plus" : {
"compatible": { "compatible" : {
"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
}, },
"usingComponents": true, "usingComponents" : true,
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
/* 模块配置 */ /* 模块配置 */
"modules": {}, "modules" : {},
/* 应用发布信息 */ /* 应用发布信息 */
"distribute": { "distribute" : {
/* android打包配置 */ /* android打包配置 */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios": { "ios" : {
"dSYMs": false "dSYMs" : false
}, },
/* SDK配置 */ /* SDK配置 */
"sdkConfigs": { "sdkConfigs" : {
"ad": {} "ad" : {}
}, },
"icons": { "icons" : {
"android": { "android" : {
"hdpi": "unpackage/res/icons/72x72.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png", "xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
}, },
"ios": { "ios" : {
"appstore": "unpackage/res/icons/1024x1024.png", "appstore" : "unpackage/res/icons/1024x1024.png",
"ipad": { "ipad" : {
"app": "unpackage/res/icons/76x76.png", "app" : "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png", "app@2x" : "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png", "notification" : "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png", "settings" : "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png", "spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png" "spotlight@2x" : "unpackage/res/icons/80x80.png"
}, },
"iphone": { "iphone" : {
"app@2x": "unpackage/res/icons/120x120.png", "app@2x" : "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png", "app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png", "settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png", "spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png" "spotlight@3x" : "unpackage/res/icons/120x120.png"
} }
} }
} }
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp": {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin": { "mp-weixin" : {
"appid": "", "appid" : "",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
}, },
"h5": { "h5" : {
"template": "template.h5.html", "template" : "template.h5.html",
"devServer": { "devServer" : {
"https": false "https" : false
}, },
"title": "xgapp", "title" : "xgapp",
"router": { "router" : {
"base": "./" "base" : "./"
} }
} }
} }
\ No newline at end of file
...@@ -76,51 +76,47 @@ ...@@ -76,51 +76,47 @@
}, },
methods: { methods: {
// api获取权限
apiqx() { apiqx() {
api.postData("/frame/init/mobile", {}).then((res) => { api.postData("/frame/init/mobile", {})
.then(res => {
if (res.success) { if (res.success) {
uni.setStorage({ uni.setStorage({
key: 'mobile', key: 'mobile',
data: res.data, data: res.data,
}); });
let getqx = res.data.menu
let mkList = getqx.map(item => item.mkid) const menuMap = res.data.menu.reduce((acc, item) => {
let list = this.powerList.filter(item => { acc[item.mkid] = item.mkmc; // 创建一个以 mkid 为键,mkmc 为值的映射对象
if (mkList.includes(item.mkid)) { return acc;
item.children = item.children.filter(citem => { }, {});
if (mkList.includes(citem.mkid)) {
return true // 递归函数,用于更新项及其子项的 mkmc
} else { const updateItemMkmc = (item) => {
return false const newMkmc = menuMap[item.mkid];
} item.mkmc = newMkmc; // 更新当前项的 mkmc
})
return true if (item.children && item.children.length > 0) {
} else { // 递归更新子项
return false item.children = item.children.map(updateItemMkmc);
} }
})
this.showList=list.filter(item=>{ return item;
if(item.children&&item.children.length>0){ };
return true
}else{ // 更新 powerList
return false this.powerList = this.powerList.map(updateItemMkmc);
} this.showList = this.powerList.filter(item => item.children && item.children.length > 0);
}) this.showList = this.powerList;
console.log(this.showList) } else {
this.$tip.alert(res.message || "请求失败");
}
} else { })
this.$tip.alert(res.message || "请求失败"); .catch(err => {
} const msg = err.data?.message || "请求出现错误,请稍后再试";
this.$tip.alert(msg);
}).catch((err) => { });
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
}).finally(() => {})
}, },
returnPage() { returnPage() {
this.$Router.replace({ this.$Router.replace({
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
/* 待维修任务 */ /* 待维修任务 */
dwxQueryParams: { dwxQueryParams: {
djid: '', djid: '',
bxr: '', zt: '',
pageSize: 20, pageSize: 20,
pageNo: 1 pageNo: 1
}, },
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
async onLoad() { async onLoad() {
this.apiGetDwxList() this.apiGetDwxList()
eventBus.$on('save', () => { eventBus.$on('save', () => {
console.log('$on save')
this.dwxSearch() this.dwxSearch()
}) })
this.ztMap = await this.$match({ this.ztMap = await this.$match({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment