Commit 02e8d73c by xiexiaoqin

feat

......@@ -264,4 +264,52 @@ export function isParticipate(data) {
data: JSON.stringify(data),
url: `/meet/schedule/confirm`
})
}
//会议室详情的获取动态列表
export function getMeetingRoomAffairs() {
return $http({
method: 'get',
url: `/meet/schedule/confirm`
})
}
//会议室创建新任务
export function createMeetingTask() {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule/confirm`
})
}
// 修改任务状态
export function updateTaskStatus() {
return $http({
method: 'put',
data: JSON.stringify(data),
url: `/meet/schedule/confirm`
})
}
// 修改任务标题
export function updateTaskTitle() {
return $http({
method: 'put',
data: JSON.stringify(data),
url: `/meet/schedule/confirm`
})
}
// 添加任务执行人
export function addTaskExcutor() {
return $http({
method: 'post',
data: JSON.stringify(data),
url: `/meet/schedule/confirm`
})
}
//删除任务
export function deleteMeetingTask() {
return $http({
method: 'delete',
data: JSON.stringify(data),
url: `/meet/schedule/confirm`
})
}
\ No newline at end of file
{
"pages": [
"pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList",
"pages/index/index",
"pages/editMeeting/editMeeting",
"pages/participantsDetail/participantsDetail",
......@@ -17,7 +19,6 @@
"pages/remind/remind",
"pages/scheduleDetail/scheduleDetail",
"pages/createOrEditSchedule/createOrEditSchedule",
"pages/attendeeList/attendeeList",
"pages/meetingDetail/meetingDetail"
"pages/attendeeList/attendeeList"
]
}
\ No newline at end of file
......@@ -4,7 +4,9 @@ Component({
data: {
show: false
},
props: {},
props: {
isCanEdit: true
},
didMount() {
},
didUpdate() {
......@@ -32,9 +34,11 @@ Component({
})
},
showOperate() {
this.setData({
show: true
})
if (this.props.isCanEdit) {
this.setData({
show: true
})
}
},
deleteFile(e) {
// let data = event.target.dataset.file.id
......
......@@ -7,7 +7,8 @@ picker-view .column {
font-size: 34rpx;
color: #191F25;
}
.pick-column{
.pick-column {
border-left: 100vw solid transparent;
}
......@@ -30,18 +31,18 @@ picker-view .column {
display: flex;
flex-direction: column;
padding: 16rpx 34rpx;
background: rgba(10,10,10,0.06);
background: rgba(10, 10, 10, 0.06);
border-radius: 8rpx;
margin-right:24rpx;
margin-right: 24rpx;
}
.tab>view>text {
color: rgba(10,10,10,0.4);
color: rgba(10, 10, 10, 0.4);
font-size: 28rpx;
}
.tab>view>text:nth-of-type(2) {
color: rgba(10,10,10,0.56);
color: rgba(10, 10, 10, 0.56);
font-size: 34rpx;
font-weight: bold;
line-height: 48rpx;
......@@ -49,11 +50,11 @@ picker-view .column {
.tab .active {
background: #fff;
border: 2rpx solid rgb(10,10,10);
border: 2rpx solid rgb(10, 10, 10);
}
.tab .active>text {
color: rgba(10,10,10,0.8);
color: rgba(10, 10, 10, 0.8);
}
.tab>.active>text:nth-of-type(2) {
......@@ -67,7 +68,7 @@ picker-view .column {
}
.coustom-end>text {
color: rgb(10,10,10);
color: rgb(10, 10, 10);
position: absolute;
font-size: 24rpx;
right: 32rpx;
......@@ -78,12 +79,4 @@ picker-view .column {
left: 32rpx;
right: auto;
color: red;
}
.picker-complete {
position: absolute;
color: rgb(10,10,10);
font-size: 32rpx;
right: 32rpx;
top: 32rpx;
}
\ No newline at end of file
......@@ -79,4 +79,12 @@
text-align: center;
font-size: 24rpx;
color: rgba(144, 161, 179, 0.56);
}
.picker-complete {
position: absolute;
color: rgb(10, 10, 10);
font-size: 32rpx;
right: 32rpx;
top: 32rpx;
}
\ No newline at end of file
@import "../../template/avater/index.acss";
@import "../../template/deleteBtn/index.acss";
@import "../../template/checkbox/index.acss";
.task-list {
border: 1rpx solid rgba(245, 246, 247, 1);
border-radius: 16rpx;
......@@ -33,85 +33,4 @@
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;
}
.checkbox {
border: 3rpx solid rgba(77, 217, 100, 1);
border-radius: 4rpx;
width: 28rpx;
height: 28rpx;
margin-right: 18rpx;
text-align: center;
line-height: 28rpx;
}
.checkbox-active>.iconfont {
color: rgba(77, 217, 100, 1);
font-size: 24rpx;
}
\ No newline at end of file
<import src="../../template/avater/index.axml"/>
<import src="../../template/deleteBtn/index.axml"/>
<import src="../../template/checkbox/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}}
<view class="task-title" data-pop="{{title: '会议任务', type: 'updateTask'}}" 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>
<template is="deleteBtn" data="{{title: '删除该任务' }}"/>
</popup>
<!-- checkbox模板 {status: status}-->
<template name="checkbox">
<view class="checkbox {{status ? 'checkbox-active': ''}}" data-status="{{status}}" onTap="CheckChange">
<text a:if="{{status}}" class="iconfont iconicon_ok"></text>
</view>
</template>
\ No newline at end of file
</view>
\ No newline at end of file
......@@ -8,37 +8,31 @@ Component({
currentTask: null,
// actionList: null
},
props: {},
props: {
isCanEdit: true
},
didMount() {
console.log(this.props)
},
didUpdate() {
},
didUnmount() { },
methods: {
showPop(e) {
this.setData({
currentTask: e.target.dataset.task,
show: true
})
if (this.props.isCanEdit) {
this.setData({
currentTask: e.target.dataset.task
});
this.props.onShowPop(e)
}
},
closePop() {
this.setData({
show: false
})
},
gotoParticipatorPage() {
dd.navigateTo({ url: `../../pages/attendeeList/attendeeList?userId=${this.data.currentTask.userId}` })
},
handleDelete() {
},
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);
this.props.onCheckChange(e.detail.value)
}
},
});
{
"component": true,
"usingComponents": {
"popup": "../popup/index"
"popup": "../popup/index",
"task-panel": "../taskPanel/taskPanel"
}
}
\ No newline at end of file
.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;
margin-bottom: 300rpx;
}
.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;
}
.error {
color: red;
font-size: 24rpx;
flex: 1;
}
\ No newline at end of file
<import src="../../template/avater/index.axml"/>
<import src="../../template/deleteBtn/index.axml"/>
<import src="../../template/checkbox/index.axml"/>
<view a:if="{{action == 'create'}}" class="picker-complete" onTap='complete'>完成</view>
<view class="task-column edit-column">
<template a:if="{{action == 'update'}}" is="checkbox" data="{{status: currentTask.status}}"></template>
<input onBlur="inputChange" value="{{currentTask.title}}" placeholder="请输入任务标题"/>
</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" data-userId="{{currentTask.userId}}" onTap="handleExcutorChange"></text>
</view>
<view class="participator-bottom">
<view class="people">
<template is="avater" data="{{item: currentTask}}"/>
<view class="name">{{currentTask.username}}</view>
</view>
</view>
<template a:if="{{action == 'update'}}" is="deleteBtn" data="{{title: '删除该任务' }}"/>
\ No newline at end of file
Component({
mixins: [],
data: {
task: {
title: '',
excutor: ''
}
},
props: {
currentTask: {},
action: 'update'
},
didMount() {
console.log(this.props)
},
didUpdate() { },
didUnmount() { },
methods: {
//编辑才有
CheckChange(e) {
const status = e.target.dataset.status;
if (status !== this.props.currentTask.status) {
this.props.onCheckChange(status);
}
},
inputChange(e) {
//更新操作立即保存
const value = e.detail.value;
if (this.props.action === 'update') {
if (value !== this.props.currentTask.title) {
return this.props.onInputChange(e.detail.value);
}
}
// 创建操作保存到data
if (value) {
this.setData({
'task.title': value
});
}
},
handleExcutorChange(e) {
const userId = e.target.dataset.userId;
//执行人页面可删除执行人
if (userId) {
dd.navigateTo({ url: `../../pages/excutorList/excutorList?userId=${userId}&action=${this.props.action}` })
}
//参会人列表页面可选择参会人
else {
dd.navigateTo({ url: `../../pages/attendeeList/attendeeList?action=${this.props.action}` })
}
},
//新建才有完成按钮
complete() {
const { task } = this.data;
if (!task.title) {
return
}
console.log(task)
this.props.onComplete(task)
},
//删除任务
handleDelete() {
dd.confirm({
title: '删除任务',
content: '确认删除任务吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (res) => {
if (res.confirm) {
this.props.onDeleteTask(task)
}
}
})
}
},
});
{
"component": true
}
\ No newline at end of file
import create from 'dd-store';
import pageStore from '../meetingDetail/store';
import { addTaskExcutor } from '/api/request';
create.Page({
store: pageStore,
data: {
$data: null,
participatorList: null,
userId: null
$data: {
participatorList: null,
},
action: '',
excutor: '' //store
},
onLoad(query) {
const { user, action } = query;
console.log('onLoad')
console.log(this)
console.log(query)
this.setData({
...query
})
},
radioChange(e) {
//我要通知上一个页面状态变化了,页面和组件共享状态
const userId9 = e.target.dataset.userId;
this.setData({
userId: e.target.dataset.userId
}, () => {
dd.navigateBack();
})
userId
});
//更新页面,执行添加执行人操作
if (this.data.action == 'update') {
addTaskExcutor().then(res => {
getMeetingRoomAffairs().then(res => {
this.store.data.affairList = res.data.data;
this.update();
})
})
}
// 创建页面保存选中的执行人
else if (this.data.action == 'create') {
this.store.data.excutor = userId;
this.update();
dd.navigateBack();
}
}
});
@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-right: 16rpx;
}
.name {
font-size: 34rpx;
color: #191F25;
border-bottom: 2rpx solid rgba(25, 31, 37, 0.12);
flex: 1;
height: 100%;
line-height: 112rpx;
}
.name>.iconfont {
float: right;
margin-right: 40rpx;
color: rgba(27, 38, 61, 0.5);
}
\ No newline at end of file
<import src="../../template/avater/index.axml"/>
<view class="column">
<template is="avater" data="{{item}}"/>
<view class="name">{{item.username}}
<text class="iconfont iconicon_close" onTap="deleteExcutor"></text>
</view>
</view>
\ No newline at end of file
Page({
data: {},
onLoad() { },
deleteExcutor() {
dd.confirm({
title: '删除执行人',
content: '确认删除执行人吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (res) => {
if (res.confirm) {
dd.navigateBack();
}
}
})
}
});
{}
\ No newline at end of file
......@@ -59,41 +59,6 @@ page {
margin-left: 32rpx;
}
/* .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);
font-size: 28rpx;
line-height: 28rpx;
margin-bottom: 14rpx;
position: relative;
display: flex;
align-items: center;
} */
.task-box>.avater {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
background-color: rgba(21, 188, 131, 1);
background-position: center;
background-size: 100% 100%;
background-repeat: no-repeat;
position: absolute;
right: 14rpx;
top: 16rpx;
}
.checkbox {
border: 3rpx solid rgba(77, 217, 100, 1);
border-radius: 4rpx;
......@@ -102,43 +67,6 @@ page {
margin-right: 18rpx;
}
/* .task-list>.file-box {
position: relative;
padding: 10rpx 10px 10rpx 76rpx;
margin-bottom: 14rpx;
}
.file-box>.file-icon {
position: absolute;
width: 64rpx;
height: 64rpx;
background: rgba(246, 105, 100, 1);
left: 6rpx;
top: 10rpx;
}
.file-box>.file-title {
font-size: 28rpx;
color: rgba(25, 31, 37, 1);
display: flex;
}
.file-box>.file-title>text:first-child {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.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 {
background: #fff;
border-top: 2rpx solid rgba(25, 31, 37, 0.12);
......@@ -155,8 +83,13 @@ page {
.footer>view {
width: 35rpx;
height: 35rpx;
background: red;
margin: 0 38rpx;
font-size: 16rpx;
color: rgba(10, 10, 10, 0.56);
}
.footer>view>.iconfont {
font-size: 40rpx;
}
.footer>view:last-child {
......
<import src="../../template/avater/index.axml"/>
<view class="list">
<block a:for="{{actionList}}">
<block a:for="{{affairList}}">
<view a:if="{{item.logType == 'task'}}" class='compose-column'>
<view class="avater task-avater">
<text class="iconfont iconicon_task1"></text>
......@@ -9,7 +9,7 @@
会议任务
<text>{{item.createTime}}</text>
</view>
<task-list taskList="{{item.taskInfos}}" onInputChange="inputChange" onCheckChange="checkChange" onReload="reload"/>
<task-list onShowPop="showPop" taskList="{{item.taskInfos}}" onCheckChange="checkChange"/>
</view>
<view a:if="{{item.logType == 'asseory'}}" class='compose-column'>
<template is="avater" data="{{item}}"/>
......@@ -26,8 +26,17 @@
</block>
</view>
<view class="footer">
<view></view>
<view></view>
<view onTap="showPop" data-pop="{{title: '创建任务', type: 'createTask'}}">
<text class="iconfont iconicon_data"></text>任务</view>
<view>
<text class="iconfont iconicon_data"></text>文件</view>
<text class="devider"></text>
<view></view>
</view>
\ No newline at end of file
<view>
<text class="iconfont iconicon_data"></text></view>
</view>
<popup show="{{show}}" onClose="closePop" title="{{pop.title}}">
<!-- 任务创建弹出框 -->
<task-panel a:if="{{pop.type === 'createTask'}}" onComplete="Complete" action='create'/>
<!-- 任务修改弹出框 -->
<task-panel a:if="{{pop.type === 'updateTask'}}" action='update' currentTask="{{currentTask}}" onDeleteTask="deleteTask" onInputChange="inputChange" onCheckChange="checkChange"/>
</popup>
\ No newline at end of file
import create from 'dd-store';
import pageStore from './store';
import { getMeetingRoomAffairs, createMeetingTask, deleteMeetingTask, updateTaskTitle, updateTaskStatus } from '../../api/request';
create.Page({
store: pageStore,
data: {
$data: null,
actionList: null
affairList: null, //store
show: false, //pop
pop: {
title: '',
type: ''
}
},
onLoad() {
this.reload();
console.log(this)
},
//点击任务
checkChange() {
this.store.data.actionList.push({
content: '我下覅按时覅偶唉好烦'
});
this.update();
},
//修改任务标题
inputChange() {
this.store.data.actionList.push({
content: '我修改了人物表图'
});
this.update();
},
//获取动态列表
reload() {
this.store.data.actionList = [{
// getMeetingRoomAffairs().then(res => {
// this.store.data.affairList = res.data.data;
// this.update();
// })
this.store.data.affairList = [{
id: 1, content: '大actionList鹏13::00创建了会议', logType: ''
},
{
......@@ -50,6 +45,47 @@ create.Page({
]
}
];
this.update();
},
showPop(e) {
this.setData({
pop: e.target.dataset.pop,
show: true
})
},
closePop() {
this.setData({
show: false
})
},
//修改任务标题
inputChange(value) {
console.log(value);
updateTaskTitle({}).then(res => {
this.reload();
})
},
//修改任务状态
CheckChange(value) {
console.log(value)
updateTaskStatus({}).then(res => {
this.reload();
})
},
//创建任务完成
Complete(data) {
console.log(data)
const excutor = this.store.data.excutor;
console.log(this.store.data)
createMeetingTask(data).then(res => {
if (res.data.data.success) {
this.reload();
this.closePop();
}
})
},
deleteTask() {
deleteMeetingTask({}).then(res => {
this.reload();
})
}
});
{
"window": {
"defaultTitle": "会议详情"
"title": "会议详情"
},
"usingComponents": {
"popup": "../../components/popup/index",
"task-list": "../../components/taskList/taskList",
"file-list": "../../components/fileList/fileList"
"file-list": "../../components/fileList/fileList",
"task-panel": "../../components/taskPanel/taskPanel"
}
}
\ No newline at end of file
class Store {
data = {
actionList: []
affairList: [],
excutor: ''
}
}
export default new Store()
\ No newline at end of file
.checkbox {
border: 3rpx solid rgba(77, 217, 100, 1);
border-radius: 4rpx;
width: 28rpx;
height: 28rpx;
margin-right: 18rpx;
text-align: center;
line-height: 28rpx;
}
.checkbox-active>.iconfont {
color: rgba(77, 217, 100, 1);
font-size: 24rpx;
}
\ No newline at end of file
<!-- checkbox模板 {status: status}-->
<template name="checkbox">
<view class="checkbox {{status ? 'checkbox-active': ''}}" data-status="{{status}}" onTap="CheckChange">
<text a:if="{{status}}" class="iconfont iconicon_ok"></text>
</view>
</template>
\ No newline at end of file
.delete-task-wrap {
display: flex;
justify-content: center;
margin: 300rpx auto 34rpx;
margin-bottom: 34rpx;
}
.delete-task {
......
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