+ @command="dropAdd">
{{$L('添加')}}
@@ -342,14 +371,23 @@ export default {
ownerData: {},
ownerLoad: 0,
+ assistForce: false,
assistShow: false,
assistData: {},
assistLoad: 0,
+ addsubForce: false,
addsubShow: false,
addsubName: "",
addsubLoad: 0,
+ timeForce: false,
+ timeOpen: false,
+ timeValue: [],
+ timeOptions: {
+ shortcuts: []
+ },
+
nowTime: Math.round(new Date().getTime() / 1000),
nowInterval: null,
@@ -380,12 +418,6 @@ export default {
valid_elements : 'a[href|target=_blank],em,strong/b,div[align],span[style],a,br,img[src|alt|witdh|height],pre[class],code',
toolbar: 'uploadImages | uploadFiles | bold italic underline forecolor backcolor | codesample | preview screenload'
},
-
- timeOpen: false,
- timeValue: [],
- timeOptions: {
- shortcuts: []
- },
}
},
@@ -410,7 +442,7 @@ export default {
if (!innerHeight) {
return {};
}
- if (!taskDetail._dialog) {
+ if (!taskDetail.dialog_id) {
return {};
}
return {
@@ -423,7 +455,7 @@ export default {
if (!innerHeight) {
return {};
}
- if (taskDetail._dialog || taskDetail._msgText) {
+ if (taskDetail.dialog_id) {
return {
minHeight: (innerHeight - 70 - 66 - 30) + 'px'
}
@@ -493,16 +525,9 @@ export default {
name: '优先级',
});
}
- if (!($A.isArray(taskDetail.task_user) && taskDetail.task_user.find(({owner}) => owner === 1))) {
- list.push({
- command: 'owner',
- icon: '',
- name: '负责人',
- });
- }
if (!($A.isArray(taskDetail.task_user) && taskDetail.task_user.find(({owner}) => owner !== 1))) {
list.push({
- command: 'owner',
+ command: 'assist',
icon: '',
name: '协助人员',
});
@@ -542,9 +567,14 @@ export default {
},
'openTask._show' (v) {
if (v) {
- this.$nextTick(this.$refs.input.focus)
+ this.$nextTick(() => {
+ this.$refs.input.focus()
+ });
} else {
this.timeOpen = false;
+ this.timeForce = false;
+ this.assistForce = false;
+ this.addsubForce = false;
}
}
},
@@ -653,14 +683,17 @@ export default {
},
dropTask(command) {
- if (command === 'complete') {
- this.updateData('complete')
- }
- else if (command === 'uncomplete') {
- this.updateData('uncomplete')
- }
- else if (command === 'delete') {
- this.archivedOrRemoveTask('delete');
+ switch (command) {
+ case 'complete':
+ this.updateData('complete')
+ break;
+ case 'uncomplete':
+ this.updateData('uncomplete')
+ break;
+ case 'archived':
+ case 'delete':
+ this.archivedOrRemoveTask(command);
+ break;
}
},
@@ -705,10 +738,11 @@ export default {
},
archivedOrRemoveTask(type) {
+ let typeName = type == 'delete' ? '删除' : '归档';
let typeTitle = this.taskDetail.parent_id > 0 ? '子任务' : '任务';
$A.modalConfirm({
- title: '删除' + typeTitle,
- content: '你确定要删除' + typeTitle + '【' + this.taskDetail.name + '】吗?',
+ title: typeName + typeTitle,
+ content: '你确定要' + typeName + typeTitle + '【' + this.taskDetail.name + '】吗?',
loading: true,
onOk: () => {
if (this.taskDetail.loading === true) {
@@ -867,7 +901,44 @@ export default {
this.addsubLoad--;
$A.modalError(msg);
});
- }
+ },
+
+ dropAdd(command) {
+ switch (command) {
+ case 'priority':
+ this.$set(this.taskDetail, 'p_name', this.$L('未设置'));
+ this.$nextTick(() => {
+ this.$refs.priority.show();
+ })
+ break;
+
+ case 'assist':
+ this.assistForce = true;
+ this.openAssist();
+ this.$nextTick(() => {
+ this.$refs.assist.handleClick();
+ });
+ break;
+
+ case 'times':
+ this.timeForce = true;
+ this.$nextTick(() => {
+ this.$refs.time.click()
+ })
+ break;
+
+ case 'file':
+ this.$refs.upload.handleClick();
+ break;
+
+ case 'subtask':
+ this.addsubForce = true;
+ this.$nextTick(() => {
+ this.addsubOpen();
+ });
+ break;
+ }
+ },
}
}
diff --git a/resources/assets/js/pages/manage/components/TaskRow.vue b/resources/assets/js/pages/manage/components/TaskRow.vue
index 721f12ac..cc07373b 100644
--- a/resources/assets/js/pages/manage/components/TaskRow.vue
+++ b/resources/assets/js/pages/manage/components/TaskRow.vue
@@ -30,7 +30,7 @@
{{$L('完成')}}
-
+
{{$L('归档')}}
@@ -51,14 +51,14 @@
diff --git a/resources/assets/sass/pages/components/task-detail.scss b/resources/assets/sass/pages/components/task-detail.scss
index d48ba699..4c2f0354 100644
--- a/resources/assets/sass/pages/components/task-detail.scss
+++ b/resources/assets/sass/pages/components/task-detail.scss
@@ -242,6 +242,8 @@
}
.subtask-avatar {
height: 26px;
+ line-height: 26px;
+ margin-top: -2px;
cursor: pointer;
}
.ivu-icon-ios-loading {
@@ -249,6 +251,15 @@
}
}
}
+ &.nosub {
+ margin-top: 0;
+ > li {
+ .add-input,
+ .add-button {
+ margin-top: 3px;
+ }
+ }
+ }
}
}
.add {
@@ -369,7 +380,7 @@
overflow: auto;
.head {
.menu {
- margin-right: 0;
+ margin: 0 2px;
}
}
}
@@ -399,7 +410,9 @@
padding-left: 0;
> p {
margin-right: 28px;
+ cursor: pointer;
&.active {
+ cursor: default;
font-size: 18px;
}
}