baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- <view class="title">应用参数</view> -->
|
||||
<view v-for="(item,index) in allMenu">
|
||||
<view class="title-switch">
|
||||
<text>{{item.NAME}}</text>
|
||||
<image src="../../../static/parameter/push.png" @click="showSubClick(item,index)" v-if="item.showSubItem"></image>
|
||||
<image src="../../../static/parameter/pull.png" @click="showSubClick(item,index)" v-else></image>
|
||||
<switch :checked="item.isOpenMenu" @change="parentMenuChange(item,index)" color="#4662FF"/>
|
||||
|
||||
</view>
|
||||
<view v-for="(subItem,subIndex) in item.SubMenus" v-show="item.showSubItem && item.SubMenus.length>0">
|
||||
<view class="sub-title-switch">
|
||||
<text>{{subItem.NAME}}</text>
|
||||
<switch :checked="subItem.isOpenMenu" @change="childrenMenuChange(subItem,subIndex)" color="#4662FF"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<opsoft-dialog-notice
|
||||
:dialogNoticeShow="showDialog"
|
||||
:dialogNoticeType="dialogNoticeType"
|
||||
:dialogNoticeTitle="dialogNoticeTitle"
|
||||
:dialogNoticeContent="dialogNoticeContent"
|
||||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||||
>
|
||||
</opsoft-dialog-notice>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
allMenu:[],
|
||||
storageSelAllMenu:[],
|
||||
curParentIndex:0,
|
||||
curChildrenIndex:0,
|
||||
dialogNoticeContent:'',
|
||||
dialogNoticeTitle:'',
|
||||
dialogNoticeType:'',
|
||||
showDialog:false,
|
||||
|
||||
showGrayLayer:false,
|
||||
showOrgList:false,
|
||||
organizationOpenSwitch:false,
|
||||
orgList:[],
|
||||
orgSelected:'',
|
||||
organizationSwitch: false,
|
||||
printSwitch: false,
|
||||
bluetoothSwitch: false,
|
||||
deviceSwitch: false,
|
||||
systemParameter: {},
|
||||
}
|
||||
},
|
||||
components: {opsoftDialogNotice},
|
||||
computed: {},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.getAllMenu();
|
||||
},
|
||||
methods: {
|
||||
showSubClick(item,index){
|
||||
this.curParentIndex = index;
|
||||
item.showSubItem = !item.showSubItem
|
||||
if(item.showSubItem){
|
||||
this.allMenu.forEach((e,eindex) => {
|
||||
if(index != eindex){
|
||||
e.showSubItem = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
parentMenuChange(item,index){
|
||||
this.curParentIndex = index;
|
||||
item.isOpenMenu = !item.isOpenMenu;
|
||||
if(item.isOpenMenu){
|
||||
item.SubMenus.forEach(e => {
|
||||
e.isOpenMenu = true;
|
||||
})
|
||||
}
|
||||
else {
|
||||
item.SubMenus.forEach(e => {
|
||||
e.isOpenMenu = false;
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('selMenus',this.allMenu)
|
||||
},
|
||||
childrenMenuChange(subItem,subIndex){
|
||||
this.curChildrenIndex = subIndex;
|
||||
subItem.isOpenMenu = !subItem.isOpenMenu;
|
||||
let selSubLength = this.allMenu[this.curParentIndex].SubMenus.filter(e => {return e.isOpenMenu}).length;
|
||||
if (selSubLength > 0) {
|
||||
this.allMenu[this.curParentIndex].isOpenMenu = true;
|
||||
}
|
||||
else {
|
||||
this.allMenu[this.curParentIndex].isOpenMenu = false;
|
||||
}
|
||||
|
||||
uni.setStorageSync('selMenus',this.allMenu)
|
||||
},
|
||||
getAllMenu(){
|
||||
let _self = this;
|
||||
this.$request.post('/Service/GetAllMenu')
|
||||
.then(res => {
|
||||
let data = res.MainMenu;
|
||||
if (data && data.length > 0) {
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "生产汇报"
|
||||
});
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "生产检验"
|
||||
});
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "安灯预警"
|
||||
});
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "预警平台"
|
||||
});
|
||||
}
|
||||
|
||||
data.forEach((item,index) => {
|
||||
item.isOpenMenu = true;
|
||||
item.showSubItem = false;
|
||||
item.SubMenus.forEach((el,elindex) => {
|
||||
el.isOpenMenu = true;
|
||||
el.src = '../../../static/icon/'+el.KEY+'.png';
|
||||
});
|
||||
});
|
||||
|
||||
this.allMenu = data;
|
||||
this.storageSelAllMenu = uni.getStorageSync('selMenus');
|
||||
if (this.storageSelAllMenu) {
|
||||
let closeMenu = this.storageSelAllMenu.filter(e => { return !e.isOpenMenu });
|
||||
this.storageSelAllMenu.forEach(function(item){
|
||||
item.SubMenus.forEach(function(subItem){
|
||||
if (!subItem.isOpenMenu) {
|
||||
closeMenu.push(subItem);
|
||||
}
|
||||
});
|
||||
});
|
||||
let selAllMenus = this.storageSelAllMenu.filter(e => { return !e.isOpenMenu });
|
||||
let selAllSubMenus = new Array();
|
||||
|
||||
closeMenu.forEach(e => {
|
||||
allMenu.forEach(allMenu => {
|
||||
if (e.ID == allMenu.ID) {
|
||||
allMenu.isOpenMenu = e.isOpenMenu;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
uni.hideLoading();
|
||||
this.dialogProps(err)
|
||||
});
|
||||
},
|
||||
dialogNoticeConfirmClick(){
|
||||
this.showDialog = false;
|
||||
},
|
||||
dialogProps(err){
|
||||
err = errorStrUntil.handle(err);
|
||||
this.showDialog = true;
|
||||
this.dialogNoticeType = 'error';
|
||||
this.dialogNoticeTitle = '异常提示';
|
||||
this.dialogNoticeContent = err;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
.title{
|
||||
height: 90.57upx;
|
||||
line-height: 90.57upx;
|
||||
font-size: 28.98upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #686868;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
.title-switch{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #FFFFFF;
|
||||
margin-top: 3.62upx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-switch text{
|
||||
width: 100%;
|
||||
height: 108.69upx;
|
||||
line-height: 108.69upx;
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
switch{
|
||||
width: 79.71upx;
|
||||
transform: scale(0.7);
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
image{
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
.sub-title-switch{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #e5e5e5;
|
||||
margin-top: 3.62upx;
|
||||
align-items: center;
|
||||
}
|
||||
.sub-title-switch text{
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
</style>
|
||||
Executable
+1016
File diff suppressed because it is too large.
Load diff
+196
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="title">系统设置</view>
|
||||
<view class="title-switch"><text>设为默认账号</text><switch/></view>
|
||||
<view class="title-switch"><text>直接登录</text><switch/></view>
|
||||
<view class="title-switch"><text>退出清除信息</text><switch/></view>
|
||||
<view class="title">声音管理</view>
|
||||
<view class="title-switch"><text>暂无</text></view>
|
||||
|
||||
<view class="title">网络设定</view>
|
||||
<view class="title-switch"><text>{{requestUrl}}</text></view>
|
||||
|
||||
<view class="bottom-button">
|
||||
<view class="bot-btn" @tap="clickClearCache"> 切换账号</view>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="bot-btn-quit" @tap="Quit">
|
||||
<navigator target="miniProgram">退出系统</navigator>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
</view>
|
||||
<opsoft-dialog
|
||||
@dialogCancelClick="dialogCancelClick"
|
||||
@dialogConfirmClick="dialogConfirmClick"
|
||||
:dialogContent="dialogContent"
|
||||
:dialogTitle="dialogTitle"
|
||||
:dialogShow="dialogShow"
|
||||
></opsoft-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
|
||||
import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
|
||||
import uniList from '@/components/uni-list/uni-list.vue'
|
||||
import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
|
||||
import opsoftDialog from '@/components/opsoft-dialog/opsoft-dialog.vue'
|
||||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
dialogTitle:'',
|
||||
dialogContent:'',
|
||||
requestUrl: '',
|
||||
ip:'',
|
||||
post:'',
|
||||
virtualPath:''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
uniCollapse,
|
||||
uniCollapseItem,
|
||||
uniList,
|
||||
uniListItem,
|
||||
opsoftDialog
|
||||
},
|
||||
computed: {
|
||||
...mapState(['hasLogin','userInfo'])
|
||||
},
|
||||
onShow() {
|
||||
this.requestUrl = this.$global.globalData.requestUrl
|
||||
|
||||
},
|
||||
methods: {
|
||||
dialogProps(){
|
||||
this.dialogShow = true;
|
||||
this.dialogTitle = '切换提示';
|
||||
this.dialogContent = '确认切换账号';
|
||||
},
|
||||
dialogConfirmClick:function() {
|
||||
console.log("dialogConfirmClick");
|
||||
this.dialogShow=false;
|
||||
let requestUrl = this.$global.globalData.requestUrl;
|
||||
this.post = uni.getStorageSync('requestPort');
|
||||
this.ip = uni.getStorageSync('requestIp');
|
||||
this.virtualPath = uni.getStorageSync('requestPath');
|
||||
// 清除token
|
||||
uni.setStorageSync("token", "")
|
||||
uni.setStorageSync("ifLogin", false)
|
||||
//缓存账套配置
|
||||
this.$global.setGlobalObj({
|
||||
requestUrl: requestUrl
|
||||
});
|
||||
uni.setStorage({
|
||||
key:"requestPort",
|
||||
data:this.post
|
||||
});
|
||||
|
||||
uni.setStorage({
|
||||
key:"requestIp",
|
||||
data:this.ip
|
||||
});
|
||||
uni.setStorage({
|
||||
key:"requestPath",
|
||||
data:this.virtualPath
|
||||
});
|
||||
uni.reLaunch({url: '../../myinfo/login/login'});
|
||||
},
|
||||
dialogCancelClick:function() {
|
||||
console.log("dialogCancelClick");
|
||||
this.dialogShow=false
|
||||
},
|
||||
Quit() {
|
||||
//只在安卓应用中有用 退出当前应用,改方法只在App中生效
|
||||
plus.runtime.quit();
|
||||
},
|
||||
clearServerCache: function(count){},
|
||||
|
||||
logOut(count){},
|
||||
|
||||
clickClearCache: function() {
|
||||
this.dialogProps()
|
||||
},
|
||||
|
||||
...mapMutations(['logout','clearCache']),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
.title{
|
||||
height: 90.57upx;
|
||||
line-height: 90.57upx;
|
||||
font-size: 28.98upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #686868;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
.title-switch{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #FFFFFF;
|
||||
margin-top: 3.62upx;
|
||||
align-items: center;
|
||||
}
|
||||
.title-switch text{
|
||||
width: 100%;
|
||||
height: 108.69upx;
|
||||
line-height: 108.69upx;
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
switch{
|
||||
width: 79.71upx;
|
||||
transform: scale(0.7);
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
.bot-btn{
|
||||
height: 86.95upx;
|
||||
line-height: 86.95upx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 43.47upx;
|
||||
text-align: center;
|
||||
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #4688FD;
|
||||
margin-top: 65.21upx;
|
||||
margin-left: 43.47upx;
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
.bot-btn-quit{
|
||||
height: 86.95upx;
|
||||
line-height: 86.95upx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 43.47upx;
|
||||
text-align: center;
|
||||
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #4688FD;
|
||||
margin-top: 30rpx;
|
||||
margin-left: 43.47upx;
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
</style>
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- <view class="title">日志参数</view> -->
|
||||
<view class="title-switch"><text>启用日志</text><switch :checked="isOpenLog" @change="isOpenLogChange"/></view>
|
||||
<view class="title-switch" @click="clearAllLog" ><text>清除日志</text><view class="opsoft-clear-icon" style="background-image: url(../../../static/myinfo/refresh.png);"/></view>
|
||||
<view class="title-switch" @click="clearYesterdayLog"><text>清除前一天日志</text><view class="opsoft-clear-icon" style="background-image: url(../../../static/myinfo/refresh.png);"/></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isOpenLog:true
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
computed: {},
|
||||
onLoad() {
|
||||
this.isOpenLog = uni.getStorageSync('isOpenLog');
|
||||
},
|
||||
onShow() {
|
||||
this.isOpenLog = uni.getStorageSync('isOpenLog');
|
||||
},
|
||||
methods: {
|
||||
isOpenLogChange(){
|
||||
this.isOpenLog = !this.isOpenLog;
|
||||
uni.setStorageSync('isOpenLog', this.isOpenLog);
|
||||
console.log(this.isOpenLog);
|
||||
},
|
||||
clearAllLog(){
|
||||
let dirPath = '';
|
||||
// #ifdef APP-PLUS
|
||||
plus.io.requestFileSystem(plus.io.PUBLIC_DOCUMENTS,function(fs){
|
||||
let a = fs.root.toURL();
|
||||
dirPath = a + '/' + 'app-log';
|
||||
console.log('dirPath',dirPath);
|
||||
plus.io.resolveLocalFileSystemURL(dirPath,function(entry){
|
||||
//读取当前目录对象
|
||||
var directoryReader = entry.createReader();
|
||||
//读取这个目录下的所有文件
|
||||
directoryReader.readEntries(function(entries){
|
||||
console.log(entries, 'entries')
|
||||
var i;
|
||||
for( i=0; i < entries.length; i++ ) {
|
||||
console.log( entries[i].name );
|
||||
}
|
||||
if(entries.length > 0){
|
||||
entry.removeRecursively(function(entry){
|
||||
callback();
|
||||
console.log('删除成功回调');
|
||||
}, function(err){
|
||||
console.log(err.message + ' ?!')
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
getTimeStampDatetime(format = 'yyyy-MM-dd HH:mm:ss', timeStamp) {
|
||||
let nowDatetime = new Date()
|
||||
timeStamp ? nowDatetime = new Date(timeStamp) : nowDatetime = new Date()
|
||||
return nowDatetime.Format(format)
|
||||
},
|
||||
clearYesterdayLog(){
|
||||
let dirPath = '';
|
||||
let curDate = this.getTimeStampDatetime("yyyy-MM-dd");
|
||||
let yesterdayDate = this.getTimeStampDatetime("yyyy-MM-dd", (new Date(curDate).getTime()-86400000));
|
||||
// #ifdef APP-PLUS
|
||||
plus.io.requestFileSystem(plus.io.PUBLIC_DOCUMENTS,function(fs){
|
||||
let a = fs.root.toURL();
|
||||
dirPath = a + '/' + 'app-log/' + yesterdayDate + 'log.text';
|
||||
console.log('dirPath',dirPath);
|
||||
plus.io.resolveLocalFileSystemURL(dirPath,function(entry){
|
||||
entry.remove(function(entry){
|
||||
callback();
|
||||
console.log('删除成功回调');
|
||||
}, function(err){
|
||||
console.log(err.message + ' ?!')
|
||||
});
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.opsoft-clear-icon{
|
||||
height: 60rpx;
|
||||
width: 60rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
margin-right: 64rpx;
|
||||
}
|
||||
.title{
|
||||
height: 90.57upx;
|
||||
line-height: 90.57upx;
|
||||
font-size: 28.98upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #686868;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
.title-switch{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #FFFFFF;
|
||||
margin-top: 3.62upx;
|
||||
align-items: center;
|
||||
border-bottom: #e5e5e5 solid 1px;
|
||||
}
|
||||
|
||||
.title-switch text{
|
||||
width: 100%;
|
||||
height: 108.69upx;
|
||||
line-height: 108.69upx;
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
switch{
|
||||
width: 79.71upx;
|
||||
transform: scale(0.7);
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
image{
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
.my-body-outline{
|
||||
height: 108.69rpx;
|
||||
display: flex;
|
||||
flex-direction:
|
||||
row;align-items: center;
|
||||
}
|
||||
.left-img{
|
||||
height: 50.72rpx;
|
||||
width: 50.72rpx;
|
||||
margin-left: 43.47rpx;
|
||||
}
|
||||
.my-body{
|
||||
width: 80%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
height: 108.69rpx;
|
||||
line-height: 108.69rpx;
|
||||
margin-left: 43.47rpx;
|
||||
margin-right: 43.47rpx;
|
||||
border-bottom: #F1F1F1 solid 1.81rpx;
|
||||
}
|
||||
.my-body image{
|
||||
height: 32.6rpx;
|
||||
width: 32.6rpx;
|
||||
}
|
||||
.my-body view{
|
||||
margin-left: 21.73rpx;
|
||||
width: 100%;
|
||||
font-size: 32.6rpx;
|
||||
}
|
||||
</style>
|
||||
+389
@@ -0,0 +1,389 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="title">打印参数</view>
|
||||
<view class="title-switch"><text>启用设备号</text><switch :checked="deviceSwitch" @change="deviceSwitchChange"/></view>
|
||||
<view class="title-switch"><text>启用普通打印</text><switch :checked="printSwitch" @change="printSwitchChange"/></view>
|
||||
<view class="title-switch"><text>启用蓝牙打印</text><switch :checked="bluetoothSwitch" @change="bluetoothSwitchChange"/></view>
|
||||
<view class="title">组织参数</view>
|
||||
<view class="title-switch"><text>启用组织隔离</text><switch :checked="organizationSwitch" @change="organizationSwitchChange"/></view>
|
||||
<view class="title-switch"><text>启用默认组织</text><switch :checked="organizationOpenSwitch" @change="organizationOpenSwitchChange"/></view>
|
||||
<view class="org-content" v-if="organizationOpenSwitch" @click="selectOrgClick">
|
||||
<text class="org-text">选择默认组织</text>
|
||||
<text class="org-text" style="margin-left: 40rpx;">{{orgSelected}}</text>
|
||||
</view>
|
||||
|
||||
<view class="title">应用参数</view>
|
||||
<view v-for="(item,index) in allMenu">
|
||||
<view class="title-switch">
|
||||
<text>{{item.NAME}}</text>
|
||||
<image src="../../../static/parameter/push.png" @click="showSubClick(item,index)" v-if="item.showSubItem"></image>
|
||||
<image src="../../../static/parameter/pull.png" @click="showSubClick(item,index)" v-else></image>
|
||||
<switch :checked="item.isOpenMenu" @change="parentMenuChange(item,index)" color="#4662FF"/>
|
||||
|
||||
</view>
|
||||
<view v-for="(subItem,subIndex) in item.SubMenus" v-show="item.showSubItem && item.SubMenus.length>0">
|
||||
<view class="sub-title-switch">
|
||||
<text>{{subItem.NAME}}</text>
|
||||
<switch :checked="subItem.isOpenMenu" @change="childrenMenuChange(subItem,subIndex)" color="#4662FF"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="gray-layer" v-if="showGrayLayer" @click="hideGrayLayer"></view>
|
||||
<view class="bottom-select" v-if="showOrgList">
|
||||
<view class="bottom-select-head">
|
||||
<view class="bottom_select-head-cancel">请选择组织</view>
|
||||
</view>
|
||||
<view>
|
||||
<scroll-view scroll-y="true" style="height: 150px;">
|
||||
<view class="bottom-select-list" v-for="(item,index) in orgList">
|
||||
<view class="bottom-select-list-item" @click="orgSelectChange(item,index)">{{item.FNAME}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<opsoft-dialog-notice
|
||||
:dialogNoticeShow="showDialog"
|
||||
:dialogNoticeType="dialogNoticeType"
|
||||
:dialogNoticeTitle="dialogNoticeTitle"
|
||||
:dialogNoticeContent="dialogNoticeContent"
|
||||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||||
>
|
||||
</opsoft-dialog-notice>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
allMenu:[],
|
||||
storageSelAllMenu:[],
|
||||
curParentIndex:0,
|
||||
curChildrenIndex:0,
|
||||
dialogNoticeContent:'',
|
||||
dialogNoticeTitle:'',
|
||||
dialogNoticeType:'',
|
||||
showDialog:false,
|
||||
|
||||
showGrayLayer:false,
|
||||
showOrgList:false,
|
||||
organizationOpenSwitch:false,
|
||||
orgList:[],
|
||||
orgSelected:'',
|
||||
organizationSwitch: false,
|
||||
printSwitch: false,
|
||||
bluetoothSwitch: false,
|
||||
deviceSwitch: false,
|
||||
systemParameter: {},
|
||||
}
|
||||
},
|
||||
components: {opsoftDialogNotice},
|
||||
computed: {},
|
||||
onLoad() {
|
||||
this.systemParameter = uni.getStorageSync('systemParameter');
|
||||
if (!this.systemParameter) {
|
||||
this.systemParameter = {};
|
||||
this.printSwitch = true;
|
||||
this.systemParameter.printSwitch = true;
|
||||
uni.setStorageSync('systemParameter', this.systemParameter);
|
||||
}
|
||||
else {
|
||||
this.organizationSwitch = this.systemParameter.organizationSwitch;
|
||||
this.printSwitch = this.systemParameter.printSwitch;
|
||||
if (typeof(this.printSwitch) == "undefined") {
|
||||
this.printSwitch = true;
|
||||
this.systemParameter.printSwitch = true;
|
||||
uni.setStorageSync('systemParameter', this.systemParameter);
|
||||
}
|
||||
this.bluetoothSwitch = this.systemParameter.bluetoothSwitch;
|
||||
this.deviceSwitch = this.systemParameter.deviceSwitch;
|
||||
}
|
||||
this.orgList = uni.getStorageSync('orgInfo');
|
||||
|
||||
this.organizationOpenSwitch = uni.getStorageSync('isOpenDefaultOrg')
|
||||
if(this.organizationOpenSwitch){
|
||||
let defaultOrgInfo = uni.getStorageSync('defaultOrgInfo');
|
||||
this.orgSelected = defaultOrgInfo.FNAME;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getAllMenu();
|
||||
},
|
||||
methods: {
|
||||
showSubClick(item,index){
|
||||
this.curParentIndex = index;
|
||||
item.showSubItem = !item.showSubItem
|
||||
if(item.showSubItem){
|
||||
this.allMenu.forEach((e,eindex) => {
|
||||
if(index != eindex){
|
||||
e.showSubItem = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
parentMenuChange(item,index){
|
||||
this.curParentIndex = index;
|
||||
item.isOpenMenu = !item.isOpenMenu;
|
||||
if(item.isOpenMenu){
|
||||
item.SubMenus.forEach(e => {
|
||||
e.isOpenMenu = true;
|
||||
})
|
||||
}else{
|
||||
item.SubMenus.forEach(e => {
|
||||
e.isOpenMenu = false;
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('selMenus',this.allMenu)
|
||||
},
|
||||
childrenMenuChange(subItem,subIndex){
|
||||
this.curChildrenIndex = subIndex;
|
||||
subItem.isOpenMenu = !subItem.isOpenMenu;
|
||||
let selSubLength = this.allMenu[this.curParentIndex].SubMenus.filter(e => {return e.isOpenMenu}).length;
|
||||
if(selSubLength > 0){
|
||||
this.allMenu[this.curParentIndex].isOpenMenu = true;
|
||||
}else{
|
||||
this.allMenu[this.curParentIndex].isOpenMenu = false;
|
||||
}
|
||||
|
||||
uni.setStorageSync('selMenus',this.allMenu)
|
||||
},
|
||||
getAllMenu(){
|
||||
let _self = this;
|
||||
this.$request.post('/Service/GetAllMenu')
|
||||
.then(res => {
|
||||
let data = res.MainMenu;
|
||||
if(data&&data.length>0){
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "生产汇报"
|
||||
});
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "生产检验"
|
||||
});
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "安灯预警"
|
||||
});
|
||||
data = data.filter(e => {
|
||||
return e.NAME != "预警平台"
|
||||
});
|
||||
}
|
||||
|
||||
data.forEach((item,index) => {
|
||||
item.isOpenMenu = false;
|
||||
item.showSubItem = false;
|
||||
item.SubMenus.forEach((el,elindex) => {
|
||||
el.isOpenMenu = false;
|
||||
el.src = '../../../static/icon/'+el.KEY+'.png';
|
||||
});
|
||||
|
||||
});
|
||||
this.allMenu = data;
|
||||
this.storageSelAllMenu = uni.getStorageSync('selMenus');
|
||||
if(this.storageSelAllMenu){
|
||||
let selAllMenus = this.storageSelAllMenu.filter(e => {return e.isOpenMenu});
|
||||
let selAllSubMenus = new Array();
|
||||
|
||||
selAllMenus.forEach(e => {
|
||||
|
||||
e.SubMenus.forEach(eSub => {
|
||||
if(eSub.isOpenMenu){
|
||||
selAllSubMenus.push(eSub)
|
||||
}
|
||||
})
|
||||
|
||||
_self.allMenu.forEach((allMenu,allMenuIndex) => {
|
||||
if(e.ID == allMenu.ID){
|
||||
allMenu.isOpenMenu = true;
|
||||
allMenu.SubMenus.forEach(allSub => {
|
||||
selAllSubMenus.forEach(selAllSub => {
|
||||
if(selAllSub.ID == allSub.ID){
|
||||
allSub.isOpenMenu = true;
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
uni.hideLoading();
|
||||
this.dialogProps(err)
|
||||
});
|
||||
},
|
||||
dialogNoticeConfirmClick(){
|
||||
this.showDialog = false;
|
||||
},
|
||||
dialogProps(err){
|
||||
err = errorStrUntil.handle(err);
|
||||
this.showDialog = true;
|
||||
this.dialogNoticeType = 'error';
|
||||
this.dialogNoticeTitle = '异常提示';
|
||||
this.dialogNoticeContent = err;
|
||||
},
|
||||
hideGrayLayer(){
|
||||
this.showGrayLayer = false;
|
||||
this.showOrgList = false;
|
||||
},
|
||||
selectOrgClick(){
|
||||
this.showGrayLayer = true;
|
||||
this.showOrgList = true;
|
||||
},
|
||||
orgSelectChange(item,index){
|
||||
this.orgSelected = item.FNAME;
|
||||
uni.setStorageSync('defaultOrgInfo',item)
|
||||
|
||||
this.showGrayLayer = false;
|
||||
this.showOrgList = false;
|
||||
},
|
||||
|
||||
organizationOpenSwitchChange: function (e) {
|
||||
this.organizationOpenSwitch = e.target.value;
|
||||
|
||||
uni.setStorageSync('isOpenDefaultOrg',this.organizationOpenSwitch)
|
||||
if(!this.organizationOpenSwitch){
|
||||
this.orgSelected = '';
|
||||
uni.removeStorageSync('defaultOrgInfo');
|
||||
}
|
||||
},
|
||||
organizationSwitchChange: function (e) {
|
||||
this.organizationSwitch = e.target.value;
|
||||
this.systemParameter.organizationSwitch = this.organizationSwitch;
|
||||
uni.setStorageSync('systemParameter', this.systemParameter);
|
||||
},
|
||||
deviceSwitchChange: function (e) {
|
||||
this.deviceSwitch = e.target.value;
|
||||
this.systemParameter.deviceSwitch = this.deviceSwitch;
|
||||
uni.setStorageSync('systemParameter', this.systemParameter);
|
||||
},
|
||||
printSwitchChange: function (e) {
|
||||
this.printSwitch = e.target.value;
|
||||
this.systemParameter.printSwitch = this.printSwitch;
|
||||
uni.setStorageSync('systemParameter', this.systemParameter);
|
||||
},
|
||||
bluetoothSwitchChange: function (e) {
|
||||
this.bluetoothSwitch = e.target.value;
|
||||
this.systemParameter.bluetoothSwitch = this.bluetoothSwitch;
|
||||
uni.setStorageSync('systemParameter', this.systemParameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.org-content{
|
||||
display: flex;flex-direction: row;height: 100rpx;width: 100%;line-height: 100rpx;
|
||||
background-color: #FFFFFF;border-bottom: solid 1px #c8c7cc;padding: 0 30rpx;
|
||||
}
|
||||
.org-text{
|
||||
height: 100rpx;line-height: 100rpx;font-size: 32rpx;
|
||||
}
|
||||
.gray-layer {
|
||||
position: fixed;left: 0;right: 0;top: 0;bottom: 0;
|
||||
background-color: #333333;opacity: 0.5;z-index: 4;
|
||||
}
|
||||
.bottom-select {
|
||||
position: fixed;left: 0rpx;right: 0rpx;bottom: 0rpx;background-color: #FFFFFF;opacity: 1;z-index: 5;
|
||||
}
|
||||
.bottom-select-head {
|
||||
display: flex;flex-wrap: nowrap;border-bottom: 1px solid #f9f9f9;justify-content: space-around;
|
||||
}
|
||||
.bottom_select-head-cancel {
|
||||
height: 80rpx;line-height: 80rpx;font-size: 32rpx;text-align: left;margin-left: 32rpx;color: #666666;
|
||||
}
|
||||
.bottom-select-list {
|
||||
display: flex;width: 100%;align-items: center;
|
||||
}
|
||||
.bottom-select-list-item {
|
||||
height: 72rpx;line-height: 72rpx;width: 100%;text-align: center;font-size: 16px;
|
||||
font-family: PingFangSC, PingFangSC-Regular;font-weight: 400;
|
||||
}
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
/* .title-switch {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #FFFFFF;
|
||||
align-items: center;
|
||||
}
|
||||
.title-switch text {
|
||||
width: 100%;
|
||||
height: 108.69upx;
|
||||
line-height: 108.69upx;
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
switch {
|
||||
width: 79.71upx;
|
||||
transform: scale(0.7);
|
||||
margin-right: 43.47upx;
|
||||
} */
|
||||
.title{
|
||||
height: 90.57upx;
|
||||
line-height: 90.57upx;
|
||||
font-size: 28.98upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #686868;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
.title-switch{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #FFFFFF;
|
||||
margin-top: 3.62upx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-switch text{
|
||||
width: 100%;
|
||||
height: 108.69upx;
|
||||
line-height: 108.69upx;
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
switch{
|
||||
width: 79.71upx;
|
||||
transform: scale(0.7);
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
image{
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
margin-right: 43.47upx;
|
||||
}
|
||||
.sub-title-switch{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
background: #e5e5e5;
|
||||
margin-top: 3.62upx;
|
||||
align-items: center;
|
||||
}
|
||||
.sub-title-switch text{
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
margin-left: 43.47upx;
|
||||
}
|
||||
</style>
|
||||
+294
@@ -0,0 +1,294 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="main" style="margin-top: 36.23rpx; height: 181.15rpx;">
|
||||
<view class="title"><text>头 像</text></view>
|
||||
<view class="u-img">
|
||||
<view>
|
||||
<!-- #ifdef H5 -->
|
||||
<image @tap="SelectH5Img" :src="avatar"></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<image @tap="SelectImg" :src="avatar"></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <image style="width: 25.36upx;height: 25.36upx;"></image> -->
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="title"><text> 姓 名</text></view>
|
||||
<view class="uni-form-item uni-column input">
|
||||
<input class="uni-input" focus placeholder="请输入姓名" v-model="name" disabled="true" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="title"><text>用户名</text></view>
|
||||
<view class="uni-form-item uni-column input">
|
||||
<input class="uni-input" focus placeholder="请输入用户名" v-model="username" disabled="true" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="title"><text>企业名称</text></view>
|
||||
<view class="uni-form-item uni-column input">
|
||||
<input class="uni-input" focus placeholder="请输入微信号" v-model="company" disabled="true" />
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="saveBtn" @click="btnSave">保存</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
username: '',
|
||||
company: '江苏欧软信息科技有限公司',
|
||||
// weChatNum:'',
|
||||
avatar: '',
|
||||
disabled: true,
|
||||
isEdit: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['hasLogin', 'userInfo'])
|
||||
},
|
||||
onLoad: function() {
|
||||
this.name = uni.getStorageSync('loginInfo').UserName;
|
||||
this.username = uni.getStorageSync('userName');
|
||||
// this.company = this.userInfo.OrgStructures.FName;
|
||||
// if(this.userInfo.avatar!=null)
|
||||
// {
|
||||
// this.avatar=this.userInfo.avatar
|
||||
// }
|
||||
|
||||
},
|
||||
methods: {
|
||||
btnSave: function() {
|
||||
uni.showModal({
|
||||
content:"功能正在开发中",
|
||||
showCancel:false
|
||||
});
|
||||
// uni.request({
|
||||
// url: this.$config_url+'Login/UserInfoEdit',
|
||||
// method: 'POST',
|
||||
// data: {
|
||||
// userId:this.userInfo.UserID,
|
||||
// userName:this.name,
|
||||
// UserID:this.mail,
|
||||
// avatar:this.avatar
|
||||
// },
|
||||
// success: res => {
|
||||
// if(res.data.status === 1)
|
||||
// {
|
||||
// let userlist={
|
||||
// user_id:this.userInfo.user_id,
|
||||
// user_name:this.name,
|
||||
// email:this.mail,
|
||||
// pr_password:this.userInfo.pr_password,
|
||||
// phone:this.phone,
|
||||
// is_pda:this.userInfo.is_pda,
|
||||
// photo:this.userInfo.photo,
|
||||
// open_id:this.weChatNum,
|
||||
// avatar:this.avatar,
|
||||
// group_userpole:this.userInfo.group_userpole
|
||||
// };
|
||||
// this.login(userlist);
|
||||
// this.ChangeEditStatus();
|
||||
// //本地缓存
|
||||
// uni.setStorage({
|
||||
// key:'Avatar',
|
||||
// data:this.avatar
|
||||
// });
|
||||
// uni.showModal({
|
||||
// content: '基本信息修改成功!',
|
||||
// showCancel:false,
|
||||
// confirmText: '确定',
|
||||
// confirmColor:'#007BFF',
|
||||
// success: res => {
|
||||
// if(res.confirm)
|
||||
// {
|
||||
// uni.switchTab({
|
||||
// url:'../../../pages/myabout/myindex'
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// fail: () => {},
|
||||
// complete: () => {}
|
||||
// });
|
||||
|
||||
// }
|
||||
// else{
|
||||
// uni.showToast({
|
||||
// icon:'none',
|
||||
// title: res.data.message
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// fail: () => {
|
||||
// uni.showToast({
|
||||
// icon:'none',
|
||||
// title: '数据加载错误!'
|
||||
// });
|
||||
// },
|
||||
// complete: () => {}
|
||||
// });
|
||||
let userInfos = this.userInfo
|
||||
userInfos.avatarUrl = this.avatar
|
||||
this.login(userInfos)
|
||||
uni.showToast({
|
||||
title: '保存成功!'
|
||||
});
|
||||
},
|
||||
ChangeEditStatus: function() {
|
||||
if (this.isEdit) {
|
||||
this.isEdit = false;
|
||||
this.disabled = true;
|
||||
} else {
|
||||
this.isEdit = true;
|
||||
this.disabled = false;
|
||||
}
|
||||
},
|
||||
SelectImg: function(e) {
|
||||
// if (!this.isEdit) {
|
||||
// return;
|
||||
// }
|
||||
var that = this;
|
||||
//选择图片
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['ablum', 'camera'], //从相册选择
|
||||
success: function(res) {
|
||||
console.log("选择的图片:" + res.tempFilePaths);
|
||||
//that.avatar = res.tempFilePaths;
|
||||
const tempPath = res.tempFilePaths[0];
|
||||
|
||||
|
||||
//保存图片
|
||||
uni.saveFile({
|
||||
tempFilePath: res.tempFilePaths[0],
|
||||
success: function(resavedFile) {
|
||||
var savedFilePath = resavedFile.savedFilePath;
|
||||
that.avatar = savedFilePath;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
SelectH5Img() {
|
||||
//选择图片
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['ablum', 'camera'], //从相册选择
|
||||
success: function(res) {
|
||||
console.log("选择的图片:" + res.tempFilePaths);
|
||||
//that.avatar = res.tempFilePaths;
|
||||
const tempPath = res.tempFilePaths[0];
|
||||
uni.getImageInfo({
|
||||
src: tempPath,
|
||||
success: function(image) {
|
||||
this.avatar=image.path
|
||||
console.log(image);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
...mapMutations(['login'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #F2F2F2;
|
||||
}
|
||||
|
||||
.main {
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 0.5px solid #F2F2F2;
|
||||
padding-right: 43.47upx;
|
||||
}
|
||||
|
||||
.main view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 120%;
|
||||
flex: 1;
|
||||
padding-left: 43.47upx;
|
||||
}
|
||||
.title text{
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
}
|
||||
.uni-input{
|
||||
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #686868;
|
||||
}
|
||||
.input {
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.u-img {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex: 3;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
input {
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 50%;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 144.92upx;
|
||||
height: 144.92rpx;
|
||||
/* border-radius: 30upx; */
|
||||
background: url('../../../static/headNew.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.saveBtn{
|
||||
height: 86.95upx;
|
||||
line-height: 86.95upx;
|
||||
background: #035DFF;
|
||||
border-radius: 43.47upx;
|
||||
text-align: center;
|
||||
opacity: 0.71;
|
||||
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
margin-left: 43.47upx;
|
||||
margin-right: 43.47upx;
|
||||
margin-top: 65.21upx;
|
||||
}
|
||||
</style>
|
||||
Executable
+182
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="s-main">
|
||||
<view class="s-content">
|
||||
<view class="s-title"><text style="color:red;">*</text>网络地址</view>
|
||||
<view class="s-part">
|
||||
<input class="uni-input" placeholder="请输入网址/Ip" v-model="ip"
|
||||
@input="ipInput" focus="ipFocus"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="s-content">
|
||||
<view class="s-title">网络端口</view>
|
||||
<view class="s-part">
|
||||
<input class="uni-input" placeholder="请输入端口" v-model="post"
|
||||
@input="partInput" focus="postFocus"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="s-content">
|
||||
<view class="s-title">虚拟目录</view>
|
||||
<view class="s-part">
|
||||
<input class="uni-input" placeholder="请输入网址" v-model="virtualPath"
|
||||
@input="pathInput" focus="virtualFocus"/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="s-content">
|
||||
<view class="s-title"><text style="color:red;">*</text>数据账套</view>
|
||||
<view class="s-part">
|
||||
<view class="uni-list-cell-db">
|
||||
<picker @change="bindDBAliseChange" :value="index" :range="dbAliseArry" range-key="key">
|
||||
<view class="uni-input">{{dbAliseArry[index].name}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <text style="padding-left:9%; font-size: 30upx;">当前账套:{{current}}</text> -->
|
||||
<view class="s-btn">
|
||||
<button class="btnSearch" :disabled="btnDisable" @click="ConfirmClick">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
reportUrl: '',
|
||||
//testfor测试
|
||||
// ip: '127.0.0.1',
|
||||
// post: '80',
|
||||
// virtualPath: 'APWMS',
|
||||
ip: '',
|
||||
post: '',
|
||||
virtualPath: '',
|
||||
dbAlise: '',
|
||||
index: 0,
|
||||
dbAliseArry: [{
|
||||
name: '请选择',
|
||||
key: ''
|
||||
}],
|
||||
btnDisable: true,
|
||||
current: '',
|
||||
ipFocus: true,
|
||||
postFocus: true,
|
||||
virtualFocus: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['hasConnect', 'dbInfo'])
|
||||
},
|
||||
onLoad: function() {
|
||||
this.ShowData();
|
||||
},
|
||||
methods: {
|
||||
ShowData: function() {
|
||||
// var url = this.$global.globalData.requestUrl;
|
||||
// console.log(this.$global.globalData)
|
||||
// if (url.length > 0) {
|
||||
// var spliturl = url.split('//');
|
||||
// var argnew = spliturl[1].split('/');
|
||||
// var ippost = argnew[0];
|
||||
// var arg=argnew[0].split(':');
|
||||
// this.virtualPath = argnew[1];
|
||||
// if(arg.length>1)
|
||||
// {
|
||||
// this.ip=arg[0]
|
||||
// this.post=arg[1]
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.ip=ippost
|
||||
// this.post=80
|
||||
// }
|
||||
// }
|
||||
this.post = uni.getStorageSync('requestPort');
|
||||
this.ip = uni.getStorageSync('requestIp');
|
||||
this.virtualPath = uni.getStorageSync('requestPath');
|
||||
console.log("uni.getStorageSync('requestPath')", uni.getStorageSync('requestPath'));
|
||||
this.checkInput();
|
||||
},
|
||||
|
||||
checkInput: function() {
|
||||
if (this.ip.length > 0) {
|
||||
this.btnDisable = false;
|
||||
} else {
|
||||
this.btnDisable = true;
|
||||
}
|
||||
},
|
||||
|
||||
ConfirmClick: function() {
|
||||
var _self = this;
|
||||
setTimeout(
|
||||
function function_name () {
|
||||
_self.$nextTick(function(){
|
||||
_self.ipFocus = true;
|
||||
_self.postFocus = true;
|
||||
_self.virtualFocus = true;
|
||||
setTimeout(
|
||||
function function_name () {
|
||||
_self.save();
|
||||
},
|
||||
300
|
||||
);
|
||||
})
|
||||
},
|
||||
100
|
||||
);
|
||||
},
|
||||
|
||||
ipInput: function(event) {
|
||||
this.ip = event.target.value;
|
||||
this.checkInput();
|
||||
},
|
||||
|
||||
partInput: function(event) {
|
||||
this.post = event.target.value;
|
||||
this.checkInput();
|
||||
},
|
||||
|
||||
pathInput: function(event) {
|
||||
this.virtualPath = event.target.value;
|
||||
this.checkInput();
|
||||
},
|
||||
|
||||
save: function() {
|
||||
var request = 'http://'+this.ip
|
||||
if(this.post!='80') {
|
||||
request += ':' + this.post
|
||||
}
|
||||
if(this.virtualPath) {
|
||||
request += '/' + this.virtualPath
|
||||
}
|
||||
request += '/PhoneAPI.ashx';
|
||||
this.reportUrl = request;
|
||||
//缓存账套配置
|
||||
this.$global.setGlobalObj({
|
||||
requestUrl: this.reportUrl
|
||||
});
|
||||
uni.setStorageSync('requestPort',this.post);
|
||||
uni.setStorageSync('requestIp',this.ip);
|
||||
uni.setStorageSync('requestPath',this.virtualPath);
|
||||
console.log("uni.getStorageSync('requestPath')", this.virtualPath);
|
||||
uni.showToast({
|
||||
title: '保存成功'
|
||||
});
|
||||
},
|
||||
|
||||
...mapMutations(['connectDB'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #F2F2F2;
|
||||
}
|
||||
</style>
|
||||
Executable
+108
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="my-operate">
|
||||
<view class="my-item " >
|
||||
<view class="icon-text">当前版本</view>
|
||||
<view class="text-right">{{versionCode}}</view>
|
||||
</view>
|
||||
<view class="my-item " >
|
||||
<view class="icon-text">客服电话</view>
|
||||
<view class="text-right">400-878-8790</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-operate">
|
||||
<view class="my-item">
|
||||
<view class="icon-text">升级日志</view>
|
||||
<image src="../../../static/myinfo/right-arrow.png" style="height: 25.36upx;width: 25.36upx;margin-right: 43.47upx;"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="v-bottom">
|
||||
客服电话:400-878-8790
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import version from '@/common/version.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
versionCode:''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad:function(){
|
||||
this.versionCode = 'v' + version.versionName;
|
||||
let _self = this;
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.getProperty(plus.runtime.appid,(wgtinfo)=>{
|
||||
_self.versionCode = 'v' + wgtinfo.version;
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background:#F2F2F2;
|
||||
}
|
||||
.my-operate {
|
||||
//使用flex布局 使内容垂直居中
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 30upx;
|
||||
}
|
||||
|
||||
.my-item {
|
||||
background:#FFFFFF;
|
||||
padding-left: 30upx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 25upx 0;
|
||||
flex: 1;
|
||||
//margin-bottom: 10upx;
|
||||
border-bottom: 0.5px solid #F2F2F2
|
||||
}
|
||||
|
||||
.my-item:nth-of-type(1) {
|
||||
border-top: 0.5px solid #F2F2F2
|
||||
}
|
||||
.my-item view{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.icon-text{
|
||||
margin-left: 43.47upx;
|
||||
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #232323;
|
||||
}
|
||||
.text-right{
|
||||
justify-content: flex-end;
|
||||
margin-right: 43.47upx;
|
||||
|
||||
font-size: 32.6upx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #686868;
|
||||
}
|
||||
|
||||
.v-bottom{
|
||||
width: 100%;
|
||||
position:absolute;
|
||||
bottom:0px;
|
||||
text-align: center;
|
||||
font-size: 30upx;
|
||||
padding: 30upx 0;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user