| | |
| | | </el-table-column> |
| | | <el-table-column type="index" label="序号"> </el-table-column> |
| | | <el-table-column prop="userName" label="姓名"> </el-table-column> |
| | | <el-table-column prop="userId" label="用户ID"> </el-table-column> |
| | | <el-table-column prop="scheduleDate" label="排班日期"> |
| | | </el-table-column> |
| | | <el-table-column prop="dt" label="任务条目"> |
| | | <el-table-column prop="scheduleDate" label="排班日期"></el-table-column> |
| | | <el-table-column prop="dt" label="工作任务数量"> |
| | | <template slot-scope="props"> |
| | | {{ props.row.relList.length }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dt" label="创建时间" width="170"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column prop="dt" label="创建时间"></el-table-column> |
| | | <el-table-column label="操作" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" @click.native.prevent="handleFormDataEdit(scope.row)" type="text" size="small"> |
| | | 编辑 |
| | |
| | | // 获取任务数据 |
| | | onGetPlanData: function () { |
| | | var that = this; |
| | | var data = { planName: "组装任务" }; |
| | | //var data = { planName: "生产任务" }; |
| | | var data = {}; |
| | | that |
| | | .$axiosAdmin({ |
| | | method: "post", |
| | |
| | | this.onGetSelectData(); |
| | | this.onGetStationData(); |
| | | }, |
| | | // 删除 |
| | | handleDelete: function (row) { |
| | | this.$confirm(`此操作将删除 ${row.userName} 排班 , 是否继续?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.$confirm(`此操作为危险操作 , 是否继续?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.onDelete(row); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "已取消", |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "已取消", |
| | | }); |
| | | }); |
| | | }, |
| | | // 执行删除 |
| | | onDelete: function (row) { |
| | | var that = this; |
| | | var params = { |
| | | id: row.id, |
| | | }; |
| | | that |
| | | .$axiosAdmin({ |
| | | method: "get", |
| | | url: "production/schedule/delete", |
| | | params: params, |
| | | }) |
| | | .then((res) => { |
| | | if (res.success == true) { |
| | | that.$message({ |
| | | type: "success", |
| | | message: "删除成功", |
| | | }); |
| | | } else { |
| | | that.$alert(res.content, "提示", { |
| | | confirmButtonText: "确定", |
| | | }); |
| | | } |
| | | that.onGetTableData(); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | // 添加工作内容 |
| | | handleAddRelListItem: function () { |
| | | this.formData.relList.push({ |