From c9120650b03c477c27ce5c9c492a416be21df1b0 Mon Sep 17 00:00:00 2001 From: chengxiangling <291105840@qq.com> Date: 星期五, 16 五月 2025 13:44:01 +0800 Subject: [PATCH] 提交负载统计更正 --- src/views/demand/planManage/index.vue | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/views/demand/planManage/index.vue b/src/views/demand/planManage/index.vue index 790cbaf..409c6fb 100644 --- a/src/views/demand/planManage/index.vue +++ b/src/views/demand/planManage/index.vue @@ -39,7 +39,7 @@ plain icon="Plus" @click="handleAdd" - v-hasPermi="['aps:calendar:add']" + v-hasPermi="['aps:management:add']" >鏂板</el-button > </el-col> @@ -50,7 +50,7 @@ icon="Edit" :disabled="single" @click="handleUpdate(null)" - v-hasPermi="['aps:calendar:update']" + v-hasPermi="['aps:management:edit']" >淇敼</el-button > </el-col> @@ -61,7 +61,7 @@ icon="Delete" :disabled="multiple" @click="handleDelete" - v-hasPermi="['aps:calendar:remove']" + v-hasPermi="['aps:management:remove']" >鍒犻櫎</el-button > </el-col> @@ -88,27 +88,26 @@ type="primary" size="small" @click="handleUpdate(row)" - v-hasPermi="['aps:calendar:update']" + v-hasPermi="['aps:management:edit']" >淇敼</el-button > <el-button type="default" size="small" @click="handleSetCycle(row)" - v-hasPermi="['aps:calendar:remove']" + v-hasPermi="['aps:planCycle:edit']" >璁″垝鍛ㄦ湡</el-button > <el-button type="success" size="small" - v-hasPermi="['aps:calendar:remove']" >鐢熸垚璁″垝</el-button > <el-button type="danger" size="small" @click="handleDelete(row)" - v-hasPermi="['aps:calendar:remove']" + v-hasPermi="['aps:management:remove']" >鍒犻櫎</el-button > </template> @@ -264,6 +263,7 @@ const router = useRouter(); const { aps_area } = proxy.useDict("aps_area"); const { aps_plan_rule } = proxy.useDict("aps_plan_rule"); +const { aps_plan_type } = proxy.useDict("aps_plan_type"); const tableRef = ref(); const calendarList = ref([]); const open = ref(false); @@ -354,6 +354,15 @@ field: "type", width: 200, align: "center", + formatter: ({ cellValue, row, column }) => { + if (cellValue) { + for (let i = 0; i < aps_plan_type.value.length; i++) { + if (cellValue === aps_plan_type.value[i].value) { + return aps_plan_type.value[i].label; + } + } + } + }, }, { title: "璁″垝鎺掍骇鍖哄煙", @@ -511,6 +520,7 @@ // 璁″垝鍛ㄦ湡 function handleSetCycle(row) { openSetCycle.value = true; + console.log(row,row.id,"==========") if (!row.cycle) { formCycle.value = { cycle: { @@ -519,6 +529,7 @@ period: "1", periodStart: moment(Date.now()).format("YYYY-MM-DD"), periodEnd: "", + planId: row.id }, }; let nowTime = moment(formCycle.value.cycle.periodStart) @@ -530,7 +541,7 @@ } else { formCycle.value = row; } - console.log(formCycle.value, "formCycle.value"); + console.log(formCycle.value, "formCycle.value+++++==="); } function handleToggleExpand() { expand.value = !expand.value; @@ -572,14 +583,15 @@ }); } function submitFormCycle() { + console.log(formCycle.value,"formCycle.value=====") redundantOrderList({ ...formCycle.value.cycle, - planId: formCycle.value.id, }) .then((res) => { if (res.code === 200) { proxy.$modal.msgSuccess("鏇存柊鎴愬姛"); openSetCycle.value = false; + getList(); } else { openSetCycle.value = false; } @@ -587,7 +599,6 @@ .catch(() => { openSetCycle.value = false; }); - getList(); } function handleGoToCycle() { router.push({ -- Gitblit v1.9.3