Commit 9e38b683 by sunerhu

修改了一些Bug

parent 3da0eafc
...@@ -85,6 +85,10 @@ export default { ...@@ -85,6 +85,10 @@ export default {
saveApplyInfo(params){ saveApplyInfo(params){
return request(`${cffpURL}/partner/saveApplyInfo`, "POST", params) return request(`${cffpURL}/partner/saveApplyInfo`, "POST", params)
}, },
// 查询所属组织List
queryOrgList(params){
return request(`${cffpURL}/orgInfo/queryOrgList`, "POST", params)
},
//学习认证列表 //学习认证列表
queryCertificateList(params){ queryCertificateList(params){
return request(`${cffpURL}/certificate/queryCertificateList`, "POST", params) return request(`${cffpURL}/certificate/queryCertificateList`, "POST", params)
...@@ -223,10 +227,14 @@ export default { ...@@ -223,10 +227,14 @@ export default {
}, },
// 我的团队 // 我的团队
queryMyTeamInfo(params){ queryMyTeamInfo(params){
return request(`${cffpURL}/cffp/orgInfo/queryMyTeamInfo`, "POST", params) return request(`${cffpURL}/orgInfo/queryMyTeamInfo`, "POST", params)
}, },
// 学习统计 // 我的团队展开LIST
userStudyCount(params){ userStudyCount(params){
return request(`${cffpURL}/orgInfo/teamDetail`, "POST", params)
},
// 学习统计
teamDetail(params){
return request(`${cffpURL}/study/userStudyCount`, "POST", params) return request(`${cffpURL}/study/userStudyCount`, "POST", params)
}, },
// 课程包学习进度明细 // 课程包学习进度明细
...@@ -256,5 +264,5 @@ export default { ...@@ -256,5 +264,5 @@ export default {
// 认证--上传就个人信息 // 认证--上传就个人信息
uploadSignUpUserInfo(params){ uploadSignUpUserInfo(params){
return request(`${cffpURL}/user/uploadSignUpUserInfo`, "POST", params) return request(`${cffpURL}/user/uploadSignUpUserInfo`, "POST", params)
}, }
} }
<template>
<view>
<view class="personalInfo">
<view class="ulBox">
<view v-for="item in menuList.filter(v=>v.isShow)" :key="item.title" @click="goDetail(item)"
class="liBox">
<view class="infoBox">
<!-- <image :src="'/static/moduleIcon/'+item.icon+'.png'" alt="" srcset="" mode="widthFix"></image> -->
<text>{{item.title}}</text>
</view>
<view class="iconBox">
<view class="" v-if="item.isType == 'text'">
<text>{{item.contentType}}</text>
</view>
<!-- <view class="" v-else-if="item.isType == 'input'">
<input>{{item.contentType}}</input>
</view> -->
<i v-else class="iconfont icon-youjiantou"></i>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
menuList: {
type: Array
}
},
data() {
return {}
},
mounted() {
console.log(this.minorMenuLists, 7412)
},
methods: {
goDetail(item) {
console.log(item, 844)
if (item.isShow == true && item.isOpen == true) {
if (item.isTips == true) {
uni.showModal({
title: item.title,
content: '确定要进行' + item.title + '操作吗?',
showCancel: true,
success: function(res) {
if (res.confirm) {
uni.showToast({
title: '操作成功',
icon: 'none'
});
} else {
console.log('已取消')
}
}
});
} else if (item.link != null) {
uni.navigateTo({
url: item.link
});
}else {
console.log('错误抛出')
}
} else {
common.errorDialog(2, '该模块正在开发中,敬请期待!', '提示');
}
}
}
}
</script>
<style lang="scss">
.personalInfo {
background: #fff;
width: 95%;
margin: 6rpx auto 0;
.ulBox {
padding: 0 30rpx;
.liBox {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
height: 92rpx;
.infoBox {
display: flex;
align-items: center;
image {
width: 52rpx !important;
height: 52rpx;
}
}
&:last-child {
border: none;
}
}
}
}
</style>
...@@ -8,23 +8,45 @@ ...@@ -8,23 +8,45 @@
<!-- // 一级循环 --> <!-- // 一级循环 -->
<view class="content-sam-box"> <view class="content-sam-box">
<view class="" v-for="(pointItem,index) in dataList" :key="index"> <view class="" v-for="(pointItem,index) in dataList" :key="index">
<view class="" style="display: flex;"> <view class="" style="display: flex;" v-if="type == '1'">
<view class="content-box-title" v-if="pointItem.title" @click="subordinate(index)"> <view class="content-box-title" v-if="pointItem.name" @click="subordinate(index,pointItem)">
<span>{{pointItem.title}}</span> <span>{{pointItem.name}}</span>
</view>
<view class="content-box-title" v-if="pointItem.levelName">
<span>{{pointItem.levelName}}</span>
</view> </view>
<view class="content-box-title" v-if="pointItem.rank"> <view class="content-box-title" v-if="pointItem.courserNum !=null">
<span>{{pointItem.rank}}</span> <span>{{pointItem.courserNum}}</span>
</view> </view>
<view class="content-box-title" v-if="pointItem.name"> </view>
<view class="" style="display: flex;" v-if="type == '2'">
<view class="content-box-title" v-if="pointItem.name" @click="subordinate(index,pointItem)">
<span>{{pointItem.name}}</span> <span>{{pointItem.name}}</span>
</view> </view>
<view class="content-box-title" v-if="pointItem.name"> <view class="content-box-title" v-if="pointItem.levelName">
<span>{{pointItem.levelName}}</span>
</view>
<view class="content-box-title" v-if="pointItem.courserNum !=null">
<span>{{pointItem.courserNum}}</span>
</view>
</view>
<view class="" style="display: flex;" v-if="type == '3'">
<view class="content-box-title" v-if="pointItem.org" @click="subordinate(index,pointItem)">
<span>{{pointItem.org}}</span>
</view>
<view class="content-box-title" v-if="pointItem.levelName">
<span>{{pointItem.levelName}}</span>
</view>
<view class="content-box-title" v-if="pointItem.name !=null">
<span>{{pointItem.name}}</span> <span>{{pointItem.name}}</span>
</view> </view>
<view class="content-box-title" v-if="pointItem.referrer !=null">
<span>{{pointItem.referrer}}</span>
</view>
</view> </view>
<!-- 二级循环 --> <!-- 二级循环 -->
<view class="" v-if="table_index == index && this.tableone == true"> <view class="" v-if="table_index == index && this.tableone == true && pointItem.levelCode != 'A1'">
<view class="" v-for="(itq, index) in dtList"> <view class="" v-for="(itq, index) in dtList">
<view style="display: flex;"> <view style="display: flex;">
<view class="content-box-title-a" @click="cktable(itq)"> <view class="content-box-title-a" @click="cktable(itq)">
...@@ -45,28 +67,32 @@ ...@@ -45,28 +67,32 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import api from "../../api/api";
export default { export default {
props: { props: {
dataList: { dataList: {
type: Array type: Array,
default: null
}, },
datatitleList: { datatitleList: {
type: Array type: Array,
default: null
}, },
tabletype: { tabletype: {
type: String type: String,
} default: null
},
type:{
type: String ,// 这里用来去区分是哪个页面传来的值 1直属团队 2.所辖团队 3.其他团队
default: null
},
}, },
name: "myteam-table", name: "myteam-table",
data() { data() {
...@@ -74,31 +100,37 @@ ...@@ -74,31 +100,37 @@
table_index: '', // 第一级 table_index: '', // 第一级
tableone: false, tableone: false,
tablesubordinate:'', // 第二级 tablesubordinate:'', // 第二级
dtList: [{ dataFoList:[],
name: '测试二级服务中心',
id: 1,
},
{
name: '第二',
id: 2,
}
]
}; };
}, },
mounted() { mounted() {
console.log(this.dataList, 741741) console.log(this.type, 774557)
// if(this.type == 1){
// this.dataFoList = this.dataList.map((x,index) => ({
// name:x.name
// par:x.levelName
// data: x.courserNum
// }))
// }
}, },
methods: { methods: {
cktable(e) { cktable(e) {
this.tablesubordinate = e.id this.tablesubordinate = e.id
}, },
subordinate(index) { subordinate(index,val) {
if(this.tabletype == 1) { console.log(val.levelCode, 7744)
return true if(this.tabletype == 1 || val.levelCode == 'A1') {
return
} else {
this.tableone = this.table_index == index ? !this.tableone : true
this.table_index = index
api.userStudyCount().then(res=>{
console.log(res, 4455)
})
} }
this.tableone = this.table_index == index ? !this.tableone : true
this.table_index = index },
}
} }
} }
</script> </script>
......
...@@ -408,15 +408,15 @@ ...@@ -408,15 +408,15 @@
} }
}, },
{ // {
"path" : "pages/sign/sign", // "path" : "pages/sign/sign",
"style" : // "style" :
{ // {
"navigationBarTitleText": "签名", // "navigationBarTitleText": "签名",
"enablePullDownRefresh": false // "enablePullDownRefresh": false
} // }
} // }
], ],
// "tabBar": { // "tabBar": {
// "color": "#7A7E83", // tab 上的文字默认颜色 // "color": "#7A7E83", // tab 上的文字默认颜色
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
<text>证件类型</text> <text>证件类型</text>
<!-- <input v-model="openForm.userIdType" class="user-input" maxlength="10" type="text" <!-- <input v-model="openForm.userIdType" class="user-input" maxlength="10" type="text"
placeholder="请输入证件类型" /> --> placeholder="请输入证件类型" /> -->
<!-- <picker mode="" :range="" @change="">
<view>{{erplizeList[index]}}</view>
</picker> -->
<picker v-if="erplizeList " @change="bindPickerChange($event,erplizeList)" :value="index" <picker v-if="erplizeList " @change="bindPickerChange($event,erplizeList)" :value="index"
:range="erplizeList" range-key="name"> :range="erplizeList" range-key="name">
<view style="background-color: white;">{{ erplizeList[index].name }}</view> <view style="background-color: white;">{{ erplizeList[index].name }}</view>
...@@ -96,6 +93,10 @@ ...@@ -96,6 +93,10 @@
methods: { methods: {
async getquerySignUpInfo() { async getquerySignUpInfo() {
this.$refs.Loading.show()
setTimeout(() => {
this.$refs.Loading.hide()
}, 3000)
let UserSignUpInfoQueryRequestVO = { let UserSignUpInfoQueryRequestVO = {
userSignUpId:this.openForm.signupId userSignUpId:this.openForm.signupId
} }
...@@ -129,8 +130,8 @@ ...@@ -129,8 +130,8 @@
}); });
setTimeout(()=>{ setTimeout(()=>{
uni.navigateBack(1) uni.navigateBack(1)
},500) },1000)
this.getquerySignUpInfo() //this.getquerySignUpInfo()
} }
this.loading = false this.loading = false
}) })
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<view class="ulBox"> <view class="ulBox">
<view class="liBox"> <view class="liBox">
<text>姓名:</text> <text>姓名:</text>
<text><input class="uni-input" maxlength="15" placeholder="姓名" /></text> <text><input v-model="dataForm.name" class="uni-input" maxlength="15" placeholder="姓名" /></text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>手机号:</text> <text>手机号:</text>
<text><input class="uni-input" type="number" maxlength="11" placeholder="手机号" /></text> <text><input v-model="dataForm.mobileNumber" class="uni-input" type="number" maxlength="11" placeholder="手机号" /></text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>申请身份:</text> <text>申请身份:</text>
...@@ -28,7 +28,12 @@ ...@@ -28,7 +28,12 @@
</view> </view>
<view class="liBox"> <view class="liBox">
<text>所属组织:</text> <text>所属组织:</text>
<text>XXXXXX</text> <text>
<input v-if="isCross==true" v-model="dataForm.areaName" class="uni-input" placeholder="请填写组织名称" />
<picker v-else @change="bindPChange" :value="index" :range="orgList">
<view class="uni-input">{{ orgList[index]}}</view>
</picker>
</text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>是否跨区邀请:</text> <text>是否跨区邀请:</text>
...@@ -38,11 +43,19 @@ ...@@ -38,11 +43,19 @@
<text></text> <text></text>
</view> </view>
<view :class="{checked:!isCross}"> <view :class="{checked:!isCross}">
<i class="circle" @click="isCross=false"></i> <i class="circle" @click="isCross = false"></i>
<text></text> <text></text>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="liBox" v-if="isCross== true">
<text>所属组织名称:</text>
<text>
<picker @change="bindPickerChange" :value="applyIdentity" :range="identityArr">
<view class="uni-input">{{identityArr[applyIdentity]}}</view>
</picker>
</text>
</view> -->
</view> </view>
<share></share> <share></share>
<button type="primary" plain="true" class="sendInvite" @click="shareToggle()">发出邀请</button> <button type="primary" plain="true" class="sendInvite" @click="shareToggle()">发出邀请</button>
...@@ -60,7 +73,7 @@ ...@@ -60,7 +73,7 @@
</view> </view>
<view class="liBox"> <view class="liBox">
<text>申请身份:</text> <text>申请身份:</text>
<text>{{item.partnerLevel == '1'? '事业伙伴' : '工作室'}}</text> <text>{{item.partnerLevel == 'A1'? '事业伙伴' : '工作室'}}</text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>所属组织:</text> <text>所属组织:</text>
...@@ -72,8 +85,9 @@ ...@@ -72,8 +85,9 @@
</view> </view>
<view class="liBox"> <view class="liBox">
<text>邀请状态:</text> <text>邀请状态:</text>
<text v-if="item.approvalStatus=='0'">审核中</text> <text v-if="item.approvalStatus=='0'">邀请中</text>
<text v-else-if="item.approvalStatus=='1'" class="success">邀请成功</text> <text v-else-if="item.approvalStatus=='1'">审核中</text>
<text v-else-if="item.approvalStatus=='3'" class="success">邀请成功</text>
<text v-else class="fail">邀请失败</text> <text v-else class="fail">邀请失败</text>
</view> </view>
</view> </view>
...@@ -111,15 +125,48 @@ ...@@ -111,15 +125,48 @@
export default { export default {
data() { data() {
return { return {
dataForm:{
applyType: '1', //申请类型邀请加盟传 1 申请加盟传 2
operatStep: '1', // 99:最后一步,1:第一步,2:为第二步该obj 为第一步
userId:'1', // 目前Id 为1
name: '', //姓名
mobileNumber:'', //被邀请人手机号
partnerLevel:'' ,//被邀请人身份
hasCrossDistrict: '' ,//是否跨区邀请
areaId: '' ,//所属组织Id
areaName: '' //所属组织名称
},
userId:'1', userId:'1',
tabType:1, tabType:1,
identityArr:['工作室','事业伙伴'], identityArr:['工作室','事业伙伴'],
applyIdentity:0, applyIdentity:0,
index: 0,
isCross:true, isCross:true,
inviteLists:[] inviteLists:[],
orgList: [],
queryorgList:[]
}; };
}, },
onLoad() {
this.getqueryOrgList()
},
methods:{ methods:{
queryorgchange(e){
this.orgindex = e.detail.value
},
// 查询组织list
getqueryOrgList(){
let CffpAreaQueryReqVO = {
userId: this.userId,
partnerLevel: this.applyIdentity == 0 ? 'A1' : 'B1'
}
api.queryOrgList(CffpAreaQueryReqVO).then(res=>{
if(res['success']){
this.queryorgList = res.data.cffpAreaQuerys
this.orgList = res.data.cffpAreaQuerys.map((x)=> x.areaName)
}
})
},
switchTab(type){ switchTab(type){
this.tabType = type; this.tabType = type;
if(this.tabType===2){ if(this.tabType===2){
...@@ -129,8 +176,33 @@ ...@@ -129,8 +176,33 @@
bindPickerChange: function(e) { bindPickerChange: function(e) {
this.applyIdentity = e.detail.value this.applyIdentity = e.detail.value
}, },
// 发起邀请事件
shareToggle() { shareToggle() {
this.$refs.share.open() this.dataForm.partnerLevel = this.applyIdentity == 0 ? 'A1' : 'B1'
this.dataForm.hasCrossDistrict = this.isCross == true ? '1' : '0'
this.dataForm.areaId = this.queryorgList[this.index].areaId
this.dataForm.areaName = this.queryorgList[this.index].areaName
if(this.dataForm.name == "" || this.dataForm.mobileNumber == "" || this.dataForm.areaName == ""){
uni.showToast({
title: '请将信息补充完整',
duration: 2000,
icon: 'none'
});
return
}
api.saveApplyInfo(this.dataForm).then(res =>{
if(res['success']){
this.switchTab(2)
}
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
});
})
// this.$refs.share.open()
}, },
closeShare(){ closeShare(){
this.$refs.share.close() this.$refs.share.close()
......
<template> <template>
<view class=""> <view class="">
<text>这里是手机绑定页面</text> <view @click="dia()">此页面暂时废弃</view>
</view> </view>
</template> </template>
...@@ -12,7 +12,11 @@ ...@@ -12,7 +12,11 @@
} }
}, },
methods:{ methods:{
dia(){
uni.showLoading({
title:'jiazia'
})
}
} }
} }
</script> </script>
......
...@@ -156,13 +156,9 @@ ...@@ -156,13 +156,9 @@
} }
}, },
userinfo(){ userinfo(){
// uni.navigateTo({
// url:`/pages/personalCenter/user-information?customerBasicInfo=` + JSON.stringify(this.customerBasicInfo)
// })
uni.navigateTo({ uni.navigateTo({
url:`/pages/sign/sign` url:`/pages/personalCenter/user-information?customerBasicInfo=` + JSON.stringify(this.customerBasicInfo)
}) })
}, },
// 弹窗 // 弹窗
errorDialog(type,content){ errorDialog(type,content){
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import MenuList from "./menulist.vue" import MenuList from "@/components/menuList/menuList.vue"
export default { export default {
components:{ components:{
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
{ {
title: '手机号绑定', title: '手机号绑定',
icon: '', icon: '',
link: null, link: '',
contentType:"183****9247", contentType:"183****9247",
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: false, isTips: false,
isType: 'text'
}, },
{ {
title: '重置密码', title: '重置密码',
...@@ -38,7 +39,8 @@ ...@@ -38,7 +39,8 @@
link: '/pages/personalCenter/accountoperation/resetpassword', link: '/pages/personalCenter/accountoperation/resetpassword',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: false, isTips: false,
isType: 'radio'
}, },
{ {
title: '注销账号', title: '注销账号',
...@@ -46,7 +48,8 @@ ...@@ -46,7 +48,8 @@
link: '', link: '',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: true, isTips: true,
isType: 'radio'
} }
] ]
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
goDetail(item) { goDetail(item) {
console.log(item, 844) console.log(item, 844)
if (item.isShow == true && item.isOpen == true) { if (item.isShow == true && item.isOpen == true) {
if (item.isType == true) { if (item.isTips == true) {
uni.showModal({ uni.showModal({
title: item.title, title: item.title,
content: '确定要进行' + item.title + '操作吗?', content: '确定要进行' + item.title + '操作吗?',
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
</template> </template>
<script> <script>
import MenuList from "./menulist.vue" import MenuList from "@/components/menuList/menuList.vue"
export default { export default {
components:{ MenuList }, components:{ MenuList },
data() { data() {
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
link: '/pages/personalCenter/system/accontsetting', link: '/pages/personalCenter/system/accontsetting',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: false, isTips: false,
}, },
{ {
title: '清除缓存', title: '清除缓存',
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
link: '', link: '',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: true, isTips: true,
}, },
{ {
title: '关于CFFP财富中心', title: '关于CFFP财富中心',
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
link: '/pages/personalCenter/accountoperation/aboutcffp', link: '/pages/personalCenter/accountoperation/aboutcffp',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isType: false, isTips: false,
}, },
] ]
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
合计:{{item.rank}} 合计:{{item.rank}}
</view> </view>
<view class=""> <view class="">
<myteam-table :datatitleList="datatitleList" :dataList="item.dataL" ></myteam-table> <myteam-table :datatitleList="datatitleList" :dataList="raiseList" type="2"></myteam-table>
<!-- <view class="table-content"> <!-- <view class="table-content">
<span>辖下组织/成员</span> <span>辖下组织/成员</span>
<span>职级</span> <span>职级</span>
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
<script> <script>
import MyteamTable from '@/components/myteam/myteam-table.vue'; import MyteamTable from '@/components/myteam/myteam-table.vue';
export default { export default {
props:{
raiseList:{
type:Array
}
},
components:{ components:{
MyteamTable MyteamTable
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<view class="content-header"> <view class="content-header">
<view class="concent-title"> <view class="concent-title">
<text class="concent-text">北京一级团队</text> <text class="concent-text">{{levelName}}</text>
</view> </view>
</view> </view>
<view style="text-align: right;margin: 20px;"> <view style="text-align: right;margin: 20px;">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
<view class=""> <view class="">
<myteam-table :datatitleList="datatitleList" :dataList="dataList"></myteam-table> <myteam-table :datatitleList="datatitleList" :dataList="dataList" type="1"></myteam-table>
</view> </view>
</view> </view>
</template> </template>
...@@ -20,32 +20,32 @@ ...@@ -20,32 +20,32 @@
<script> <script>
import MyteamTable from '@/components/myteam/myteam-table.vue'; import MyteamTable from '@/components/myteam/myteam-table.vue';
export default { export default {
props: {
directList: {
type: Array
},
levelName: {
type: String
}
},
components:{ components:{
MyteamTable MyteamTable
}, },
data() { data() {
return { return {
datatitleList:['辖下组织/成员','职级','合计'], datatitleList:['辖下组织/成员','职级','成员数量'],
dataList: [{ dataList: []
title: '所属组织1',
rank: 1,
name: 'sun',
},
{
title: '所属组织2',
rank: 1,
name: 'sun',
recommend: '很好'
},
{
title: '所属组织3',
rank: 1,
name: 'sun',
recommend: '很好'
},
]
} }
}, },
mounted(){
// this.dataList = this.directList.map((x,index) => ({
// name:x.name,
// levelName:x.levelName,
// courserNum: x.courserNum
// }))
this.dataList = this.directList
console.log(this.directList, 74852)
}
} }
</script> </script>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<span class="content-box-title">{{pointItem.recommend}}</span> <span class="content-box-title">{{pointItem.recommend}}</span>
</view> --> </view> -->
<view class=""> <view class="">
<myteam-table :datatitleList="datatitleList" :dataList="dataList" :tabletype="1"></myteam-table> <myteam-table :datatitleList="datatitleList" :dataList="dataList" tabletype="1" type="3"></myteam-table>
</view> </view>
</view> </view>
</template> </template>
...@@ -20,33 +20,49 @@ ...@@ -20,33 +20,49 @@
<script> <script>
import MyteamTable from '@/components/myteam/myteam-table.vue'; import MyteamTable from '@/components/myteam/myteam-table.vue';
export default { export default {
props: {
otherList: {
type: Array,
default: null
}
},
components:{ components:{
MyteamTable MyteamTable
}, },
data() { data() {
return { return {
datatitleList: ['所属组织', '职级', '姓名', '姓名'], datatitleList: ['所属组织', '职级', '姓名', '推荐关系'],
dataList: [{ dataList:[],
title: '所属组织1', // dataList: [{
rank: 1, // title: '所属组织1',
name: 'sun', // rank: 1,
recommend: '很好' // name: 'sun',
}, // recommend: '很好'
{ // },
title: '所属组织2', // {
rank: 1, // title: '所属组织2',
name: 'sun', // rank: 1,
recommend: '很好' // name: 'sun',
}, // recommend: '很好'
{ // },
title: '所属组织3', // {
rank: 1, // title: '所属组织3',
name: 'sun', // rank: 1,
recommend: '很好' // name: 'sun',
}, // recommend: '很好'
] // },
// ]
} }
}, },
mounted() {
this.dataList = this.otherList.map((x,index) => ({
org:x.org,
levelName:x.levelName,
name: x.name,
referrer:x.referrer
}))
console.log(this.otherList, 7778878788)
}
} }
</script> </script>
......
...@@ -8,59 +8,79 @@ ...@@ -8,59 +8,79 @@
</view> </view>
<!-- tab内容 --> <!-- tab内容 -->
<view class="tabContent"> <view class="tabContent">
<view v-if="tabType===1"> <view v-if="tabType===1">
<members></members> <members v-if="directList" :directList="directList" :levelName = "levelName"></members>
</view> </view>
<view v-if="tabType===2"> <view v-if="tabType===2">
<jurisdiction></jurisdiction> <jurisdiction v-if="raiseList" :raiseList="raiseList"></jurisdiction>
</view> </view>
<view class="other" v-if="tabType===3"> <view class="other" v-if="tabType===3">
<other-team></other-team> <other-team v-if="otherList" :otherList="otherList"></other-team>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import Members from './members.vue'; import api from "../../../api/api";
import OtherTeam from './otherteam.vue'; import Members from './members.vue';
import Jurisdiction from './jurisdiction.vue'; import OtherTeam from './otherteam.vue';
import Jurisdiction from './jurisdiction.vue';
export default { export default {
components:{ components: {
OtherTeam,Members,Jurisdiction OtherTeam,
Members,
Jurisdiction
}, },
data() { data() {
return { return {
tabType: 1, tabType: 1,
userStudyLists: [], userStudyLists: [],
userId: '1' userId: '5',
directList: null, //直属团队数组
raiseList: null, //所辖团队数组
otherList: null, // 其他
levelName: null
} }
}, },
methods: { onLoad() {
userStudyList() {
api.userStudyList({ },
mounted() {
this.switchTab(1)
this.getmyseatem()
},
methods:{
getmyseatem() {
api.queryMyTeamInfo({
userId: this.userId userId: this.userId
}).then(res => { }).then(res =>{
if (res['success']) { console.log(res, 7744)
this.userStudyLists = res['data']['userStudyTimeInfos']; if(res['success']){
this.levelName = res.data.orgInfo.levelName;
this.directList = res['data']['directList'];
this.raiseList = res['data']['raiseList'];
this.otherList = res['data']['other'];
} }
console.log(res)
}) })
}, },
// userStudyList() {
// api.userStudyList({
// userId: this.userId
// }).then(res => {
// if (res['success']) {
// this.userStudyLists = res['data']['userStudyTimeInfos'];
// }
// console.log(res)
// })
// },
switchTab(type) { switchTab(type) {
console.log(type, 784758)
this.tabType = type; this.tabType = type;
}, },
dateFormat(val) { dateFormat(val) {
return dataHandling.dateFormat(val); return dataHandling.dateFormat(val);
} }
}, },
onLoad() {
},
mounted() {
this.switchTab(1)
}
} }
</script> </script>
...@@ -70,6 +90,7 @@ ...@@ -70,6 +90,7 @@
height: 100%; height: 100%;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
.tabTitle { .tabTitle {
color: #666666; color: #666666;
background-color: #fff; background-color: #fff;
...@@ -86,24 +107,27 @@ ...@@ -86,24 +107,27 @@
} }
} }
} }
.tabContent{
.tabContent {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.direct-team { .direct-team {
width: 223px; width: 223px;
height: 40px; height: 40px;
opacity: 1; opacity: 1;
border: 1px solid #3F52B7; border: 1px solid #3F52B7;
margin: 15px auto; margin: 15px auto;
text { text {
color: #333; color: #333;
} }
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
<view class="timeSelectContent"> <view class="timeSelectContent">
<picker @change="mountdchange" :value="index" :range="mountdList"> <picker @change="mountdchange" :value="montdindex" :range="mountdList">
<view class="uni-input"> {{mountdList[montdindex] || "选择月份"}} </view> <view class="uni-input"> {{mountdList[montdindex] || "选择月份"}} </view>
</picker> </picker>
</view> </view>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<button class="user-button" @click="submitinfo()">保存</button> <button class="user-button" @tap="submitinfo">保存</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -57,10 +57,6 @@ ...@@ -57,10 +57,6 @@
}, },
// 修改个人资料接口 // 修改个人资料接口
submitinfo(){ submitinfo(){
uni.showLoading({
title: '加载中',
mask: true
});
let UserRequestVO = { let UserRequestVO = {
id: 1, id: 1,
realName: this.optionForm.realName, realName: this.optionForm.realName,
...@@ -78,9 +74,12 @@ ...@@ -78,9 +74,12 @@
uni.$emit("handClick", { uni.$emit("handClick", {
data: this.optionForm data: this.optionForm
}); });
uni.navigateBack({ setTimeout(()=>{
delta: 1 uni.navigateBack({
}) delta: 1
})
}, 1000)
} }
}) })
}, },
......
<template>
<view class="signa">
<canvas class="canvas" disable-scroll="true" :style="{'width':'100vw','height':'80vh'}" canvas-id="designature"
@touchstart="starts" @touchmove="moves" @touchend="end"></canvas>
<view class="btn">
<view class="cancel-btn" @click="clear">
重写
</view>
<view class="save-btn" @click="save">
保存
</view>
</view>
</view>
</template>
<script>
/*
* 已兼容h5和小程序端
*
* 如有问题可以加qq:549791959
* 里面的计算都是自己转换公式得出的,不容易啊
*
*/
export default {
data() {
return {
resultUrl: '',
dom: null,
line: [],
width: '0px',
height: '0px',
radius: 0,
staffDeptId: '',
id: '',
type: '',
inspectTemplateId: ''
}
},
onLoad(option) {
this.staffDeptId = option.staffDeptId
this.id = option.id
this.type = option.type
this.inspectTemplateId = option.inspectTemplateId
},
created() {
uni.getSystemInfo({
success: (res) => {
this.width = res.windowWidth - 50 + 'px';
this.height = res.windowHeight - 15 + 'px';
}
});
this.dom = uni.createCanvasContext('designature', this);
},
methods: {
end(e) {
},
distance(a, b) {
let x = b.x - a.x;
let y = b.y - a.y;
return Math.sqrt(x * x + y * y);
},
starts(e) {
this.line.push({
points: [{
time: new Date().getTime(),
x: e.touches[0].x,
y: e.touches[0].y,
dis: 0
}]
})
let currentPoint = {
x: e.touches[0].x,
y: e.touches[0].y
}
this.currentPoint = currentPoint
this.drawer(this.line[this.line.length - 1])
},
moves(e) {
let point = {
x: e.touches[0].x,
y: e.touches[0].y
}
this.lastPoint = this.currentPoint,
this.currentPoint = point
this.line[this.line.length - 1].points.push({
time: new Date().getTime(),
x: e.touches[0].x,
y: e.touches[0].y,
dis: this.distance(this.currentPoint, this.lastPoint)
})
this.drawer(this.line[this.line.length - 1])
},
drawer(item) {
let x1, x2, y1, y2, len, radius, r, cx, cy, t = 0.5,
x, y;
var time = 0;
if (item.points.length > 2) {
let lines = item.points[item.points.length - 3];
let line = item.points[item.points.length - 2];
let end = item.points[item.points.length - 1];
x = line.x;
y = line.y;
x1 = lines.x;
y1 = lines.y;
x2 = end.x;
y2 = end.y;
var dis = 0;
time = (line.time - lines.time) + (end.time - line.time)
dis = line.dis + lines.dis + end.dis;
var dom = this.dom;
var or = Math.min(time / dis * this.linePressure + this.lineMin, this.lineMax);
cx = (x - (Math.pow(1 - t, 2) * x1) - Math.pow(t, 2) * x2) / (2 * t * (1 - t))
cy = (y - (Math.pow(1 - t, 2) * y1) - Math.pow(t, 2) * y2) / (2 * t * (1 - t))
dom.setLineCap('round')
dom.beginPath();
dom.setStrokeStyle('black')
dom.setLineWidth(5)
dom.moveTo(x1, y1);
dom.quadraticCurveTo(cx, cy, x2, y2);
dom.stroke();
dom.draw(true)
}
},
clear() {
this.dom.clearRect(0, 0, 1000, 1000)
this.dom.draw()
this.line = []
},
save() {
var t = this;
if (t.line.length != 0) {
uni.canvasToTempFilePath({
canvasId: 'designature',
fileType: 'png',
quality: 1, //图片质量
success: function(res) {
// t.uploadFile(res.tempFilePath)
// t.$emit('getImg',res.tempFilePath)
// uni.navigateBack({
// delta:1
// })
},
fail(e) {
// console.log(e)
}
}, this)
} else {
uni.showToast({
title: '请上传签字内容',
icon: 'none'
});
}
},
uploadFile(event) {
uni.uploadFile({
url: '/api/file/upload', // 后端api接口
filePath: event, // uni.chooseImage函数调用后获取的本地文件路劲
name: 'file', //后端通过'file'获取上传的文件对象
// formData: this.sendDate,
formData: { //后台所需除图片外的参数可以写在这里面 ,单张多张都可
requestVO: JSON.stringify(dataForm)
},
header: {
'X-Authorization': uni.getStorageSync('uni-token') ? uni.getStorageSync('uni-token') : ''
},
success: (res) => {
let data = JSON.parse(res.data)
var recordId = data.data.recordId
var url = data.data.link
if (this.type == 1) {
const data = {
shopownerFileRecordId: recordId,
manager: url
}
uni.$emit("handClick", {
data: data
});
uni.navigateBack({
delta: 1
})
} else {
const data = {
inspectFileRecordId: recordId,
inspector: url
}
uni.$emit("handClick", {
data: data
});
uni.navigateBack({
delta: 1
})
uni.navigateTo({
url:'/pages/report/report?managerUrl='+managerUrl + '&id=' + this.id + '&staffDeptId=' + this.staffDeptId + '&inspectTemplateId=' + this.inspectTemplateId + '&inspectFileRecordId=' + inspectFileRecordId
})
}
uni.hideLoading();
}
});
},
}
}
</script>
<style scoped lang="scss">
.canvas {
width: 100%;
background-color: #FFFFFF;
// position: absolute;
z-index: 100;
// left: 45px;
border: 1px solid #d6d6d6;
}
.btn {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 40upx 0 40upx;
margin-top: 60upx;
}
.cancel-btn {
background: #C0C0C0;
width: 300upx;
text-align: center;
height: 80upx;
line-height: 80upx;
}
.save-btn {
width: 300upx;
height: 80upx;
text-align: center;
color: #FFFFFF;
line-height: 80upx;
background: #007AFF;
}
// .signa {
// position: relative;
// overflow: hidden;
// background-color: #fbfbfb;
// height: 100vh;
// width: 100vw;
// .canvas {
// background-color: #FFFFFF;
// position: absolute;
// z-index: 9999;
// left: 45px;
// border: 1px solid #d6d6d6;
// }
// .btn {
// height: 100vh;
// position: fixed;
// background-color: #007AFF;
// font-size: 32rpx;
// .cancel-btn {
// width: 42vh;
// position: fixed;
// left: 50rpx;
// border: 1rpx solid #a9a1a1;
// transform: rotate(90deg);
// color: #666;
// margin-left: -21vh;
// margin-top: 21vh;
// height: 65rpx;
// line-height: 65rpx;
// border-radius: 3px;
// text-align: center;
// justify-content: center;
// }
// .save-btn {
// position: absolute;
// z-index: 999;
// display: inline-flex;
// margin-top: 67vh;
// margin-left: -21vh;
// transform: rotate(90deg);
// background: #A91F52;
// width: 42vh;
// left: 50rpx;
// border-radius: 3px;
// border: 1rpx solid #A91F52;
// color: #fff;
// height: 65rpx;
// line-height: 65rpx;
// text-align: center;
// justify-content: center;
// }
// }
// }
</style>
...@@ -55,6 +55,17 @@ export function uploadFilepdf(params) { ...@@ -55,6 +55,17 @@ export function uploadFilepdf(params) {
extension: ['.pdf', '.doc'], extension: ['.pdf', '.doc'],
success: function(res) { success: function(res) {
console.log(res, 5588) console.log(res, 5588)
var str = res.tempFiles[0].name; //截取后4位
let a = str.substring(str.length - 3);
console.log(a , 'aaaaaa')
if(a !== 'pdf') {
uni.showToast({
title: '上传文件格式不正确!',
duration: 2000,
icon: 'none'
});
return
}
var name = res.tempFiles[0].name var name = res.tempFiles[0].name
// res.tempFiles 数组 // res.tempFiles 数组
// for (var i = 0; i < res.tempFiles.length; i++) { // for (var i = 0; i < res.tempFiles.length; i++) {
......
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