搜素条件加loading

dev-scheduling
zhangdi 1 day ago
parent 58d24db1b2
commit 155241d43f
  1. 27
      src/views/productionSchedulingPlan/schedulingDashboard/container.vue

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-loading="loading">
<el-form label-width="80px" :model="formLabelAlign"> <el-form label-width="80px" :model="formLabelAlign">
<el-row> <el-row>
<!-- 新增查询条件 --> <!-- 新增查询条件 -->
@ -119,9 +119,6 @@
<!-- 头部标题和图例 --> <!-- 头部标题和图例 -->
<div class="gantt-header"> <div class="gantt-header">
<div class="status-legend"> <div class="status-legend">
<!-- <div class="legend-item">
<el-button type="primary" size="medium" @click="exportXls">导出</el-button>
</div> -->
<div class="legend-item"> <div class="legend-item">
<el-checkbox <el-checkbox
v-model="legendStatus.pending" v-model="legendStatus.pending"
@ -138,7 +135,6 @@
:style="{ '--checkbox-color': '#28a745' }" :style="{ '--checkbox-color': '#28a745' }"
@change="handleLegendChange('processing')" @change="handleLegendChange('processing')"
> >
<!-- <span class="legend-text" style="color: #007bff">进行中</span> -->
<span class="legend-text" style="color: #28a745">进行中</span> <span class="legend-text" style="color: #28a745">进行中</span>
</el-checkbox> </el-checkbox>
</div> </div>
@ -341,6 +337,7 @@
class="task-overlay-text" class="task-overlay-text"
:style="{ :style="{
top: `${getNarrowTaskOffsetByLayer(layerIndex)}px`, top: `${getNarrowTaskOffsetByLayer(layerIndex)}px`,
left: `${getNarrowTaskOffsetByLayerLeft(task.processName)}px`,
}" }"
> >
{{ task.processName }} {{ task.processName }}
@ -451,6 +448,7 @@ export default {
name: 'GanttChart', name: 'GanttChart',
data() { data() {
return { return {
loading:false,
formLabelAlign: { formLabelAlign: {
startTime: null, // startTime: null, //
teamName: '', // teamName: '', //
@ -774,6 +772,12 @@ export default {
const offset = layerIndex % 2 === 0 ? -20 : 15; // -20px 5px const offset = layerIndex % 2 === 0 ? -20 : 15; // -20px 5px
return offset; return offset;
}, },
//
getNarrowTaskOffsetByLayerLeft(processName) {
//
const offset = processName.length >= 5 ? -30 : -7;
return offset;
},
handleParamsChange() { handleParamsChange() {
// //
this.formLabelAlign.teamId = this.tsId; this.formLabelAlign.teamId = this.tsId;
@ -983,7 +987,7 @@ export default {
}, },
// //
getData() { async getData (params) {
if (this.formLabelAlign.timeRange.length > 0) { if (this.formLabelAlign.timeRange.length > 0) {
this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0]; this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0];
this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1]; this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1];
@ -991,7 +995,8 @@ export default {
if (this.formLabelAlign.planStatusList.length <= 0) { if (this.formLabelAlign.planStatusList.length <= 0) {
this.formLabelAlign.planStatusList = null; this.formLabelAlign.planStatusList = null;
} }
getData(this.formLabelAlign).then(res => { this.loading = true
await getData(this.formLabelAlign).then(res => {
this.processData(res.data.data); this.processData(res.data.data);
}); });
}, },
@ -1043,8 +1048,9 @@ export default {
this.allOrders = orders; this.allOrders = orders;
this.totalOrders = orders.length; this.totalOrders = orders.length;
this.taskData = tasks; this.taskData = tasks;
this.updateCurrentPageOrders(); this.updateCurrentPageOrders();
this.loading = false
}, },
// //
@ -1087,7 +1093,6 @@ export default {
this.$message.warning('请选择时间范围'); this.$message.warning('请选择时间范围');
return; return;
} }
// //
this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0]; this.formLabelAlign.startTime = this.formLabelAlign.timeRange[0];
this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1]; this.formLabelAlign.endTime = this.formLabelAlign.timeRange[1];
@ -1735,7 +1740,7 @@ export default {
height: 100%; height: 100%;
text-align: center; text-align: center;
display: inline-block; display: inline-block;
transform: scale(0.8); transform: scale(0.7);
} }
.task-label-txt { .task-label-txt {
position: absolute; position: absolute;
@ -1767,7 +1772,7 @@ export default {
min-width: max-content; min-width: max-content;
pointer-events: none; pointer-events: none;
display: inline-block; display: inline-block;
transform: scale(0.8); transform: scale(0.7);
} }
/* 提示框样式 */ /* 提示框样式 */

Loading…
Cancel
Save