mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 14:12:51 +00:00
Merge branch 'master' into develop
# Conflicts: # electron/package.json # package.json # public/js/app.js # public/js/build/221.js # public/js/build/501.js # public/js/build/747.js # public/js/build/862.js # public/js/build/984.js
This commit is contained in:
commit
4785cae8f0
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/206.js
vendored
2
public/js/build/206.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
2
public/js/build/304.js
vendored
Normal file
2
public/js/build/304.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* clipboard.js v2.0.10
|
* clipboard.js v2.0.8
|
||||||
* https://clipboardjs.com/
|
* https://clipboardjs.com/
|
||||||
*
|
*
|
||||||
* Licensed MIT © Zeno Rocha
|
* Licensed MIT © Zeno Rocha
|
||||||
2
public/js/build/486.js
vendored
2
public/js/build/486.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
2
public/js/build/494.js
vendored
2
public/js/build/494.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/510.js
vendored
2
public/js/build/510.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/528.js
vendored
2
public/js/build/528.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
public/js/build/747.js
vendored
2
public/js/build/747.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/856.js
vendored
2
public/js/build/856.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
/*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */
|
/*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */
|
||||||
|
|||||||
2
public/js/build/862.js
vendored
2
public/js/build/862.js
vendored
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* clipboard.js v2.0.10
|
* clipboard.js v2.0.8
|
||||||
* https://clipboardjs.com/
|
* https://clipboardjs.com/
|
||||||
*
|
*
|
||||||
* Licensed MIT © Zeno Rocha
|
* Licensed MIT © Zeno Rocha
|
||||||
|
|||||||
2
public/js/build/889.js
vendored
2
public/js/build/889.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
public/js/build/954.js
vendored
2
public/js/build/954.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
@ -1,8 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="quick-edit" :class="[alwaysIcon ? 'quick-always' : '']">
|
<div class="quick-edit" :class="[alwaysIcon ? 'quick-always' : '']">
|
||||||
<div v-if="isEdit" v-clickoutside="onClickOut" class="quick-input">
|
<div v-if="isEdit" v-clickoutside="onClickOut" class="quick-input">
|
||||||
<TagInput v-if="isTag" ref="input" v-model="content" :disabled="isLoad" @on-enter="onEnter" @on-blur="onBlur"/>
|
<TagInput
|
||||||
<Input v-else ref="input" v-model="content" :disabled="isLoad" @on-enter="onEnter" @on-blur="onBlur"/>
|
v-if="isTag"
|
||||||
|
ref="input"
|
||||||
|
v-model="content"
|
||||||
|
:disabled="isLoad"
|
||||||
|
@on-keyup="onKeyup"
|
||||||
|
@on-blur="onBlur"/>
|
||||||
|
<Input
|
||||||
|
v-else
|
||||||
|
ref="input"
|
||||||
|
v-model="content"
|
||||||
|
:disabled="isLoad"
|
||||||
|
@on-keyup="onKeyup"
|
||||||
|
@on-blur="onBlur"/>
|
||||||
<div v-if="isLoad" class="quick-loading"><Loading/></div>
|
<div v-if="isLoad" class="quick-loading"><Loading/></div>
|
||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@ -54,9 +66,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
isEdit(val) {
|
|
||||||
this.$emit("on-edit-change", val);
|
|
||||||
},
|
|
||||||
autoEdit(val) {
|
autoEdit(val) {
|
||||||
if (val === true) {
|
if (val === true) {
|
||||||
setTimeout(this.onEdit, 0)
|
setTimeout(this.onEdit, 0)
|
||||||
@ -65,9 +74,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
onEditChange(val) {
|
||||||
|
this.isEdit = val;
|
||||||
|
this.$emit("on-edit-change", val);
|
||||||
|
},
|
||||||
|
|
||||||
onEdit() {
|
onEdit() {
|
||||||
this.content = this.value;
|
this.content = this.value;
|
||||||
this.isEdit = true;
|
this.onEditChange(true);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.input.focus({
|
this.$refs.input.focus({
|
||||||
cursor: 'all'
|
cursor: 'all'
|
||||||
@ -75,9 +89,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onKeyup(e) {
|
||||||
|
if (e.keyCode === 13) {
|
||||||
|
this.onEnter();
|
||||||
|
} else if (e.keyCode === 27) {
|
||||||
|
this.isEdit = false;
|
||||||
|
this.isLoad = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onEnter() {
|
onEnter() {
|
||||||
if (this.content == this.value) {
|
if (this.content == this.value) {
|
||||||
this.isEdit = false;
|
this.onEditChange(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.isLoad) {
|
if (this.isLoad) {
|
||||||
@ -86,7 +109,7 @@ export default {
|
|||||||
this.isLoad = true;
|
this.isLoad = true;
|
||||||
this.$emit("input", this.content);
|
this.$emit("input", this.content);
|
||||||
this.$emit("on-update", this.content, () => {
|
this.$emit("on-update", this.content, () => {
|
||||||
this.isEdit = false;
|
this.onEditChange(false);
|
||||||
this.isLoad = false;
|
this.isLoad = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -99,7 +122,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onBlur() {
|
onBlur() {
|
||||||
if (this.clickOutSide) {
|
if (this.clickOutSide || !this.isEdit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.onEnter();
|
this.onEnter();
|
||||||
|
|||||||
@ -181,11 +181,7 @@
|
|||||||
newValue = "";
|
newValue = "";
|
||||||
}
|
}
|
||||||
if (!this.isTyping) {
|
if (!this.isTyping) {
|
||||||
if (this.getEditor() !== null) {
|
this.setContent(newValue);
|
||||||
this.getEditor().setContent(newValue);
|
|
||||||
} else{
|
|
||||||
this.content = newValue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
readOnly(value) {
|
readOnly(value) {
|
||||||
@ -459,6 +455,14 @@
|
|||||||
return this.getEditor().getContent();
|
return this.getEditor().getContent();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setContent(content) {
|
||||||
|
if (this.getEditor() === null) {
|
||||||
|
this.content = content;
|
||||||
|
} else if (content != this.getEditor().getContent()){
|
||||||
|
this.getEditor().setContent(content);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
insertImage(src) {
|
insertImage(src) {
|
||||||
this.insertContent('<img src="' + src + '">');
|
this.insertContent('<img src="' + src + '">');
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
:placeholder="tis || placeholderText"
|
:placeholder="tis || placeholderText"
|
||||||
@keydown.enter="downEnter($event)"
|
@keydown.enter="downEnter($event)"
|
||||||
@keydown.delete="delTag(false)"
|
@keydown.delete="delTag(false)"
|
||||||
@keyup="addTag($event, content)"
|
@keyup="onKeyup"
|
||||||
@focus="onFocus"
|
@focus="onFocus"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@ -158,19 +158,22 @@
|
|||||||
this.addTag(false, this.content)
|
this.addTag(false, this.content)
|
||||||
this.$emit("on-blur", e)
|
this.$emit("on-blur", e)
|
||||||
},
|
},
|
||||||
|
onKeyup(e) {
|
||||||
|
this.addTag(e, this.content);
|
||||||
|
//
|
||||||
|
this.$emit("on-keyup", e)
|
||||||
|
if (e.keyCode === 13) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$emit("on-enter", e)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
addTag(e, content) {
|
addTag(e, content) {
|
||||||
|
|
||||||
if (e === false || e.keyCode === 13) {
|
if (e === false || e.keyCode === 13) {
|
||||||
if (content.trim() != '' && this.disSource.indexOf(content.trim()) === -1) {
|
if (content.trim() != '' && this.disSource.indexOf(content.trim()) === -1) {
|
||||||
this.disSource.push(content.trim());
|
this.disSource.push(content.trim());
|
||||||
}
|
}
|
||||||
this.content = '';
|
this.content = '';
|
||||||
//
|
|
||||||
if (e.keyCode === 13) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$emit("on-enter", e)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.max > 0 && this.disSource.length >= this.max) {
|
if (this.max > 0 && this.disSource.length >= this.max) {
|
||||||
|
|||||||
@ -103,7 +103,9 @@
|
|||||||
<li @click="toggleRoute('dashboard')" :class="classNameRoute('dashboard')">
|
<li @click="toggleRoute('dashboard')" :class="classNameRoute('dashboard')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
<div class="menu-title">{{$L('仪表盘')}}</div>
|
<div class="menu-title">{{$L('仪表盘')}}</div>
|
||||||
<Badge class="menu-badge" :type="dashboardTask.overdue.length > 0 ? 'error' : 'primary'" :count="dashboardTotal"></Badge>
|
<Badge v-if="dashboardTask.overdue.length > 0" class="menu-badge" type="error" :count="dashboardTask.overdue.length"/>
|
||||||
|
<Badge v-else-if="dashboardTask.today.length > 0" class="menu-badge" type="info" :count="dashboardTask.today.length"/>
|
||||||
|
<Badge v-else-if="dashboardTask.all.length > 0" class="menu-badge" type="primary" :count="dashboardTask.all.length"/>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleRoute('calendar')" :class="classNameRoute('calendar')">
|
<li @click="toggleRoute('calendar')" :class="classNameRoute('calendar')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
@ -112,7 +114,7 @@
|
|||||||
<li @click="toggleRoute('messenger')" :class="classNameRoute('messenger')">
|
<li @click="toggleRoute('messenger')" :class="classNameRoute('messenger')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
<div class="menu-title">{{$L('消息')}}</div>
|
<div class="menu-title">{{$L('消息')}}</div>
|
||||||
<Badge class="menu-badge" :count="msgAllUnread"></Badge>
|
<Badge class="menu-badge" :count="msgAllUnread"/>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleRoute('file')" :class="classNameRoute('file')">
|
<li @click="toggleRoute('file')" :class="classNameRoute('file')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
@ -257,15 +259,15 @@
|
|||||||
<!--任务详情-->
|
<!--任务详情-->
|
||||||
<Modal
|
<Modal
|
||||||
:value="taskId > 0"
|
:value="taskId > 0"
|
||||||
:mask-closable="false"
|
|
||||||
:styles="{
|
:styles="{
|
||||||
width: '90%',
|
width: '90%',
|
||||||
maxWidth: taskData.dialog_id ? '1200px' : '700px'
|
maxWidth: taskData.dialog_id ? '1200px' : '700px'
|
||||||
}"
|
}"
|
||||||
@on-visible-change="taskVisibleChange"
|
:mask-closable="false"
|
||||||
footer-hide>
|
:footer-hide="true"
|
||||||
|
@on-visible-change="taskVisibleChange">
|
||||||
<div class="page-manage-task-modal" :style="taskStyle">
|
<div class="page-manage-task-modal" :style="taskStyle">
|
||||||
<TaskDetail :task-id="taskId" :open-task="taskData"/>
|
<TaskDetail ref="taskDetail" :task-id="taskId" :open-task="taskData"/>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
@ -464,12 +466,8 @@ export default {
|
|||||||
return num;
|
return num;
|
||||||
},
|
},
|
||||||
|
|
||||||
dashboardTotal() {
|
|
||||||
return this.dashboardTask.today.length + this.dashboardTask.overdue.length
|
|
||||||
},
|
|
||||||
|
|
||||||
unreadTotal() {
|
unreadTotal() {
|
||||||
return this.msgAllUnread + this.dashboardTotal + this.reportUnreadNumber;
|
return this.msgAllUnread + this.dashboardTask.overdue.length + this.reportUnreadNumber;
|
||||||
},
|
},
|
||||||
|
|
||||||
currentLanguage() {
|
currentLanguage() {
|
||||||
@ -836,10 +834,13 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shortcutEvent(e) {
|
shortcutEvent(e) {
|
||||||
if (e.keyCode === 75 || e.keyCode === 78) {
|
if (e.metaKey || e.ctrlKey) {
|
||||||
if (e.metaKey || e.ctrlKey) {
|
if (e.keyCode === 75 || e.keyCode === 78) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.onAddTask(0)
|
this.onAddTask(0)
|
||||||
|
} else if (e.keyCode === 83 && this.taskId > 0) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.$refs.taskDetail.checkUpdate(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<li v-if="ready && taskDetail.parent_id > 0">
|
<li v-if="ready && taskDetail.parent_id > 0">
|
||||||
<div class="subtask-icon">
|
<div class="subtask-icon">
|
||||||
<TaskMenu
|
<TaskMenu
|
||||||
|
v-if="taskId > 0"
|
||||||
:ref="`taskMenu_${taskDetail.id}`"
|
:ref="`taskMenu_${taskDetail.id}`"
|
||||||
:task="taskDetail"
|
:task="taskDetail"
|
||||||
:load-status="taskDetail.loading === true"
|
:load-status="taskDetail.loading === true"
|
||||||
@ -72,6 +73,7 @@
|
|||||||
<div v-show="taskDetail.id > 0" class="task-info">
|
<div v-show="taskDetail.id > 0" class="task-info">
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<TaskMenu
|
<TaskMenu
|
||||||
|
v-if="taskId > 0"
|
||||||
:ref="`taskMenu_${taskDetail.id}`"
|
:ref="`taskMenu_${taskDetail.id}`"
|
||||||
:task="taskDetail"
|
:task="taskDetail"
|
||||||
class="icon"
|
class="icon"
|
||||||
@ -121,6 +123,7 @@
|
|||||||
</ETooltip>
|
</ETooltip>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<TaskMenu
|
<TaskMenu
|
||||||
|
v-if="taskId > 0"
|
||||||
:task="taskDetail"
|
:task="taskDetail"
|
||||||
icon="ios-more"
|
icon="ios-more"
|
||||||
completed-icon="ios-more"
|
completed-icon="ios-more"
|
||||||
@ -150,7 +153,6 @@
|
|||||||
:option-full="taskOptionFull"
|
:option-full="taskOptionFull"
|
||||||
:placeholder="$L('详细描述...')"
|
:placeholder="$L('详细描述...')"
|
||||||
@on-blur="updateData('content')"
|
@on-blur="updateData('content')"
|
||||||
@editorSave="updateData('content')"
|
|
||||||
inline/>
|
inline/>
|
||||||
</div>
|
</div>
|
||||||
<Form class="items" label-position="left" label-width="auto" @submit.native.prevent>
|
<Form class="items" label-position="left" label-width="auto" @submit.native.prevent>
|
||||||
@ -307,7 +309,13 @@
|
|||||||
<i class="taskfont"></i>{{$L('子任务')}}
|
<i class="taskfont"></i>{{$L('子任务')}}
|
||||||
</div>
|
</div>
|
||||||
<ul class="item-content subtask">
|
<ul class="item-content subtask">
|
||||||
<TaskDetail v-for="(task, key) in subList" :key="key" :task-id="task.id" :open-task="task" :main-end-at="taskDetail.end_at"/>
|
<TaskDetail
|
||||||
|
v-for="(task, key) in subList"
|
||||||
|
:ref="`subTask_${task.id}`"
|
||||||
|
:key="key"
|
||||||
|
:task-id="task.id"
|
||||||
|
:open-task="task"
|
||||||
|
:main-end-at="taskDetail.end_at"/>
|
||||||
</ul>
|
</ul>
|
||||||
<ul :class="['item-content', subList.length === 0 ? 'nosub' : '']">
|
<ul :class="['item-content', subList.length === 0 ? 'nosub' : '']">
|
||||||
<li>
|
<li>
|
||||||
@ -745,12 +753,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onNameKeydown(e) {
|
onNameKeydown(e) {
|
||||||
if (e.keyCode === 83) {
|
if (e.keyCode === 13) {
|
||||||
if (e.metaKey || e.ctrlKey) {
|
|
||||||
e.preventDefault();
|
|
||||||
this.updateData('name');
|
|
||||||
}
|
|
||||||
} else if (e.keyCode === 13) {
|
|
||||||
if (!e.shiftKey) {
|
if (!e.shiftKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.updateData('name');
|
this.updateData('name');
|
||||||
@ -758,6 +761,40 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
checkUpdate(update) {
|
||||||
|
let isModify = false;
|
||||||
|
if (this.openTask.name != this.taskDetail.name) {
|
||||||
|
isModify = true;
|
||||||
|
if (update) {
|
||||||
|
this.updateData('name');
|
||||||
|
} else if (isModify) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.$refs.desc && this.$refs.desc.getContent() != this.taskContent) {
|
||||||
|
isModify = true;
|
||||||
|
if (update) {
|
||||||
|
this.updateData('content');
|
||||||
|
} else if (isModify) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.addsubShow && this.addsubName) {
|
||||||
|
isModify = true;
|
||||||
|
if (update) {
|
||||||
|
this.onAddsub();
|
||||||
|
} else if (isModify) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.subList.some(({id}) => {
|
||||||
|
if (this.$refs[`subTask_${id}`][0].checkUpdate(update)) {
|
||||||
|
isModify = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return isModify;
|
||||||
|
},
|
||||||
|
|
||||||
updateData(action, params) {
|
updateData(action, params) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'priority':
|
case 'priority':
|
||||||
|
|||||||
@ -87,9 +87,9 @@
|
|||||||
<li
|
<li
|
||||||
v-for="item in fileList"
|
v-for="item in fileList"
|
||||||
:class="{
|
:class="{
|
||||||
shear: shearIds.includes(item.id),
|
shear: shearIds.includes(item.id),
|
||||||
highlight: selectIds.includes(item.id),
|
highlight: selectIds.includes(item.id),
|
||||||
}"
|
}"
|
||||||
@contextmenu.prevent.stop="handleRightClick($event, item)"
|
@contextmenu.prevent.stop="handleRightClick($event, item)"
|
||||||
@click="openFile(item)">
|
@click="openFile(item)">
|
||||||
<div class="file-check" :class="{'file-checked':selectIds.includes(item.id)}" @click.stop="dropFile(item, 'select')">
|
<div class="file-check" :class="{'file-checked':selectIds.includes(item.id)}" @click.stop="dropFile(item, 'select')">
|
||||||
@ -121,7 +121,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
:disabled="!!item._load"
|
:disabled="!!item._load"
|
||||||
@on-blur="onBlur(item)"
|
@on-blur="onBlur(item)"
|
||||||
@on-enter="onEnter(item)"/>
|
@on-keyup="onKeyup($event, item)"/>
|
||||||
<div v-if="item._load" class="file-load"><Loading/></div>
|
<div v-if="item._load" class="file-load"><Loading/></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="file-name" :title="item.name">{{formatName(item)}}</div>
|
<div v-else class="file-name" :title="item.name">{{formatName(item)}}</div>
|
||||||
@ -959,7 +959,6 @@ export default {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'rename':
|
case 'rename':
|
||||||
this.$set(item, 'newname', item.name);
|
|
||||||
this.setEdit(item.id, true)
|
this.setEdit(item.id, true)
|
||||||
this.autoBlur(item.id)
|
this.autoBlur(item.id)
|
||||||
break;
|
break;
|
||||||
@ -1154,9 +1153,21 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onBlur(item) {
|
onBlur(item) {
|
||||||
|
if (this.files.find(({id, _edit}) => id == item.id && !_edit)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.onEnter(item);
|
this.onEnter(item);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onKeyup(e, item) {
|
||||||
|
if (e.keyCode === 13) {
|
||||||
|
this.onEnter(item);
|
||||||
|
} else if (e.keyCode === 27) {
|
||||||
|
this.setLoad(item.id, false)
|
||||||
|
this.setEdit(item.id, false)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onEnter(item) {
|
onEnter(item) {
|
||||||
let isCreate = !/^\d+$/.test(item.id);
|
let isCreate = !/^\d+$/.test(item.id);
|
||||||
if (!item.newname) {
|
if (!item.newname) {
|
||||||
@ -1204,6 +1215,9 @@ export default {
|
|||||||
let item = this.$store.state.files.find(({id}) => id == fileId)
|
let item = this.$store.state.files.find(({id}) => id == fileId)
|
||||||
if (item) {
|
if (item) {
|
||||||
this.$set(item, '_edit', is);
|
this.$set(item, '_edit', is);
|
||||||
|
if (is) {
|
||||||
|
this.$set(item, 'newname', item.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user