|
@@ -56,7 +56,6 @@
|
|
|
:clearable="false"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
<el-form-item label="截止日期" prop="task_expire_day" v-if="formData.task_cycle == 1" :rules="[{ required: true, message: '请选择截止日期'}]">
|
|
|
<el-select v-model="formData.task_expire_day" placeholder="请选择截止日期">
|
|
|
<el-option v-for="item in columns1" :key="item.value" :label="item.name" :value="item.value"></el-option>
|
|
@@ -75,6 +74,17 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item label="有效日期" prop="schedule_expire_date" v-if="formData.task_cycle !==0" >
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formData.schedule_expire_date"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择日期"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ ></el-date-picker>
|
|
|
+ <el-tooltip placement="right" content="设置该选项,到了当该日期不再自动发布任务。默认一直重复发布任务" style="margin-left: 10px"><span class="tips">?</span></el-tooltip>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="任务备注" prop="task_remark" :rules="[{ max: 300, message: '长度不能超过 300 个字'}]">
|
|
|
<el-input type="textarea" :rows="5" maxlength="300" show-word-limit v-model="formData.task_remark" placeholder="请输入任务内容(限300字)"></el-input>
|
|
|
</el-form-item>
|
|
@@ -110,7 +120,17 @@
|
|
|
|
|
|
<el-form-item>
|
|
|
<el-button @click="resetForm('formData')">取消</el-button>
|
|
|
- <el-button type="primary" @click="sub('formData')">提交</el-button>
|
|
|
+<!-- <el-button type="primary" @click="sub('formData')">提交</el-button>-->
|
|
|
+ <el-popconfirm
|
|
|
+ confirm-button-text="确定"
|
|
|
+ cancel-button-text="取消"
|
|
|
+ v-if="formData.schedule_expire_date"
|
|
|
+ :title="'重复任务将在' + formData.schedule_expire_date + '停止自动发布,是否继续提交?'"
|
|
|
+ @confirm="sub('formData')"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" type="primary">提交</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ <el-button v-else type="primary" @click="sub('formData')">提交</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -176,7 +196,8 @@ export default {
|
|
|
timeout_deduction_point: null,
|
|
|
timeout_deduction_point_limit: null,
|
|
|
ahead_award_point: null,
|
|
|
- ahead_award_point_limit: null
|
|
|
+ ahead_award_point_limit: null,
|
|
|
+ schedule_expire_date:null
|
|
|
},
|
|
|
pickerOptions:{
|
|
|
disabledDate (time) {
|
|
@@ -369,6 +390,10 @@ export default {
|
|
|
}else if(this.formData.task_cycle==3&&this.formData.task_expire_day<=moment().format('D')){
|
|
|
is=false
|
|
|
}
|
|
|
+
|
|
|
+ //没有有效日期就不提交传参
|
|
|
+ if (!data.schedule_expire_date) delete data.schedule_expire_date;
|
|
|
+
|
|
|
this.$axiosUser('post', this.formData.task_cycle == 0 ? '/api/pro/integral/work/publish' : '/api/pro/integral/schedule/publish/work', data).then(res => {
|
|
|
this.$message.success(res.data.msg);
|
|
|
this.closeDialog();
|
|
@@ -454,4 +479,15 @@ export default {
|
|
|
font-size: 14px;
|
|
|
word-break: break-all;
|
|
|
}
|
|
|
+.tips {
|
|
|
+ background: #409EFF;
|
|
|
+ border-radius: 50%;
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ color: #fff;
|
|
|
+ display: inline-block;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 14px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
</style>
|