From 99a010f21d278498bafd248217c584e101db2d8f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 01 九月 2022 17:27:17 +0800
Subject: [PATCH] 1.自动扫码回车功能接入

---
 src/views/sbgl/djjl.vue                                         | 1858 +++++++++++++
 src/views/zlgl/gxjy.vue                                         |   41 
 src/lib/v-gantt-chart/lib/utils/gtUtils.js                      |   85 
 src/views/scgl/gd.vue                                           |   20 
 src/lib/v-gantt-chart/lib/components/dynamic-render.js          |  126 
 src/views/sbgl/index1.js                                        |   57 
 src/lib/v-gantt-chart/package.json                              |   52 
 src/views/scgl/sckbg.vue                                        |  132 
 src/lib/v-gantt-chart/test/timeblock.test.js                    |   95 
 src/views/scgl/sckbg_back.vue                                   | 2394 ++++++++++++++++++
 src/lib/v-gantt-chart/lib/utils/timeLineUtils.js                |   74 
 src/lib/v-gantt-chart/lib/gantt.scss                            |  176 +
 src/lib/v-gantt-chart/lib/utils/throttle.js                     |   21 
 src/components/Test/index.vue                                   |  246 +
 src/components/TestLeft/index.vue                               |   75 
 src/lib/v-gantt-chart/index.js                                  |    1 
 src/lib/v-gantt-chart/lib/index.js                              |   20 
 src/lib/v-gantt-chart/lib/components/blocks/index.vue           |  156 +
 src/lib/v-gantt-chart/lib/utils/tool.js                         |   25 
 src/lib/v-gantt-chart/.gitignore                                |   20 
 src/lib/v-gantt-chart/lib/components/mark-line/current-time.vue |   33 
 src/lib/v-gantt-chart/lib/gantt.vue                             |  550 ++++
 src/lib/v-gantt-chart/.babelrc                                  |   16 
 src/lib/v-gantt-chart/webpack.config.js                         |  106 
 src/views/sbgl/byjl.vue                                         |  821 ++++++
 src/lib/v-gantt-chart/README.md                                 |  380 ++
 src/lib/v-gantt-chart/lib/utils/debounce.js                     |   20 
 src/lib/v-gantt-chart/test/gtUtils.test.js                      |  103 
 src/lib/v-gantt-chart/lib/components/time-line/index.vue        |  162 +
 src/lib/v-gantt-chart/lib/assets/block.png                      |    0 
 src/lib/v-gantt-chart/lib/components/left-bar/index.vue         |   37 
 package.json                                                    |    1 
 src/lib/v-gantt-chart/LICENSE                                   |   21 
 src/lib/v-gantt-chart/lib/components/mark-line/index.vue        |   47 
 34 files changed, 7,904 insertions(+), 67 deletions(-)

