Commit 29505c32 by fengzhaoyu

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

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