<template>
|
<view class="uni-project-event-create">
|
<form class="task-form">
|
<view class="uni-panel-body">
|
<view class="uni-panel-h2" @click="clickSelProject">
|
<text>项目:</text>
|
<view class="uni-picker-input">{{prj.id ?prj.name : '. . .'}}</view>
|
</view>
|
<view class="uni-panel-h2">
|
<text>类型:</text>
|
<view class="uni-panel-quadrant" @click="clickType">
|
<view class="uni-panel-text" :style="{color:typeMenu[typeIndex].color}"> <text
|
:class="typeMenu[typeIndex].icon" :style="{padding:'0 4px'}">
|
</text>{{typeMenu[typeIndex].text}}</view>
|
</view>
|
</view>
|
<view class="uni-panel-h" @click="clickTitleVoice">
|
<text class="uni-panel-text">标题:</text>
|
<!-- <text class="uni-panel-icon fs-ArrowRight blue-text"></text> -->
|
</view>
|
<view class="uni-panel-c divider-bottom">
|
<input :focus="formData.titleFocus" name="title" comfirm-type="done" type="text"
|
v-model="form.title" placeholder="请输入标题" :maxlength="-1" />
|
</view>
|
<view class="uni-panel-h" @click="clickDescVoice">
|
<text class="uni-panel-text">描述:</text>
|
</view>
|
<view class="uni-panel-c divider-bottom">
|
<textarea auto-height fixed :focus="formData.descFocus" name="desc" comfirm-type="done"
|
show-confirm-bar="{{false}}" type="text" v-model="form.desc" placeholder="请详细描述你的问题和意见..."
|
:maxlength="-1" />
|
</view>
|
<view class="uni-panel-h" @click="clickAttachPanel">
|
<text class="uni-panel-text">附件:</text>
|
<view class="uni-panel-icon-btn fs-floder" v-if="isCanSelFile" @click="clickSelFile"></view>
|
<!-- v-if="isMobilePlatform" -->
|
<view class="uni-panel-icon-btn fu-yuyin" v-if="isVoiceRecord" @touchstart="voiceStart"
|
@touchmove.stop.prevent="voiceIng" @touchend="voiceEnd" @touchcancel="voiceCancel"></view>
|
<view class="uni-panel-icon-btn fs-picture" @click="clickChooseImage"></view>
|
<view v-if="isMobilePlatform" class="uni-panel-icon-btn fs-camera" @click="clickCamera"></view>
|
</view>
|
<view class="uni-panel-c">
|
<view class="uni-panel-upfile" v-if="attachFiles.length">
|
<view class="uni-panel-upfile-item" v-for="(item,index) in attachFiles"
|
:style="{background:item.color}" :key="index" @longpress="longpressPic(item,index)"
|
@click="openAattachFile(item)">
|
<view
|
v-if="!(item.isImg || item.isVideo|| item.isAudio)|| (( item.isImg|| item.isVideo|| item.isAudio) && !item.path)"
|
class="uni-panel-upfile-item-name">{{item.name}}</view>
|
<text v-if="!(item.isImg || item.isVideo|| item.isAudio)"
|
class="uni-panel-upfile-item-size">{{item.sizestr}}</text>
|
<image v-if=" (item.isImg && item.path)" class="uni-panel-upfile-img" :src="item.path"
|
mode="widthFix" />
|
<!-- <image v-if="item.isVideo" class="uni-panel-video-playIcon" src="@/static/play.png" mode="widthFix"></image> -->
|
<jvideo v-if="item.isVideo && item.path" :url="item.path" width="192rpx" height="192rpx"
|
:len="item.duration || 0"></jvideo>
|
|
<viewAudio v-if="item.isAudio && item.path" class="voice" :audioSrc="item.path"
|
:playingSrc="playAudioPath" :audioLen="item.duration || 0" @playVoice="playVoice(item)">
|
|
</viewAudio>
|
<text v-if="item.errMsg" class="uni-panel-icon fs-wrong"
|
style="position: absolute; bottom:5rpx; right: 5rpx; color: #fd3c46;"
|
@click="onErrInfo(item.errMsg)"></text>
|
<!-- #ifdef MP-WEIXIN -->
|
<circleProgressBar v-if="item.isUploading"
|
style="position: absolute; top: 50rpx; left: 50rpx;" :size="100" :border_width="16"
|
border_back_color='#ccc' background='#ffffff80' :pro="item.percent/100" />
|
<!-- #endif-->
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="uni-panel-body">
|
<view class="uni-panel-h2" style="padding: 2px 10px 2px 12px;">
|
<text class="uni-panel-text">负责人:</text>
|
<!-- <image v-if="executeUser.Login" class="uni-panel-user-img" :src="item.Img" @longpress="longPressExecuteUser">
|
</image> -->
|
<view class="uni-panel-user-item" style="margin: 0;" @longpress="longPressExecuteUser">
|
<image :src="executeUser.img" @error="imageExecuteUserError" />
|
<text>{{executeUser.name}}</text>
|
</view>
|
<text class="uni-panel-icon fs-add_circle blue-text" @click="clickExecuteUser"></text>
|
</view>
|
<view class="uni-panel-h" style="background-color: white;">
|
<text class="uni-panel-text">相关人:</text>
|
<text class="uni-panel-icon fs-add_circle blue-text" @click="clickRelUsers"></text>
|
</view>
|
<view class="uni-panel-c divider-bottom" style="padding:1px 8px;">
|
<view class="uni-panel-multi-user">
|
<view class="uni-panel-user-item" v-for="(item,index) in relUsers" :key="item.login"
|
@longpress="longPressRelUser(item,index)">
|
<image :src="item.img" @error="imageRelUserError(index)" />
|
<text>{{item.name}}</text>
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="uni-panel-body">
|
<view class="uni-panel-h2" @click="clickSelMonth">
|
<text>截止日期:</text>
|
<view class="uni-picker-input">{{dateDue ? dateDue : '. . .'}}</view>
|
</view>
|
<view class="uni-panel-h">
|
<text>紧急重要度:</text>
|
<view class="uni-panel-quadrant" @click="clickQuadrant">
|
<text class="uni-panel-text">{{quadrantMenu[quadrantIndex].text}}</text>
|
<view class="uni-panel-square" :style="{'background-color':quadrantMenu[quadrantIndex].color }">
|
</view>
|
</view>
|
</view>
|
</view>
|
</form>
|
<view class="button-clz">
|
<button class="uni-panel-button" @click="submitForm">提交</button>
|
</view>
|
|
<view class="uni-panel-safe-bottom" :style="{height:safeAreaBottom + 'px'}" />
|
<viewAudioRecord v-if="isVoiceRecord" ref="refAudioRecord" directionMoveCancel="left"
|
@recordEnd="recordVioceEnd"></viewAudioRecord>
|
<view>
|
<!-- 重要紧急度菜单 -->
|
<uni-popup ref="refPopupMenuQuadrant" background-color="#fff">
|
<view class="popup-content">
|
<view class="popup-content-menu-item2 divider-bottom" v-for="(item,index) in quadrantMenu"
|
:key="index" @click="menuQuadrantChange(item,index)">
|
<text class="uni-panel-square"
|
:style="{'background-color':item.color,'margin-right':'5px'}"></text>
|
{{item.text}}
|
</view>
|
<view class="popup-content-menu-item2" @click="closeMenuQuadrant">取消</view>
|
</view>
|
</uni-popup>
|
<!-- 类型菜单 -->
|
<uni-popup ref="refPopupMenuType" background-color="#fff">
|
<view class="popup-content">
|
<view class="popup-content-menu-item2 divider-bottom" v-for="(item,index) in typeMenu" :key="index"
|
:style="{color:item.color}" @click="menuTypeChange(item,index)"><text
|
class="popup-content-menu-ico" :class="item.icon"></text>
|
{{item.text}}
|
</view>
|
<view class="popup-content-menu-item2" @click="closeMenuType">取消</view>
|
</view>
|
</uni-popup>
|
<!-- 普通弹窗 -->
|
<uni-popup ref="refPopupCalendar" background-color="#fff">
|
<view class="popup-content" style="padding: 2px 4px 12px;">
|
<calendar class="container-fill" @confirm="confirmSelCalendar" @close="closeSelCalendar"></calendar>
|
</view>
|
</uni-popup>
|
<uni-popup ref="refPopupFileSel" background-color="#fff">
|
<view class="popup-content" style="padding: 2px 4px 12px;">
|
<view class="popup-content-menu-item2 divider-bottom" @click="clickSelMessageFile">从会话中选择</view>
|
<view class="popup-content-menu-item2 divider-bottom" @click="clickSelLocalFile">从本地文件选择</view>
|
<view class="popup-content-menu-item2" @click="closeFileSelPopup">取消</view>
|
</view>
|
</uni-popup>
|
<uni-popup ref="refPopupProject" background-color="#fff">
|
<view class="popup-content" style="padding: 2px 4px 12px;">
|
<view class="popup-content-header">
|
<view class="left" @click="closeSelProject"> 取消 </view>
|
<view class="right" @click="confirmSelProject">完成</view>
|
</view>
|
<view class="popup-content-body">
|
<view class="left">
|
<view class="popup-content-menu-item2 divider-bottom"
|
:class="prjListIndex == index ? 'selected' :'' " v-for="(item,index) in prjList"
|
:key="index" @click="menuPrjTypeChange(item,index)">
|
{{item.name}}
|
</view>
|
</view>
|
|
<view class="right" v-if="prjList[prjListIndex].list.length > 0">
|
<view class="popup-content-menu-item2 divider-bottom"
|
:class="prj.id == item.ID ? 'selected' :'' "
|
v-for="(item,index) in prjList[prjListIndex].list" :key="index"
|
@click="menuPrjChange(item,index)">
|
|
{{item.Name}}
|
</view>
|
</view>
|
<view class="right" v-else>
|
<view class="popup-content-menu-no-data ">无项目
|
</view>
|
</view>
|
</view>
|
|
|
</view>
|
</uni-popup>
|
</view>
|
|
|
</view>
|
|
</template>
|
|
|
<script>
|
import Session from "@/common/utils.js"
|
import TaskInit from "@/common/extend.js"
|
import {
|
showModal,
|
showToast,
|
showLoading,
|
hideLoading,
|
getCurUserId,
|
getCurUserName
|
} from "@/common/Page.js"
|
import {
|
create as prjEventCreate
|
} from "@/api/gungho/prjevent.js"
|
import {
|
getAnalysisList as projectGetAnalysisList,
|
} from "@/api/gungho/project.js"
|
import {
|
uploadFile,
|
downloadFileUrl,
|
downloadFileTask
|
} from "@/api/index.js"
|
|
import {
|
loginWxQy
|
|
} from "@/api/index.js"
|
import {
|
sendMsg
|
} from "@/api/gungho/index.js"
|
import circleProgressBar from '@/components/circle-progress-bar/circle-progress-bar.vue'
|
import calendar from '@/components/calendar/index.vue'
|
|
import jvideo from '@/components/j-video.vue'
|
import viewAudio from '@/components/audio.vue'
|
import viewAudioRecord from '@/components/audio-record.vue'
|
import {
|
Base64
|
} from 'js-base64';
|
|
// #ifndef MP-DINGTALK
|
const audioContext = uni.createInnerAudioContext();
|
// #endif
|
export default {
|
components: {
|
circleProgressBar,
|
calendar,
|
jvideo,
|
viewAudio,
|
viewAudioRecord
|
},
|
name: "pageProjectEventCreate",
|
data() {
|
return {
|
options: {},
|
isMobilePlatform: true,
|
isCanSelFile: false,
|
isVoiceRecord: false,
|
showLunar: false,
|
safeAreaBottom: getApp().globalData.safeAreaBottom,
|
fileUploadType: 1, //1表示minio服务
|
attachFiles: [],
|
form: {
|
project: '',
|
title: '',
|
desc: ''
|
},
|
formData: {
|
descFocus: false,
|
titleFocus: true
|
},
|
executeUser: {},
|
relUsers: [],
|
selUsertype: 0,
|
prjList: [{
|
name: '我关注的',
|
t: 4,
|
list: []
|
},
|
{
|
name: '我参与的',
|
t: 3,
|
list: []
|
},
|
{
|
name: '我负责的',
|
t: 1,
|
list: []
|
},
|
{
|
name: '我创建的',
|
t: 2,
|
list: []
|
},
|
{
|
name: '所有项目',
|
t: 0,
|
list: []
|
},
|
],
|
prjListIndex: 0,
|
prj: {
|
id: "",
|
name: ""
|
},
|
quadrantMenu: [{
|
text: "不重要不紧急",
|
color: "#5eac82"
|
}, {
|
text: "重要不紧急",
|
color: "#59b2e0"
|
}, {
|
text: "紧急不重要",
|
color: "#ffb11b"
|
}, {
|
text: "重要紧急",
|
color: "#ff6010"
|
}],
|
quadrantIndex: 0,
|
|
typeMenu: [{
|
text: "问题",
|
icon: "fs-question2",
|
color: "#ffac0c"
|
}, {
|
text: "错误",
|
icon: "fs-bug",
|
color: "#ea5610"
|
}, {
|
text: "需求",
|
icon: "fs-CirclPlus",
|
color: "#2dc3e8"
|
}, {
|
text: "建议",
|
icon: "fs-suggest",
|
color: "#60ae60"
|
}, {
|
text: "讨论",
|
icon: "fs-discuss",
|
color: "#aaa"
|
}],
|
typeIndex: 0,
|
|
dateDue: '',
|
startDate: TaskInit.dateUtils.format('start'),
|
endDate: TaskInit.dateUtils.getDate('end'),
|
playAudioPath: ""
|
|
}
|
},
|
methods: {
|
setData(obj) {
|
let that = this;
|
let keys = [];
|
let val, data;
|
|
Object.keys(obj).forEach(function(key) {
|
keys = key.split(".");
|
val = obj[key];
|
data = that.$data;
|
keys.forEach(function(key2, index) {
|
if (index + 1 == keys.length) {
|
that.$set(data, key2, val);
|
} else {
|
if (!data[key2]) {
|
that.$set(data, key2, {});
|
}
|
}
|
data = data[key2];
|
});
|
});
|
},
|
loadPlatform() {
|
this.isCanSelFile = false
|
this.isMobilePlatform = false
|
const app = getApp()
|
if (app.globalData.platform == "ios" || app.globalData.platform == "android") {
|
this.isMobilePlatform = true
|
if (uni.canIUse("getRecorderManager")) {
|
this.setData({
|
isVoiceRecord: true
|
});
|
}
|
}
|
// console.log("loadPlatform", app.globalData.osName)
|
if (app.globalData.osName == "ios") {
|
this.isCanSelFile = false
|
//#ifdef MP-WEIXIN
|
if (uni.canIUse('chooseMessageFile')) {
|
this.isCanSelFile = true
|
}
|
//#endif
|
}
|
},
|
imageExecuteUserError() {
|
console.log("imageExecuteUserError", )
|
this.executeUser.img = getApp().globalData.defaultuserphoto
|
},
|
|
imageRelUserError(index) {
|
console.log("imageRelUserError", index)
|
let item = this.relUsers[index]
|
item.img = getApp().globalData.defaultuserphoto
|
this.$set(this.relUsers, index, item)
|
},
|
|
|
menuPrjTypeChange(item, index) {
|
|
let list = this.prjList
|
if (list[index].isLoaded) {
|
this.setData({
|
prjListIndex: index
|
})
|
return
|
}
|
projectGetAnalysisList({
|
PrjRel: item.t
|
}).then((res) => {
|
let vue_datalist = res ? res.PrjList : [];
|
list[index].list = vue_datalist
|
list[index].isLoaded = true
|
this.setData({
|
prjListIndex: index,
|
prjList: list
|
})
|
|
}).catch((rej) => {
|
console.log("menuPrjTypeChange projectGetAnalysisList failed", rej)
|
this.showError(rej)
|
})
|
},
|
menuPrjChange(item, index) {
|
this.setData({
|
prj: {
|
id: item.ID,
|
name: item.Name
|
}
|
})
|
|
},
|
clickTitleVoice() {},
|
clickDescVoice() {
|
|
// console.log("clickDescVoice")
|
},
|
onErrInfo(errMsg) {
|
console.log("onErrInfo", errMsg)
|
showToast(errMsg, 'none')
|
},
|
playVoice(item) {
|
const _this = this
|
|
// #ifdef MP-DINGTALK
|
if (uni.canIUse("getBackgroundAudioManager")) {
|
|
const bgAudioManager = uni.getBackgroundAudioManager()
|
if (_this.playAudioPath == item.path) {
|
bgAudioManager.stop()
|
return
|
}
|
bgAudioManager.onError = (err) => {
|
console.log("播放语音失败", err)
|
_this.setData({
|
playAudioPath: ""
|
})
|
this.showError("播放语音失败," + JSON.stringify(err))
|
return
|
}
|
bgAudioManager.onStop = () => {
|
console.log("播放语音停止事件")
|
_this.setData({
|
playAudioPath: ""
|
})
|
return
|
}
|
bgAudioManager.onEnded = () => {
|
console.log("播放语音结束事件")
|
_this.setData({
|
playAudioPath: ""
|
})
|
return
|
}
|
_this.setData({
|
playAudioPath: item.path
|
})
|
bgAudioManager.title = '语音';
|
bgAudioManager.singer = '暂无';
|
bgAudioManager.src = item.path;
|
bgAudioManager.play()
|
}
|
// #endif
|
// #ifndef MP-DINGTALK
|
if (_this.playAudioPath == item.path) {
|
audioContext.stop()
|
return
|
}
|
audioContext.src = item.path;
|
_this.setData({
|
playAudioPath: item.path
|
})
|
_this.$nextTick(function() {
|
audioContext.play();
|
});
|
// #endif
|
},
|
|
longpressPic(item, index) {
|
var _this = this
|
showModal("确定要删除附件吗?", "提醒").then((res) => {
|
if (res) {
|
let attachs = _this.attachFiles
|
attachs.splice(index, 1)
|
_this.setData({
|
attachFiles: attachs
|
})
|
}
|
})
|
},
|
async openAattachFile(item) {
|
try {
|
|
var _this = this
|
if (!TaskInit.fileUtils.isCanPreviewType(item.name)) {
|
showToast("暂不支持此类型查看", "none")
|
return
|
}
|
|
if (TaskInit.fileUtils.isPictureType(item.name)) //文档
|
{
|
if (item.path) {
|
let arrImg = _this.getImgsUrl();
|
uni.previewImage({
|
current: item.path,
|
urls: arrImg,
|
})
|
return
|
}
|
_this.dldAndPreviewImg(item)
|
return
|
}
|
if (item.path) {
|
if (TaskInit.fileUtils.isDocumentType(item.name)) //文档
|
{
|
let aaa = item.name.toLowerCase().split('.');
|
let ftype = aaa.length > 0 ? aaa[aaa.length - 1] : aaa[0];
|
uni.openDocument({
|
fileType: ftype,
|
filePath: item.path,
|
success: function(res) {
|
console.log('打开文档成功');
|
},
|
fail: function() {
|
showToast("暂不支持此类型‘" + ftype + "’查看", "none", 5000)
|
}
|
})
|
}
|
if (TaskInit.fileUtils.isVideoType(item.name)) //文档
|
{
|
uni.navigateTo({
|
url: "/pages/common/videoPage?fileId=" + item.fileId + "&fileServer=" +
|
item.fileserver + "&name=" + item.name + "&url=" + encodeURIComponent(
|
item.path)
|
})
|
|
return
|
}
|
return
|
}
|
if (TaskInit.fileUtils.isVideoType(item.name)) //文档
|
{
|
item.path = await downloadFileUrl(item.fileId, item.name, item.fileserver)
|
|
uni.navigateTo({
|
url: "/pages/common/videoPage?fileId=" + item.fileId + "&fileServer=" +
|
item.fileserver + "&name=" + item.name + "&url=" + encodeURIComponent(
|
item.path)
|
})
|
|
return
|
}
|
const dldUrl = await downloadFileUrl(item.fileId, item.name, item.fileserver)
|
item.url = dldUrl
|
showLoading("正在下载,请稍后...")
|
|
downloadFileTask(dldUrl, function(docSuccess) {
|
hideLoading()
|
item.path = docSuccess.path
|
// console.log('下载成功', docSuccess.path);
|
showLoading("下载成功,正在打开...")
|
let aaa = item.name.toLowerCase().split('.');
|
let ftype = aaa.length > 0 ? aaa[aaa.length - 1] : aaa[0];
|
uni.openDocument({
|
fileType: ftype,
|
filePath: docSuccess.path,
|
success: function(res) {
|
hideLoading()
|
// console.log('打开文档成功');
|
},
|
fail: function() {
|
hideLoading()
|
showToast("暂不支持此类型‘" + ftype + "’查看", "none", 5000)
|
}
|
})
|
}, function(docProgress, downloadTask) {
|
//下载进度
|
}, function(docFail) {
|
|
hideLoading()
|
this.showError(docFail)
|
})
|
} catch (ex) {
|
console.log(ex)
|
this.showError(ex)
|
}
|
},
|
async dldAndPreviewImg(item) {
|
try {
|
var _this = this
|
item.path = await downloadFileUrl(item.fileId, item.name, item.fileserver)
|
let arrImg = _this.getImgsUrl();
|
uni.previewImage({
|
current: item.path,
|
urls: arrImg,
|
})
|
} catch (ex) {
|
|
console.log(ex)
|
this.showError(ex)
|
}
|
},
|
|
setAttachInfo(path, value) {
|
var _this = this
|
let attachs = [];
|
attachs = _this.attachFiles;
|
if (attachs.length == 0) {
|
return;
|
}
|
let curTaskIndex = attachs.findIndex((task, index, arr) => {
|
return task.path == path;
|
})
|
if (curTaskIndex == -1) {
|
return;
|
}
|
attachs[curTaskIndex] = value;
|
_this.setData({
|
attachFiles: attachs
|
})
|
},
|
setAttachProgress(path, percent, uploadTask) {
|
var _this = this
|
if (percent < 1 || percent > 99) {
|
return;
|
}
|
let attachs = [];
|
attachs = _this.attachFiles;
|
if (attachs.length == 0) {
|
console.log("abort")
|
uploadTask.abort();
|
return;
|
}
|
let curTaskIndex = attachs.findIndex((task, index, arr) => {
|
return task.path == path;
|
})
|
if (curTaskIndex == -1) {
|
console.log("abort2")
|
uploadTask.abort();
|
return;
|
}
|
let taskItem = attachs[curTaskIndex]
|
taskItem.percent = percent
|
taskItem.isUploading = true
|
attachs[curTaskIndex] = taskItem;
|
_this.setData({
|
attachFiles: attachs
|
})
|
},
|
setAttachFailed(path, errMsg) {
|
var _this = this
|
let attachs = [];
|
attachs = _this.attachFiles;
|
if (attachs.length == 0) {
|
return;
|
}
|
let curTaskIndex = attachs.findIndex((task, index, arr) => {
|
return task.path == path;
|
})
|
if (curTaskIndex == -1) {
|
return;
|
}
|
let taskItem = attachs[curTaskIndex]
|
taskItem.isUploading = false
|
taskItem.errMsg = errMsg
|
attachs[curTaskIndex] = taskItem;
|
_this.setData({
|
attachFiles: attachs
|
})
|
},
|
|
uploadAttach(file, isImg, isVideo, isAudio) {
|
var _this = this
|
let color = TaskInit.fileUtils.getTypeBgColor(file.name)
|
|
uploadFile(file, (docSuc) => {
|
|
// console.log("uploadAttach docSuc", docSuc);
|
let upfile = {
|
isUploading: false,
|
fileserver: docSuc.filesflag,
|
percent: 100,
|
fileId: docSuc.id,
|
name: docSuc.name,
|
size: file.size,
|
path: file.path,
|
isImg: isImg,
|
isVideo: isVideo,
|
isAudio: isAudio,
|
color: color,
|
duration: file.duration || 0,
|
sizestr: TaskInit.fileUtils.getFileSizeStr(docSuc.size)
|
};
|
_this.setAttachInfo(upfile.path, upfile);
|
// console.log("uploadAttach uploadFile res", upfile);
|
},
|
(docProgress, uploadTask) => {
|
console.log("uploadAttachs uploadTaskFile progress", docProgress);
|
_this.setAttachProgress(docProgress.path, docProgress.progress, uploadTask);
|
},
|
(docFail) => {
|
console.log("uploadAttach uploadFile fail", docFail);
|
_this.setAttachFailed(docFail.path, docFail.errMsg);
|
})
|
|
},
|
uploadAttachs(files) {
|
// console.log("uploadAttachs", files)
|
var _this = this
|
|
let fileTemps = []
|
var attachs = _this.attachFiles
|
if (files.length <= 10) {
|
fileTemps = files
|
} else {
|
for (let i = 0; i < 10; i++) {
|
fileTemps.push(files[i])
|
}
|
}
|
for (let i = 0; i < fileTemps.length; i++) {
|
let file = fileTemps[i];
|
file.isUploading = true
|
file.percent = 0
|
if (file.tempFilePath)
|
file.path = file.tempFilePath
|
let aname = file.path || file.filePath || ""
|
if (file.name)
|
aname = file.name
|
let aaa = aname.split('/');
|
if (aaa.length > 0) {
|
file.name = aaa[aaa.length - 1]
|
} else
|
file.name = aname
|
file.sizestr = TaskInit.fileUtils.getFileSizeStr(file.size)
|
file.color = TaskInit.fileUtils.getTypeBgColor(file.name)
|
file.isImg = false
|
file.isVideo = false
|
file.isAudio = false
|
if (TaskInit.fileUtils.isPictureType(file.name)) //文档
|
{
|
file.isImg = true
|
} else if (TaskInit.fileUtils.isVideoType(file.name)) //文档
|
{
|
file.isVideo = true
|
} else if (TaskInit.fileUtils.isAudioType(file.name)) //音频
|
{
|
file.isAudio = true
|
}
|
attachs.push(file)
|
}
|
_this.setData({
|
attachFiles: attachs,
|
})
|
for (let i = 0; i < fileTemps.length; i++) {
|
let file = fileTemps[i];
|
// #ifdef MP-WEIXIN
|
uni.getFileSystemManager().getFileInfo({
|
filePath: file.path,
|
digestAlgorithm: "md5",
|
success: (res) => {
|
// console.log("uploadAttachs getFileInfo", res)
|
file.md5 = res.digest
|
file.size = res.size
|
_this.uploadAttach(file, file.isImg, file.isVideo, file.isAudio)
|
},
|
fail: (res) => {
|
_this.setAttachFailed(file.path, res);
|
}
|
})
|
// #endif
|
// #ifndef MP-WEIXIN
|
uni.getFileInfo({
|
filePath: file.path,
|
digestAlgorithm: "md5",
|
success: (res) => {
|
file.md5 = res.digest
|
file.size = res.size
|
_this.uploadAttach(file, file.isImg, file.isVideo, file.isAudio)
|
},
|
fail: (res) => {
|
_this.setAttachFailed(file.path, res);
|
}
|
})
|
// #endif
|
|
}
|
|
},
|
closeFileSelPopup() {
|
this.$refs.refPopupFileSel.close()
|
},
|
clickSelLocalFile() {
|
// console.log("clickSelLocalFile")
|
this.$refs.refPopupFileSel.close()
|
uni.navigateTo({
|
url: `/pages/common/fileselect?uploadType=${this.fileUploadType}`
|
})
|
},
|
|
clickSelFile() {
|
|
let isCanMessageFile = false
|
let isCanLocalFile = false
|
const app = getApp()
|
if (app.globalData.osName == "ios") {
|
isCanLocalFile = false
|
}
|
//#ifdef MP-WEIXIN
|
if (app.globalData.qyWx.isWork) {
|
if (this.isMobilePlatform) {
|
if (uni.canIUse('chooseMessageFile')) {
|
isCanMessageFile = true
|
}
|
}
|
} else {
|
if (uni.canIUse('chooseMessageFile')) {
|
isCanMessageFile = true
|
}
|
}
|
//#endif
|
if (isCanLocalFile && isCanMessageFile) {
|
this.$refs.refPopupFileSel.open("bottom")
|
} else {
|
if (isCanLocalFile) {
|
uni.navigateTo({
|
url: `/pages/common/fileselect?uploadType=${this.fileUploadType}`
|
})
|
} else if (isCanMessageFile) {
|
this.clickSelMessageFile()
|
}
|
}
|
},
|
clickSelMessageFile() {
|
this.$refs.refPopupFileSel.close()
|
|
var _this = this
|
let app = getApp()
|
let isCanMessageFile = false
|
//#ifdef MP-WEIXIN
|
if (app.globalData.qyWx.isWork) {
|
if (this.isMobilePlatform) {
|
if (uni.canIUse('chooseMessageFile')) {
|
isCanMessageFile = true
|
}
|
}
|
} else {
|
if (uni.canIUse('chooseMessageFile')) {
|
isCanMessageFile = true
|
}
|
}
|
//#endif
|
if (isCanMessageFile) {
|
// console.log("clickSelMessageFile canIUse")
|
if (app.globalData.qyWx.isWork) {
|
// console.log("clickSelMessageFile wx.qy.checkSession")
|
wx.qy.checkSession({
|
success: function() {
|
// console.log('clickSelMessageFile checkSession success!')
|
wx.qy.chooseMessageFile({
|
count: 10,
|
type: "file",
|
success: (res) => {
|
// console.log("clickSelMessageFile chooseMessageFile success",res)
|
_this.uploadAttachs(res.tempFiles);
|
},
|
fail: (res) => {
|
console.log("clickSelMessageFile chooseMessageFile fail",
|
res)
|
},
|
})
|
},
|
fail: function() {
|
console.log('clickSelMessageFile checkSession fail!')
|
// session_key 已经失效,需要重新执行登录流程
|
loginWxQy().then((res) => {
|
wx.qy.chooseMessageFile({
|
count: 10,
|
type: "file",
|
success: (res) => {
|
// console.log(
|
// "clickSelMessageFile chooseMessageFile success",
|
// res)
|
_this.uploadAttachs(res.tempFiles);
|
},
|
fail: (res) => {
|
console.log(
|
"clickSelMessageFile chooseMessageFile fail",
|
res)
|
},
|
})
|
}).catch((rej) => {
|
console.log('clickSelMessageFile loginWxQy failed!', rej)
|
this.showError(rej)
|
})
|
}
|
})
|
} else {
|
uni.chooseMessageFile({
|
count: 10,
|
type: "all",
|
success: (res) => {
|
// console.log("chooseMessageFile res", res)
|
_this.uploadAttachs(res.tempFiles);
|
}
|
})
|
}
|
} else {
|
// console.log("clickSelMessageFile no canIUse")
|
//showModal("不支持从聊天会话中选择文件","提示",false)
|
this.clickChooseImage()
|
return;
|
}
|
|
},
|
voiceStart(e) {
|
this.$refs.refAudioRecord.voiceStart(e)
|
|
},
|
// 录音中(判断是否触发上滑取消发送)
|
voiceIng(e) {
|
this.$refs.refAudioRecord.voiceIng(e)
|
},
|
// 结束录音
|
voiceEnd(e) {
|
this.$refs.refAudioRecord.voiceEnd(e)
|
},
|
// 录音被打断
|
voiceCancel() {
|
this.$refs.refAudioRecord.voiceCancel()
|
|
},
|
recordVioceEnd(param) {
|
this.uploadAttachs([param]);
|
|
},
|
// 选择图片发送
|
clickChooseImage() {
|
if (uni.canIUse('chooseMedia')) {
|
this.getMedia('album');
|
} else {
|
var _this = this
|
let app = getApp()
|
console.log("chooseImage")
|
let sizeType = ['original', 'compressed']
|
//#ifdef MP-DINGTALK
|
sizeType = ['compressed']
|
// #endif
|
|
uni.chooseImage({
|
count: 10,
|
sizeType: sizeType, //original 原图,compressed 压缩图,默认二者都有
|
sourceType: ['album', 'camera'], //album 从相册选图,camera 使用相机,默认二者都有。
|
success: (res) => {
|
let tempFiles = []
|
if (res.files) {
|
for (let i = 0; i < res.files.length; i++) {
|
let tmpFile = {
|
path: res.files[i].path,
|
size: 0
|
}
|
tmpFile.name = tmpFile.path
|
if (res.files[i].fileType)
|
tmpFile.name = tmpFile.path + "." + res.files[i].fileType
|
tempFiles.push(tmpFile)
|
}
|
} else if (res.tempFiles) {
|
for (let i = 0; i < res.tempFiles.length; i++) {
|
let tmpFile = {
|
path: res.tempFiles[i].path,
|
size: 0
|
}
|
tmpFile.name = tmpFile.path
|
tempFiles.push(tmpFile)
|
}
|
} else {
|
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
tempFiles.push({
|
path: res.tempFilePaths[i],
|
name: res.tempFilePaths[i],
|
size: 0
|
})
|
}
|
}
|
_this.uploadAttachs(tempFiles);
|
|
},
|
fail: (err) => {
|
console.log('chooseImage fail', err)
|
if (_this.isMobilePlatform && err.errMsg.indexOf('cancel') < 0 && err.errMsg
|
.indexOf(
|
'取消') < 0) {
|
uni.getSetting({
|
success: (res) => {
|
let authStatus = res.authSetting['scope.album'];
|
if (!authStatus) {
|
showModal("需要从您的相册获取图片,请在设置界面打开相关权限", "授权失败").then((
|
res) => {
|
if (res) {
|
uni.openSetting()
|
}
|
})
|
}
|
}
|
})
|
}
|
}
|
})
|
}
|
},
|
//拍照发送
|
clickCamera() {
|
if (uni.canIUse('chooseMedia')) {
|
this.getMedia('camera');
|
} else {
|
const _this = this
|
console.log("chooseVideo")
|
uni.chooseVideo({
|
|
sourceType: ['album', 'camera'], //album 从相册选图,camera 使用相机,默认二者都有。
|
maxDuration: 30,
|
camera: 'back',
|
success(res) {
|
console.log("chooseVideo success", res)
|
_this.uploadAttachs([res]);
|
|
},
|
fail: (err) => {
|
console.log("chooseVideofail ", err)
|
}
|
});
|
|
}
|
},
|
|
getMedia(strType) {
|
var _this = this
|
let app = getApp()
|
console.log("chooseMedia")
|
uni.chooseMedia({
|
count: 10,
|
mediaType: ['image', 'video'],
|
sourceType: [strType], //album 从相册选图,camera 使用相机,默认二者都有。
|
sizeType: ['original'], //original 原图,compressed 压缩图,默认二者都有
|
maxDuration: 30,
|
camera: 'back',
|
success(res) {
|
console.log('chooseMedia success', res)
|
_this.uploadAttachs(res.tempFiles);
|
},
|
fail: (err) => {
|
//_this.openDrawer();
|
if (_this.isMobilePlatform && err.errMsg.indexOf('cancel') < 0) {
|
uni.getSetting({
|
success: (res) => {
|
console.log("getSetting", res)
|
let authStatus = true
|
if (strType == "album")
|
authStatus = res.authSetting['scope.album'];
|
else if (strType == "camera")
|
authStatus = res.authSetting['scope.camera'];
|
|
if (!authStatus) {
|
showModal("需要从您的相册获取图片,请在设置界面打开相关权限", "授权失败").then((
|
res) => {
|
if (res) {
|
uni.openSetting()
|
}
|
})
|
}
|
}
|
})
|
}
|
}
|
})
|
|
|
},
|
clickExecuteUser() {
|
const _this = this
|
this.selUsertype = 0
|
uni.navigateTo({
|
url: "/pages/org/selpsn?title=选择负责人",
|
events: {
|
selPsnOk: function(data) {
|
_this.selUserType = 0
|
_this.getBackUser(data)
|
}
|
}
|
})
|
// console.log("clickExecuteUser")
|
},
|
longPressExecuteUser() {
|
var _this = this
|
|
showModal("确定要删除选择吗?", "提醒").then((res) => {
|
if (res) {
|
_this.setData({
|
executeUser: {}
|
})
|
}
|
})
|
},
|
clickRelUsers() {
|
// console.log("clickRelUsers")
|
this.selUsertype = 2
|
const _this = this
|
uni.navigateTo({
|
url: "/pages/org/selpsn?multiselect=true&title=选择相关人",
|
events: {
|
selPsnOk: function(data) {
|
_this.selUserType = 2
|
_this.getBackUser(data)
|
}
|
}
|
})
|
},
|
longPressRelUser(item, index) {
|
var _this = this
|
showModal("确定要删除选择吗?", "提醒").then((res) => {
|
if (res) {
|
let relUsers = _this.relUsers
|
relUsers.splice(index, 1)
|
_this.setData({
|
relUsers: relUsers
|
})
|
}
|
})
|
},
|
bindDateChange(e) {
|
// console.log("bindDateChange", e.detail.value)
|
this.dateDue = e.detail.value
|
},
|
clickSelMonth() {
|
this.$refs.refPopupCalendar.open("bottom")
|
},
|
confirmSelCalendar(data) {
|
// console.log("confirmSelCalendar", data)
|
this.$refs.refPopupCalendar.close()
|
this.setData({
|
dateDue: data.fulldate
|
})
|
},
|
closeSelCalendar() {
|
this.$refs.refPopupCalendar.close()
|
},
|
clickSelProject() {
|
this.$refs.refPopupProject.open("bottom")
|
},
|
confirmSelProject(data) {
|
this.$refs.refPopupProject.close()
|
},
|
closeSelProject() {
|
this.$refs.refPopupProject.close()
|
},
|
|
|
menuQuadrantChange(item, index) {
|
this.quadrantIndex = index
|
this.$refs.refPopupMenuQuadrant.close()
|
},
|
clickQuadrant() {
|
this.$refs.refPopupMenuQuadrant.open("bottom")
|
|
},
|
closeMenuQuadrant() {
|
this.$refs.refPopupMenuQuadrant.close()
|
|
},
|
|
menuTypeChange(item, index) {
|
this.typeIndex = index
|
this.$refs.refPopupMenuType.close()
|
},
|
clickType() {
|
this.$refs.refPopupMenuType.open("bottom")
|
|
},
|
closeMenuType() {
|
this.$refs.refPopupMenuType.close()
|
|
},
|
|
submitForm() {
|
var _this = this
|
let title = _this.form.title.trim()
|
if (title.length < 1) {
|
_this.formData.titleFocus = true
|
showToast("标题不能为空!", "none")
|
uni.pageScrollTo({
|
scrollTop: 0
|
})
|
return
|
}
|
if (!this.prj.id) {
|
showToast("项目不能为空", "none")
|
uni.pageScrollTo({
|
scrollTop: 0
|
})
|
return
|
}
|
|
let bUploadAll = true
|
for (let i = 0; i < _this.attachFiles.length; i++) {
|
if (!_this.attachFiles[i].fileId) {
|
bUploadAll = false
|
break;
|
}
|
}
|
if (!bUploadAll) {
|
showModal("有的附件还没有上传成功,确定忽略掉这些附件立刻就新建事件吗?", "提醒").then((res) => {
|
if (res) {
|
_this.createPrjEvent()
|
}
|
})
|
} else
|
_this.createPrjEvent()
|
},
|
createPrjEvent() {
|
var _this = this;
|
let title = _this.form.title.trim()
|
showLoading("创建中,请稍后...")
|
|
let autoset = [];
|
const app = getApp()
|
|
|
let upAttachs = [];
|
for (let i = 0; i < _this.attachFiles.length; i++) {
|
if (_this.attachFiles[i].fileId) {
|
upAttachs.push({
|
fileserver: _this.attachFiles[i].fileserver,
|
fileid: `{${_this.attachFiles[i].fileId}}`,
|
filesize: _this.attachFiles[i].size.toString(),
|
filename: _this.attachFiles[i].name,
|
});
|
}
|
}
|
let work = {
|
prjid: this.prj.id,
|
type: this.typeMenu[this.typeIndex].text,
|
verid: "",
|
version: "",
|
classify: "",
|
quadrant: this.quadrantIndex,
|
planclose: this.dateDue,
|
takeon: this.executeUser.login,
|
takeonname: this.executeUser.name,
|
respdepid: "",
|
respdepname: "",
|
content: Base64.encode(_this.form.desc),
|
title,
|
tag: "",
|
user: this.relUsers,
|
attach: upAttachs,
|
}
|
prjEventCreate(work).then((res) => {
|
hideLoading()
|
if (res) {
|
_this.eventSendMsg(res)
|
const evtData = {
|
CN_S_TITLE: work.title,
|
CN_G_ID: res,
|
CN_S_PRJ_NAME: this.prj.name,
|
CN_N_QUADRANT: work.quadrant,
|
CN_S_TAKEON_NAME: work.takeonname,
|
CN_S_TAKEON_ID: work.takeon,
|
CN_D_PLAN_DUE: work.planclose,
|
CN_S_STATE: "提出",
|
CN_S_E_TYPE: work.type,
|
CN_S_CREATOR: app.globalData.userdata.user_name,
|
CN_T_CREATE: TaskInit.dateUtils.toDateString(new Date()),
|
}
|
let param = {
|
id: res,
|
change: "新建",
|
eventBody: evtData
|
}
|
uni.$emit('prjEventDataChange', param)
|
}
|
|
showToast("创建事件成功", "success")
|
uni.navigateBack()
|
}).catch((rej) => {
|
hideLoading()
|
console.log("prjEventCreate failed", rej);
|
this.showError(rej)
|
}).finally(() => {
|
|
})
|
},
|
getBackUser(data) {
|
//console.log("getBackUser",data)
|
var _this = this
|
//console.log("selUser selUsertype",_this.selUsertype)
|
if (data.length > 0) {
|
switch (_this.selUsertype) {
|
case 0:
|
_this.executeUser = data[0]
|
_this.setData({
|
executeUser: _this.executeUser
|
})
|
break;
|
case 2:
|
data.forEach((item) => {
|
let curIndex = _this.relUsers.findIndex((param, index, arr) => {
|
return param.login == item.login;
|
})
|
if (curIndex < 0) {
|
_this.relUsers.push(item)
|
}
|
})
|
_this.setData({
|
relUsers: _this.relUsers
|
})
|
break;
|
}
|
|
}
|
|
},
|
async getBackUploadFile(data) {
|
try {
|
var _this = this
|
let attachs = _this.attachFiles
|
for (let i = 0; i < data.length; i++) {
|
let file = data[i];
|
let isImg = false
|
let isVideo = false
|
let isAudio = false
|
// console.log('getBackUploadFile', file)
|
if (TaskInit.fileUtils.isPictureType(file.CN_S_FILE_NAME)) //文档
|
{
|
isImg = true
|
} else if (TaskInit.fileUtils.isVideoType(file.CN_S_FILE_NAME)) //文档
|
{
|
isVideo = true
|
} else if (TaskInit.fileUtils.isAudioType(file.name)) //音频
|
{
|
isAudio = true
|
}
|
let color = TaskInit.fileUtils.getTypeBgColor(file.CN_S_FILE_NAME)
|
let upfile = {
|
isUploading: false,
|
fileserver: file.CN_N_FILE_SERVER,
|
percent: 100,
|
fileId: file.CN_G_FILE_ID,
|
name: file.CN_S_FILE_NAME,
|
size: file.CN_N_FILE_SIZE,
|
isImg: isImg,
|
isVideo: isVideo,
|
isAudio: isAudio,
|
color: color,
|
sizestr: TaskInit.fileUtils.getFileSizeStr(file.CN_N_FILE_SIZE)
|
};
|
attachs.push(upfile)
|
|
}
|
_this.setData({
|
attachFiles: attachs
|
})
|
for (let i = 0; i < _this.attachFiles.length; i++) {
|
let file = _this.attachFiles[i];
|
if ((file.isImg || file.isVideo || file.isAudio) && !file.path) {
|
file.path = await downloadFileUrl(file.fileId, file.name, file.fileserver)
|
}
|
}
|
} catch (ex) {
|
|
console.log(ex)
|
this.showError(ex)
|
}
|
|
},
|
/* 发送消息 */
|
async eventSendMsg(id) {
|
try {
|
let result = await eventGetInfo(id);
|
let takeon = result.Takeon;
|
let creator = result.Creator;
|
let title = `项目事件【${result.Title}】到达通知`;
|
let content = "";
|
let sender = [];
|
let msgtype = "1";
|
/* 执行人 */
|
if (takeon && takeon != this.curUserId) sender.push(takeon);
|
|
if (sender.length > 0) {
|
content = `事件到达`;
|
content += `\n事件:${result.Title}`;
|
content += `\n项目:${result.PrjName}`;
|
content += `\n提出者:${getCurUserName()}`;
|
content += ` 日期:${TaskInit.dateUtils.toShortDateTimeString(new Date())}`;
|
|
const paramSendMsg = {
|
sendto: sender.join(";"),
|
msgobjtype: 3,
|
ownerid: result.ID,
|
msgtype: msgtype,
|
title: title,
|
content: content,
|
contenttype: "txt",
|
};
|
await sendMsg(paramSendMsg);
|
|
}
|
} catch (error) {
|
showError(this, error);
|
}
|
},
|
getImgsUrl() {
|
let imgs = []
|
this.attachFiles.forEach((item, index) => {
|
if (item.isImg && item.path) {
|
imgs.push(item.path)
|
}
|
})
|
return imgs
|
},
|
|
userImgUrl(userID) {
|
return `${getApp().globalData.apiurl.org}/userphoto?login=${userID}`;
|
},
|
|
showError(ex) {
|
let tip = typeof ex === 'string' ? ex :( ex.message || ex.err_msg || ex.errMsg || ex.err_info || "")
|
|
showModal(tip, "提示", false)
|
},
|
|
},
|
onLoad(option) {
|
const app = getApp()
|
this.options = option
|
let execUser = {}
|
let loginUser = {
|
login: app.globalData.userdata.user_login,
|
name: app.globalData.userdata.user_name,
|
img: `${app.globalData.apiurl.org}/userphoto?login=${app.globalData.userdata.user_login}`
|
}
|
if (option.prjId) {
|
this.setData({
|
prj: {
|
id: option.prjId || "",
|
name: option.prjName || ""
|
}
|
})
|
}
|
// #ifdef MP-DINGTALK
|
|
my.setNavigationBar({
|
backgroundColor: "#007AFF",
|
frontColor: "#ffffff"
|
})
|
// #endif
|
this.loadPlatform()
|
let info = Session.getValue('calendar_info')
|
if (info) {
|
if (info.lunar) {
|
this.setData({
|
showLunar: info.lunar
|
});
|
}
|
}
|
// #ifndef MP-DINGTALK
|
const _this = this
|
audioContext.onError = (err) => {
|
console.log("播放语音失败", err)
|
_this.setData({
|
playAudioPath: ""
|
})
|
this.showError("播放语音失败," + JSON.stringify(err))
|
return
|
}
|
|
audioContext.onEnded = () => {
|
console.log("播放语音结束")
|
_this.setData({
|
playAudioPath: ""
|
})
|
return
|
}
|
audioContext.onStop = () => {
|
console.log("播放语音停止事件")
|
_this.setData({
|
playAudioPath: ""
|
})
|
return
|
}
|
// #endif
|
|
},
|
onShow() {
|
uni.$off('selUser') //建议先销毁一次监听,再进行新的一次监听,否则会出现重复监听的现象
|
uni.$once('selUser', function(data) {
|
// console.log("selUser", data)
|
//这的data就是B页面传递过来的数据
|
})
|
},
|
}
|
</script>
|
|
<style lang="less" scoped>
|
page {
|
background-color: #e5eaee;
|
}
|
|
.uni-project-event-create {
|
display: flex;
|
width: 750rpx;
|
height: 100vh;
|
flex-direction: column;
|
|
|
.task-form {
|
display: flex;
|
width: 98%;
|
flex: 1;
|
padding: 4px 1% 8px;
|
overflow: auto;
|
flex-direction: column;
|
}
|
|
.uni-panel-h {
|
display: flex;
|
flex-direction: row !important;
|
align-items: center !important;
|
padding: 12px 10px 12px 12px;
|
font-size: 14px;
|
}
|
|
.uni-panel-hh {
|
display: flex;
|
background-color: #ffffff;
|
flex-direction: row !important;
|
align-items: center !important;
|
padding: 2px;
|
font-size: 14px;
|
}
|
|
.uni-panel-h2 {
|
display: flex;
|
background-color: #ffffff;
|
flex-direction: row !important;
|
align-items: center !important;
|
margin: 0px;
|
padding: 12px 10px 12px 12px;
|
font-size: 14px;
|
border-bottom: 1px solid #e8eaec;
|
}
|
|
.uni-picker-input {
|
height: 50rpx;
|
padding: 0px 4px;
|
line-height: 50rpx;
|
font-size: 30rpx;
|
background: #FFF;
|
text-align: right;
|
color: #007aff;
|
flex: 1;
|
}
|
|
.uni-panel-body {
|
display: flex;
|
flex-direction: column;
|
margin: 8px 12px;
|
padding: 4px 4px;
|
border-radius: 8px;
|
background-color: #fff;
|
}
|
|
.uni-panel-c {
|
background-color: #ffffff;
|
align-items: center !important;
|
padding: 4px 8px;
|
font-size: 14px;
|
}
|
|
.uni-panel-c textarea {
|
width: 100%;
|
overflow-y: auto;
|
min-height: 80px;
|
max-height: 200px;
|
margin: 4px 4px;
|
}
|
|
.uni-panel-c input {
|
width: 100%;
|
margin: 4px 4px;
|
}
|
|
.uni-panel-text {
|
flex: 1;
|
color: #000000;
|
font-weight: normal;
|
|
.uni-panel-icon {
|
padding: 0 6px;
|
font-size: 20px;
|
}
|
}
|
|
.uni-panel-quadrant {
|
flex: 1;
|
display: flex;
|
margin: 0px 4px;
|
text-align: right;
|
flex-direction: row !important;
|
align-items: center !important;
|
}
|
|
.uni-panel-progress {
|
margin-left: 8px;
|
width: 200rpx;
|
}
|
|
.uni-panel-icon {
|
padding: 4px 6px;
|
color: #999999;
|
font-weight: normal;
|
transition-duration: 0s;
|
font-size: 20px;
|
transition-property: transform;
|
}
|
|
.blue-text {
|
color: #007aff;
|
}
|
|
.uni-panel-icon-btn {
|
padding: 10px;
|
font-size: 18px;
|
border: 1px solid #aaa;
|
border-radius: 8px;
|
margin-left: 5px;
|
|
:active {
|
background-color: #e5eaee;
|
color: #007aff;
|
}
|
}
|
|
.uni-panel-square {
|
background-color: #5eac82;
|
height: 16px;
|
width: 16px;
|
margin-left: 5px;
|
align-items: center;
|
}
|
|
.uni-panel-h2 .uni-panel-text {
|
flex: 1;
|
color: #000000;
|
font-weight: normal;
|
}
|
|
.uni-panel-h2 input {
|
flex: 5;
|
color: #000000;
|
font-weight: normal;
|
}
|
|
.uni-panel-upfile {
|
display: flex;
|
flex-wrap: wrap;
|
flex-direction: row !important;
|
}
|
|
.uni-panel-pic {
|
flex-direction: row !important;
|
flex-wrap: wrap;
|
padding: 2px;
|
}
|
|
.uni-panel-pic-item {
|
padding: 8rpx;
|
height: 100rpx;
|
width: 100rpx;
|
position: relative;
|
}
|
|
.uni-panel-upfile-img {
|
display: flex;
|
max-width: 100%;
|
max-height: 100%;
|
}
|
|
.uni-panel-video-playIcon {
|
display: flex;
|
flex: 1;
|
width: 50%;
|
}
|
|
.uni-panel-upfile-item {
|
display: flex;
|
position: relative;
|
margin: 2rpx;
|
height: 200rpx;
|
width: 30%;
|
flex-direction: column;
|
padding: 4px;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.uni-panel-upfile-item-name {
|
display: flex;
|
flex: 1;
|
color: #fff;
|
width: 100%;
|
word-wrap: break-word;
|
word-break: break-all;
|
font-size: 14px;
|
max-height: calc(200rpx - 20px);
|
text-overflow: ellipsis;
|
overflow: hidden;
|
-webkit-line-clamp: 4;
|
-webkit-box-orient: vertical;
|
}
|
|
.uni-panel-upfile-item-size {
|
display: flex;
|
height: 18px;
|
color: #fff;
|
font-size: 14px;
|
text-align: left;
|
}
|
|
image {
|
will-change: transform;
|
}
|
|
.uni-panel-multi-user {
|
display: flex;
|
flex-direction: row !important;
|
flex-wrap: wrap;
|
}
|
|
.uni-panel-user-item {
|
margin: 4px;
|
display: flex;
|
flex-direction: column;
|
height: 50px;
|
width: 50px;
|
}
|
|
.uni-panel-user-item image {
|
margin: 2px 8px;
|
height: 32px;
|
width: 32px;
|
border-radius: 16px;
|
}
|
|
.uni-panel-user-item text {
|
width: 50px;
|
height: 18px;
|
text-align: center;
|
font-size: 12px;
|
overflow: hidden;
|
white-space: nowrap;
|
text-overflow: clip;
|
}
|
|
.button-clz {
|
display: flex;
|
justify-content: center;
|
width: 100%;
|
font-size: 17px !important;
|
margin-top: 8px;
|
margin-bottom: 8px;
|
border-radius: 0px;
|
}
|
|
.uni-panel-button {
|
flex: 1;
|
border-radius: 12px;
|
margin: 5px 12px 16px;
|
background-color: #00aaff;
|
color: #fff;
|
|
}
|
|
.divider-bottom {
|
border-bottom: 1px solid #e8eaec;
|
}
|
|
.popup-content {
|
display: flex;
|
justify-content: center;
|
flex-direction: column;
|
background-color: transparent;
|
|
.popup-content-menu-no-data {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
color: #888;
|
height: 100%;
|
}
|
|
.popup-content-menu-item {
|
display: flex;
|
flex-wrap: nowrap;
|
flex-direction: row !important;
|
align-items: center;
|
padding: 4px 8px;
|
font-size: 16px;
|
}
|
|
.popup-content-menu-ico {
|
padding: 4px 4px;
|
font-size: 16px;
|
}
|
|
.popup-content-menu-item2 {
|
display: flex;
|
background-color: transparent;
|
justify-content: center;
|
padding: 12px;
|
// font-size: 16px;
|
}
|
}
|
|
.popup-content-header {
|
display: flex;
|
padding: 12px;
|
font-size: 16px;
|
justify-content: space-between;
|
|
.left {
|
// position: absolute;
|
// left: 0;
|
color: #888;
|
}
|
|
.right {
|
// position: absolute;
|
// right: 0;
|
color: #007aff;
|
}
|
|
}
|
|
.popup-content-body {
|
display: flex;
|
padding: 12px;
|
max-height: 50vh;
|
|
.left {
|
width: 100px;
|
height: 120%;
|
border-right: 1px solid #e8eaec;
|
}
|
|
.selected {
|
background-color: #e8eaec;
|
}
|
|
.right {
|
width: calc(100% - 120px);
|
height: 100%;
|
max-height: 50vh;
|
overflow: auto;
|
}
|
}
|
|
|
.uni-popup-panel-c {
|
display: flex;
|
flex-direction: column !important;
|
font-size: 14px;
|
}
|
|
.uni-popup-panel-h {
|
display: flex;
|
flex-direction: row !important;
|
font-size: 14px;
|
margin: 8px;
|
}
|
|
.uni-popup-flex1 {
|
flex: 1;
|
display: flex;
|
flex-direction: row;
|
justify-content: space-between;
|
}
|
|
.uni-popup-rightbtn {
|
display: flex;
|
flex-direction: row;
|
justify-content: space-between;
|
width: 100px;
|
}
|
|
.blue-text {
|
color: #007aff !important;
|
}
|
}
|
</style>
|