diff --git a/package.json b/package.json
index d977fbf..378e3db 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
   "dependencies": {
     "axios": "0.18.1",
     "core-js": "3.6.5",
+    "dayjs": "^1.11.5",
     "echarts": "^5.3.2",
     "element-ui": "2.13.2",
     "jquery": "^3.6.0",
diff --git a/src/components/Test/index.vue b/src/components/Test/index.vue
new file mode 100644
index 0000000..bb93374
--- /dev/null
+++ b/src/components/Test/index.vue
@@ -0,0 +1,246 @@
+<template>
+  <el-popover placement="bottom"
+              trigger="hover">
+    <div slot="reference"
+         class="plan"
+         :style="{'margin-top':0.1*cellHeight+'px',}"
+         @click="onClick"
+
+    >
+      <!-- <div class="runTime">
+        <span>S:{{startToString}}</span>
+        <span>E:{{endToString}}</span>
+      </div> -->
+      <div
+        :class="{'hw':true,'SCHEDULEING' : item.type == 'schedule','H_SCHEDULE':item.type=='h_schedule','BM_SCHEDULE':item.type=='bm_schedule'}">
+        <span v-show='item.type == "schedule"'>{{ item.number }}</span>
+        <span v-show='item.type == "h_schedule"'>{{ item.number }}</span>
+      </div>
+      <!-- <div class="passenger"></div> -->
+
+    </div>
+
+    <div class="detail">
+      <!-- <span>{{data.name}}</span> -->
+      <ul v-if="item.type =='h_schedule' || item.type =='schedule'">
+        <li>
+          <span>宸ュ崟缂栧彿锛�</span><span>{{ item.work_order }}</span>
+        </li>
+        <li>
+          <span>浜у搧鍚嶇О锛�</span><span>{{ item.cl_name }}</span>
+        </li>
+        <li>
+          <span>浜у搧缂栫爜锛�</span><span>{{ item.cl_code }}</span>
+        </li>
+        <li>
+          <span>鐢熶骇鏁伴噺锛�</span><span>{{ item.number }}{{ item.STATUS }}</span>
+        </li>
+        <li>
+          <span>鐢熶骇璁惧锛�</span><span>{{ item.id }}</span>
+        </li>
+        <li>
+          <span>寮�濮嬫椂闂达細</span><span>{{ item.start }}</span>
+        </li>
+        <li>
+          <span>缁撴潫鏃堕棿锛�</span><span>{{ item.end }}</span>
+        </li>
+
+      </ul>
+      <ul v-if="item.type =='capacity'">
+        <!-- <li>
+          <span>浜у搧锛�</span><span>{{item.cl_name}}</span>
+        </li>
+         <li>
+          <span>鏁伴噺锛�</span><span>{{item.number}}涓�</span>
+        </li> -->
+        <li>
+          <span>鐢熶骇璁惧锛�</span><span>{{ item.id }}</span>
+        </li>
+        <li>
+          <span>寮�濮嬫椂闂达細</span><span>{{ item.start }}</span>
+        </li>
+        <li>
+          <span>缁撴潫鏃堕棿锛�</span><span>{{ item.end }}</span>
+        </li>
+
+      </ul>
+      <ul v-if="item.type =='bm_schedule'">
+        <li>
+          <span>缁翠慨鏃堕棿锛�</span><span>{{ item.start }} ~ {{ item.end }}</span>
+        </li>
+      </ul>
+    </div>
+  </el-popover>
+</template>
+
+<script>
+import dayjs from 'dayjs'
+
+const NOW_PLAN = '#D5F8EA'
+const FUTHER_PLAN = '#BFF2FE'
+const PAST_PLAN = '#F2F2F2'
+const CAPACITY = '#d1efed'
+const H_SCHEDULE = '#ffc000'
+const SCHEDULEING = '#14b6e7'
+const BM_SCHEDULE = 'FFFF33'
+export default {
+  name: 'Test',
+  props: {
+    data: Object,
+    item: Object,
+    currentTime: dayjs,
+    updateTimeLines: Function,
+    cellHeight: Number,
+    startTimeOfRenderArea: Number
+  },
+  data() {
+    return {
+      dayjs: dayjs
+    }
+  },
+  computed: {
+    statusColor() {
+      let { item, currentTime } = this
+      let start = dayjs(item.start)
+      let end = dayjs(item.end)
+      // if(item.type == 'capacity'){
+      //   return CAPACITY
+      // }else if(item.type == 'h_schedule'){
+      //   return H_SCHEDULE
+      // }else if(item.type == 'schedule'){
+      //   return SCHEDULEING
+      // }
+      // if (start.isBefore(currentTime) && end.isAfter(currentTime)) {
+      //   return NOW_PLAN; // NOW
+      // } else if (end.isBefore(currentTime)) {
+      //   return PAST_PLAN; // PAST
+      // } else {
+      //   return FUTHER_PLAN; // Future
+      // }
+    },
+    startToString() {
+      return dayjs(this.item.start).format('HH:mm')
+    },
+    endToString() {
+      return dayjs(this.item.end).format('HH:mm')
+    }
+  },
+  methods: {
+    onClick() {
+      this.updateTimeLines(this.item.start, this.item.end)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.hw {
+  height: 100%;
+  width: 100%;
+  position: relative;
+  z-index: 0;
+  // background:rgba(171, 245, 240 , 0.6);
+  background: rgba(5, 185, 100, 0.1);
+  text-align: center;
+  border-radius: 5px;
+
+
+}
+
+.middle {
+  flex: 1;
+  text-align: center;
+  padding-left: 5px;
+}
+
+.runTime {
+  display: flex;
+  flex-direction: column;
+}
+
+.plan {
+  display: flex;
+  align-items: center;
+  box-sizing: border-box;
+  height: 80%;
+  // border: 1px solid #f0f0f0;
+  border-radius: 5px;
+  color: #333333;
+  // padding-left: 5px;
+  font-size: 0.8rem;
+  // opacity: 0.8;
+}
+
+.capacity {
+  background: rgb(209, 239, 237) !important
+
+}
+
+.detail {
+  .header {
+    text-align: center;
+    font-size: 1rem;
+  }
+}
+
+.detail ul {
+  list-style: none;
+  padding: 0px;
+
+  li {
+    span {
+      // display: inline-block;
+      width: 135px;
+      color: #777;
+      font-size: 0.8rem;
+    }
+
+    span:first-child {
+      text-align: center;
+    }
+
+    span:last-child {
+    }
+  }
+}
+
+.CAPACITY {
+  background: rgba(171, 245, 240, 0.6)
+}
+
+.H_SCHEDULE {
+  background: #05b964;
+  height: 70%;
+  margin-left: 3px;
+  border-radius: 5px;
+  position: relative;
+  z-index: 2;
+  color: whitesmoke;
+  font-size: 12px;
+  line-height: 1.5
+}
+
+.SCHEDULEING {
+  background: #ac96ff;
+  height: 70%;
+  margin-left: 3px;
+  border-radius: 5px;
+  position: relative;
+  z-index: 2;
+  color: whitesmoke;
+  font-size: 12px;
+  line-height: 1.5
+}
+
+.BM_SCHEDULE {
+  background: #FFFF33;
+  height: 70%;
+  margin-left: 3px;
+  border-radius: 5px;
+  position: relative;
+  z-index: 2;
+  color: whitesmoke;
+  font-size: 12px;
+  line-height: 1.5
+}
+</style>
diff --git a/src/components/TestLeft/index.vue b/src/components/TestLeft/index.vue
new file mode 100644
index 0000000..cd0c105
--- /dev/null
+++ b/src/components/TestLeft/index.vue
@@ -0,0 +1,75 @@
+<template>
+  <!-- <div class="name" :style="{background:data.colorPair.light}"> -->
+  <div>
+    <div class="name">
+      <!-- <div class="colorBar"  :style="{background:data.colorPair.dark}"/> -->
+      <!-- <div class="type">{{data.type}}</div> -->
+      <div class="carId"><input type="checkbox" id="label" v-model="ckeckVal" @change="click_box(data)">{{ data.name }}
+      </div>
+      <div class="speed">
+        <el-tooltip class="item" effect="dark" content="鏌ョ湅" placement="top">
+          <el-button type="text" size="mini" @click="look(data.id)">
+            <i class="el-icon-document size i-color "></i>
+          </el-button>
+        </el-tooltip>
+      </div>
+
+    </div>
+    <el-dialog title="鏌ョ湅" :visible.sync="showDialog" width="60%">
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'TestLeft',
+  data() {
+    return {
+      showDialog: false,
+      ckeckVal: true
+    }
+  },
+  props: {
+    data: Object
+  },
+  methods: {
+    look(id) {
+      this.showDialog = true
+      console.log(id)
+    },
+    click_box(data) {
+      console.log(data)
+      console.log(this.ckeckVal)
+    }
+  }
+}
+</script>
+
+<style scoped>
+.name {
+  display: flex;
+  box-sizing: border-box;
+  overflow: hidden;
+  height: 100%;
+  width: 100%;
+  padding: 0 5px 0 0;
+  border-radius: 8px 0 0 8px;
+  align-items: center;
+
+}
+
+.colorBar {
+  width: 10px;
+  height: 100%;
+}
+
+.carId {
+  flex: 1;
+}
+
+.type {
+  padding: 0 5px 0 0;
+  font-size: 1.2rem;
+}
+</style>
diff --git a/src/lib/v-gantt-chart/.babelrc b/src/lib/v-gantt-chart/.babelrc
new file mode 100644
index 0000000..349d5b7
--- /dev/null
+++ b/src/lib/v-gantt-chart/.babelrc
@@ -0,0 +1,16 @@
+{
+  "presets": [
+    ["env", {
+      "modules": false
+    }],
+    "stage-3"
+  ],
+  "env": {
+    "test": {
+      "presets": [
+        ["env"],
+        "stage-3"
+      ]
+    }
+  },
+}
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/.gitignore b/src/lib/v-gantt-chart/.gitignore
new file mode 100644
index 0000000..c6e316b
--- /dev/null
+++ b/src/lib/v-gantt-chart/.gitignore
@@ -0,0 +1,20 @@
+.DS_Store
+node_modules
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw*
diff --git a/src/lib/v-gantt-chart/LICENSE b/src/lib/v-gantt-chart/LICENSE
new file mode 100644
index 0000000..c68217f
--- /dev/null
+++ b/src/lib/v-gantt-chart/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 wuchouchou
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/README.md b/src/lib/v-gantt-chart/README.md
new file mode 100644
index 0000000..70d5c6b
--- /dev/null
+++ b/src/lib/v-gantt-chart/README.md
@@ -0,0 +1,380 @@
+<p align="center"><img src="https://raw.githubusercontent.com/w1301625107/vue-gantt-chart/master/screenshot/icon.png" alt="logo" width="180"></p>
+<h1 align="center">vue-gantt-chart</h1>
+<p align="center">鍩轰簬 Vue  瀹炵幇鐨� gantt-like 鍥捐〃 ,鐢ㄤ簬鎺掔彮灞曠ず</p>
+<p align="center"></p>
+
+[![npm](https://img.shields.io/npm/v/v-gantt-chart.svg)](https://www.npmjs.com/package/v-gantt-chart)
+![](https://img.shields.io/badge/license-MIT-000000.svg)
+
+### [React鐗堟湰](https://github.com/w1301625107/React-Gantt-chart)
+
+### [Demo棰勮鍦板潃](https://w1301625107.github.io/Vue-Gantt-chart/dist/index)
+
+## Feature
+
+- 铏氭嫙鍒楄〃锛屽揩閫熸覆鏌撳彲瑙嗗尯鍩燂紝鏀寔澶ч噺鏁版嵁娓叉煋
+- 鍙彉鏃堕棿杞达紝1 鍒嗛挓锛�2 鍒嗛挓锛�3 鍒嗛挓锛�4 鍒嗛挓~~~鍒颁竴澶�
+- 鍙彉鍗曞厓鏍�
+- 鏍囪绾�
+- 鏀寔鑷畾涔夋弿杩板拰瀹瑰櫒鍧�
+
+## Screenshot
+
+![](https://raw.githubusercontent.com/w1301625107/vue-gantt-chart/master/screenshot/page1.png)
+
+## Install 
+[![v-gantt-chart](https://nodei.co/npm/v-gantt-chart.png)](https://npmjs.org/package/v-gantt-chart)
+
+``` bash
+npm i v-gantt-chart --save
+```
+
+Include plugin in your `main.js` file.
+
+```js
+import Vue from 'vue'
+
+import vGanttChart from 'v-gantt-chart';
+
+Vue.use(vGanttChart});
+```
+
+## Use
+
+### template code
+
+```html
+<template>
+  <v-gantt-chart :startTime="startTime"
+           :endTime="endTime"
+           :datas="datas">
+      <template v-slot:block="{data,item}">
+        <!-- 浣犵殑瀹瑰櫒鍧楃粍浠� -->
+        <Test :data="data" :item="item"></Test>
+      </template>
+      <template v-slot:left="{data}">
+        <!-- 浣犵殑琛屽悕缁勪欢 -->
+        <TestLeft :data="data"></TestLeft>
+      </template>
+      <template v-slot:title>
+        <!-- 浣犵殑琛ㄥご缁勪欢 -->
+        hola
+      </template>
+    </v-gantt-chart>
+</template>
+```
+
+### script code
+
+```js
+import Test from "./test.vue"; //浣犺嚜宸辩殑gantt鏉″鍣�
+import TestLeft from "./test-left.vue"; //浣犺嚜宸辩殑琛屽悕绉扮粍浠�
+import { mockDatas } from "@src/mock/index.js"; //浼�犵殑鏁版嵁
+import dayjs from "dayjs" //鏃堕棿搴�
+
+export default {
+  name: "App",
+  components: { Test, TestLeft },
+  data() {
+    return {
+      startTime: dayjs().toString(),//鏃堕棿杞村紑濮嬫椂闂�
+      endTime: dayjs() 
+        .add(2, "d")
+        .add(2, "h")
+        .add(5, "s").toString(), //鏃堕棿缁撴潫鏃堕棿
+      datas: mockDatas(100), // gantt鏁版嵁
+    };
+  },
+};
+```
+
+鍦�**榛樿鎯呭喌**涓嬶紙鍗砢customGenerateBlocks`涓篳false`锛夌殑娓叉煋鐨勬暟鎹渶瑕�**鐗规畩鏍煎紡** 锛岀洰鍓嶈姹傛暟缁勪腑姣忎竴涓�煎潎涓哄璞★紝涓旀湁`gtAarry`瀵硅薄鏁扮粍杩欎釜灞炴��(榛樿鍙朻gtArray`锛屼篃鍙互鑷畾涔夊涓暟缁刞key`鍊�)
+//鏁扮粍涓瘡涓�涓璞¢渶鏈変袱涓睘鎬э紝`start`鍜宍end`(涓嶆彁渚涚殑鎯呭喌锛屽亸绉讳笌瀹藉害灏嗕负0)锛岄渶涓哄悎娉曠殑鏃堕棿瀛楃涓�.渚嬪
+```js
+[
+  {
+    id:'test', //闈炲繀椤�
+    gtArray:[ //榛樿鐨勯渶瑕佹覆鏌撶殑鏁扮粍鐨刱ey
+      {
+        name:'test', //闈炲繀椤�
+        start:'2019-01-11 18:18:18',
+        end:'2019-01-11 18:18:18'
+      }
+    ]锛�
+    customKey:[ //鑷畾涔夌殑闇�瑕佹覆鏌撶殑鏁扮粍鐨刱ey
+      {
+        id:'test', //闈炲繀椤�
+        start:'2019-01-11 18:18:18',
+        end:'2019-01-11 18:18:18'
+      }
+    ]
+  }
+]
+
+```
+
+## Slot
+
+```js
+// 鍋囪浣犱紶鍏ョ殑鏁版嵁涓�
+[
+  {
+    id:'test', 
+    name:'sala',
+    gtArray:[ 
+      {
+        name:'test', 
+        start:'2019-01-11 18:18:18',
+        end:'2019-01-11 18:18:18'
+        //...
+      }
+    ]锛�
+    //...
+  }
+  //...
+]
+```
+
+### block 瀹瑰櫒鍧梥lot
+#### `customGenerateBlocks` 涓篺alse锛堥粯璁ゅ�硷級 鐨勬儏鍐�
+
+```html
+<template v-slot:block="{data,item}">
+    <!-- 浣犵殑瀹瑰櫒鍧楃粍浠� -->
+    <Test :data="data" :item="item"></Test>
+</template>
+```
+
+`data` 涓�
+```js
+{
+  id:'test', 
+  name:'sala',
+  gtArray:[{...}]锛�
+  //...
+} 
+```
+
+`item` 涓�
+```js
+{
+  name:'test', 
+  start:'2019-01-11 18:18:18',
+  end:'2019-01-11 18:18:18'
+  //...
+}
+```
+
+#### `customGenerateBlocks` 涓簍rue 鐨勬儏鍐�
+
+姝ゆ椂`arrayKeys`锛宍itemkey`灏嗕笉鍦ㄧ敓鏁堬紝濡備綍娓叉煋锛屾覆鏌撲粈涔堬紝灏嗙敱浣犺嚜宸卞喅瀹氾紝涓嬫柟鏄竴涓緥瀛�
+
+```html
+<template v-slot:block="{data,
+                        getPositonOffset,
+                        getWidthAbout2Times,
+                        isInRenderingTimeRange}">
+  <div class="myBlockContainer"
+        v-for="item in data.gtArray"
+        v-if="isInRenderingTimeRange(item.start)
+              ||isInRenderingTimeRange(item.end)"
+        :key="item.id"
+        :style="{position:'absolute',
+                left:getPositonOffset(item.start)+'px',
+                width:getWidthAbout2Times(item.start,item.end)+'px'}">
+    <Test :data="data" 
+          :item="item"></Test>
+  </div>
+</template>
+```
+
+ `data` 涓�
+```js
+{
+  id:'test', 
+  name:'sala',
+  gtArray:[{...}]锛�
+  //...
+} 
+```
+
+`getPositonOffset(time:string):number `
+瀹氫綅鍑芥暟锛屾牴鎹粰瀹氬瓧绗︿覆褰㈠紡鐨勬椂闂寸敓鎴愮浉瀵规椂闂磋酱璧风偣鐨勭殑鍋忕Щ鍊�
+
+`getWidthAbout2Times(start:string,end:string):number`
+涓哄搴﹁绠楀嚱鏁帮紝鏍规嵁缁欏畾瀛楃涓插舰寮忕殑鏃堕棿璁$畻涓や釜鏃堕棿宸殑瀹藉害鍊�
+
+`isInRenderingTimeRange(time:string):boolean`
+鍒ゅ畾缁欏畾鐨勬椂闂存槸鍚﹀湪灞忓箷鏄剧ず鐨勬椂闂磋酱鑼冨洿涔嬪唴
+  
+
+### left 琛屽悕slot
+```html
+<template v-slot:left="{data}">
+    <!-- 浣犵殑琛屽悕缁勪欢 -->
+    <TestLeft :data="data"></TestLeft>
+</template>
+```
+
+`data` 涓�
+```js
+{
+  id:'test', 
+  name:'sala',
+  gtArray:[{...}]锛�
+  //...
+} 
+```
+
+### title 鏍囬slot
+```html
+<template v-slot:title>
+    <!-- 浣犵殑琛ㄥご缁勪欢 -->
+    hola
+</template>
+````
+
+## API
+
+<style>
+.param table th:first-of-type {
+	width: 100px;
+}
+.param table th:nth-of-type(2) {
+	width: 100px;
+}
+.param table th:nth-of-type(4) {
+	width: 100px;
+}
+</style>
+
+<div class="param">
+
+### Param
+
+| param            | required | type  | default | describe                                   |
+| :-------------- | :------: | :-----: | :----: | :---- |
+| startTime       |    鉂�     | string  |   褰撳墠鏃堕棿   | 鏃堕棿杞村紑濮嬫椂闂达紝闇�涓哄悎娉曠殑鏃堕棿瀛楃涓诧紝濡傦細`2019-01-11 18:18:18`|
+| endTime         |    鉂�     | string  |   褰撳墠鏃堕棿   | 鏃堕棿杞寸粨鏉熸椂闂达紝闇�涓哄悎娉曠殑鏃堕棿瀛楃涓诧紝濡傦細`2019-01-11 18:18:18`|
+| cellWidth       |    鉂�     | number  |   50   | 鏃堕棿鍖洪棿鐨勫搴� |
+| cellHeight      |    鉂�     | number  |   20   | 鏃堕棿鍖洪棿鐨勯珮搴� |
+| titleHeight     |    鉂�     | number  |   40   | 琛ㄥご鐨勯珮搴�    |
+| titleWidth      |    鉂�     | number  |  200   | 琛ㄥご鍜岃鐨勫搴� |
+| scale           |    鉂�     | number  |   60   | 鏃堕棿杞寸殑鍒诲害鍊笺�傚崟浣�:鍒嗛挓锛屽厑璁稿�糮[1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 120锛�180,240,360, 720, 1440] `                                   |
+| datas           |    鉂�     |  array  |   []   | 鍦�**榛樿鎯呭喌**涓嬶紙鍗砢customGenerateBlocks`涓篳false`锛夌殑娓叉煋鐨勬暟鎹渶瑕�**鐗规畩鏍煎紡** 锛岀洰鍓嶈姹傛暟缁勪腑姣忎竴涓�煎潎涓哄璞★紝涓旀湁gtAarry瀵硅薄鏁扮粍杩欎釜灞炴�э紝gtArray涓瘡涓�涓璞¢渶鏈変袱涓睘鎬э紝start鍜宔nd(涓嶆彁渚涚殑鎯呭喌锛屽亸绉讳笌瀹藉害灏嗕负0)锛岄渶涓哄悎娉曠殑鏃堕棿瀛楃涓�.渚嬪```[{id:'test',gtArray:[{start:'2019-01-11 18:18:18',end:'2019-01-11 18:18:18'}]}] ``` 鍏朵粬涓嶅仛闄愬埗銆� |
+| arrayKeys|    鉂�     | array  |   ["gtArray"]   | 闇�瑕佹覆鏌撶殑鏁扮粍鐨刱ey  |
+| dataKey         |    鉂�     | string  |   --   | 娓叉煋鐨勬瘡涓�琛岀殑key  |
+| itemKey         |    鉂�     | string  |   --   | 娓叉煋鐨勬瘡涓�涓猤antt瀹瑰櫒鐨刱ey  |
+| showCurrentTime |    鉂�     | boolean | false  | 鏄剧ず褰撳墠鏃堕棿,姣忕閽熸洿鏂�  |
+| timelines       |    鉂�     |  array  |   --   | 鏄剧ず鏍囪鏃堕棿锛屾湁鐗规畩鏍煎紡 ``` [{time:'2019-01-11 18:18:18',color:'#00000'}]```                                                                      |
+| scrollToTime    |    鉂�     | string  |   --   | 婊氬姩鍒版寚瀹氱殑鏃堕棿锛岄渶涓哄悎娉曠殑鏃堕棿瀛楃涓�  |
+| scrollToPostion |    鉂�     | object  |   --   | 婊氬姩鍒版寚瀹氱殑浣嶇疆 鏍煎紡涓篳`` {x:number,y:number}```  |
+| hideHeader |    鉂�     | boolean  |   false   | 闅愯棌鏃堕棿杞村拰琛ㄥご |
+| hideXS |    鉂�     | boolean  |   false   | 闅愯棌鏃堕棿杞村拰琛ㄥご |
+| hideXScrollBar |    鉂�     | boolean  |   false   | 闅愯棌妯悜婊氬姩杞� |
+| hideYScrollBar |    鉂�     | boolean  |   false   | 闅愯棌绾靛悜婊氬姩杞� |
+| customGenerateBlocks |    鉂�     | boolean  |   false | 寮�鍚嚜瀹氫箟鐢熸垚娓叉煋鍧楋紝鍏蜂綋浣跨敤瑙佽鏄� |
+
+
+</div>
+
+<style>
+.event table th:first-of-type {
+	width: 100px;
+}
+.event table th:nth-of-type(2) {
+	width: 100px;
+}
+.event table th:nth-of-type(3) {
+	width: 300px;
+}
+</style>
+
+<div class="event">
+
+### Event
+
+| event | type | describle|
+| :---  |:-----:|:---------|
+| scrollLeft| number | X杞寸殑婊氬姩鍊紎
+| scrollTop | number | Y杞寸殑婊氬姩鍊紎
+
+</div>
+
+## Next plan
+- 鍔犲揩娓叉煋閫熷害
+
+## Run Demo
+
+### 娉ㄦ剰椤圭洰闇�瑕� node 鐜
+
+```bash
+#clone椤圭洰锛岃繘鍏ラ」鐩牴鐩綍
+#瀹夎
+npm i
+# 鍚姩
+npm run serve
+or
+yarn serve
+#鎵撳紑娴忚鍣ㄥ湴鍧�鏍忚緭鍏ocalhost:8080鍗冲彲
+```
+
+## Caution
+IE 闇�瑕佽嚜宸卞鐞嗕竴浜沺loyfill
+
+
+## Update
+1.3.3
+- 淇鏃堕棿杞寸殑鏃ユ湡鏁板瓧鍦ㄦ煇浜涙儏鍐典笅鎾戝紑div锛屽鑷存椂闂磋酱涓嶅噯纭殑闂
+
+1.3.2
+- 淇婊氬姩鐨勮Е鍙戝拰婊氬姩鑼冨洿闄愬埗鐨勯棶棰�
+
+1.3.1
+- 鏇挎崲moment 涓篸ayjs
+- 涓簊tartTime锛宔ndTime锛宒atas娣诲姞榛樿鍊�
+
+1.3.0
+- 浼樺寲娓叉煋閫熷害
+- 鐩告瘮涔嬪墠鐨勮嚜瀹氫箟娓叉煋锛屾坊鍔犱竴涓柊鐨剆lot锛屾敮鎸佽嚜瀹氫箟鐨勫畾浣嶅拰娓叉煋锛屾洿鍔犵殑鐏垫椿
+
+1.2.6
+- 淇褰撴椂闂寸嚎瀹藉害姣旀覆鏌撳搴﹀皬鐨勬儏鍐典笅鐨勯儴鍒嗙櫧灞�
+- 淇鏁版嵁鍒锋柊鏃朵笉閲嶆柊娓叉煋鐨勯棶棰�
+- 淇婊氬姩鏉¢暱搴﹁绠楅棶棰樺鑷寸殑鏃堕棿绾块儴鍒嗚闅愯棌
+- 鏍峰紡寰皟
+
+1.2.5
+- 淇cellheight,cellwidth 鍙樺姩涓斾笉婊氬姩鏃讹紝娓叉煋鏁版嵁鑼冨洿涓嶆甯哥殑闂
+- 淇敼鏍峰紡鐨勫彉鍔ㄥ鐞�
+
+1.2.4
+- 淇婊氬姩鏃跺悜涓婃粴鍔ㄦ椂浼氱┖鐧戒竴琛屾病鏈夋覆鏌撶殑闂
+- 淇宸︿晶琛屽悕鍖烘暟鎹繃灏戞椂锛屾棤娉曠洊浣忓叾搴曚笅鏍囪绾跨殑闂
+
+1.2.3
+- 娣诲姞Resize Observer api  鐨刾olyfill
+
+1.2.2 
+- 閫氳繃Resize Observer api鏉ョ洃鍚琩iv鐨勫彉鍖栵紝鐢ㄤ互淇鎰熺煡涓嶅埌瀹瑰櫒澶у皬鍙樺寲寮曡捣鐨勬覆鏌撴暟閲忎笉姝e父鐨勯棶棰�
+
+1.2.1
+- 鏀寔閫氳繃鐩戝惉scrollLeft鍜宻crollTop鑾峰彇婊氬姩鍊�
+- 淇椤甸潰涓瓨鍦�2涓敇鐗瑰浘婊氬姩閿欒鐨勯棶棰�
+- 淇娌℃湁start锛宔nd鍊煎彲鑳藉紩璧风殑闂锛屽綋涓嶅瓨鍦╯tart锛宔nd鏃跺亸绉讳笌瀹藉害鍧囦负0鍊�
+
+1.2.0
+- 鏀寔闅愯棌婊氬姩鏉�
+- 淇涓�娆℃粴鍔ㄨЕ鍙�2娆℃粴鍔ㄤ簨浠剁殑闂
+- 淇scrollToPosition 鏃犳硶璁剧疆0鍊兼槸闂
+
+1.1.3
+- 娣诲姞榛樿slot
+
+1.1.2
+- 鏀寔闅愯棌琛ㄥご鍜屾椂闂磋酱鍔熻兘
+- 鏀寔鑷畾涔夐渶瑕佹覆鏌撶殑鏁扮粍key
+- 淇妯嚎婊氬姩瓒婄晫闂
+#### License
+
+_MIT_ 漏wuchouchou
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/index.js b/src/lib/v-gantt-chart/index.js
new file mode 100644
index 0000000..8b93e7e
--- /dev/null
+++ b/src/lib/v-gantt-chart/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib')
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/assets/block.png b/src/lib/v-gantt-chart/lib/assets/block.png
new file mode 100644
index 0000000..c4c339e
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/assets/block.png
Binary files differ
diff --git a/src/lib/v-gantt-chart/lib/components/blocks/index.vue b/src/lib/v-gantt-chart/lib/components/blocks/index.vue
new file mode 100644
index 0000000..0cc6c00
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/components/blocks/index.vue
@@ -0,0 +1,156 @@
+<template>
+  <div class="gantt-blocks"
+       :style="{height:blockHeight+'px'}">
+    <div class="gantt-block gantt-block-top-space"
+         :style="{height:calTopSpace()+'px'}">
+    </div>
+    <div class="gantt-block"
+         :style="blockStyle"
+         v-for="(data,index) in showDatas"
+         :key="dataKey?data[dataKey]:index">
+
+      <template v-if="!customGenerateBlocks">
+        <div class="gantt-block-item"
+             v-for="(item,index) in concatArray(data)"
+             v-if="isInRenderingTimeRange(item.start)||isInRenderingTimeRange(item.end)"
+             :key="itemKey?item[itemKey]:index"
+             :style="{left:getPosition(item)+'px',width:getWidth(item)+'px'}">
+          <slot :data="data"
+                :item="item">
+            <div class="gantt-block-defaultBlock">need slot</div>
+          </slot>
+        </div>
+      </template>
+
+      <template v-else>
+        <slot :data="data"
+              :getPositonOffset="getPositonOffset"
+              :getWidthAbout2Times="getWidthAbout2Times"
+              :isInRenderingTimeRange="isInRenderingTimeRange">need slot</slot>
+      </template>
+
+    </div>
+  </div>
+</template>
+
+<script>
+import dr from "../dynamic-render.js";
+import { isUndef, warn } from "../../utils/tool.js";
+
+export default {
+  name: "Blocks",
+  mixins: [dr],
+  props: {
+    dataKey: String,
+    itemKey: String,
+    arrayKeys: {
+      type: Array
+    },
+    scrollLeft: Number,
+    cellWidth: {
+      type: Number,
+      required: true
+    },
+    scale: {
+      type: Number,
+      required: true
+    },
+    widthOfRenderAera: {
+      type: Number,
+      required: true
+    },
+    endTimeOfRenderArea: [Number, null],
+    startTimeOfRenderArea: [Number, null],
+    getPositonOffset: Function,
+    getWidthAbout2Times: Function,
+    customGenerateBlocks: Boolean
+  },
+  computed: {
+    renderAarrys() {
+      let { arrayKeys } = this;
+      if (arrayKeys.length > 0) {
+        return arrayKeys;
+      }
+      return ["gtArray"];
+    },
+    blockStyle() {
+      return {
+        backgroundSize: `${this.cellWidth}px ${this.cellHeight}px`,
+        height: `${this.cellHeight}px`
+      };
+    }
+  },
+
+  methods: {
+    /**
+     * 鏍规嵁renderAarrys鎷兼帴闇�瑕佹覆鏌撶殑鏁扮粍
+     *
+     * @param {*} data
+     * @returns {[]} 璇ata涓墍鏈夐渶瑕佹覆鏌撶殑鏁版嵁
+     */
+    concatArray(data) {
+      return this.renderAarrys.reduce((prev, curr) => {
+        if (Array.isArray(data[curr])) {
+          return prev.concat(data[curr]);
+        } else {
+          return prev;
+        }
+      }, []);
+    },
+    /**
+     * 鍒ゅ畾鏁版嵁鏄惁鍦ㄦ覆鏌撶殑鏃堕棿鑼冨洿鍐�
+     *
+     * @param {{time:string}} item
+     * @returns {boolean} 璇�
+     */
+    isInRenderingTimeRange(time) {
+      if (this.heightOfRenderAera === 0) {
+        return false;
+      }
+
+      let { startTimeOfRenderArea, endTimeOfRenderArea } = this;
+      if (isUndef(startTimeOfRenderArea) || isUndef(endTimeOfRenderArea)) {
+        return false;
+      }
+
+      let timeToMs = new Date(time).getTime();
+      if (startTimeOfRenderArea <= timeToMs && timeToMs <= endTimeOfRenderArea) {
+        return true;
+      }
+      return false;
+    },
+    /**
+     * 璁$畻鏃堕棿鍧楅暱搴�
+     *
+     * @param {{start:string,end:string}} block
+     * @returns {number}
+     */
+    getWidth(block) {
+      if (isUndef(block.start) || isUndef(block.end)) {
+        // warn(`閿欒锛岃鏁版嵁椤逛笉鍚玸tart鍊� 涓� end 鍊� ${JSON.stringify(block)}锛屾棤娉曡绠楀搴﹀�笺�俙)
+        return 0;
+      }
+
+      return this.getWidthAbout2Times(block.start, block.end);
+    },
+    /**
+     * 璁$畻鏃堕棿鍧楀亸绉�
+     *
+     * @param {{start:string}} block
+     * @returns {number}
+     */
+    getPosition(block) {
+      if (isUndef(block.start)) {
+        warn(
+          `閿欒锛岃鏁版嵁椤逛笉鍚玸tart 鍊� ${JSON.stringify(
+            block
+          )}锛屾棤娉曡绠楀亸绉诲�笺�俙
+        );
+        return 0;
+      }
+
+      return this.getPositonOffset(block.start);
+    }
+  }
+};
+</script>
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/components/dynamic-render.js b/src/lib/v-gantt-chart/lib/components/dynamic-render.js
new file mode 100644
index 0000000..fe274b5
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/components/dynamic-render.js
@@ -0,0 +1,126 @@
+let dynamicRender = {
+  props: {
+    scrollTop: {
+      type: Number,
+      required: true
+    },
+    heightOfRenderAera: {
+      type: Number,
+      required: true
+    },
+    cellHeight: {
+      type: Number,
+      required: true
+    },
+    datas: {
+      type: Array,
+      required: true
+    }
+  },
+
+  data() {
+    return {
+      showDatas: [],
+      //涓婁竴娆″姞杞界殑鑺傜偣
+      oldCurrentIndex: 0,
+      //棰勫姞杞界殑鏁伴噺,鏄墠鍚庨兘涓�2涓�
+      preload: 1 // 涓� 0 鏃跺姞杞藉叏閮ㄨ
+    };
+  },
+
+  computed: {
+    blockHeight() {
+      let {
+        datas,
+        cellHeight
+      } = this;
+      return datas.length * cellHeight;
+    },
+    //璁$畻褰撳墠绗竴涓暟鎹殑index
+    currentIndex() {
+      return Math.ceil(this.scrollTop / this.cellHeight);
+    }
+  },
+
+  watch: {
+    currentIndex(val) {
+      let {
+        oldCurrentIndex,
+        preload
+      } = this;
+      if (preload === 0) {
+        this.spliceData();
+        return
+      }
+      if (oldCurrentIndex === val) {
+        return
+      }
+      // 棰勫厛澶氬姞杞藉嚑涓紝閬垮厤杩囧鐨勮Е鍙憇pliceData锛� 
+      let errorValue = 1 // 涓鸿宸�硷紝
+      if (val < oldCurrentIndex - (preload - errorValue) || val >
+        oldCurrentIndex + (preload - errorValue)) {
+        this.oldCurrentIndex = val;
+        this.spliceData();
+      }
+    },
+    datas() {
+      this.spliceData()
+    },
+    heightOfRenderAera() {
+      this.spliceData()
+    },
+    cellHeight() {
+      this.spliceData()
+    }
+  },
+
+  created() {
+    this.spliceData();
+  },
+
+  methods: {
+    /**
+     * 鍒嗗壊鍑篸om涓樉绀虹殑鏁版嵁
+     */
+    spliceData() {
+      let {
+        heightOfRenderAera,
+        currentIndex,
+        cellHeight,
+        preload
+      } = this;
+      //娌℃湁楂樺害锛屼笉闇�瑕佹覆鏌撳厓绱�
+      if (heightOfRenderAera === 0 || cellHeight === 0) {
+        return []
+      }
+
+      if (preload === 0) {
+        this.showDatas = this.datas
+        return
+      }
+
+      let end = currentIndex + Math.ceil(heightOfRenderAera / cellHeight) +
+        preload;
+      let start = currentIndex - preload > 0 ? currentIndex - preload : 0;
+      this.showDatas = this.datas.slice(start, end);
+    },
+    //
+    /**
+     * 璁$畻绗竴涓拺寮�鍓嶇疆楂樺害鐨勫鍣ㄥ潡楂樺害
+     */
+    calTopSpace() {
+      let {
+        oldCurrentIndex,
+        cellHeight,
+        preload
+      } = this;
+      let start =
+        oldCurrentIndex - preload >= 0 ? oldCurrentIndex - preload : 0;
+
+        return  start == 0 ? start * cellHeight : start - 1  * cellHeight
+     
+    },
+  }
+}; 
+
+export default dynamicRender;
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/components/left-bar/index.vue b/src/lib/v-gantt-chart/lib/components/left-bar/index.vue
new file mode 100644
index 0000000..5662465
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/components/left-bar/index.vue
@@ -0,0 +1,37 @@
+<template>
+  <div class="gantt-leftbar">
+    <div class="gantt-leftbar-item "
+         :style="{height:calTopSpace()+'px'}">
+    </div>
+    <div class="gantt-leftbar-item"
+         :style="cellHeightStyle"
+         v-for="(data,index) in showDatas"
+         :key="dataKey?data[dataKey]:index">
+      <slot :data="data">
+        <div class="gantt-leftbar-defalutItem">need slot</div>
+      </slot>
+    </div>
+  </div>
+</template>
+  
+<script>
+import dr from '../dynamic-render.js'
+export default {
+  name: "LeftBar",
+  mixins:[dr],
+  props:{
+    dataKey:String,
+    datas: {
+      type: Array,
+      required: true
+    }
+  },
+  computed:{
+    cellHeightStyle(){
+      return {
+        'height':`${this.cellHeight}px`
+      }
+    }
+  }
+};
+</script>
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/components/mark-line/current-time.vue b/src/lib/v-gantt-chart/lib/components/mark-line/current-time.vue
new file mode 100644
index 0000000..3f508bf
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/components/mark-line/current-time.vue
@@ -0,0 +1,33 @@
+<template>
+  <mark-line :markLineTime="currentTime"
+             :getPositonOffset="getPositonOffset"
+             color="rgba(255,0,0,.4)"></mark-line>
+</template>
+
+<script>
+import dayjs from "dayjs";
+import MarkLine from "./index.vue";
+export default {
+  name: "CurrentTime",
+  components: { MarkLine },
+  props: {
+    getPositonOffset: {
+      type: Function,
+      required: true
+    }
+  },
+  data() {
+    return {
+      currentTime: dayjs().toString()
+    };
+  },
+  created() {
+    const timeNow = setInterval(() => {
+      this.currentTime = dayjs().toString();
+    }, 1000);
+    this.$once("hook:beforeDestroy", () => {
+      clearInterval(timeNow);
+    });
+  }
+};
+</script>
diff --git a/src/lib/v-gantt-chart/lib/components/mark-line/index.vue b/src/lib/v-gantt-chart/lib/components/mark-line/index.vue
new file mode 100644
index 0000000..84df959
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/components/mark-line/index.vue
@@ -0,0 +1,47 @@
+<template>
+  <div v-show="visible"
+       class="gantt-markline"
+       :style="{'background-color':color,'left':getPosition()+'px'}">
+    <div class="gantt-markline-label"
+         :style="{'background-color':color}">{{dayjs(markLineTime).format("HH:mm:ss")}}</div>
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+export default {
+  name: "MarkLine",
+  props: {
+    markLineTime: {
+      validator(date) {
+        return dayjs(date).isValid();
+      }
+    },
+    color: {
+      type: String,
+      default: "#00a79d"
+    },
+    getPositonOffset: {
+      type: Function,
+      required: true
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      dayjs:dayjs
+    };
+  },
+  methods: {
+    getPosition() {
+      if (this.markLineTime == null) {
+        this.visible = false;
+        return 0;
+      } else {
+        this.visible = true;
+        return this.getPositonOffset(this.markLineTime);
+      }
+    }
+  }
+};
+</script>
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/components/time-line/index.vue b/src/lib/v-gantt-chart/lib/components/time-line/index.vue
new file mode 100644
index 0000000..1715e11
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/components/time-line/index.vue
@@ -0,0 +1,162 @@
+<template>
+  <div class="gantt-timeline"
+       :style="{'margin-left':-cellWidth/2+'px'}">
+    <div class="gantt-timeline-block"
+         v-for="(day,index) in getDays" :style="{width:getTimeScales(day).length*cellWidth+'px'}"
+         :key="index">
+      <div class="gantt-timeline-day "
+           :style="heightStyle">
+        {{day.format("YYYY-MM-DD")}}
+        {{getDayMy(day.format("YYYY-MM-DD"))}}
+        </div>
+      <div class="gantt-timeline-scale "
+           :style="heightStyle">
+        <div :style="cellWidthStyle"
+             v-for="(hour,index) in getTimeScales(day)"
+             :key="index">
+            {{hour}}
+          <!-- <span v-if="hour !='01' ">{{hour}}</span> -->
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+import { getBeginTimeOfTimeLine } from "../../utils/timeLineUtils.js";
+
+const START_DAY = Symbol();
+const MIDDLE_DAY = Symbol();
+const END_DAY = Symbol();
+
+function isSameDay(one, two) {
+  return one.isSame(two, "day");
+}
+
+export default {
+  name: "Timeline",
+
+  props: {
+    start: {
+      type: dayjs
+    },
+    end: {
+      type: dayjs
+    },
+    cellWidth: {
+      type: Number
+    },
+    titleHeight: {
+      type: Number
+    },
+    scale: {
+      type: Number
+    }
+  },
+
+  computed: {
+    /**
+     * 澶╁垪琛�
+     * @returns {[dayjs]} 璇ata涓墍鏈夐渶瑕佹覆鏌撶殑鏁版嵁
+     */
+    getDays() {
+      let temp = [];
+      let { start, end } = this;
+
+      for (; !isSameDay(start, end); start = start.add(1, "day")) {
+        temp.push(start);
+      }
+      temp.push(start);
+
+      return temp;
+    },
+    cellWidthStyle() {
+      return {
+        width: `${this.cellWidth}px`
+      };
+    },
+    heightStyle() {
+      return {
+        height: this.titleHeight + "px",
+        "line-height": this.titleHeight  + "px",
+      };
+    }
+  },
+
+  methods: {
+    // 绠楀嚭鏄熸湡
+    getDayMy(day){
+      let weekArray = new Array("鏄熸湡鏃�", "鏄熸湡涓�", "鏄熸湡浜�", "鏄熸湡涓�", "鏄熸湡鍥�", "鏄熸湡浜�", "鏄熸湡鍏�");
+      return weekArray[new Date(day).getDay()]
+    },
+    /**
+     * 鑾峰彇鏃堕棿鍒诲害鏁扮粍
+     *
+     * @param {dayjs} date
+     * @returns {[string]} 璇ata涓墍鏈夐渶瑕佹覆鏌撶殑鏁版嵁
+     */
+    getTimeScales(date) {
+      let { start, end } = this;
+      if (isSameDay(date, start)) {
+        return this.generateTimeScale(START_DAY);
+      } else if (isSameDay(date, end)) {
+        return this.generateTimeScale(END_DAY);
+      } else {
+        return this.generateTimeScale(MIDDLE_DAY);
+      }
+    },
+    /**
+     * 鐢熸垚鏃堕棿鍒诲害鏁扮粍
+     *
+     * @param {Symbol} type
+     * @returns {[string]} 璇ata涓墍鏈夐渶瑕佹覆鏌撶殑鏁版嵁
+     */
+    generateTimeScale(type) {
+      let totalblock = [];
+      let { start, end, scale } = this;
+      let a, b;
+      switch (type) {
+        case START_DAY: //鍜宻tart鍚屼竴澶�
+          a = getBeginTimeOfTimeLine(start, scale);
+          //start鍜宔nd鍚屼竴澶╃壒娈婂鐞�
+          if (isSameDay(start, end)) {
+            b = end;
+          } else {
+            b = start.endOf("day");
+          }
+          break;
+        case END_DAY: //鍜宔nd 鍚屼竴澶�
+          a = end.startOf("day");
+          b = end;
+          break;
+        case MIDDLE_DAY: //start鍜宔nd涓棿鐨勫ぉ
+          a = start.startOf("day");
+          b = start.endOf("day");
+          break;
+        default:
+          throw new TypeError("閿欒鐨勮绠楃被鍨�");
+      }
+      while (!a.isAfter(b)) {
+        if (scale >= 60) {
+          totalblock.push(a.format("HH"));
+        } else {
+          totalblock.push(a.format("HH:mm"));
+        }
+        a = a.add(scale, "minute");
+      }
+
+      return totalblock;
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.gantt-timeline-day{
+  border-right: 1px solid #ebeef5;
+  border-bottom: 1px solid #ebeef5;
+  background: rgb(245, 245, 245);
+  color: #909399;
+  font-size: 14px;
+}
+</style>
diff --git a/src/lib/v-gantt-chart/lib/gantt.scss b/src/lib/v-gantt-chart/lib/gantt.scss
new file mode 100644
index 0000000..6c06552
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/gantt.scss
@@ -0,0 +1,176 @@
+$gray: #f0f0f0;
+
+$font-gray:#777;
+
+.gantt {
+  &-chart {
+    position: relative;
+    overflow: hidden;
+    height: 100%;
+    width: 100%;
+    outline: 1px solid $gray;
+  }
+
+  &-container{
+    width: 100%;
+    height: 100%;
+  }
+
+  &-header {
+    display: flex;
+    background-color: #fff;
+    outline: 1px solid $gray;
+
+    &-title {
+      flex: none;
+      width: 100%;
+      background: whitesmoke;
+      color: #777;
+      font-weight: bold;
+      text-align: center;
+    }
+
+    &-timeline {
+      overflow: hidden;
+    }
+  }
+
+  &-body {
+    position: relative;
+  }
+
+  &-timeline {
+    position: relative;
+    text-align: center;
+    display: flex;
+
+    &-day {
+      overflow: hidden;
+      font-weight: bold;
+      color: $font-gray;
+    }
+
+    &-scale {
+      display: flex;
+
+      &>div {
+        height: 100%;
+        font-size: 0.8rem;
+        font-weight: bold;
+        color: $font-gray;
+      }
+    }
+
+    // 闅愯棌绗竴涓椂闂磋妭鐐癸紝涓嶇劧浼氬彧鏄剧ず涓�鍗婏紝涓嶅ソ鐪�
+    &-block:first-child &-scale div:first-child {
+      visibility: hidden;
+    }
+  }
+
+  &-leftbar {
+    width: 100%;
+    height: 100%;
+    background: #fff;
+    color: $font-gray;
+    font-size: 0.8rem;
+
+    &-wrapper {
+      flex: none;
+      position: relative;
+      overflow: hidden;
+      background: #fff;
+      outline: 1px solid $gray;
+      z-index: 100;
+    }
+
+    &-item {}
+
+    &-defalutItem {
+      width: 100%;
+      height: 100%;
+      outline: 1px solid $gray
+    }
+  }
+
+  &-table {
+    display: flex;
+    width: 100%;
+    height: 100%;
+  }
+
+  &-markline-area {
+    position: absolute;
+    z-index: 99;
+  }
+
+  &-markline {
+    position: absolute;
+    z-index: 100;
+    width: 2px;
+    height: 100vh;
+
+    &-label {
+      padding: 3px;
+      float: left;
+      color: #fff;
+      font-size: 0.7rem;
+    }
+  }
+
+  &-blocks {
+    &-wrapper {
+      overflow: hidden;
+    }
+  }
+
+  &-block {
+    position: relative;
+    // background-image: url('./assets/block.png');
+    background-repeat: repeat;
+
+    &-container {
+      position: relative;
+      height: 100%;
+    }
+
+    &-item {
+      position: absolute;
+      height: 100%;
+    }
+
+    &-defaultBlock {
+      width: 100%;
+      height: 100%;
+      outline: 1px solid $gray;
+      background: $gray;
+    }
+  }
+
+  &-scroll-y {
+    overflow-y: scroll;
+    position: absolute;
+    z-index: 1000;
+    top: 0;
+    right: 0;
+    height: 100%;
+    width: 17px;
+
+    &>div {
+      width: 17px;
+    }
+  }
+
+  &-scroll-x {
+    overflow-x: scroll;
+    position: absolute;
+    z-index: 1000;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    height: 17px;
+
+    &>div {
+      height: 17px;
+    }
+  }
+}
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/gantt.vue b/src/lib/v-gantt-chart/lib/gantt.vue
new file mode 100644
index 0000000..7334293
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/gantt.vue
@@ -0,0 +1,550 @@
+<template>
+
+  <div class="gantt-chart"
+       @wheel="wheelHandle">
+    <div class="gantt-container"
+         :style="{height:`calc(100% - ${scrollXBarHeight}px)`,width:`calc(100% - ${scrollYBarWidth}px)`}">
+    <!-- <div class="gantt-container"> -->
+      <div v-show="!hideHeader"
+           class="gantt-header"
+           :style="{width:`calc(100% + ${scrollYBarWidth}px)`}">
+        <div class="gantt-header-title"
+             :style="{'line-height':titleHeight+'px',height:titleHeight+'px','width':titleWidth+'px'}">
+          <slot name="title">welcome v-gantt-chart</slot>
+        </div>
+        <div ref="headerTimeline"
+             class="gantt-header-timeline">
+          <div class="gantt-timeline-wrapper"
+               :style="{width:(totalWidth+scrollYBarWidth)+'px'}">
+            <timeline :start="start"
+                      :end="end"
+                      :cellWidth="cellWidth"
+                      :titleHeight="titleHeight"
+                      :scale="scale">
+            </timeline>
+          </div>
+        </div>
+      </div>
+
+      <div class="gantt-body"
+           :style="{height:`calc(100% - ${actualHeaderHeight}px)`}">
+          <!-- <div class="gantt-body" style="height:500px"> -->
+        <div class="gantt-table">
+          <div ref="marklineArea"
+               :style="{marginLeft:(titleWidth+50)+'px'}"
+               class="gantt-markline-area">
+            <!-- <CurrentTime v-if="showCurrentTime"
+                         :getPositonOffset="getPositonOffset" /> -->
+            <!-- <mark-line v-for="(times,index) in timeLines"
+                       :key="index"
+                       :markLineTime="times.time"
+                       :getPositonOffset="getPositonOffset"
+                       :color="times.color"></mark-line> -->
+          </div>
+          <div ref="leftbarWrapper"
+               class="gantt-leftbar-wrapper"
+               :style="{'width':(titleWidth)+'px',height:`calc(100% + ${scrollXBarHeight}px)`}">
+            <LeftBar :datas="datas"
+                     :dataKey="dataKey"
+                     :scrollTop="scrollTop"
+                     :heightOfRenderAera="heightOfRenderAera"
+                     :widthOfRenderAera="widthOfRenderAera"
+                     :cellHeight="cellHeight"
+                     :style="{height:(totalHeight+scrollXBarHeight)+'px'}">
+              <template slot-scope="{data}">
+                <slot name="left"
+                      :data="data">
+                </slot>
+              </template>
+            </LeftBar>
+          </div>
+          <div ref="blocksWrapper"
+               class="gantt-blocks-wrapper">
+            <blocks :scrollTop="scrollTop"
+                    :scrollLeft="scrollLeft"
+                    :heightOfRenderAera="heightOfRenderAera"
+                    :widthOfRenderAera="widthOfRenderAera"
+                    :arrayKeys="arrayKeys"
+                    :itemKey="itemKey"
+                    :dataKey="dataKey"
+                    :datas="datas"
+                    :cellWidth="cellWidth"
+                    :cellHeight="cellHeight"
+                    :scale="scale"
+                    :getPositonOffset="getPositonOffset"
+                    :getWidthAbout2Times="getWidthAbout2Times"
+                    :customGenerateBlocks="customGenerateBlocks"
+                    :startTimeOfRenderArea="startTimeOfRenderArea"
+                    :endTimeOfRenderArea="endTimeOfRenderArea"
+                    :style="{width:totalWidth+'px'}">
+              
+              <!-- <template slot-scope="{data,item}">    
+                <slot name="block"
+                      :data="data"
+                      :item="item">
+                </slot>
+              </template> -->
+
+              <template 
+                  slot-scope="{data,item,getPositonOffset,getWidthAbout2Times,isInRenderingTimeRange}">
+                <slot name="block"
+                      :data="data"
+                      :item="item"
+                      :getPositonOffset="getPositonOffset"
+                      :getWidthAbout2Times="getWidthAbout2Times"
+                      :isInRenderingTimeRange="isInRenderingTimeRange"
+                      :startTimeOfRenderArea="startTimeOfRenderArea"
+                      :endTimeOfRenderArea="endTimeOfRenderArea"></slot>
+              </template>
+            
+            </blocks>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div ref="scrollYBar"
+         class="gantt-scroll-y"
+         :style="{width:`${scrollYBarWidth}px`,
+         height:`calc(100% - ${actualHeaderHeight}px`,marginTop:`${actualHeaderHeight}px`}"
+         @scroll="syncScrollY">
+      <div :style="{height:totalHeight+'px'}"></div>
+    </div>
+
+    <div ref="scrollXBar"
+         class="gantt-scroll-x"
+         :style="{height:`${scrollXBarHeight}px`,
+         width:`calc(100% - ${titleWidth}px )`,marginLeft:titleWidth+'px'}"
+         @scroll="syncScrollX">
+      <div :style="{width:totalWidth+'px'}"></div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+import ResizeObserver from "resize-observer-polyfill";
+import {
+  scaleList,
+  getBeginTimeOfTimeLine,
+  calcScalesAbout2Times
+} from "./utils/timeLineUtils.js";
+import { isDef, warn } from "./utils/tool.js";
+import {
+  getPositonOffset as _getPositonOffset,
+  getWidthAbout2Times as _getWidthAbout2Times
+} from "./utils/gtUtils.js";
+import throttle from "./utils/throttle.js";
+import Timeline from "./components/time-line/index.vue";
+import CurrentTime from "./components/mark-line/current-time.vue";
+import LeftBar from "./components/left-bar/index.vue";
+import Blocks from "./components/blocks/index.vue";
+import MarkLine from "./components/mark-line/index.vue";
+
+export default {
+  name: "Gantt",
+
+  components: { Timeline, LeftBar, Blocks, MarkLine, CurrentTime },
+
+  props: {
+    startTime: {
+      default: () => dayjs(),
+      validator(date) {
+        let ok = dayjs(date).isValid();
+        if (!ok) warn(`闈炴硶鐨勫紑濮嬫椂闂� ${date}`);
+        return ok;
+      }
+    },
+    endTime: {
+      default: () => dayjs(),
+      validator(date) {
+        let ok = dayjs(date).isValid();
+        if (!ok) warn(`闈炴硶鐨勭粨鏉熸椂闂� ${date}`);
+        return ok;
+      }
+    },
+    cellWidth: {
+      type: Number,
+      default: 50
+    },
+    cellHeight: {
+      type: Number,
+      default: 20
+    },
+    titleHeight: {
+      type: Number,
+      default: 40
+    },
+    titleWidth: {
+      type: Number,
+      default: 200
+    },
+    scale: {
+      type: Number,
+      default: 60,
+      validator(value) {
+        return scaleList.includes(value);
+      }
+    },
+    datas: {
+      type: Array,
+      default: () => []
+    },
+    dataKey: {
+      type: String,
+      default: undefined
+    },
+    itemKey: {
+      type: String,
+      default: undefined
+    },
+    arrayKeys: {
+      type: Array,
+      default: () => []
+    },
+    showCurrentTime: {
+      type: Boolean,
+      default: false
+    },
+    timeLines: {
+      type: Array
+    },
+    scrollToTime: {
+      validator(date) {
+        return dayjs(date).isValid();
+      }
+    },
+    scrollToPostion: {
+      validator(obj) {
+        let validX = isDef(obj.x) ? !Number.isNaN(obj.x) : true;
+        let validY = isDef(obj.y) ? !Number.isNaN(obj.y) : true;
+        if (!validX && !validY) {
+          warn("scrollToPostion x鎴杫 鏈夊�间负闈濶umber绫诲瀷");
+          return false;
+        }
+        return true;
+      }
+    },
+    hideHeader: {
+      type: Boolean,
+      default: false
+    },
+    hideXScrollBar: {
+      type: Boolean,
+      default: false
+    },
+    hideYScrollBar: {
+      type: Boolean,
+      default: false
+    },
+    customGenerateBlocks: {
+      type: Boolean,
+      default: false
+    }
+  },
+
+  data() {
+    return {
+      //缂撳瓨鑺傜偣
+      selector: {
+        gantt_leftbar: {},
+        gantt_table: {},
+        gantt_scroll_y: {},
+        gantt_timeline: {},
+        gantt_scroll_x: {},
+        gantt_markArea: {}
+      },
+      scrollTop: 0,
+      scrollLeft: 0,
+      //block 鍖哄煙闇�瑕佹覆鏌撶殑鑼冨洿
+      //鍏堟覆鏌撳嚭绌烘鏋讹紝鍦╩ounted鍚庡啀寰楀埌鐪熷疄鐨勬覆鏌撹寖鍥达紝鐒跺悗鍦ㄦ牴鎹寖鍥存覆鏌撴暟鎹紝姣斾箣鍓嶈缃竴涓粯璁ら珮搴﹀搴︼紝棰濆鐨勬覆鏌撴氮璐规洿灏戜簡
+      heightOfRenderAera: 0,
+      widthOfRenderAera: 0,
+      startTimeOfRenderArea: null,
+      endTimeOfRenderArea: null,
+      scrollBarWitdh: 17
+    };
+  },
+
+  computed: {
+    start() {
+      return dayjs(this.startTime);
+    },
+    end() {
+      let { start, widthOfRenderAera, scale, cellWidth } = this;
+      let end = dayjs(this.endTime);
+      let totalWidth = calcScalesAbout2Times(start, end, scale) * cellWidth;
+      if (start.isAfter(end) || totalWidth <= widthOfRenderAera) {
+        end = start.add((widthOfRenderAera / cellWidth) * scale, "minute");
+      }
+      return end;
+    },
+    totalWidth() {
+      let { cellWidth, totalScales } = this;
+      return cellWidth * totalScales;
+    },
+    totalScales() {
+      let { start, end, scale } = this;
+      return calcScalesAbout2Times(start, end, scale);
+    },
+    totalHeight() {
+      let { datas, cellHeight } = this;
+      return datas.length * cellHeight;
+    },
+    beginTimeOfTimeLine() {
+      let value = getBeginTimeOfTimeLine(this.start, this.scale);
+      return value;
+    },
+    beginTimeOfTimeLineToString() {
+      return this.beginTimeOfTimeLine.toString();
+    },
+    avialableScrollLeft() {
+      // 涓嶅噺杩欎釜1锛屾粴鍔ㄥ埌鏃堕棿杞村敖澶村悗缁х画婊氬姩浼氭參鎱㈢殑婧㈠嚭
+      let { totalWidth, widthOfRenderAera } = this;
+      return totalWidth - widthOfRenderAera - 1;
+    },
+    avialableScrollTop() {
+      let { totalHeight, heightOfRenderAera } = this;
+      return totalHeight - heightOfRenderAera - 1;
+    },
+    scrollXBarHeight() {
+      return this.hideXScrollBar ? 0 : this.scrollBarWitdh;
+    },
+    scrollYBarWidth() {
+      return this.hideYScrollBar ? 0 : this.scrollBarWitdh;
+    },
+    actualHeaderHeight() {
+      return this.hideHeader ? 0 : this.titleHeight;
+    }
+  },
+
+  watch: {
+    scrollLeft() {
+      this.getTimeRange();
+    },
+    widthOfRenderAera() {
+      this.getTimeRange();
+    },
+    cellWidth() {
+      this.getTimeRange();
+    },
+    scrollToTime: {
+      handler(newV) {
+        if (!newV) {
+          return;
+        }
+        let { start, end } = this;
+        let time = dayjs(newV);
+        if (!(time.isAfter(start) && time.isBefore(end))) {
+          warn(`褰撳墠婊氬姩鑷�${newV}涓嶅湪${start}鍜�${end}鐨勮寖鍥翠箣鍐卄);
+          return;
+        }
+
+        let offset = this.getPositonOffset(newV);
+        // immediate 浼氶�犳垚dom 杩樻病鏈夋寕杞芥椂灏辫繘琛屾搷浣滐紝鏁呴渶瑕佸欢杩熸墽琛�
+        this.$nextTick(() =>
+          this.syncScrollX(
+            {
+              target: {
+                scrollLeft: offset
+              }
+            },
+            true
+          )
+        );
+      },
+      immediate: true
+    },
+    scrollToPostion: {
+      handler(newV) {
+        if (!newV) {
+          return;
+        }
+        let x = Number.isNaN(newV.x) ? undefined : newV.x;
+        let y = Number.isNaN(newV.y) ? undefined : newV.y;
+        this.$nextTick(() => {
+          if (isDef(x) && x !== this.scrollLeft) {
+            this.syncScrollX({ target: { scrollLeft: x } }, true);
+          }
+          if (isDef(y) && y !== this.scrollTop) {
+            this.syncScrollY({ target: { scrollTop: y } }, true);
+          }
+        });
+      },
+      immediate: true
+    }
+  },
+
+  mounted() {
+    this.getSelector();
+    // 璁$畻鍑嗙‘鐨勬覆鏌撳尯鍩熻寖鍥�
+    const observeContainer = throttle(entries => {
+      entries.forEach(entry => {
+        const cr = entry.contentRect;
+        this.heightOfRenderAera = cr.height;
+        this.widthOfRenderAera = cr.width;
+      });
+    });
+    const observer = new ResizeObserver(observeContainer);
+    observer.observe(this.$refs.blocksWrapper);
+  },
+
+  methods: {
+    /**
+     * 璁$畻闇�瑕佹覆鏌撶殑鏃堕棿鑼冨洿
+     *
+     */
+    getTimeRange() {
+      if (this.heightOfRenderAera === 0) {
+        return;
+      }
+
+      let {
+        beginTimeOfTimeLine,
+        scrollLeft,
+        cellWidth,
+        scale,
+        widthOfRenderAera
+      } = this;
+
+      this.startTimeOfRenderArea = beginTimeOfTimeLine
+        .add((scrollLeft / cellWidth) * scale, "minute")
+        .toDate()
+        .getTime();
+      this.endTimeOfRenderArea = beginTimeOfTimeLine
+        .add(((scrollLeft + widthOfRenderAera) / cellWidth) * scale, "minute")
+        .toDate()
+        .getTime();
+    },
+    getWidthAbout2Times(start, end) {
+      let options = {
+        scale: this.scale,
+        cellWidth: this.cellWidth
+      };
+      return _getWidthAbout2Times(start, end, options);
+    },
+    /**
+     * 涓烘椂闂寸嚎璁$畻鍋忕Щ
+     */
+    getPositonOffset(date) {
+      let options = {
+        scale: this.scale,
+        cellWidth: this.cellWidth
+      };
+
+      return _getPositonOffset(date, this.beginTimeOfTimeLineToString, options);
+    },
+    //缂撳瓨鑺傜偣
+    getSelector() {
+      this.selector.gantt_leftbar = this.$refs.leftbarWrapper;
+      this.selector.gantt_table = this.$refs.blocksWrapper;
+      this.selector.gantt_scroll_y = this.$refs.scrollYBar;
+      this.selector.gantt_timeline = this.$refs.headerTimeline;
+      this.selector.gantt_scroll_x = this.$refs.scrollXBar;
+      this.selector.gantt_markArea = this.$refs.marklineArea;
+    },
+    wheelHandle(event) {
+      let { deltaX, deltaY } = event;
+      this.$nextTick(() => {
+        let {
+          scrollTop,
+          scrollLeft,
+          avialableScrollLeft,
+          avialableScrollTop
+        } = this;
+
+        if (deltaY !== 0) {
+          if (
+            scrollTop + deltaY >= avialableScrollTop &&
+            scrollTop !== avialableScrollTop
+          ) {
+            this.syncScrollY(
+              { target: { scrollTop: avialableScrollTop } },
+              true
+            );
+          } else if (
+            scrollTop + deltaY < 0 &&
+            scrollTop !== 0 /*婊氬姩涓�0闄愬埗*/
+          ) {
+            this.syncScrollY({ target: { scrollTop: 0 } }, true);
+          } else {
+            this.syncScrollY(
+              { target: { scrollTop: scrollTop + deltaY } },
+              true
+            );
+          }
+        }
+        if (deltaX !== 0) {
+          if (
+            scrollLeft + deltaX >= avialableScrollLeft &&
+            scrollLeft !== avialableScrollLeft
+          ) {
+            this.syncScrollX(
+              { target: { scrollLeft: avialableScrollLeft } },
+              true
+            );
+          } else if (
+            scrollLeft + deltaX < 0 &&
+            scrollLeft !== 0 /*婊氬姩涓�0闄愬埗*/
+          ) {
+            this.syncScrollX({ target: { scrollLeft: 0 } }, true);
+          } else {
+            this.syncScrollX(
+              { target: { scrollLeft: scrollLeft + deltaX } },
+              true
+            );
+          }
+        }
+      });
+    },
+    //鍚屾fixleft鍜宐lock鐨勬粴鍔�
+    syncScrollY(event, fake = false) {
+      let { gantt_leftbar, gantt_table, gantt_scroll_y } = this.selector;
+      let topValue = event.target.scrollTop;
+      if (fake) {
+        //浼氳Е鍙戜竴娆$湡鐨勬粴鍔ㄤ簨浠秂vent, 鍚庨潰鐨勪唬鐮佷細鍦ㄧ浜屼釜浜嬩欢涓墽琛�
+        gantt_scroll_y.scrollTop = topValue;
+        return;
+      }
+      gantt_leftbar.scrollTop = topValue;
+      gantt_table.scrollTop = topValue;
+      this.scrollTop = topValue;
+      this.$emit("scrollTop", topValue);
+    },
+    syncScrollX(event, fake = false) {
+      let {
+        gantt_table,
+        gantt_timeline,
+        gantt_markArea,
+        gantt_scroll_x
+      } = this.selector;
+      let leftValue = event.target.scrollLeft;
+      if (fake) {
+        //浼氳Е鍙戜竴娆$湡鐨勬粴鍔ㄤ簨浠秂vent, 鍚庨潰鐨勪唬鐮佷細鍦ㄧ浜屼釜浜嬩欢涓墽琛�
+        gantt_scroll_x.scrollLeft = leftValue;
+        return;
+      }
+      gantt_table.scrollLeft = leftValue;
+      gantt_timeline.scrollLeft = leftValue;
+      gantt_markArea.style.left = "-" + leftValue + "px";
+      this.scrollLeft = leftValue;
+      this.$emit("scrollLeft", leftValue);
+    }
+  }
+};
+</script>
+
+<style lang="scss">
+@import "./gantt.scss";
+.gantt-leftbar-wrapper{
+  // overflow-y: scroll;
+  // overflow: visible;
+}
+.gantt-body{
+  // overflow-y: scroll;
+}
+.gantt-leftbar{
+  // overflow-y: scroll;
+}
+</style>
diff --git a/src/lib/v-gantt-chart/lib/index.js b/src/lib/v-gantt-chart/lib/index.js
new file mode 100644
index 0000000..6dd03ab
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/index.js
@@ -0,0 +1,20 @@
+// gantt.vue鍐欐垜浠殑缁勪欢
+import gantt from './gantt.vue'
+
+// 瀹氫箟鎴戜滑鐨勬彃浠�
+const myPlugin = {
+  // 璇ユ彃浠舵湁涓�涓猧nstall鏂规硶
+  // 鏂规硶鐨勭涓�涓弬鏁版槸浼犲叆鐨刅ue锛岀浜屼釜鍙傛暟鍙互鎻掍欢鐨勮嚜瀹氫箟鍙傛暟
+  // eslint-disable-next-line
+    install (Vue, options) {
+    // 灏嗗叾娉ㄥ唽涓簐ue鐨勭粍浠讹紝'gantt'鏄粍浠跺悕锛宬eyboard鏄垜浠紑鍙戠殑缁勪欢
+    Vue.component('v-gantt-chart', gantt)
+  }
+}
+// 鏂板
+if (typeof window !== 'undefined' && window.Vue) {
+  window.Vue.use(gantt)
+}
+
+// 鏈�鍚庡皢鎻掍欢瀵煎嚭锛屽苟鍦╩ain.js涓�氳繃Vue.use()鍗冲彲浣跨敤鎻掍欢
+export default myPlugin
diff --git a/src/lib/v-gantt-chart/lib/utils/debounce.js b/src/lib/v-gantt-chart/lib/utils/debounce.js
new file mode 100644
index 0000000..a1f8133
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/utils/debounce.js
@@ -0,0 +1,20 @@
+export default function debounce(fn, interval = 500, immediate = false) {
+  //fn涓鸿鎵ц鐨勫嚱鏁�
+  //interval涓虹瓑寰呯殑鏃堕棿
+  //immediate鍒ゆ柇鏄惁绔嬪嵆鎵ц
+  var timeout; //瀹氭椂鍣�
+
+  return function() { //杩斿洖涓�涓棴鍖�
+    var context = this,
+      args = arguments; //鍏堟妸鍙橀噺缂撳瓨
+    var later = function() { //鎶婄◢鍚庤鎵ц鐨勪唬鐮佸皝瑁呰捣鏉�
+      timeout = null; //鎴愬姛璋冪敤鍚庢竻闄ゅ畾鏃跺櫒
+      if (!immediate) fn.apply(context, args); //涓嶇珛鍗虫墽琛屾椂鎵嶅彲浠ヨ皟鐢�
+    };
+
+    var callNow = immediate && !timeout; //鍒ゆ柇鏄惁绔嬪嵆璋冪敤锛屽苟涓斿鏋滃畾鏃跺櫒瀛樺湪锛屽垯涓嶇珛鍗宠皟鐢�
+    clearTimeout(timeout); //涓嶇浠�涔堟儏鍐碉紝鍏堟竻闄ゅ畾鏃跺櫒锛岃繖鏄渶绋冲Ε鐨�
+    timeout = setTimeout(later, interval); //寤惰繜鎵ц
+    if (callNow) fn.apply(context, args); //濡傛灉鏄涓�娆¤Е鍙戯紝骞朵笖immediate涓簍rue锛屽垯绔嬪嵆鎵ц
+  }
+}
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/utils/gtUtils.js b/src/lib/v-gantt-chart/lib/utils/gtUtils.js
new file mode 100644
index 0000000..63617c2
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/utils/gtUtils.js
@@ -0,0 +1,85 @@
+// import dayjs from 'dayjs' //鏇挎崲dayjs 鍏煎鎬т細濂戒竴鐐癸紝浣嗘槸閫熷害灏卞緢鎱簡锛屼箣鍓嶆祴浜嗕竴涓嬶紝澶ф蹇�30鍊嶏紵鏈夌偣蹇樿浜�
+
+//缂撳瓨 瑙f瀽鍊硷紝鍔犻�熶竴鐐圭偣鍚�
+
+const cacheParseTime = function () {
+  let cacheString = {}
+  let cacheValue = {}
+  
+  return function(timeName, timeString) {
+
+    if (cacheString[timeName] !== timeString) {
+      cacheString[timeName] = timeString;
+      cacheValue[timeName] = parseTime(timeString)
+    }
+
+    return cacheValue[timeName]
+  }
+}()
+
+// pStart 鍏充簬缂撳瓨杩欎釜鍊兼槸鍥犱负getWidthAbout2Times鍜実etPositonOffset閫氬父鏄墠鍚庤繛缁皟鐢紝start 鍊间細鍐嶄袱涓嚱鏁颁腑鍒嗗埆鐢ㄥ埌涓�娆�
+
+/**
+ * 鏍规嵁閰嶇疆椤硅绠椾袱涓椂闂寸殑鍦╣antt 鍥句腑鐨勯暱搴�
+ * 娉細鏃堕棿涓妔tart 鏃╋紝 end 鏅�
+ *
+ * @export
+ * @param {string} start
+ * @param {string} end
+ * @param {{scale:number,cellWidth:number}} arg
+ * @returns number
+ */
+export function getWidthAbout2Times(start, end, arg) {
+  let {
+    scale,
+    cellWidth
+  } = arg;
+  let pStart = cacheParseTime('pStart', start);
+  let pEnd = parseTime(end)
+  return diffTimeByMinutes(pStart, pEnd) / scale * cellWidth;
+}
+
+/**
+ * 鏍规嵁閰嶇疆椤硅绠� 鐩稿浜� 鏃堕棿杞磋捣濮嬫椂闂寸殑璺濈 鏄� getWidthAbout2Times 鐨勭壒鍖�
+ * 娉細鏃堕棿涓婏紝time 鏅�  beginTimeOfTimeLine 鏃�
+ *
+ * @export
+ * @param {string} time
+ * @param {string} beginTimeOfTimeLine
+ * @param {{scale:number,cellWidth:number}} arg
+ * @returns number
+ */
+export function getPositonOffset(time, beginTimeOfTimeLine, arg) {
+  let {
+    scale,
+    cellWidth,
+  } = arg;
+  let pTime = cacheParseTime('pStart', time);
+  let pBeginTimeOfTimeLine = cacheParseTime('pBeginTimeOfTimeLine', beginTimeOfTimeLine);
+  return diffTimeByMinutes(pBeginTimeOfTimeLine, pTime) / scale * cellWidth;
+}
+
+function parseTime(time) {
+  return new Date(time)
+}
+/**
+ * 璁$畻涓や釜鏃堕棿鐩稿樊鐨勫垎閽熸暟
+ *
+ * @param {string} start
+ * @param {string} end
+ * @returns
+ */
+function diffTimeByMinutes(start, end) {
+  let diff = end.getTime() - start.getTime()
+  return (diff / 1000 / 60)
+}
+
+
+
+// function parseTime(time){
+//   return dayjs(time)
+// }
+
+// function diffTimeByMinutes(start,end){
+//   return end.diff(start, "m", true)
+// }
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/utils/throttle.js b/src/lib/v-gantt-chart/lib/utils/throttle.js
new file mode 100644
index 0000000..9b51ead
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/utils/throttle.js
@@ -0,0 +1,21 @@
+export default function throttle(fn, interval = 100) { //fn涓鸿鎵ц鐨勫嚱鏁帮紝interval涓哄欢杩熸椂闂�
+  var _self = fn, //淇濆瓨闇�瑕佽寤惰繜鎵ц鐨勫嚱鏁板紩鐢�
+    timer, //瀹氭椂鍣�
+    firstTime = true; //鏄惁绗竴娆¤皟鐢�
+  return function() { //杩斿洖涓�涓嚱鏁帮紝褰㈡垚闂寘锛屾寔涔呭寲鍙橀噺
+    var args = arguments, //缂撳瓨鍙橀噺
+      _me = this;
+    if (firstTime) { //濡傛灉鏄涓�娆¤皟鐢紝涓嶇敤寤惰繜鎵ц
+      _self.apply(_me, args);
+      return firstTime = false;
+    }
+    if (timer) { //濡傛灉瀹氭椂鍣ㄨ繕鍦紝璇存槑涓婁竴娆″欢杩熸墽琛岃繕娌℃湁瀹屾垚
+      return false;
+    }
+    timer = setTimeout(function() { //寤惰繜涓�娈垫椂闂存墽琛�
+      clearTimeout(timer);
+      timer = null;
+      _self.apply(_me, args);
+    }, interval);
+  }
+}
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/utils/timeLineUtils.js b/src/lib/v-gantt-chart/lib/utils/timeLineUtils.js
new file mode 100644
index 0000000..f308fe6
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/utils/timeLineUtils.js
@@ -0,0 +1,74 @@
+import dayjs from 'dayjs'
+
+export const scaleList = [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 120, 180,
+  240,
+  360, 720, 1440
+]
+/**
+ * 楠岃瘉鏄惁鍚堟硶scale鍊�
+ *
+ * @export
+ * @param {number} scale
+ * @returns
+ */
+export function validateScale(scale) {
+  if (!scaleList.includes(scale)) {
+    throw new RangeError(
+      `閿欒鐨剆cale鍊硷紝杈撳叆鍊间负${scale},鍙敤鐨剆cale鍊间负${scaleList.join(',')}`)
+  }
+  return true;
+}
+
+/**
+ * 鏍规嵁缁欏嚭鐨剆cale 鍜� start 鏃堕棿 璁$畻鍑虹敤浜庤绠楀拰鐢熸垚鍥捐〃鐨勫惎濮嬫椂闂�
+ * eg锛歋tart 涓�10:10鍒� 鍒诲害涓�60锛実etBeginTimeOfTimeLine鍑芥暟缁欏嚭鐨勬椂闂� 涓� 10:00鍒�
+ *                    鍒诲害涓�5锛実etBeginTimeOfTimeLine鍑芥暟缁欏嚭鐨勬椂闂� 涓� 10:10鍒�
+ *                    鍒诲害涓�3锛実etBeginTimeOfTimeLine鍑芥暟缁欏嚭鐨勬椂闂� 涓� 10:09鍒�
+ *
+ * @export
+ * @param {dayjs} start 
+ * @param {number} [scale=60]
+ * @returns {dayjs}璁$畻鐨勫惎濮嬫椂闂�
+ */
+export function getBeginTimeOfTimeLine(start, scale = 60) {
+  validateScale(scale)
+  let timeBlocks;
+  let startClone = start.clone();
+  let rate = scale / 60;
+  if (scale > 60) {
+    timeBlocks = Math.floor(start.hour() / rate);
+    startClone = startClone.hour(timeBlocks * rate).minute(0).second(0);
+  } else {
+    timeBlocks = Math.floor(start.minute() / scale);
+    startClone = startClone.minute(timeBlocks * scale).second(0);
+  }
+
+  return startClone;
+}
+/**
+ * 鏍规嵁鎵�缁� scale璁$畻 涓や釜鏃堕棿宸竴鍏卞彲浠ュ垎鎴愬灏戜釜鍒诲害
+ * 娉ㄦ剰锛� timdStart 骞朵笉鏄疄闄呯殑寮�濮嬭绠楃殑鏃堕棿锛屼細閫氳繃getBeginTimeOfTimeLine 鍑芥暟璁$畻鍑哄垎鍓插紑濮嬫椂闂�
+ *
+ * @export
+ * @param {dayjs} timeStart 寮�濮嬫椂闂�
+ * @param {dayjs} timeEnd 缁撴潫鏃堕棿
+ * @param {number} [scale=60] 鍒嗗壊鐨勫埢搴�
+ * @returns 鏃堕棿鍧楁暟閲�
+ */
+export function calcScalesAbout2Times(timeStart, timeEnd, scale = 60) {
+  if (timeStart.isAfter(timeEnd)) {
+    throw new TypeError('閿欒鐨勫弬鏁伴『搴忥紝鍑芥暟calcScalesAbout2Times鐨勭涓�涓椂闂村弬鏁板繀椤诲ぇ浜庣浜屼釜鏃堕棿鍙傛暟')
+  }
+
+  validateScale(scale);
+
+  let startBlocksTime = getBeginTimeOfTimeLine(timeStart, scale);
+  let count = 0;
+  while (!startBlocksTime.isAfter(timeEnd)) {
+    count++;
+    startBlocksTime = startBlocksTime.add(scale, "minute")
+  }
+
+  return count;
+
+}
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/lib/utils/tool.js b/src/lib/v-gantt-chart/lib/utils/tool.js
new file mode 100644
index 0000000..799d122
--- /dev/null
+++ b/src/lib/v-gantt-chart/lib/utils/tool.js
@@ -0,0 +1,25 @@
+/**
+ * 鏄惁娌℃湁鍊�
+ *
+ * @export
+ * @param {*} v
+ * @returns
+ */
+export function isUndef(v){
+  return v === undefined || v === null
+}
+/**
+ * 鏄惁鏈夊��
+ *
+ * @export
+ * @param {*} v
+ * @returns
+ */
+export function isDef(v){
+  return v !== undefined && v !== null
+}
+
+export function warn(str){
+  // eslint-disable-next-line
+  console.warn(str)
+}
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/package.json b/src/lib/v-gantt-chart/package.json
new file mode 100644
index 0000000..96dcf8e
--- /dev/null
+++ b/src/lib/v-gantt-chart/package.json
@@ -0,0 +1,52 @@
+{
+  "name": "v-gantt-chart",
+  "version": "1.3.3",
+  "description": "display gantt-like vaule,like use this to order bus schedule.",
+  "main": "dist/v-gantt-chart.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/w1301625107/Vue-Gantt-chart.git"
+  },
+  "bugs": {
+    "url": "https://github.com/w1301625107/Vue-Gantt-chart/issues"
+  },
+  "homepage": "https://github.com/w1301625107/Vue-Gantt-chart#readme",
+  "keywords": [
+    "vue-gantt-chart",
+    "gantt",
+    "gantt-chart",
+    "v-gantt-chart"
+  ],
+  "author": "wuchouchou",
+  "license": "MIT",
+  "scripts": {
+    "test":" BABEL_ENV=test mocha --require babel-core/register ",
+    "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
+  },
+  "dependencies": {
+    "dayjs": "^1.8.11",
+    "resize-observer-polyfill": "^1.5.1",
+    "vue": "^2.5.21"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ],
+  "devDependencies": {
+    "babel-core": "^6.26.0",
+    "babel-loader": "^7.1.2",
+    "babel-preset-env": "^1.6.0",
+    "babel-preset-stage-3": "^6.24.1",
+    "chai": "^4.2.0",
+    "cross-env": "^5.0.5",
+    "css-loader": "^0.28.7",
+    "mocha": "^6.0.2",
+    "node-sass": "^4.11.0",
+    "sass-loader": "^6.0.6",
+    "url-loader": "^1.1.0",
+    "vue-loader": "^13.0.5",
+    "vue-template-compiler": "^2.5.21",
+    "webpack": "^3.6.0"
+  }
+}
diff --git a/src/lib/v-gantt-chart/test/gtUtils.test.js b/src/lib/v-gantt-chart/test/gtUtils.test.js
new file mode 100644
index 0000000..d1e80ce
--- /dev/null
+++ b/src/lib/v-gantt-chart/test/gtUtils.test.js
@@ -0,0 +1,103 @@
+var expect = require('chai').expect;
+var func = require('../lib/utils/gtUtils')
+import dayjs from 'dayjs'
+
+describe('娴嬭瘯gtUtils.js', function() {
+
+  describe('娴嬭瘯getWidthAbout2Times鍑芥暟', function() {
+    it('鐩稿悓鏃堕棿 璁$畻缁撴灉涓�0', function() {
+      expect(func.getWidthAbout2Times(dayjs(
+          '2018-10-10 10:00:00'), dayjs(
+        '2018-10-10 10:00:00'), {
+          scale: 60,
+          cellWidth: 60
+        }))
+        .to.be.equal(0);
+    });
+
+    it('鏁版嵁娴嬭瘯1', function() {
+      expect(func.getWidthAbout2Times(dayjs(
+        '2018-10-10 10:00:00'), dayjs(
+      '2018-10-10 11:00:00'), {
+        scale: 60,
+        cellWidth: 60
+      })).to.equal(60)
+    });
+
+    it('鏁版嵁娴嬭瘯2', function() {
+      expect(func.getWidthAbout2Times(dayjs(
+        '2018-10-10 00:00:00'), dayjs(
+      '2018-10-10 01:10:00'), {
+        scale: 1,
+        cellWidth: 1
+      })).to.equal(70)
+    });
+
+    it('鏁版嵁娴嬭瘯3', function() {
+      expect(func.getWidthAbout2Times(dayjs(
+        '2018-10-11 10:00:00'), dayjs(
+      '2018-10-11 00:00:00'), {
+        scale: 10,
+        cellWidth: 10
+      })).to.equal(-600)
+    });
+
+    it('鏁版嵁娴嬭瘯4', function() {
+      expect(func.getWidthAbout2Times(dayjs(
+        '2018-10-10 00:00:00'), dayjs(
+      '2018-10-10 10:00:00'), {
+        scale: 10,
+        cellWidth: 60
+      })).to.equal(3600)
+    });
+  });
+
+  describe('娴嬭瘯getPositonOffset鍑芥暟', function() {
+    it('鐩稿悓鏃堕棿 璁$畻缁撴灉涓�0', function() {
+      expect(func.getPositonOffset(dayjs(
+          '2018-10-10 10:00:00'), dayjs(
+        '2018-10-10 10:00:00'), {
+          scale: 60,
+          cellWidth: 60
+        }))
+        .to.be.equal(0);
+    });
+
+    it('鏁版嵁娴嬭瘯1', function() {
+      expect(func.getPositonOffset(dayjs(
+        '2018-10-10 10:00:00'), dayjs(
+      '2018-10-10 11:00:00'), {
+        scale: 60,
+        cellWidth: 60
+      })).to.equal(-60)
+    });
+
+    it('鏁版嵁娴嬭瘯2', function() {
+      expect(func.getPositonOffset(dayjs(
+        '2018-10-10 00:00:00'), dayjs(
+      '2018-10-10 01:10:00'), {
+        scale: 60,
+        cellWidth: 60
+      })).to.equal(-70)
+    });
+
+    it('鏁版嵁娴嬭瘯3', function() {
+      expect(func.getPositonOffset(dayjs(
+        '2018-10-11 10:00:00'), dayjs(
+      '2018-10-11 00:00:00'), {
+        scale: 60,
+        cellWidth: 60
+      })).to.equal(+600)
+    });
+
+    it('鏁版嵁娴嬭瘯4', function() {
+      expect(func.getPositonOffset(dayjs(
+        '2018-10-10 00:00:00'), dayjs(
+      '2018-10-10 10:00:00'), {
+        scale: 60,
+        cellWidth: 60
+      })).to.equal(-600)
+    });
+  });
+
+});
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/test/timeblock.test.js b/src/lib/v-gantt-chart/test/timeblock.test.js
new file mode 100644
index 0000000..5da7ef3
--- /dev/null
+++ b/src/lib/v-gantt-chart/test/timeblock.test.js
@@ -0,0 +1,95 @@
+var expect = require('chai').expect;
+var func = require('../lib/utils/timeLineUtils')
+import dayjs from 'dayjs'
+
+describe('娴嬭瘯timeLineUtils.js', function() {
+  describe('娴嬭瘯calcScalesAbout2Times鍑芥暟', function() {
+    it('鐩稿悓鏃堕棿 璁$畻缁撴灉涓�1', function() {
+      expect(func.calcScalesAbout2Times(dayjs(
+          '2018-10-10 10:00:00'), dayjs('2018-10-10 10:00:00'), ))
+        .to.be.equal(1);
+    });
+
+
+    it('start 鍦� end 涔嬪悗 鎶ラ敊', function() {
+      expect(() => func.calcScalesAbout2Times(dayjs(
+          '2018-10-12 10:00:00'), dayjs('2018-10-10 10:00:00'),
+        11)).to.throw('閿欒鐨勫弬鏁伴『搴�');
+    });
+
+    it('鏁版嵁娴嬭瘯1', function() {
+      expect(func.calcScalesAbout2Times(dayjs(
+          '2018-10-10 10:00:00'), dayjs('2018-10-10 11:00:00'),
+        10)).to.equal(7)
+    });
+
+    it('鏁版嵁娴嬭瘯2', function() {
+      expect(func.calcScalesAbout2Times(dayjs(
+          '2018-10-10 00:00:00'), dayjs('2018-10-10 11:00:00'),
+        60)).to.equal(12)
+    });
+
+    it('鏁版嵁娴嬭瘯3', function() {
+      expect(func.calcScalesAbout2Times(dayjs(
+          '2018-10-10 10:00:00'), dayjs('2018-10-11 00:00:00'),
+        60)).to.equal(15)
+    });
+
+    it('鏁版嵁娴嬭瘯4', function() {
+      expect(func.calcScalesAbout2Times(dayjs(
+          '2018-10-10 00:00:00'), dayjs('2018-10-11 00:00:00'),
+        60)).to.equal(25)
+    });
+
+  });
+
+  describe('娴嬭瘯getBeginTimeOfTimeLine鍑芥暟', function() {
+    it('娴嬭瘯鏁版嵁1', function() {
+      expect( func.getBeginTimeOfTimeLine(dayjs('2018-10-11 00:00:00')).toString())
+        .to.be.equal(dayjs('2018-10-11 00:00:00').toString());
+    });
+
+    it('娴嬭瘯鏁版嵁2', function() {
+      expect( func.getBeginTimeOfTimeLine(dayjs('2018-10-11 00:00:00'),3).toString())
+        .to.be.equal(dayjs('2018-10-11 00:00:00').toString());
+    });
+
+    it('娴嬭瘯鏁版嵁3', function() {
+      expect( func.getBeginTimeOfTimeLine(dayjs('2018-10-11 00:04:00'),3).toString())
+        .to.be.equal(dayjs('2018-10-11 00:03:00').toString());
+    });
+
+    it('娴嬭瘯鏁版嵁4', function() {
+      expect( func.getBeginTimeOfTimeLine(dayjs('2018-10-11 01:11:00'),10).toString())
+        .to.be.equal(dayjs('2018-10-11 01:10:00').toString());
+    });
+  });
+
+  describe('娴嬭瘯validateScale鍑芥暟', function() {
+    it('绌哄�煎紓甯�', function() {
+      expect(() => func.validateScale())
+        .to.throw();
+    });
+
+    it('null 鍊�', function() {
+      expect(() => func.validateScale(null))
+        .to.throw();
+    });
+
+    it('undefined 鍊�', function() {
+      expect(() => func.validateScale(undefined))
+        .to.throw();
+    });
+
+    it('寮傚父scale 鍊兼姤閿�', function() {
+      expect(() => func.validateScale())
+        .to.throw();
+    });
+
+    it('姝e父鍊�', function() {
+      expect(func.validateScale(1))
+        .to.be.true;
+    });
+
+  });
+});
\ No newline at end of file
diff --git a/src/lib/v-gantt-chart/webpack.config.js b/src/lib/v-gantt-chart/webpack.config.js
new file mode 100644
index 0000000..95f5b15
--- /dev/null
+++ b/src/lib/v-gantt-chart/webpack.config.js
@@ -0,0 +1,106 @@
+var path = require('path')
+var webpack = require('webpack')
+
+module.exports = {
+  entry: './lib/index.js',
+  output: {
+    path: path.resolve(__dirname, './dist'),
+    publicPath: '/dist/',
+    filename: 'v-gantt-chart.js',
+    library: 'vGanttChart',
+    libraryTarget: 'umd',
+    umdNamedDefine: true
+  },
+  module: {
+    rules: [{
+        test: /\.css$/,
+        use: [
+          'vue-style-loader',
+          'css-loader'
+        ],
+      },
+      {
+        test: /\.scss$/,
+        use: [
+          'vue-style-loader',
+          'css-loader',
+          'sass-loader'
+        ],
+      },
+      {
+        test: /\.sass$/,
+        use: [
+          'vue-style-loader',
+          'css-loader',
+          'sass-loader?indentedSyntax'
+        ],
+      },
+      {
+        test: /\.vue$/,
+        loader: 'vue-loader',
+        options: {
+          loaders: {
+            // Since sass-loader (weirdly) has SCSS as its default parse mode, we map
+            // the "scss" and "sass" values for the lang attribute to the right configs here.
+            // other preprocessors should work out of the box, no loader config like this necessary.
+            'scss': [
+              'vue-style-loader',
+              'css-loader',
+              'sass-loader'
+            ],
+            'sass': [
+              'vue-style-loader',
+              'css-loader',
+              'sass-loader?indentedSyntax'
+            ]
+          }
+          // other vue-loader options go here
+        }
+      },
+      {
+        test: /\.js$/,
+        loader: 'babel-loader',
+        exclude: /node_modules/
+      },
+      {
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: 'img/[name].[hash:7].[ext]'
+        }
+      },
+    ]
+  },
+  resolve: {
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js'
+    },
+    extensions: ['*', '.js', '.vue', '.json']
+  },
+  performance: {
+    hints: false
+  },
+  devtool: '#eval-source-map'
+}
+
+if (process.env.NODE_ENV === 'production') {
+  module.exports.devtool = '#source-map'
+  // http://vue-loader.vuejs.org/en/workflow/production.html
+  module.exports.plugins = (module.exports.plugins || []).concat([
+    new webpack.DefinePlugin({
+      'process.env': {
+        NODE_ENV: '"production"'
+      }
+    }),
+    new webpack.optimize.UglifyJsPlugin({
+      sourceMap: true,
+      compress: {
+        warnings: false
+      }
+    }),
+    new webpack.LoaderOptionsPlugin({
+      minimize: true
+    })
+  ])
+}
\ No newline at end of file
diff --git a/src/views/sbgl/byjl.vue b/src/views/sbgl/byjl.vue
index 34f4bdb..1def61d 100644
--- a/src/views/sbgl/byjl.vue
+++ b/src/views/sbgl/byjl.vue
@@ -1,8 +1,825 @@
-<template />
+<template>
+  <div>
+    <el-tabs>
+      <el-row style="margin-bottom:20px">
+        <!-- <el-col :span="2">
+       <el-input v-model="form.Seach"  @keyup.enter.native="SeachKey" placeholder="璇疯緭鍏ュ叧閿瘝" size="small"></el-input>
+        </el-col>-->
+        <el-col :span="7" :offset="1">
+          <span class="t_size" style="margin-left:7px">鎺掔▼鏃ユ湡</span>
+          <el-date-picker
+            v-model="value1"
+            type="daterange"
+            range-separator="~"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            start-placeholder="寮�濮嬫棩鏈�"
+            end-placeholder="缁撴潫鏃ユ湡"
+            size="small"
+            :picker-options="pickerOptions1"
+          />
+        </el-col>
+
+        <el-col :span="3">
+          <span class="t_size">鎺掔▼鏂瑰紡</span>
+          <el-select v-model="types" size="small" style="width:120px" @change="changeTypes">
+            <el-option value="N" label="璁惧浼樺厛" />
+            <el-option value="Y" label="鏃堕棿浼樺厛" />
+          </el-select>
+        </el-col>
+
+        <el-col :span="3" :offset="1">
+          <div style="height:32px;">
+            <span class="t_size">鏃堕棿鍒诲害</span>
+            <select id="scale" v-model.number="scale">
+              <option v-for="i in scaleList" :key="i">{{ i }}</option>
+            </select>
+            <span class="t_size">鍒嗛挓</span>
+          </div>
+        </el-col>
+
+        <el-col :span="3">
+          <div style="height:32px;">
+            <span class="t_size">鎹㈠瀷鏃堕棿</span>
+            <el-input
+              id="scale"
+              v-model="times"
+              type="number"
+              size="mini"
+              style="display:inline-block;width:80px;"
+              @change="no_zero"
+            />
+            <span class="t_size">鍒嗛挓</span>
+          </div>
+        </el-col>
+
+        <el-col :span="3">
+          <div style="height:32px;line-height: 28px;">
+            <span class="t_size">棰勬帓杩涘害</span>
+            <span>
+              <span style="text-decoration:underline;">{{ real_num }}</span> /
+              <span style="text-decoration:underline">{{ meter }}</span>
+            </span>
+          </div>
+        </el-col>
+
+        <el-col :span="3">
+          <el-button
+            type="primary"
+            size="mini"
+            icon="el-icon-document-remove"
+            style="margin-left:20px;"
+          >棰勬帓
+            <!--            @click="click_schedule"-->
+
+          </el-button>
+          <el-button
+            type="primary"
+            size="mini"
+            icon="el-icon-document-checked"
+          >鎻愪氦
+            <!--            @click="click_yes"-->
+
+          </el-button>
+          <p />
+        </el-col>
+      </el-row>
+      <el-row />
+    </el-tabs>
+    <div class="container">
+      <v-gantt-chart
+        :start-time="time_data[0]"
+        :end-time="time_data[1]"
+        :cell-width="cellWidth"
+        :cell-height="cellHeight"
+        :time-lines="timeLines"
+        :title-height="titleHeight"
+        :scale="scale"
+        :title-width="titleWidth"
+        show-current-time
+        :hide-header="hideHeader"
+        :data-key="dataKey"
+        :array-keys="arrayKeys"
+        :scroll-to-postion="positionA"
+        :datas="bm_data"
+      >
+        <!--        @scrollLeft="scrollLeftA"-->
+
+        <template slot="block" slot-scope="{data,item}">
+          <Test
+            :data="data"
+            :update-time-lines="updateTimeLines"
+            :cell-height="cellHeight"
+            :current-time="currentTime"
+            :item="item"
+          />
+        </template>
+        <template slot="left" slot-scope="{data}">
+          <div class="name">
+            <div class="carId">
+              <el-checkbox
+                v-model="data.status"
+                style="margin-right:5px;"
+              />
+              <!--              @change="click_box(data)"-->
+
+              {{ data.id }} {{ data.name }}
+            </div>
+            <div class="speed">
+              <el-tooltip class="item" effect="dark" content="鏌ョ湅" placement="top">
+                <el-button type="text" size="mini">
+                  <!--                  @click="look(data)"-->
+                  <i class="el-icon-document size i-color" />
+                </el-button>
+              </el-tooltip>
+            </div>
+          </div>
+        </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>
+      </v-gantt-chart>
+    </div>
+  </div>
+</template>
 
 <script>
+import dayjs from 'dayjs'
+import { mockDatas } from '@/views/sbgl/index1'
+
 export default {
-  name: 'Byjl'
+  name: 'Byjl',
+  data() {
+    return {
+      show: true,
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() <= Date.now() - 24 * 60 * 60 * 1000
+        }
+      },
+      real_num: 0,
+      keep_data: [],
+      all_status: true,
+      look_data: [],
+      look_total: 0,
+      cl_name: '',
+      cl_code: '',
+      work_order: '',
+      false_arr: [],
+      ckeckVal: true,
+      AdvaScheUom: '',
+      list: [],
+      form: {
+        WorkShop: '',
+        PartNumber: '',
+        PartName: '',
+        rows: 10,
+        page: 1
+      },
+      showDialog: false,
+      time_data: [],
+      forms: {
+        WorkCode: '',
+        WorkShop: '',
+        PartNumber: '',
+        BotProceCode: '',
+        StartTime: '',
+        EndTime: ''
+      },
+      click_one: 0,
+      datasC: [],
+      radio: '',
+      value1: '',
+      types: 'N',
+      no: false,
+      total: 0,
+      mn_data: [],
+      bm_data: [],
+      facility_data: [],
+      end_start: '',
+      timeLines: [
+        {
+          time: dayjs()
+            .add(2, 'hour')
+            .toString()
+        },
+        {
+          time: dayjs()
+            .add(5, 'hour')
+            .toString(),
+          color: '#747e80'
+        }
+      ],
+      formUpdata: {
+        WorkCode: '',
+        BotProceCode: '',
+        json: []
+      },
+      currentTime: dayjs(),
+      startTime: dayjs()
+        .subtract(5, 'hour')
+        .toString(),
+      endTime: dayjs()
+        .add(2, 'day')
+        .add(2, 'hour')
+        .toString(),
+      cellWidth: 50,
+      cellHeight: 30,
+      titleHeight: 40,
+      titleWidth: 250,
+      scale: 60,
+      datasNum: 100,
+      // datasA: [],
+      // datasB: mockDatas(100),
+      dataKey: 'id',
+      times: 0,
+      timeList: timeList,
+      scaleList: scaleList,
+      scrollToTime: dayjs()
+        .add(1, 'day')
+        .toString(),
+      scrollToPostion: { x: 10000, y: 10000 },
+      hideHeader: false,
+      arrayKeys: ['gtArray', 'error'],
+      scrollToY: 0,
+      positionB: {},
+      positionA: {},
+      meter: 0, // 鑺傛媿
+      title_list: [],
+      imp_id: '',
+      submit_flag: false,
+      search_from: {
+        page: 1,
+        rows: 10,
+        WorkTime: '',
+        BotProceName: ''
+      },
+      testValue: {
+        'rus': {
+          'statusCode': '',
+          'message': '',
+          'MOD_S': '',
+          'MAR_S': '',
+          'EQP_S': '',
+          'CUT_S': '',
+          'FIXT_S': '',
+          'HouseNumber': '',
+          'navTabId': '',
+          'dialogid': '',
+          'rel': '',
+          'dt': null,
+          'list': {},
+          'callbackType': '',
+          'forwardUrl': ''
+        },
+        'rows': [
+          {
+            'YearDate': '2022-09-01',
+            'children': [
+              {
+                'AdvaDevicNumber': 'LKFDL_SC-PC029',
+                'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+                'AdvaDevicCropMob': '78',
+                'AdvaDevicRhythm': '10',
+                'OneStartDate': '08:00~11:30',
+                'TwoStartDate': '12:30~17:00',
+                'ThreeStartDate': '',
+                'FourStartDate': '',
+                'FiveStartDate': ''
+              }
+            ]
+          },
+          {
+            'YearDate': '2022-09-02',
+            'children': [
+              {
+                'AdvaDevicNumber': 'LKFDL_SC-PC029',
+                'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+                'AdvaDevicCropMob': '78',
+                'AdvaDevicRhythm': '10',
+                'OneStartDate': '08:00~11:30',
+                'TwoStartDate': '12:30~17:00',
+                'ThreeStartDate': '',
+                'FourStartDate': '',
+                'FiveStartDate': ''
+              }
+            ]
+          },
+          {
+            'YearDate': '2022-09-03',
+            'children': [
+              {
+                'AdvaDevicNumber': 'LKFDL_SC-PC029',
+                'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+                'AdvaDevicCropMob': '78',
+                'AdvaDevicRhythm': '10',
+                'OneStartDate': '08:00~11:30',
+                'TwoStartDate': '12:30~17:00',
+                'ThreeStartDate': '',
+                'FourStartDate': '',
+                'FiveStartDate': ''
+              }
+            ]
+          },
+          {
+            'YearDate': '2022-09-04',
+            'children': [
+              {
+                'AdvaDevicNumber': 'LKFDL_SC-PC029',
+                'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+                'AdvaDevicCropMob': '78',
+                'AdvaDevicRhythm': '10',
+                'OneStartDate': '08:00~11:30',
+                'TwoStartDate': '12:30~17:00',
+                'ThreeStartDate': '',
+                'FourStartDate': '',
+                'FiveStartDate': ''
+              }
+            ]
+          },
+          {
+            'YearDate': '2022-09-05',
+            'children': [
+              {
+                'AdvaDevicNumber': 'LKFDL_SC-PC029',
+                'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+                'AdvaDevicCropMob': '78',
+                'AdvaDevicRhythm': '10',
+                'OneStartDate': '08:00~11:30',
+                'TwoStartDate': '12:30~17:00',
+                'ThreeStartDate': '',
+                'FourStartDate': '',
+                'FiveStartDate': ''
+              }
+            ]
+          },
+          {
+            'YearDate': '2022-09-06',
+            'children': [
+              {
+                'AdvaDevicNumber': 'LKFDL_SC-PC029',
+                'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+                'AdvaDevicCropMob': '78',
+                'AdvaDevicRhythm': '10',
+                'OneStartDate': '08:00~11:30',
+                'TwoStartDate': '12:30~17:00',
+                'ThreeStartDate': '',
+                'FourStartDate': '',
+                'FiveStartDate': ''
+              }
+            ]
+          }
+        ],
+        'Cont': null
+      }
+    }
+  },
+  mounted() {
+    this.OnclickAdvancedSchedulingDevice()
+  },
+  methods: {
+    OnclickAdvancedSchedulingDevice() {
+      this.facility_top()
+
+      // automaticScheduling
+      //   .OnclickAdvancedSchedulingDevice(this.forms)
+      //   .then(res => {
+      const res = this.testValue
+      // if (res.rus.message) {
+      //   this.$message({
+      //     showClose: true,
+      //     type: 'error',
+      //     message: res.rus.message
+      //   })
+      // }
+      this.submit_flag = false
+      const list = []
+      this.time_all = res
+      const cont = res.Cont
+      this.real_num = 0
+      for (const i in this.time_all.rows[0].children) {
+        const obj = {
+          id: '',
+          name: '',
+          AdvaDevicRhythm: '',
+          status: true,
+          colorPair: {
+            dark: 'rgb(83, 186, 241,0.8)',
+            light: 'rgb(83, 186, 241,0.1)',
+            light_capacity: 'rgb(209,239,237,0.8)',
+            h_schedule: ' rgb(100,255,192,0.8)',
+            scheduleing: 'rgb(20,182,231,0.8)'
+          },
+          gtArray: []
+        }
+        obj.id = this.time_all.rows[0].children[i].AdvaDevicNumber
+        obj.name = this.time_all.rows[0].children[i].AdvaDevicName
+        obj.AdvaDevicRhythm = this.time_all.rows[0].children[
+          i
+        ].AdvaDevicRhythm
+        list.push(obj)
+      }
+      console.log(list, 1)
+      for (const i in this.time_all.rows) {
+        for (const j in this.time_all.rows[i].children) {
+          if (this.time_all.rows[i].children[j].OneStartDate != '') {
+            this.time_all.rows[i].children[
+              j
+            ].OneStartDate = this.time_all.rows[i].children[
+              j
+            ].OneStartDate.split('~')
+            this.time_all.rows[i].children[j].OneStartDate[0] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].OneStartDate[0]
+            this.time_all.rows[i].children[j].OneStartDate[1] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].OneStartDate[1]
+          }
+          if (this.time_all.rows[i].children[j].TwoStartDate != '') {
+            this.time_all.rows[i].children[
+              j
+            ].TwoStartDate = this.time_all.rows[i].children[
+              j
+            ].TwoStartDate.split('~')
+            this.time_all.rows[i].children[j].TwoStartDate[0] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].TwoStartDate[0]
+            this.time_all.rows[i].children[j].TwoStartDate[1] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].TwoStartDate[1]
+          }
+          if (this.time_all.rows[i].children[j].ThreeStartDate != '') {
+            this.time_all.rows[i].children[
+              j
+            ].ThreeStartDate = this.time_all.rows[i].children[
+              j
+            ].ThreeStartDate.split('~')
+            this.time_all.rows[i].children[j].ThreeStartDate[0] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].ThreeStartDate[0]
+            this.time_all.rows[i].children[j].ThreeStartDate[1] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].ThreeStartDate[1]
+          }
+          if (this.time_all.rows[i].children[j].FourStartDate != '') {
+            this.time_all.rows[i].children[
+              j
+            ].FourStartDate = this.time_all.rows[i].children[
+              j
+            ].FourStartDate.split('~')
+            this.time_all.rows[i].children[j].FourStartDate[0] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].FourStartDate[0]
+            this.time_all.rows[i].children[j].FourStartDate[1] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].FourStartDate[1]
+          }
+          if (this.time_all.rows[i].children[j].FiveStartDate != '') {
+            this.time_all.rows[i].children[
+              j
+            ].FiveStartDate = this.time_all.rows[i].children[
+              j
+            ].FiveStartDate.split('~')
+            this.time_all.rows[i].children[j].FiveStartDate[0] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].FiveStartDate[0]
+            this.time_all.rows[i].children[j].FiveStartDate[1] =
+              this.time_all.rows[i].YearDate +
+              ' ' +
+              this.time_all.rows[i].children[j].FiveStartDate[1]
+          }
+        }
+      }
+      // 缁勫悎鏂扮殑缁撴瀯
+      const newList = []
+      for (const i in this.time_all.rows) {
+        for (const j in this.time_all.rows[i].children) {
+          if (this.time_all.rows[i].children[j].OneStartDate != '') {
+            const data1 = {
+              id: '',
+              start: '',
+              end: '',
+              mod: ''
+            }
+            data1.id = this.time_all.rows[i].children[j].AdvaDevicNumber
+            data1.start = this.time_all.rows[i].children[j].OneStartDate[0]
+            data1.end = this.time_all.rows[i].children[j].OneStartDate[1]
+            data1.mod =
+              (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /
+              100
+            newList.push(data1)
+          }
+          if (this.time_all.rows[i].children[j].TwoStartDate != '') {
+            const data2 = {
+              id: '',
+              start: '',
+              end: '',
+              mod: ''
+            }
+            data2.id = this.time_all.rows[i].children[j].AdvaDevicNumber
+            data2.start = this.time_all.rows[i].children[j].TwoStartDate[0]
+            data2.end = this.time_all.rows[i].children[j].TwoStartDate[1]
+            data2.mod =
+              (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /
+              100
+            newList.push(data2)
+          }
+          if (this.time_all.rows[i].children[j].ThreeStartDate != '') {
+            const data3 = {
+              id: '',
+              start: '',
+              end: '',
+              mod: ''
+            }
+            data3.id = this.time_all.rows[i].children[j].AdvaDevicNumber
+            data3.start = this.time_all.rows[i].children[
+              j
+            ].ThreeStartDate[0]
+            data3.end = this.time_all.rows[i].children[j].ThreeStartDate[1]
+            data3.mod =
+              (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /
+              100
+            newList.push(data3)
+          }
+          if (this.time_all.rows[i].children[j].FourStartDate != '') {
+            const data4 = {
+              id: '',
+              start: '',
+              end: '',
+              mod: ''
+            }
+            data4.id = this.time_all.rows[i].children[j].AdvaDevicNumber
+            data4.start = this.time_all.rows[i].children[
+              j
+            ].FourStartDate[0]
+            data4.end = this.time_all.rows[i].children[j].FourStartDate[1]
+            data4.mod =
+              (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /
+              100
+            newList.push(data4)
+          }
+          if (this.time_all.rows[i].children[j].FiveStartDate != '') {
+            const data5 = {
+              id: '',
+              start: '',
+              end: '',
+              mod: ''
+            }
+            data5.id = this.time_all.rows[i].children[j].AdvaDevicNumber
+            data5.start = this.time_all.rows[i].children[
+              j
+            ].FiveStartDate[0]
+            data5.end = this.time_all.rows[i].children[j].FiveStartDate[1]
+            data5.mod =
+              (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /
+              100
+            newList.push(data5)
+          }
+        }
+      }
+      for (const i in list) {
+        this.pushTiem(newList, list[i].id, list[i].gtArray)
+      }
+      this.bm_data = list
+      const _this = this
+      if (cont != '') {
+        for (const i in cont) {
+          for (const j in this.bm_data) {
+            if (this.bm_data[j].id == cont[i].EQP_CODE) {
+              const data = {
+                id: cont[i].EQP_CODE,
+                number: cont[i].ALLOC_QTY,
+                cl_name: cont[i].PART_NAME,
+                cl_code: this.cl_code,
+                work_order: cont[i].WO_CODE,
+                STATUS: _this.AdvaScheUom,
+                start: cont[i].TIME_START,
+                end: cont[i].TIME_END,
+                type: cont[i].STATUS == 'S' ? 'h_schedule' : 'bm_schedule'
+              }
+
+              this.bm_data[j].flag = 'isCont'
+
+              this.bm_data[j].gtArray.unshift(data)
+            }
+          }
+        }
+      }
+
+      if (this.false_arr != '') {
+        for (const j in this.bm_data) {
+          if (this.false_arr.indexOf(this.bm_data[j].id) >= 0) {
+            this.bm_data[j].gtArray = []
+            this.bm_data[j].status = false
+          }
+        }
+      }
+      // })
+    },
+    // 璁惧浼樺厛
+    facility_top() {
+      // automaticScheduling
+      //   .OnclickAdvancedSchedulingDevice(this.forms)
+      //   .then(res => {
+      const res = this.testValue
+      this.show = true
+      const data = res.rows
+      const cont = res.Cont
+      this.title_list = []
+      for (const i in data[0].children) {
+        const obj = {
+          id: '',
+          name: '',
+          status: true,
+          AdvaDevicRhythm: '',
+          // mod:'',
+          colorPair: {
+            dark: 'rgb(83, 186, 241,0.8)',
+            light: 'rgb(83, 186, 241,0.1)',
+            light_capacity: 'rgb(209,239,237,0.8)',
+            h_schedule: ' rgb(100,255,192,0.8)',
+            scheduleing: 'rgb(20,182,231,0.8)'
+          },
+          gtArray: []
+        }
+        obj.id = data[0].children[i].AdvaDevicNumber
+        obj.name = data[0].children[i].AdvaDevicName
+        obj.AdvaDevicRhythm = data[0].children[i].AdvaDevicRhythm
+        // obj.mod =data[0].children[i].AdvaDevicCropMob *1
+
+        this.title_list.push(obj)
+      }
+      for (const i in data) {
+        for (const j in data[i].children) {
+          if (data[i].children[j].OneStartDate != '') {
+            data[i].children[j].OneStartDate = data[i].children[
+              j
+            ].OneStartDate.split('~')
+            data[i].children[j].OneStartDate[0] =
+              data[i].YearDate + ' ' + data[i].children[j].OneStartDate[0]
+            data[i].children[j].OneStartDate[1] =
+              data[i].YearDate + ' ' + data[i].children[j].OneStartDate[1]
+          }
+          if (data[i].children[j].TwoStartDate != '') {
+            data[i].children[j].TwoStartDate = data[i].children[
+              j
+            ].TwoStartDate.split('~')
+            data[i].children[j].TwoStartDate[0] =
+              data[i].YearDate + ' ' + data[i].children[j].TwoStartDate[0]
+            data[i].children[j].TwoStartDate[1] =
+              data[i].YearDate + ' ' + data[i].children[j].TwoStartDate[1]
+          }
+          if (data[i].children[j].ThreeStartDate != '') {
+            data[i].children[j].ThreeStartDate = data[i].children[
+              j
+            ].ThreeStartDate.split('~')
+            data[i].children[j].ThreeStartDate[0] =
+              data[i].YearDate +
+              ' ' +
+              data[i].children[j].ThreeStartDate[0]
+            data[i].children[j].ThreeStartDate[1] =
+              data[i].YearDate +
+              ' ' +
+              data[i].children[j].ThreeStartDate[1]
+          }
+          if (data[i].children[j].FourStartDate != '') {
+            data[i].children[j].FourStartDate = data[i].children[
+              j
+            ].FourStartDate.split('~')
+            data[i].children[j].FourStartDate[0] =
+              data[i].YearDate + ' ' + data[i].children[j].FourStartDate[0]
+            data[i].children[j].FourStartDate[1] =
+              data[i].YearDate + ' ' + data[i].children[j].FourStartDate[1]
+          }
+          if (data[i].children[j].FiveStartDate != '') {
+            data[i].children[j].FiveStartDate = data[i].children[
+              j
+            ].FiveStartDate.split('~')
+            data[i].children[j].FiveStartDate[0] =
+              data[i].YearDate + ' ' + data[i].children[j].FiveStartDate[0]
+            data[i].children[j].FiveStartDate[1] =
+              data[i].YearDate + ' ' + data[i].children[j].FiveStartDate[1]
+          }
+        }
+      }
+      // 鏇存敼鏍煎紡
+      this.facility_data = []
+
+      for (const i in data) {
+        const time = {
+          date: data[i].YearDate,
+          AdvaDevicRhythm: '',
+          gtArray: []
+        }
+        if (data[i].children != '') {
+          time.AdvaDevicRhythm = data[i].children[0].AdvaDevicRhythm
+        }
+        for (const j in data[i].children) {
+          if (data[i].children[j].OneStartDate != '') {
+            const icu1 = {
+              name: data[i].children[j].AdvaDevicName,
+              id: data[i].children[j].AdvaDevicNumber,
+              type: 'capacity',
+              rhythm: data[i].children[j].AdvaDevicRhythm,
+              start: data[i].children[j].OneStartDate[0],
+              end: data[i].children[j].OneStartDate[1],
+              mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100
+            }
+            time.gtArray.push(icu1)
+          }
+          if (data[i].children[j].TwoStartDate != '') {
+            const icu2 = {
+              name: data[i].children[j].AdvaDevicName,
+              id: data[i].children[j].AdvaDevicNumber,
+              type: 'capacity',
+              rhythm: data[i].children[j].AdvaDevicRhythm,
+              start: data[i].children[j].TwoStartDate[0],
+              end: data[i].children[j].TwoStartDate[1],
+              mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100
+            }
+            time.gtArray.push(icu2)
+          }
+          if (data[i].children[j].ThreeStartDate != '') {
+            const icu3 = {
+              name: data[i].children[j].AdvaDevicName,
+              id: data[i].children[j].AdvaDevicNumber,
+              type: 'capacity',
+              rhythm: data[i].children[j].AdvaDevicRhythm,
+              start: data[i].children[j].ThreeStartDate[0],
+              end: data[i].children[j].ThreeStartDate[1],
+              mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100
+            }
+            time.gtArray.push(icu3)
+          }
+          if (data[i].children[j].FourStartDate != '') {
+            const icu4 = {
+              name: data[i].children[j].AdvaDevicName,
+              id: data[i].children[j].AdvaDevicNumber,
+              type: 'capacity',
+              rhythm: data[i].children[j].AdvaDevicRhythm,
+              start: data[i].children[j].FourStartDate[0],
+              end: data[i].children[j].FourStartDate[1],
+              mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100
+            }
+            time.gtArray.push(icu4)
+          }
+          if (data[i].children[j].FiveStartDate != '') {
+            const icu5 = {
+              name: data[i].children[j].AdvaDevicName,
+              id: data[i].children[j].AdvaDevicNumber,
+              type: 'capacity',
+              rhythm: data[i].children[j].AdvaDevicRhythm,
+              start: data[i].children[j].FiveStartDate[0],
+              end: data[i].children[j].FiveStartDate[1],
+              mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100
+            }
+            time.gtArray.push(icu5)
+          }
+        }
+
+        this.facility_data.push(time)
+      }
+
+      if (cont != '') {
+        for (const i in cont) {
+          const date_time = cont[i].TIME_START.split(' ')
+          const cont_date = date_time[0]
+          for (const j in this.facility_data) {
+            const data = {
+              id: cont[i].EQP_CODE,
+              date: cont_date,
+              number: cont[i].ALLOC_QTY,
+              cl_name: cont[i].PART_NAME,
+              cl_code: this.cl_code,
+              work_order: cont[i].WO_CODE,
+              start: cont[i].TIME_START,
+              end: cont[i].TIME_END,
+              type: 'h_schedule'
+            }
+            if (this.facility_data[j].date == data.date) {
+              this.facility_data[j].gtArray.unshift(data)
+            }
+          }
+        }
+      }
+      //   })
+    },
+    updateTimeLines() {
+
+    }
+  }
 }
 </script>
 
diff --git a/src/views/sbgl/djjl.vue b/src/views/sbgl/djjl.vue
index f2c89a1..31f4a51 100644
--- a/src/views/sbgl/djjl.vue
+++ b/src/views/sbgl/djjl.vue
@@ -1,11 +1,1853 @@
-<template />
+<!--<template>-->
+<!--  <div id="app">-->
+<!--    <div class="app-container">-->
+<!--      <el-tabs>-->
+<!--        <el-form ref="form" :model="form" :rules="rulescx" label-width="100px" size="medium">-->
+<!--          <el-row>-->
+<!--            <el-col :span="6" :offset="1">-->
+<!--              <el-form-item prop="WorkShop" label="鐢熶骇杞﹂棿">-->
+<!--                <el-select v-model="form.WorkShop" style="width:257px" filterable>-->
+<!--                  <el-option-->
+<!--                    v-for="item in list"-->
+<!--                    :key="item.CODE"-->
+<!--                    :label="item.NAME"-->
+<!--                    :value="item.CODE"-->
+<!--                  />-->
+<!--                </el-select>-->
+<!--              </el-form-item>-->
+<!--            </el-col>-->
+<!--            <el-col :span="6" :offset="1">-->
+<!--              <el-form-item prop="PartNumber" label="浜у搧缂栫爜">-->
+<!--                <el-input v-model="form.PartNumber" placeholder="璇疯緭鍏�" style="width:257px" />-->
+<!--              </el-form-item>-->
+<!--            </el-col>-->
+<!--            <el-col :span="5" :offset="1">-->
+<!--              <el-form-item prop="PartName" label="浜у搧鍚嶇О">-->
+<!--                <el-input v-model="form.PartName" placeholder="璇疯緭鍏�" style="width:257px" />-->
+<!--              </el-form-item>-->
+<!--            </el-col>-->
 
-<script>
-export default {
-  name: 'Djjl'
-}
-</script>
+<!--            <el-col :span="3" :offset="1">-->
+<!--              <el-button type="text" class="marginLeft rg color" @click="resetFormcx()">閲嶇疆</el-button>-->
+<!--              <el-button-->
+<!--                class="filter-item marginLeft button_style rg"-->
+<!--                size="medium"-->
+<!--                icon="el-icon-search"-->
+<!--                @click="Search()"-->
+<!--              >鏌ヨ-->
+<!--              </el-button>-->
+<!--            </el-col>-->
+<!--          </el-row>-->
+<!--        </el-form>-->
+<!--      </el-tabs>-->
+<!--      <el-table-->
+<!--        class="table"-->
+<!--        :data="mn_data"-->
+<!--        :header-cell-style="{background:'#f5f5f5'}"-->
+<!--        height="280"-->
+<!--        @sort-change="sortChange"-->
+<!--      >-->
+<!--        <el-table-column width="34" fixed>-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-radio-->
+<!--              v-model="radio"-->
+<!--              :label="scope.$index"-->
+<!--              class="textRadio"-->
+<!--              @change.native="getCurrentRow(scope.row)"-->
+<!--            >&nbsp;-->
+<!--            </el-radio>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column-->
+<!--          label="搴忓彿"-->
+<!--          prop="AdvaScheSeq"-->
+<!--          width="80"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="浼樺厛绾�"-->
+<!--          prop="AdvaSchePiroQue"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        >-->
+<!--          <template slot-scope="scope">-->
+<!--            <div v-if="scope.row.AdvaSchePiroQue == '姝e父'">-->
+<!--              <span class="icon_true" />-->
+<!--              {{ scope.row.AdvaSchePiroQue }}-->
+<!--            </div>-->
+<!--            <div v-if="scope.row.AdvaSchePiroQue == '绱ф��'">-->
+<!--              <span class="icon_gz" />-->
+<!--              {{ scope.row.AdvaSchePiroQue }}-->
+<!--            </div>-->
+<!--            <div v-if="scope.row.AdvaSchePiroQue == '鐗规��'">-->
+<!--              <span class="icon_ty" />-->
+<!--              {{ scope.row.AdvaSchePiroQue }}-->
+<!--            </div>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column-->
+<!--          label="鐢熶骇杞﹂棿"-->
+<!--          prop="AdvaScheWorkShop"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="宸ュ崟缂栧彿"-->
+<!--          prop="AdvaScheWorkCode"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="浜у搧缂栫爜"-->
+<!--          prop="AdvaSchePartNumber"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="浜у搧鍚嶇О"-->
+<!--          prop="AdvaSchePartName"-->
+<!--          width="150"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="浜у搧瑙勬牸"-->
+<!--          prop="AdvaSchePartSpec"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="鏁伴噺"-->
+<!--          prop="AdvaScheQty"-->
+<!--          width="80"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        />-->
+<!--        <el-table-column-->
+<!--          label="瑕佹眰浜や粯鏃堕棿"-->
+<!--          prop="AdvaScheEndDate"-->
+<!--          width="200"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--        >-->
+<!--          <template slot-scope="scope">{{ scope.row.AdvaScheEndDate }}</template>-->
+<!--        </el-table-column>-->
+<!--        &lt;!&ndash; <el-table-column  label="缁撴潫鏃ユ湡" prop="AdvaScheEndDate">-->
+<!--        </el-table-column>&ndash;&gt;-->
+<!--        <el-table-column label="浜や粯鐘舵��" prop="AdvaScheSpeed" sortable="custom" :sort-orders="['ascending', 'descending']">-->
+<!--          <template slot-scope="scope">-->
+<!--            <div v-if="scope.row.Flag == 'Y' && scope.row.AdvaScheStus != 'NEW'">-->
+<!--              <span class="icon_true" /> 姝e父-->
+<!--            </div>-->
+<!--            <div v-if="scope.row.Flag == 'N' && scope.row.AdvaScheStus != 'NEW'">-->
+<!--              <span v-if="scope.row.Flag == 'N'" class="icon_ty" />寤舵湡-->
+<!--            </div>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column-->
+<!--          label="鎺掔▼宸ュ簭"-->
+<!--          prop="AdvaScheBotProcName"-->
+<!--          sortable="custom"-->
+<!--          :sort-orders="['ascending', 'descending']"-->
+<!--          width="160"-->
+<!--        />-->
+<!--        <el-table-column label="璁″垝鎺掔▼鏃堕棿" width="200" sortable="custom" :sort-orders="['ascending', 'descending']">-->
+<!--          <template-->
+<!--            slot-scope="scope"-->
+<!--          >{{ scope.row.AdvaSchePCStartDate }} ~ {{ scope.row.AdvaSchePCEndDate }}-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--      </el-table>-->
+<!--      &lt;!&ndash;      <pagination-view&ndash;&gt;-->
+<!--      &lt;!&ndash;        :currentPage="form.page"&ndash;&gt;-->
+<!--      &lt;!&ndash;        :total="total"&ndash;&gt;-->
+<!--      &lt;!&ndash;        @size-change="sizeChange"&ndash;&gt;-->
+<!--      &lt;!&ndash;        @current-change="pageChange"&ndash;&gt;-->
+<!--      &lt;!&ndash;      ></pagination-view>&ndash;&gt;-->
+<!--    </div>-->
 
-<style scoped>
+<!--    <el-dialog title="鏌ョ湅" :visible.sync="showDialog" width="60%">-->
+<!--      <el-table class="table" :data="look_data" :header-cell-style="{background:'#f5f5f5'}">-->
+<!--        <el-table-column label="搴忓彿" prop="AdvaTaskSeq" width="80" />-->
+<!--        <el-table-column label="宸ュ崟缂栧彿" prop="AdvaTaskWork" />-->
+<!--        <el-table-column label="宸ュ崟鐘舵��" prop="AdvaTaskStatus" />-->
+<!--        <el-table-column label="浜у搧缂栫爜" prop="AdvaTaskPartNumber" />-->
+<!--        <el-table-column label="寮�濮嬫椂闂�" prop="AdvaTaskStartDate" width="160" />-->
+<!--        <el-table-column label="缁撴潫鏃堕棿" prop="AdvaTaskEndDate" width="160" />-->
+<!--        <el-table-column label="鐢熶骇鏁伴噺" prop="AdvaTaskQty" />-->
+<!--        <el-table-column label="鐢熶骇宸ュ簭" prop="AdvaTaskBotProcName" />-->
+<!--      </el-table>-->
+<!--      <div style="overflow: hidden">-->
+<!--        &lt;!&ndash;        <pagination-view&ndash;&gt;-->
+<!--        &lt;!&ndash;          :currentPage="search_from.page"&ndash;&gt;-->
+<!--        &lt;!&ndash;          :total="look_total"&ndash;&gt;-->
+<!--        &lt;!&ndash;          @size-change="sizeChange_look"&ndash;&gt;-->
+<!--        &lt;!&ndash;          @current-change="pageChange_look"&ndash;&gt;-->
+<!--        &lt;!&ndash;        ></pagination-view>&ndash;&gt;-->
+<!--      </div>-->
+<!--    </el-dialog>-->
 
-</style>
+<!--    <el-tabs v-show="show">-->
+<!--      <el-row style="margin-bottom:20px">-->
+<!--        &lt;!&ndash; <el-col :span="2">-->
+<!--       <el-input v-model="form.Seach"  @keyup.enter.native="SeachKey" placeholder="璇疯緭鍏ュ叧閿瘝" size="small"></el-input>-->
+<!--        </el-col>&ndash;&gt;-->
+<!--        <el-col :span="7" :offset="1">-->
+<!--          <span class="t_size" style="margin-left:7px">鎺掔▼鏃ユ湡</span>-->
+<!--          <el-date-picker-->
+<!--            v-model="value1"-->
+<!--            type="daterange"-->
+<!--            range-separator="~"-->
+<!--            format="yyyy-MM-dd"-->
+<!--            value-format="yyyy-MM-dd"-->
+<!--            start-placeholder="寮�濮嬫棩鏈�"-->
+<!--            end-placeholder="缁撴潫鏃ユ湡"-->
+<!--            size="small"-->
+<!--            :picker-options="pickerOptions1"-->
+<!--            @change="change_time"-->
+<!--          />-->
+<!--        </el-col>-->
+
+<!--        <el-col :span="3">-->
+<!--          <span class="t_size">鎺掔▼鏂瑰紡</span>-->
+<!--          <el-select v-model="types" size="small" style="width:120px" @change="changeTypes">-->
+<!--            <el-option value="N" label="璁惧浼樺厛" />-->
+<!--            <el-option value="Y" label="鏃堕棿浼樺厛" />-->
+<!--          </el-select>-->
+<!--        </el-col>-->
+
+<!--        <el-col :span="3" :offset="1">-->
+<!--          <div style="height:32px;">-->
+<!--            <span class="t_size">鏃堕棿鍒诲害</span>-->
+<!--            <select id="scale" v-model.number="scale">-->
+<!--              <option v-for="i in scaleList" :key="i">{{ i }}</option>-->
+<!--            </select>-->
+<!--            <span class="t_size">鍒嗛挓</span>-->
+<!--          </div>-->
+<!--        </el-col>-->
+
+<!--        <el-col :span="3">-->
+<!--          <div style="height:32px;">-->
+<!--            <span class="t_size">鎹㈠瀷鏃堕棿</span>-->
+<!--            <el-input-->
+<!--              id="scale"-->
+<!--              v-model="times"-->
+<!--              type="number"-->
+<!--              size="mini"-->
+<!--              style="display:inline-block;width:80px;"-->
+<!--              @change="no_zero"-->
+<!--            />-->
+<!--            <span class="t_size">鍒嗛挓</span>-->
+<!--          </div>-->
+<!--        </el-col>-->
+
+<!--        <el-col :span="3">-->
+<!--          <div style="height:32px;line-height: 28px;">-->
+<!--            <span class="t_size">棰勬帓杩涘害</span>-->
+<!--            <span>-->
+<!--              <span style="text-decoration:underline;">{{ real_num }}</span> /-->
+<!--              <span style="text-decoration:underline">{{ meter }}</span>-->
+<!--            </span>-->
+<!--          </div>-->
+<!--        </el-col>-->
+
+<!--        <el-col :span="3">-->
+<!--          <el-button-->
+<!--            type="primary"-->
+<!--            size="mini"-->
+<!--            icon="el-icon-document-remove"-->
+<!--            style="margin-left:20px;"-->
+<!--            @click="click_schedule"-->
+<!--          >棰勬帓-->
+<!--          </el-button>-->
+<!--          <el-button-->
+<!--            type="primary"-->
+<!--            size="mini"-->
+<!--            icon="el-icon-document-checked"-->
+<!--            @click="click_yes"-->
+<!--          >鎻愪氦-->
+<!--          </el-button>-->
+<!--          <p />-->
+<!--        </el-col>-->
+<!--      </el-row>-->
+<!--      <el-row />-->
+<!--    </el-tabs>-->
+<!--    <div v-show="show" class="container">-->
+<!--      <v-gantt-chart-->
+<!--        :start-time="time_data[0]"-->
+<!--        :end-time="time_data[1]"-->
+<!--        :cell-width="cellWidth"-->
+<!--        :cell-height="cellHeight"-->
+<!--        :time-lines="timeLines"-->
+<!--        :title-height="titleHeight"-->
+<!--        :scale="scale"-->
+<!--        :title-width="titleWidth"-->
+<!--        show-current-time-->
+<!--        :hide-header="hideHeader"-->
+<!--        :data-key="dataKey"-->
+<!--        :array-keys="arrayKeys"-->
+<!--        :scroll-to-postion="positionA"-->
+<!--        :datas="bm_data"-->
+<!--        @scrollLeft="scrollLeftA"-->
+<!--      >-->
+<!--        &lt;!&ndash; <template v-slot:block="{data,item}"> &ndash;&gt;-->
+<!--        <template slot="block" slot-scope="{data,item}">-->
+<!--          <Test-->
+<!--            :data="data"-->
+<!--            :update-time-lines="updateTimeLines"-->
+<!--            :cell-height="cellHeight"-->
+<!--            :current-time="currentTime"-->
+<!--            :item="item"-->
+<!--          />-->
+<!--        </template>-->
+<!--        <template slot="left" slot-scope="{data}">-->
+<!--          <div class="name">-->
+<!--            <div class="carId">-->
+<!--              <el-checkbox-->
+<!--                v-model="data.status"-->
+<!--                style="margin-right:5px;"-->
+<!--                @change="click_box(data)"-->
+<!--              />-->
+<!--              {{ data.id }} {{ data.name }}-->
+<!--            </div>-->
+<!--            <div class="speed">-->
+<!--              <el-tooltip class="item" effect="dark" content="鏌ョ湅" placement="top">-->
+<!--                <el-button type="text" size="mini" @click="look(data)">-->
+<!--                  <i class="el-icon-document size i-color" />-->
+<!--                </el-button>-->
+<!--              </el-tooltip>-->
+<!--            </div>-->
+<!--          </div>-->
+<!--        </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>-->
+<!--      </v-gantt-chart>-->
+<!--    </div>-->
+<!--  </div>-->
+<!--</template>-->
+
+<!--<script>-->
+<!--import Test from '@/components/Test'-->
+<!--// import PaginationView from '@/components/PaginationView'-->
+<!--// import TestLeft from '@/components/TestLeft'-->
+<!--import { mockDatas } from './index1.js'-->
+<!--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 },-->
+<!--  data() {-->
+<!--    return {-->
+<!--      show: false,-->
+<!--      pickerOptions1: {-->
+<!--        disabledDate(time) {-->
+<!--          return time.getTime() <= Date.now() - 24 * 60 * 60 * 1000-->
+<!--        }-->
+<!--      },-->
+<!--      real_num: 0,-->
+<!--      keep_data: [],-->
+<!--      all_status: true,-->
+<!--      look_data: [],-->
+<!--      look_total: 0,-->
+<!--      cl_name: '',-->
+<!--      cl_code: '',-->
+<!--      work_order: '',-->
+<!--      false_arr: [],-->
+<!--      ckeckVal: true,-->
+<!--      AdvaScheUom: '',-->
+<!--      list: [],-->
+<!--      form: {-->
+<!--        WorkShop: '',-->
+<!--        PartNumber: '',-->
+<!--        PartName: '',-->
+<!--        rows: 10,-->
+<!--        page: 1-->
+<!--      },-->
+<!--      showDialog: false,-->
+<!--      time_data: [],-->
+<!--      forms: {-->
+<!--        WorkCode: '',-->
+<!--        WorkShop: '',-->
+<!--        PartNumber: '',-->
+<!--        BotProceCode: '',-->
+<!--        StartTime: '',-->
+<!--        EndTime: ''-->
+<!--      },-->
+<!--      click_one: 0,-->
+<!--      datasC: [],-->
+<!--      radio: '',-->
+<!--      value1: '',-->
+<!--      types: 'N',-->
+<!--      no: false,-->
+<!--      total: 0,-->
+<!--      mn_data: [],-->
+<!--      bm_data: [],-->
+<!--      facility_data: [],-->
+<!--      end_start: '',-->
+<!--      timeLines: [-->
+<!--        {-->
+<!--          time: dayjs()-->
+<!--            .add(2, 'hour')-->
+<!--            .toString()-->
+<!--        },-->
+<!--        {-->
+<!--          time: dayjs()-->
+<!--            .add(5, 'hour')-->
+<!--            .toString(),-->
+<!--          color: '#747e80'-->
+<!--        }-->
+<!--      ],-->
+<!--      formUpdata: {-->
+<!--        WorkCode: '',-->
+<!--        BotProceCode: '',-->
+<!--        json: []-->
+<!--      },-->
+<!--      currentTime: dayjs(),-->
+<!--      startTime: dayjs()-->
+<!--        .subtract(5, 'hour')-->
+<!--        .toString(),-->
+<!--      endTime: dayjs()-->
+<!--        .add(2, 'day')-->
+<!--        .add(2, 'hour')-->
+<!--        .toString(),-->
+<!--      cellWidth: 50,-->
+<!--      cellHeight: 30,-->
+<!--      titleHeight: 40,-->
+<!--      titleWidth: 250,-->
+<!--      scale: 60,-->
+<!--      datasNum: 100,-->
+<!--      datasA: [],-->
+<!--      datasB: mockDatas(100),-->
+<!--      dataKey: 'id',-->
+<!--      times: 0,-->
+<!--      timeList: timeList,-->
+<!--      scaleList: scaleList,-->
+<!--      scrollToTime: dayjs()-->
+<!--        .add(1, 'day')-->
+<!--        .toString(),-->
+<!--      scrollToPostion: { x: 10000, y: 10000 },-->
+<!--      hideHeader: false,-->
+<!--      arrayKeys: ['gtArray', 'error'],-->
+<!--      scrollToY: 0,-->
+<!--      positionB: {},-->
+<!--      positionA: {},-->
+<!--      meter: 0, // 鑺傛媿-->
+<!--      title_list: [],-->
+<!--      imp_id: '',-->
+<!--      submit_flag: false,-->
+<!--      search_from: {-->
+<!--        page: 1,-->
+<!--        rows: 10,-->
+<!--        WorkTime: '',-->
+<!--        BotProceName: ''-->
+<!--      }-->
+<!--    }-->
+<!--  },-->
+
+<!--  watch: {-->
+<!--    datasNum(newV) {-->
+<!--      this.datasA = mockDatas(newV)-->
+<!--      this.datasB = mockDatas(newV)-->
+<!--    },-->
+<!--    scrollToY(val) {-->
+<!--      this.positionA = { x: val }-->
+<!--    }-->
+<!--  },-->
+<!--  created: function() {-->
+<!--    this.AdvancedSchedulingSearch()-->
+<!--    this.AdvancedSchedulingWorkShop()-->
+<!--  },-->
+
+<!--  methods: {-->
+<!--    AdvancedSchedulingWorkShop() {-->
+<!--      automaticScheduling.AdvancedSchedulingWorkShop().then(res => {-->
+<!--        this.list = res-->
+<!--      })-->
+<!--    },-->
+<!--    Search() {-->
+<!--      this.form.page = 1-->
+<!--      this.show = false-->
+<!--      this.radio = ''-->
+<!--      this.AdvancedSchedulingSearch()-->
+<!--    },-->
+<!--    resetFormcx() {-->
+<!--      this.$nextTick(() => {-->
+<!--        this.$refs.form.resetFields()-->
+<!--      })-->
+<!--    },-->
+<!--    no_zero() {-->
+<!--      if (this.times < 0) {-->
+<!--        this.times = 0-->
+<!--      }-->
+<!--    },-->
+<!--    sortChange(column, prop, order) {-->
+<!--      this.radio = '';-->
+<!--      (this.form.prop = column.prop), (this.form.order = column.order)-->
+<!--      this.show = false-->
+<!--      this.AdvancedSchedulingSearch()-->
+<!--    },-->
+<!--    SeachKey() {-->
+<!--      this.form.page = 1-->
+<!--      this.AdvancedSchedulingSearch()-->
+<!--      this.show = false-->
+<!--      this.radio = ''-->
+<!--    },-->
+<!--    changeLift() {-->
+<!--      if (this.all_status) {-->
+<!--        this.false_arr = []-->
+<!--        this.OnclickAdvancedSchedulingDevice()-->
+<!--      } else {-->
+<!--        for (const i in this.bm_data) {-->
+<!--          this.bm_data[i].status = false-->
+<!--          this.bm_data[i].gtArray = []-->
+<!--        }-->
+<!--        for (const i in this.facility_data) {-->
+<!--          this.facility_data[i].gtArray = []-->
+<!--        }-->
+<!--      }-->
+<!--    },-->
+<!--    changeTypes() {-->
+<!--      this.OnclickAdvancedSchedulingDevice()-->
+<!--    },-->
+<!--    change_time() {-->
+<!--      this.time_data[0] = this.value1[0] + ' 00:00'-->
+<!--      this.time_data[1] = this.value1[1] + ' 23:59'-->
+<!--      this.forms.StartTime = this.value1[0]-->
+<!--      this.forms.EndTime = this.value1[1]-->
+<!--      this.OnclickAdvancedSchedulingDevice()-->
+<!--    },-->
+<!--    click_box(val) {-->
+<!--      if (!val.status) {-->
+<!--        for (const i in this.facility_data) {-->
+<!--          const new_arr = []-->
+<!--          for (const j in this.facility_data[i].gtArray) {-->
+<!--            if (this.facility_data[i].gtArray[j].id == val.id) {-->
+<!--            } else {-->
+<!--              new_arr.push(this.facility_data[i].gtArray[j])-->
+<!--            }-->
+<!--          }-->
+<!--          this.facility_data[i].gtArray = new_arr-->
+<!--        }-->
+<!--      } else {-->
+<!--        this.false_arr = []-->
+<!--        for (const i in this.bm_data) {-->
+<!--          if (!this.bm_data[i].status) {-->
+<!--            this.false_arr.push(this.bm_data[i].id)-->
+<!--          }-->
+<!--        }-->
+<!--        this.OnclickAdvancedSchedulingDevice()-->
+<!--      }-->
+
+<!--      if (!val.status) {-->
+<!--        for (const i in this.bm_data) {-->
+<!--          if (!this.bm_data[i].status) {-->
+<!--            this.bm_data[i].gtArray = []-->
+<!--          }-->
+<!--        }-->
+<!--      } else {-->
+<!--        this.false_arr = []-->
+<!--        for (const i in this.bm_data) {-->
+<!--          if (!this.bm_data[i].status) {-->
+<!--            this.false_arr.push(this.bm_data[i].id)-->
+<!--          }-->
+<!--        }-->
+<!--        this.OnclickAdvancedSchedulingDevice()-->
+<!--      }-->
+<!--      for (const i in this.bm_data) {-->
+<!--        const arr = []-->
+<!--        for (const j in this.bm_data[i].gtArray) {-->
+<!--          if (this.bm_data[i].gtArray[j].type != 'schedule') {-->
+<!--            arr.push(this.bm_data[i].gtArray[j])-->
+<!--          }-->
+<!--        }-->
+<!--        this.bm_data[i].gtArray = arr-->
+<!--      }-->
+<!--      this.real_num = 0-->
+<!--    },-->
+<!--    look(data) {-->
+<!--      this.showDialog = true-->
+<!--      this.search_from.DeviceCode = data.id-->
+<!--      this.AdvancedSchedulingEquipmenTask()-->
+<!--    },-->
+<!--    AdvancedSchedulingEquipmenTask() {-->
+<!--      automaticScheduling-->
+<!--        .AdvancedSchedulingEquipmenTask(this.search_from)-->
+<!--        .then(res => {-->
+<!--          this.look_data = res.rows-->
+<!--          this.look_total = res.total-->
+<!--        })-->
+<!--    },-->
+<!--    sizeChange_look(val) {-->
+<!--      this.search_from.rows = val-->
+<!--      this.AdvancedSchedulingEquipmenTask()-->
+<!--    },-->
+<!--    pageChange_look(val) {-->
+<!--      this.search_from.page = val-->
+<!--      this.AdvancedSchedulingEquipmenTask()-->
+<!--    },-->
+<!--    sizeChange(val) {-->
+<!--      this.form.rows = val-->
+<!--      this.show = false-->
+<!--      this.radio = ''-->
+<!--      this.AdvancedSchedulingSearch()-->
+<!--    },-->
+<!--    pageChange(val) {-->
+<!--      this.form.page = val-->
+<!--      this.show = false-->
+<!--      this.radio = ''-->
+<!--      this.AdvancedSchedulingSearch()-->
+<!--    },-->
+<!--    // 鏌ヨ-->
+<!--    AdvancedSchedulingSearch() {-->
+<!--      automaticScheduling.AdvancedSchedulingSearch(this.form).then(res => {-->
+<!--        this.mn_data = res.rows-->
+<!--        this.total = res.total-->
+<!--        this.oneClick()-->
+<!--      })-->
+<!--    },-->
+<!--    // 鐐瑰嚮甯﹀嚭鏁版嵁-->
+<!--    OnclickAdvancedSchedulingDevice() {-->
+<!--      this.facility_top()-->
+
+<!--      automaticScheduling-->
+<!--        .OnclickAdvancedSchedulingDevice(this.forms)-->
+<!--        .then(res => {-->
+<!--          if (res.rus.message) {-->
+<!--            this.$message({-->
+<!--              showClose: true,-->
+<!--              type: 'error',-->
+<!--              message: res.rus.message-->
+<!--            })-->
+<!--          }-->
+<!--          this.submit_flag = false-->
+<!--          const list = []-->
+<!--          this.time_all = res-->
+<!--          const cont = res.Cont-->
+<!--          this.real_num = 0-->
+<!--          for (const i in this.time_all.rows[0].children) {-->
+<!--            const obj = {-->
+<!--              id: '',-->
+<!--              name: '',-->
+<!--              AdvaDevicRhythm: '',-->
+<!--              status: true,-->
+<!--              colorPair: {-->
+<!--                dark: 'rgb(83, 186, 241,0.8)',-->
+<!--                light: 'rgb(83, 186, 241,0.1)',-->
+<!--                light_capacity: 'rgb(209,239,237,0.8)',-->
+<!--                h_schedule: ' rgb(100,255,192,0.8)',-->
+<!--                scheduleing: 'rgb(20,182,231,0.8)'-->
+<!--              },-->
+<!--              gtArray: []-->
+<!--            }-->
+<!--            obj.id = this.time_all.rows[0].children[i].AdvaDevicNumber-->
+<!--            obj.name = this.time_all.rows[0].children[i].AdvaDevicName-->
+<!--            obj.AdvaDevicRhythm = this.time_all.rows[0].children[-->
+<!--              i-->
+<!--            ].AdvaDevicRhythm-->
+<!--            list.push(obj)-->
+<!--          }-->
+
+<!--          for (const i in this.time_all.rows) {-->
+<!--            for (const j in this.time_all.rows[i].children) {-->
+<!--              if (this.time_all.rows[i].children[j].OneStartDate != '') {-->
+<!--                this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].OneStartDate = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].OneStartDate.split('~')-->
+<!--                this.time_all.rows[i].children[j].OneStartDate[0] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].OneStartDate[0]-->
+<!--                this.time_all.rows[i].children[j].OneStartDate[1] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].OneStartDate[1]-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].TwoStartDate != '') {-->
+<!--                this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].TwoStartDate = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].TwoStartDate.split('~')-->
+<!--                this.time_all.rows[i].children[j].TwoStartDate[0] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].TwoStartDate[0]-->
+<!--                this.time_all.rows[i].children[j].TwoStartDate[1] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].TwoStartDate[1]-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].ThreeStartDate != '') {-->
+<!--                this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].ThreeStartDate = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].ThreeStartDate.split('~')-->
+<!--                this.time_all.rows[i].children[j].ThreeStartDate[0] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].ThreeStartDate[0]-->
+<!--                this.time_all.rows[i].children[j].ThreeStartDate[1] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].ThreeStartDate[1]-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].FourStartDate != '') {-->
+<!--                this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].FourStartDate = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].FourStartDate.split('~')-->
+<!--                this.time_all.rows[i].children[j].FourStartDate[0] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].FourStartDate[0]-->
+<!--                this.time_all.rows[i].children[j].FourStartDate[1] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].FourStartDate[1]-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].FiveStartDate != '') {-->
+<!--                this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].FiveStartDate = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].FiveStartDate.split('~')-->
+<!--                this.time_all.rows[i].children[j].FiveStartDate[0] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].FiveStartDate[0]-->
+<!--                this.time_all.rows[i].children[j].FiveStartDate[1] =-->
+<!--                  this.time_all.rows[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  this.time_all.rows[i].children[j].FiveStartDate[1]-->
+<!--              }-->
+<!--            }-->
+<!--          }-->
+<!--          // 缁勫悎鏂扮殑缁撴瀯-->
+<!--          const newList = []-->
+<!--          for (const i in this.time_all.rows) {-->
+<!--            for (const j in this.time_all.rows[i].children) {-->
+<!--              if (this.time_all.rows[i].children[j].OneStartDate != '') {-->
+<!--                const data1 = {-->
+<!--                  id: '',-->
+<!--                  start: '',-->
+<!--                  end: '',-->
+<!--                  mod: ''-->
+<!--                }-->
+<!--                data1.id = this.time_all.rows[i].children[j].AdvaDevicNumber-->
+<!--                data1.start = this.time_all.rows[i].children[j].OneStartDate[0]-->
+<!--                data1.end = this.time_all.rows[i].children[j].OneStartDate[1]-->
+<!--                data1.mod =-->
+<!--                  (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /-->
+<!--                  100-->
+<!--                newList.push(data1)-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].TwoStartDate != '') {-->
+<!--                const data2 = {-->
+<!--                  id: '',-->
+<!--                  start: '',-->
+<!--                  end: '',-->
+<!--                  mod: ''-->
+<!--                }-->
+<!--                data2.id = this.time_all.rows[i].children[j].AdvaDevicNumber-->
+<!--                data2.start = this.time_all.rows[i].children[j].TwoStartDate[0]-->
+<!--                data2.end = this.time_all.rows[i].children[j].TwoStartDate[1]-->
+<!--                data2.mod =-->
+<!--                  (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /-->
+<!--                  100-->
+<!--                newList.push(data2)-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].ThreeStartDate != '') {-->
+<!--                const data3 = {-->
+<!--                  id: '',-->
+<!--                  start: '',-->
+<!--                  end: '',-->
+<!--                  mod: ''-->
+<!--                }-->
+<!--                data3.id = this.time_all.rows[i].children[j].AdvaDevicNumber-->
+<!--                data3.start = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].ThreeStartDate[0]-->
+<!--                data3.end = this.time_all.rows[i].children[j].ThreeStartDate[1]-->
+<!--                data3.mod =-->
+<!--                  (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /-->
+<!--                  100-->
+<!--                newList.push(data3)-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].FourStartDate != '') {-->
+<!--                const data4 = {-->
+<!--                  id: '',-->
+<!--                  start: '',-->
+<!--                  end: '',-->
+<!--                  mod: ''-->
+<!--                }-->
+<!--                data4.id = this.time_all.rows[i].children[j].AdvaDevicNumber-->
+<!--                data4.start = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].FourStartDate[0]-->
+<!--                data4.end = this.time_all.rows[i].children[j].FourStartDate[1]-->
+<!--                data4.mod =-->
+<!--                  (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /-->
+<!--                  100-->
+<!--                newList.push(data4)-->
+<!--              }-->
+<!--              if (this.time_all.rows[i].children[j].FiveStartDate != '') {-->
+<!--                const data5 = {-->
+<!--                  id: '',-->
+<!--                  start: '',-->
+<!--                  end: '',-->
+<!--                  mod: ''-->
+<!--                }-->
+<!--                data5.id = this.time_all.rows[i].children[j].AdvaDevicNumber-->
+<!--                data5.start = this.time_all.rows[i].children[-->
+<!--                  j-->
+<!--                ].FiveStartDate[0]-->
+<!--                data5.end = this.time_all.rows[i].children[j].FiveStartDate[1]-->
+<!--                data5.mod =-->
+<!--                  (this.time_all.rows[i].children[j].AdvaDevicCropMob * 1) /-->
+<!--                  100-->
+<!--                newList.push(data5)-->
+<!--              }-->
+<!--            }-->
+<!--          }-->
+<!--          for (const i in list) {-->
+<!--            this.pushTiem(newList, list[i].id, list[i].gtArray)-->
+<!--          }-->
+<!--          this.bm_data = list-->
+<!--          const _this = this-->
+<!--          if (cont != '') {-->
+<!--            for (const i in cont) {-->
+<!--              for (const j in this.bm_data) {-->
+<!--                if (this.bm_data[j].id == cont[i].EQP_CODE) {-->
+<!--                  const data = {-->
+<!--                    id: cont[i].EQP_CODE,-->
+<!--                    number: cont[i].ALLOC_QTY,-->
+<!--                    cl_name: cont[i].PART_NAME,-->
+<!--                    cl_code: this.cl_code,-->
+<!--                    work_order: cont[i].WO_CODE,-->
+<!--                    STATUS: _this.AdvaScheUom,-->
+<!--                    start: cont[i].TIME_START,-->
+<!--                    end: cont[i].TIME_END,-->
+<!--                    type: cont[i].STATUS == 'S' ? 'h_schedule' : 'bm_schedule'-->
+<!--                  }-->
+
+<!--                  this.bm_data[j].flag = 'isCont'-->
+
+<!--                  this.bm_data[j].gtArray.unshift(data)-->
+<!--                }-->
+<!--              }-->
+<!--            }-->
+<!--          }-->
+
+<!--          if (this.false_arr != '') {-->
+<!--            for (const j in this.bm_data) {-->
+<!--              if (this.false_arr.indexOf(this.bm_data[j].id) >= 0) {-->
+<!--                this.bm_data[j].gtArray = []-->
+<!--                this.bm_data[j].status = false-->
+<!--              }-->
+<!--            }-->
+<!--          }-->
+<!--        })-->
+<!--    },-->
+<!--    // 鎹㈠瀷鏃堕棿-->
+<!--    MinutesTest(time) {-->
+<!--      var sdate1 = new Date(time)-->
+<!--      sdate1.setMinutes(sdate1.getMinutes() + this.times * 1)-->
+<!--      var now =-->
+<!--        sdate1.getFullYear() +-->
+<!--        '-' +-->
+<!--        this.add_one(sdate1.getMonth()) +-->
+<!--        '-' +-->
+<!--        sdate1.getDate() +-->
+<!--        ' ' +-->
+<!--        sdate1.getHours() +-->
+<!--        ':' +-->
+<!--        sdate1.getMinutes() +-->
+<!--        ':' +-->
+<!--        sdate1.getSeconds()-->
+<!--      return now-->
+<!--    },-->
+<!--    // +1-->
+<!--    add_one(date) {-->
+<!--      return parseInt(date) + 1-->
+<!--    },-->
+<!--    // 鎻掑叆浜ц兘鏃堕棿娈�-->
+<!--    pushTiem(newList, id, arr) {-->
+<!--      for (const i in newList) {-->
+<!--        if (newList[i].id == id) {-->
+<!--          const data = {-->
+<!--            start: newList[i].start,-->
+<!--            end: newList[i].end,-->
+<!--            id: newList[i].id,-->
+<!--            mod: newList[i].mod,-->
+<!--            type: 'capacity'-->
+<!--          }-->
+<!--          arr.push(data)-->
+<!--        }-->
+<!--      }-->
+<!--    },-->
+<!--    getNowFormatDate() {-->
+<!--      var date = new Date()-->
+<!--      var seperator1 = '-'-->
+<!--      var year = date.getFullYear()-->
+<!--      var month = date.getMonth() + 1-->
+<!--      // var strDate = date.getDate()+1;-->
+<!--      var strDate = date.getDate()-->
+<!--      if (month >= 1 && month <= 9) {-->
+<!--        month = '0' + month-->
+<!--      }-->
+<!--      if (strDate >= 0 && strDate <= 9) {-->
+<!--        strDate = '0' + strDate-->
+<!--      }-->
+<!--      var currentdate = year + seperator1 + month + seperator1 + strDate-->
+<!--      return currentdate-->
+<!--    },-->
+<!--    getCurrentRow(row) {-->
+<!--      // this.show =true-->
+<!--      this.meter = row.AdvaScheQty * 1 - row.AdvaScheYPQty * 1 // 鍙互鍋氫釜鏁�-->
+<!--      this.value1 = []-->
+<!--      this.cl_name = row.AdvaSchePartName-->
+<!--      this.cl_code = row.AdvaSchePartNumber-->
+<!--      this.AdvaScheUom = row.AdvaScheUom-->
+<!--      this.work_order = row.AdvaScheWorkCode-->
+<!--      this.value1.push(this.getNowFormatDate())-->
+<!--      this.value1.push(row.AdvaScheEndDate)-->
+<!--      if (this.value1 != '') {-->
+<!--        this.time_data[0] = this.value1[0] + ' 00:00'-->
+<!--        this.time_data[1] = this.value1[1] + ' 23:59'-->
+<!--      }-->
+<!--      this.forms.WorkCode = row.AdvaScheWorkCode-->
+<!--      this.forms.WorkShop = row.AdvaScheWorkShopid-->
+<!--      this.forms.PartNumber = row.AdvaSchePartNumber-->
+<!--      this.forms.BotProceCode = row.AdvaScheBotProcid-->
+<!--      this.forms.StartTime = this.getNowFormatDate()-->
+<!--      this.forms.EndTime = row.AdvaScheEndDate-->
+<!--      this.OnclickAdvancedSchedulingDevice()-->
+<!--      this.formUpdata.WorkCode = row.AdvaScheWorkCode-->
+<!--      this.formUpdata.BotProceCode = row.AdvaScheBotProcid-->
+<!--      this.search_from.WorkTime =-->
+<!--        this.getNowFormatDate() + '~' + row.AdvaScheEndDate-->
+<!--      this.search_from.BotProceName = row.AdvaScheBotProcName-->
+<!--    },-->
+<!--    // 鎻愪氦鎺掔▼-->
+<!--    click_yes() {-->
+<!--      if (this.submit_flag) {-->
+<!--        this.$message({-->
+<!--          showClose: true,-->
+<!--          type: 'error',-->
+<!--          message: '鏁伴噺鏈帓瀹�,璇疯缃骇鑳芥椂闂�'-->
+<!--        })-->
+<!--      } else {-->
+<!--        const list = [] // 鎻愪氦鏁扮粍-->
+<!--        for (const i in this.bm_data) {-->
+<!--          const arr = []-->
+<!--          for (const j in this.bm_data[i].gtArray) {-->
+<!--            if (this.bm_data[i].gtArray[j].type == 'schedule') {-->
+<!--              arr.push(this.bm_data[i].gtArray[j])-->
+<!--            }-->
+<!--          }-->
+<!--          if (arr != '') {-->
+<!--            for (const i in arr) {-->
+<!--              const data = {-->
+<!--                AlreDevicNumber: '',-->
+<!--                AlreStartDate: '',-->
+<!--                AlreEndDate: '',-->
+<!--                AlreQty: ''-->
+<!--              }-->
+<!--              data.AlreDevicNumber = arr[i].id-->
+<!--              data.AlreStartDate = arr[i].start-->
+<!--              data.AlreEndDate = arr[i].end-->
+<!--              data.AlreQty = arr[i].number-->
+<!--              list.push(data)-->
+<!--            }-->
+<!--          }-->
+<!--        }-->
+<!--        // 鎺掔▼鐩稿悓璁惧鑾峰彇寮�濮嬫椂闂� 缁撴潫鏃堕棿 鏁伴噺鐨勬�诲拰-->
+<!--        // 杩囨护-->
+<!--        let updata = []-->
+<!--        for (const i in list) {-->
+<!--          if (list[i].AlreStartDate != '') {-->
+<!--            updata.push(list[i])-->
+<!--          }-->
+<!--        }-->
+
+<!--        updata = JSON.stringify(updata)-->
+<!--        this.formUpdata.json = updata-->
+<!--        if (list == '') {-->
+<!--          this.$message({-->
+<!--            showClose: true,-->
+<!--            message: '璇峰厛棰勬帓',-->
+<!--            type: 'error'-->
+<!--          })-->
+<!--          return false-->
+<!--        }-->
+<!--        automaticScheduling-->
+<!--          .SubmitAlreadyScheduling(this.formUpdata)-->
+<!--          .then(res => {-->
+<!--            if (res.statusCode == 300) {-->
+<!--              this.$message({-->
+<!--                showClose: true,-->
+<!--                message: res.message,-->
+<!--                type: 'error'-->
+<!--              })-->
+<!--            } else {-->
+<!--              this.$message({-->
+<!--                showClose: true,-->
+<!--                message: res.message,-->
+<!--                type: 'success'-->
+<!--              })-->
+<!--            }-->
+<!--            this.meter = 0-->
+<!--            this.real_num = 0-->
+<!--            this.OnclickAdvancedSchedulingDevice()-->
+<!--            this.AdvancedSchedulingSearch()-->
+<!--          })-->
+<!--      }-->
+<!--    },-->
+
+<!--    // 鏃堕棿/璁惧浼樺厛鎺掔▼-->
+<!--    click_schedule() {-->
+<!--      const timestamp = new Date().toLocaleDateString()-->
+<!--      if (new Date(this.value1[0]) < new Date(timestamp)) {-->
+<!--        this.$message({-->
+<!--          showClose: true,-->
+<!--          type: 'error',-->
+<!--          message: '鎺掔▼鏃堕棿涓嶅彲浠ュ皬浜庡綋鍓嶆椂闂�'-->
+<!--        })-->
+<!--        return false-->
+<!--      }-->
+
+<!--      this.nitialize()-->
+<!--      // 璁惧浼樺厛-->
+<!--      if (this.bm_data != '' && this.types == 'N') {-->
+<!--        this.fun_time()-->
+<!--        this.change_num(this.bm_data)-->
+<!--      } else if (this.facility_data != '' && this.types == 'Y') {-->
+<!--        this.time_nitalize()-->
+<!--        this.fun_facility()-->
+<!--        this.dataTransition()-->
+<!--        this.change_num(this.bm_data)-->
+<!--      }-->
+<!--    },-->
+<!--    // 鎵嬪姩杩囨护鎵�鏈夋椂闂村凡鎺掔▼-->
+<!--    time_nitalize() {-->
+<!--      for (const i in this.facility_data) {-->
+<!--        this.facility_data[i].gtArray = this.facility_data[i].gtArray.filter(item => item.type != 'schedule')-->
+<!--      }-->
+<!--    },-->
+
+<!--    // 鎵嬪姩杩囨护鎵�鏈夎澶囧凡鎺掔▼-->
+<!--    nitialize() {-->
+<!--      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') {-->
+<!--            newArr.push(this.bm_data[i].gtArray[j])-->
+<!--          }-->
+<!--        }-->
+<!--        this.bm_data[i].gtArray = newArr-->
+<!--      }-->
+<!--    },-->
+
+<!--    // 缁欐帓绋嬫渶鍚庝竴涓慨鏀规暟閲�-->
+<!--    change_num(arr) {-->
+<!--      this.real_num = 0 // 鐪熷疄宸叉帓鏁伴噺-->
+<!--      let num = 0 // 鍙栨暣宸叉帓鏁伴噺-->
+<!--      const arr_num = [] // 宸叉帓鏁版嵁-->
+<!--      let mend_num = 0-->
+<!--      const len = 0-->
+<!--      for (const i in arr) {-->
+<!--        for (const j in arr[i].gtArray) {-->
+<!--          if (arr[i].gtArray[j].type == 'schedule') {-->
+<!--            arr_num.unshift(arr[i].gtArray[j])-->
+<!--          }-->
+<!--        }-->
+<!--      }-->
+
+<!--      for (const n in arr_num) {-->
+<!--        this.real_num += arr_num[n].real_number-->
+<!--        num += arr_num[n].number * 1-->
+<!--      }-->
+
+<!--      this.real_num = Math.ceil(this.real_num)-->
+<!--      const y10 = this.meter - this.real_num-->
+<!--      if (y10 <= 10) {-->
+<!--        this.real_num = this.meter-->
+<!--        mend_num = this.meter - num-->
+<!--      } else {-->
+<!--      }-->
+<!--      if (this.real_num * 1 == this.meter * 1) {-->
+<!--        // mend_num =  this.meter - num-->
+<!--      } else {-->
+<!--        this.submit_flag = true-->
+<!--      }-->
+<!--      for (const i in this.bm_data) {-->
+<!--        for (const j in this.bm_data[i].gtArray) {-->
+<!--          if (-->
+<!--            this.bm_data[i].gtArray[j].type == 'schedule' &&-->
+<!--            this.bm_data[i].gtArray[j].end_num-->
+<!--          ) {-->
+<!--            this.bm_data[i].gtArray[j].number =-->
+<!--              this.bm_data[i].gtArray[j].number * 1 + mend_num-->
+<!--          }-->
+<!--        }-->
+<!--      }-->
+<!--    },-->
+<!--    fun_time() {-->
+<!--      let all_num = this.meter-->
+<!--      const all_time = []-->
+<!--      let flag1 = 0-->
+<!--      const mod = this.bm_data[0].mod-->
+<!--      //  let nowTime = this.bm_data[0].AdvaDevicRhythm*all_num-->
+<!--      for (const i in this.bm_data) {-->
+<!--        let end_arr = [] // 宸叉帓绋嬬殑鏁扮粍-->
+<!--        let nend_arr = [] // 寰呮帓绋嬬殑鏁扮粍-->
+<!--        const add_arr = [] // 宸叉帓绋嬬殑鏁扮粍-->
+<!--        let capacity_arr = [] // 瑕佹帓绋嬬殑鏁扮粍-->
+<!--        this.bm_data[i].gtArray.sort((a, b) => new Date(a.end).getTime() - new Date(b.end).getTime())-->
+<!--        // let capacity_end = ''-->
+<!--        end_arr = this.bm_data[i].gtArray.filter(item => item.type == 'h_schedule')-->
+<!--        nend_arr = this.bm_data[i].gtArray.filter(item => item.type == 'capacity')-->
+<!--        if (end_arr && end_arr.length > 0) {-->
+<!--          capacity_arr = nend_arr.map(item => {-->
+<!--            // 鎺掗櫎鎺夊凡缁忔帓绋嬬殑瀛樺湪hshedule锛宻tart锛宔nd閮界浉绛夌殑鎯呭喌-->
+<!--            const schedule = end_arr.filter(schedule => {-->
+<!--              return new Date(item.start).getTime() <= new Date(schedule.start).getTime() &&-->
+<!--                new Date(item.end).getTime() > new Date(schedule.end).getTime()-->
+<!--            })-->
+<!--            if (schedule && schedule.length > 0) {-->
+<!--              item.start = this.MinutesTest(schedule[0]['end'])-->
+<!--            }-->
+
+<!--            const schedule1 = end_arr.filter(schedule => {-->
+<!--              return new Date(item.start).getTime() == new Date(schedule.start).getTime() &&-->
+<!--                new Date(item.end).getTime() == new Date(schedule.end).getTime()-->
+<!--            })-->
+<!--            if (schedule1 && schedule1.length > 0) {-->
+<!--              item.capacity = false-->
+<!--            }-->
+
+<!--            return item-->
+<!--          }).filter(item => item.capacity != false)-->
+<!--        } else {-->
+<!--          capacity_arr = nend_arr-->
+<!--        }-->
+
+<!--        const id_obj = {-->
+<!--          id: '',-->
+<!--          start_time: ''-->
+<!--        }-->
+<!--        if (end_arr != '') {-->
+<!--          (id_obj.id = end_arr[0].id), (id_obj.start_time = end_arr[0].end)-->
+<!--        }-->
+<!--        for (const w in capacity_arr) {-->
+<!--          let end_time = ''-->
+<!--          let mistiming = ''-->
+<!--          const data = {-->
+<!--            id: capacity_arr[w].id,-->
+<!--            start: '',-->
+<!--            end: '',-->
+<!--            type: 'schedule',-->
+<!--            cl_name: this.cl_name,-->
+<!--            cl_code: this.cl_code,-->
+<!--            work_order: this.work_order,-->
+<!--            number: 0,-->
+<!--            real_number: 0-->
+<!--          }-->
+<!--          if (-->
+<!--            id_obj.start_time != '' &&-->
+<!--            flag1 == 0 &&-->
+<!--            new Date(id_obj.start_time) >= new Date(capacity_arr[w].start)-->
+<!--          ) {-->
+<!--            data.start = this.MinutesTest(id_obj.start_time)-->
+<!--            flag1 = 1-->
+<!--          } else {-->
+<!--            data.start = capacity_arr[w].start-->
+<!--          }-->
+<!--          let nowTime =-->
+<!--            (this.bm_data[i].AdvaDevicRhythm * all_num) / capacity_arr[w].mod-->
+<!--          end_time = this.formSeconds(nowTime, data.start, capacity_arr[w].mod) // 鎬诲叡鐨勭粨鏉熸椂闂�-->
+<!--          data.end = end_time-->
+<!--          mistiming = this.formTime(-->
+<!--            end_time,-->
+<!--            capacity_arr[w].end,-->
+<!--            capacity_arr[w].mod-->
+<!--          ) // 鎬诲叡鐨勭粨鏉熸椂闂�-褰撳墠鐨勭粨鏉熸椂闂� = 鍓╀笅澶氫箙鏃堕棿-->
+<!--          if (mistiming >= 0) {-->
+<!--            console.log(-->
+<!--              new Date(data.end) - new Date(data.start),-->
+<!--              capacity_arr[w].mod,-->
+<!--              this.bm_data[i].AdvaDevicRhythm,-->
+<!--              '闃挎柉椤垮彂鏂拏鑺�'-->
+<!--            )-->
+<!--            data.number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              this.bm_data[i].AdvaDevicRhythm /-->
+<!--              1000-->
+<!--            data.real_number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              this.bm_data[i].AdvaDevicRhythm /-->
+<!--              1000-->
+<!--            data.number = data.number.toFixed(0)-->
+<!--            data.end_num = true-->
+<!--            if (new Date(data.start) >= new Date(data.end)) {-->
+<!--            } else {-->
+<!--              this.bm_data[i].gtArray.push(data)-->
+<!--            }-->
+
+<!--            return false-->
+<!--          } else {-->
+<!--            data.end = capacity_arr[w].end-->
+<!--            data.number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              this.bm_data[i].AdvaDevicRhythm /-->
+<!--              1000-->
+<!--            data.real_number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              this.bm_data[i].AdvaDevicRhythm /-->
+<!--              1000-->
+<!--            data.number = data.number.toFixed(0)-->
+
+<!--            nowTime =-->
+<!--              (all_num - data.real_number) * this.bm_data[i].AdvaDevicRhythm-->
+<!--            all_num = all_num - data.real_number-->
+<!--            if (new Date(data.start) >= new Date(data.end)) {-->
+<!--            } else {-->
+<!--              this.bm_data[i].gtArray.push(data)-->
+<!--            }-->
+<!--          }-->
+<!--        }-->
+<!--      }-->
+<!--    },-->
+<!--    // 璁惧鎺掔▼鏂规硶-->
+<!--    fun_facility() {-->
+<!--      // 鎺掗櫎鏈嬀閫夐」-->
+<!--      for (const i in this.facility_data) {-->
+<!--        const newArr = []-->
+<!--        for (const j in this.facility_data[i].gtArray) {-->
+<!--          if (this.false_arr.indexOf(this.facility_data[i].gtArray[j].id) < 0) {-->
+<!--            newArr.push(this.facility_data[i].gtArray[j])-->
+<!--          }-->
+<!--        }-->
+<!--        this.facility_data[i].gtArray = newArr-->
+<!--      }-->
+<!--      let all_num = this.meter-->
+<!--      const all_time = []-->
+<!--      const flag1 = 0-->
+<!--      // let nowTime = this.facility_data[0].AdvaDevicRhythm*all_num  //鏁伴噺OK-->
+
+<!--      for (const i in this.facility_data) {-->
+<!--        let end_arr = []-->
+<!--        let nend_arr = [] // 鎺掔▼鐨勬暟缁�-->
+<!--        const add_arr = [] // 宸叉帓绋嬬殑鏁扮粍-->
+<!--        let capacity_arr = [] // 瑕佹帓绋嬬殑鏁扮粍-->
+
+<!--        // this.facility_data[i].gtArray.sort((a,b) => new Date(a.end).getTime() - new Date(b.end).getTime())-->
+<!--        // let capacity_end = ''-->
+<!--        end_arr = this.facility_data[i].gtArray.filter(item => item.type == 'h_schedule')-->
+<!--        nend_arr = this.facility_data[i].gtArray.filter(item => item.type == 'capacity')-->
+<!--        console.log(nend_arr)-->
+<!--        capacity_arr = JSON.parse(JSON.stringify(nend_arr))-->
+<!--        end_arr.forEach(item => {-->
+<!--          for (let i = 0; i < capacity_arr.length; i++) {-->
+<!--            if (new Date(capacity_arr[i].start).getTime() === new Date(item.start).getTime()) {-->
+<!--              console.log(i, capacity_arr[i], '鍝囧搱鍝�')-->
+<!--              capacity_arr.splice(i, 1)-->
+<!--              break-->
+<!--            }-->
+<!--          }-->
+<!--        })-->
+<!--        console.log(capacity_arr, '澶цタ鐡�')-->
+
+<!--        if (!capacity_arr || capacity_arr.length == 0) break-->
+<!--        // const firstCapacity = capacity_arr[0]-->
+
+<!--        const schedule_arr = end_arr.filter(item => {-->
+<!--          const remain = nend_arr.some(sitem => {-->
+<!--            return new Date(sitem.start).getTime() === new Date(item.start).getTime() &&-->
+<!--              new Date(item.end).getTime() < new Date(sitem.end).getTime()-->
+<!--          })-->
+<!--          return remain-->
+<!--        })-->
+<!--        console.log(schedule_arr)-->
+<!--        if (schedule_arr && schedule_arr.length > 0) {-->
+<!--          const scheduleCan = schedule_arr.map(item => {-->
+<!--            const capcity = nend_arr.filter(sitem => {-->
+<!--              return new Date(sitem.start).getTime() === new Date(item.start).getTime() &&-->
+<!--                new Date(item.end).getTime() < new Date(sitem.end).getTime()-->
+<!--            })[0]-->
+<!--            console.log('capacity', capcity)-->
+<!--            capcity.start = this.MinutesTest(item.end)-->
+<!--            return capcity-->
+<!--          })-->
+<!--          const newSchedule = JSON.parse(JSON.stringify(scheduleCan))-->
+<!--          capacity_arr = newSchedule.concat(capacity_arr)-->
+<!--        }-->
+<!--        console.log(schedule_arr)-->
+<!--        console.log('鍙帓绋嬫暟缁�', capacity_arr)-->
+<!--        const id_obj = {}-->
+<!--        if (end_arr != '') {-->
+<!--          (id_obj.id = end_arr[0].id), (id_obj.start_time = end_arr[0].end)-->
+<!--        }-->
+
+<!--        for (const w in capacity_arr) {-->
+<!--          let end_time-->
+<!--          let mistiming-->
+<!--          const data = {-->
+<!--            id: capacity_arr[w].id,-->
+<!--            start: '',-->
+<!--            end: '',-->
+<!--            type: 'schedule',-->
+<!--            cl_name: this.cl_name,-->
+<!--            cl_code: this.cl_code,-->
+<!--            work_order: this.work_order,-->
+<!--            number: 0,-->
+<!--            real_number: 0-->
+<!--          }-->
+<!--          //  console.log(id_obj.start_time)-->
+<!--          if (-->
+<!--            id_obj &&-->
+<!--            new Date(id_obj.start_time).getTime() >=-->
+<!--            new Date(capacity_arr[w].start).getTime()-->
+<!--          ) {-->
+<!--            if (data.id == id_obj.id) {-->
+<!--              data.start = this.MinutesTest(id_obj.start_time)-->
+<!--              //  flag1 =1-->
+<!--            } else {-->
+<!--              data.start = capacity_arr[w].start-->
+<!--              //  console.log(data.start)-->
+<!--              //  flag1 =1-->
+<!--            }-->
+<!--          } else {-->
+<!--            data.start = capacity_arr[w].start-->
+<!--          }-->
+<!--          // let nowTime = this.facility_data[0].AdvaDevicRhythm*all_num-->
+<!--          let nowTime =-->
+<!--            (capacity_arr[w].rhythm * all_num) / capacity_arr[w].mod-->
+
+<!--          end_time = this.formSeconds(nowTime, data.start)-->
+
+<!--          data.end = end_time-->
+<!--          mistiming = this.formTime(end_time, capacity_arr[w].end)-->
+<!--          if (mistiming >= 0) {-->
+<!--            data.number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              capacity_arr[w].rhythm /-->
+<!--              1000-->
+<!--            data.real_number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              capacity_arr[w].rhythm /-->
+<!--              1000-->
+<!--            data.number = data.number.toFixed(0)-->
+<!--            data.end_num = true-->
+
+<!--            if (new Date(data.start) >= new Date(data.end)) {-->
+<!--            } else {-->
+<!--              this.facility_data[i].gtArray.push(data)-->
+<!--            }-->
+
+<!--            return false-->
+<!--          } else {-->
+<!--            data.end = capacity_arr[w].end-->
+<!--            data.number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              capacity_arr[w].rhythm /-->
+<!--              1000-->
+<!--            data.real_number =-->
+<!--              ((new Date(data.end) - new Date(data.start)) *-->
+<!--                capacity_arr[w].mod) /-->
+<!--              capacity_arr[w].rhythm /-->
+<!--              1000-->
+<!--            data.number = data.number.toFixed(0)-->
+<!--            nowTime = (all_num - data.real_number) * capacity_arr[w].rhythm-->
+<!--            all_num = all_num - data.real_number-->
+
+<!--            //  nowTime = mistiming * -1-->
+<!--            if (new Date(data.start) >= new Date(data.end)) {-->
+<!--            } else {-->
+<!--              this.facility_data[i].gtArray.push(data)-->
+<!--            }-->
+<!--          }-->
+<!--        }-->
+<!--      }-->
+<!--    },-->
+<!--    // 缁欒澶囪浆鎹㈡牸寮�-->
+<!--    dataTransition() {-->
+<!--      this.bm_data = []-->
+<!--      const data = this.facility_data-->
+
+<!--      const all = []-->
+<!--      const list = this.title_list-->
+<!--      for (const i in data) {-->
+<!--        for (const j in data[i].gtArray) {-->
+<!--          all.push(data[i].gtArray[j])-->
+<!--        }-->
+<!--      }-->
+
+<!--      for (const i in list) {-->
+<!--        list[i].gtArray = []-->
+<!--        this.pushTiemsss(all, list[i].id, list[i].gtArray)-->
+<!--      }-->
+
+<!--      for (const n in list) {-->
+<!--        if (list[n].gtArray.length == 0) {-->
+<!--          list[n].status = false-->
+<!--        }-->
+<!--      }-->
+
+<!--      // console.log(list)-->
+<!--      this.bm_data = list-->
+<!--    },-->
+<!--    // 鎻掑叆浜ц兘鏃堕棿娈�-->
+<!--    pushTiemsss(newList, id, arr) {-->
+<!--      for (const i in newList) {-->
+<!--        if (newList[i].id == id) {-->
+<!--          arr.push(newList[i])-->
+<!--        }-->
+<!--      }-->
+<!--    },-->
+<!--    // 璁惧浼樺厛-->
+<!--    facility_top() {-->
+<!--      automaticScheduling-->
+<!--        .OnclickAdvancedSchedulingDevice(this.forms)-->
+<!--        .then(res => {-->
+<!--          this.show = true-->
+<!--          const data = res.rows-->
+<!--          const cont = res.Cont-->
+<!--          this.title_list = []-->
+<!--          for (const i in data[0].children) {-->
+<!--            const obj = {-->
+<!--              id: '',-->
+<!--              name: '',-->
+<!--              status: true,-->
+<!--              AdvaDevicRhythm: '',-->
+<!--              // mod:'',-->
+<!--              colorPair: {-->
+<!--                dark: 'rgb(83, 186, 241,0.8)',-->
+<!--                light: 'rgb(83, 186, 241,0.1)',-->
+<!--                light_capacity: 'rgb(209,239,237,0.8)',-->
+<!--                h_schedule: ' rgb(100,255,192,0.8)',-->
+<!--                scheduleing: 'rgb(20,182,231,0.8)'-->
+<!--              },-->
+<!--              gtArray: []-->
+<!--            }-->
+<!--            obj.id = data[0].children[i].AdvaDevicNumber-->
+<!--            obj.name = data[0].children[i].AdvaDevicName-->
+<!--            obj.AdvaDevicRhythm = data[0].children[i].AdvaDevicRhythm-->
+<!--            // obj.mod =data[0].children[i].AdvaDevicCropMob *1-->
+
+<!--            this.title_list.push(obj)-->
+<!--          }-->
+<!--          for (const i in data) {-->
+<!--            for (const j in data[i].children) {-->
+<!--              if (data[i].children[j].OneStartDate != '') {-->
+<!--                data[i].children[j].OneStartDate = data[i].children[-->
+<!--                  j-->
+<!--                ].OneStartDate.split('~')-->
+<!--                data[i].children[j].OneStartDate[0] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].OneStartDate[0]-->
+<!--                data[i].children[j].OneStartDate[1] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].OneStartDate[1]-->
+<!--              }-->
+<!--              if (data[i].children[j].TwoStartDate != '') {-->
+<!--                data[i].children[j].TwoStartDate = data[i].children[-->
+<!--                  j-->
+<!--                ].TwoStartDate.split('~')-->
+<!--                data[i].children[j].TwoStartDate[0] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].TwoStartDate[0]-->
+<!--                data[i].children[j].TwoStartDate[1] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].TwoStartDate[1]-->
+<!--              }-->
+<!--              if (data[i].children[j].ThreeStartDate != '') {-->
+<!--                data[i].children[j].ThreeStartDate = data[i].children[-->
+<!--                  j-->
+<!--                ].ThreeStartDate.split('~')-->
+<!--                data[i].children[j].ThreeStartDate[0] =-->
+<!--                  data[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  data[i].children[j].ThreeStartDate[0]-->
+<!--                data[i].children[j].ThreeStartDate[1] =-->
+<!--                  data[i].YearDate +-->
+<!--                  ' ' +-->
+<!--                  data[i].children[j].ThreeStartDate[1]-->
+<!--              }-->
+<!--              if (data[i].children[j].FourStartDate != '') {-->
+<!--                data[i].children[j].FourStartDate = data[i].children[-->
+<!--                  j-->
+<!--                ].FourStartDate.split('~')-->
+<!--                data[i].children[j].FourStartDate[0] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].FourStartDate[0]-->
+<!--                data[i].children[j].FourStartDate[1] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].FourStartDate[1]-->
+<!--              }-->
+<!--              if (data[i].children[j].FiveStartDate != '') {-->
+<!--                data[i].children[j].FiveStartDate = data[i].children[-->
+<!--                  j-->
+<!--                ].FiveStartDate.split('~')-->
+<!--                data[i].children[j].FiveStartDate[0] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].FiveStartDate[0]-->
+<!--                data[i].children[j].FiveStartDate[1] =-->
+<!--                  data[i].YearDate + ' ' + data[i].children[j].FiveStartDate[1]-->
+<!--              }-->
+<!--            }-->
+<!--          }-->
+<!--          // 鏇存敼鏍煎紡-->
+<!--          this.facility_data = []-->
+
+<!--          for (const i in data) {-->
+<!--            const time = {-->
+<!--              date: data[i].YearDate,-->
+<!--              AdvaDevicRhythm: '',-->
+<!--              gtArray: []-->
+<!--            }-->
+<!--            if (data[i].children != '') {-->
+<!--              time.AdvaDevicRhythm = data[i].children[0].AdvaDevicRhythm-->
+<!--            }-->
+<!--            for (const j in data[i].children) {-->
+<!--              if (data[i].children[j].OneStartDate != '') {-->
+<!--                const icu1 = {-->
+<!--                  name: data[i].children[j].AdvaDevicName,-->
+<!--                  id: data[i].children[j].AdvaDevicNumber,-->
+<!--                  type: 'capacity',-->
+<!--                  rhythm: data[i].children[j].AdvaDevicRhythm,-->
+<!--                  start: data[i].children[j].OneStartDate[0],-->
+<!--                  end: data[i].children[j].OneStartDate[1],-->
+<!--                  mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100-->
+<!--                }-->
+<!--                time.gtArray.push(icu1)-->
+<!--              }-->
+<!--              if (data[i].children[j].TwoStartDate != '') {-->
+<!--                const icu2 = {-->
+<!--                  name: data[i].children[j].AdvaDevicName,-->
+<!--                  id: data[i].children[j].AdvaDevicNumber,-->
+<!--                  type: 'capacity',-->
+<!--                  rhythm: data[i].children[j].AdvaDevicRhythm,-->
+<!--                  start: data[i].children[j].TwoStartDate[0],-->
+<!--                  end: data[i].children[j].TwoStartDate[1],-->
+<!--                  mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100-->
+<!--                }-->
+<!--                time.gtArray.push(icu2)-->
+<!--              }-->
+<!--              if (data[i].children[j].ThreeStartDate != '') {-->
+<!--                const icu3 = {-->
+<!--                  name: data[i].children[j].AdvaDevicName,-->
+<!--                  id: data[i].children[j].AdvaDevicNumber,-->
+<!--                  type: 'capacity',-->
+<!--                  rhythm: data[i].children[j].AdvaDevicRhythm,-->
+<!--                  start: data[i].children[j].ThreeStartDate[0],-->
+<!--                  end: data[i].children[j].ThreeStartDate[1],-->
+<!--                  mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100-->
+<!--                }-->
+<!--                time.gtArray.push(icu3)-->
+<!--              }-->
+<!--              if (data[i].children[j].FourStartDate != '') {-->
+<!--                const icu4 = {-->
+<!--                  name: data[i].children[j].AdvaDevicName,-->
+<!--                  id: data[i].children[j].AdvaDevicNumber,-->
+<!--                  type: 'capacity',-->
+<!--                  rhythm: data[i].children[j].AdvaDevicRhythm,-->
+<!--                  start: data[i].children[j].FourStartDate[0],-->
+<!--                  end: data[i].children[j].FourStartDate[1],-->
+<!--                  mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100-->
+<!--                }-->
+<!--                time.gtArray.push(icu4)-->
+<!--              }-->
+<!--              if (data[i].children[j].FiveStartDate != '') {-->
+<!--                const icu5 = {-->
+<!--                  name: data[i].children[j].AdvaDevicName,-->
+<!--                  id: data[i].children[j].AdvaDevicNumber,-->
+<!--                  type: 'capacity',-->
+<!--                  rhythm: data[i].children[j].AdvaDevicRhythm,-->
+<!--                  start: data[i].children[j].FiveStartDate[0],-->
+<!--                  end: data[i].children[j].FiveStartDate[1],-->
+<!--                  mod: (data[i].children[j].AdvaDevicCropMob * 1) / 100-->
+<!--                }-->
+<!--                time.gtArray.push(icu5)-->
+<!--              }-->
+<!--            }-->
+
+<!--            this.facility_data.push(time)-->
+<!--          }-->
+
+<!--          if (cont != '') {-->
+<!--            for (const i in cont) {-->
+<!--              const date_time = cont[i].TIME_START.split(' ')-->
+<!--              const cont_date = date_time[0]-->
+<!--              for (const j in this.facility_data) {-->
+<!--                const data = {-->
+<!--                  id: cont[i].EQP_CODE,-->
+<!--                  date: cont_date,-->
+<!--                  number: cont[i].ALLOC_QTY,-->
+<!--                  cl_name: cont[i].PART_NAME,-->
+<!--                  cl_code: this.cl_code,-->
+<!--                  work_order: cont[i].WO_CODE,-->
+<!--                  start: cont[i].TIME_START,-->
+<!--                  end: cont[i].TIME_END,-->
+<!--                  type: 'h_schedule'-->
+<!--                }-->
+<!--                if (this.facility_data[j].date == data.date) {-->
+<!--                  this.facility_data[j].gtArray.unshift(data)-->
+<!--                }-->
+<!--              }-->
+<!--            }-->
+<!--          }-->
+<!--        })-->
+<!--    },-->
+<!--    // 鎺掔▼鏂规硶-->
+<!--    formSeconds(s1, start, mod) {-->
+<!--      const nowData = new Date(start)-->
+<!--      // 绠楀嚭褰撳墠鎺掔▼鐨勭粨鏉熸椂闂�-->
+<!--      return this.transitionTime(-->
+<!--        new Date(nowData.setSeconds(nowData.getSeconds() + s1))-->
+<!--      )-->
+<!--    },-->
+<!--    // 杞寲鏍囧噯鏃堕棿-->
+<!--    transitionTime(time) {-->
+<!--      const d = new Date(time)-->
+<!--      return (-->
+<!--        d.getFullYear() +-->
+<!--        '-' +-->
+<!--        (d.getMonth() + 1) +-->
+<!--        '-' +-->
+<!--        d.getDate() +-->
+<!--        ' ' +-->
+<!--        d.getHours() +-->
+<!--        ':' +-->
+<!--        d.getMinutes() +-->
+<!--        ':' +-->
+<!--        d.getSeconds()-->
+<!--      )-->
+<!--    },-->
+<!--    // 鏃堕棿姣旇緝-->
+<!--    formTime(d1, d2, mod) {-->
+<!--      // d1 鎺掗櫎缁撴潫鏃堕棿  d2 褰撳墠浜ц兘缁撴潫鏃堕棿-->
+<!--      const time1 = new Date(d1)-->
+<!--      const time2 = new Date(d2)-->
+<!--      return parseInt(time2 - time1) / 1000-->
+<!--    },-->
+<!--    formatSeconds(value) {-->
+<!--      var secondTime = parseInt(value) // 绉�-->
+<!--      var minuteTime = 0 // 鍒�-->
+<!--      var hourTime = 0 // 灏忔椂-->
+<!--      if (secondTime > 60) {-->
+<!--        // 濡傛灉绉掓暟澶т簬60锛屽皢绉掓暟杞崲鎴愭暣鏁�-->
+<!--        // 鑾峰彇鍒嗛挓锛岄櫎浠�60鍙栨暣鏁帮紝寰楀埌鏁存暟鍒嗛挓-->
+<!--        minuteTime = parseInt(secondTime / 60)-->
+<!--        // 鑾峰彇绉掓暟锛岀鏁板彇浣橈紝寰楀埌鏁存暟绉掓暟-->
+<!--        secondTime = parseInt(secondTime % 60)-->
+<!--        // 濡傛灉鍒嗛挓澶т簬60锛屽皢鍒嗛挓杞崲鎴愬皬鏃�-->
+<!--        if (minuteTime > 60) {-->
+<!--          // 鑾峰彇灏忔椂锛岃幏鍙栧垎閽熼櫎浠�60锛屽緱鍒版暣鏁板皬鏃�-->
+<!--          hourTime = parseInt(minuteTime / 60)-->
+<!--          // 鑾峰彇灏忔椂鍚庡彇浣樼殑鍒嗭紝鑾峰彇鍒嗛挓闄や互60鍙栦綐鐨勫垎-->
+<!--          minuteTime = parseInt(minuteTime % 60)-->
+<!--        }-->
+<!--      }-->
+<!--      var result = '' + parseInt(secondTime) + ''-->
+
+<!--      if (minuteTime > 0) {-->
+<!--        result = '' + parseInt(minuteTime) + ':' + result-->
+<!--      }-->
+<!--      if (hourTime > 0) {-->
+<!--        result = '' + parseInt(hourTime) + ':' + result-->
+<!--      }-->
+<!--      return result-->
+<!--    },-->
+<!--    updateTimeLines(timeA, timeB) {-->
+<!--      this.timeLines = [-->
+<!--        {-->
+<!--          time: timeA-->
+<!--        },-->
+<!--        {-->
+<!--          time: timeB,-->
+<!--          color: '#747e80'-->
+<!--        }-->
+<!--      ]-->
+<!--    },-->
+<!--    scrollLeftA(val) {-->
+<!--      this.positionB = { x: val }-->
+<!--    },-->
+<!--    scrollLeftB(val) {-->
+<!--      this.positionA = { x: val }-->
+<!--    },-->
+<!--    // 璁剧疆鍒濆鍖栨暟鎹�-->
+<!--    oneClick() {-->
+<!--      // this.getCurrentRow(this.mn_data[0])-->
+<!--    }-->
+<!--  }-->
+<!--}-->
+<!--</script>-->
+
+<!--<style scoped>-->
+<!--body {-->
+<!--  font: 12px;-->
+<!--  margin: 0;-->
+<!--  padding: 0;-->
+<!--  width: 100%;-->
+<!--  height: 100%;-->
+<!--}-->
+
+<!--.box_style {-->
+<!--  position: relative;-->
+<!--  top: 40px;-->
+<!--  left: -75px;-->
+<!--}-->
+
+<!--.box_styles {-->
+<!--  position: relative;-->
+<!--  top: 40px;-->
+<!--  left: 0;-->
+<!--}-->
+
+<!--#app {-->
+<!--  display: flex;-->
+<!--  flex-direction: column;-->
+<!--  padding: 0 10px;-->
+<!--  /* height: calc(100vh - 100px); */-->
+<!--}-->
+
+<!--label {-->
+<!--  margin-left: 10px;-->
+<!--}-->
+
+<!--input {-->
+<!--  width: 40px;-->
+<!--  height: 20px;-->
+<!--  vertical-align: middle;-->
+<!--}-->
+
+<!--input[type="range"] {-->
+<!--  width: 100px;-->
+<!--}-->
+
+<!--.top-bar {-->
+<!--  /* height: 30px; */-->
+<!--  margin-bottom: 20px;-->
+<!--}-->
+
+<!--.container {-->
+<!--  display: flex;-->
+<!--  flex-direction: column;-->
+<!--  flex: 1;-->
+<!--}-->
+
+<!--.main-footer {-->
+<!--  /* height: 30px; */-->
+<!--}-->
+
+<!--.ib {-->
+<!--  display: inline-block;-->
+<!--}-->
+
+<!--.w250 {-->
+<!--  width: 250px;-->
+<!--}-->
+
+<!--.el-slider {-->
+<!--  width: 100px;-->
+<!--}-->
+
+<!--.tc {-->
+<!--  text-align: center;-->
+<!--}-->
+
+<!--.name {-->
+<!--  display: flex;-->
+<!--  box-sizing: border-box;-->
+<!--  overflow: hidden;-->
+<!--  height: 100%;-->
+<!--  width: 100%;-->
+<!--  padding: 0 5px 0 0;-->
+<!--  border-radius: 8px 0 0 8px;-->
+<!--  align-items: center;-->
+<!--}-->
+
+<!--.colorBar {-->
+<!--  width: 10px;-->
+<!--  height: 100%;-->
+<!--}-->
+
+<!--.carId {-->
+<!--  flex: 1;-->
+<!--}-->
+
+<!--.tc {-->
+<!--  color: #909399;-->
+<!--  font-size: 14px;-->
+<!--}-->
+
+<!--.type {-->
+<!--  padding: 0 5px 0 0;-->
+<!--  font-size: 1.2rem;-->
+<!--}-->
+
+<!--.t_size {-->
+<!--  font-size: 14px;-->
+<!--}-->
+
+<!--.icon_true {-->
+<!--  height: 8px;-->
+<!--  display: inline-block;-->
+<!--  width: 8px;-->
+<!--  background: #00a79d;-->
+<!--  margin-right: 7px;-->
+<!--  border-radius: 15px;-->
+<!--}-->
+
+<!--.icon_ty {-->
+<!--  height: 8px;-->
+<!--  display: inline-block;-->
+<!--  width: 8px;-->
+<!--  background: red;-->
+<!--  margin-right: 7px;-->
+<!--  border-radius: 15px;-->
+<!--}-->
+
+<!--.icon_gz {-->
+<!--  height: 8px;-->
+<!--  display: inline-block;-->
+<!--  width: 8px;-->
+<!--  background: yellow;-->
+<!--  margin-right: 7px;-->
+<!--  border-radius: 15px;-->
+<!--}-->
+
+<!--/* .el-col-offset-1 {-->
+<!--    margin-left: 0.5% !important;-->
+<!--} */-->
+<!--.marginLeft {-->
+<!--  margin-left: 15px;-->
+<!--}-->
+
+<!--.button_style {-->
+<!--  background: #00a79d;-->
+<!--  color: #ffff;-->
+<!--  border-color: #00a79d;-->
+<!--}-->
+
+<!--.rg {-->
+<!--  float: right;-->
+<!--}-->
+
+<!--.color {-->
+<!--  color: #909399;-->
+<!--}-->
+<!--</style>-->
diff --git a/src/views/sbgl/index1.js b/src/views/sbgl/index1.js
new file mode 100644
index 0000000..5b09dd9
--- /dev/null
+++ b/src/views/sbgl/index1.js
@@ -0,0 +1,57 @@
+import dayjs from 'dayjs'
+import Mock from 'mockjs'
+
+const colorList = ['(252, 105, 100)', '(247, 167, 71)', '(116, 202, 90)', '(83, 186, 241)', '(208, 142, 2231)']
+const nameList = '甯屾湜鍙�,椋炵考鍙�,鍏夋槑鍙�,绐ユ帰鍙�,鍔涚鍙�,璀﹀畼鍙�,闂數娴佹槦鍙�,鍗氬+鍙�,闇归洺鐏鍙�,鐙欏嚮鎵嬪彿,甯屾湜涔嬪厜鍙�,鍗楁捣蹇嶈�呭彿,鐏�烢3鍙�,灞辩鍙�,瀹夊叏鍗+鍙�,閾侀敜鍙�,瀵挎槦鍙�,鏄熸槦鍙�,缃楁浖鏂崱,娆叉湜鍙�,闇归洺闆风數鍙�,娑堥槻鍙�,娆ф床涔嬫槦鍙�'.split(',')
+
+const typeList = '馃殔,馃殘,馃殑'.split(',')
+
+const Random = Mock.Random
+var template = {
+  'id': () => 'JHR' + Random.natural(100, 999) + Random.character('upper') + Random.character('upper'),
+  'name': () => Random.pick(nameList),
+  'type': () => Random.pick(typeList),
+  'colorPair': () => {
+    const a = 'rgb' + Random.pick(colorList)
+    return {
+      dark: a.replace(')', ',0.8)'),
+      light: a.replace(')', ',0.1)')
+    }
+  },
+  'speed': () => Random.natural(0, 200),
+  'gtArray': () => {
+    const temp = []
+    let i = 0
+    const j = Random.natural(1, 9)
+    let tempStart = dayjs().subtract(12, 'hour')
+    let tempEnd = dayjs().subtract(12, 'hour')
+
+    while (i < j) {
+      tempStart = tempEnd.add(Random.natural(1, 5), 'hour')
+      tempEnd = tempStart.add(Random.natural(1, 5), 'hour')
+      temp.push({
+        'id': 'D' + Random.natural(1000, 9999),
+        'passenger': Random.natural(10, 200),
+        'start': tempStart.toString(),
+        'end': tempEnd.toString()
+      })
+
+      i++
+    }
+    return temp
+  }
+
+}
+
+function mockDatas(nums) {
+  const datas = []
+  for (let i = 0,
+    j = Random.natural(nums, nums); i < j; i++) {
+    datas.push(Mock.mock(template))
+  }
+  return datas
+}
+
+export {
+  mockDatas
+}
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 14ac9bf..3e80c78 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -247,16 +247,16 @@
               <div v-else>/</div>
             </template>
           </el-table-column>
