提交 b05e2008 authored 作者: zhenglide's avatar zhenglide

Merge branch 'master' of http://139.159.178.92:8090/zhenglide/UbainsMeeting

# Conflicts:
#	app.js
#	pages/conference/ex_visitor/ex_visitor.axml
#	pages/conference/ex_visitor/ex_visitor.js
......@@ -16,6 +16,8 @@ App({
//domain:'http://id24iu.natappfree.cc',
//domain:"http://dd2.ubainsyun.com",
domain: "http://zhenglide.natapp1.cc" ,
domain:"http://dd2.ubainsyun.com",
//domain: "http://zhenglide.natapp1.cc" ,
corpId: '',
userId:'',
person:'',
......
......@@ -43,6 +43,7 @@ Page({
conference: null
})
//获取是否已添加外部人员记录
dd.httpRequest({
url: conferenceUrl,
......@@ -80,6 +81,12 @@ Page({
},
onShow(query) {
dd.removeStorage({
key:'signList',
success:function(res){
console.log('清除已添加外部人员记录成功');
}
})
// 页面显示
// console.log("show会议室编号",query)
},
......
......@@ -24,12 +24,15 @@
</form>
<scroll-view scroll-y="{{true}}">
<view a:for="{{employeeList}}" a:for-item="employee" a:for-index="index" class='item-avatar-xs-a'>
<view a:for="{{signList}}" a:for-item="sign" a:for-index="index" class='item-avatar-xs-a'>
<!-- <checkbox value="{{employee.name}}" checked="{{employee.checked}}" /> -->
<view data-index="{{index}}" data-id="{{sign.signId}}" onTap="deleteSign" class="del">
<view data-index="{{index}}" data-id="{{employee.id}}" onTap="deleteSign" class="del">
<view data-index="{{index}}" data-id="{{index }}" onTap="deleteSign" class="del">
<icon type="cancel" size="18" color="red"/>
</view>
<text class="checkbox-text">{{employee.name}}</text>
<text class="checkbox-text">{{sign.signName}}</text>
</view>
......
......@@ -8,6 +8,7 @@ let delExSignUrl = domain + "/dingding/delExSign";
Page({
data: {
employeeList:[],
signList:[],
mid:null,
personNum:0
......@@ -25,47 +26,132 @@ Page({
})
return false;
}
var sign={};
sign['signName']=e.detail.value.signName;
sign['signEmail']=e.detail.value.signEmail;
sign['signMobile']=e.detail.value.signMobile;
var signList=new Array();
var sign ={'signName':e.detail.value.signName ,'signEmail':e.detail.value.signEmail ,"signMobile" : e.detail.value.signMobile};
var signList;
//获取缓存中的参会人员列表
dd.getStorage({
key: 'signList',
success: function(res) {
signList=res.data.signList;
sign['signId']=signList.length-1;
signList.push(sign);
// dd.alert({content: '获取成功:' + res.data.cityName});
},
fail: function(res){
sign['signId']=0;
signList.push(sign);
//dd.alert({content: res.errorMessage});
//console.log(res.data);
if(res.data==null) {
signList =[];
}else {
signList=res.data;
}
});
//添加参会人员
signList.push(sign);
//将新加的参会人员加入缓存中
dd.setStorage({
key: 'signList',
data: signList,
data:signList,
success: function() {
//提示添加成功
dd.alert({
title: '添加成功',
content: '添加成功',
buttonText: '确定',
success: () => {
_this.setData({
personNum: _this.data.personNum + 1,
signList,
});
// var signList2= _this.data.signList;
// signList2=signList;
_this.setData({
signList
})
//添加一个外部人员是否添加成功标
},
});
}
});
});
},
fail: function(res){
dd.alert({content: res.errorMessage});
}
});
// dd.setStorage({
// key:'issavevisitor',
// data:'1',
// success:function(){
// _this.setData({
// personNum: _this.data.personNum + 1,
// employeeList,
// });
// }
// })
// dd.alert({
// title: '添加成功',
// content: '添加成功',
// buttonText: '确定',
// success: () => {
// var employeeList= _this.data.employeeList;
// var emp={};
// emp['name'] = res.data.result.signName;
// emp['id'] = res.data.result.signId;
// emp['checked'] = true;
// employeeList[employeeList.length-1]=emp;
// //添加一个外部人员是否添加成功标识
// //console.log('employeeList---',_this.data.employeeList);
// },
// });
// if (e.detail.value.signMobile.length != 0) {
// var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
// var phone = e.detail.value.signMobile;
// if (!phoneReg.test(phone)) {
// dd.alert({
// title: "添加失败",
// content: "手机格式错误",
// buttonText: '确定'
// })
// return false;
// }
// } else {
// dd.alert({
// title: "添加失败",
// content: "手机不为空",
// buttonText: '确定'
// });
// return false;
// }
// if (e.detail.value.signEmail.length!=0 ) {
// var reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
// var email = e.detail.value.signEmail;
// if (!reg.test(email)) {
// dd.alert({
// title: "添加失败",
// content: "邮箱格式错误",
// buttonText: '确定'
// });
// return false;
// }
// } else {
// dd.alert({
// title: "添加失败",
// content: "邮箱不为空",
// buttonText: '确定'
// });
// return false;
// }
dd.httpRequest({
url: addExSignUrl,
......@@ -75,15 +161,64 @@ Page({
signMobile: e.detail.value.signMobile,
signEmail: e.detail.value.signEmail,
signName: e.detail.value.signName,
// dd.httpRequest({
// url: addExSignUrl,
// method: 'POST',
// data: {
// mid: _this.data.mid,
// signMobile: e.detail.value.signMobile,
// signEmail: e.detail.value.signEmail,
// signName: e.detail.value.signName,
},
dataType: 'json',
// },
// dataType: 'json',
success: function(res) {
// success: function(res) {
console.log('success----', res)
if (res.data.success) {
//console.log("预定成功");
dd.alert({
title: '添加成功',
content: '添加成功',
buttonText: '确定',
success: () => {
var employeeList= _this.data.employeeList;
var emp={};
emp['name'] = res.data.result.signName;
emp['id'] = res.data.result.signId;
emp['checked'] = true;
employeeList.push(emp);
// console.log('success----', res)
// if (res.data.success) {
_this.setData({
personNum: _this.data.personNum + 1,
employeeList,
});
//console.log('employeeList---',_this.data.employeeList);
},
});
// } else {
// dd.showToast({
// type: 'fail',
// content: res.data.message,
// duration: 3000,
// success: () => {
// // dd.navigateTo({
// // url: '../index/index'
// // });
// },
// });
// }
// var employeeList= _this.data.employeeList;
......@@ -119,8 +254,17 @@ Page({
complete: function(res) {
dd.hideLoading();
}
// },
// fail: function(res) {
// console.log("httpRequestFail---", res)
// dd.alert({ content: JSON.stringify(res) });
// },
// complete: function(res) {
// dd.hideLoading();
// }
});
// });
},
deleteSign:function (e){
......@@ -134,10 +278,51 @@ Page({
},
dataType: 'json',
var index=e.currentTarget.dataset.id;
var signList;
dd.getStorage({
key: 'signList',
success: function(res) {
// console.log('success----', res)
// console.log(res.data);
signList=res.data;
//删除参会人员
signList.splice(index,1);
// console.log("删除后的列表",signList)
//将新加的参会人员加入缓存中
dd.setStorage({
key: 'signList',
data:signList,
success: function() {
_this.setData({
signList
})
//添加一个外部人员是否添加成功标
}
});
},
fail: function(res){
dd.alert({content: res.errorMessage});
}
});
// dd.httpRequest({
// url: delExSignUrl,
// method: 'POST',
// data: {
// signId: e.currentTarget.dataset.id,
if (res.data.success) {
//console.log("预定成功");
const index = e.currentTarget.dataset.index;
......@@ -166,9 +351,44 @@ Page({
complete: function(res) {
dd.hideLoading();
}
// },
// dataType: 'json',
// success: function(res) {
// // console.log('success----', res)
});
// if (res.data.success) {
// //console.log("预定成功");
// const index = e.currentTarget.dataset.index;
// var employeeList = _this.data.employeeList;
// employeeList = remove(employeeList, index);
// _this.setData({
// employeeList
// })
// } else {
// dd.showToast({
// type: 'fail',
// content: res.data.message,
// duration: 3000,
// success: () => {
// // dd.navigateTo({
// // url: '../index/index'
// // });
// },
// });
// }
// },
// fail: function(res) {
// console.log("httpRequestFail---", res)
// //dd.alert({ content: JSON.stringify(res) });
// },
// complete: function(res) {
// dd.hideLoading();
// }
// });
},
onLoad: function(query) {
......@@ -185,6 +405,18 @@ Page({
// employeeList:employeeList
// })
// }
var _this=this;
//获取是否已有添加外部人员记录
dd.getStorage({
key:'signList',
success:function(res){
var signList=res.data;
_this.setData({
signList
})
}
})
},
onReady(query) {
......@@ -193,14 +425,22 @@ Page({
onShow() {
// 页面显示
// this.onLoad()
// if(getCurrentPages().length >=3){
// console.log('执行执行-----');
// this.setData({
// //currentPage: 1,
// employeeList:[]
// })
// this.onLoad()
// }
if(getCurrentPages().length >=3){
console.log('执行执行-----');
this.setData({
//currentPage: 1,
employeeList:[]
})
this.onLoad()
}
},
onHide() {
// 页面隐藏
......
......@@ -3,10 +3,10 @@ let app = getApp();
let domain = app.globalData.domain;
//获取用户信息的url
let url = domain + "/dingding/login";
let conferenceUrl = domain + "/dingding/conferenceList"
let myinfoUrl = domain +"/dingding/myinfo"
Page({
let conferenceUrl = domain + "/dingding/conferenceList";
let myinfoUrl = domain +"/dingding/myinfo";
Page({
data: {
corpId: '',
authCode: '',
......
......@@ -255,6 +255,7 @@ Page({
// 生命周期函数--监听页面加载
var _this = this;
var userId = app.globalData.userId
this.setData({
mid:query.mid,
cnum:query.cnum
......
......@@ -69,7 +69,7 @@
<button class="btn1" a:if="{{mymessage.configValueId == 1}}" size='mini' type='primary'>正在会议</button>
<button class="btn1" a:if="{{mymessage.configValueId == 3}}" size='mini' type='warn'>暂停</button>
<button class="btn1" a:if="{{mymessage.configValueId == 2}}" size='mini' type='default'>未开始</button>
<button class="btn2" size='mini' data-date="{{dates}}" data-conference-name="{{mymessage.conference.conferenceName}}" data-message-password="{{mymessage.messagePassword}}" data-mid="{{mymessage.messageId}}" data-minutesCode="{{conference.minutesCode}}" type='primary' onTap="meetjy">会议纪要</button>
<button class="btn2" size='mini' data-date="{{dates}}" data-conference-name="{{mymessage.conference.conferenceName}}" data-message-password="{{mymessage.messagePassword}}" data-mid="{{mymessage.messageId}}" data-minutes-code="{{mymessage.conference.minutesCode}}" type='primary' onTap="meetjy">会议纪要</button>
</view>
</view>
<view class="tr">
......
......@@ -24,7 +24,7 @@
<view class="tr btn">
<view class="td td1">
<text>会议操作:</text>
<button class="btn1" size='mini' data-mid="{{history.messageId}}" data-minutesCode="{{conference.minutesCode}}" type='primary' onTap="summary">会议纪要</button>
<button class="btn1" size='mini' data-mid="{{history.messageId}}" data-minutes-code="{{history.conference.minutesCode}}" type='primary' onTap="summary">会议纪要</button>
<button class="btn3" size='mini' data-mid="{{history.messageId}}" data-message-name="{{history.messageName}}" data-conference-name="{{history.conference.conferenceName}}"
data-message-compere="{{history.messageCompere}}" data-topic-list="{{history.topicList}}" data-start-time="{{history.startTimeFormat}}" data-end-time="{{history.endTimeFormat}}"
data-department="{{history.department}}" data-message-content="{{history.messageContent}}" data-config-value-id-string="{{history.configValueIdString}}" type='default' onTap="details">详细信息</button>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论