| | |
| | | <el-button icon="el-icon-more" size="mini" type="primary"></el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="showCommand">查看指令</el-dropdown-item> |
| | | <el-dropdown-item command="changeCommand">修改</el-dropdown-item> |
| | | <el-dropdown-item command="assign">派发</el-dropdown-item> |
| | | <el-dropdown-item command="complete">完结</el-dropdown-item> |
| | | <el-dropdown-item command="cancel">取消</el-dropdown-item> |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | |
| | | <el-dialog :title="taskWrkFormTitle" :visible.sync="taskWrkFormVisible"> |
| | | <el-form :model="taskWrkForm"> |
| | | <el-form-item label="起点位置" :label-width="taskWrkFormLabelWidth"> |
| | | <el-input v-model="taskWrkForm.startPoint" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="终点位置" :label-width="taskWrkFormLabelWidth"> |
| | | <el-input v-model="taskWrkForm.targetPoint" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="taskWrkFormVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="taskWrkFormConfirm">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | <script> |
| | | var $layui = layui.config({ |
| | |
| | | task_no: null, |
| | | status: null, |
| | | wrk_no: null |
| | | } |
| | | }, |
| | | taskWrkFormVisible: false, |
| | | taskWrkForm: {}, |
| | | taskWrkFormLabelWidth: '80px', |
| | | taskWrkFormTitle: '' |
| | | }, |
| | | created() { |
| | | this.init() |
| | |
| | | //查看指令 |
| | | this.showCommand(row) |
| | | break; |
| | | case "changeCommand": |
| | | //修改指令 |
| | | this.changeCommand(row); |
| | | break |
| | | case "assign": |
| | | //派发任务 |
| | | this.assignWrk(row) |
| | |
| | | content: 'commandManage.html?taskNo=' + row.taskNo + "&wrkNo=" + wrkNo, |
| | | success: function(layero, index) {} |
| | | }); |
| | | }, |
| | | changeCommand(row) { |
| | | //修改指令 |
| | | this.taskWrkFormVisible = true |
| | | this.taskWrkFormTitle = "任务:" + row.taskNo |
| | | this.taskWrkForm = row |
| | | }, |
| | | assignWrk(row){ |
| | | //派发任务 |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | taskWrkFormConfirm() { |
| | | //修改指定任务数据 |
| | | let that = this |
| | | $.ajax({ |
| | | url: baseUrl + "/taskWrk/updatePoint/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | taskNo: this.taskWrkForm.taskNo, |
| | | startPoint: this.taskWrkForm.startPoint, |
| | | targetPoint: this.taskWrkForm.targetPoint, |
| | | }, |
| | | method: 'POST', |
| | | success: function(res) { |
| | | if (res.code == 200) { |
| | | that.taskWrkFormVisible = false |
| | | that.$message({ |
| | | message: "更新成功", |
| | | type: 'success' |
| | | }); |
| | | that.getTableData() |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }) |