-          <el-table-column
-            prop="route_name"
-            label="鍏宠仈宸ヨ壓璺嚎"
-            min-width="110"
-          >
-            <template slot-scope="{row}">
-              <i v-if="row.route_name" class="el-icon-share" @click="routeClick(row)" />
-              <i v-else style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" />
-            </template>
-          </el-table-column>
+          <!--          <el-table-column-->
+          <!--            prop="route_name"-->
+          <!--            label="鍏宠仈宸ヨ壓璺嚎"-->
+          <!--            min-width="110"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <i v-if="row.route_name" class="el-icon-share" @click="routeClick(row)" />-->
+          <!--              <i v-else style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" />-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
           <el-table-column
             prop="plan_startdate"
             label="璁″垝寮�濮嬫椂闂�"
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 0736e29..9ff54a6 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -7,13 +7,15 @@
             <div style="display: flex;align-items: center">
               <div style="width: 90px">鎵弿鏉$爜锛�</div>
               <!--              oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
-
               <el-input
+                id="keyWords"
                 v-model="form.orderstepqrcode"
                 name="produceCode"
                 style="width: 300px"
+                @keyup.native="e=>judgeIsScanning(e,'produceCode')"
                 @keyup.enter.native="val=>enterNative(val,'produceCode')"
               />
