|
|
@ -38,13 +38,34 @@ |
|
|
|
</el-table> |
|
|
|
<el-form v-if="showType == 'edit'" ref="formData " label-position="left" :model="formData" label-width="150px" |
|
|
|
style="margin-left: 3%; margin-top: 10px;"> |
|
|
|
<el-row> |
|
|
|
<el-form-item label="任务要求" prop="taskIntroduction" style="display: block"> |
|
|
|
<el-input class="cell-width-2" type="textarea" maxlength="500" show-word-limit :rows="5" |
|
|
|
placeholder="请输入事件内容,不超过500字" v-model.trim="formData.taskIntroduction"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="完成时限" prop="completeLimitDay" v-if="formData.taskPeriod"> |
|
|
|
<template v-if="formData.taskPeriod === 'once'"> |
|
|
|
<el-date-picker v-model="formData.completeLimitDay" type="date" placeholder="选择日期" |
|
|
|
value-format="yyyy-MM-dd" > |
|
|
|
</el-date-picker> |
|
|
|
</template> |
|
|
|
<template v-if="formData.taskPeriod !== 'once'"> |
|
|
|
<div> |
|
|
|
<span>每周期的第 </span> |
|
|
|
<el-input-number v-model="formData.completeLimitDay" :max="365" label="天数" |
|
|
|
style="width: 150px;padding: 0 5px;"></el-input-number> |
|
|
|
<span> 天内完成</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="任务有效期" prop="effectiveDateRange" v-if="formData.taskPeriod !=='once'" |
|
|
|
:rules="[{ required: true, message: '任务有效期不能为空', trigger:'blur' }]"> |
|
|
|
<template> |
|
|
|
<el-date-picker v-model="formData.effectiveDateRange" type="daterange" range-separator="至" |
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss"> |
|
|
|
</el-date-picker> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span v-if="showType == 'adjust' || showType == 'edit' || showType == 'adjust1'" slot="footer" class="dialog-footer" |
|
|
|
style="margin-left: 40%;"> |
|
|
@ -62,9 +83,10 @@ export default { |
|
|
|
return { |
|
|
|
tableData: [], |
|
|
|
formData: { |
|
|
|
effectiveDateRange:[], |
|
|
|
taskTitle: '',//任务主题 |
|
|
|
taskType: '1',//任务类型 |
|
|
|
taskPeriod: 'once',//任务周期 |
|
|
|
taskPeriod: '',//任务周期 |
|
|
|
completeLimitDay: '',//完成时限 一次性时传日期,周期性时传天数 |
|
|
|
completeLimitHour: '',//完成时限 周期或者一次性都传小时 |
|
|
|
receiverIds: '',//分发人员 |
|
|
@ -92,10 +114,16 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
console.log(this.formDatas,"sdfljksdlk"); |
|
|
|
this.formData.taskPeriod=this.formDatas.taskPeriod |
|
|
|
this.formData.completeLimitDay=this.formDatas.completeLimitDay |
|
|
|
this.formData.effectiveDateRange.push(this.formDatas.startTime,this.formDatas.endTime) |
|
|
|
console.log(this.formData.effectiveDateRange,"sdfjksdf"); |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async handleConfirm() { |
|
|
|
console.log(this.showType, "dsklmfklds"); |
|
|
|
console.log(this.selfTag),"dsfkljdslk"; |
|
|
|
let userIdList = this.selfTag.map(item => { |
|
|
|
return item.staffId |
|
|
@ -114,7 +142,7 @@ export default { |
|
|
|
this.$message.error(res.internalMsg) |
|
|
|
} |
|
|
|
}); |
|
|
|
this.updateState() |
|
|
|
// this.updateState() |
|
|
|
} else if (this.showType == "adjust1") { |
|
|
|
let parms = { |
|
|
|
userId: userIdList.toString(), |
|
|
@ -130,15 +158,21 @@ export default { |
|
|
|
this.$message.error(res.internalMsg) |
|
|
|
} |
|
|
|
}); |
|
|
|
this.updateState() |
|
|
|
// this.updateState() |
|
|
|
} |
|
|
|
else { |
|
|
|
let parms = { |
|
|
|
const parms = { |
|
|
|
userIdList: userIdList, |
|
|
|
id: this.taskId, |
|
|
|
taskIntroduction: this.formData.taskIntroduction |
|
|
|
|
|
|
|
taskIntroduction: this.formData.taskIntroduction, |
|
|
|
completeLimitDay:this.formData.completeLimitDay |
|
|
|
} |
|
|
|
if (this.formData.effectiveDateRange) { |
|
|
|
parms.startTime = this.formData.effectiveDateRange[0]; |
|
|
|
parms.endTime = this.formData.effectiveDateRange[1]; |
|
|
|
delete this.formData.effectiveDateRange; |
|
|
|
} |
|
|
|
console.log([parms,"sdjdfsl"]); |
|
|
|
requestPost('/actual/base/communityOneTablePublish/update', parms).then(res => { |
|
|
|
return this.$emit('handelPersonel') |
|
|
|
}); |
|
|
@ -146,7 +180,7 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
async updateState() { |
|
|
|
console.log(this.formDatas,"sdfkljslkdjf"); |
|
|
|
|
|
|
|
if(this.showType=="adjust1"){ |
|
|
|
const url = '/actual/base/communityOneTablePeriodPublish/update' |
|
|
|
const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } = this.formDatas; |
|
|
@ -270,15 +304,11 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
console.log(this.showType, this.taskId, "sdlfkl;sdf"); |
|
|
|
this.formData.taskIntroduction = this.formDatas.taskIntroduction |
|
|
|
console.log(this.formData.taskIntroduction,"dsfjhfds"); |
|
|
|
|
|
|
|
this.getOrgTreeList() |
|
|
|
if(this.showType=="adjust"){ |
|
|
|
this.getPeriodPublish() |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
props: { |
|
|
|
taskId: { |
|
|
|