From 854cfc4737f6cd711bc0f50c205628cda5c23445 Mon Sep 17 00:00:00 2001 From: zuojincheng <lf_zuo@163.com> Date: 星期五, 30 五月 2025 14:03:10 +0800 Subject: [PATCH] 2025-05-30刘润玉复制代码恢复工程,修改了登录、工单、工作任务计划、排班、用户等组件vue。 --- src/views/production/schedule.vue | 73 ++++++++++++++++++++++++++++++++---- 1 files changed, 65 insertions(+), 8 deletions(-) diff --git a/src/views/production/schedule.vue b/src/views/production/schedule.vue index 6e0d58d..311c4a7 100644 --- a/src/views/production/schedule.vue +++ b/src/views/production/schedule.vue @@ -44,17 +44,14 @@ </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"> 缂栬緫 @@ -224,7 +221,8 @@ // 鑾峰彇浠诲姟鏁版嵁 onGetPlanData: function () { var that = this; - var data = { planName: "缁勮浠诲姟" }; + //var data = { planName: "鐢熶骇浠诲姟" }; + var data = {}; that .$axiosAdmin({ method: "post", @@ -343,6 +341,65 @@ 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({ -- Gitblit v1.8.0