+
             </div>
             <div v-if="false" style="display: flex;padding-right: 10px">
               <el-button @click="ZZstart">
@@ -39,19 +41,6 @@
               :cell-style="this.$cellStyle"
               @sort-change="sortChange"
             >
-              <!--              <el-table-column-->
-              <!--                width="50"-->
-              <!--                fixed-->
-              <!--              >-->
-              <!--                <template slot-scope="{row}">-->
-              <!--                  <el-radio-->
-              <!--                    v-model="radioSelected"-->
-              <!--                    :label="row.wo"-->
-              <!--                    style="color: #fff;padding-left: 10px; margin-right: -25px;"-->
-              <!--                    @change.native="getCurrentRow(row.wo)"-->
-              <!--                  />-->
-              <!--                </template>-->
-              <!--              </el-table-column>-->
               <el-table-column
                 prop="RowNum"
                 width="50"
@@ -212,6 +201,7 @@
                 v-model="WXform.orderstepqrcode"
                 name="WXproduceCode"
                 style="width: 300px"
+                @keyup.native="e=>judgeIsScanning(e,'WXproduceCode')"
                 @keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
               />
             </div>
@@ -239,19 +229,6 @@
               :cell-style="this.$cellStyle"
               @sort-change="WXsortChange"
             >
-              <!--              <el-table-column-->
-              <!--                width="50"-->
-              <!--                fixed-->
-              <!--              >-->
-              <!--                <template slot-scope="{row}">-->
-              <!--                  <el-radio-->
-              <!--                    v-model="radioSelected"-->
-              <!--                    :label="row.wo_code"-->
-              <!--                    style="color: #fff;padding-left: 10px; margin-right: -25px;"-->
-              <!--                    @change.native="getWXCurrentRow(row.wo_code)"-->
-              <!--                  />-->
-              <!--                </template>-->
-              <!--              </el-table-column>-->
               <el-table-column
                 prop="RowNum"
                 width="50"
@@ -399,6 +376,7 @@
                 v-model="badForm.orderstepqrcode"
                 name="badProduceCode"
                 style="width: 300px"
+                @keyup.native="e=>judgeIsScanning(e,'badProduceCode')"
                 @keyup.enter.native="val=>enterNative(val,'badProduceCode')"
               />
             </div>
@@ -1326,23 +1304,37 @@
       },
       badTableDataDialog: [], // 涓嶈壇瀵硅瘽妗唗able琛ㄦ牸
       OperationArr: [], // 浜哄憳鏁扮粍
-      sendButtonIsDisabled: false// 涓嬭揪鎸夐挳鏄惁鍙偣鍑�
+      sendButtonIsDisabled: false, // 涓嬭揪鎸夐挳鏄惁鍙偣鍑�
+      judgeIsScanningArr: []// 鍒ゆ柇鏄惁鎵爜鏁扮粍
     }
   },
