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,7 +25,9 @@ const props = defineProps({
25 } 25 }
26 }) 26 })
27 27
28 - 28 +const resetPeople = () => {
  29 + childrenItemValue.value = []
  30 +}
29 31
30 const data = ref([]) 32 const data = ref([])
31 const childrenItemValue = ref([]) 33 const childrenItemValue = ref([])
@@ -62,7 +64,8 @@ onMounted(() => { @@ -62,7 +64,8 @@ onMounted(() => {
62 }) 64 })
63 65
64 defineExpose({ 66 defineExpose({
65 - childrenItemValue 67 + childrenItemValue,
  68 + resetPeople
66 }); 69 });
67 70
68 </script> 71 </script>
src/views/main/manager/index.vue
@@ -55,21 +55,24 @@ @@ -55,21 +55,24 @@
55 v-model:limit="queryParams.pageSize" @pagination="getList" /> 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 <template #header> 59 <template #header>
60 <el-radio-group v-model="radio" size="large"> 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 </el-radio-group> 63 </el-radio-group>
64 </template> 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 <schedulingAdd v-if="open" :schedulingNowValue="schedulingNowValue" ref="schedulingChildren" 67 <schedulingAdd v-if="open" :schedulingNowValue="schedulingNowValue" ref="schedulingChildren"
68 :schedulingOptions="schedulingOptions" /> 68 :schedulingOptions="schedulingOptions" />
69 </div> 69 </div>
70 70
71 <!-- 修改|删除 --> 71 <!-- 修改|删除 -->
72 <el-form :inline="true" label-width="100px"> 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 <el-form-item> 77 <el-form-item>
75 <people ref="updateChildren" leftTitle="所有人员" rightTitle="已选择人员" /> 78 <people ref="updateChildren" leftTitle="所有人员" rightTitle="已选择人员" />
@@ -166,7 +169,7 @@ const otherJobCode = ref(null) @@ -166,7 +169,7 @@ const otherJobCode = ref(null)
166 const schedulingChildren = ref(null); 169 const schedulingChildren = ref(null);
167 const schedulingChildrenSecond = ref(null); 170 const schedulingChildrenSecond = ref(null);
168 const name = ref(null); 171 const name = ref(null);
169 -const radio = ref("修改") 172 +const radio = ref("修 改")
170 const driverList = ref([]); 173 const driverList = ref([]);
171 const open = ref(false); 174 const open = ref(false);
172 const loading = ref(true); 175 const loading = ref(true);
@@ -362,7 +365,7 @@ function handleEdit() { @@ -362,7 +365,7 @@ function handleEdit() {
362 365
363 /** 提交按钮 */ 366 /** 提交按钮 */
364 function submitForm() { 367 function submitForm() {
365 - if (radio.value == "修改") { 368 + if (radio.value == "修 改") {
366 handleUpdate() 369 handleUpdate()
367 } else { 370 } else {
368 handleDelete() 371 handleDelete()
@@ -456,8 +459,6 @@ function handleAgainCreateAttendance() { @@ -456,8 +459,6 @@ function handleAgainCreateAttendance() {
456 function handleUpdate() { 459 function handleUpdate() {
457 // 判断当前规则是否为空 460 // 判断当前规则是否为空
458 if (updateChildren.value.childrenItemValue && schedulingChildren.value.childrenItemValue) { 461 if (updateChildren.value.childrenItemValue && schedulingChildren.value.childrenItemValue) {
459 - console.log(updateChildren.value.childrenItemValue);  
460 - console.log(schedulingChildren.value.childrenItemValue);  
461 let updateData = { 462 let updateData = {
462 jobCode: updateChildren.value.childrenItemValue, 463 jobCode: updateChildren.value.childrenItemValue,
463 ruleId: schedulingChildren.value.childrenItemValue.id, 464 ruleId: schedulingChildren.value.childrenItemValue.id,
@@ -472,11 +473,13 @@ function handleUpdate() { @@ -472,11 +473,13 @@ function handleUpdate() {
472 .then(res => { 473 .then(res => {
473 proxy.$modal.msgSuccess("对应的排班明细已经修改成功"); 474 proxy.$modal.msgSuccess("对应的排班明细已经修改成功");
474 getList(); 475 getList();
475 - open.value = false 476 + updateChildren.value.resetPeople();
476 }) 477 })
477 .catch(() => { 478 .catch(() => {
478 open.value = false 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,7 +516,7 @@ function handleDelete() {
513 .then((res) => { 516 .then((res) => {
514 proxy.$modal.msgSuccess("对应的排班明细已经删除成功"); 517 proxy.$modal.msgSuccess("对应的排班明细已经删除成功");
515 getList(); 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,11 +94,12 @@
94 <el-table-column label="线路" align="center" prop="lineName" /> 94 <el-table-column label="线路" align="center" prop="lineName" />
95 <el-table-column label="路牌" align="center" prop="lpName" /> 95 <el-table-column label="路牌" align="center" prop="lpName" />
96 <el-table-column label="车辆自编号" align="center" prop="nbbm" width="130" /> 96 <el-table-column label="车辆自编号" align="center" prop="nbbm" width="130" />
  97 + <el-table-column label="打卡场地" align="center" prop="siteName" width="182" />
97 <el-table-column label="计划操作" align="center" prop="planAction" /> 98 <el-table-column label="计划操作" align="center" prop="planAction" />
98 <el-table-column label="实际操作" align="center" prop="actualAction"> 99 <el-table-column label="实际操作" align="center" prop="actualAction">
99 <template #default="scope"> 100 <template #default="scope">
100 <el-tag class="ml-2" type="success" v-if="scope.row.actualAction != null">{{ scope.row.actualAction 101 <el-tag class="ml-2" type="success" v-if="scope.row.actualAction != null">{{ scope.row.actualAction
101 - }}</el-tag> 102 + }}</el-tag>
102 <el-tag class="ml-2" type="danger" v-else>{{ scope.row.planAction == "签到" ? "未签到" : "未签退" }}</el-tag> 103 <el-tag class="ml-2" type="danger" v-else>{{ scope.row.planAction == "签到" ? "未签到" : "未签退" }}</el-tag>
103 </template> 104 </template>
104 </el-table-column> 105 </el-table-column>
@@ -108,7 +109,7 @@ @@ -108,7 +109,7 @@
108 <el-table-column label="有无异常" align="center" prop="exString"> 109 <el-table-column label="有无异常" align="center" prop="exString">
109 <template #default="scope"> 110 <template #default="scope">
110 <el-tag class="ml-2" type="success" v-if="scope.row.exString == '无异常'">{{ scope.row.exString 111 <el-tag class="ml-2" type="success" v-if="scope.row.exString == '无异常'">{{ scope.row.exString
111 - }}</el-tag> 112 + }}</el-tag>
112 <el-tag class="ml-2" type="danger" v-else>{{ scope.row.exString }}</el-tag> 113 <el-tag class="ml-2" type="danger" v-else>{{ scope.row.exString }}</el-tag>
113 </template> 114 </template>
114 </el-table-column> 115 </el-table-column>
@@ -326,7 +327,7 @@ const onExportDateType = (val) =&gt; { @@ -326,7 +327,7 @@ const onExportDateType = (val) =&gt; {
326 } 327 }
327 </script> 328 </script>
328 329
329 -<style > 330 +<style>
330 .el-table .warning-row { 331 .el-table .warning-row {
331 --el-table-tr-bg-color: var(--el-color-danger-light-9); 332 --el-table-tr-bg-color: var(--el-color-danger-light-9);
332 } 333 }