| | |
| | | :close-on-click-modal="false" |
| | | width="60%" |
| | | center |
| | | @close="resetForm('workForm')" |
| | | > |
| | | <el-form :model="workForm" :rules="rules" ref="ruleForm" label-width="80px"> |
| | | <el-form :model="workForm" :rules="rules" ref="workForm" label-width="80px"> |
| | | <el-form-item label="专项检查任务名称:" label-width="180px" prop="taskName"> |
| | | <el-input type="textarea" v-model="workForm.taskName"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetForm('ruleForm')">重置</el-button> |
| | | <el-button type="primary" @click="confirmSend('ruleForm')">确认下发</el-button> |
| | | <el-button @click="resetForm('workForm')">重置</el-button> |
| | | <el-button type="primary" @click="confirmSend('workForm')">确认下发</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | methods:{ |
| | | confirmSend(formName){ |
| | | const t = this |
| | | t.$refs[formName].validate(async (valid) => { |
| | | console.log(t.workForm,'66666666666') |
| | | t.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let res = await sendCheckTask(t.workForm) |
| | | if(res.data.code === "200"){ |
| | | t.$message({ |
| | | type:'success', |
| | | message:res.data.message |
| | | }) |
| | | }else{ |
| | | t.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | t.dialogVisible = false |
| | | t.resetForm(formName) |
| | | this.$confirm('此操作将把任务下发给所有单位, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | let res = await sendCheckTask(t.workForm) |
| | | if(res.data.code === "200"){ |
| | | t.$message({ |
| | | type:'success', |
| | | message: '任务下发成功' |
| | | }) |
| | | }else{ |
| | | t.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | t.dialogVisible = false |
| | | t.$parent.getSpecialCheckTask(); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消下发' |
| | | }); |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |