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 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>亿百分</title>
<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>
<body>
<noscript>
......@@ -15,6 +15,6 @@
</noscript>
<div id="app"></div>
<!-- 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>
</html>
......@@ -9,8 +9,8 @@ Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'MainSale',
component: () => import('@/views/mainSale/active/main/index')
name: 'Me',
component: () => import('@/views/mainSale/me/main/index')
},
{
path: '/turntableDetail',
......
......@@ -10,7 +10,7 @@ let INFO = {
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
agentId: '1000033',
}
async function getXToken() {
......
......@@ -11,7 +11,7 @@ let INFO = {
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
agentId: '1000033',
// url: 'http://139.155.48.151:8085',
url: envConfig.appBaseUrlA,
}
......
......@@ -9,7 +9,7 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
agentId: '1000033',
// url: 'http://139.155.48.151:8085' + inUrl,
url: envConfig.appBaseUrlA + inUrl,
}
......
<template>
<div class="main">
<div>1111{{href}</div>
<div class="backgrounds">
<img class="background-img" :src="cache.icon.testImg" />
</div>
......@@ -25,7 +26,6 @@
</div>
</div>
</div>
<div class="lists">
<div class="list">
<div class="list-title">我的客户</div>
......@@ -67,6 +67,8 @@
</template>
<script>
import { configWx, getUserInfo } from "@/utils/aCommon";
import axios from "axios";
export default {
name: "me",
data() {
......@@ -78,6 +80,7 @@ export default {
arrowRightDark: "/mainSale/icon-arrow-right-dark.png"
}
},
href: '',
menuBarInfo: {
list: {
main: [
......@@ -111,16 +114,28 @@ export default {
"5": "/mainSale/icon-menuBar-5-ac.png"
}
}
}
},
zcache: {
nowUrl: "",
preAuthCodeUrl: "",
code: "",
userId: "",
userInfoResOld: "",
userInfoResNew: ""
},
};
},
created() {
this.checkNowMenuBar();
mounted() {
/* alert('测试测试')
alert(window.location.href)
alert(this.$route.query.code) */
this.zReadyUserId()
this.zTestGetNowUrlInfo()
},
methods: {
methods: {
checkNowMenuBar() {
let inData = "5";
this.menuBarInfo.icon.now = this.menuBarInfo.icon.ua;
this.menuBarInfo.icon.now[inData] = this.menuBarInfo.icon.ac[inData];
},
......@@ -138,7 +153,96 @@ export default {
},
menuCase() {
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>
......
......@@ -59,3 +59,12 @@ $sizes: (0, 5, 10, 15, 20);
.pRelative{
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 [
// },
{
path: '/in/contact',
title: '进件管理',
title: '通讯录管理',
icon: ''
},
{
......
......@@ -3,11 +3,70 @@
<el-dialog
title="创建子部门"
:visible.sync="addDialog"
width="30%"
width="58%"
:show-close="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>
<el-input class="config_value" v-model="params.d_name" placeholder="请输入部门名称" />
</div>
......@@ -40,13 +99,11 @@
<label class="config_name">店铺编号</label>
<el-input class="config_value" v-model="params.code" placeholder="请输入店铺编号" />
</div>
<div class="tips" v-if="checked">请将表单填写完整</div>
<div class="tips" v-if="checked">请将表单填写完整</div>-->
<span slot="footer" class="dialog-footer">
<el-button @click="handleAddCancel" size="small">取 消</el-button>
<el-button type="primary" @click="handleAddFinish" size="small"
>确 定</el-button
>
</span>
<el-button type="primary" @click="handleAddFinish" size="small">确 定</el-button>
</span>
</el-dialog>
<div></div>
</div>
......@@ -64,63 +121,86 @@ export default {
}
},
data() {
// 中英文验证规则
const nameValidate = (rule, value, callback) => {
let reg = /^[a-zA-Z\u4e00-\u9fa5]+$/
if (!reg.test(value)) {
callback(new Error("含有非法字符(只能输入字母、汉字)!"))
} else {
callback()
}
}
return {
treeData: [],
group_name: '',
shop_code: '',
group_name: "",
shop_code: "",
showTree: false,
paramsForShow: {
name: '',
father_name: '',
code: ''
name: "",
father_name: "",
code: ""
},
params: {
d_name: '',
d_parentId: '',
code: ''
d_name: "",
d_parentId: "",
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() {
this.getList()
this.getList();
},
methods: {
getList() {
getOrgTree()
.then(res => {
console.log(res.data.organizations);
this.treeData = [res.data.organizations];
})
.catch(err => {
console.log(err);
});
},
handleAddCancel() {
this.$emit("handleAddCancel");
},
handleAddFinish() {
if(!this.params.d_name || !this.params.d_parentId || !this.params.code) {
this.checked = true
return
}
addGroup(this.params).then(res=> {
addGroup(this.params).then(res => {
// console.log(res)
})
});
// console.log(addGroup)
this.$emit("handleAddFinish");
},
handleNodeClick(item, node, self) {
/* handleNodeClick(item, node, self) {
// console.log(item,node,self)
this.params.d_parentId = item.id;
this.paramsForShow.father_name = item.label
},
checkChange(item, node, self) {
this.paramsForShow.father_name = item.label;
},
checkChange(item, node, self) {},
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>
......@@ -187,7 +267,7 @@ export default {
align-items: center;
}
.config_name:before {
content: '* ';
content: "* ";
color: red;
}
.config_name {
......@@ -203,7 +283,7 @@ export default {
width: 228px;
height: 38px;
border-radius: 4px;
border: 1px solid #DCDFE6;
border: 1px solid #dcdfe6;
position: relative;
}
.arrow_down {
......
<template>
<d2-container class="ct">
<div class="test">
<!-- <div class="tac"> -->
<!-- <div class="test">
<el-menu
:default-active="index"
class="el-menu-vertical-demo"
......@@ -28,8 +27,8 @@
<span slot="title">组织架构管理</span>
</el-menu-item>
</el-menu>
<!-- </div> -->
</div>
</div> -->
<div class="content">
<mail v-if="index == '1' && isHistoryShow == false" @isShow="contorlHistoryShow"></mail>
<counter v-if="index == '2'"></counter>
......@@ -93,7 +92,7 @@ export default {
box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
}
.content {
width: 82%;
width: 100%;
display: flex;
}
.ct >>> .d2-container-full__body {
......
......@@ -31,41 +31,38 @@
</div>
</div>
<div class="right">
<div class="top"><span>{{groupName}} {{title}}</span> 共(<span>{{totalNumber}}</span>)人 </div>
<div class="searchs">
<div class="buttons">
<div class="line">
<span class="number">店铺名{{groupName}}</span>
</div>
<div class="line lines">
<div >
<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
class="button buttonlight"
size="small"
@click="synchronismMember"
>同步记录</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>
<!-- 搜索区 -->
<el-form
class="searchzone"
:inline="true"
:model="formData"
label-width="auto"
>
<el-form-item label="关键词">
<el-form :inline="true" :model="formData" style="height: 42px;">
<el-form-item label="关键词" >
<el-input
size="small"
v-model="formData.keywords"
style="width:160px"
placeholder="请输入关键词"
/>
</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>
</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
stripe
class="list"
......@@ -404,13 +401,14 @@ export default {
</script>
<style scoped>
.lines {
height: 55px;
align-items: center;
background-color: rgba(201, 201, 201, 1);
}
.trees >>> .el-tree-node__content {
padding: 5px;
/*border-bottom: 1px solid #fff;*/
}
.trees >>> .el-tree-node__children .el-tree-node__content {
/*background-color: #dadad97a;*/
}
.btn >>> .el-button + .el-button {
margin-left: 5px;
......@@ -514,9 +512,8 @@ export default {
}
.number {
font-size: 14px;
margin-top: 2px;
margin-left: 8px;
font-size: 16px;
font-weight: bold;
}
.icon {
/* 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