Commit a03b1e3253c9c06bbc45e256930d7a3c284ead41

Authored by guzijian
1 parent b2475692

feat: 新增提示,编辑规则的时候不会关闭dialog

src/views/main/components/people/index.vue
... ... @@ -25,7 +25,9 @@ const props = defineProps({
25 25 }
26 26 })
27 27  
28   -
  28 +const resetPeople = () => {
  29 + childrenItemValue.value = []
  30 +}
29 31  
30 32 const data = ref([])
31 33 const childrenItemValue = ref([])
... ... @@ -62,7 +64,8 @@ onMounted(() => {
62 64 })
63 65  
64 66 defineExpose({
65   - childrenItemValue
  67 + childrenItemValue,
  68 + resetPeople
66 69 });
67 70  
68 71 </script>
... ...
src/views/main/manager/index.vue
... ... @@ -55,21 +55,24 @@
55 55 v-model:limit="queryParams.pageSize" @pagination="getList" />
56 56  
57 57 <!-- 删除和修改对话框 -->
58   - <el-dialog :title="title" v-model="open" width="800px" append-to-body>
  58 + <el-dialog :title="title" draggable v-model="open" width="800px" append-to-body>
59 59 <template #header>
60 60 <el-radio-group v-model="radio" size="large">
61   - <el-radio-button label="修改" />
62   - <el-radio-button label="删除" />
  61 + <el-radio-button label="修 改" />
  62 + <el-radio-button label="删 除" />
63 63 </el-radio-group>
64 64 </template>
65   - <el-text v-show="radio == '删除'" class="mx-1" size="small">删除操作请使用在离职员工身上,删除了的记录是没办法进行修改的</el-text>
66   - <div v-show="radio == '修改'" style="margin-bottom: 30px;">
  65 + <el-text v-show="radio == '删 除'" class="mx-1" size="small">删除操作请使用在离职员工身上,删除了的记录是没办法进行修改的</el-text>
  66 + <div v-show="radio == '修 改'" style="margin-bottom: 30px;">
67 67 <schedulingAdd v-if="open" :schedulingNowValue="schedulingNowValue" ref="schedulingChildren"
68 68 :schedulingOptions="schedulingOptions" />
69 69 </div>
70 70  
71 71 <!-- 修改|删除 -->
72 72 <el-form :inline="true" label-width="100px">
  73 + <el-form-item>
  74 + <el-alert title="右侧穿梭框内的人员都会参与这次操作" type="warning" show-icon :closable="false" />
  75 + </el-form-item>
73 76 <!-- 选择人员 -->
74 77 <el-form-item>
75 78 <people ref="updateChildren" leftTitle="所有人员" rightTitle="已选择人员" />
... ... @@ -166,7 +169,7 @@ const otherJobCode = ref(null)
166 169 const schedulingChildren = ref(null);
167 170 const schedulingChildrenSecond = ref(null);
168 171 const name = ref(null);
169   -const radio = ref("修改")
  172 +const radio = ref("修 改")
170 173 const driverList = ref([]);
171 174 const open = ref(false);
172 175 const loading = ref(true);
... ... @@ -362,7 +365,7 @@ function handleEdit() {
362 365  
363 366 /** 提交按钮 */
364 367 function submitForm() {
365   - if (radio.value == "修改") {
  368 + if (radio.value == "修 改") {
366 369 handleUpdate()
367 370 } else {
368 371 handleDelete()
... ... @@ -456,8 +459,6 @@ function handleAgainCreateAttendance() {
456 459 function handleUpdate() {
457 460 // 判断当前规则是否为空
458 461 if (updateChildren.value.childrenItemValue && schedulingChildren.value.childrenItemValue) {
459   - console.log(updateChildren.value.childrenItemValue);
460   - console.log(schedulingChildren.value.childrenItemValue);
461 462 let updateData = {
462 463 jobCode: updateChildren.value.childrenItemValue,
463 464 ruleId: schedulingChildren.value.childrenItemValue.id,
... ... @@ -472,11 +473,13 @@ function handleUpdate() {
472 473 .then(res => {
473 474 proxy.$modal.msgSuccess("对应的排班明细已经修改成功");
474 475 getList();
475   - open.value = false
  476 + updateChildren.value.resetPeople();
476 477 })
477 478 .catch(() => {
478 479 open.value = false
479 480 })
  481 + } else {
  482 + proxy.$modal.msgError("请选择规则和需要修改的人员");
480 483 }
481 484 }
482 485  
... ... @@ -513,7 +516,7 @@ function handleDelete() {
513 516 .then((res) => {
514 517 proxy.$modal.msgSuccess("对应的排班明细已经删除成功");
515 518 getList();
516   - open.value = false
  519 + updateChildren.value.resetPeople();
517 520 })
518 521 }
519 522  
... ...
src/views/report/sign/index.vue
... ... @@ -94,11 +94,12 @@
94 94 <el-table-column label="线路" align="center" prop="lineName" />
95 95 <el-table-column label="路牌" align="center" prop="lpName" />
96 96 <el-table-column label="车辆自编号" align="center" prop="nbbm" width="130" />
  97 + <el-table-column label="打卡场地" align="center" prop="siteName" width="182" />
97 98 <el-table-column label="计划操作" align="center" prop="planAction" />
98 99 <el-table-column label="实际操作" align="center" prop="actualAction">
99 100 <template #default="scope">
100 101 <el-tag class="ml-2" type="success" v-if="scope.row.actualAction != null">{{ scope.row.actualAction
101   - }}</el-tag>
  102 + }}</el-tag>
102 103 <el-tag class="ml-2" type="danger" v-else>{{ scope.row.planAction == "签到" ? "未签到" : "未签退" }}</el-tag>
103 104 </template>
104 105 </el-table-column>
... ... @@ -108,7 +109,7 @@
108 109 <el-table-column label="有无异常" align="center" prop="exString">
109 110 <template #default="scope">
110 111 <el-tag class="ml-2" type="success" v-if="scope.row.exString == '无异常'">{{ scope.row.exString
111   - }}</el-tag>
  112 + }}</el-tag>
112 113 <el-tag class="ml-2" type="danger" v-else>{{ scope.row.exString }}</el-tag>
113 114 </template>
114 115 </el-table-column>
... ... @@ -326,7 +327,7 @@ const onExportDateType = (val) =&gt; {
326 327 }
327 328 </script>
328 329  
329   -<style >
  330 +<style>
330 331 .el-table .warning-row {
331 332 --el-table-tr-bg-color: var(--el-color-danger-light-9);
332 333 }
... ...