loulijun2021
2023-05-25 86b282043844a5c6d2624d9f18a465c08d8cfc11
src/views/gantt_back/gantt_back.vue
@@ -3,7 +3,6 @@
    <el-tabs style="margin: 30px">
      <el-row style="margin-bottom:20px">
        <el-col :span="7" :offset="1">
          <span class="t_size" style="margin-left:7px">排程日期</span>
          <el-date-picker
@@ -84,8 +83,11 @@
      </el-row>
      <el-row />
    </el-tabs>
    <!--    {{ time_data }}-->
    <!--    {{ bm_data }}-->
    <div class="container" style="margin: 30px;">
      <v-gantt-chart
        :start-time="time_data[0]"
        :end-time="time_data[1]"
        :cell-width="cellWidth"
@@ -102,9 +104,8 @@
        :datas="bm_data"
        @scrollLeft="scrollLeftA"
      >
        <!-- <template v-slot:block="{data,item}"> -->
        <template slot="block" slot-scope="{data,item}">
          <Test
          <Scheduling
            :data="data"
            :update-time-lines="updateTimeLines"
            :cell-height="cellHeight"
@@ -133,7 +134,6 @@
        </template>
        <template slot="title">
          <span class="tc">工位列表</span>
          <el-checkbox v-model="all_status" class="box_style" @change="changeLift()" />
          <input v-model.number="cellWidth" type="range" min="20" max="100" class="box_styles">
        </template>
@@ -143,18 +143,14 @@
</template>
<script>
import Test from '@/components/Test'
// import PaginationView from '@/components/PaginationView'
// import TestLeft from '@/components/TestLeft'
// import { mockDatas } from './index1.js'
import Scheduling from '@/components/Scheduling'
import dayjs from 'dayjs'
// import automaticScheduling from '@/api/automaticScheduling'
const scaleList = `30,60,240,360`.split(',').map(n => parseInt(n))
const timeList = `0,30,60,120,240,480`.split(',').map(n => parseInt(n))
export default {
  components: { Test },
  components: { Scheduling },
  data() {
    return {
      show: false,
@@ -280,7 +276,7 @@
        },
        'rows': [
          {
            'YearDate': '2022-09-01',
            'YearDate': '2022-11-29',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -296,7 +292,7 @@
            ]
          },
          {
            'YearDate': '2022-09-02',
            'YearDate': '2022-11-30',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -312,7 +308,7 @@
            ]
          },
          {
            'YearDate': '2022-09-03',
            'YearDate': '2022-12-01',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -328,7 +324,7 @@
            ]
          },
          {
            'YearDate': '2022-09-04',
            'YearDate': '2022-12-02',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -344,7 +340,7 @@
            ]
          },
          {
            'YearDate': '2022-09-05',
            'YearDate': '2022-12-03',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -360,12 +356,12 @@
            ]
          },
          {
            'YearDate': '2022-09-06',
            'YearDate': '2022-12-04',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicCropMob': '30',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
@@ -752,6 +748,7 @@
          }
        }
      }
      console.log(newList, 321)
      for (const i in list) {
        this.pushTiem(newList, list[i].id, list[i].gtArray)
      }
@@ -970,6 +967,7 @@
        this.dataTransition()
        this.change_num(this.bm_data)
      }
      this.$forceUpdate()
    },
    // 手动过滤所有时间已排程
    time_nitalize() {
@@ -983,7 +981,7 @@
      for (const i in this.bm_data) {
        const newArr = []
        for (const j in this.bm_data[i].gtArray) {
          if (this.bm_data[i].gtArray[j].type != 'schedule') {
          if (this.bm_data[i].gtArray[j].type !== 'schedule') {
            newArr.push(this.bm_data[i].gtArray[j])
          }
        }