mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-23 17:30:33 +00:00
全局使用windowSmall、windowLarge
This commit is contained in:
parent
ce88fe426b
commit
113c58a057
2
public/js/recorder/recorder.mp3.min.js
vendored
2
public/js/recorder/recorder.mp3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -58,7 +58,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['ws', 'userId', 'userToken', 'windowMax768']),
|
...mapState(['ws']),
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
@ -153,7 +153,8 @@ export default {
|
|||||||
windowSizeListener() {
|
windowSizeListener() {
|
||||||
this.$store.state.windowWidth = window.innerWidth
|
this.$store.state.windowWidth = window.innerWidth
|
||||||
this.$store.state.windowHeight = window.innerHeight
|
this.$store.state.windowHeight = window.innerHeight
|
||||||
this.$store.state.windowMax768 = window.innerWidth <= 768
|
this.$store.state.windowLarge = window.innerWidth > 768
|
||||||
|
this.$store.state.windowSmall = window.innerWidth <= 768
|
||||||
},
|
},
|
||||||
|
|
||||||
windowScrollListener() {
|
windowScrollListener() {
|
||||||
|
|||||||
6
resources/assets/js/app.js
vendored
6
resources/assets/js/app.js
vendored
@ -14,6 +14,7 @@ import VueClipboard from 'vue-clipboard2'
|
|||||||
import ViewUI from 'view-design-hi';
|
import ViewUI from 'view-design-hi';
|
||||||
import Language from './language/index'
|
import Language from './language/index'
|
||||||
import store from './store/index'
|
import store from './store/index'
|
||||||
|
import mixin from "./store/mixin";
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
Vue.use(ViewUI, {
|
Vue.use(ViewUI, {
|
||||||
@ -98,7 +99,7 @@ Vue.prototype.goForward = function(location, isReplace) {
|
|||||||
location = {name: location};
|
location = {name: location};
|
||||||
}
|
}
|
||||||
// 打开聊天窗口(移动端)
|
// 打开聊天窗口(移动端)
|
||||||
if (app.$store.state.windowMax768
|
if (app.$store.state.windowSmall
|
||||||
&& location.name === 'manage-messenger'
|
&& location.name === 'manage-messenger'
|
||||||
&& /\d+/.test(location.params.dialogId)) {
|
&& /\d+/.test(location.params.dialogId)) {
|
||||||
app.$store.state.dialogModalId = location.params.dialogId;
|
app.$store.state.dialogModalId = location.params.dialogId;
|
||||||
@ -143,7 +144,6 @@ $A.Platform = "web";
|
|||||||
$A.isMainElectron = false;
|
$A.isMainElectron = false;
|
||||||
$A.isSubElectron = false;
|
$A.isSubElectron = false;
|
||||||
$A.isEEUiApp = isEEUiApp;
|
$A.isEEUiApp = isEEUiApp;
|
||||||
$A.isDesktop = $A.isDesktop();
|
|
||||||
$A.openLog = $A.getStorageString("log::open") === "open";
|
$A.openLog = $A.getStorageString("log::open") === "open";
|
||||||
if (isElectron) {
|
if (isElectron) {
|
||||||
$A.Electron = electron;
|
$A.Electron = electron;
|
||||||
@ -158,10 +158,10 @@ Vue.prototype.$Platform = $A.Platform;
|
|||||||
Vue.prototype.$isMainElectron = $A.isMainElectron;
|
Vue.prototype.$isMainElectron = $A.isMainElectron;
|
||||||
Vue.prototype.$isSubElectron = $A.isSubElectron;
|
Vue.prototype.$isSubElectron = $A.isSubElectron;
|
||||||
Vue.prototype.$isEEUiApp = $A.isEEUiApp;
|
Vue.prototype.$isEEUiApp = $A.isEEUiApp;
|
||||||
Vue.prototype.$isDesktop = $A.isDesktop;
|
|
||||||
Vue.prototype.$openLog = $A.openLog;
|
Vue.prototype.$openLog = $A.openLog;
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
Vue.mixin(mixin)
|
||||||
|
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
:placement="placement"
|
:placement="placement"
|
||||||
:effect="tooltipTheme"
|
:effect="tooltipTheme"
|
||||||
:delay="delay"
|
:delay="delay"
|
||||||
:disabled="!$isDesktop || !showTooltip || disabled"
|
:disabled="windowSmall || !showTooltip || disabled"
|
||||||
:max-width="tooltipMaxWidth"
|
:max-width="tooltipMaxWidth"
|
||||||
transfer>
|
transfer>
|
||||||
<span ref="content" @mouseenter="handleTooltipIn" class="common-auto-tip" @click="onClick">
|
<span ref="content" @mouseenter="handleTooltipIn" class="common-auto-tip" @click="onClick">
|
||||||
|
|||||||
@ -164,8 +164,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken']),
|
|
||||||
|
|
||||||
uploadHeaders() {
|
uploadHeaders() {
|
||||||
return {
|
return {
|
||||||
fd: $A.getSessionStorageString("userWsFd"),
|
fd: $A.getSessionStorageString("userWsFd"),
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ETooltip :disabled="!$isDesktop || content == ''" :content="content">
|
<ETooltip :disabled="windowSmall || content == ''" :content="content">
|
||||||
<svg viewBox="25 25 50 50" class="common-loading">
|
<svg viewBox="25 25 50 50" class="common-loading">
|
||||||
<circle cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10" class="common-path"></circle>
|
<circle cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10" class="common-path"></circle>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@ -169,8 +169,6 @@
|
|||||||
this.content = this.value;
|
this.content = this.value;
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken']),
|
|
||||||
|
|
||||||
headers() {
|
headers() {
|
||||||
return {
|
return {
|
||||||
fd: $A.getSessionStorageString("userWsFd"),
|
fd: $A.getSessionStorageString("userWsFd"),
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="minder-editor-container">
|
<div class="minder-editor-container">
|
||||||
<div class="quickbar">
|
<div class="quickbar">
|
||||||
<ETooltip :disabled="!$isDesktop" placement="top" effect="light">
|
<ETooltip :disabled="windowSmall" placement="top" effect="light">
|
||||||
<div><i class="ft icon" :title="$L('缩放')"></i></div>
|
<div><i class="ft icon" :title="$L('缩放')"></i></div>
|
||||||
<div slot="content" class="minder-editor-slider">
|
<div slot="content" class="minder-editor-slider">
|
||||||
<Slider v-model="zoom" :min="10" :max="300"></Slider>
|
<Slider v-model="zoom" :min="10" :max="300"></Slider>
|
||||||
</div>
|
</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<ETooltip v-if="readOnly!==true" :disabled="!$isDesktop" placement="top" effect="light">
|
<ETooltip v-if="readOnly!==true" :disabled="windowSmall" placement="top" effect="light">
|
||||||
<div><i class="ft icon" :title="$L('图形')"></i></div>
|
<div><i class="ft icon" :title="$L('图形')"></i></div>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<ul class="minder-editor-quickul mold">
|
<ul class="minder-editor-quickul mold">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<ETooltip v-if="readOnly!==true" :disabled="!$isDesktop" placement="top" effect="light">
|
<ETooltip v-if="readOnly!==true" :disabled="windowSmall" placement="top" effect="light">
|
||||||
<div><i class="ft icon" :title="$L('样式')"></i></div>
|
<div><i class="ft icon" :title="$L('样式')"></i></div>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<ul class="minder-editor-quickul">
|
<ul class="minder-editor-quickul">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<ETooltip :disabled="!$isDesktop" placement="top" effect="light">
|
<ETooltip :disabled="windowSmall" placement="top" effect="light">
|
||||||
<div><i class="ft icon" :title="$L('折叠')"></i></div>
|
<div><i class="ft icon" :title="$L('折叠')"></i></div>
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<ul class="minder-editor-quickul">
|
<ul class="minder-editor-quickul">
|
||||||
@ -49,10 +49,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<ETooltip :disabled="!$isDesktop" placement="top" :content="$L('居中')">
|
<ETooltip :disabled="windowSmall" placement="top" :content="$L('居中')">
|
||||||
<div @click="minder.execCommand('camera', minder.getRoot(), 600)"><i class="ft icon"></i></div>
|
<div @click="minder.execCommand('camera', minder.getRoot(), 600)"><i class="ft icon"></i></div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<ETooltip :disabled="!$isDesktop" placement="top" :content="$L('移动')">
|
<ETooltip :disabled="windowSmall" placement="top" :content="$L('移动')">
|
||||||
<div @click="[minder.execCommand('Hand'),isHand=!isHand]"><i class="ft icon" :class="{active:isHand}"></i></div>
|
<div @click="[minder.execCommand('Hand'),isHand=!isHand]"><i class="ft icon" :class="{active:isHand}"></i></div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -44,8 +44,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['windowHeight', 'windowScrollY']),
|
|
||||||
|
|
||||||
style() {
|
style() {
|
||||||
const offset = 135;
|
const offset = 135;
|
||||||
const top = Math.max(offset, this.y) + this.windowScrollY,
|
const top = Math.max(offset, this.y) + this.windowScrollY,
|
||||||
|
|||||||
@ -80,7 +80,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['cacheDialogs', 'userId']),
|
...mapState(['cacheDialogs']),
|
||||||
...mapGetters(['dashboardTask']),
|
...mapGetters(['dashboardTask']),
|
||||||
|
|
||||||
routeName() {
|
routeName() {
|
||||||
|
|||||||
@ -111,7 +111,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken', 'userInfo', 'themeIsDark']),
|
...mapState(['userInfo', 'themeIsDark']),
|
||||||
|
|
||||||
fileType() {
|
fileType() {
|
||||||
return this.getType(this.value.type);
|
return this.getType(this.value.type);
|
||||||
|
|||||||
@ -24,11 +24,6 @@ export default {
|
|||||||
this.updateTitle()
|
this.updateTitle()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
...mapState(['userId']),
|
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
title: {
|
title: {
|
||||||
handler() {
|
handler() {
|
||||||
|
|||||||
@ -5,11 +5,11 @@
|
|||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:footer-hide="true"
|
:footer-hide="true"
|
||||||
:transition-names="['', '']"
|
:transition-names="['', '']"
|
||||||
:class-name="mode === 'desktop' ? 'common-preview-image-view' : 'common-preview-image-swipe'"
|
:class-name="viewMode === 'desktop' ? 'common-preview-image-view' : 'common-preview-image-swipe'"
|
||||||
fullscreen>
|
fullscreen>
|
||||||
<template v-if="list.length > 0">
|
<template v-if="list.length > 0">
|
||||||
<PreviewImageView v-if="mode === 'desktop'" :initial-index="index" :url-list="list" infinite/>
|
<PreviewImageView v-if="viewMode === 'desktop'" :initial-index="index" :url-list="list" infinite/>
|
||||||
<PreviewImageSwipe v-if="mode === 'mobile'" :initial-index="index" :url-list="list" @on-destroy="show=false"/>
|
<PreviewImageSwipe v-if="viewMode === 'mobile'" :initial-index="index" :url-list="list" @on-destroy="show=false"/>
|
||||||
</template>
|
</template>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
@ -87,9 +87,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => {
|
default: null
|
||||||
return $A.isDesktop ? 'desktop' : 'mobile';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -104,6 +102,14 @@ export default {
|
|||||||
show(v) {
|
show(v) {
|
||||||
this.value !== v && this.$emit("input", v)
|
this.value !== v && this.$emit("input", v)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
viewMode() {
|
||||||
|
if (this.mode) {
|
||||||
|
return this.mode
|
||||||
|
}
|
||||||
|
return this.$store.state.windowLarge ? 'desktop' : 'mobile'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -93,7 +93,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
showDown() {
|
showDown() {
|
||||||
return this.$isDesktop && ['login', 'index', 'manage-dashboard'].includes(this.$route.name)
|
return this.windowLarge && ['login', 'index', 'manage-dashboard'].includes(this.$route.name)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -166,7 +166,7 @@
|
|||||||
$A(this.$refs.myTextarea).show();
|
$A(this.$refs.myTextarea).show();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken', 'themeIsDark']),
|
...mapState(['themeIsDark']),
|
||||||
|
|
||||||
headers() {
|
headers() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
v-if="item.hidden !== true"
|
v-if="item.hidden !== true"
|
||||||
placement="top"
|
placement="top"
|
||||||
:key="key"
|
:key="key"
|
||||||
:disabled="!$isDesktop || !item.title"
|
:disabled="windowSmall || !item.title"
|
||||||
:content="item.title"
|
:content="item.title"
|
||||||
:enterable="false"
|
:enterable="false"
|
||||||
:open-delay="600">
|
:open-delay="600">
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
v-if="user"
|
v-if="user"
|
||||||
class="common-avatar"
|
class="common-avatar"
|
||||||
:open-delay="openDelay"
|
:open-delay="openDelay"
|
||||||
:disabled="!$isDesktop || tooltipDisabled"
|
:disabled="windowSmall || tooltipDisabled"
|
||||||
:placement="tooltipPlacement">
|
:placement="tooltipPlacement">
|
||||||
<div slot="content" class="common-avatar-transfer">
|
<div slot="content" class="common-avatar-transfer">
|
||||||
<slot/>
|
<slot/>
|
||||||
@ -107,7 +107,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userId", "userInfo", "userOnline", "cacheUserBasic"]),
|
...mapState(['userInfo', 'userOnline', 'cacheUserBasic']),
|
||||||
|
|
||||||
boxStyle() {
|
boxStyle() {
|
||||||
const style = {};
|
const style = {};
|
||||||
|
|||||||
9
resources/assets/js/functions/common.js
vendored
9
resources/assets/js/functions/common.js
vendored
@ -545,15 +545,6 @@
|
|||||||
return (ua.match(/Chrome/i) + '' === 'chrome');
|
return (ua.match(/Chrome/i) + '' === 'chrome');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否桌面端
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
isDesktop(){
|
|
||||||
let ua = typeof window !== 'undefined' && window.navigator.userAgent;
|
|
||||||
return !ua.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取对象
|
* 获取对象
|
||||||
* @param obj
|
* @param obj
|
||||||
|
|||||||
@ -190,7 +190,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'windowWidth', 'themeMode', 'themeIsDark', 'themeList',]),
|
...mapState(['themeMode', 'themeIsDark', 'themeList',]),
|
||||||
|
|
||||||
isSoftware() {
|
isSoftware() {
|
||||||
return this.$Electron || this.$isEEUiApp;
|
return this.$Electron || this.$isEEUiApp;
|
||||||
|
|||||||
@ -192,7 +192,7 @@
|
|||||||
<div class="operate-position" :style="operateStyles">
|
<div class="operate-position" :style="operateStyles">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
trigger="custom"
|
trigger="custom"
|
||||||
:placement="$isDesktop ? 'bottom' : 'top'"
|
:placement="windowLarge ? 'bottom' : 'top'"
|
||||||
:visible="operateVisible"
|
:visible="operateVisible"
|
||||||
@on-clickoutside="operateVisible = false"
|
@on-clickoutside="operateVisible = false"
|
||||||
transfer>
|
transfer>
|
||||||
@ -498,7 +498,6 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'userId',
|
|
||||||
'userInfo',
|
'userInfo',
|
||||||
'userIsAdmin',
|
'userIsAdmin',
|
||||||
'cacheTasks',
|
'cacheTasks',
|
||||||
@ -516,8 +515,6 @@ export default {
|
|||||||
|
|
||||||
'clientNewVersion',
|
'clientNewVersion',
|
||||||
'cacheTaskBrowse',
|
'cacheTaskBrowse',
|
||||||
|
|
||||||
'windowHeight',
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
...mapGetters(['taskData', 'dashboardTask']),
|
...mapGetters(['taskData', 'dashboardTask']),
|
||||||
|
|||||||
@ -88,7 +88,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'cacheTasks', 'taskCompleteTemps', 'wsOpenNum', 'themeIsDark']),
|
...mapState(['cacheTasks', 'taskCompleteTemps', 'wsOpenNum', 'themeIsDark']),
|
||||||
|
|
||||||
...mapGetters(['transforTasks']),
|
...mapGetters(['transforTasks']),
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ export default {
|
|||||||
'month.dayname.borderLeft': '1px solid rgba(0,0,0,0)',
|
'month.dayname.borderLeft': '1px solid rgba(0,0,0,0)',
|
||||||
'month.dayname.height': '50px',
|
'month.dayname.height': '50px',
|
||||||
}
|
}
|
||||||
if (this.$isDesktop) {
|
if (this.windowLarge) {
|
||||||
this.calendarTheme = {
|
this.calendarTheme = {
|
||||||
'common.border': '1px solid #f4f5f5',
|
'common.border': '1px solid #f4f5f5',
|
||||||
'month.dayname.fontSize': '14px',
|
'month.dayname.fontSize': '14px',
|
||||||
|
|||||||
@ -19,24 +19,24 @@
|
|||||||
:visibleArrow="false"
|
:visibleArrow="false"
|
||||||
placement="top"
|
placement="top"
|
||||||
popperClass="chat-input-emoji-popover">
|
popperClass="chat-input-emoji-popover">
|
||||||
<ETooltip slot="reference" ref="emojiTip" :disabled="!$isDesktop || showEmoji" placement="top" :content="$L('表情')">
|
<ETooltip slot="reference" ref="emojiTip" :disabled="windowSmall || showEmoji" placement="top" :content="$L('表情')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<ChatEmoji @on-select="onSelectEmoji"/>
|
<ChatEmoji @on-select="onSelectEmoji"/>
|
||||||
</EPopover>
|
</EPopover>
|
||||||
<ETooltip v-else ref="emojiTip" :disabled="!$isDesktop || showEmoji" placement="top" :content="$L('表情')">
|
<ETooltip v-else ref="emojiTip" :disabled="windowSmall || showEmoji" placement="top" :content="$L('表情')">
|
||||||
<i class="taskfont" @click="showEmoji=!showEmoji"></i>
|
<i class="taskfont" @click="showEmoji=!showEmoji"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- @ # -->
|
<!-- @ # -->
|
||||||
<li>
|
<li>
|
||||||
<ETooltip placement="top" :disabled="!$isDesktop" :content="$L('选择会员')">
|
<ETooltip placement="top" :disabled="windowSmall" :content="$L('选择会员')">
|
||||||
<i class="taskfont" @click="onToolbar('user')"></i>
|
<i class="taskfont" @click="onToolbar('user')"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<ETooltip placement="top" :disabled="!$isDesktop" :content="$L('选择任务')">
|
<ETooltip placement="top" :disabled="windowSmall" :content="$L('选择任务')">
|
||||||
<i class="taskfont" @click="onToolbar('task')"></i>
|
<i class="taskfont" @click="onToolbar('task')"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</li>
|
</li>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
:visibleArrow="false"
|
:visibleArrow="false"
|
||||||
placement="top"
|
placement="top"
|
||||||
popperClass="chat-input-more-popover">
|
popperClass="chat-input-more-popover">
|
||||||
<ETooltip slot="reference" ref="moreTip" :disabled="!$isDesktop || showMore" placement="top" :content="$L('展开')">
|
<ETooltip slot="reference" ref="moreTip" :disabled="windowSmall || showMore" placement="top" :content="$L('展开')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<div v-if="recordReady" class="chat-input-popover-item" @click="onToolbar('meeting')">
|
<div v-if="recordReady" class="chat-input-popover-item" @click="onToolbar('meeting')">
|
||||||
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<!-- 发送按钮 -->
|
<!-- 发送按钮 -->
|
||||||
<li class="chat-send" :class="sendClass" v-touchmouse="clickSend">
|
<li class="chat-send" :class="sendClass" v-touchmouse="clickSend">
|
||||||
<ETooltip placement="top" :disabled="!$isDesktop" :content="$L('发送')">
|
<ETooltip placement="top" :disabled="windowSmall" :content="$L('发送')">
|
||||||
<div v-if="loading">
|
<div v-if="loading">
|
||||||
<div class="chat-load">
|
<div class="chat-load">
|
||||||
<Loading/>
|
<Loading/>
|
||||||
@ -157,10 +157,8 @@ export default {
|
|||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
enterSend: {
|
enterSend: {
|
||||||
type: Boolean,
|
type: [String, Boolean],
|
||||||
default: () => {
|
default: null
|
||||||
return $A.isDesktop
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
emojiBottom: {
|
emojiBottom: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -264,7 +262,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['dialogInputCache', 'cacheProjects', 'cacheTasks', 'cacheUserBasic', 'userId', 'windowScrollY']),
|
...mapState(['dialogInputCache', 'cacheProjects', 'cacheTasks', 'cacheUserBasic']),
|
||||||
|
|
||||||
|
isEnterSend() {
|
||||||
|
if (typeof this.enterSend === "boolean") {
|
||||||
|
return this.enterSend;
|
||||||
|
} else {
|
||||||
|
return this.$store.state.windowLarge
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
editorStyle() {
|
editorStyle() {
|
||||||
const {wrapperWidth, editorHeight} = this;
|
const {wrapperWidth, editorHeight} = this;
|
||||||
@ -387,7 +393,7 @@ export default {
|
|||||||
if (this.isSpecVersion) {
|
if (this.isSpecVersion) {
|
||||||
// ios11.0-11.3 对scrollTop及scrolIntoView解释有bug
|
// ios11.0-11.3 对scrollTop及scrolIntoView解释有bug
|
||||||
// 直接执行会导致输入框滚到底部被遮挡
|
// 直接执行会导致输入框滚到底部被遮挡
|
||||||
} else if (!this.$isDesktop) {
|
} else if (this.windowSmall) {
|
||||||
this.timerScroll = setInterval(() => {
|
this.timerScroll = setInterval(() => {
|
||||||
if (this.quill?.hasFocus()) {
|
if (this.quill?.hasFocus()) {
|
||||||
$A.scrollIntoViewIfNeeded(this.$refs.editor);
|
$A.scrollIntoViewIfNeeded(this.$refs.editor);
|
||||||
@ -426,7 +432,7 @@ export default {
|
|||||||
key: 13,
|
key: 13,
|
||||||
shortKey: true,
|
shortKey: true,
|
||||||
handler: _ => {
|
handler: _ => {
|
||||||
if (!this.enterSend) {
|
if (!this.isEnterSend) {
|
||||||
this.onSend();
|
this.onSend();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -437,7 +443,7 @@ export default {
|
|||||||
key: 13,
|
key: 13,
|
||||||
shiftKey: false,
|
shiftKey: false,
|
||||||
handler: _ => {
|
handler: _ => {
|
||||||
if (this.enterSend) {
|
if (this.isEnterSend) {
|
||||||
this.onSend();
|
this.onSend();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -778,7 +784,7 @@ export default {
|
|||||||
this.quill.insertText(this.rangeIndex, element.innerHTML);
|
this.quill.insertText(this.rangeIndex, element.innerHTML);
|
||||||
this.rangeIndex += element.innerHTML.length
|
this.rangeIndex += element.innerHTML.length
|
||||||
element = null;
|
element = null;
|
||||||
if (this.$isDesktop) {
|
if (this.windowLarge) {
|
||||||
this.showEmoji = false;
|
this.showEmoji = false;
|
||||||
this.quill.setSelection(this.rangeIndex)
|
this.quill.setSelection(this.rangeIndex)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['cacheDialogs', 'userId']),
|
...mapState(['cacheDialogs']),
|
||||||
|
|
||||||
dialogData() {
|
dialogData() {
|
||||||
return this.cacheDialogs.find(({id}) => id == this.dialogId) || {};
|
return this.cacheDialogs.find(({id}) => id == this.dialogId) || {};
|
||||||
|
|||||||
@ -63,8 +63,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken']),
|
|
||||||
|
|
||||||
headers() {
|
headers() {
|
||||||
return {
|
return {
|
||||||
fd: $A.getSessionStorageString("userWsFd"),
|
fd: $A.getSessionStorageString("userWsFd"),
|
||||||
|
|||||||
@ -173,7 +173,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken', 'userId', 'dialogMsgs', 'audioPlaying']),
|
...mapState(['dialogMsgs', 'audioPlaying']),
|
||||||
|
|
||||||
viewClass() {
|
viewClass() {
|
||||||
const {msgData, operateAction, operateEnter} = this;
|
const {msgData, operateAction, operateEnter} = this;
|
||||||
|
|||||||
@ -54,13 +54,13 @@
|
|||||||
<ETooltip
|
<ETooltip
|
||||||
v-if="dialogData.group_type === 'user'"
|
v-if="dialogData.group_type === 'user'"
|
||||||
placement="top"
|
placement="top"
|
||||||
:disabled="!$isDesktop"
|
:disabled="windowSmall"
|
||||||
:openDelay="600"
|
:openDelay="600"
|
||||||
:content="$L('群设置')">
|
:content="$L('群设置')">
|
||||||
<i class="taskfont dialog-create" @click="groupInfoShow = true"></i>
|
<i class="taskfont dialog-create" @click="groupInfoShow = true"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</template>
|
</template>
|
||||||
<ETooltip v-else-if="dialogData.type === 'user' && !isMyDialog" placement="top" :disabled="!$isDesktop" :content="$L('创建群组')">
|
<ETooltip v-else-if="dialogData.type === 'user' && !isMyDialog" placement="top" :disabled="windowSmall" :content="$L('创建群组')">
|
||||||
<i class="taskfont dialog-create" @click="openCreateGroup"></i>
|
<i class="taskfont dialog-create" @click="openCreateGroup"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</div>
|
</div>
|
||||||
@ -124,7 +124,7 @@
|
|||||||
ref="input"
|
ref="input"
|
||||||
v-model="msgText"
|
v-model="msgText"
|
||||||
:dialog-id="dialogId"
|
:dialog-id="dialogId"
|
||||||
:emoji-bottom="!$isDesktop"
|
:emoji-bottom="windowSmall"
|
||||||
:maxlength="20000"
|
:maxlength="20000"
|
||||||
@on-focus="onEventFocus"
|
@on-focus="onEventFocus"
|
||||||
@on-blur="onEventBlur"
|
@on-blur="onEventBlur"
|
||||||
@ -340,11 +340,9 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'userId',
|
|
||||||
'cacheDialogs',
|
'cacheDialogs',
|
||||||
'dialogMsgs',
|
'dialogMsgs',
|
||||||
'wsOpenNum',
|
'wsOpenNum',
|
||||||
'windowScrollY',
|
|
||||||
'touchBackInProgress'
|
'touchBackInProgress'
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@ -477,7 +475,7 @@ export default {
|
|||||||
setTimeout(this.onToBottom, Math.max(0, 100 - (new Date().getTime() - startTime)));
|
setTimeout(this.onToBottom, Math.max(0, 100 - (new Date().getTime() - startTime)));
|
||||||
}).catch(_ => {});
|
}).catch(_ => {});
|
||||||
//
|
//
|
||||||
if (this.$isDesktop && this.desktopAutoFocus) {
|
if (this.windowLarge && this.desktopAutoFocus) {
|
||||||
this.$nextTick(_ => {
|
this.$nextTick(_ => {
|
||||||
this.$refs.input.focus()
|
this.$refs.input.focus()
|
||||||
})
|
})
|
||||||
@ -724,7 +722,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onEventEmojiVisibleChange(val) {
|
onEventEmojiVisibleChange(val) {
|
||||||
if (val && !this.$isDesktop) {
|
if (val && this.windowSmall) {
|
||||||
this.onToBottom();
|
this.onToBottom();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -56,14 +56,14 @@
|
|||||||
</Dropdown>
|
</Dropdown>
|
||||||
<template v-if="!file.only_view">
|
<template v-if="!file.only_view">
|
||||||
<div class="header-icons">
|
<div class="header-icons">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="$L('文件链接')">
|
<ETooltip :disabled="windowSmall" :content="$L('文件链接')">
|
||||||
<div class="header-icon" @click="handleClick('link')"><i class="taskfont"></i></div>
|
<div class="header-icon" @click="handleClick('link')"><i class="taskfont"></i></div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<EPopover v-model="historyShow" trigger="click">
|
<EPopover v-model="historyShow" trigger="click">
|
||||||
<div class="file-content-history">
|
<div class="file-content-history">
|
||||||
<FileHistory :value="historyShow" :file="file" @on-restore="onRestoreHistory"/>
|
<FileHistory :value="historyShow" :file="file" @on-restore="onRestoreHistory"/>
|
||||||
</div>
|
</div>
|
||||||
<ETooltip slot="reference" ref="historyTip" :disabled="!$isDesktop || historyShow" :content="$L('历史版本')">
|
<ETooltip slot="reference" ref="historyTip" :disabled="windowSmall || historyShow" :content="$L('历史版本')">
|
||||||
<div class="header-icon"><i class="taskfont"></i></div>
|
<div class="header-icon"><i class="taskfont"></i></div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</EPopover>
|
</EPopover>
|
||||||
@ -244,7 +244,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['wsMsg', 'userId']),
|
...mapState(['wsMsg']),
|
||||||
|
|
||||||
fileId() {
|
fileId() {
|
||||||
return this.file.id || 0
|
return this.file.id || 0
|
||||||
|
|||||||
@ -132,8 +132,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken', 'windowHeight']),
|
|
||||||
|
|
||||||
fileId() {
|
fileId() {
|
||||||
return this.file.id || 0
|
return this.file.id || 0
|
||||||
},
|
},
|
||||||
|
|||||||
@ -139,10 +139,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
|
||||||
...mapState(['userId'])
|
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
meetingShow(val) {
|
meetingShow(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
:current="page"
|
:current="page"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -78,9 +78,6 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getLists();
|
this.getLists();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapState(['windowMax768'])
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
keyIs(v) {
|
keyIs(v) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
|||||||
@ -106,7 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'windowWidth', 'taskPriority']),
|
...mapState(['taskPriority']),
|
||||||
|
|
||||||
...mapGetters(['projectData']),
|
...mapGetters(['projectData']),
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="operate-position" :style="operateStyles">
|
<div class="operate-position" :style="operateStyles">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
trigger="custom"
|
trigger="custom"
|
||||||
:placement="$isDesktop ? 'bottom' : 'top'"
|
:placement="windowLarge ? 'bottom' : 'top'"
|
||||||
:visible="operateVisible"
|
:visible="operateVisible"
|
||||||
@on-clickoutside="operateVisible = false"
|
@on-clickoutside="operateVisible = false"
|
||||||
transfer>
|
transfer>
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
:current="page"
|
:current="page"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -90,9 +90,6 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getLists();
|
this.getLists();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapState(['windowMax768'])
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
keyIs(v) {
|
keyIs(v) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<template v-if="!(windowWidth <= 980 || projectData.cacheParameter.chat) && projectUser.length > 0" v-for="item in projectUser">
|
<template v-if="!(windowWidth <= 980 || projectData.cacheParameter.chat) && projectUser.length > 0" v-for="item in projectUser">
|
||||||
<li v-if="item.userid === -1" class="more">
|
<li v-if="item.userid === -1" class="more">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="$L('共' + (projectData.project_user.length) + '个成员')">
|
<ETooltip :disabled="windowSmall" :content="$L('共' + (projectData.project_user.length) + '个成员')">
|
||||||
<Icon type="ios-more"/>
|
<Icon type="ios-more"/>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</li>
|
</li>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="project-icon" @click="addTaskOpen(0)">
|
<li class="project-icon" @click="addTaskOpen(0)">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="$L('添加任务')">
|
<ETooltip :disabled="windowSmall" :content="$L('添加任务')">
|
||||||
<Icon class="menu-icon" type="md-add" />
|
<Icon class="menu-icon" type="md-add" />
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</li>
|
</li>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<Draggable
|
<Draggable
|
||||||
:list="columnList"
|
:list="columnList"
|
||||||
:animation="150"
|
:animation="150"
|
||||||
:disabled="sortDisabled || !$isDesktop"
|
:disabled="sortDisabled || windowSmall"
|
||||||
class="column-list"
|
class="column-list"
|
||||||
tag="ul"
|
tag="ul"
|
||||||
draggable=".column-item"
|
draggable=".column-item"
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<Draggable
|
<Draggable
|
||||||
:list="column.tasks"
|
:list="column.tasks"
|
||||||
:animation="150"
|
:animation="150"
|
||||||
:disabled="sortDisabled || !$isDesktop"
|
:disabled="sortDisabled || windowSmall"
|
||||||
class="task-list"
|
class="task-list"
|
||||||
draggable=".task-draggable"
|
draggable=".task-draggable"
|
||||||
filter=".complete"
|
filter=".complete"
|
||||||
@ -196,7 +196,7 @@
|
|||||||
<ETooltip
|
<ETooltip
|
||||||
v-if="item.end_at"
|
v-if="item.end_at"
|
||||||
:class="['task-time', item.today ? 'today' : '', item.overdue ? 'overdue' : '']"
|
:class="['task-time', item.today ? 'today' : '', item.overdue ? 'overdue' : '']"
|
||||||
:disabled="!$isDesktop"
|
:disabled="windowSmall"
|
||||||
:open-delay="600"
|
:open-delay="600"
|
||||||
:content="item.end_at">
|
:content="item.end_at">
|
||||||
<div v-if="!item.complete_at"><i class="taskfont"></i>{{ expiresFormat(item.end_at) }}</div>
|
<div v-if="!item.complete_at"><i class="taskfont"></i>{{ expiresFormat(item.end_at) }}</div>
|
||||||
@ -537,9 +537,6 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'windowWidth',
|
|
||||||
|
|
||||||
'userId',
|
|
||||||
'cacheDialogs',
|
'cacheDialogs',
|
||||||
|
|
||||||
'projectId',
|
'projectId',
|
||||||
@ -847,7 +844,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
showDesc() {
|
showDesc() {
|
||||||
if (this.$isDesktop) {
|
if (this.windowLarge) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$A.modalInfo({
|
$A.modalInfo({
|
||||||
@ -1424,7 +1421,7 @@ export default {
|
|||||||
if (data === 'completedTask') {
|
if (data === 'completedTask') {
|
||||||
this.$store.dispatch("forgetTaskCompleteTemp", true);
|
this.$store.dispatch("forgetTaskCompleteTemp", true);
|
||||||
} else if (data === 'chat') {
|
} else if (data === 'chat') {
|
||||||
if (!this.$isDesktop) {
|
if (this.windowSmall) {
|
||||||
this.goForward({name: 'manage-messenger', params: {dialogId: this.projectData.dialog_id}});
|
this.goForward({name: 'manage-messenger', params: {dialogId: this.projectData.dialog_id}});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
<Draggable
|
<Draggable
|
||||||
:list="data.project_flow_item"
|
:list="data.project_flow_item"
|
||||||
:animation="150"
|
:animation="150"
|
||||||
:disabled="!$isDesktop"
|
:disabled="windowSmall"
|
||||||
class="taskflow-config-table-list-wrapper"
|
class="taskflow-config-table-list-wrapper"
|
||||||
tag="div"
|
tag="div"
|
||||||
draggable=".column-border"
|
draggable=".column-border"
|
||||||
|
|||||||
@ -12,13 +12,13 @@
|
|||||||
<Radio label="daily" :disabled="id > 0 && reportData.type =='weekly'">{{ $L("日报") }}</Radio>
|
<Radio label="daily" :disabled="id > 0 && reportData.type =='weekly'">{{ $L("日报") }}</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<ButtonGroup v-if="id === 0" class="report-buttongroup">
|
<ButtonGroup v-if="id === 0" class="report-buttongroup">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="prevCycleText" placement="bottom">
|
<ETooltip :disabled="windowSmall" :content="prevCycleText" placement="bottom">
|
||||||
<Button type="primary" @click="prevCycle">
|
<Button type="primary" @click="prevCycle">
|
||||||
<Icon type="ios-arrow-back" />
|
<Icon type="ios-arrow-back" />
|
||||||
</Button>
|
</Button>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<div class="report-buttongroup-vertical"></div>
|
<div class="report-buttongroup-vertical"></div>
|
||||||
<ETooltip :disabled="!$isDesktop || reportData.offset >= 0" :content="nextCycleText" placement="bottom">
|
<ETooltip :disabled="windowSmall || reportData.offset >= 0" :content="nextCycleText" placement="bottom">
|
||||||
<Button type="primary" @click="nextCycle" :disabled="reportData.offset >= 0">
|
<Button type="primary" @click="nextCycle" :disabled="reportData.offset >= 0">
|
||||||
<Icon type="ios-arrow-forward" />
|
<Icon type="ios-arrow-forward" />
|
||||||
</Button>
|
</Button>
|
||||||
@ -93,9 +93,6 @@ export default {
|
|||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapState(["userId"])
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
//
|
//
|
||||||
},
|
},
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
:current="listPage"
|
:current="listPage"
|
||||||
:page-size="listPageSize"
|
:page-size="listPageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -98,9 +98,6 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getLists();
|
this.getLists();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapState(['windowMax768'])
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
keyIs(v) {
|
keyIs(v) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
:current="listPage"
|
:current="listPage"
|
||||||
:page-size="listPageSize"
|
:page-size="listPageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -101,9 +101,6 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getLists();
|
this.getLists();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapState(['userId', 'windowMax768'])
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
keyIs(v) {
|
keyIs(v) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
:plugins="taskPlugins"
|
:plugins="taskPlugins"
|
||||||
:options="taskOptions"
|
:options="taskOptions"
|
||||||
:option-full="taskOptionFull"
|
:option-full="taskOptionFull"
|
||||||
:placeholder="$L($isDesktop ? '详细描述,选填...(点击右键使用工具栏)' : '详细描述,选填...')"
|
:placeholder="$L(windowLarge ? '详细描述,选填...(点击右键使用工具栏)' : '详细描述,选填...')"
|
||||||
:placeholderFull="$L('详细描述...')"
|
:placeholderFull="$L('详细描述...')"
|
||||||
inline/>
|
inline/>
|
||||||
</div>
|
</div>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<Button :class="{advanced: advanced}" @click="advanced=!advanced">{{$L('高级选项')}}</Button>
|
<Button :class="{advanced: advanced}" @click="advanced=!advanced">{{$L('高级选项')}}</Button>
|
||||||
<ul class="advanced-priority">
|
<ul class="advanced-priority">
|
||||||
<li v-for="(item, key) in taskPriority" :key="key">
|
<li v-for="(item, key) in taskPriority" :key="key">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="taskPriorityContent(item)">
|
<ETooltip :disabled="windowSmall" :content="taskPriorityContent(item)">
|
||||||
<i
|
<i
|
||||||
class="taskfont"
|
class="taskfont"
|
||||||
:style="{color:item.color}"
|
:style="{color:item.color}"
|
||||||
@ -86,7 +86,7 @@
|
|||||||
:transfer="false"/>
|
:transfer="false"/>
|
||||||
<div v-if="showAddAssist" class="task-add-assist">
|
<div v-if="showAddAssist" class="task-add-assist">
|
||||||
<Checkbox v-model="addData.add_assist" :true-value="1" :false-value="0">{{$L('加入任务协助人员列表')}}</Checkbox>
|
<Checkbox v-model="addData.add_assist" :true-value="1" :false-value="0">{{$L('加入任务协助人员列表')}}</Checkbox>
|
||||||
<ETooltip :disabled="!$isDesktop" :content="$L('你不是任务负责人时建议加入任务协助人员列表')">
|
<ETooltip :disabled="windowSmall" :content="$L('你不是任务负责人时建议加入任务协助人员列表')">
|
||||||
<Icon type="ios-alert-outline" />
|
<Icon type="ios-alert-outline" />
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</div>
|
</div>
|
||||||
@ -232,7 +232,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'cacheProjects', 'projectId', 'cacheColumns', 'taskPriority']),
|
...mapState(['cacheProjects', 'projectId', 'cacheColumns', 'taskPriority']),
|
||||||
|
|
||||||
taskDays() {
|
taskDays() {
|
||||||
const {times} = this.addData;
|
const {times} = this.addData;
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<div v-if="parentId == 0" class="priority">
|
<div v-if="parentId == 0" class="priority">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(item, key) in taskPriority" :key="key">
|
<li v-for="(item, key) in taskPriority" :key="key">
|
||||||
<ETooltip v-if="active" :disabled="!$isDesktop" :content="taskPriorityContent(item)">
|
<ETooltip v-if="active" :disabled="windowSmall" :content="taskPriorityContent(item)">
|
||||||
<i
|
<i
|
||||||
class="taskfont"
|
class="taskfont"
|
||||||
:style="{color:item.color}"
|
:style="{color:item.color}"
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="priority">
|
<div class="priority">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(item, key) in taskPriority" :key="key">
|
<li v-for="(item, key) in taskPriority" :key="key">
|
||||||
<ETooltip v-if="active" :disabled="!$isDesktop" :content="taskPriorityContent(item)">
|
<ETooltip v-if="active" :disabled="windowSmall" :content="taskPriorityContent(item)">
|
||||||
<i
|
<i
|
||||||
class="taskfont"
|
class="taskfont"
|
||||||
:style="{color:item.color}"
|
:style="{color:item.color}"
|
||||||
@ -126,7 +126,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'taskPriority']),
|
...mapState(['taskPriority']),
|
||||||
|
|
||||||
typeName() {
|
typeName() {
|
||||||
return (this.parentId > 0 ? '子任务' : '任务');
|
return (this.parentId > 0 ? '子任务' : '任务');
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
:current="page"
|
:current="page"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['cacheTasks', 'windowMax768'])
|
...mapState(['cacheTasks'])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
projectId: {
|
projectId: {
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
:current="page"
|
:current="page"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['cacheTasks', 'windowMax768'])
|
...mapState(['cacheTasks'])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
projectId: {
|
projectId: {
|
||||||
|
|||||||
@ -120,7 +120,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<Button slot="reference" :loading="ownerLoad > 0" class="pick" type="primary">{{$L('我要领取任务')}}</Button>
|
<Button slot="reference" :loading="ownerLoad > 0" class="pick" type="primary">{{$L('我要领取任务')}}</Button>
|
||||||
</EPopover>
|
</EPopover>
|
||||||
<ETooltip v-if="$Electron" :disabled="!$isDesktop" :content="$L('新窗口打开')">
|
<ETooltip v-if="$Electron" :disabled="windowSmall" :content="$L('新窗口打开')">
|
||||||
<i class="taskfont open" @click="openNewWin"></i>
|
<i class="taskfont open" @click="openNewWin"></i>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
@ -548,17 +548,12 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'userId',
|
|
||||||
'userToken',
|
|
||||||
'cacheProjects',
|
'cacheProjects',
|
||||||
'cacheColumns',
|
'cacheColumns',
|
||||||
'cacheTasks',
|
'cacheTasks',
|
||||||
'taskContents',
|
'taskContents',
|
||||||
'taskFiles',
|
'taskFiles',
|
||||||
'taskPriority',
|
'taskPriority',
|
||||||
|
|
||||||
'windowMax768',
|
|
||||||
'windowHeight'
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
projectName() {
|
projectName() {
|
||||||
@ -614,7 +609,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
hasOpenDialog() {
|
hasOpenDialog() {
|
||||||
return this.taskDetail.dialog_id > 0 && !this.windowMax768;
|
return this.taskDetail.dialog_id > 0 && this.windowLarge;
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogStyle() {
|
dialogStyle() {
|
||||||
@ -746,7 +741,7 @@ export default {
|
|||||||
this.$refs.owner && this.$refs.owner.handleClose();
|
this.$refs.owner && this.$refs.owner.handleClose();
|
||||||
this.$refs.assist && this.$refs.assist.handleClose();
|
this.$refs.assist && this.$refs.assist.handleClose();
|
||||||
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
||||||
if (!this.$isDesktop) {
|
if (this.windowSmall) {
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1106,7 +1101,7 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.windowMax768) {
|
if (this.windowSmall) {
|
||||||
this.$store.state.dialogMsgTransfer = {
|
this.$store.state.dialogMsgTransfer = {
|
||||||
time: $A.Time() + 10,
|
time: $A.Time() + 10,
|
||||||
msgText: this.msgText,
|
msgText: this.msgText,
|
||||||
|
|||||||
@ -86,7 +86,7 @@
|
|||||||
<ETooltip
|
<ETooltip
|
||||||
v-if="!item.complete_at && item.end_at"
|
v-if="!item.complete_at && item.end_at"
|
||||||
:class="['task-time', item.today ? 'today' : '', item.overdue ? 'overdue' : '']"
|
:class="['task-time', item.today ? 'today' : '', item.overdue ? 'overdue' : '']"
|
||||||
:disabled="!$isDesktop"
|
:disabled="windowSmall"
|
||||||
:open-delay="600"
|
:open-delay="600"
|
||||||
:content="item.end_at">
|
:content="item.end_at">
|
||||||
<div @click="openTask(item)">{{expiresFormat(item.end_at)}}</div>
|
<div @click="openTask(item)">{{expiresFormat(item.end_at)}}</div>
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
:current="page"
|
:current="page"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:disabled="loadIng > 0"
|
:disabled="loadIng > 0"
|
||||||
:simple="windowMax768"
|
:simple="windowSmall"
|
||||||
:page-size-opts="[10,20,30,50,100]"
|
:page-size-opts="[10,20,30,50,100]"
|
||||||
show-elevator
|
show-elevator
|
||||||
show-sizer
|
show-sizer
|
||||||
@ -157,9 +157,6 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getLists();
|
this.getLists();
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapState(['windowMax768'])
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
keyIs(v) {
|
keyIs(v) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
<em>{{item.sub_complete}}/{{item.sub_num}}</em>
|
<em>{{item.sub_complete}}/{{item.sub_num}}</em>
|
||||||
</div>
|
</div>
|
||||||
<ETooltip v-if="item.end_at" :disabled="!$isDesktop" :content="item.end_at" placement="right">
|
<ETooltip v-if="item.end_at" :disabled="windowSmall" :content="item.end_at" placement="right">
|
||||||
<div :class="['item-icon', item.today ? 'today' : '', item.overdue ? 'overdue' : '']">
|
<div :class="['item-icon', item.today ? 'today' : '', item.overdue ? 'overdue' : '']">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
<em>{{expiresFormat(item.end_at)}}</em>
|
<em>{{expiresFormat(item.end_at)}}</em>
|
||||||
|
|||||||
@ -516,7 +516,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'userToken', 'userIsAdmin', 'userInfo', 'files', 'wsOpenNum', 'windowHeight']),
|
...mapState(['userIsAdmin', 'userInfo', 'files', 'wsOpenNum']),
|
||||||
|
|
||||||
pid() {
|
pid() {
|
||||||
const {folderId} = this.$route.params;
|
const {folderId} = this.$route.params;
|
||||||
|
|||||||
@ -102,7 +102,7 @@
|
|||||||
<div class="operate-position" :style="operateStyles">
|
<div class="operate-position" :style="operateStyles">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
trigger="custom"
|
trigger="custom"
|
||||||
:placement="$isDesktop ? 'bottom' : 'top'"
|
:placement="windowLarge ? 'bottom' : 'top'"
|
||||||
:visible="operateVisible"
|
:visible="operateVisible"
|
||||||
@on-clickoutside="operateVisible = false"
|
@on-clickoutside="operateVisible = false"
|
||||||
transfer>
|
transfer>
|
||||||
@ -186,7 +186,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'cacheDialogs', 'loadDialogs', 'windowMax768']),
|
...mapState(['cacheDialogs', 'loadDialogs']),
|
||||||
|
|
||||||
dialogId() {
|
dialogId() {
|
||||||
const {dialogId} = this.$route.params;
|
const {dialogId} = this.$route.params;
|
||||||
@ -397,7 +397,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
openContacts(user) {
|
openContacts(user) {
|
||||||
if (this.$isDesktop) {
|
if (this.windowLarge) {
|
||||||
this.tabActive = 'dialog';
|
this.tabActive = 'dialog';
|
||||||
}
|
}
|
||||||
this.$store.dispatch("openDialogUserid", user.userid).then(({data}) => {
|
this.$store.dispatch("openDialogUserid", user.userid).then(({data}) => {
|
||||||
@ -508,7 +508,7 @@ export default {
|
|||||||
|
|
||||||
scrollIntoActive() {
|
scrollIntoActive() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$isDesktop && this.$refs.list) {
|
if (this.windowLarge && this.$refs.list) {
|
||||||
const active = this.$refs.list.querySelector(".active")
|
const active = this.$refs.list.querySelector(".active")
|
||||||
if (active) {
|
if (active) {
|
||||||
$A.scrollIntoViewIfNeeded(active);
|
$A.scrollIntoViewIfNeeded(active);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<ProjectPanel/>
|
<ProjectPanel/>
|
||||||
<ProjectDialog v-if="projectData.cacheParameter.chat"/>
|
<ProjectDialog v-if="projectData.cacheParameter.chat"/>
|
||||||
</template>
|
</template>
|
||||||
<ProjectList v-if="!$isDesktop" v-show="projectId === 0"/>
|
<ProjectList v-if="windowSmall" v-show="projectId === 0"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
<Radio label="close">{{$L('关闭')}}</Radio>
|
<Radio label="close">{{$L('关闭')}}</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<div class="form-tip">{{$L('任务完成后自动归档。')}}</div>
|
<div class="form-tip">{{$L('任务完成后自动归档。')}}</div>
|
||||||
<ETooltip v-if="formDatum.auto_archived=='open'" placement="right" :disabled="!$isDesktop">
|
<ETooltip v-if="formDatum.auto_archived=='open'" placement="right" :disabled="windowSmall">
|
||||||
<div class="setting-auto-day">
|
<div class="setting-auto-day">
|
||||||
<Input v-model="formDatum.archived_day" type="number">
|
<Input v-model="formDatum.archived_day" type="number">
|
||||||
<span slot="append">{{$L('天')}}</span>
|
<span slot="append">{{$L('天')}}</span>
|
||||||
|
|||||||
@ -4,12 +4,12 @@
|
|||||||
<Row class="setting-color">
|
<Row class="setting-color">
|
||||||
<Col span="12">{{$L('名称')}}</Col>
|
<Col span="12">{{$L('名称')}}</Col>
|
||||||
<Col span="4">
|
<Col span="4">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="$L('数值越小级别越高')" max-width="auto" placement="top" transfer>
|
<ETooltip :disabled="windowSmall" :content="$L('数值越小级别越高')" max-width="auto" placement="top" transfer>
|
||||||
<div><Icon class="information" type="ios-information-circle-outline" /> {{$L('级别')}}</div>
|
<div><Icon class="information" type="ios-information-circle-outline" /> {{$L('级别')}}</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span="4">
|
<Col span="4">
|
||||||
<ETooltip :disabled="!$isDesktop" :content="$L('任务完成时间')" max-width="auto" placement="top" transfer>
|
<ETooltip :disabled="windowSmall" :content="$L('任务完成时间')" max-width="auto" placement="top" transfer>
|
||||||
<div><Icon class="information" type="ios-information-circle-outline" /> {{$L('天数')}}</div>
|
<div><Icon class="information" type="ios-information-circle-outline" /> {{$L('天数')}}</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@ -73,7 +73,7 @@ export default {
|
|||||||
{path: 'language', name: '语言设置'},
|
{path: 'language', name: '语言设置'},
|
||||||
{path: 'password', name: '密码设置'},
|
{path: 'password', name: '密码设置'},
|
||||||
]
|
]
|
||||||
if (!this.$isDesktop) {
|
if (this.windowSmall) {
|
||||||
menu.push({path: 'clearCache', name: '清除缓存'})
|
menu.push({path: 'clearCache', name: '清除缓存'})
|
||||||
}
|
}
|
||||||
if (this.userIsAdmin) {
|
if (this.userIsAdmin) {
|
||||||
@ -105,7 +105,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
routeName: {
|
routeName: {
|
||||||
handler(name) {
|
handler(name) {
|
||||||
if (name === 'manage-setting' && this.$isDesktop) {
|
if (name === 'manage-setting' && this.windowLarge) {
|
||||||
this.goForward({name: 'manage-setting-personal'}, true);
|
this.goForward({name: 'manage-setting-personal'}, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -151,7 +151,7 @@ export default {
|
|||||||
|
|
||||||
classNameRoute(path, divided) {
|
classNameRoute(path, divided) {
|
||||||
return {
|
return {
|
||||||
"active": this.$isDesktop && this.routeName === `manage-setting-${path}`,
|
"active": this.windowLarge && this.routeName === `manage-setting-${path}`,
|
||||||
"divided": !!divided
|
"divided": !!divided
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
17
resources/assets/js/store/mixin.js
vendored
Normal file
17
resources/assets/js/store/mixin.js
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState([
|
||||||
|
'windowWidth',
|
||||||
|
'windowHeight',
|
||||||
|
'windowScrollY',
|
||||||
|
|
||||||
|
'windowLarge',
|
||||||
|
'windowSmall',
|
||||||
|
|
||||||
|
'userId',
|
||||||
|
'userToken',
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
5
resources/assets/js/store/state.js
vendored
5
resources/assets/js/store/state.js
vendored
@ -4,8 +4,9 @@ const stateData = {
|
|||||||
windowHeight: window.innerHeight,
|
windowHeight: window.innerHeight,
|
||||||
windowScrollY: 0,
|
windowScrollY: 0,
|
||||||
|
|
||||||
// 浏览器宽度≤768返回true
|
// 浏览器窗口类型
|
||||||
windowMax768: window.innerWidth <= 768,
|
windowLarge: window.innerWidth > 768, // 大窗口
|
||||||
|
windowSmall: window.innerWidth <= 768, // 小窗口
|
||||||
|
|
||||||
// 播放中的音频地址
|
// 播放中的音频地址
|
||||||
audioPlaying: null,
|
audioPlaying: null,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user