{{$L('附件')}}
@@ -490,6 +513,8 @@ export default {
timeValue: [],
timeOptions: {shortcuts:$A.timeOptionShortcuts()},
+ loopForce: false,
+
nowTime: $A.Time(),
nowInterval: null,
@@ -527,6 +552,17 @@ export default {
dialogDrag: false,
imageAttachment: true,
receiveTaskSubscribe: null,
+
+ loops: [
+ {key: 'never', label: '从不'},
+ {key: 'day', label: '每天'},
+ {key: 'weekdays', label: '每个工作日'},
+ {key: 'week', label: '每周'},
+ {key: 'twoweeks', label: '每两周'},
+ {key: 'month', label: '每月'},
+ {key: 'year', label: '每年'},
+ {key: 'custom', label: '自定义'},
+ ]
}
},
@@ -711,6 +747,13 @@ export default {
name: '截止时间',
});
}
+ if (!taskDetail.loop || taskDetail.loop == 'never') {
+ list.push({
+ command: 'loop',
+ icon: '',
+ name: '重复周期',
+ });
+ }
if (this.fileList.length == 0) {
list.push({
command: 'file',
@@ -751,6 +794,7 @@ export default {
}
this.timeOpen = false;
this.timeForce = false;
+ this.loopForce = false;
this.assistForce = false;
this.addsubForce = false;
this.receiveShow = false;
@@ -784,6 +828,14 @@ export default {
return $A.Date(taskDetail.end_at, true) < this.nowTime;
},
+ loopLabel(loop) {
+ const item = this.loops.find(item => item.key === loop)
+ if (item) {
+ return item.label
+ }
+ return loop ? `每${loop}天` : '从不'
+ },
+
onNameKeydown(e) {
if (e.keyCode === 13) {
if (!e.shiftKey) {
@@ -850,6 +902,14 @@ export default {
this.$set(this.taskDetail, 'times', [params.start_at, params.end_at])
break;
+ case 'loop':
+ if (params === 'custom') {
+ this.customLoop()
+ return;
+ }
+ this.$set(this.taskDetail, 'loop', params)
+ break;
+
case 'content':
const content = this.$refs.desc.getContent();
if (content == this.taskContent) {
@@ -883,6 +943,51 @@ export default {
})
},
+ customLoop() {
+ let value = this.taskDetail.loop || 1
+ $A.Modal.confirm({
+ render: (h) => {
+ return h('div', [
+ h('div', {
+ style: {
+ fontSize: '16px',
+ fontWeight: '500',
+ marginBottom: '20px',
+ }
+ }, this.$L('重复周期')),
+ h('Input', {
+ style: {
+ width: '160px',
+ margin: '0 auto',
+ },
+ props: {
+ type: 'number',
+ value,
+ maxlength: 3
+ },
+ on: {
+ input: (val) => {
+ value = $.runNum(val)
+ }
+ }
+ }, [
+ h('span', {slot: 'prepend'}, this.$L('每')),
+ h('span', {slot: 'append'}, this.$L('天'))
+ ])
+ ])
+ },
+ onOk: _ => {
+ this.$Modal.remove()
+ if (value > 0) {
+ this.updateData('loop', value)
+ }
+ },
+ loading: true,
+ okText: this.$L('确定'),
+ cancelText: this.$L('取消'),
+ });
+ },
+
openOwner() {
const list = this.getOwner.map(({userid}) => userid)
this.$set(this.taskDetail, 'owner_userid', list)
@@ -1070,6 +1175,13 @@ export default {
})
break;
+ case 'loop':
+ this.loopForce = true;
+ this.$nextTick(() => {
+ this.$refs.loop.show();
+ })
+ break;
+
case 'file':
this.onUploadClick(true)
break;
diff --git a/resources/assets/sass/pages/components/task-detail.scss b/resources/assets/sass/pages/components/task-detail.scss
index e265a5110..b31825f7a 100644
--- a/resources/assets/sass/pages/components/task-detail.scss
+++ b/resources/assets/sass/pages/components/task-detail.scss
@@ -825,6 +825,12 @@
}
}
+.task-detail-loop {
+ > li {
+ text-align: center;
+ }
+}
+
@media (max-width: 768px) {
.task-detail {
.task-info {
diff --git a/resources/assets/statics/public/css/fonts/taskfont.ttf b/resources/assets/statics/public/css/fonts/taskfont.ttf
index e17bde5e0..c29b5f9cc 100644
Binary files a/resources/assets/statics/public/css/fonts/taskfont.ttf and b/resources/assets/statics/public/css/fonts/taskfont.ttf differ
diff --git a/resources/assets/statics/public/css/fonts/taskfont.woff b/resources/assets/statics/public/css/fonts/taskfont.woff
index 8f621aceb..8719ce888 100644
Binary files a/resources/assets/statics/public/css/fonts/taskfont.woff and b/resources/assets/statics/public/css/fonts/taskfont.woff differ
diff --git a/resources/assets/statics/public/css/fonts/taskfont.woff2 b/resources/assets/statics/public/css/fonts/taskfont.woff2
index 028678d6e..7c2672fb9 100644
Binary files a/resources/assets/statics/public/css/fonts/taskfont.woff2 and b/resources/assets/statics/public/css/fonts/taskfont.woff2 differ