提交 606f1305 authored 作者: zhenglide's avatar zhenglide

解决议题bug

上级 87499493
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
</view> </view>
<view class='item-avatar-xs'> <view class='item-avatar-xs'>
<text>添加议题:</text> <text>添加议题:</text>
<input type='text' placeholder='输入议题' name="topicList[0]" /> <input type='text' placeholder='输入议题' onInput="inputTopic" data-index="{{0}}" name="topicList[0]" />
<image src='../../../resource/images/add.png' onTap='addList'></image> <image src='../../../resource/images/add.png' onTap='addTopic'></image>
</view> </view>
<view class="item-avatar-xs" a:for="{{lists}}" a:key="{{index}}"> <view class="item-avatar-xs" a:for="{{topicList.length-1}}" a:key="{{index}}" >
<view class='add'> <view class='add' >
<input type='text' placeholder='输入议题' name="topicList[{{index+1}}]" /> <input type='text' placeholder='输入议题' onInput="inputTopic" data-index="{{index+1}}" name="topicList[{{index+1}}]" />
<image src='../../../resource/images/off.png' onTap='delList'></image> <image src='../../../resource/images/off.png' onTap='delTopic'></image>
</view> </view>
</view> </view>
<view class='item-avatar-xs'> <view class='item-avatar-xs'>
......
...@@ -18,7 +18,7 @@ Page({ ...@@ -18,7 +18,7 @@ Page({
noticeList: [{ name: 'dingding', value: '钉钉' }, { name: 'wechat', value: '微信' }, { name: 'mailbox', value: '邮箱' }, { name: 'note', value: '短信' }], noticeList: [{ name: 'dingding', value: '钉钉' }, { name: 'wechat', value: '微信' }, { name: 'mailbox', value: '邮箱' }, { name: 'note', value: '短信' }],
showView: false, showView: false,
dates: dateFtt("yyyy-MM-dd", new Date()), dates: dateFtt("yyyy-MM-dd", new Date()),
lists: [{}], topicList: [""],
text: '', text: '',
cnum:'', cnum:'',
departments:'全体', departments:'全体',
...@@ -150,6 +150,8 @@ var _this=this; ...@@ -150,6 +150,8 @@ var _this=this;
}) })
return false; return false;
} }
var topicList=this.data.topicList;
console.log(this.data.topicList);
dd.httpRequest({ dd.httpRequest({
url: addmeetingeUrl, url: addmeetingeUrl,
method: 'POST', method: 'POST',
...@@ -162,7 +164,7 @@ var _this=this; ...@@ -162,7 +164,7 @@ var _this=this;
userId: app.globalData.userId, userId: app.globalData.userId,
messageName: e.detail.value.messageName, messageName: e.detail.value.messageName,
messageCompere: e.detail.value.messageCompere, messageCompere: e.detail.value.messageCompere,
topicList: e.detail.value.topicList, topicList: topicList,
messageContent: e.detail.value.messageContent, messageContent: e.detail.value.messageContent,
remindMethod : e.detail.value.remindMethod, remindMethod : e.detail.value.remindMethod,
remindTime: e.detail.value.remindTime, remindTime: e.detail.value.remindTime,
...@@ -555,22 +557,32 @@ console.log(e.currentTarget.dataset.hour); ...@@ -555,22 +557,32 @@ console.log(e.currentTarget.dataset.hour);
}, },
//添加议题 //添加议题
addList: function() { addTopic: function() {
var lists = this.data.lists; var topicList = this.data.topicList;
var newData = {}; var newData ="";
lists.push(newData);//实质是添加lists数组内容,使for循环多一次 topicList.push(newData);//实质是添加lists数组内容,使for循环多一次
this.setData({ this.setData({
lists: lists, topicList: topicList,
}) })
}, },
//删除议题 //删除议题
delList: function() { delTopic: function() {
var lists = this.data.lists; var topicList = this.data.topicList;
lists.pop(); //实质是删除lists数组内容,使for循环少一次 topicList.pop(); //实质是删除lists数组内容,使for循环少一次
this.setData({ this.setData({
lists: lists, topicList: topicList,
}) })
}, },
inputTopic:function (e){
// console.log(e);
var topicList = this.data.topicList;
var index= e.currentTarget.dataset.index;
topicList[index]=e.detail.value;
this.setData({
topicList
})
console.log( this.data.topicList)
},
//时间 //时间
modaltime: function() { modaltime: function() {
this.setData({ this.setData({
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</view> </view>
<view class="row"> <view class="row">
<label style="width:30%">会议议题</label> <label style="width:30%">会议议题</label>
<label style="width:68%">{{message.topicList}}</label> <label style="width:68%">{{topicStr}}</label>
</view> </view>
<view class="row"> <view class="row">
<label style="width:30%">会议开始时间</label> <label style="width:30%">会议开始时间</label>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</view> </view>
<view class="row"> <view class="row">
<label style="width:30%">部门</label> <label style="width:30%">部门</label>
<label style="width:68%">{{message.department}}</label> <label style="width:68%">{{message.department == null ||message.department == 'null' ? " " : message.department}}</label>
</view> </view>
<view class="row"> <view class="row">
<label style="width:30%">会议内容</label> <label style="width:30%">会议内容</label>
......
let app=getApp();
//替换成开发者后台设置的安全域名
let domain = app.globalData.domain;
let getTopicListUrl = domain + "/dingding/getTopicList";
Page({ Page({
data: { data: {
message:null message:null,
topicStr:""
}, },
...@@ -23,6 +28,38 @@ Page({ ...@@ -23,6 +28,38 @@ Page({
message message
}) })
var _this=this;
dd.httpRequest({
url: getTopicListUrl,
method: 'POST',
data: {
mid:query.mid
},
dataType: 'json',
success: function(res) {
console.log('success----议题', res)
var topicStr = _this.data.topicStr;
var topicList= res.data.result;
for(var i=0 ;i<topicList.length;i++){
topicStr +=topicList[i].topicName +" "
}
_this.setData({
topicStr
});
},
fail: function(res) {
console.log("httpRequestFail---", res)
// dd.alert({ content: JSON.stringify(res) });
},
complete: function(res) {
dd.hideLoading();
}
});
}, },
onShow() { onShow() {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<view class="td td1"> <view class="td td1">
<text>会议操作:</text> <text>会议操作:</text>
<button class="btn1" size='mini' data-mid="{{history.messageId}}" type='primary' onTap="summary">会议纪要</button> <button class="btn1" size='mini' data-mid="{{history.messageId}}" type='primary' onTap="summary">会议纪要</button>
<button class="btn3" size='mini' data-message-name="{{history.messageName}}" data-conference-name="{{history.conference.conferenceName}}" <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-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> data-department="{{history.department}}" data-message-content="{{history.messageContent}}" data-config-value-id-string="{{history.configValueIdString}}" type='default' onTap="details">详细信息</button>
<button class="btn2" size='mini' type='default' data-message-name="{{history.messageName}}" data-message-compere="{{history.messageCompere}}" data-topic-list="{{history.topicList}}" <button class="btn2" size='mini' type='default' data-message-name="{{history.messageName}}" data-message-compere="{{history.messageCompere}}" data-topic-list="{{history.topicList}}"
......
...@@ -68,7 +68,7 @@ Page({ ...@@ -68,7 +68,7 @@ Page({
// console.log(e.currentTarget.dataset.messageName); // console.log(e.currentTarget.dataset.messageName);
dd.navigateTo({ dd.navigateTo({
url: '/pages/meeting/details/details?messageName=' + e.currentTarget.dataset.messageName + '&conferenceName=' + e.currentTarget.dataset.conferenceName url: '/pages/meeting/details/details?mid='+e.currentTarget.dataset.mid+'&messageName=' + e.currentTarget.dataset.messageName + '&conferenceName=' + e.currentTarget.dataset.conferenceName
+ "&messageCompere=" + e.currentTarget.dataset.messageCompere+ "&topicList=" + e.currentTarget.dataset.topicList + "&startTime=" + e.currentTarget.dataset.startTime + "&messageCompere=" + e.currentTarget.dataset.messageCompere+ "&topicList=" + e.currentTarget.dataset.topicList + "&startTime=" + e.currentTarget.dataset.startTime
+ "&endTime=" + e.currentTarget.dataset.endTime + "&department=" + e.currentTarget.dataset.department + "&messageContent=" + e.currentTarget.dataset.messageContent + "&endTime=" + e.currentTarget.dataset.endTime + "&department=" + e.currentTarget.dataset.department + "&messageContent=" + e.currentTarget.dataset.messageContent
+ "&configValueIdString=" + e.currentTarget.dataset.configValueIdString + "&configValueIdString=" + e.currentTarget.dataset.configValueIdString
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论