Commit 29505c32 by fengzhaoyu

fix:修改会议动态点进去报会议不存在

parent a08d618c
......@@ -259,4 +259,11 @@ export function previewOss(data) {
method: "get",
url: `/meet/meeting-log-resource/generateIDocViewFileUrl?fileId=${data}`
});
}
// 根据id 换取 会议室
export function getDeviceBySn(data) {
return $http({
method: "get",
url: `/meet/meeting-room-device/getDeviceBySn?deviceSn=${data}`
});
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ create.Component({
this.getData();
}
},
didUnmount() {},
didUnmount() { },
methods: {
getData() {
let data = {
......
......@@ -24,6 +24,8 @@ Component({
});
},
checkChange(e) {
// console.log(e.target.dataset)
let { status, id, groupId, scheduleId } = e.target.dataset;
if (status == "0") {
status = "1";
......
import { addSchedule, getUserScheduleInTime } from '../../api/request.js'
import { addSchedule, getUserScheduleInTime, getDeviceBySn } from '../../api/request.js'
import { throttle, getInterTime } from './../../utils/utils.js'
import { checkFullScren } from "../../utils/checkFullScren";
import create from 'dd-store'
import pageStore from '../meetingDetail/store';
create.Page({
store: pageStore,
data: {
$data: null,
relatedAppPlatform: null,
// 传给组件list 的所有数据 comListData
comListData: {
repeatList: [
......@@ -65,7 +67,15 @@ create.Page({
Complete(data) {
this.closePop();
},
onLoad() {
onLoad(query) {
if (query && query.sn) {
getDeviceBySn(query.sn).then(res => {
if (res.data.code === 0) {
this.$store.data.locationName = res.data.data.meetingRooomFullName
this.$store.data.roomId = res.data.data.meetingRoomId
}
})
}
dd.setNavigationBar({
title: `创建会议`
})
......
......@@ -93,19 +93,22 @@ create.Page({
}
},
onLoad(query) {
console.log(JSON.stringify(query));
console.log('query')
// if (query && JSON.stringify(query) !== "{}") {
// this.setData({
// listLoading: false
// });
// const scheduleItem = JSON.parse(Object.keys(query)[0].split("=")[1]);
// dd.navigateTo({
// url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
// JSON.stringify(scheduleItem)
// )}`
// });
// }
if (query && query.sn) {
this.setData({
listLoading: false
});
dd.navigateTo({ url: `./../createMeeting/createMeeting?sn=${query.sn}` });
} else if (query && JSON.stringify(query) !== "{}" && !query.sn) {
this.setData({
listLoading: false
});
const scheduleItem = JSON.parse(Object.keys(query)[0].split("=")[1]);
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(scheduleItem)
)}`
});
}
this.isNeverShowSchedulePage = true;
//获取动态列表s
this.getPages(1);
......@@ -356,6 +359,7 @@ create.Page({
},
//动态修改状态
onChangeTaskStatusOnList(e) {
// console.log(e)
const data = {
groupId: e.groupId,
scheduleId: e.scheduleId,
......@@ -371,6 +375,7 @@ create.Page({
let dataIndex1 = "";
let dataIndex2 = "";
this.data.dynamicList.forEach((item, index) => {
if (item.scheduleId === e.scheduleId) {
dataIndex1 = index;
item.meetingLogDataList.forEach((it, index2) => {
......@@ -381,6 +386,7 @@ create.Page({
}
});
const setData = `dynamicList[${dataIndex1}].meetingLogDataList[${dataIndex2}].meetingLogResource.taskStatus`;
// console.log(setData)
this.setData({
[setData]: e.status
});
......@@ -803,8 +809,9 @@ create.Page({
dd.navigateTo({ url: "./../createMeeting/createMeeting" });
},
nextDetail: throttle(function (e) {
console.log(e.target.dataset)
const { item } = e.target.dataset;
const scheduleItem = { scheduleId: item.id || item.scheduleId, scheduleTemplateId: item.scheduleTemplateId, planDate: item.planDate }
const scheduleItem = { scheduleId: item.scheduleId || item.id, scheduleTemplateId: item.scheduleTemplateId, planDate: item.planDate }
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(JSON.stringify(scheduleItem))}`
});
......@@ -885,7 +892,7 @@ create.Page({
maxClickCount--;
if (maxClickCount == 0) {
dd.alert({
content: "0.0.30"
content: "0.0.31"
});
maxClickCount = 5;
}
......
......@@ -116,9 +116,9 @@ create.Page({
},
onShow() {
// this.conflictPeople()
this.store.data.fileInfos = []
this.store.data.description = ''
this.update()
// this.store.data.fileInfos = []
// this.store.data.description = ''
// this.update()
setTimeout(() => {
this.update()
}, 100)
......@@ -1638,15 +1638,14 @@ create.Page({
},
// 上传oss文件
async addOssFile() {
this.store.data.description = '';
this.store.data.fileInfos = null;
uploadOss().then(res => {
if (!!res) {
this.store.data.fileInfos = res
this.update()
dd.navigateTo({ url: `./../uploadFile/uploadFile` })
}
// dd.alert({
// content: JSON.stringify(res)
// })
})
},
......
......@@ -8,7 +8,7 @@ class Store {
taskStatus: '',
taskInfos: null
},
fileInfos: [],
fileInfos: null,
description: '',
oldFileInfos: '',
oldDescription: '',
......
......@@ -7,7 +7,7 @@ import { uploadOss } from '../meetingDetail/uploadFile';
create.Page({
store: pageStore,
data: {
fileInfos: [], //store
fileInfos: null, //store
description: '',//store
id: ''
},
......@@ -26,6 +26,7 @@ create.Page({
}
},
onShow() {
this.update()
},
inputChange: debounce(function (e) {
const value = e.detail.value;
......@@ -39,6 +40,7 @@ create.Page({
uploadOss().then(res => {
this.store.data.fileInfos.push(...res)
this.update();
})
// const data = {
// ddUserId: getApp().globalData.userid,
......@@ -100,6 +102,8 @@ create.Page({
data.id = this.data.id
updateMeetingTask(data).then(res => {
this.store.data.isNeedReloadList = true;
this.store.data.fileInfos = []
this.store.data.description = ''
this.update();
dd.navigateBack()
})
......
<!-- checkbox模板 {status: status}-->
<template name="checkbox">
<view class="checkbox {{status == '1' ? 'checkbox-active': ''}}" data-id="{{id}}" data-groupId="{{groupId}}" data-scheduleId="{{scheduleId}}" data-status="{{status}}" onTap="checkChange">
<!-- {{status}} -->
<text a:if="{{status == '1'}}" class="iconfont iconicon_ok"></text>
</view>
</template>
\ 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