-  // computed: {
-  //   qrLink: function() {
-  //     return this.$store.getters.getPreviewUrl
-  //   }
-  // },
-  // watch: {
-  //   qrLink: function(newVal, oldNew) {
-  //     if (newVal !== oldNew) {
-  //       this.$nextTick(() => {
-  //         this.bindQRCode(newVal)
-  //       })
-  //     }
-  //   }
-  // },
+  watch: {
+    // 'form.orderstepqrcode': {
+    //   handler(newValue) {
+    //     this.form.orderstepqrcode = newValue
+    //
+    //     // 鍦ㄨ繖閲岃皟鐢紝骞舵墽琛宼his.fnThrottle(this.search, 500, 2000)();
+    //     this.fnThrottle(this.enterNative, 500, 2000, 'produceCode')()
+    //   }
+    // },
+    // 'WXform.orderstepqrcode': {
+    //   handler(newValue) {
+    //     this.form.orderstepqrcode = newValue
+    //
+    //     // 鍦ㄨ繖閲岃皟鐢紝骞舵墽琛宼his.fnThrottle(this.search, 500, 2000)();
+    //     this.fnThrottle(this.enterNative, 500, 2000, 'WXproduceCode')()
+    //   }
+    // },
+    // 'badForm.orderstepqrcode': {
+    //   handler(newValue) {
+    //     this.form.orderstepqrcode = newValue
+    //
+    //     // 鍦ㄨ繖閲岃皟鐢紝骞舵墽琛宼his.fnThrottle(this.search, 500, 2000)();
+    //     this.fnThrottle(this.enterNative, 500, 2000, 'badProduceCode')()
+    //   }
+    // }
+  },
+
   created() {
     this.getMesOrderStepSearch()
     this.tabClick()
@@ -1361,6 +1353,7 @@
     this.getMesOrderSelectUserAll() // 鑾峰彇鎵�鏈変汉鍛�
   },
   methods: {
+
     tableRowClassName({ row, rowIndex }) {
       return 'custom-row'
     },
@@ -1448,9 +1441,53 @@
         })
       }
     },
