Commit eeeee7cd authored by xd's avatar xd

解决安卓机问题

parent 2bc6d220
NdQI4DAtoC9jyfXm
\ No newline at end of file
ovlGwUtiSAgGUQLs
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>亿百分</title> <title>亿百分</title>
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script> <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
</head> </head>
<body> <body>
<noscript> <noscript>
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<!-- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> --> <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
</body> </body>
</html> </html>
...@@ -9,8 +9,8 @@ Vue.use(VueRouter) ...@@ -9,8 +9,8 @@ Vue.use(VueRouter)
const routes = [ const routes = [
{ {
path: '/', path: '/',
name: 'MainSale', name: 'Me',
component: () => import('@/views/mainSale/active/main/index') component: () => import('@/views/mainSale/me/main/index')
}, },
{ {
path: '/turntableDetail', path: '/turntableDetail',
......
...@@ -10,7 +10,7 @@ let INFO = { ...@@ -10,7 +10,7 @@ let INFO = {
// corpId: 'wwd1cdbca7b8b2b6c4', // corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015', // agentId: '1000015',
corpId: 'ww4df265003b43fa0d', corpId: 'ww4df265003b43fa0d',
agentId: '1000032', agentId: '1000033',
} }
async function getXToken() { async function getXToken() {
......
...@@ -11,7 +11,7 @@ let INFO = { ...@@ -11,7 +11,7 @@ let INFO = {
// corpId: 'wwd1cdbca7b8b2b6c4', // corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015', // agentId: '1000015',
corpId: 'ww4df265003b43fa0d', corpId: 'ww4df265003b43fa0d',
agentId: '1000032', agentId: '1000033',
// url: 'http://139.155.48.151:8085', // url: 'http://139.155.48.151:8085',
url: envConfig.appBaseUrlA, url: envConfig.appBaseUrlA,
} }
......
...@@ -9,7 +9,7 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') { ...@@ -9,7 +9,7 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// corpId: 'wwd1cdbca7b8b2b6c4', // corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015', // agentId: '1000015',
corpId: 'ww4df265003b43fa0d', corpId: 'ww4df265003b43fa0d',
agentId: '1000032', agentId: '1000033',
// url: 'http://139.155.48.151:8085' + inUrl, // url: 'http://139.155.48.151:8085' + inUrl,
url: envConfig.appBaseUrlA + inUrl, url: envConfig.appBaseUrlA + inUrl,
} }
......
<template> <template>
<div class="main"> <div class="main">
<div>1111{{href}</div>
<div class="backgrounds"> <div class="backgrounds">
<img class="background-img" :src="cache.icon.testImg" /> <img class="background-img" :src="cache.icon.testImg" />
</div> </div>
...@@ -25,7 +26,6 @@ ...@@ -25,7 +26,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="lists"> <div class="lists">
<div class="list"> <div class="list">
<div class="list-title">我的客户</div> <div class="list-title">我的客户</div>
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
</template> </template>
<script> <script>
import { configWx, getUserInfo } from "@/utils/aCommon";
import axios from "axios";
export default { export default {
name: "me", name: "me",
data() { data() {
...@@ -78,6 +80,7 @@ export default { ...@@ -78,6 +80,7 @@ export default {
arrowRightDark: "/mainSale/icon-arrow-right-dark.png" arrowRightDark: "/mainSale/icon-arrow-right-dark.png"
} }
}, },
href: '',
menuBarInfo: { menuBarInfo: {
list: { list: {
main: [ main: [
...@@ -111,16 +114,28 @@ export default { ...@@ -111,16 +114,28 @@ export default {
"5": "/mainSale/icon-menuBar-5-ac.png" "5": "/mainSale/icon-menuBar-5-ac.png"
} }
} }
} },
zcache: {
nowUrl: "",
preAuthCodeUrl: "",
code: "",
userId: "",
userInfoResOld: "",
userInfoResNew: ""
},
}; };
}, },
created() { mounted() {
this.checkNowMenuBar(); /* alert('测试测试')
alert(window.location.href)
alert(this.$route.query.code) */
this.zReadyUserId()
this.zTestGetNowUrlInfo()
}, },
methods: { methods: {
checkNowMenuBar() { checkNowMenuBar() {
let inData = "5"; let inData = "5";
this.menuBarInfo.icon.now = this.menuBarInfo.icon.ua; this.menuBarInfo.icon.now = this.menuBarInfo.icon.ua;
this.menuBarInfo.icon.now[inData] = this.menuBarInfo.icon.ac[inData]; this.menuBarInfo.icon.now[inData] = this.menuBarInfo.icon.ac[inData];
}, },
...@@ -138,7 +153,96 @@ export default { ...@@ -138,7 +153,96 @@ export default {
}, },
menuCase() { menuCase() {
this.$router.push({ path: "/case" }); this.$router.push({ path: "/case" });
} },
// 获取code
zReadyUserId() {
alert('没code111')
/* zlog(
"%c--->this.zcache.code =",
"color: orange;",
this.$route.query.code
) */
if (this.$route.query.code === undefined){
alert('没code')
this.zTestPreAuthCode()
} else {
alert('有code')
alert($route.query.code)
this.zTestGetNowUrlInfo();
this.zTestGetUserInfoByOldToken();
}
},
// 测试-获取当前Url信息
zTestGetNowUrlInfo() {
alert('获取url')
this.zcache.nowUrl = JSON.stringify(this.$route.query);
this.zcache.code = String(this.$route.query.code);
zlog("%c--->zTestGetNowUrlInfo: ", "color: orange;", this.zcache.nowUrl);
},
zTestPreAuthCode() {
alert('获取code')
const basicInfo = {
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com"),
responseType: "code",
scope: "snsapi_base",
state: "ztest",
tail: "#wechat_redirect"
};
let url =
basicInfo.head +
"appid=" +
basicInfo.appId +
"&redirect_uri=" +
basicInfo.redirectUrI +
"&response_type=" +
basicInfo.responseType +
"&scope=" +
basicInfo.scope +
"&state=" +
basicInfo.state +
basicInfo.tail;
zlog("%c--->zTestPreAuthCode: Url =", "background: orange", url);
this.zcache.preAuthCodeUrl = url;
window.location.href = url;
this.href = url
alert(url)
},
// 测试-获取用户信息
zTestGetUserInfoByOldToken() {
alert('获取用户信息')
let postData = {
code: this.zcache.code,
};
let headerData = {
agentId: "1000032",
corpId: "ww4df265003b43fa0d"
};
this.zcache.userInfoResOld = "PostData:" + JSON.stringify(postData);
axios({
url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code=" + this.zcache.code,
method: "post",
headers: headerData,
})
.then(res => {
console.log(res,'用户信息');
this.info = res.data + ''
alert('获取用户信息接口成功')
this.zcache.userInfoResNew = "RESOK:" + res.data.data.userId;
sessionStorage.setItem("userId", String(res.data.data.userId));
this.zcache.userId = String(res.data.data.userId);
alert(this.zcache.userId)
alert('获取到了用户信息')
})
.catch(err => {
this.zcache.userInfoResNew = "RESERR.";
});
},
} }
}; };
</script> </script>
......
...@@ -59,3 +59,12 @@ $sizes: (0, 5, 10, 15, 20); ...@@ -59,3 +59,12 @@ $sizes: (0, 5, 10, 15, 20);
.pRelative{ .pRelative{
position: relative; position: relative;
} }
.line {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
height: 42px;
background-color: #ececec;
padding: 0 10px;
}
\ No newline at end of file
...@@ -18,7 +18,7 @@ export default [ ...@@ -18,7 +18,7 @@ export default [
// }, // },
{ {
path: '/in/contact', path: '/in/contact',
title: '进件管理', title: '通讯录管理',
icon: '' icon: ''
}, },
{ {
......
...@@ -3,11 +3,70 @@ ...@@ -3,11 +3,70 @@
<el-dialog <el-dialog
title="创建子部门" title="创建子部门"
:visible.sync="addDialog" :visible.sync="addDialog"
width="30%" width="58%"
:show-close="false" :show-close="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<div class="config_item"> <el-form :model="addForm" label-width="auto" ref="addStore" :rules="rules" >
<el-form-item label="部门名称:" prop="deptName">
<el-input
size="small"
v-model="addForm.deptName"
placeholder="请输入部门名称"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="上级部门:" prop="dept">
<div class="block">
<el-cascader
v-model="addForm.dept"
placeholder="请选择上级部门"
:options="options"
filterable
style="width: 50%;"
></el-cascader>
</div>
</el-form-item>
<el-form-item label="门店名称:" prop="name">
<el-input
size="small"
v-model="addForm.name"
placeholder="请输入门店名称"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="门店Id:" prop="storeId">
<el-input
size="small"
v-model="addForm.storeId"
placeholder="请输入门店Id"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="门店会员id:" prop="memberId">
<el-input
size="small"
v-model="addForm.memberId"
placeholder="门店会员id:"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="设置主管:" prop="director">
<el-cascader
v-model="director"
placeholder="请选择主管"
:options="options"
:props="{ multiple: true }"
filterable
style="width: 50%;">
</el-cascader>
</el-form-item>
</el-form>
<!-- <div class="config_item">
<label class="config_name">部门名称</label> <label class="config_name">部门名称</label>
<el-input class="config_value" v-model="params.d_name" placeholder="请输入部门名称" /> <el-input class="config_value" v-model="params.d_name" placeholder="请输入部门名称" />
</div> </div>
...@@ -40,13 +99,11 @@ ...@@ -40,13 +99,11 @@
<label class="config_name">店铺编号</label> <label class="config_name">店铺编号</label>
<el-input class="config_value" v-model="params.code" placeholder="请输入店铺编号" /> <el-input class="config_value" v-model="params.code" placeholder="请输入店铺编号" />
</div> </div>
<div class="tips" v-if="checked">请将表单填写完整</div> <div class="tips" v-if="checked">请将表单填写完整</div>-->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleAddCancel" size="small">取 消</el-button> <el-button @click="handleAddCancel" size="small">取 消</el-button>
<el-button type="primary" @click="handleAddFinish" size="small" <el-button type="primary" @click="handleAddFinish" size="small">确 定</el-button>
>确 定</el-button </span>
>
</span>
</el-dialog> </el-dialog>
<div></div> <div></div>
</div> </div>
...@@ -64,63 +121,86 @@ export default { ...@@ -64,63 +121,86 @@ export default {
} }
}, },
data() { data() {
// 中英文验证规则
const nameValidate = (rule, value, callback) => {
let reg = /^[a-zA-Z\u4e00-\u9fa5]+$/
if (!reg.test(value)) {
callback(new Error("含有非法字符(只能输入字母、汉字)!"))
} else {
callback()
}
}
return { return {
treeData: [], treeData: [],
group_name: '', group_name: "",
shop_code: '', shop_code: "",
showTree: false, showTree: false,
paramsForShow: { paramsForShow: {
name: '', name: "",
father_name: '', father_name: "",
code: '' code: ""
}, },
params: { params: {
d_name: '', d_name: "",
d_parentId: '', d_parentId: "",
code: '' code: ""
},
checked: false,
////
addForm: {
deptName: '',
dept: '',
name: '',
memberId: '',
storeId: '',
director: []
},
rules: {
deptName: [
{ required: true, message: "请输入部门名称", trigger: "blur" },
{ validator: nameValidate, trigger: "blur" },
{ max: 50, message: "长度在50个字符以内", trigger: "blur" }
],
dept: [{ required: true, message: "请选择上级部门", trigger: "change" }]
}, },
checked: false
}; };
}, },
created() { created() {
this.getList() this.getList();
}, },
methods: { methods: {
getList() {
getOrgTree()
.then(res => {
console.log(res.data.organizations);
this.treeData = [res.data.organizations];
})
.catch(err => {
console.log(err);
});
},
handleAddCancel() { handleAddCancel() {
this.$emit("handleAddCancel"); this.$emit("handleAddCancel");
}, },
handleAddFinish() { handleAddFinish() {
addGroup(this.params).then(res => {
if(!this.params.d_name || !this.params.d_parentId || !this.params.code) {
this.checked = true
return
}
addGroup(this.params).then(res=> {
// console.log(res) // console.log(res)
}) });
// console.log(addGroup) // console.log(addGroup)
this.$emit("handleAddFinish"); this.$emit("handleAddFinish");
}, },
handleNodeClick(item, node, self) { /* handleNodeClick(item, node, self) {
// console.log(item,node,self) // console.log(item,node,self)
this.params.d_parentId = item.id; this.params.d_parentId = item.id;
this.paramsForShow.father_name = item.label this.paramsForShow.father_name = item.label;
},
checkChange(item, node, self) {
}, },
checkChange(item, node, self) {},
showTreeData() { showTreeData() {
this.showTree = !this.showTree this.showTree = !this.showTree;
}, },
*/
getList() {
getOrgTree().then(res => {
console.log(res.data.organizations)
this.treeData = [res.data.organizations];
}).catch(err => {
console.log(err)
});
}
} }
}; };
</script> </script>
...@@ -187,7 +267,7 @@ export default { ...@@ -187,7 +267,7 @@ export default {
align-items: center; align-items: center;
} }
.config_name:before { .config_name:before {
content: '* '; content: "* ";
color: red; color: red;
} }
.config_name { .config_name {
...@@ -203,7 +283,7 @@ export default { ...@@ -203,7 +283,7 @@ export default {
width: 228px; width: 228px;
height: 38px; height: 38px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
position: relative; position: relative;
} }
.arrow_down { .arrow_down {
......
<template> <template>
<d2-container class="ct"> <d2-container class="ct">
<div class="test"> <!-- <div class="test">
<!-- <div class="tac"> -->
<el-menu <el-menu
:default-active="index" :default-active="index"
class="el-menu-vertical-demo" class="el-menu-vertical-demo"
...@@ -28,8 +27,8 @@ ...@@ -28,8 +27,8 @@
<span slot="title">组织架构管理</span> <span slot="title">组织架构管理</span>
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
<!-- </div> -->
</div> </div> -->
<div class="content"> <div class="content">
<mail v-if="index == '1' && isHistoryShow == false" @isShow="contorlHistoryShow"></mail> <mail v-if="index == '1' && isHistoryShow == false" @isShow="contorlHistoryShow"></mail>
<counter v-if="index == '2'"></counter> <counter v-if="index == '2'"></counter>
...@@ -93,7 +92,7 @@ export default { ...@@ -93,7 +92,7 @@ export default {
box-shadow:0px 2px 4px 0px rgba(221,221,221,1); box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
} }
.content { .content {
width: 82%; width: 100%;
display: flex; display: flex;
} }
.ct >>> .d2-container-full__body { .ct >>> .d2-container-full__body {
......
...@@ -31,41 +31,38 @@ ...@@ -31,41 +31,38 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="top"><span>{{groupName}} {{title}}</span> 共(<span>{{totalNumber}}</span>)人 </div> <div class="line">
<div class="searchs"> <span class="number">店铺名{{groupName}}</span>
<div class="buttons"> </div>
<div class="line lines">
<div >
<el-button class="button button_group" size="small" @click="addChild">添加子部门</el-button <el-button class="button button_group" size="small" @click="addChild">添加子部门</el-button
> >
<el-button class="button buttondark" size="small" @click="handleMove" :disabled="idList.length>0? false:true "
>移动</el-button
>
<el-button <el-button
class="button buttonlight" class="button buttonlight"
size="small" size="small"
@click="synchronismMember" @click="synchronismMember"
>同步记录</el-button >同步记录</el-button
> >
<el-button class="button buttondark" :disabled="groupId ? false : true" size="small" @click="deleteChild">删除部门</el-button <el-button class="button buttondark" :disabled="groupId ? false : true" size="small" @click="deleteChild">删除部门</el-button
> >
</div> </div>
<!-- 搜索区 --> <!-- 搜索区 -->
<el-form <el-form :inline="true" :model="formData" style="height: 42px;">
class="searchzone" <el-form-item label="关键词" >
:inline="true"
:model="formData"
label-width="auto"
>
<el-form-item label="关键词">
<el-input <el-input
size="small" size="small"
v-model="formData.keywords" v-model="formData.keywords"
style="width:160px"
placeholder="请输入关键词" placeholder="请输入关键词"
/> />
</el-form-item> </el-form-item>
<el-button class="button buttondark" size="small" @click="handleSearch(1,1)">搜索</el-button> <el-button class="button buttondark" size="small" @click="handleSearch(1,1)" style="margin-top:4px;">搜索</el-button>
</el-form> </el-form>
</div> </div>
<div class="line">
<span class="number">全部{{totalNumber}}</span>
<el-button class="button buttondark" size="small" style="margin-left:20px;" @click="handleMove" :disabled="idList.length>0? false:true ">批量移动</el-button>
</div>
<el-table <el-table
stripe stripe
class="list" class="list"
...@@ -404,13 +401,14 @@ export default { ...@@ -404,13 +401,14 @@ export default {
</script> </script>
<style scoped> <style scoped>
.lines {
height: 55px;
align-items: center;
background-color: rgba(201, 201, 201, 1);
}
.trees >>> .el-tree-node__content { .trees >>> .el-tree-node__content {
padding: 5px; padding: 5px;
/*border-bottom: 1px solid #fff;*/ /*border-bottom: 1px solid #fff;*/
}
.trees >>> .el-tree-node__children .el-tree-node__content {
/*background-color: #dadad97a;*/
} }
.btn >>> .el-button + .el-button { .btn >>> .el-button + .el-button {
margin-left: 5px; margin-left: 5px;
...@@ -514,9 +512,8 @@ export default { ...@@ -514,9 +512,8 @@ export default {
} }
.number { .number {
font-size: 14px; font-size: 16px;
margin-top: 2px; font-weight: bold;
margin-left: 8px;
} }
.icon { .icon {
/* display: inline-block; */ /* display: inline-block; */
......
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