Commit 3061cbc4 by fengzhaoyu

Merge branch 'release/2.0.0' of https://gitlab.mingwork.com/fengzhaoyu/schedule into release/2.0.0

parents b077ea55 328ffc6c
...@@ -288,3 +288,10 @@ export function setRead(meetingId) { ...@@ -288,3 +288,10 @@ export function setRead(meetingId) {
url: `/meet/comment/read?meetingId=${meetingId}&platform=dingTalk` url: `/meet/comment/read?meetingId=${meetingId}&platform=dingTalk`
}) })
} }
export function previewOssFile(fileId) {
return $http({
method: 'get',
url: `/meet/fileDetail?objectName=${fileId}`
})
}
\ No newline at end of file
...@@ -112,11 +112,11 @@ ...@@ -112,11 +112,11 @@
background: url(../../assests/pdf.png) center /100% 100% !important; background: url(../../assests/pdf.png) center /100% 100% !important;
} }
.png, .jpg, .svg, .jpeg { .png, .jpg, .svg, .jpeg, .picture {
background: url(../../assests/image.png) center /100% 100% !important; background: url(../../assests/image.png) center /100% 100% !important;
} }
.docx, .txt, .doc, .pages, .wps { .docx, .txt, .doc, .pages, .wps, .file {
background: url(../../assests/docx.png) center /100% 100% !important; background: url(../../assests/docx.png) center /100% 100% !important;
} }
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
</view> </view>
<view class="file-list {{customClass}}" a:for="{{fileList}}"> <view class="file-list {{customClass}}" a:for="{{fileList}}">
<view class="file-box {{isCanDelete ? 'file-box-close': ''}}" catchTap="preview" data-file="{{item}}"> <view class="file-box {{isCanDelete ? 'file-box-close': ''}}" catchTap="preview" data-file="{{item}}">
<view class="file-icon {{item.mimeType}}"></view> <view a:if="{{item.platform === 'oss'}}" class="file-icon {{item.fileType}}"></view>
<view a:else class="file-icon {{item.mimeType}}"></view>
<view class="file-title"> <view class="file-title">
<text>{{item.name.slice(0, item.name.length - 5)}}</text> <text>{{item.name.slice(0, item.name.length - 5)}}</text>
<text>{{item.name.slice(-5)}}</text> <text>{{item.name.slice(-5)}}</text>
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
import create from 'dd-store'; import create from 'dd-store';
import { renderSize } from "../../utils/utils" import { renderSize } from "../../utils/utils"
import pageStore from '../../pages/meetingDetail/store'; import pageStore from '../../pages/meetingDetail/store';
import { uploadPermissions } from '../../api/request.js' import { uploadPermissions, previewOssFile } from '../../api/request.js'
import openLink from "dingtalk-jsapi/api/biz/util/openLink";
create.Component({ create.Component({
store: pageStore, store: pageStore,
...@@ -57,8 +58,26 @@ create.Component({ ...@@ -57,8 +58,26 @@ create.Component({
if (!this.props.isPreview) { if (!this.props.isPreview) {
return return
} }
const file = e.target.dataset.file const file = e.target.dataset.file
console.log(file) console.log(file)
if (file.platform === 'oss') {
if (file.webUrl) {
dd.previewImage({
current: 0,
urls: [
file.webUrl
],
});
} else {
// 预览文件
previewOssFile(encodeURIComponent(file.fileId)).then(res => {
openLink({
url: res.data.data.webUrl
});
})
}
} else {
let data = { let data = {
ddUserId: getApp().globalData.userid, ddUserId: getApp().globalData.userid,
type: 'download', type: 'download',
...@@ -75,6 +94,10 @@ create.Component({ ...@@ -75,6 +94,10 @@ create.Component({
fileType: file.mimeType, fileType: file.mimeType,
}) })
}) })
}
}, },
//显示操作框 //显示操作框
showOperate(e) { showOperate(e) {
......
/* 区域选择样式 */
.lableTreeBox {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .15);
display: flex;
align-items: flex-end;
z-index: 999;
}
.lableTreeContent {
width: 100%;
height: 527rpx;
background: #FFFFFF;
box-shadow: 0 -2rpx 20rpx 0 rgba(25, 31, 37, 0.12);
border-radius: 19rpx 19rpx 0px 0px;
}
.lableTreeHeader {
width: 100%;
height: 104rpx;
padding: 0 32rpx;
line-height: 104rpx;
font-size: 34rpx;
display: flex;
box-sizing: border-box;
border-bottom: 1px solid rgba(25, 31, 37, 0.12);
}
.lableTreeHeader>view {
flex: 1;
height: 104rpx;
}
.lableTreeHeader>view:nth-of-type(1) {
color: #191F25;
}
.lableTreeHeader>view:nth-of-type(2) {
color: #3296FA;
text-align: right
}
.lableTreeModal {
width: 100%;
padding-right: 32rpx;
box-sizing: border-box;
}
/* tree样式 */
.treeUl {
position: relative;
padding-left: 32rpx;
display: block;
box-sizing: border-box;
}
.treeLi {
display: block;
font-size: 28rpx;
line-height: 70rpx;
}
.treeName {
height: 70rpx;
font-size: 28rpx;
line-height: 70rpx;
width: 100%;
display: flex;
}
.labelIsShow {
width: 24rpx;
margin-right: 24rpx;
}
.treeLabel {
flex: 1;
display: flex;
padding-right: 32rpx;
box-sizing: border-box;
}
.treeLabel>view:nth-of-type(1) {
flex: 1;
}
.lableTreeChecked {
background: rgba(25, 31, 37, 0.05);
border-radius: 4rpx;
}
/* icon */
.labelIsShow .iconsanjiao {
font-size: 20rpx;
color: #D8D8D8;
}
.labelIsShow .iconsanjiao1 {
font-size: 20rpx;
color: #D8D8D8;
}
.labelIsShow .iconxuanzhong1 {
font-size: 32rpx;
color: #3296FA;
}
.treeLabel .iconchengshi- {
font-size: 24rpx;
margin-right: 16rpx;
color: #191F25;
}
.treeLabel .iconjiangzhu1 {
font-size: 24rpx;
margin-right: 16rpx;
color: #191F25;
}
.treeLabel .iconlouceng- {
font-size: 24rpx;
margin-right: 16rpx;
color: #191F25;
margin-left: 8rpx;
}
.treeLabel .iconjianzhu1 {
font-size: 24rpx;
margin-right: 16rpx;
color: #191F25;
}
.labelIsShow {
padding-left: 4rpx;
}
.cancelSelectAre {
font-size: 32rpx;
}
.sureSelectAre {
font-size: 32rpx;
}
\ No newline at end of file
<view class="lableTreeBox">
<view class="lableTreeContent">
<view class="lableTreeHeader">
<view class="cancelSelectAre" catchTap="cancelSelectAre">
取消
</view>
<view class="sureSelectAre" catchTap="sureSelectAre">
确定
</view>
</view>
<view class="lableTreeModal">
<scroll-view scroll-y="{{true}}" style="height: 422rpx;padding-top: 8rpx">
<view class="treeUl">
<block a:for="{{lableTree}}">
<view data-selectid="{{item.id}}" class="treeLi">
<view class="treeName {{ item.id===locationId ? 'lableTreeChecked' : '' }}">
<view class="labelIsShow" data-index="{{[index]}}" data-cycle="1" catchTap="onChangeStatus">
<text class="iconfont iconsanjiao" a:if="{{item.status}}"></text>
<text class="iconfont iconsanjiao1" a:elif="{{!item.status}}"></text>
</view>
<view class="treeLabel" data-id="{{item.id}}" data-name="{{item.name}}" data-cycle="1" catchTap="onChangeAreId">
<view>
<text class="iconfont iconchengshi-"></text><text style="font-size:28rpx">{{item.name}}</text>
</view>
<view a:if="{{item.id===locationId}}" style="color: #1890FF;">
<text class="iconfont iconxuanzhong1"></text>
</view>
</view>
</view>
<view a:if="{{item.children.length > 0 && item.status}}" class="treeUl">
<block a:for="{{item.children}}" a:for-index="index2" a:for-item="item2">
<view data-selectid="{{item2.id}}" class="treeLi">
<view class="treeName {{ item2.id===locationId ? 'lableTreeChecked' : '' }}">
<view class="labelIsShow" data-index="{{[index,index2]}}" data-cycle="2" catchTap="onChangeStatus">
<text class="iconfont iconsanjiao" a:if="{{item2.status}}"></text>
<text class="iconfont iconsanjiao1" a:elif="{{!item2.status}}"></text>
</view>
<view class="treeLabel" data-id="{{item2.id}}" data-name="{{item2.name}}" catchTap="onChangeAreId">
<view>
<text class="iconfont iconjianzhu1"></text><text style="font-size:28rpx">{{item2.name}}</text>
</view>
<view a:if="{{item2.id===locationId}}" style="color: #1890FF;">
<text class="iconfont iconxuanzhong1"></text>
</view>
</view>
</view>
</view>
<view a:if="{{item2.children.length > 0 && item2.status}}" class="treeUl" style="margin-left: 50rpx">
<block a:for="{{item2.children}}" a:for-index="index3" a:for-item="item3">
<view data-selectid="{{item3.id}}" class="treeLi">
<view class="treeName {{ item3.id===locationId ? 'lableTreeChecked' : '' }}">
<view class="treeLabel" data-id="{{item3.id}}" data-name="{{item3.name}}" catchTap="onChangeAreId">
<view>
<text class="iconfont iconlouceng-"></text><text style="font-size:28rpx">{{item3.name}}</text>
</view>
<view a:if="{{item3.id===locationId}}" style="color: #1890FF;">
<text class="iconfont iconxuanzhong1"></text>
</view>
</view>
</view>
</view>
</block>
</view>
</block>
</view>
</view>
</block>
</view>
</scroll-view>
</view>
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {
lableTree: [],
locationName: '全部区域',//区域name
locationId: '',// 区域id
},
props: {
locationName: '',//区域name
locationId: '',// 区域id
areTreeList: []
},
didMount() {
const addKey = data => data.map(item => ({
...item,
status: true,
children: addKey(item.children)
}))
const lableTree = addKey(this.props.areTreeList)
this.setData({
lableTree: lableTree,
locationId: this.props.locationId,
locationName: this.props.locationName,
})
},
didUpdate() {},
didUnmount() {},
methods: {
onChangeStatus(e) {
let index = e.target.dataset.index
let cycleTimes = e.target.dataset.cycle
if (cycleTimes == 1) {
let listStr = `lableTree[${index[0]}].status`
this.setData({
[listStr]: this.data.lableTree[index[0]].status ? false : true
})
} else if (cycleTimes == 2) {
let listStr = `lableTree[${index[0]}].children[${index[1]}].status`
this.setData({
[listStr]: this.data.lableTree[index[0]].children[index[1]].status ? false : true
})
}
// else if (cycleTimes == 3) {
// let listStr = `lableTree[${index[0]}].children[${index[1]}].children[${index[2]}].status`
// this.setData({
// [listStr]: this.data.lableTree[index[0]].children[index[1]].children[index[2]].status ? false : true
// })
// }
},
onChangeAreId(e){
this.setData({
locationId: this.data.locationId === e.target.dataset.id ? '' : e.target.dataset.id,
locationName: this.data.locationId === e.target.dataset.id ? '全部区域' : e.target.dataset.name
})
},
cancelSelectAre() {
let data = {
type: 'cancel'
}
this.props.onPropsCS(data)
},
sureSelectAre() {
let data = {
type: 'sure',
id: this.data.locationId,
name: this.data.locationName
}
this.props.onPropsCS(data)
}
},
});
{
"component": true,
"usingComponents": {
"pang-tree": "./selectArea"
}
}
\ No newline at end of file
export const globalUrl = "https://gateway-beta.mingwork.com"; export const globalUrl = "https://gateway-beta.mingwork.com";
export const globalUrl2 = "https://third-authentication.mingwork.com"; export const globalUrl2 = "https://third-authentication.mingwork.com";
export const version = 0.038;
...@@ -3,22 +3,22 @@ ...@@ -3,22 +3,22 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"dependencies": { "dependencies": {
"dd-store": { "dd-store": {
"version": "1.9.0", "version": "1.10.0",
"resolved": "https://registry.npm.taobao.org/dd-store/download/dd-store-1.9.0.tgz", "resolved": "https://registry.npm.taobao.org/dd-store/download/dd-store-1.10.0.tgz",
"integrity": "sha1-j1MeKLaZGRm8YKFxSPqeG7oUI5c=" "integrity": "sha1-//IEtd2pzssgUidYu0bo6FHUyQA="
}, },
"dingtalk-jsapi": { "dingtalk-jsapi": {
"version": "2.10.3", "version": "2.13.7",
"resolved": "https://registry.npm.taobao.org/dingtalk-jsapi/download/dingtalk-jsapi-2.10.3.tgz", "resolved": "https://registry.npm.taobao.org/dingtalk-jsapi/download/dingtalk-jsapi-2.13.7.tgz?cache=0&sync_timestamp=1603247662697&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdingtalk-jsapi%2Fdownload%2Fdingtalk-jsapi-2.13.7.tgz",
"integrity": "sha1-reXC+Fj0rEEUPSlK4XKzTvrrleI=", "integrity": "sha1-idfKKpylh6PxGnfuFPZp6XYCiHc=",
"requires": { "requires": {
"promise-polyfill": "^7.1.0" "promise-polyfill": "^7.1.0"
} }
}, },
"luxon": { "luxon": {
"version": "1.23.0", "version": "1.25.0",
"resolved": "https://registry.npm.taobao.org/luxon/download/luxon-1.23.0.tgz", "resolved": "https://registry.npm.taobao.org/luxon/download/luxon-1.25.0.tgz",
"integrity": "sha1-I7dIrQ8tVJTcTSh4wZJ4weZRQQw=", "integrity": "sha1-2GIZ6QvAECwOspnWWy9ele/h/nI=",
"optional": true "optional": true
}, },
"promise-polyfill": { "promise-polyfill": {
...@@ -27,18 +27,18 @@ ...@@ -27,18 +27,18 @@
"integrity": "sha1-qwUwHYwoU2MBYi1pInYyJppwyjs=" "integrity": "sha1-qwUwHYwoU2MBYi1pInYyJppwyjs="
}, },
"rrule": { "rrule": {
"version": "2.6.4", "version": "2.6.6",
"resolved": "https://registry.npm.taobao.org/rrule/download/rrule-2.6.4.tgz", "resolved": "https://registry.npm.taobao.org/rrule/download/rrule-2.6.6.tgz",
"integrity": "sha1-f08x/aErxySbsXbIkRCam8RI4DU=", "integrity": "sha1-cAMXJ9pKpkjqDcxSS26V9WWvBj4=",
"requires": { "requires": {
"luxon": "^1.21.3", "luxon": "^1.21.3",
"tslib": "^1.10.0" "tslib": "^1.10.0"
} }
}, },
"tslib": { "tslib": {
"version": "1.11.1", "version": "1.14.1",
"resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.11.1.tgz", "resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1602286854330&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz",
"integrity": "sha1-6xXRKIJ/vuKEFUnhcfRe0zisfjU=" "integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA="
} }
} }
} }
...@@ -223,7 +223,7 @@ create.Page({ ...@@ -223,7 +223,7 @@ create.Page({
location: { location: {
longitude: '10', longitude: '10',
latitude: '10', latitude: '10',
locationName: this.$store.data.locationName meetingRoomName: this.$store.data.locationName
}, },
startTime: this.$store.data.startTime.replace(/\//g, "-"), startTime: this.$store.data.startTime.replace(/\//g, "-"),
endTime: this.$store.data.endTime.replace(/\//g, "-"), endTime: this.$store.data.endTime.replace(/\//g, "-"),
......
...@@ -23,6 +23,7 @@ import { ...@@ -23,6 +23,7 @@ import {
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';
import { version } from '../../config';
// const webSocket = require('../../utils/websocket.js'); // const webSocket = require('../../utils/websocket.js');
const currentDate = new Date(); const currentDate = new Date();
...@@ -874,7 +875,7 @@ create.Page({ ...@@ -874,7 +875,7 @@ create.Page({
maxClickCount--; maxClickCount--;
if (maxClickCount == 0) { if (maxClickCount == 0) {
dd.alert({ dd.alert({
content: "0.0.26" content: version
}); });
maxClickCount = 5; maxClickCount = 5;
} }
......
...@@ -103,6 +103,14 @@ create.Page({ ...@@ -103,6 +103,14 @@ create.Page({
} }
this.update() this.update()
} }
if (this.$store.data.shouldUpdateShowTime) {
this.setData({
showTime: getShowTime(this.$store.data.startTime, this.$store.data.endTime)
})
this.$store.data.shouldUpdateShowTime = false;
this.update();
}
}, },
onLoad(event) { onLoad(event) {
console.log('onload') console.log('onload')
...@@ -156,6 +164,7 @@ create.Page({ ...@@ -156,6 +164,7 @@ create.Page({
planDate: res.data.data.planDate, planDate: res.data.data.planDate,
}, },
title: res.data.data.title, title: res.data.data.title,
mrReserveStatus: res.data.data.mrReserveStatus,
meetingRemark: res.data.data.remark, meetingRemark: res.data.data.remark,
isShowRemark: res.data.data.remark ? true : false, isShowRemark: res.data.data.remark ? true : false,
showTime: getShowTime(res.data.data.startTime.replace(/-/g, "/"), res.data.data.endTime.replace(/-/g, "/")), showTime: getShowTime(res.data.data.startTime.replace(/-/g, "/"), res.data.data.endTime.replace(/-/g, "/")),
...@@ -312,7 +321,7 @@ create.Page({ ...@@ -312,7 +321,7 @@ create.Page({
location: { location: {
longitude: '-999', longitude: '-999',
latitude: '-999', latitude: '-999',
locationName: this.$store.data.locationName meetingRoomName: this.$store.data.locationName
}, },
meetingRoomId: !!this.$store.data.roomId ? this.$store.data.roomId : -1 meetingRoomId: !!this.$store.data.roomId ? this.$store.data.roomId : -1
} }
...@@ -1289,7 +1298,8 @@ create.Page({ ...@@ -1289,7 +1298,8 @@ create.Page({
mask: true, mask: true,
type: 'remarkModal' type: 'remarkModal'
} }
}) });
this.handleCloseOperation();
}, },
getRemark(remark) { getRemark(remark) {
//是否发送通知 //是否发送通知
...@@ -1391,8 +1401,12 @@ create.Page({ ...@@ -1391,8 +1401,12 @@ create.Page({
export function fixSeperateIndex(index, list) { export function fixSeperateIndex(index, list) {
let separate = index; let separate = index;
if (list.length == 0) {
return -1;
}
if (separate === list.length - 1) { if (separate === list.length - 1) {
separate = -1; separate = -1;
} }
......
...@@ -54,10 +54,9 @@ ...@@ -54,10 +54,9 @@
</view> </view>
</scroll-view> </scroll-view>
<popup show="{{isShowModal}}" onClose="onCancel" position="bottom"> <popup show="{{isShowModal}}" onClose="onCancel" position="bottom">
<view onTap="onDetermine" class="picker-complete">完成</view>
<view a:if="{{!isShowCalendar}}" class="modalContent"> <view a:if="{{!isShowCalendar}}" class="modalContent">
<view class="modalHeader"> <!--<view class="modalHeader"><text onTap="onDetermine">确定</text></view> -->
<text onTap="onDetermine">确定</text>
</view>
<view class="modalTimeSlot"> <view class="modalTimeSlot">
<text a:if="{{!modalFooter.startTime || !modalFooter.endTime}}">请选择会议时间</text> <text a:if="{{!modalFooter.startTime || !modalFooter.endTime}}">请选择会议时间</text>
<text a:if="{{modalFooter.startTime && modalFooter.endTime}}">{{modalFooter.startTime}}至{{modalFooter.isOneDay ? modalFooter.endTime.substr(11,16):modalFooter.endTime}} 共{{modalFooter.allMinutes}}分钟</text> <text a:if="{{modalFooter.startTime && modalFooter.endTime}}">{{modalFooter.startTime}}至{{modalFooter.isOneDay ? modalFooter.endTime.substr(11,16):modalFooter.endTime}} 共{{modalFooter.allMinutes}}分钟</text>
......
...@@ -1270,6 +1270,9 @@ create.Page({ ...@@ -1270,6 +1270,9 @@ create.Page({
this.update(); this.update();
} }
} }
// 通知详情页面是否需要重新计算时间
this.$store.data.shouldUpdateShowTime = true;
this.update();
dd.navigateBack({ dd.navigateBack({
delta: 2 delta: 2
}); });
......
...@@ -100,7 +100,7 @@ create.Page({ ...@@ -100,7 +100,7 @@ create.Page({
location: { location: {
longitude: -999, longitude: -999,
latitude: -999, latitude: -999,
locationName: this.$store.data.locationName meetingRoomName: this.$store.data.locationName
}, },
meetingRoomId: this.$store.data.roomId, meetingRoomId: this.$store.data.roomId,
modifyModel: this.data.conSelectPopupData.selectPopupId, modifyModel: this.data.conSelectPopupData.selectPopupId,
......
...@@ -7,6 +7,7 @@ class Store { ...@@ -7,6 +7,7 @@ class Store {
roomId: '', roomId: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
shouldUpdateShowTime: false,
currentPeople: '', currentPeople: '',
originUsers: [], originUsers: [],
originalData: null, originalData: null,
......
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