+    // 闃叉姈      //鎵爜鐢ㄧ殑鏄槻鎶�
+    fnThrottle(method, delay, duration, belong) {
+      var that = this
+      var timer = this.timer
+      var begin = new Date().getTime()
+      return function() {
+        var current = new Date().getTime()
+        clearTimeout(timer)
+        if (current - begin >= duration) {
+          // method()
+          // that.VALUE()
+          begin = current
+        } else {
+          that.timer = setTimeout(function() {
+            // method()
+            if (belong === 'produceCode') {
+              that.enterNative(that.form.orderstepqrcode, belong)
+            }
+            if (belong === 'WXproduceCode') {
+              that.enterNative(that.WXform.orderstepqrcode, belong)
+            }
+            if (belong === 'badProduceCode') {
+              that.enterNative(that.badForm.orderstepqrcode, belong)
+            }
+          }, delay)
+        }
+      }
+    },
+    // 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
+    judgeIsScanning(e, belong) {
+      const timenow = e.timeStamp
+      let flag = true
+      this.judgeIsScanningArr.push(timenow)
+      let i
+      for (i in this.judgeIsScanningArr) {
+        flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 10
+        if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
+          if (flag) {
+            this.fnThrottle(this.enterNative, 500, 2000, belong)()
+            return
+          }
+        }
+      }
+    },
     // 鎵爜閿洏鍥炶溅浜嬩欢
     async enterNative(val, belong) {
-      console.log(val, belong)
+      console.log(val, belong, 89898989)
       // 寮�宸ワ細code="200"  count=0
       // 鎶ュ伐锛歝ode="200"  count=1
       // 鍙戞枡锛歝ode="200"  count=2
@@ -1745,6 +1782,10 @@
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
+      this.form.orderstepqrcode = ''
+      this.WXform.orderstepqrcode = ''
+      this.badForm.orderstepqrcode = ''
+
       this.dialogForm.wo_code = '', // 宸ュ崟缂栧彿
       this.dialogForm.partcode = '', // 浜у搧缂栫爜
       this.dialogForm.partname = '', // 浜у搧鍚嶇О
@@ -1848,7 +1889,7 @@
               if (res.code === '200') {
                 this.$message.success('鏀舵枡鎴愬姛锛�')
 
-                if (this.dialogForm.nextstepcode !== '') {
+                if (this.dialogForm.nextstepcode === '') {
                   this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
                   this.dialogVisible2 = true
                 }
@@ -1924,8 +1965,7 @@
               if (res.code === '200') {
                 this.$message.success('鎶ュ伐鎴愬姛锛�')
 
-                console.log(this.dialogForm.nextstepcode, 1)
-                if (this.dialogForm.nextstepcode !== '') {
+                if (this.dialogForm.nextstepcode === '') {
                   this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
                   this.dialogVisible2 = true
                 }
diff --git a/src/views/scgl/sckbg_back.vue b/src/views/scgl/sckbg_back.vue
new file mode 100644
index 0000000..4e96092
--- /dev/null
+++ b/src/views/scgl/sckbg_back.vue
@@ -0,0 +1,2394 @@
+<template>
+  <div>
+    <div class="body" style="padding-top: 10px;" :style="{height:mainHeight+'px'}">
+      <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
+        <el-tab-pane label="鐢熶骇鍒楄〃">
+          <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
+            <div style="display: flex;align-items: center">
+              <div style="width: 90px">鎵弿鏉$爜锛�</div>
+              <!--              oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
+              <el-input
+                id="keyWords"
+                v-model="form.orderstepqrcode"
+                name="produceCode"
+                style="width: 300px"
+                @keyup.enter.native="val=>enterNative(val,'produceCode')"
+              />
+            </div>
+            <div v-if="false" style="display: flex;padding-right: 10px">
+              <el-button @click="ZZstart">
+                <svg-icon icon-class="start_time" style="margin-right: 2px" />
+                寮�濮�
+              </el-button>
+              <el-button @click="ZZreport">
+                <svg-icon icon-class="report_work" style="margin-right: 2px" />
+                鎶ュ伐
+              </el-button>
+            </div>
+          </div>
+          <el-divider />
+          <div class="elTableDiv">
+            <el-table
+              :data="tableData"
+              :height="isIpad? (tableHeight+50):tableHeight"
+              border
+              :row-class-name="tableRowClassName"
+              :style="{width: 100+'%',height:tableHeight+'px',}"
+              highlight-current-row
+              :header-cell-style="this.$headerCellStyle"
+              :cell-style="this.$cellStyle"
+              @sort-change="sortChange"
+            >
+              <!--              <el-table-column-->
+              <!--                width="50"-->
+              <!--                fixed-->
+              <!--              >-->
+              <!--                <template slot-scope="{row}">-->
+              <!--                  <el-radio-->
+              <!--                    v-model="radioSelected"-->
+              <!--                    :label="row.wo"-->
+              <!--                    style="color: #fff;padding-left: 10px; margin-right: -25px;"-->
+              <!--                    @change.native="getCurrentRow(row.wo)"-->
+              <!--                  />-->
+              <!--                </template>-->
+              <!--              </el-table-column>-->
+              <el-table-column
+                prop="RowNum"
+                width="50"
+                label="搴忓彿"
+                fixed
+              />
+              <el-table-column
+                prop="status"
+                label="鐘舵��"
+                sortable="custom"
+                width="80"
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.status==='NEW'">鏂拌鍗�</div>
+                  <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
+                  <div v-if="row.status==='START'">寮�宸�</div>
+                  <div v-if="row.status==='CLOSED'">瀹屽伐</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="wo_code"
+                label="宸ュ崟鍙�"
+                width="160"
+                show-tooltip-when-overflow
+                sortable="custom"
+              />
+              <el-table-column
+                prop="partcode"
+                label="浜у搧缂栫爜"
+                min-width="110"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="partname"
+                width="160"
+                show-tooltip-when-overflow
+                label="浜у搧鍚嶇О"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="stepname"
+                label="宸ュ簭"
+                show-tooltip-when-overflow
+                width="120"
+                sortable="custom"
+              />
+              <!--              <el-table-column-->
+              <!--                prop="descr"-->
+              <!--                label="宸ュ簭鎻忚堪"-->
+              <!--                min-width="150"-->
+              <!--                sortable="custom"-->
+              <!--              >-->
+              <!--                <template slot-scope="{row}">-->
+              <!--                  <div v-if="row.descr">{{ row.descr }}</div>-->
+              <!--                  <div v-else>/</div>-->
+              <!--                </template>-->
+              <!--              </el-table-column>-->
+              <el-table-column
+                prop="plan_qty"
+                label="浠诲姟鏁伴噺"
+                width="110"
+                sortable="custom"
+              />
+              <el-table-column
+                label="鏈姤宸ユ暟閲�"
+                width="120"
+              >
+                <!--                sortable="custom"-->
+                <template slot-scope="{row}">
+                  <div>{{ row.plan_qty - row.good_qty - row.ng_qty }}</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="good_qty"
+                label="宸叉姤宸ユ暟閲�"
+                sortable="custom"
+                width="160"
+              />
+              <el-table-column
+                prop="ng_qty"
+                label="涓嶈壇鏁伴噺"
+                width="150"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="bad_qty"
+                label="宸叉姤搴熸暟閲�"
+                width="120"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="plan_startdate"
+                label="璁″垝寮�宸ユ棩鏈�"
+                width="150"
+                sortable="custom"
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+                  <div v-else>/</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="plan_enddate"
+                label="璁″垝瀹屽伐鏃ユ湡"
+                width="150"
+                sortable="custom"
+                fixed="right"
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+                  <div v-else>/</div>
+                </template>
+              </el-table-column>
+              <!--              <el-table-column-->
+              <!--                label="鎿嶄綔"-->
+              <!--                width="150"-->
+              <!--                fixed="right"-->
+              <!--              >-->
+              <!--                <template slot-scope="{row}">-->
+              <!--                  <div class="operationClass">-->
+              <!--                    <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
+              <!--                    <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+              <!--                  </div>-->
+              <!--                </template>-->
+              <!--              </el-table-column>-->
+            </el-table>
+          </div>
+          <!--鍒嗛〉-->
+          <pagination
+            :total="total"
+            :page.sync="form.page"
+            :limit.sync="form.rows"
+            align="right"
+            layout="total,prev, pager, next,sizes"
+            popper-class="select_bottom"
+            @pagination="getMesOrderStepSearch"
+          />
+        </el-tab-pane>
+        <el-tab-pane label="澶栧崗鍒楄〃">
+          <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
+            <div style="display: flex;align-items: center">
+              <div style="width: 90px;">澶栧崗绫诲瀷锛�</div>
+              <el-select
+                v-model="WXSelected"
+                filterable
+                style="width: 200px"
+                placeholder="璇烽�夋嫨"
+              >
+                <el-option
+                  v-for="item in WXSelectArr"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+              <div style="width: 90px;margin-left: 20px">鎵弿鏉$爜锛�</div>
+              <el-input
+                v-model="WXform.orderstepqrcode"
+                name="WXproduceCode"
+                style="width: 300px"
+                @keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
+              />
+            </div>
+            <div v-if="false" style="display: flex;padding-right: 10px">
+              <el-button @click="WXsend">
+                <svg-icon icon-class="start_time" style="margin-right: 2px" />
+                鍙戞枡
+              </el-button>
+              <el-button @click="WXback">
+                <svg-icon icon-class="report_work" style="margin-right: 2px" />
+                鏀舵枡
+              </el-button>
+            </div>
+          </div>
+          <el-divider />
+          <div class="elTableDiv">
+            <el-table
+              :data="WXtableData"
+              :height="isIpad? (tableHeight+50):tableHeight"
+              border
+              :row-class-name="tableRowClassName"
+              :style="{width: 100+'%',height:tableHeight+'px',}"
+              highlight-current-row
+              :header-cell-style="this.$headerCellStyle"
+              :cell-style="this.$cellStyle"
+              @sort-change="WXsortChange"
+            >
+              <!--              <el-table-column-->
+              <!--                width="50"-->
+              <!--                fixed-->
+              <!--              >-->
+              <!--                <template slot-scope="{row}">-->
+              <!--                  <el-radio-->
+              <!--                    v-model="radioSelected"-->
+              <!--                    :label="row.wo_code"-->
+              <!--                    style="color: #fff;padding-left: 10px; margin-right: -25px;"-->
+              <!--                    @change.native="getWXCurrentRow(row.wo_code)"-->
+              <!--                  />-->
+              <!--                </template>-->
+              <!--              </el-table-column>-->
+              <el-table-column
+                prop="RowNum"
+                width="50"
+                label="搴忓彿"
+                fixed
+              />
+              <el-table-column
+                prop="status"
+                label="鐘舵��"
+                sortable="custom"
+                width="80"
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.status==='NEW'">鏂拌鍗�</div>
+                  <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
+                  <div v-if="row.status==='START'">宸插彂鏂�</div>
+                  <div v-if="row.status==='CLOSED'">宸叉敹鏂�</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="wo_code"
+                label="宸ュ崟鍙�"
+                width="160"
+                show-tooltip-when-overflow
+                sortable="custom"
+              />
+              <el-table-column
+                prop="partcode"
+                label="浜у搧缂栫爜"
+                width="110"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="partname"
+                label="浜у搧鍚嶇О"
+                width="160"
+                show-tooltip-when-overflow
+                sortable="custom"
+              />
+              <el-table-column
+                prop="stepname"
+                label="宸ュ簭"
+                width="120"
+                sortable="custom"
+              />
+              <!--              <el-table-column-->
+              <!--                prop="descr"-->
+              <!--                label="宸ュ簭鎻忚堪"-->
+              <!--                min-width="150"-->
+              <!--                sortable="custom"-->
+              <!--              >-->
+              <!--                <template slot-scope="{row}">-->
+              <!--                  <div v-if="row.descr">{{ row.descr }}</div>-->
+              <!--                  <div v-else>/</div>-->
+              <!--                </template>-->
+              <!--              </el-table-column>-->
+              <el-table-column
+                prop="plan_qty"
+                label="浠诲姟鏁伴噺"
+                width="110"
+                sortable="custom"
+              />
+              <el-table-column
+                label="鏈姤宸ユ暟閲�"
+                width="120"
+              >
+                <!--                sortable="custom"-->
+                <template slot-scope="{row}">
+                  <div>{{ row.plan_qty - row.good_qty - row.ng_qty }}</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="good_qty"
+                label="宸叉敹鏂欐暟閲�"
+                sortable="custom"
+                width="160"
+              />
+              <el-table-column
+                prop="ng_qty"
+                label="涓嶈壇鏁伴噺"
+                width="150"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="bad_qty"
+                label="宸叉姤搴熸暟閲�"
+                min-width="120"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="plan_startdate"
+                label="璁″垝寮�宸ユ棩鏈�"
+                width="150"
+                sortable="custom"
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+                  <div v-else>/</div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="plan_enddate"
+                label="璁″垝瀹屽伐鏃ユ湡"
+                width="150"
+                sortable="custom"
+                fixed="right"
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+                  <div v-else>/</div>
+                </template>
+              </el-table-column>
+              <!--              <el-table-column-->
+              <!--                label="鎿嶄綔"-->
+              <!--                width="150"-->
+              <!--                fixed="right"-->
+              <!--              >-->
+              <!--                <template slot-scope="{row}">-->
+              <!--                  <div class="operationClass">-->
+              <!--                    <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
+              <!--                    <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+              <!--                  </div>-->
+              <!--                </template>-->
+              <!--              </el-table-column>-->
+            </el-table>
+          </div>
+          <!--鍒嗛〉-->
+          <pagination
+            :total="WXtotal"
+            :page.sync="WXform.page"
+            :limit.sync="WXform.rows"
+            align="right"
+            layout="total,prev, pager, next,sizes"
+            popper-class="select_bottom"
+            @pagination="getMesOrderStepSearch"
+          />
+        </el-tab-pane>
+        <el-tab-pane label="涓嶈壇寰呭鐞嗗垪琛�">
+          <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
+            <div style="display: flex;align-items: center">
+              <div style="width: 90px">鎵弿鏉$爜锛�</div>
+              <!--              oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
+
+              <el-input
+                v-model="badForm.orderstepqrcode"
+                name="badProduceCode"
+                style="width: 300px"
+                @keyup.enter.native="val=>enterNative(val,'badProduceCode')"
+              />
+            </div>
+          </div>
+          <el-divider />
+          <div class="elTableDiv">
+            <el-table
+              :data="badTableData"
+              :height="isIpad? (tableHeight+50):tableHeight"
+              border
+              :row-class-name="tableRowClassName"
+              :style="{width: 100+'%',height:tableHeight+'px',}"
+              highlight-current-row
+              :header-cell-style="this.$headerCellStyle"
+              :cell-style="this.$cellStyle"
+              @sort-change="badSortChange"
+            >
+              <el-table-column
+                prop="RowNum"
+                width="50"
+                label="搴忓彿"
+                fixed
+              />
+              <el-table-column
+                prop="wo_code"
+                label="宸ュ崟鍙�"
+                min-width="160"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="partcode"
+                label="浜у搧缂栫爜"
+                min-width="110"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="partname"
+                min-width="160"
+                label="浜у搧鍚嶇О"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="stepname"
+                label="宸ュ簭"
+                min-width="120"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="plan_qty"
+                label="浠诲姟鏁伴噺"
+                width="110"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="good_qty"
+                label="宸叉姤宸ユ暟閲�"
+                sortable="custom"
+                min-width="160"
+              />
+              <el-table-column
+                prop="ng_qty"
+                label="涓嶈壇鏁伴噺"
+                width="150"
+                sortable="custom"
+              />
+              <el-table-column
+                prop="bad_qty"
+                label="宸叉姤搴熸暟閲�"
+                width="120"
+                sortable="custom"
+              />
+              <el-table-column
+                label="鎿嶄綔"
+                width="120"
+                fixed="right"
+              >
+                <template slot-scope="{row}">
+                  <div class="operationClass">
+                    <el-button type="text" @click="repairHandle(row)">缁翠慨澶勭悊</el-button>
+                  </div>
+                </template>
+              </el-table-column>
+
+            </el-table>
+          </div>
+          <!--鍒嗛〉-->
+          <pagination
+            :total="badTotal"
+            :page.sync="badForm.page"
+            :limit.sync="badForm.rows"
+            align="right"
+            layout="total,prev, pager, next,sizes"
+            popper-class="select_bottom"
+            @pagination="getBadList"
+          />
+        </el-tab-pane>
+      </el-tabs>
+
+    </div>
+
+    <el-dialog
+      :title="dialogTitle"
+      :visible.sync="dialogVisible"
+      width="850px"
+      class="dialogVisible"
+      :top="dialogTitle==='鑷埗鎶ュ伐'?'5vh':'15vh'"
+      :close-on-click-modal="false"
+      @close="handleClose"
+      @closed="handleClose"
+    >
+      <el-form
+        ref="dialogForm"
+        inline
+        :rules="dialogFormRules"
+        :model="dialogForm"
+        label-width="110px"
+      >
+        <el-form-item label="宸ュ崟缂栧彿锛�">
+          <div style="width: 200px">{{ dialogForm.wo_code }}</div>
+        </el-form-item>
+        <el-form-item label="浜у搧缂栫爜锛�">
+          <div style="width: 200px">{{ dialogForm.partcode }}</div>
+        </el-form-item>
+        <el-form-item label="浜у搧鍚嶇О锛�">
+          <div style="width: 200px">{{ dialogForm.partname }}</div>
+        </el-form-item>
+        <el-form-item label="浜у搧瑙勬牸锛�">
+          <div style="width: 200px">{{ dialogForm.partspec }}</div>
+        </el-form-item>
+        <el-form-item label="褰撳墠宸ュ簭锛�">
+          <div style="width: 200px">{{ dialogForm.stepname }}</div>
+        </el-form-item>
+        <el-form-item v-if="false" label="宸ュ簭鎻忚堪锛�">
+          <!--          <el-tooltip   class="item" effect="dark" content="鍘熸潗鏂欏垏鎸夋潗鏂欏垏鎸夋潗鏂欏垏鎸夋椂鎵撳崱鏁版嵁鐨勫崱" placement="top-start">-->
+          <div style="width: 200px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">
+            {{ dialogForm.stepdesc }}
+          </div>
+          <!--          </el-tooltip>-->
+        </el-form-item>
+        <el-form-item label="浠诲姟鏁伴噺锛�">
+          <div style="width: 200px">{{ dialogForm.planqty }}</div>
+        </el-form-item>
+
+        <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="鏈紑/宸插紑锛�">
+          <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鏈姤/宸叉姤锛�">
+          <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='澶栧崗鍙戞枡'" label="鏈彂/宸插彂锛�">
+          <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏈敹/宸叉敹锛�">
+          <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
+        </el-form-item>
+        <!--鑷埗寮�濮�-->
+        <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="寮�宸ユ暟閲忥細">
+          <div style="width: 200px">{{ dialogForm.startqty }}</div>
+          <!--          <div style="width: 200px">{{  dialogForm.noreportqty }}</div>-->
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" prop="eqpcode" label="鐢熶骇璁惧锛�">
+          <el-select
+            v-model="dialogForm.eqpcode"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in ZZeqpArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
+        <!--     鑷埗鎶ュ伐   -->
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嬮亾宸ュ簭锛�">
+          <div style="width: 200px">{{ dialogForm.nextstepname }}</div>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" prop="usergroupcode" label="鐢熶骇鐝粍锛�">
+          <el-select
+            v-model="dialogForm.usergroupcode"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+            @change="usergroupChange"
+          >
+            <el-option
+              v-for="item in ZZtreams"
+              :key="item.group_code"
+              :label="item.group_name"
+              :value="item.group_code"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="璁惧鍚嶇О锛�" prop="eqpcode">
+          <el-select
+            v-model="dialogForm.eqpcode"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in ZZeqpArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐鏁伴噺锛�" prop="startqty">
+          <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+          <!--          <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />-->
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鏁伴噺锛�">
+          <el-input v-model="dialogForm.noputqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鍘熷洜锛�">
+          <el-select
+            v-model="dialogForm.badcode"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+            :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
+            multiple
+          >
+            <el-option
+              v-for="item in badArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
+        <!--        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐浜哄憳锛�">-->
+        <!--          <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />-->
+        <!--        </el-form-item>-->
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐浜猴細">
+          <el-select
+            v-model="dialogForm.operation"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in OperationArr"
+              :key="item.usercode"
+              :label="item.username"
+              :value="item.usercode"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="澶囨敞锛�">
+          <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
+        </el-form-item>
+        <div v-if="dialogTitle==='鑷埗鎶ュ伐'">
+          <i class="el-icon-s-operation" style="color:#42b983;" /> 浜哄憳鍒楄〃
+          <el-button type="primary" style="margin: 10px 0" @click="userAdd">澧炶</el-button>
+          <el-table
+            :data="userTableData"
+            border
+            :row-class-name="tableRowClassName"
+            :header-cell-style="this.$headerCellStyle"
+            :cell-style="this.$cellStyle"
+            height="180"
+            highlight-current-row
+            style="width: 100%"
+          >
+            <el-table-column
+              width="100"
+              label="搴忓彿"
+              type="index"
+              fixed
+            />
+            <el-table-column
+              prop="username"
+              label="浜哄憳鍚嶇О"
+            >
+              <template slot-scope="{row}">
+                <div v-if="row.isVisible===0">{{ row.username }}</div>
+                <el-select
+                  v-if="row.isVisible===1"
+                  v-model="row.username"
+                  style="width: 200px;"
+                  placeholder="璇烽�夋嫨"
+                  @change="val=>usernameChange(val,row)"
+                >
+                  <el-option
+                    v-for="item in ZZuserArr"
+                    :key="item.usercode"
+                    :label="item.username"
+                    :value="item.usercode"
+                  />
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="RowNum"
+              label="鎿嶄綔"
+              fixed="right"
+            >
+              <template slot-scope="{row}">
+                <div class="operationClass">
+                  <el-button v-if="row.isVisible===0" type="text" @click="userDel(row)">鍒犻櫎</el-button>
+                  <el-button v-if="row.isVisible===1&&!userIsSave" type="text" @click="userSave(row)">淇濆瓨</el-button>
+                  <el-button v-if="row.isVisible===1" type="text" @click="userCancel(row)">鍙栨秷</el-button>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <!--鍒嗛〉-->
+          <pagination
+            :total="UserTotal"
+            :page.sync="Userform.page"
+            :limit.sync="Userform.rows"
+            align="right"
+            layout="total,prev, pager, next,sizes"
+            popper-class="select_bottom"
+            @pagination="getMesOrderStepSearch"
+          />
+        </div>
+        <!--     澶栧崗鍙戞枡-->
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鍙戞枡'"
+          label="澶栧崗渚涙柟锛�"
+          prop="wxcode"
+        >
+          <el-select
+            v-model="dialogForm.wxcode"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+            filterable
+          >
+            <el-option
+              v-for="item in WXouterprovide"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鍙戞枡'"
+          label="鍙戞枡浜哄憳锛�"
+          prop="outuser"
+        >
+          <el-select
+            v-model="dialogForm.outuser"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+            filterable
+          >
+            <el-option
+              v-for="item in WXoutuser"
+              :key="item.usercode"
+              :label="item.username"
+              :value="item.usercode"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鍙戞枡'"
+          label="鍙戞枡鏁伴噺锛�"
+          prop="fqty"
+        >
+          <el-input v-model="dialogForm.fqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+        </el-form-item>
+        <!--     澶栧崗鏀舵枡-->
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鏀舵枡'"
+          label="涓嬮亾宸ュ簭锛�"
+        >
+          <div style="width: 200px">{{ dialogForm.nextstepname }}</div>
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鏀舵枡'"
+          label="澶栧崗渚涙柟锛�"
+          prop="wxcode"
+        >
+          <el-select
+            v-model="dialogForm.wxcode"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in WXouterprovide"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鏀舵枡'"
+          label="鏀舵枡浜哄憳锛�"
+          prop="inuser"
+        >
+          <el-select
+            v-model="dialogForm.inuser"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in WXoutuser"
+              :key="item.usercode"
+              :label="item.username"
+              :value="item.usercode"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鏀舵枡'"
+          label="鏀舵枡鏁伴噺锛�"
+          prop="sqty"
+        >
+          <el-input
+            v-model="dialogForm.sqty"
+            style="width: 200px"
+            oninput="value=value.replace(/[^0-9.]/g,'')"
+          />
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鏀舵枡'"
+          label="涓嶈壇鏁伴噺锛�"
+          prop="noputqty"
+        >
+          <el-input
+            v-model="dialogForm.noputqty"
+            style="width: 200px"
+            oninput="value=value.replace(/[^0-9.]/g,'')"
+          />
+        </el-form-item>
+        <el-form-item
+          v-if="dialogTitle==='澶栧崗鏀舵枡'"
+          label="涓嶈壇鍘熷洜锛�"
+        >
+          <!--          prop="badcode"-->
+          <el-select
+            v-model="dialogForm.badcode"
+            style="width: 200px;"
+            multiple
+            :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in badArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏀舵枡浜猴細">
+          <el-select
+            v-model="dialogForm.operation"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in OperationArr"
+              :key="item.usercode"
+              :label="item.username"
+              :value="item.usercode"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="澶囨敞锛�">
+          <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button v-if="dialogTitle==='鑷埗寮�濮�'" type="primary" @click="dialogVisibleConfirm">寮� 宸�</el-button>
+          <el-button v-if="dialogTitle==='鑷埗鎶ュ伐'" type="primary" @click="dialogVisibleConfirm">鎻愪氦/鎵撳嵃</el-button>
+          <el-button v-if="dialogTitle==='澶栧崗鍙戞枡'" type="primary" @click="dialogVisibleConfirm">鍙戞枡</el-button>
+          <el-button v-if="dialogTitle==='澶栧崗鏀舵枡'" type="primary" @click="dialogVisibleConfirm">鏀舵枡/鎵撳嵃</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
+    <!--鎵撳嵃棰勮椤甸潰  灏忔爣绛�-->
+    <el-dialog
+      title="棰勮"
+      :visible.sync="dialogVisible2"
+      width="1140"
+      top="10vh"
+      :close-on-click-modal="false"
+      @close="dialogVisible2Close"
+    >
+      <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+      <div id="printMe2" style="padding: 30px;">
+        <div
+          style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;"
+        >
+
+          <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000">
+            <div
+              style="display: flex;height: 90px;border-bottom:1px solid #000;
+              justify-content: center;align-items: center;position: relative"
+            >
+              <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
+            </div>
+            <div style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center">
+              <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+              {{ qrForm.startqty }}
+            </div>
+            <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center">
+              <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+              {{ qrForm.operator }}
+            </div>
+          </div>
+
+          <div style="width:190px;display: flex;flex-direction: column">
+            <div
+              style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
+            >
+              <div style="width: 60px;margin-left: 5px;">宸ュ崟缂栧彿:</div>
+              <div>{{ qrForm.wo_code }}</div>
+            </div>
+            <div
+              style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
+            >
+              <div style="width: 60px;margin-left: 5px;">浜у搧缂栫爜:</div>
+              <div>{{ qrForm.partcode }}</div>
+            </div>
+            <div
+              style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
+            >
+              <div style="width:60px;margin-left: 5px;">浜у搧鍚嶇О:</div>
+              <div>{{ qrForm.partname }}</div>
+            </div>
+            <div
+              style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
+            >
+              <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>
+              <div>{{ qrForm.nextstepname }}</div>
+            </div>
+            <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
+              <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>
+              <div>{{ qrForm.operatorTime }}</div>
+            </div>
+
+          </div>
+
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button @click="dialogVisible2 = false">鍙� 娑�</el-button>
+          <el-button v-print="printObj2" type="primary">纭� 瀹�</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
+    <!--    涓嶈壇澶勭悊鍒楄〃瀵硅瘽妗�-->
+    <el-dialog
+      title="缁翠慨澶勭悊"
+      :visible.sync="badDialogVisible"
+      width="990px"
+      class="badDialogVisible"
+      top="10vh"
+      :close-on-click-modal="false"
+      @close="handleCloseBad"
+      @closed="handleCloseBad"
+    >
+      <el-form
+        inline
+        :model="badDialogForm"
+        label-width="110px"
+      >
+        <el-form-item label="宸ュ崟缂栧彿锛�">
+          <div style="width: 200px">{{ badDialogForm.wo_code }}</div>
+        </el-form-item>
+        <el-form-item label="浜у搧缂栫爜锛�">
+          <div style="width: 200px">{{ badDialogForm.partcode }}</div>
+        </el-form-item>
+        <el-form-item label="浜у搧鍚嶇О锛�">
+          <div style="width: 200px">{{ badDialogForm.partname }}</div>
+        </el-form-item>
+        <el-form-item label="浜у搧瑙勬牸锛�">
+          <div style="width: 200px">{{ badDialogForm.partspec }}</div>
+        </el-form-item>
+        <el-form-item label="褰撳墠宸ュ簭锛�">
+          <div style="width: 200px">{{ badDialogForm.stepname }}</div>
+        </el-form-item>
+        <el-form-item label="涓嬮亾宸ュ簭锛�">
+          <div style="width: 200px">{{ badDialogForm.nextstepname }}</div>
+        </el-form-item>
+        <el-form-item label="浠诲姟鏁伴噺锛�">
+          <div style="width: 200px">{{ badDialogForm.plan_qty }}</div>
+        </el-form-item>
+        <el-form-item label="鎶ュ伐鏁伴噺锛�">
+          <div style="width: 200px">{{ badDialogForm.good_qty }}</div>
+        </el-form-item>
+        <el-form-item label="涓嶈壇鏁伴噺锛�">
+          <div style="width: 200px">{{ badDialogForm.ng_qty }}</div>
+        </el-form-item>
+
+        <el-form-item label="缁翠慨浜哄憳锛�">
+          <el-select
+            v-model="badDialogForm.operation"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in OperationArr"
+              :key="item.usercode"
+              :label="item.username"
+              :value="item.usercode"
+            />
+          </el-select>
+        </el-form-item>
+
+      </el-form>
+      <div style="margin-bottom:20px">
+        <i class="el-icon-s-operation" style="color:#42b983;" /> 涓嶈壇淇℃伅鏄庣粏锛�
+      </div>
+      <div class="elTableDiv">
+        <el-table
+          :data="badTableDataDialog"
+          :height="isIpad? (tableHeight-350):(tableHeight-400)"
+          border
+          :row-class-name="tableRowClassName"
+          :style="{width: 100+'%',height:(tableHeight-400)+'px',}"
+          highlight-current-row
+          :header-cell-style="this.$headerCellStyle"
+          :cell-style="this.$cellStyle"
+        >
+          <el-table-column
+            type="index"
+            width="50"
+            label="搴忓彿"
+            fixed
+          />
+          <el-table-column
+            prop="step_code"
+            label="宸ュ簭缂栫爜"
+            min-width="80"
+          />
+          <el-table-column
+            prop="stepname"
+            label="宸ュ簭鍚嶇О"
+            min-width="80"
+          />
+
+          <el-table-column
+            prop="plan_qty"
+            label="浠诲姟鏁伴噺"
+            width="80"
+          />
+          <el-table-column
+            label="鎶ュ伐鏁伴噺"
+            width="80"
+            prop="report_qty"
+          />
+          <el-table-column
+            prop="ng_qty"
+            label="涓嶈壇鏁伴噺"
+            width="80"
+          />
+          <el-table-column
+            prop="badqty"
+            label="宸叉姤搴熸暟閲�"
+            width="100"
+          />
+          <el-table-column
+            prop="defect_name"
+            label="涓嶈壇鍘熷洜"
+            show-tooltip-when-overflow
+            width="80"
+          />
+          <el-table-column
+            prop="repair_qty"
+            label="缁翠慨鍚堟牸鏁伴噺"
+            width="110"
+          >
+            <template slot-scope="{row}">
+              <!--              {{ row.repair_qty }}-->
+              <div v-if="row.isVisible===0">{{ row.repair_qty }}</div>
+              <el-input v-if="row.isVisible===1" v-model="row.repair_qty" oninput="value=value.replace(/[^0-9]/g,'')" />
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="bad_qty"
+            label="鎶ュ簾鏁伴噺"
+            width="90"
+          >
+            <!--            oninput="value=value.replace(/[0-9]/g,'')"-->
+            <template slot-scope="{row}">
+              <div v-if="row.isVisible===0">{{ row.bad_qty }}</div>
+              <el-input v-if="row.isVisible===1" v-model="row.bad_qty" oninput="value=value.replace(/[^0-9]/g,'')" />
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="鎿嶄綔"
+            width="100"
+          >
+            <template slot-scope="{row}">
+              <div class="operationClass">
+                <el-button v-if="row.isVisible===0" type="text" @click="badEdit(row)">缂栬緫</el-button>
+                <el-button v-if="row.isVisible===0" type="text" @click="badDel(row)">鍒犻櫎</el-button>
+
+                <el-button v-if="row.isVisible===1" type="text" @click="badSave(row)">纭</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="badCancel(row)">鍙栨秷</el-button>
+              </div>
+            </template>
+          </el-table-column>
+
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button @click="badDialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button type="primary" @click="badDialogVisibleConfirm ">淇� 瀛�/鎵� 鍗�</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import $ from 'jquery'
+import {
+  MesOrderGroupSelectUser,
+  MesOrderSelectUser,
+  MesOrderStepReportSelectUserGroup,
+  MesOrderStepSearch,
+  MesOrderStepStart,
+  MesOrderStepStartSelectEqp,
+  MesOrderWxStepSearch,
+  MesOrderStepSelectWX,
+  SavaMesOrderStepOut,
+  MesOrderStepSelectCause,
+  SavaMesOrderStepIn,
+  SavaMesOrderStepStart,
+  SavaMesOrderStepReport, MesOrderNgStepSearch, MesOrderNgSubStepSearch, EditOrderNgStepSeave
+} from '@/api/scgl'
+import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+import QRCode from 'qrcodejs2'
+import { getCookie } from '@/utils/auth'
+import { handleDatetime2 } from '@/utils/global'
+
+const SER_HZ = /^[\u4e00-\u9fa5]+$/
+export default {
+  name: 'SCKBG',
+  components: {
+    Pagination
+  },
+  data() {
+    const validateName = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
+      } else {
+        if (SER_HZ.test(value)) {
+          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
+        } else {
+          callback()
+        }
+      }
+    }
+    const validateTypeCode = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('璇烽�夋嫨涓婄骇'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      mainHeight: 0,
+      tableHeight: 0,
+      isIpad: false,
+      // produceCode: '', // 宸ュ簭鐮�
+      // WXproduceCode: '', // 澶栧崗宸ュ簭鐮�
+      radioSelected: '', // 宸ュ簭閫変腑
+      WXradioSelected: '', // 宸ュ簭閫変腑
+      form: {
+        orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
+        prop: 'wo_code', // 鎺掑簭瀛楁
+        order: 'asc', // 鎺掑簭瀛楁
+        page: 1, // 绗嚑椤�
+        rows: 20 // 姣忛〉澶氬皯鏉�
+      },
+      total: 10,
+      tableData: [],
+      WXform: { // 澶栧崗琛ㄥ崟
+        orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
+        prop: 'wo_code', // 鎺掑簭瀛楁z
+        order: 'asc', // 鎺掑簭瀛楁
+        page: 1, // 绗嚑椤�
+        rows: 20 // 姣忛〉澶氬皯鏉�
+      },
+      WXtotal: 10, // 澶栧崗琛ㄥ崟鎬绘暟
+      WXtableData: [], // 澶栧崗琛�
+
+      WXSelectArr: [// 澶栧崗绫诲瀷涓嬫媺鍒楄〃
+        { code: 'OUT', name: '鍙戞枡' },
+        { code: 'IN', name: '鏀舵枡' }
+      ],
+      WXSelected: 'OUT', // 澶栧崗涓嬫媺鍒楄〃閫変腑鍊�
+      dialogVisible: false,
+      dialogTitle: '', // 鑷埗寮�濮嬨�佽嚜鍒舵姤宸ャ�佸鍗忓彂鏂欍�佸鍗忔敹鏂�
+      dialogForm: {
+        wo_code: '', // 宸ュ崟缂栧彿
+        partcode: '', // 浜у搧缂栫爜
+        partname: '', // 浜у搧鍚嶇О
+        partspec: '', // 浜у搧瑙勬牸
+        stepseq: '', // 宸ュ簭搴忓彿
+        stepcode: '', // 宸ュ簭缂栫爜
+        stepname: '', // 褰撳墠宸ュ簭鍚�
+        nextstepname: '', // 涓嬩竴閬撳伐搴忓悕
+        stepdesc: '', // 宸ュ簭鎻忚堪
+        planqty: '', // 浠诲姟鏁伴噺
+        reportqty: '', // 宸叉姤鏁伴噺
+        noreportqty: '', // 鏈姤鏁伴噺
+        startqty: '', // 寮�(鎶�)宸ユ暟閲�
+
+        wxcode: '', // 澶栧崗渚涘簲鍟嗙紪鐮�
+        outuser: '', // 鍙戞枡浜哄憳
+        taskqty: '', // 浠诲姟鏁伴噺
+        fqty: '', // 鍙戞枡鏁伴噺
+
+        inuser: '', // 鏀舵枡浜哄憳
+        sqty: '', // 鏀舵枡鏁伴噺
+        ngqty: '', // 涓嶈壇鏁伴噺
+        badcode: '', // 涓嶈壇鍘熷洜缂栫爜
+
+        noputqty: '', // 涓嶈壇鏁伴噺
+
+        eqpcode: '', // 鐢熶骇璁惧缂栫爜
+
+        usergroupcode: '', // 鐝粍缂栫爜
+        reportuser: '', // 鎶ュ伐浜哄憳
+
+        startqtySum: '', // 涓嶈兘瓒呰繃鐨勬暟鍊�
+
+        operation: getCookie('navTabId'), // 鎶ュ伐浜猴紙鏀舵枡浜猴級
+        remarks: ''// 澶囨敞
+
+      },
+      ZZuserArr: [], // 鑷埗鐢ㄦ埛鎵�鏈�
+      ZZtreams: [], // 鑷埗鐢熶骇鐝粍鏁扮粍
+      ZZeqpArr: [], // 鑷埗璁惧鍚嶇О
+      badArr: [], // 涓嶈壇鍘熷洜鏁扮粍
+      WXouterprovide: [], // 澶栧崗渚涙柟鏁扮粍
+      WXoutuser: [], // 鍙戞枡浜哄憳鏁扮粍
+      userTableData: [], // 浜哄憳鍒楄〃
+      UserTotal: 0,
+      Userform: {},
+      userIsSave: false, // 姝や汉鍛樻槸鍚﹀彲淇濇寔
+      dialogFormRules: {
+        outuser: [
+          { required: true, message: '璇烽�夋嫨鍙戞枡浜哄憳', trigger: ['blur', 'change'] }
+        ],
+        fqty: [
+          { required: true, message: '璇疯緭鍏ュ彂鏂欐暟閲�', trigger: ['blur', 'change'] }
+        ],
+        wxcode: [
+          { required: true, message: '璇烽�夋嫨澶栧崗渚涙柟', trigger: ['blur', 'change'] }
+        ],
+        inuser: [
+          { required: true, message: '璇烽�夋嫨鏀舵枡浜哄憳', trigger: ['blur', 'change'] }
+        ],
+        sqty: [
+          { required: true, message: '璇疯緭鍏ユ敹鏂欐暟閲�', trigger: ['blur', 'change'] }
+        ],
+        // noputqty: [
+        //   { required: true, message: '璇疯緭鍏ヤ笉鑹暟閲�', trigger: ['blur', 'change'] }
+        // ],
+        // badcode: [
+        //   { required: true, message: '璇烽�夋嫨涓嶈壇鍘熷洜', trigger: ['blur', 'change'] }
+        // ]
+        eqpcode: [
+          { required: true, message: '璇烽�夋嫨鐢熶骇璁惧', trigger: ['blur', 'change'] }
+        ],
+        usergroupcode: [
+          { required: true, message: '璇烽�夋嫨鐢熶骇鐝粍', trigger: ['blur', 'change'] }
+        ],
+        startqty: [
+          { required: true, message: '璇疯緭鍏ユ姤宸ユ暟閲�', trigger: ['blur', 'change'] }
+        ]
+      },
+      activeName: '',
+      dialogVisible2: false,
+      printObj2: {
+        id: 'printMe2',
+        popTitle: '鎵撳嵃妯℃澘',
+        preview: false,
+        extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
+        closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
+          console.log('11212', vue)
+          // vue.dialogVisible = false
+          vue.dialogVisible2 = false
+          vue.dialogVisible = false
+        },
+        beforeOpenCallback(vue) {
+          vue.printLoading = true
+          console.log('鎵撳紑涔嬪墠')
+          console.log()
+        },
+        openCallback(vue) {
+          vue.printLoading = false
+          console.log('鎵ц浜嗘墦鍗�')
+        }
+      },
+      qrForm: { // 鎵撳嵃鍐呭
+        qrvalue: '',
+        startqty: '',
+        wo_code: '',
+        partcode: '',
+        partname: '',
+        nextstepname: '',
+        operator: '', // 鎿嶄綔浜�
+        operatorTime: ''// 鎿嶄綔鏃堕棿
+      },
+      badForm: {
+        orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜
+        prop: 'wo_code',
+        order: 'asc',
+        page: 1,
+        rows: 20
+      },
+      badTableData: [], // 涓嶈壇澶勭悊鍒楄〃table鏁版嵁
+      badTotal: 0,
+      badDialogVisible: false,
+      badDialogForm: {
+        operation: getCookie('navTabId')
+      },
+      badTableDataDialog: [], // 涓嶈壇瀵硅瘽妗唗able琛ㄦ牸
+      OperationArr: [], // 浜哄憳鏁扮粍
+      sendButtonIsDisabled: false // 涓嬭揪鎸夐挳鏄惁鍙偣鍑�
+    }
+  },
+  watch: {
+    'form.orderstepqrcode': {
+      handler(newValue) {
+        this.form.orderstepqrcode = newValue
+
+        // 鍦ㄨ繖閲岃皟鐢紝骞舵墽琛宼his.fnThrottle(this.search, 500, 2000)();
+        this.fnThrottle(this.enterNative, 500, 2000, 'produceCode')()
+      }
+    },
+    'WXform.orderstepqrcode': {
+      handler(newValue) {
+        this.form.orderstepqrcode = newValue
+
+        // 鍦ㄨ繖閲岃皟鐢紝骞舵墽琛宼his.fnThrottle(this.search, 500, 2000)();
+        this.fnThrottle(this.enterNative, 500, 2000, 'WXproduceCode')()
+      }
+    },
+    'badForm.orderstepqrcode': {
+      handler(newValue) {
+        this.form.orderstepqrcode = newValue
+
+        // 鍦ㄨ繖閲岃皟鐢紝骞舵墽琛宼his.fnThrottle(this.search, 500, 2000)();
+        this.fnThrottle(this.enterNative, 500, 2000, 'badProduceCode')()
+      }
+    }
+  },
+  // computed: {
+  //   qrLink: function() {
+  //     return this.$store.getters.getPreviewUrl
+  //   }
+  // },
+  // watch: {
+  //   qrLink: function(newVal, oldNew) {
+  //     if (newVal !== oldNew) {
+  //       this.$nextTick(() => {
+  //         this.bindQRCode(newVal)
+  //       })
+  //     }
+  //   }
+  // },
+  created() {
+    this.getMesOrderStepSearch()
+    this.tabClick()
+  },
+  mounted() {
+    window.addEventListener('resize', this.getHeight)
+    this.getHeight()
+
+    this.$nextTick(() => {
+      $("input[name='produceCode']")[0].focus()
+      // this.bindQRCode('10001;001')
+    })
+    // webapp_urlprotocol_startup()
+    // webapp_ws_autoupdate(true)
+
+    this.getMesOrderSelectUserAll() // 鑾峰彇鎵�鏈変汉鍛�
+  },
+  methods: {
+    // 闃叉姈      //鎵爜鐢ㄧ殑鏄槻鎶�
+    fnThrottle(method, delay, duration, belong) {
+      var that = this
+      var timer = this.timer
+      var begin = new Date().getTime()
+      return function() {
+        var current = new Date().getTime()
+        clearTimeout(timer)
+        if (current - begin >= duration) {
+          // method()
+          // that.VALUE()
+          begin = current
+        } else {
+          that.timer = setTimeout(function() {
+            // method()
+            if (belong === 'produceCode') {
+              that.enterNative(that.form.orderstepqrcode, belong)
+            }
+            if (belong === 'WXproduceCode') {
+              that.enterNative(that.WXform.orderstepqrcode, belong)
+            }
+            if (belong === 'badProduceCode') {
+              that.enterNative(that.badForm.orderstepqrcode, belong)
+            }
+          }, delay)
+        }
+      }
+    },
+    tableRowClassName({ row, rowIndex }) {
+      return 'custom-row'
+    },
+    async getMesOrderStepSearch() {
+      const res = await MesOrderStepSearch(this.form)
+      if (res.code === '200') {
+        this.tableData = res.data
+        this.total = res.count
+      }
+    },
+    async getMesOrderWxStepSearch() {
+      const res = await MesOrderWxStepSearch(this.WXform)
+      if (res.code === '200') {
+        this.WXtableData = res.data
+      }
+    },
+    // 鎺掑簭鏀瑰彉鏃�
+    sortChange({ column, prop, order }) {
+      if (order === 'descending') {
+        order = 'desc'
+      } else if (order === 'ascending') {
+        order = 'asc'
+      } else {
+        order = 'desc'
+      }
+      this.form.order = order
+      this.form.prop = prop
+      this.getMesOrderStepSearch()
+    },
+    // WX鎺掑簭鏀瑰彉鏃�
+    WXsortChange({ column, prop, order }) {
+      if (order === 'descending') {
+        order = 'desc'
+      } else if (order === 'ascending') {
+        order = 'asc'
+      } else {
+        order = 'desc'
+      }
+      this.WXform.order = order
+      this.WXform.prop = prop
+      this.getMesOrderWxStepSearch()
+    },
+    badSortChange({ column, prop, order }) {
+      if (order === 'descending') {
+        order = 'desc'
+      } else if (order === 'ascending') {
+        order = 'asc'
+      } else {
+        order = 'desc'
+      }
+      this.badForm.order = order
+      this.badForm.prop = prop
+      this.getBadList()
+    },
+    // 鑷埗椤电鍘熺偣鐐瑰嚮
+    getCurrentRow(val) {
+
+    },
+    // 澶栧崗椤电鍘熺偣鐐瑰嚮
+    getWXCurrentRow(val) {
+      console.log(val)
+      this.WXradioSelected = val
+    },
+    // tab鎸夐挳鍒囨崲榧犳爣鑷姩鑱氱劍
+    tabClick(val, d) {
+      if (this.$refs.elTabs.currentName === '0') {
+        this.$nextTick(() => {
+          this.getMesOrderStepSearch()
+          $("input[name='produceCode']")[0].focus()
+          this.WXform.orderstepqrcode = ''
+        })
+      }
+      if (this.$refs.elTabs.currentName === '1') {
+        this.$nextTick(() => {
+          this.getMesOrderWxStepSearch()
+          $("input[name='WXproduceCode']")[0].focus()
+          this.form.orderstepqrcode = ''
+        })
+      }
+      if (this.$refs.elTabs.currentName === '2') {
+        this.$nextTick(() => {
+          this.getBadList()
+          $("input[name='badProduceCode']")[0].focus()
+          this.badForm.orderstepqrcode = ''
+        })
+      }
+    },
+    // 鎵爜閿洏鍥炶溅浜嬩欢
+    async enterNative(val, belong) {
+      console.log(val, belong)
+      // 寮�宸ワ細code="200"  count=0
+      // 鎶ュ伐锛歝ode="200"  count=1
+      // 鍙戞枡锛歝ode="200"  count=2
+      // 鏀舵枡锛歝ode="200"  count=3
+      // 璧板垪琛ㄥ舰寮� code="200"  count=4
+      if (belong === 'produceCode') {
+        const orderstepqrcode = this.form.orderstepqrcode
+        const data = {
+          OperType: 'ZZ',
+          orderstepqrcode: orderstepqrcode,
+          SelectType: ''
+        }
+        const res = await MesOrderStepStart(data)
+        if (res.code === '200' && res.count === 0) {
+          await this.ZZstart(res.data)
+        }
+        if (res.code === '200' && res.count === 1) {
+          await this.ZZreport(res.data)
+        }
+      }
+      if (belong === 'WXproduceCode') {
+        const orderstepqrcode = this.WXform.orderstepqrcode
+        const data = {
+          OperType: 'WX',
+          orderstepqrcode: orderstepqrcode,
+          SelectType: this.WXSelected// OUT銆両N
+        }
+        const res = await MesOrderStepStart(data)
+        if (res.code === '200' && res.count === 2) {
+          await this.WXsend(res.data)
+        }
+        if (res.code === '200' && res.count === 3) {
+          await this.WXback(res.data)
+        }
+      }
+
+      if (belong === 'badProduceCode') {
+        // this.badForm.orderstepqrcode=
+        await this.getBadList()
+        await this.repairHandle(this.badForm.orderstepqrcode)
+        this.badDialogVisible = true
+      }
+    },
+    // 鏌ヨ
+    search() {
+      this.getMesOrderStepSearch()
+    },
+    // 鑷埗寮�濮�
+    async ZZstart(obj) {
+      // if (!this.ZZisExecutable) {
+      //   return this.$message.info('璇峰厛鎵爜宸ュ簭浜岀淮鐮侊紒')
+      // }
+      this.dialogTitle = '鑷埗寮�濮�'
+      this.dialogVisible = true
+
+      this.$nextTick(() => {
+        this.dialogForm.wo_code = obj.wo_code
+        this.dialogForm.partcode = obj.partnumber
+        this.dialogForm.partname = obj.partname
+        this.dialogForm.partspec = obj.partspec
+        this.dialogForm.stepseq = obj.seq
+        this.dialogForm.stepcode = obj.stepcode
+        this.dialogForm.stepname = obj.stepname
+        this.dialogForm.stepdesc = obj.stepdesc
+        this.dialogForm.planqty = obj.planqty
+        this.dialogForm.reportqty = obj.reportqty
+        this.dialogForm.noreportqty = obj.noreportqty
+        // this.dialogForm.startqty = obj.startqty
+        this.dialogForm.startqty = obj.noreportqty
+      })
+
+      await this.getMesOrderStepStartSelectEqp()
+    },
+    // 鑷埗鎶ュ伐
+    async ZZreport(obj) {
+      // if (!this.ZZisExecutable) {
+      //   return this.$message.info('璇峰厛鎵爜宸ュ簭浜岀淮鐮侊紒')
+      // }
+      this.dialogTitle = '鑷埗鎶ュ伐'
+      this.dialogVisible = true
+
+      this.$nextTick(() => {
+        this.dialogForm.wo_code = obj.wo_code
+        this.dialogForm.partcode = obj.partnumber
+        this.dialogForm.partname = obj.partname
+        this.dialogForm.partspec = obj.partspec
+        this.dialogForm.stepseq = obj.seq
+        this.dialogForm.stepcode = obj.stepcode
+        this.dialogForm.stepname = obj.stepname
+        this.dialogForm.stepdesc = obj.stepdesc
+        this.dialogForm.planqty = obj.planqty
+        this.dialogForm.reportqty = obj.reportqty
+        this.dialogForm.noputqty = obj.noputqty
+        this.dialogForm.noreportqty = obj.noreportqty
+        // this.dialogForm.startqty = obj.startqty
+        this.dialogForm.startqty = obj.noreportqty
+
+        this.dialogForm.nextstepname = obj.nextstepname
+        this.dialogForm.nextstepcode = obj.nextstepcode
+
+        this.dialogForm.startqtySum = obj.noreportqty
+      })
+
+      await this.getMesOrderStepStartSelectEqp()
+      await this.getMesOrderStepReportSelectUserGroup()
+      await this.getMesOrderStepSelectCause('ZZ')
+      await this.getMesOrderSelectUserZZ()
+    },
+    // 澶栧崗鍙戞枡
+    async WXsend(obj) {
+      // if (this.WXradioSelected.length < 1 && obj.length < 1) {
+      //   return this.$message.info('璇峰厛閫夋嫨宸ュ簭锛�')
+      // }
+      // console.log(this.WXform.orderstepqrcode === '', 6)
+      // if (this.WXform.orderstepqrcode === '') {
+      //   return this.$message.info('璇峰厛杈撳叆宸ュ簭锛�')
+      // }
+      this.dialogTitle = '澶栧崗鍙戞枡'
+      this.dialogVisible = true
+
+      this.$nextTick(() => {
+        this.dialogForm.wo_code = obj.wo_code
+        this.dialogForm.partcode = obj.partnumber
+        this.dialogForm.partname = obj.partname
+        this.dialogForm.partspec = obj.partspec
+        this.dialogForm.stepname = obj.stepname
+        this.dialogForm.stepdesc = obj.stepdesc
+        this.dialogForm.planqty = obj.planqty
+        this.dialogForm.reportqty = obj.reportqty
+        this.dialogForm.noreportqty = obj.noreportqty
+        this.dialogForm.fqty = obj.startqty
+        this.dialogForm.stepcode = obj.stepcode
+        this.dialogForm.stepseq = obj.seq
+      })
+
+      await this.getMesOrderStepSelectWX()
+      await this.getMesOrderSelectUser()
+    },
+    // 澶栧崗鏀舵枡
+    async WXback(obj) {
+      // if (this.WXform.orderstepqrcode === '') {
+      //   return this.$message.info('璇峰厛杈撳叆宸ュ簭锛�')
+      // }
+      this.dialogTitle = '澶栧崗鏀舵枡'
+      this.dialogVisible = true
+
+      this.$nextTick(() => {
+        this.dialogForm.wo_code = obj.wo_code
+        this.dialogForm.partcode = obj.partnumber
+        this.dialogForm.partname = obj.partname
+        this.dialogForm.partspec = obj.partspec
+        this.dialogForm.stepname = obj.stepname
+        this.dialogForm.stepdesc = obj.stepdesc
+        this.dialogForm.planqty = obj.planqty
+        this.dialogForm.reportqty = obj.reportqty
+        this.dialogForm.noreportqty = obj.noreportqty
+        this.dialogForm.stepcode = obj.stepcode
+
+        this.dialogForm.nextstepname = obj.nextstepname
+        this.dialogForm.nextstepcode = obj.nextstepcode
+
+        this.dialogForm.noputqty = obj.noputqty
+        this.dialogForm.stepseq = obj.seq
+        this.dialogForm.sqty = obj.startqty
+
+        this.dialogForm.startqtySum = obj.startqty
+      })
+      await this.getMesOrderStepSelectWX()
+      await this.getMesOrderSelectUser()
+      await this.getMesOrderStepSelectCause('WX')
+    },
+    // 鐢熶骇鐝粍涓嬫媺鏀瑰彉
+    usergroupChange(val) {
+      this.dialogForm.usergroupcode = val
+      this.getMesOrderSelectUserZZ2()
+    },
+    // 鑾峰彇鑷埗鎶ュ伐鐢熶骇鐝粍涓嬫媺鍒楄〃
+    async getMesOrderStepReportSelectUserGroup() {
+      const { data: res } = await MesOrderStepReportSelectUserGroup()
+      this.ZZtreams = res
+    },
+    // 鑾峰彇鑷埗鎶ュ伐琛ㄦ牸user鎵�鏈�
+    async getMesOrderSelectUserZZ() {
+      const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.usergroupcode })
+      this.ZZuserArr = res
+    },
+    async getMesOrderSelectUserZZ2() {
+      const { data: res } = await MesOrderSelectUser({ usercode: '' })
+      this.ZZuserArr = res
+      await this.getUserTableData()
+    },
+    // 鑾峰彇鑷埗鐢熶骇璁惧涓嬫媺
+    async getMesOrderStepStartSelectEqp() {
+      const { data: res } = await MesOrderStepStartSelectEqp({ orderstepqrcode: this.form.orderstepqrcode })
+      this.ZZeqpArr = res
+    },
+    // 鑾峰彇WX渚涙柟鎺ュ彛
+    async getMesOrderStepSelectWX() {
+      const { data: res } = await MesOrderStepSelectWX({ orderstepqrcode: this.WXform.orderstepqrcode })
+      this.WXouterprovide = res
+    },
+    // 鑾峰彇鏀跺彂鏂欎汉鍛樹笅鎷夋帴鍙�
+    async getMesOrderSelectUser() {
+      const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.outuser })
+      this.WXoutuser = res
+    },
+    // 鑾峰彇鏀舵枡涓嶈壇鍘熷洜涓嬫媺
+    async getMesOrderStepSelectCause(val) {
+      let orderstepqrcode = ''
+      if (val === 'WX') {
+        orderstepqrcode = this.WXform.orderstepqrcode
+      }
+      if (val === 'ZZ') {
+        orderstepqrcode = this.form.orderstepqrcode
+      }
+      const { data: res } = await MesOrderStepSelectCause({ orderstepqrcode: orderstepqrcode })
+      this.badArr = res
+    },
+    // 鎶ュ伐鏌ヨ鐢ㄦ埛琛�
+    async getUserTableData() {
+      const { data: res } = await MesOrderGroupSelectUser({ usergroupcode: this.dialogForm.usergroupcode })
+      this.userTableData = res
+      this.userTableData.forEach(item => {
+        let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+        number = number === 0 ? (10 + Math.random()) : number
+        item.isVisible = 0
+        item.number = number
+      })
+
+      this.ZZuserArr = [...this.ZZuserArr].filter(x => [...this.userTableData].every(y => y.usercode !== x.usercode))
+    },
+    // 鐢ㄦ埛娣诲姞
+    userAdd() {
+      let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+      number = number === 0 ? (10 + Math.random()) : number
+      console.log(this.userTableData, 6)
+      this.userTableData.unshift({ usercode: '', username: '', isVisible: 1, number: number })
+    },
+    // 鐢ㄦ埛鍒楄〃鍒犻櫎
+    userDel(row) {
+      this.ZZuserArr.splice(0, 0, {
+        usercode: row.usercode,
+        username: row.username
+      })
+
+      this.userTableData.forEach((item, index) => {
+        if (item.number === row.number) {
+          this.userTableData.splice(index, 1)
+        }
+      })
+    },
+    // 鐢ㄦ埛鍒楄〃淇濆瓨
+    userSave(row) {
+      console.log(row, 123)
+      if (row.usercode === '') {
+        return this.$message.info('浜哄憳鍚嶇О涓嶈兘涓虹┖锛�')
+      }
+
+      this.ZZuserArr.forEach((item, index) => {
+        if (item.usercode === row.usercode) {
+          this.ZZuserArr.splice(index, 1)
+        }
+      })
+
+      this.userTableData.forEach(item => {
+        if (item.number === row.number) {
+          item.isVisible = 0
+        }
+      })
+    },
+    // 鐢ㄦ埛鍒楄〃鍙栨秷
+    userCancel(row) {
+      this.userTableData.forEach((item, index) => {
+        if (item.number === row.number) {
+          this.userTableData.splice(index, 1)
+        }
+      })
+    },
+    // 鐢ㄦ埛鍒楄〃浜哄憳鍚嶇О鍊奸�変腑
+    usernameChange(val, row) {
+      this.userTableData.forEach(item => {
+        if (item.usercode === val) {
+          this.userIsSave = true
+          return this.$message.info('姝や汉鍛樺凡鍦ㄥ垪涓紒')
+        }
+        if (item.number === row.number) {
+          this.userIsSave = false
+          item.usercode = val
+          item.username = this.ZZuserArr.find(item => item.usercode === val).username
+        }
+      })
+    },
+    // 瀵硅瘽妗嗗叧闂簨浠�
+    handleClose() {
+      this.form.orderstepqrcode = ''
+      this.WXform.orderstepqrcode = ''
+      this.badForm.orderstepqrcode = ''
+
+      this.dialogForm.wo_code = '', // 宸ュ崟缂栧彿
+      this.dialogForm.partcode = '', // 浜у搧缂栫爜
+      this.dialogForm.partname = '', // 浜у搧鍚嶇О
+      this.dialogForm.partspec = '', // 浜у搧瑙勬牸
+      this.dialogForm.stepseq = '', // 宸ュ簭搴忓彿
+      this.dialogForm.stepcode = '', // 宸ュ簭缂栫爜
+      this.dialogForm.stepname = '', // 褰撳墠宸ュ簭鍚�
+      this.dialogForm.nextstepname = '', // 涓嬩竴閬撳伐搴忓悕
+      this.dialogForm.stepdesc = '', // 宸ュ簭鎻忚堪
+      this.dialogForm.planqty = '', // 浠诲姟鏁伴噺
+      this.dialogForm.reportqty = '', // 宸叉姤鏁伴噺
+      this.dialogForm.noreportqty = '', // 鏈姤鏁伴噺
+      this.dialogForm.startqty = '', // 寮�(鎶�)宸ユ暟閲�
+
+      this.dialogForm.wxcode = '', // 澶栧崗渚涘簲鍟嗙紪鐮�
+      this.dialogForm.outuser = '', // 鍙戞枡浜哄憳
+      this.dialogForm.taskqty = '', // 浠诲姟鏁伴噺
+      this.dialogForm.fqty = '', // 鍙戞枡鏁伴噺
+
+      this.dialogForm.inuser = '', // 鏀舵枡浜哄憳
+      this.dialogForm.sqty = '', // 鏀舵枡鏁伴噺
+      this.dialogForm.ngqty = '', // 涓嶈壇鏁伴噺
+      this.dialogForm.badcode = '', // 涓嶈壇鍘熷洜缂栫爜
+
+      this.dialogForm.noputqty = '', // 涓嶈壇鏁伴噺
+
+      this.dialogForm.eqpcode = '', // 鐢熶骇璁惧缂栫爜
+
+      this.dialogForm.usergroupcode = '', // 鐝粍缂栫爜
+      this.dialogForm.reportuser = '', // 鎶ュ伐浜哄憳
+
+      this.dialogForm.startqtySum = '' // 涓嶈兘瓒呰繃鐨勬暟鍊�
+
+      this.dialogForm.nextstepcode = '' // 涓嬮亾宸ュ簭缂栫爜
+
+      this.dialogForm.remarks = '' // 澶囨敞
+      this.dialogForm.operation = getCookie('navTabId') // 鎶ュ伐浜猴紙鏀舵枡浜猴級
+      this.userTableData = [] // 浜哄憳鍒楄〃
+
+      this.$refs.dialogForm.clearValidate()
+    },
+    // 瀵硅瘽妗嗗彇娑�
+    dialogVisibleCancel() {
+      this.dialogVisible = false
+      this.tabClick()
+    },
+    // 瀵硅瘽妗嗙‘璁�
+    dialogVisibleConfirm() {
+      this.$refs.dialogForm.validate(valid => {
+        if (valid) {
+          if (this.dialogTitle === '澶栧崗鍙戞枡') {
+            if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
+              return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
+            }
+            const data = {
+              mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+              partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+              stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿   鏆傛椂缂�
+              stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+              wxcode: this.dialogForm.wxcode, // 澶栧崗渚涘簲鍟嗙紪鐮�
+              outuser: this.dialogForm.outuser, // 鍙戞枡浜哄憳
+              taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+              fqty: this.dialogForm.fqty // 鍙戞枡鏁伴噺
+            }
+            SavaMesOrderStepOut(data).then(res => {
+              if (res.code === '200') {
+                this.$message.success('鍙戞枡鎴愬姛锛�')
+                this.dialogVisible = false
+                this.tabClick()
+              } else {
+                this.$message.error('鍙戞枡澶辫触!')
+              }
+            })
+          }
+
+          if (this.dialogTitle === '澶栧崗鏀舵枡') {
+            if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
+              return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈敹鏁伴噺!')
+            }
+
+            if (parseFloat(this.dialogForm.noputqty) > 0) {
+              if (this.dialogForm.badcode.length < 1) {
+                return this.$message.info('璇烽�夋嫨涓嶈壇鍘熷洜锛�')
+              }
+            }
+
+            const data = {
+              mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+              partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+              stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿
+              stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+              wxcode: this.dialogForm.wxcode, // 澶栧崗渚涘簲鍟嗙紪鐮�
+              inuser: this.dialogForm.inuser, // 鍙戞枡浜哄憳
+              taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+              sqty: this.dialogForm.sqty, // 鏀舵枡鏁伴噺
+              remarks: this.dialogForm.remarks, // 澶囨敞
+              ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
+              badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
+            }
+            SavaMesOrderStepIn(data).then(res => {
+              if (res.code === '200') {
+                this.$message.success('鏀舵枡鎴愬姛锛�')
+
+                if (this.dialogForm.nextstepcode === '') {
+                  this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
+                  this.dialogVisible2 = true
+                }
+                this.dialogVisible = false
+                this.tabClick()
+              } else {
+                this.$message.error('鏀舵枡澶辫触!')
+              }
+            })
+          }
+
+          if (this.dialogTitle === '鑷埗寮�濮�') {
+            const data = {
+              mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+              partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+              stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿   鏆傛椂缂�
+              stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+              eqpcode: this.dialogForm.eqpcode, // 鐢熶骇璁惧
+              taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+              startqty: this.dialogForm.startqty// 寮�濮嬫暟閲�
+            }
+            SavaMesOrderStepStart(data).then(res => {
+              if (res.code === '200') {
+                this.$message.success('寮�宸ユ垚鍔燂紒')
+                this.dialogVisible = false
+                this.tabClick()
+              } else {
+                this.$message.error('寮�宸ュけ璐�!')
+              }
+            })
+          }
+
+          if (this.dialogTitle === '鑷埗鎶ュ伐') {
+            if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) {
+              return this.$message.info('鎶ュ伐鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈姤鏁伴噺!')
+            }
+            if (this.userTableData.length < 1) {
+              return this.$message.info('浜哄憳鍒楄〃涓嶈兘涓虹┖!')
+            }
+
+            if (parseFloat(this.dialogForm.noputqty) > 0) {
+              if (this.dialogForm.badcode.length < 1) {
+                return this.$message.info('璇烽�夋嫨涓嶈壇鍘熷洜锛�')
+              }
+            }
+            // this.userTableData = [...new Set(this.userTableData)]// 鏁扮粍鍘婚噸
+            this.userTableData = this.userTableData.filter(item => item.usercode !== '')
+            // 鏁扮粍涓璞$浉鍚岀殑鍘婚噸
+            this.userTableData = this.userTableData.filter((currentValue, currentIndex, selfArr) => {
+              return selfArr.findIndex(item => item.usercode === currentValue.usercode) === currentIndex
+            })
+            // console.log(this.userTableData, 1)
+            const reportuser = this.userTableData.map(item => item.usercode).join(';')
+            const data = {
+              mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
+              partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
+              stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿
+              stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
+              eqpcode: this.dialogForm.eqpcode, // 璁惧缂栫爜
+              usergroupcode: this.dialogForm.usergroupcode, // 鐝粍缂栫爜
+              reportuser: reportuser, // 鎶ュ伐浜哄憳
+              taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
+              // startqty: this.dialogForm.startqty, // 寮�宸ユ暟閲�
+              startqty: this.dialogForm.reportqty, // 寮�宸ユ暟閲�
+              // reportqty: this.dialogForm.reportqty, // 鎶ュ伐鏁伴噺
+              reportqty: this.dialogForm.startqty, // 鎶ュ伐鏁伴噺
+              remarks: this.dialogForm.remarks, // 澶囨敞
+              ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
+              badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
+            }
+
+            SavaMesOrderStepReport(data).then(res => {
+              if (res.code === '200') {
+                this.$message.success('鎶ュ伐鎴愬姛锛�')
+
+                if (this.dialogForm.nextstepcode === '') {
+                  this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
+                  this.dialogVisible2 = true
+                }
+                this.dialogVisible = false
+                this.tabClick()
+              } else {
+                this.$message.error('鎶ュ伐澶辫触!')
+              }
+            })
+          }
+        }
+      })
+    },
+    // 鐢熸垚浜岀淮鐮�
+    bindQRCode(text) {
+      new QRCode(this.$refs.qrCodeDiv2, {
+        text: text,
+        // width: 50,
+        width: 60,
+        // height: 50,
+        height: 60,
+        colorDark: '#000', // 浜岀淮鐮侀鑹�
+        colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+        correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+      })
+    },
+    ZZprint2(username) {
+      this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+      this.qrForm.startqty = this.dialogForm.startqty
+      this.qrForm.wo_code = this.dialogForm.wo_code
+      this.qrForm.partcode = this.dialogForm.partcode
+      this.qrForm.partname = this.dialogForm.partname
+      this.qrForm.nextstepname = this.dialogForm.nextstepname
+      this.qrForm.operator = username
+      this.qrForm.operatorTime = handleDatetime2(new Date())
+      this.$nextTick(() => {
+        this.bindQRCode(this.qrForm.qrvalue)
+      })
+    },
+    WXprint2(username) {
+      this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
+      this.qrForm.startqty = this.dialogForm.sqty
+      this.qrForm.wo_code = this.dialogForm.wo_code
+      this.qrForm.partcode = this.dialogForm.partcode
+      this.qrForm.partname = this.dialogForm.partname
+      this.qrForm.nextstepname = this.dialogForm.nextstepname
+      this.qrForm.operator = username
+      this.qrForm.operatorTime = handleDatetime2(new Date())
+      this.$nextTick(() => {
+        this.bindQRCode(this.qrForm.qrvalue)
+      })
+    },
+    dialogVisible2Close() {
+      this.qrForm.qrvalue = ''
+      this.qrForm.startqty = ''
+      this.qrForm.wo_code = ''
+      this.qrForm.partcode = ''
+      this.qrForm.partname = ''
+      this.qrForm.nextstepname = ''
+      this.qrForm.operator = ''
+      this.qrForm.operatorTime = ''
+      // this.$refs.qrCodeDiv2 = ''
+    },
+
+    // 鑾峰彇椤甸潰楂樺害
+    getHeight() {
+      this.$nextTick(() => {
+        this.mainHeight = window.innerHeight - 85
+        this.tableHeight = this.mainHeight - 220
+        this.isIpad = window.innerHeight < 769
+        if (window.innerHeight < 769) {
+          this.tableHeight = this.tableHeight - 50
+        }
+      })
+    },
+
+    // 鑾峰彇涓嶈壇澶勭悊鍒楄〃
+    async getBadList() {
+      const res = await MesOrderNgStepSearch(this.badForm)
+      this.badTableData = res.data
+      this.badTotal = res.count
+    },
+    badDialogVisibleCancel() {
+      this.badDialogVisible = false
+    },
+    badDialogVisibleConfirm() {
+      const data = {
+        Data: this.badTableDataDialog
+      }
+      EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => {
+        if (res.code === '200' || res.code === '301') {
+          this.getBadList()
+          this.badDialogVisible = false
+          this.badPrint(this.OperationArr.find(item => item.usercode === this.badDialogForm.operation).username)
+          this.dialogVisible2 = true
+          return this.$message.success('淇濆瓨鎴愬姛锛�')
+        }
+      })
+    },
+    badPrint(username) {
+      this.qrForm.qrvalue = this.badDialogForm.wo_code + ';' + this.badDialogForm.nextstepcode
+      this.qrForm.startqty = this.badDialogForm.plan_qty
+      this.qrForm.wo_code = this.badDialogForm.wo_code
+      this.qrForm.partcode = this.badDialogForm.partcode
+      this.qrForm.partname = this.badDialogForm.partname
+      this.qrForm.nextstepname = this.badDialogForm.nextstepname
+      this.qrForm.operator = username
+      this.qrForm.operatorTime = handleDatetime2(new Date())
+      console.log(this.qrForm, 22)
+      this.$nextTick(() => {
+        this.bindQRCode(this.qrForm.qrvalue)
+      })
+    },
+
+    handleCloseBad() {
+      this.badDialogForm = {}
+      this.badDialogForm.operation = getCookie('navTabId')
+      this.badTableDataDialog = []
+    },
+    async  getMesOrderSelectUserAll() {
+      const { data: res } = await MesOrderSelectUser({ usercode: '' })
+      this.OperationArr = res
+    },
+    // 鐐瑰嚮缁翠慨澶勭悊鎸夐挳  鎴�  鎵弿鏉$爜鐨勬壂鎻忓洖杞︿簨浠�
+    async repairHandle(row) {
+      let data
+      if (row.wo_code) {
+        data = {
+          orderstepqrcode: row.wo_code + ';' + row.stepcode
+        }
+      } else {
+        data = {
+          orderstepqrcode: row
+        }
+      }
+
+      const { data: res } = await MesOrderNgSubStepSearch(data)
+
+      this.$nextTick(() => {
+        this.badDialogForm.wo_code = res.data1.wo_code
+        this.badDialogForm.partcode = res.data1.partnumber
+        this.badDialogForm.partname = res.data1.partname
+        this.badDialogForm.partspec = res.data1.partspec
+        this.badDialogForm.stepname = res.data1.stepname
+        this.badDialogForm.nextstepcode = res.data1.nextstepcode
+        this.badDialogForm.nextstepname = res.data1.nextstepname
+        this.badDialogForm.plan_qty = res.data1.planqty
+        this.badDialogForm.good_qty = res.data1.noreportqty // 鎶ュ伐鏁伴噺
+        this.badDialogForm.ng_qty = res.data1.noputqty // 涓嶈壇鏁伴噺
+
+        this.badTableDataDialog = res.data2
+
+        this.badTableDataDialog.forEach(item => {
+          item.repair_qty = 0
+          item.bad_qty = 0
+          item.isVisible = 0
+          // item.defect_code = [...new Set(item.defect_code.split(','))].join(',')
+          // item.defect_name = [...new Set(item.defect_name.split(','))].join(',')
+        })
+        console.log(this.badTableDataDialog, 321)
+        this.badDialogVisible = true
+      })
+    },
+    badEdit(row) {
+      console.log(row)
+      this.badTableDataDialog.forEach((item, index) => {
+        if (item.id === row.id && item.m_id === row.m_id) {
+          this.badTableDataDialog.splice(index, 1, {
+            bad_qty: row.bad_qty,
+            repair_qty: row.repair_qty,
+            isVisible: 1,
+            defect_code: row.defect_code,
+            defect_name: row.defect_name,
+            badqty: row.badqty,
+            id: row.id,
+            m_id: row.m_id,
+            materiel_code: row.materiel_code,
+            ng_qty: row.ng_qty,
+            plan_qty: row.plan_qty,
+            report_qty: row.report_qty,
+            seq: row.seq,
+            step_code: row.step_code,
+            stepname: row.stepname,
+            style: row.style,
+            wo_code: row.wo_code
+          })
+        }
+      })
+    },
+    badSave(row) {
+      if (parseFloat(row.bad_qty) + parseFloat(row.repair_qty) > parseFloat(row.ng_qty)) {
+        this.badCancel(row)
+        return this.$message.info('缁翠慨鏁伴噺涓庢姤搴熸暟閲忎箣鍜屼笉鑳藉ぇ浜庝笉鑹暟閲忥紒')
+      }
+      this.badTableDataDialog.forEach((item, index) => {
+        if (item.id === row.id && item.m_id === row.m_id) {
+          this.badTableDataDialog.splice(index, 1, {
+            bad_qty: parseFloat(row.bad_qty),
+            repair_qty: parseFloat(row.repair_qty),
+            isVisible: 0,
+            defect_code: row.defect_code,
+            defect_name: row.defect_name,
+            id: row.id,
+            m_id: row.m_id,
+            badqty: row.badqty,
+            materiel_code: row.materiel_code,
+            ng_qty: row.ng_qty,
+            plan_qty: row.plan_qty,
+            report_qty: row.report_qty,
+            seq: row.seq,
+            step_code: row.step_code,
+            stepname: row.stepname,
+            style: row.style,
+            wo_code: row.wo_code
+          })
+        }
+      })
+    },
+    badCancel(row) {
+      this.badTableDataDialog.forEach((item, index) => {
+        if (item.id === row.id && item.m_id === row.m_id) {
+          this.badTableDataDialog.splice(index, 1, {
+            // bad_qty: row.bad_qty,
+            // repair_qty: row.repair_qty,
+            bad_qty: 0,
+            repair_qty: 0,
+            isVisible: 0,
+            defect_code: row.defect_code,
+            defect_name: row.defect_name,
+            id: row.id,
+            m_id: row.m_id,
+            badqty: row.badqty,
+            materiel_code: row.materiel_code,
+            ng_qty: row.ng_qty,
+            plan_qty: row.plan_qty,
+            report_qty: row.report_qty,
+            seq: row.seq,
+            step_code: row.step_code,
+            stepname: row.stepname,
+            style: row.style,
+            wo_code: row.wo_code
+          })
+        }
+      })
+    },
+
+    badDel(row) {
+      this.badTableDataDialog.forEach((item, index) => {
+        if (item.id === row.id && item.m_id === row.m_id) {
+          this.badTableDataDialog.splice(index, 1)
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+$main_color: #42b983;
+.el-button--text {
+  font-size: 14px;
+  cursor: pointer;
+}
+
+.operationClass {
+  height: 23px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
+  margin: 10px 30px 0px 0;
+}
+
+::v-deep .el-radio__input.is-checked + .el-radio__label {
+  color: $main_color;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+  margin: 10px 30px 0px 0;
+}
+
+//.dialogVisible{
+::v-deep .el-select .el-input .el-select__caret {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+//}
+.elTableDiv {
+  ::v-deep .el-radio__label {
+    display: none;
+  }
+}
+</style>
+<style media="print">
+/*@media print {*/
+@page {
+  size: auto;
+  margin: 3mm;
+  font-size: 10px;
+}
+
+</style>
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+::v-deep .el-button--text {
+  font-size: 14px;
+  cursor: pointer;
+}
+
+.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
+  color: $main_color;
+  cursor: pointer;
+}
+
+.el-icon-edit-outline {
+  margin-right: 15px;
+}
+
+::v-deep .el-button--primary, .el-button--default, .el-button--info {
+  height: 34px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+}
+
+::v-deep .el-button--primary {
+  //background-color: $main_color !important;
+}
+
+::v-deep .el-button--default {
+  background-color: #f8f8fa;
+  border: none;
+}
+
+::v-deep .el-input__inner {
+  height: 34px;
+  line-height: 34px;
+  //color: #a7a7a7;
+}
+
+::v-deep .el-dialog__body {
+  padding: 20px 100px !important;
+}
+
+::v-deep .dialogVisibleRoles .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .importPickerClass .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .badDialogVisible .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .el-dialog__footer {
+  display: flex;
+  justify-content: flex-end;
+}
+
+::v-deep .el-table .caret-wrapper {
+  transform: scale(0.8);
+}
+
+::v-deep .cell {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+::v-deep .el-table::before {
+  height: 0;
+}
+
+::v-deep .el-table__body-wrapper {
+  background-color: #f8f8fa;
+}
+
+::v-deep .el-table__body .el-table__row.hover-row td {
+  background-color: #eaecef;
+}
+
+::v-deep .el-form--inline .el-form-item__label {
+  color: #a7a7a7;
+}
+
+.body ::v-deep .el-divider {
+  border: 1px solid #eee;
+  width: 99%;
+  margin: 10px auto;
+}
+
+.body ::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+
+</style>
+<style>
+
+.el-table .custom-row {
+  background: #f8f8fa;
+}
+</style>
diff --git a/src/views/zlgl/gxjy.vue b/src/views/zlgl/gxjy.vue
index effdc69..b449ea1 100644
--- a/src/views/zlgl/gxjy.vue
+++ b/src/views/zlgl/gxjy.vue
@@ -13,7 +13,9 @@
           <el-input
             v-model="form.orderstepqrcode"
             name="GXproduceCode"
+
             style="width: 300px"
+            @keyup.native="e=>judgeIsScanning(e,'GXproduceCode')"
             @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
           />
         </div>
@@ -396,7 +398,8 @@
       multipleSelection: [], // 琛ㄦ牸澶氶�夋
       tabClickIndex: null, // 鐐瑰嚮鐨勫崟鍏冩牸
       tabClickLabel: '', // 褰撳墠鐐瑰嚮鐨勫垪鍚�
-      isCancel: false// 鏄惁鐐瑰嚮鍙栨秷鎸夐挳
+      isCancel: false, // 鏄惁鐐瑰嚮鍙栨秷鎸夐挳
+      judgeIsScanningArr: []// 鍒ゆ柇鏄惁鎵爜鏁扮粍
     }
   },
   created() {
@@ -499,6 +502,42 @@
       row.name = res.name
       row.stepcheckitem_desc = res.descr
     },
+    // 闃叉姈      //鎵爜鐢ㄧ殑鏄槻鎶�
+    fnThrottle(method, delay, duration, belong) {
+      var that = this
+      var timer = this.timer
+      var begin = new Date().getTime()
+      return function() {
+        var current = new Date().getTime()
+        clearTimeout(timer)
+        if (current - begin >= duration) {
+          // method()
+          // that.VALUE()
+          begin = current
+        } else {
+          that.timer = setTimeout(function() {
+            // method()
+            that.enterNative(that.form.orderstepqrcode, belong)
+          }, delay)
+        }
+      }
+    },
+    // 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
+    judgeIsScanning(e, belong) {
+      const timenow = e.timeStamp
+      let flag = true
+      this.judgeIsScanningArr.push(timenow)
+      let i
+      for (i in this.judgeIsScanningArr) {
+        flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 10
+        if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
+          if (flag) {
+            this.fnThrottle(this.enterNative, 500, 2000, belong)()
+            return
+          }
+        }
+      }
+    },
     // 鎵爜閿洏鍥炶溅浜嬩欢
     async enterNative(val, belong) {
       if (belong === 'GXproduceCode') {

--
Gitblit v1.9.3