Commit b1ba76f6 by fengzhaoyu

参会人的增删改

parent c976a1ed
node_modules/
\ No newline at end of file
{"tinyType":"dingtalk","tinyCnName":"钉钉","tinyProjectType":"dingtalk-biz","dingtalk:dingtalk-biz-isv:tinyIcon":"https://gw.alipayobjects.com/zos/rmsportal/mAzWuEDGpTlpugsPXgzf.svg","dingtalk:dingtalk-biz-isv:compilePreviewTime":"2020-02-05 11:55:36","dingtalk:dingtalk-biz-isv:compilePreviewWholePackSize":"18.9 KB","dingtalk:dingtalk-biz-isv:compilePreviewSubpackSizes":"","dingtalk:dingtalk-biz-isv:_appIdList":[{"orgName":"叶琴的体验团队","corpId":"ding1fc0618931c5be0a35c2f4657eb6378f","orgId":30571993,"apps":[{"miniAppName":"企业e卡通","bizType":1,"miniAppId":"2019082266405446","icon":"https://static.dingtalk.com/media/lALPDeC2uVA51FrMyMzI_200_200.png"}]},{"orgName":"爸爸的测试企业","corpId":"dingeb04d7fcad9041a435c2f4657eb6378f","orgId":94926075,"apps":[{"miniAppName":"明我会议室","bizType":1,"miniAppId":"2021000196656527","icon":"https://static.dingtalk.com/media/lADPDeC2usmAs3LMyMzI_200_200.jpg"}]},{"orgName":"明我mingwork","corpId":"dingc105456f10a5234f","orgLogo":"@lALPBY0V41nzq_PNAoDNAoA","orgId":5118349,"apps":[]},{"orgName":"亢建荣测试","corpId":"ding9a93ca550f036ffe35c2f4657eb6378f","orgId":39441482,"apps":[{"miniAppName":"mingpay","bizType":1,"miniAppId":"2019051664880184","icon":"https://static.dingtalk.com/media/lALPDeC2uFBmiNDMkMyQ_144_144.png"},{"miniAppName":"企业e卡通测试","bizType":1,"miniAppId":"2019080766135403","icon":"https://static.dingtalk.com/media/lALPDeC2ulRyREDMyMzI_200_200.png"},{"miniAppName":"明我会议室","bizType":1,"miniAppId":"2021001100624233","icon":"https://static.dingtalk.com/media/lALPDeC2uv2EoenMkMyQ_144_144.png"}]}],"dingtalk:dingtalk-biz-isv:preAuditLimit":5,"dingtalk:dingtalk-biz-isv:preAuditUsed":0,"dingtalk:dingtalk-biz-isv:uploadTime":"","dingtalk:dingtalk-biz-isv:packageSize":"","dingtalk:dingtalk-biz-isv:auditLink":null,"dingtalk:dingtalk-biz-isv:whiteListLink":null,"dingtalk:dingtalk-biz-isv:_enableAutoPush":false,"dingtalk:dingtalk-biz-isv:_appId":"2019080766135403","dingtalk:dingtalk-biz-isv:_appName":"企业e卡通测试","dingtalk:dingtalk-biz-isv:_orgId":39441482,"dingtalk:dingtalk-biz-isv:_corpId":"ding9a93ca550f036ffe35c2f4657eb6378f","dingtalk:dingtalk-biz-isv:remoteVersion":"0.0.23","dingtalk:dingtalk-biz-isv:currentVersion":"0.0.24","dingtalk:dingtalk-biz-isv:whiteList":["60.191.0.172","gateway-beta.mingwork.com","restapi.amap.com","mingpos.mingwork.com","139.196.213.18","60.191.0.166","192.168.1.101"],"dingtalk:dingtalk-biz-isv:h5WhiteList":[],"dingtalk:dingtalk-biz-isv:experCorpId":"dingb625cb941fe828d935c2f4657eb6378f","dingtalk:dingtalk-biz-isv:experCorpName":"亢建荣体验馆","dingtalk:dingtalk-biz:tinyIcon":"https://gw.alipayobjects.com/zos/rmsportal/mAzWuEDGpTlpugsPXgzf.svg","dingtalk:dingtalk-biz:compilePreviewTime":"2020-02-07 12:54:57","dingtalk:dingtalk-biz:compilePreviewWholePackSize":"42.5 KB","dingtalk:dingtalk-biz:compilePreviewSubpackSizes":"","dingtalk:dingtalk-biz:_appIdList":[{"orgName":"亢建荣测试","corpId":"ding9a93ca550f036ffe35c2f4657eb6378f","orgId":39441482,"apps":[{"miniAppName":"mingpay2","bizType":2,"miniAppId":"2019061465615005","icon":"https://static.dingtalk.com/media/lADPDeC2uJiDYQDNAZvNApI_658_411.jpg"}]}],"dingtalk:dingtalk-biz:preAuditLimit":5,"dingtalk:dingtalk-biz:preAuditUsed":0,"dingtalk:dingtalk-biz:uploadTime":"","dingtalk:dingtalk-biz:packageSize":"","dingtalk:dingtalk-biz:auditLink":null,"dingtalk:dingtalk-biz:whiteListLink":null,"dingtalk:dingtalk-biz:_enableAutoPush":false,"dingtalk:dingtalk-biz:_appId":"2019061465615005","dingtalk:dingtalk-biz:_appName":"mingpay2","dingtalk:dingtalk-biz:_orgId":"39441482","dingtalk:dingtalk-biz:_corpId":"ding9a93ca550f036ffe35c2f4657eb6378f","dingtalk:dingtalk-biz:remoteVersion":"0.0.33","dingtalk:dingtalk-biz:currentVersion":"0.0.34","dingtalk:dingtalk-biz:whiteList":["139.196.213.18"],"dingtalk:dingtalk-biz:h5WhiteList":[],"isSimulatorOpen":true,"isNotFirstToggleSimulator":true,"dingtalk:dingtalk-biz:lastZoom":125,"storageVersion":"1.5.7"}
\ No newline at end of file
{"configurations":{},"breakpoints":{"breakpointsEnabled":true,"breakpoints":{},"exceptionsBreakpoints":{}},"watchers":[],"storageVersion":"1.5.7"}
\ No newline at end of file
......@@ -2,4 +2,5 @@ require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../pages/createOrEditSchedule/createOrEditSchedule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/participantsDetail/participantsDetail?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
......@@ -30,6 +30,7 @@ if(AFAppX.registerApp) {
function success() {
require('../../app');
require('../../pages/createOrEditSchedule/createOrEditSchedule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/participantsDetail/participantsDetail?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
......
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/createOrEditSchedule/createOrEditSchedule"
}
};
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
importScripts(`https://appx/af-appx.worker.min.js`);
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../pages/createOrEditSchedule/createOrEditSchedule?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/participantsDetail/participantsDetail?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
{"layout":{"left":{"currentId":"explorer","size":310},"right":{"currentId":""},"bottom":{"currentId":"","size":280}},"storageVersion":"1.5.7"}
\ No newline at end of file
{"OPENED_FILE":["file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.axml","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/participantsDetail/participantsDetail.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/participantsDetail/participantsDetail.axml","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/stores/exampleStore.js","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/participantsDetail/participantsDetail.js","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.js","file:///Users/zhaoyufeng/Desktop/work/schedule/app.js","file:///Users/zhaoyufeng/Desktop/work/schedule/.gitignore","file:///Users/zhaoyufeng/Desktop/work/schedule/stores/example","file:///Users/zhaoyufeng/Desktop/work/schedule/app.json","file:///Users/zhaoyufeng/Desktop/work/schedule/font/iconfont.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/font/iconfont.svg","file:///Users/zhaoyufeng/Desktop/work/schedule/font/demo.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/font/iconfont.ttf","file:///Users/zhaoyufeng/Desktop/work/schedule/font/iconfont.js","file:///Users/zhaoyufeng/Desktop/work/schedule/font/iconfont.eot","file:///Users/zhaoyufeng/Desktop/work/schedule/app.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/index/index.axml","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.json","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/index/index.js","file:///Users/zhaoyufeng/Desktop/work/schedule/snapshot.png"],"SEARCH_WORD":["a:fo"],"storageVersion":"1.5.7"}
\ No newline at end of file
{"grid":{"editorGroup":{"uris":["file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.js","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/participantsDetail/participantsDetail.axml","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/participantsDetail/participantsDetail.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/participantsDetail/participantsDetail.js","file:///Users/zhaoyufeng/Desktop/work/schedule/app.js","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.acss","file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.axml","file:///Users/zhaoyufeng/Desktop/work/schedule/stores/exampleStore.js"],"current":"file:///Users/zhaoyufeng/Desktop/work/schedule/pages/createOrEditSchedule/createOrEditSchedule.axml","previewIndex":-1}},"storageVersion":"1.5.7"}
\ No newline at end of file
{
"pages": [
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/participantsDetail/participantsDetail",
"pages/index/index"
],
"window": {
......
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"dd-store": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/dd-store/-/dd-store-1.8.3.tgz",
"integrity": "sha512-++BcwtpK0m57fAvv4bl9lc5Fc23TQCmLVQYgaBG2fKh2eY6WXURr6gg7crhAWiwEfFKa2waRE+ei4HHSSerYSw=="
}
}
}
......@@ -6,16 +6,24 @@ page {
color: #191F25;
}
::-webkit-scrollbar {
display: none
}
.parent {
display: flex
}
.theme {
border-top: 1rpx solid rgba(25, 31, 37, 0.12);
overflow: hidden;
/* overflow: hidden; */
background: #fff;
color: #191F25;
padding: 30rpx 32rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.theme input {
.theme input {
width: 100%;
padding-left: 0;
height: 52rpx;
......@@ -40,7 +48,7 @@ page {
height: 132rpx;
display: flex;
padding: 0;
/* overflow-y: hidden; */
}
.timeContainer {
......@@ -70,28 +78,39 @@ page {
}
.startTime {
background: #3296FA;
width: 355rpx;
text-indent: 32rpx;
color: white;
position: relative;
}
.selectTime {
background: #3296FA;
color: white;
}
.line {
height: 100%;
width: 132rpx;
background: #3296FA;
position: absolute;
right: -18rpx;
top: 0;
transform: rotate(45deg)
background: white;
top: 230.5rpx;
right: -6rpx;
width: 32rpx;
height: 32rpx;
transform: scaleY(3) translate(30%, -30px) rotate(45deg);
border-top: 1rpx solid #E3E4E4;
border-right: 1rpx solid #E3E4E4;
}
.selectLine {
background: #3296FA;
border: none;
}
.endTime {
text-indent: 75rpx;
}
.icon, .text {
width: 100%;
height: 100%;
line-height: 112rpx;
vertical-align: center;
......@@ -133,4 +152,105 @@ page {
background: #3296FA;
border: 1px solid rgba(25, 31, 37, 0.12);
border-radius: 48px;
}
.people {
height: 100%;
display: flex;
position: relative;
}
.peopleTop {}
.scrollPeople {
white-space: nowrap;
height: 100%;
overflow-x: scroll;
max-width: 400rpx;
}
.scrollPeople image,
.name {
text-align: center;
line-height: 58rpx;
font-size: 28rpx;
display: inline-block;
color: white;
margin: 27rpx 16rpx 27rpx 0;
width: 58rpx;
height: 58rpx;
border-radius: 50%;
vertical-align: top;
background: #3296FA;
}
.addPeople {
line-height: 58rpx;
margin-top: 27rpx;
color: rgba(25, 31, 37, 0.12);
margin-left: 8rpx;
width: 58rpx;
height: 58rpx;
text-align: center;
vertical-align: middle;
font-size: 72rpx;
border-radius: 50%;
}
.rightPeople {
position: absolute;
opacity: 0.56;
font-size: 28rpx;
color: #191F25;
right: 32rpx;
}
.rightPeople .iconyoujinru {
margin-left: 15rpx;
opacity: 1;
color: rgba(25, 31, 37, 0.40);
}
.imageGroup {
position: relative;
}
.conflictTip {
font-size: 24rpx;
text-align: center;
width: 19rpx;
line-height: 19rpx;
height: 19rpx;
display: inline-block;
border-radius: 50%;
background: #E60012;
position: absolute;
color: rgb(211, 190, 192);
bottom: 2rpx;
right: 13rpx;
}
.participants {
height: auto;
}
.tip {
width: 661rpx;
border-top: 1rpx solid rgba(25, 31, 37, 0.12);
height: 86rpx;
font-size: 28rpx;
white-space: nowrap;
line-height: 86rpx;
overflow-x: scroll;
}
.noConflict {
color: #3296FA;
}
.conflict {
color: #E60012;
}
.addParticipants {
width: 100%;
display: inline-block;
height: 100%;
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
</view>
<!-- 时间 -->
<view class="time">
<view class="startTime">
<view class="startTime {{timeStaus === '0' ? 'selectTime' : ''}}" data-timeStaus="0" onTap="selectTime">
<view class="timeContainer">
<view class="yearTime">
2月4日
......@@ -17,11 +17,9 @@
<view class="weekTime">
周三
</view>
<!-- <view class="line">
</view> -->
<!-- <view class="line {{!!timeStaus ? 'selectLine' : ''}}"> -->
</view>
<view class="endTime">
<view class="endTime {{timeStaus === '1' ? 'selectTime' : ''}}" data-timeStaus="1" onTap="selectTime">
<view class="timeContainer">
<view class="yearTime">
2月4日
......@@ -35,35 +33,62 @@
</view>
</view>
</view>
<!-- 地点 -->
<view class="place">
<view class="icon iconfont icondingwei">
</view>
<view class="text">
</view>
<!-- 地点 -->
<view class="place">
<view class="icon iconfont icondingwei">
</view>
<view class="text">
添加地点
</view>
</view>
<!-- 参会人 -->
<view class="participants">
<view class="icon iconfont iconcanhuiren1">
</view>
<view class="text">
添加参会人
</view>
</view>
<!-- 参会人 -->
<view class="participants">
<view class="icon iconfont iconcanhuiren1">
</view>
<!-- 提醒 -->
<view class="remind">
<view class="icon iconfont iconhuiqiantixing">
</view>
<view class="text">
<text>提前15分钟提醒</text>
<text class="close iconshanchu iconfont"></text>
<view class="text">
<view a:if="{{participants.length}}">
<view class="people">
<view class="scrollPeople" catchTap="nextPage">
<text class="imageGroup" a:for="{{participants}}" a:for-item="item">
<text>
<image a:if="{{!!item.avatar}}" mode="scaleToFill" src="{{item.avatar}}"/>
<text a:else class="name">{{item.name.substring(item.name.length - 2, item.name.length)}}</text>
</text>
<text class="conflictTip"></text>
</text>
</view>
<view class="addPeople iconfont icontianjia" onTap="addParticipants">
</view>
<view class="rightPeople">
<text>{{participants.length}}人</text>
<text class="iconfont iconyoujinru"></text>
</view>
</view>
<view class="tip">
<!--<text class="noConflict">
所有参与者都有空</text> -->
<text class="conflict">
叶琴、王梦琳、冯召玉、等9:30-10:00 会议冲突
</text>
</view>
</view>
<text class="addParticipants" a:else onTap="addParticipants">添加参会人</text>
</view>
<!-- 保存 -->
<view class="save">
<view>
</view>
<!-- 提醒 -->
<view class="remind">
<view class="icon iconfont iconfont iconhuiqiantixing">
</view>
<view class="text">
<text>提前15分钟提醒</text>
<text class="close iconshanchu iconfont"></text>
</view>
</view>
<!-- 保存 -->
<view class="save">
<view>
立即创建
</view>
</view>
</view>
</view>
\ No newline at end of file
Page({
data: {},
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {
timeStaus: '',
},
onLoad() {
console.log(this.store.data.participants)
dd.setNavigationBar({
title: '创建会议'
})
},
// 选择时间
selectTime(event) {
this.setData({
timeStaus: event.target.dataset.timeStaus
})
},
// 添加参会人
addParticipants() {
const _that = this
dd.complexChoose({
title: "选择参会人", //标题
multiple: true, //是否多选
limitTips: "超出了", //超过限定人数返回提示
maxUsers: 1000, //最大可选人数
pickedUsers: [], //已选用户
pickedDepartments: [], //已选部门
disabledUsers: [], //不可选用户
disabledDepartments: [], //不可选部门
requiredUsers: [], //必选用户(不可取消选中状态)
requiredDepartments: [], //必选部门(不可取消选中状态)
permissionType: "xxx", //可添加权限校验,选人权限,目前只有GLOBAL这个参数
responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) {
res.users.forEach((item, index)=> {
_that.store.data.participants.push(item)
})
_that.store.data.participants = _that.setArrary(_that.store.data.participants)
_that.update()
},
fail: function (err) {
}
})
},
// 跳转下一页
nextPage(event) {
dd.navigateTo({url:'./../participantsDetail/participantsDetail'})
},
// 数组去重
setArrary(arr, userId) {
console.log(arr)
let containt = {}
for (let x of arr) {
containt['id' + x.userId] = x
}
return Object.values(containt)
},
});
@import "../../font/iconfont.acss";
page {
background: #f6f6f6;
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #191F25;
padding-bottom: 128rpx;
}
.list {
background: #fff;
height: 112rpx;
line-height: 112rpx;
display: flex;
padding-left: 32rpx;
}
.headImg {
margin-right: 24rpx;
margin-top: 24rpx;
width: 64rpx;
height: 64rpx;
background: #3296FA;
border-radius: 50%;
overflow: hidden;
color: white;
line-height: 64rpx;
text-align: center;
}
.headImg image {
vertical-align: middle;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
}
.info {
width: 630rpx;
line-height: 112rpx;
height: 112rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
}
.close {
position: absolute;
right: 32rpx;
color: #D8D8D8;
}
.button {
position: fixed;
bottom: 0;
display: flex;
margin-left: 32rpx;
padding-bottom: 32rpx;
background: white;
}
.button view {
width: 335rpx;
height: 96rpx;
border: 1px solid #3296FA;
border-radius: 48px;
text-align: center;
line-height: 96rpx;
font-size: 36rpx;
}
.add {
color: #0080FF;
margin-right: 16rpx;
}
.button .save {
color: white;
background: #3296FA;
border: 1px solid rgba(25, 31, 37, 0.12);
}
\ No newline at end of file
<view>
<view class="list" a:for="{{participants}}" a:for-item="item">
<view class="headImg">
<image a:if="{{!!item.avatar}}" mode="scaleToFill" src="{{item.avatar}}"/>
<text a:else>{{item.name.substring(0, 1)}}</text>
</view>
<view class="info">
<text class="name">{{item.name}}</text>
<text class="close iconshanchu iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
</view>
</view>
<view class="button">
<view class="add" onTap="addParticipants">
添加参会人
</view>
<view class="save" onTap="saveInfo">
完成
</view>
</view>
</view>
\ No newline at end of file
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {
},
onLoad() {
dd.setNavigationBar({
title: `参会人(${this.store.data.participants.length}人)`
})
},
// 保存信息
saveInfo() {
dd.navigateBack({
delta: 1
})
},
// 添加参会人
addParticipants() {
const _that = this
dd.complexChoose({
title: "选择参会人", //标题
multiple: true, //是否多选
limitTips: "超出了", //超过限定人数返回提示
maxUsers: 1000, //最大可选人数
pickedUsers: [], //已选用户
pickedDepartments: [], //已选部门
disabledUsers: [], //不可选用户
disabledDepartments: [], //不可选部门
requiredUsers: [], //必选用户(不可取消选中状态)
requiredDepartments: [], //必选部门(不可取消选中状态)
permissionType: "xxx", //可添加权限校验,选人权限,目前只有GLOBAL这个参数
responseUserOnly: true, //返回人,或者返回人和部门
success: function (res) {
res.users.forEach((item, index) => {
_that.store.data.participants.push(item)
})
_that.store.data.participants = _that.setArrary(_that.store.data.participants)
_that.update()
dd.setNavigationBar({
title: `参会人(${_that.store.data.participants.length}人)`
})
},
fail: function (err) {
}
})
},
// 删除参会人
delParticipants(event) {
let userId = event.target.dataset.userId
console.log(event.target.dataset.userId)
this.store.data.participants.forEach((item, index) => {
if (userId === item.userId) {
this.store.data.participants.splice(index, 1)
this.update()
return
}
})
dd.setNavigationBar({
title: `参会人(${this.store.data.participants.length}人)`
})
},
// 数组去重
setArrary(arr, userId) {
console.log(arr)
let containt = {}
for (let x of arr) {
containt['id' + x.userId] = x
}
return Object.values(containt)
},
});
class Store {
data = {
participants: []
}
}
export default new Store()
\ No newline at end of file
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