From 6185c65a89648fd329a2125abbe6c8d95783d70e Mon Sep 17 00:00:00 2001 From: xiexiaoqin <xie.xiaoqin@mingwork.com> Date: Thu, 26 Mar 2020 10:15:35 +0800 Subject: [PATCH] feat: meetingdetail --- .kaitian/settings.json | 3 +++ app.js | 7 ++++++- app.json | 1 + components/popup/index.acss | 6 +++--- components/taskList/taskList.acss | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ components/taskList/taskList.axml | 36 ++++++++++++++++++++++++++++++++++++ components/taskList/taskList.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ components/taskList/taskList.json | 6 ++++++ pages/attendeeList/attendeeList.acss | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/attendeeList/attendeeList.axml | 8 ++++++++ pages/attendeeList/attendeeList.js | 26 ++++++++++++++++++++++++++ pages/attendeeList/attendeeList.json | 5 +++++ pages/meetingDetail/meetingDetail.acss | 40 ++++++++++++++++++++++++---------------- pages/meetingDetail/meetingDetail.axml | 86 ++++++++++++++++++++++++++++++++------------------------------------------------------ pages/meetingDetail/meetingDetail.js | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-------------- pages/meetingDetail/meetingDetail.json | 6 ++++-- pages/meetingDetail/store.js | 6 ++++++ stores/exampleStore.js | 12 +++++++++++- template/avater/index.acss | 6 ++++++ template/avater/index.axml | 8 ++++++++ 20 files changed, 464 insertions(+), 91 deletions(-) create mode 100644 .kaitian/settings.json create mode 100644 components/taskList/taskList.acss create mode 100644 components/taskList/taskList.axml create mode 100644 components/taskList/taskList.js create mode 100644 components/taskList/taskList.json create mode 100644 pages/attendeeList/attendeeList.acss create mode 100644 pages/attendeeList/attendeeList.axml create mode 100644 pages/attendeeList/attendeeList.js create mode 100644 pages/attendeeList/attendeeList.json create mode 100644 pages/meetingDetail/store.js create mode 100644 template/avater/index.acss create mode 100644 template/avater/index.axml diff --git a/.kaitian/settings.json b/.kaitian/settings.json new file mode 100644 index 0000000..cac0e10 --- /dev/null +++ b/.kaitian/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} \ No newline at end of file diff --git a/app.js b/app.js index aee005d..4a703ae 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,10 @@ +import { setGlobalStore } from 'dd-store'; +import exampleStore from './stores/exampleStore' +setGlobalStore(exampleStore); + App({ onLaunch(options) { + // 第一次打开 // options.query == {number:1} // console.info('App onLaunch'); @@ -15,7 +20,7 @@ App({ userid: '', name: '', // globalUrl:'https://gateway2.mingwork.com', // 线上地址 - globalUrl:'https://gateway-beta.mingwork.com' //beta地址 + globalUrl: 'https://gateway-beta.mingwork.com' //beta地址 // globalUrl:'http://139.196.213.18:9999' //beta地址 // globalUrl:'http://192.168.1.101:9999', //beta地址 // globalUrl:'http://192.168.1.102:9999' //beta地址 diff --git a/app.json b/app.json index c63cf4f..8548206 100644 --- a/app.json +++ b/app.json @@ -16,6 +16,7 @@ "pages/scheduleDetail/scheduleDetail", "pages/participantsDetail/participantsDetail", "pages/createOrEditSchedule/createOrEditSchedule", + "pages/attendeeList/attendeeList", "pages/meetingDetail/meetingDetail" ] } \ No newline at end of file diff --git a/components/popup/index.acss b/components/popup/index.acss index fc37fea..da16203 100644 --- a/components/popup/index.acss +++ b/components/popup/index.acss @@ -63,13 +63,14 @@ .fillet { background: #fff; border-radius: 16rpx 16rpx 0 0; + left: 0; } .close-icon { text-align: center; } -.close-icon > .iconfont { +.close-icon>.iconfont { color: #9599A2; font-size: 64rpx; } @@ -78,5 +79,4 @@ text-align: center; font-size: 24rpx; color: rgba(144, 161, 179, 0.56); -} - +} \ No newline at end of file diff --git a/components/taskList/taskList.acss b/components/taskList/taskList.acss new file mode 100644 index 0000000..c055f53 --- /dev/null +++ b/components/taskList/taskList.acss @@ -0,0 +1,135 @@ +@import "../../template/avater/index.acss"; +.task-list { + border: 1rpx solid rgba(245, 246, 247, 1); + border-radius: 16rpx; + border-radius: 16rpx; + padding: 14rpx 16rpx 0; + margin-top: 16rpx; +} + +.task-list>.task-box { + background: rgba(255, 255, 255, 1); + border-radius: 8rpx; + box-shadow: 0 0 8rpx 0rpx rgba(0, 0, 0, 0.04); + padding: 16rpx 26rpx; + color: rgba(27, 38, 61, 1); + margin-bottom: 14rpx; + position: relative; + display: flex; + align-items: center; +} + +.task-box>.task-title { + flex: 1; + font-size: 28rpx; + line-height: 28rpx; +} + +.task-box>.task-title>.avater { + width: 48rpx; + height: 48rpx; + position: absolute; + right: 14rpx; + top: 8rpx; + line-height: 48rpx; +} + +.task-column { + box-sizing: border-box; + padding: 0 42rpx 0 32rpx; + width: 100%; + display: flex; + align-items: center; +} + +.edit-column { + color: rgba(27, 38, 61, 1); + margin: 46rpx 0; + height: 84rpx; +} + +.edit-column input { + flex: 1; + margin-left: 8rpx; + font-size: 40rpx; + caret-color: #3070F2; + padding: 0; + height: 84rpx; +} + +.participator-top { + height: 62rpx; + line-height: 62rpx; +} + +.icon { + color: #1B263D; + font-size: 34rpx; +} + +.participator-title { + color: rgba(25, 31, 37, 1); + font-size: 34rpx; + flex: 1; + margin-left: 26rpx; +} + +.participator-bottom { + padding: 14rpx 42rpx 14rpx 96rpx; +} + +.people { + text-align: center; + width: 80rpx; + margin-right: 16rpx; +} + +.people>.avater { + width: 80rpx; + height: 80rpx; + line-height: 80rpx; + position: relative; +} + +.name { + font-size: 24rpx; + line-height: 40rpx; + color: rgba(25, 31, 37, 0.56); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.delete-task-wrap { + display: flex; + justify-content: center; + margin: 300rpx auto 34rpx; +} + +.delete-task { + border: 1rpx solid rgba(222, 222, 222, 1); + background: #fff; + border-radius: 48rpx; + color: rgba(27, 38, 61, 0.72); + font-size: 28rpx; + line-height: 64rpx; + padding: 0 34rpx; +} + +.delete-task .iconfont { + color: rgba(242, 86, 67, 1); + font-size: 28rpx; + margin-right: 18rpx; +} + +.checkbox { + border: 3rpx solid rgba(77, 217, 100, 1); + border-radius: 4rpx; + width: 28rpx; + height: 28rpx; + margin-right: 18rpx; +} + +.checkbox-active { + background: rgba(77, 217, 100, 1); +} \ No newline at end of file diff --git a/components/taskList/taskList.axml b/components/taskList/taskList.axml new file mode 100644 index 0000000..2d680c6 --- /dev/null +++ b/components/taskList/taskList.axml @@ -0,0 +1,36 @@ +<import src="../../template/avater/index.axml"/> +<view class="task-list"> + <view class="task-box" a:for='{{taskList}}'> + <template is="checkbox" data="{{status: item.status}}"></template> + <view class="task-title" onTap="showPop" data-task="{{item}}">{{item.title}} + <template is="avater" data="{{item}}"/> + </view> + </view> +</view> +<!-- 弹出框 --> +<popup show="{{show}}" onClose="closePop" title="会议任务"> + <view class="task-column edit-column"> + <template is="checkbox" data="{{status: currentTask.status}}"></template> + <input onBlur="inputChange" value="{{currentTask.title}}"/> + </view> + <view class="task-column participator-top"> + <text class="iconicon_attender1 iconfont icon"></text> + <text class="participator-title">执行人</text> + <text class="iconicon_open iconfont icon" onTap="gotoParticipatorPage"></text> + </view> + <view class="participator-bottom"> + <view class="people"> + <template is="avater" data="{{item: currentTask}}"/> + <view class="name">{{currentTask.username}}</view> + </view> + </view> + <view class="delete-task-wrap"> + <view class="delete-task" onTap="deleteTask"> + <text class="iconfont iconicon_noAgreed1"></text> + 删除该任务 + </view> + </view> +</popup> +<template name="checkbox"> + <view class="checkbox {{status ? 'checkbox-active': ''}}" data-status="{{status}}" onTap="CheckChange"></view> +</template> \ No newline at end of file diff --git a/components/taskList/taskList.js b/components/taskList/taskList.js new file mode 100644 index 0000000..cc8e425 --- /dev/null +++ b/components/taskList/taskList.js @@ -0,0 +1,44 @@ +// import create from 'dd-store'; +// import pageStore from '../../pages/meetingDetail/store'; +Component({ + // store: pageStore, + mixins: [], + data: { + show: false, + currentTask: null, + // actionList: null + }, + props: {}, + didMount() { + }, + didUpdate() { + }, + didUnmount() { }, + methods: { + showPop(e) { + this.setData({ + currentTask: e.target.dataset.task, + show: true + }) + }, + closePop() { + this.setData({ + show: false + }) + }, + gotoParticipatorPage() { + dd.navigateTo({ url: `../../pages/attendeeList/attendeeList?userId=${this.data.currentTask.userId}` }) + }, + deleteTask() { + + }, + inputChange(e) { + console.log(e.detail.value); + this.props.onInputChange(e.detail.value); + }, + CheckChange(e) { + const status = e.target.dataset.status; + this.props.onCheckChange(status); + } + }, +}); diff --git a/components/taskList/taskList.json b/components/taskList/taskList.json new file mode 100644 index 0000000..ed8d09e --- /dev/null +++ b/components/taskList/taskList.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "popup": "../popup/index" + } +} \ No newline at end of file diff --git a/pages/attendeeList/attendeeList.acss b/pages/attendeeList/attendeeList.acss new file mode 100644 index 0000000..d7a766f --- /dev/null +++ b/pages/attendeeList/attendeeList.acss @@ -0,0 +1,52 @@ +@import "../../template/avater/index.acss"; +page { + background: #fff; +} + +.column { + display: flex; + align-items: center; + width: 100%; + padding-left: 28rpx; + height: 112rpx; + box-sizing: border-box; +} + +.avater { + width: 80rpx; + height: 80rpx; + line-height: 80rpx; + margin-left: 44rpx; + margin-right: 16rpx; +} + +.radio { + width: 40rpx; + height: 40rpx; + border-radius: 50%; + text-align: center; + line-height: 40rpx; + box-sizing: border-box; +} + +.radio-uncheck { + border: 2rpx solid rgba(10, 10, 10, 0.4); +} + +.radio-checked { + background: #0F7DFF; +} + +.radio-checked>.iconfont { + color: #fff; + font-size: 28rpx; +} + +.name { + font-size: 34rpx; + color: #191F25; + border-bottom: 2rpx solid rgba(25, 31, 37, 0.12); + flex: 1; + height: 100%; + line-height: 112rpx; +} \ No newline at end of file diff --git a/pages/attendeeList/attendeeList.axml b/pages/attendeeList/attendeeList.axml new file mode 100644 index 0000000..9407957 --- /dev/null +++ b/pages/attendeeList/attendeeList.axml @@ -0,0 +1,8 @@ +<import src="../../template/avater/index.axml"/> +<view class="column" a:for="{{participatorList}}"> + <view class="radio {{item.userId == userId ? 'radio-checked' : 'radio-uncheck'}}" data-userId="{{item.userId}}" onTap="onCheckChange"> + <text a:if="{{item.userId == userId}}" class="iconfont iconicon_ok"></text> + </view> + <template is="avater" data="{{item}}"/> + <view class="name">{{item.username}}</view> +</view> \ No newline at end of file diff --git a/pages/attendeeList/attendeeList.js b/pages/attendeeList/attendeeList.js new file mode 100644 index 0000000..ff3f0d5 --- /dev/null +++ b/pages/attendeeList/attendeeList.js @@ -0,0 +1,26 @@ +import create from 'dd-store'; +import PageStore from '../meetingDetail/store'; + +create.Page({ + store: PageStore, + data: { + participatorList: null, + userId: null + }, + onLoad(query) { + console.log('onLoad') + console.log(this.store) + this.setData({ + ...query + }) + }, + onCheckChange(e) { + //我要通知上一个页面状态变化了,页面和组件共享状态 + this.setData({ + userId: e.target.dataset.userId + }, () => { + dd.navigateBack(); + }) + + } +}); diff --git a/pages/attendeeList/attendeeList.json b/pages/attendeeList/attendeeList.json new file mode 100644 index 0000000..8ea7056 --- /dev/null +++ b/pages/attendeeList/attendeeList.json @@ -0,0 +1,5 @@ +{ + "window": { + "defaultTitle": "任务执行人" + } +} \ No newline at end of file diff --git a/pages/meetingDetail/meetingDetail.acss b/pages/meetingDetail/meetingDetail.acss index 0f67444..7338d3a 100644 --- a/pages/meetingDetail/meetingDetail.acss +++ b/pages/meetingDetail/meetingDetail.acss @@ -21,7 +21,8 @@ page { position: relative; padding-left: 104rpx; } -.compose-column .desc{ + +.compose-column .desc { color: rgba(25, 31, 37, 1); font-size: 32rpx; line-height: 48rpx; @@ -87,7 +88,7 @@ page { top: 16rpx; } -.task-box>.checkbox { +.checkbox { border: 3rpx solid rgba(77, 217, 100, 1); border-radius: 4rpx; width: 28rpx; @@ -115,23 +116,27 @@ page { color: rgba(25, 31, 37, 1); display: flex; } -.file-box>.file-title >text:first-child{ + +.file-box>.file-title>text:first-child { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } -.file-box>.file-title >text:last-child{ + +.file-box>.file-title>text:last-child { white-space: nowrap; } + .file-box>.file-size { color: rgba(25, 31, 37, 0.56); font-size: 24rpx; line-height: 40rpx; } -.footer{ + +.footer { background: #fff; - border-top:2rpx solid rgba(25, 31, 37, 0.12); - height:94rpx; + border-top: 2rpx solid rgba(25, 31, 37, 0.12); + height: 94rpx; position: fixed; bottom: 0; left: 0; @@ -140,18 +145,21 @@ page { justify-content: flex-end; width: 100%; } -.footer >view{ + +.footer>view { width: 35rpx; - height:35rpx; + height: 35rpx; background: red; - margin:0 38rpx; + margin: 0 38rpx; } -.footer >view:last-child{ - margin:0 24rpx 0 0; + +.footer>view:last-child { + margin: 0 24rpx 0 0; } -.devider{ - background:rgba(227, 228, 228, 1); - height:48rpx; - width:1rpx; + +.devider { + background: rgba(227, 228, 228, 1); + height: 48rpx; + width: 1rpx; margin: 0 28rpx; } \ No newline at end of file diff --git a/pages/meetingDetail/meetingDetail.axml b/pages/meetingDetail/meetingDetail.axml index 83cf59c..8cc642d 100644 --- a/pages/meetingDetail/meetingDetail.axml +++ b/pages/meetingDetail/meetingDetail.axml @@ -1,67 +1,45 @@ <view class="list"> - <view class='simple-column'>大鹏创建了任务</view> - <view class='compose-column'> - <view class="avater"></view> - <view class="title"> + <block a:for="{{actionList}}"> + <view a:if="{{!item.logType}}" class='simple-column'>{{item.content}}</view> + <view a:if="{{item.logType == 'task'}}" class='compose-column'> + <view class="avater"></view> + <view class="title"> 会议任务 - <text>15分钟之前</text> - </view> - <view class="task-list"> - <view class="task-box"> - <view class="checkbox"></view> - 树立产品流程图 - <view class="avater"></view> - </view> - <view class="task-box"> - <view class="checkbox"></view> - 树立产品流程图 - <view class="avater"></view> + <text>{{item.createTime}}</text> </view> + <task-list taskList="{{item.taskInfos}}" onInputChange="inputChange" onCheckChange="checkChange" onReload="reload"/> </view> - </view> - <view class='compose-column'> - <view class="avater"></view> - <view class="title"> - 小雨 - <text>15分钟之前</text> - </view> - <view class="desc"> - 产品MVP核心流程中用后中用后 - </view> - <view class="task-list"> - <view class="file-box"> - <view class="file-icon"></view> - <view class="file-title"> - <text>产品MVP核心流程中用后中用后</text> - <text>汇总.pdf</text></view> - <view class="file-size">103kb</view> + <view a:if="{{item.logType == 'asseory'}}" class='compose-column'> + <view class="avater"></view> + <view class="title"> + {{item.creator}} + <text>{{item.createTime}}</text> </view> - <view class="file-box"> - <view class="file-icon"></view> - <view class="file-title"> - <text>产品MVP核心流程中用后中用后</text> - <text>汇总.pdf</text></view> - <view class="file-size">103kb</view> + <view class="desc"> + {{item.description}} + </view> + <view class="task-list"> + <view class="file-box"> + <view class="file-icon"></view> + <view class="file-title"> + <text>产品MVP核心流程中用后中用后</text> + <text>汇总.pdf</text></view> + <view class="file-size">103kb</view> + </view> + <view class="file-box"> + <view class="file-icon"></view> + <view class="file-title"> + <text>产品MVP核心流程中用后中用后</text> + <text>汇总.pdf</text></view> + <view class="file-size">103kb</view> + </view> </view> </view> - </view> - <view class='simple-column'>大鹏创建了任务</view> + </block> </view> <view class="footer"> <view></view> <view></view> <text class="devider"></text> <view></view> -</view> - -<button size="default" type="primary" onTap="showPop">Button</button> - -<popup - show="{{show}}" - onClose="closePop" - title="会议任务" -> -<view> - <view class="checkbox"></view>树立产品流程图 -</view> -</popup> \ No newline at end of file +</view> \ No newline at end of file diff --git a/pages/meetingDetail/meetingDetail.js b/pages/meetingDetail/meetingDetail.js index 4a10561..b428437 100644 --- a/pages/meetingDetail/meetingDetail.js +++ b/pages/meetingDetail/meetingDetail.js @@ -1,20 +1,54 @@ -Page({ +import create from 'dd-store'; +import pageStore from './store'; +create.Page({ + store: pageStore, data: { - show:false + $data: null, + actionList: null }, - onLoad() {}, - showPop(){ - this.setData({ - show: true - }) + onLoad() { + this.reload(); + console.log(this) }, - closePop(){ - this.setData({ - show: false - }) + //点击任务 + checkChange() { + + this.store.data.actionList.push({ + content: '我下覅按时覅偶唉好烦' + }); + this.update(); }, - Complete(data){ - console.log(data) - this.closePop(); + //修改任务标题 + inputChange() { + this.store.data.actionList.push({ + content: '我修改了人物表图' + }); + this.update(); + }, + reload() { + this.store.data.actionList = [{ + id: 1, content: '大actionList鹏13::00创建了会议', logType: '' + }, + { + id: 2, creator: '大鹏', createTime: '13::00', logType: 'asseory', + fileInfos: [{ + filename: '打算的你到哪搜点', fileSize: '1201' + }] + }, + { + id: 2, creator: '大鹏', createTime: '13::00', logType: 'task', + taskInfos: [ + { + status: false, + title: '梳理产品流程图', headUrl: '', username: 'name', userId: '1' + }, + { + status: true, + title: '梳理产品流程图2', headUrl: '', username: 'name2', userId: '2' + } + ] + } + ]; + this.update(); } }); diff --git a/pages/meetingDetail/meetingDetail.json b/pages/meetingDetail/meetingDetail.json index 3c53c9c..355dc79 100644 --- a/pages/meetingDetail/meetingDetail.json +++ b/pages/meetingDetail/meetingDetail.json @@ -1,7 +1,9 @@ { - "title": "会议详情", + "window": { + "defaultTitle": "会议详情" + }, "usingComponents": { "popup": "../../components/popup/index", - "meeting-time-picker": "../../components/meetingTimePicker/meetingTimePicker" + "task-list": "../../components/taskList/taskList" } } \ No newline at end of file diff --git a/pages/meetingDetail/store.js b/pages/meetingDetail/store.js new file mode 100644 index 0000000..fb6dfe7 --- /dev/null +++ b/pages/meetingDetail/store.js @@ -0,0 +1,6 @@ +class Store { + data = { + actionList: [] + } +} +export default new Store() \ No newline at end of file diff --git a/stores/exampleStore.js b/stores/exampleStore.js index 0ba6c62..0ee2383 100644 --- a/stores/exampleStore.js +++ b/stores/exampleStore.js @@ -1,6 +1,16 @@ class Store { data = { - participatorList: [], // 参会人列表 + participatorList: [ + { + status:true,username: 'Ceshi', userId: 1, headUrl: '', platform: 'dingtalk' + }, + { + status:false,username: 'Ceshi2', userId: 2, headUrl: '', platform: 'dingtalk' + }, + { + status:false,username: 'Ceshi3', userId: 3, headUrl: '', platform: 'dingtalk' + } + ], // 参会人列表 locationName: '', conflictPeople: [], participatorUserId: [], // 参会人的userId diff --git a/template/avater/index.acss b/template/avater/index.acss new file mode 100644 index 0000000..3a37104 --- /dev/null +++ b/template/avater/index.acss @@ -0,0 +1,6 @@ +.avater { + border-radius: 50%; + background: #3070F2; + color: white; + text-align: center; +} \ No newline at end of file diff --git a/template/avater/index.axml b/template/avater/index.axml new file mode 100644 index 0000000..7783a9c --- /dev/null +++ b/template/avater/index.axml @@ -0,0 +1,8 @@ +<!-- 头像处理 --> +<template name="avater"> + <view class="avater"> + <image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" /> + <text a:else>{{item.platform === "outlook" ? item.username.slice(0, 2) : item.username.slice(-2)}} + </text> + </view> +</template> \ No newline at end of file -- libgit2 0.26.0