过程趋势图

通过抓取局域网共享文件夹里面的excel,获取到excel里面第一列和第三列的数据,绘制成趋势图

前端VUE代码如下:

<template>
  <el-container>
    <el-header>
      <Title :data="text"></Title>
    </el-header>
    <el-container>
      <el-aside width="19%" style="border: 2px solid #2e54a1; border-radius: 20px; height: 760px; margin-top: 20px">
        <el-row style="margin-top: 40px; width: 96%; margin-left: 2%;">发动机号查询</el-row>
        <el-row style="width: 96%; margin-top: 20px; margin-left: 2%; ">
          <el-col style="padding-top: 5px; padding-bottom: 5px;">
            <el-input style="width: 55%; margin-right: 5px;" v-model="num"></el-input>
            <el-button @click="postData">确认</el-button>
          </el-col>
          <el-col style="width: 96%; height: 30px; margin-left: 2%; margin-top: 20px; line-height: 30px; color: #42b983; border: 1px solid #2e54a1;">
            {{textMessage}}
          </el-col>
        </el-row>
        <el-menu
            default-active="1"
            class="el-menu-vertical-demo">
          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <span slot="title" @click="three = true;one = false; two = false; four = false">缸体分装下线</span>
          </el-menu-item>
          <el-submenu index="2">
            <template v-slot:title>
              <i class="el-icon-menu"></i>
              <span>过程参数趋势</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-1" @click="postDraw">缸体-导水管压装数据</el-menu-item>
<!--              <el-menu-item index="1-2" @click="postDraw1">拧紧机数据</el-menu-item>-->
<!--              <el-menu-item index="1-3" @click="drawMachine('op110')">OP110上下缸体拧紧机</el-menu-item>-->

              <el-submenu index="1-1">
                <template v-slot:title    >
                  OP110上下缸体拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-1-1"  style="margin: -1.5em 0;"   @click="drawMachine('op110')">参数趋势</el-menu-item>
                  <el-menu-item index="1-1-2"  style="margin: 9px 0;"    @click="postDraw2">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>


<!--              <el-menu-item index="1-4" @click="drawMachine('op160')">OP160连杆拧紧机</el-menu-item>-->
              <el-submenu index="1-2">
                <template v-slot:title    >
                  OP160连杆拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-2-1"  style="margin: -1.5em 0;"   @click="drawMachine('op160')">参数趋势</el-menu-item>
                  <el-menu-item index="1-2-2"  style="margin: 9px 0;"    @click="postDraw3">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>


              <el-menu-item index="1-5" @click="drawMachine('op170')">OP170回转力矩测量机</el-menu-item>
<!--              <el-submenu index="1-5">-->
<!--                <template v-slot:title    >-->
<!--                  OP170连杆拧紧机-->
<!--                </template>-->
<!--                <el-menu-item-group>-->
<!--                  <el-menu-item index="1-5-1"  style="margin: -1.5em 0;"   @click="drawMachine('op170')">参数趋势</el-menu-item>-->
<!--                  <el-menu-item index="1-5-2"  style="margin: 9px 0;"    @click="postDraw4">过程趋势</el-menu-item>-->
<!--                  &lt;!&ndash; 添加更多的子菜单项 &ndash;&gt;-->
<!--                </el-menu-item-group>-->
<!--              </el-submenu>-->





<!--              <el-menu-item index="1-6" @click="drawMachine('op200')">OP200机油泵拧紧机</el-menu-item>-->
              <el-submenu index="1-6">
                <template v-slot:title    >
                  OP200机油泵拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-6-1"  style="margin: -1.5em 0;"   @click="drawMachine('op200')">参数趋势</el-menu-item>
                  <el-menu-item index="1-6-2"  style="margin: 9px 0;"    @click="postDraw5">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>



<!--              <el-menu-item index="1-7" @click="drawMachine('op240U')">OP240油底壳上体拧紧机</el-menu-item>-->
              <el-submenu index="1-7">
                <template v-slot:title    >
                  OP240油底壳上体拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-7-1"  style="margin: -1.5em 0;"   @click="drawMachine('op240U')">参数趋势</el-menu-item>
                  <el-menu-item index="1-7-2"  style="margin: 9px 0;"    @click="postDraw6">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>

<!--              <el-menu-item index="1-8" @click="drawMachine('op240D')">OP240油底壳下体拧紧机</el-menu-item>-->
              <el-submenu index="1-8">
                <template v-slot:title    >
                  OP260油底壳下体拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-8-1"  style="margin: -1.5em 0;"   @click="drawMachine('op240D')">参数趋势</el-menu-item>
                  <el-menu-item index="1-8-2"  style="margin: 9px 0;"    @click="postDraw7">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>







<!--              <el-menu-item index="1-9" @click="drawMachine('op300')">OP300飞轮拧紧机</el-menu-item>-->
              <el-submenu index="1-9">
                <template v-slot:title    >
                  OP300飞轮拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-9-1"  style="margin: -1.5em 0;"   @click="drawMachine('op300')">参数趋势</el-menu-item>
                  <el-menu-item index="1-9-2"  style="margin: 9px 0;"    @click="postDraw8">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>




<!--              <el-menu-item index="1-10" @click="drawMachine('op340')">OP340水泵拧紧机</el-menu-item>-->
              <el-submenu index="1-10">
                <template v-slot:title    >
                  OP340水泵拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-10-1"  style="margin: -1.5em 0;"   @click="drawMachine('op340')">参数趋势</el-menu-item>
                  <el-menu-item index="1-10-2"  style="margin: 9px 0;"    @click="postDraw9">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>





<!--              <el-menu-item index="1-11" @click="drawMachine('op370')">OP370燃油泵带轮拧紧机</el-menu-item>-->
              <el-submenu index="1-11">
                <template v-slot:title    >
                  OP370燃油泵带轮拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-11-1"  style="margin: -1.5em 0;"   @click="drawMachine('op370')">参数趋势</el-menu-item>
                  <el-menu-item index="1-11-2"  style="margin: 9px 0;"    @click="postDraw10">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>
<!--              <el-menu-item index="1-12" @click="drawMachine('op390')">OP390曲轴正时带轮拧紧机</el-menu-item>-->



<!--              <el-menu-item index="1-13" @click="drawMachine('op460')">-->
<!--                OP460缸盖拧紧机-->
<!--              </el-menu-item>-->
              <el-submenu index="1-12">
                <template v-slot:title    >
                  OP390曲轴正时带轮拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-12-1"  style="margin: -1.5em 0;"   @click="drawMachine('op390')">参数趋势</el-menu-item>
                  <el-menu-item index="1-12-2"  style="margin: 9px 0;"    @click="postDraw11">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>

              <el-submenu index="1-13">
                <template v-slot:title    >
                OP460缸盖拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-13-1"  style="margin: -1.5em 0;"   @click="drawMachine('op460')">参数趋势</el-menu-item>
                  <el-menu-item index="1-13-2"  style="margin: 9px 0;"    @click="postDraw1">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>





<!--              <el-menu-item index="1-14" @click="drawMachine('op510')">OP510缸盖拧紧机</el-menu-item>-->
              <el-submenu index="1-14">
                <template v-slot:title    >
                  OP510缸盖拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-14-1"  style="margin: -1.5em 0;"   @click="drawMachine('op510')">参数趋势</el-menu-item>
                  <el-menu-item index="1-14-2"  style="margin: 9px 0;"    @click="postDraw12">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>




<!--              <el-menu-item index="1-15" @click="drawMachine('op530')">OP530缸盖拧紧机</el-menu-item>-->
              <el-submenu index="1-15">
                <template v-slot:title    >
                  OP530缸盖拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-15-1"  style="margin: -1.5em 0;"   @click="drawMachine('op530')">参数趋势</el-menu-item>
                  <el-menu-item index="1-15-2"  style="margin: 9px 0;"    @click="postDraw13">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>




<!--              <el-menu-item index="1-16" @click="drawMachine('op560')">OP560凸轮轴带轮拧紧机</el-menu-item>-->
              <el-submenu index="1-16">
                <template v-slot:title    >
                  OP560凸轮轴带轮拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-16-1"  style="margin: -1.5em 0;"   @click="drawMachine('op560')">参数趋势</el-menu-item>
                  <el-menu-item index="1-16-2"  style="margin: 9px 0;"    @click="postDraw14">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>




              <el-menu-item index="1-17" @click="drawMachine('op590')">OP590发动机半总成试漏</el-menu-item>
<!--              <el-submenu index="1-17">-->
<!--                <template v-slot:title    >-->
<!--                  OP590发动机半总成试漏-->
<!--                </template>-->
<!--                <el-menu-item-group>-->
<!--                  <el-menu-item index="1-17-1"  style="margin: -1.5em 0;"   @click="drawMachine('op590')">参数趋势</el-menu-item>-->
<!--                  <el-menu-item index="1-17-2"  style="margin: 9px 0;"    @click="postDraw15">过程趋势</el-menu-item>-->
<!--                  &lt;!&ndash; 添加更多的子菜单项 &ndash;&gt;-->
<!--                </el-menu-item-group>-->
<!--              </el-submenu>-->


<!--              <el-menu-item index="1-18" @click="drawMachine('op630')">OP630压盘拧紧机</el-menu-item>-->
              <el-submenu index="1-18">
                <template v-slot:title    >
                  OP630压盘拧紧机
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-18-1"  style="margin: -1.5em 0;"   @click="drawMachine('op630')">参数趋势</el-menu-item>
                  <el-menu-item index="1-18-2"  style="margin: 9px 0;"    @click="postDraw16">过程趋势</el-menu-item>
                  <!-- 添加更多的子菜单项 -->
                </el-menu-item-group>
              </el-submenu>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main style="border: 2px solid #2e54a1; border-radius: 20px; height: 760px; margin-top: 20px">
        <div v-if="one" style="width: 98%; height: 96%; margin-left: 1%; margin-top: 1%; border: 1px solid #2e54a1; display: flex;">
          <div style="flex: 1; display: flex; flex-direction: column;">
            <div style="flex: 1; border: 1px solid #2e54a1;">
              <Procedure v-model="num2"></Procedure>
            </div>
            <div style="flex: 1; border: 1px solid #2e54a1;">
              <Procedure v-model="num1"></Procedure>
            </div>
          </div>
          <div style="flex: 1; display: flex; flex-direction: column;">
            <div style="flex: 1; border: 1px solid #2e54a1;">
              <Procedure v-model="num3"></Procedure>
            </div>
            <div style="flex: 1; border: 1px solid #2e54a1; display: flex;">
              <div style="flex: 1; border-right: 2px solid #2e54a1;">
                <table style="margin: auto; width: 100%;">
                  <tr style="height: 36px;">
                    <th style="width: 20%;">序号</th>
                    <th style="width: 80%;">发动机号</th>
                  </tr>
                  <tr v-for="(item, index) in list1">
                    <td>{{index + 1}}</td>
                    <td @click="postData1(item)">{{item.label}}</td>
                  </tr>
                </table>
              </div>
              <div style="flex: 1;">
                <table style="margin: auto; width: 100%;">
                  <tr style="height: 36px;">
                    <th>序号</th>
                    <th>发动机号</th>
                  </tr>
                  <tr v-for="(item, index) in list2">
                    <td>{{index + number}}</td>
                    <td @click="postData1(item)">{{item.label}}</td>
                  </tr>
                </table>
                <div style="margin: auto;">
                  <h4 @click="postPage">最近25组发动机趋势图</h4>
                </div>
              </div>
            </div>
          </div>
        </div>
<!--        460-->
        <div v-if="two">
          <ProcedureTightening v-model="num4" @updata:yearData5="yearData5"></ProcedureTightening>
        </div>
<!--        //OP110-->
        <div v-if="two2">
          <ProcedureTightening2 v-model="num4" @updata:yearData6="yearData6"></ProcedureTightening2>
        </div>
<!--        OP160-->
        <div v-if="two3">
          <ProcedureTightening3 v-model="num4"  :num108="num108"      @updata:yearData7="yearData7"  ></ProcedureTightening3>
        </div>





        <div v-if="two4">
          <ProcedureTightening4 v-model="num4" @updata:yearData8="yearData8"></ProcedureTightening4>
        </div>
        <div v-if="two5">
          <ProcedureTightening5 v-model="num4"  :num108="num108"  @updata:yearData9="yearData9"></ProcedureTightening5>
        </div>
        <div v-if="two6">
          <ProcedureTightening6 v-model="num4"  :num108="num108"   :num109="num109"    :num110="num110"    @updata:yearData10="yearData10"></ProcedureTightening6>
        </div>
        <div v-if="two7">
          <ProcedureTightening7 v-model="num4"  :num108="num108"   :num109="num109"    :num110="num110"   @updata:yearData11="yearData11"></ProcedureTightening7>
        </div>
        <div v-if="two8">
          <ProcedureTightening8 v-model="num4"   :num108="num108"     @updata:yearData12="yearData12"></ProcedureTightening8>
        </div>
        <div v-if="two9">
          <ProcedureTightening9 v-model="num4" @updata:yearData13="yearData13"></ProcedureTightening9>
        </div>
        <div v-if="two10">
          <ProcedureTightening10 v-model="num4" @updata:yearData14="yearData14"></ProcedureTightening10>
        </div>
        <div v-if="two11">
          <ProcedureTightening11 v-model="num4" @updata:yearData15="yearData15"></ProcedureTightening11>
        </div>
        <div v-if="two12">
          <ProcedureTightening12 v-model="num4" @updata:yearData16="yearData16"></ProcedureTightening12>
        </div>
        <div v-if="two13">
          <ProcedureTightening13 v-model="num4" @updata:yearData17="yearData17"></ProcedureTightening13>
        </div>
<!--        OP506-->
        <div v-if="two14">
          <ProcedureTightening14 v-model="num4" @updata:yearData18="yearData18"></ProcedureTightening14>
        </div>
        <div v-if="two15">
          <ProcedureTightening15 v-model="num4" @updata:yearData19="yearData19"></ProcedureTightening15>
        </div>
        <div v-if="two16">
          <ProcedureTightening16 v-model="num4" @updata:yearData20="yearData20"></ProcedureTightening16>
        </div>
<!--        <div v-if="xiugaishangxiaxian">-->

<!--          <el-input v-model="shang112" placeholder="上限"></el-input>-->
<!--&lt;!&ndash;          <el-input v-model="112" placeholder="手动输入" style="margin-top: 20px" @keydown.native.enter="searchEngine(false)"></el-input>&ndash;&gt;-->
<!--          <el-input v-model="xia112" placeholder="下限" ></el-input>-->
<!--        </div>-->
        <el-dialog :visible.sync="xiugaishangxiaxian" title="修改上下限">
          <el-form ref="form1" >
            <el-form-item label="上限">
              <el-input type="textarea" v-model="shang112"></el-input>
            </el-form-item>
            <el-form-item label="下限">
              <el-input type="textarea" v-model="xia112"></el-input>
            </el-form-item>
          </el-form>
          <el-button @click="updata1112">提交</el-button>
        </el-dialog>
        <el-dialog :visible.sync="xiugaishangxiaxian2" title="修改上下限">
          <el-form ref="form1" >
            <el-form-item label="上限">
              <el-input type="textarea" v-model="shang113"></el-input>
            </el-form-item>
            <el-form-item label="下限">
              <el-input type="textarea" v-model="xia113"></el-input>
            </el-form-item>
          </el-form>
          <el-button @click="updata1113">提交</el-button>
        </el-dialog>
        <el-row v-if="three">
          <el-col :span="4">
            今日生产数量:{{ counter }}
            <el-input v-model="engine" disabled placeholder="当前发动机"></el-input>
            <el-input v-model="input" placeholder="手动输入" style="margin-top: 20px" @keydown.native.enter="searchEngine(false)"></el-input>
            <el-input v-model="input" placeholder="扫描枪输入" style="margin-top: 20px" @keydown.native.enter="searchEngine(true)"></el-input>
            <div v-if="bool" style=" background-color: #0b8d37; margin-top: 20px; line-height: 150px; font-size: 45px; color: #ffffff">合格</div>
            <div v-if="!bool" style=" background-color: #f80e0e; margin-top: 20px; line-height: 150px; font-size: 35px; color: #ffffff">不合格</div>
            <img v-if="!bool" :src="qrCodeMain" alt="QR Code" style="margin-top: 20px; width: 140px; height: 140px;">
            <el-row style="margin-top: 20px">
              <el-input v-model="query.engineNumber" placeholder="查询处置记录"></el-input>
              <el-button style="margin-top: 20px" @click="pageQuery">查询</el-button>
            </el-row>
          </el-col>
          <el-col :push="1" :span="19">
            <el-descriptions :column="4" border direction="vertical">
              <el-descriptions-item
                  v-for="item in subpackages"
                  :key="item.name"
                  :label="item.name"
                  label-style="background: #B6E2FE"
                  content-style="background: #C0F0FF">
                <template slot="label">
                  <span style="font-weight: 900">{{item.name}}</span>
                </template>
                <el-row>应拧紧数据:{{item.total}}</el-row>
                <el-row>采集数据:{{item.gather}}</el-row>
                <el-popover
                    placement="right"
                    width="400"
                    trigger="click">
                  <el-descriptions :column="1" border direction="horizontal">
                    <el-descriptions-item
                        v-for="ti in item.items"
                        :key="ti"
                        :label="ti">
                      {{queryList[ti]}}
                    </el-descriptions-item>
                  </el-descriptions>
                  <el-button slot="reference" type="danger" plain @click="doClick(item)" size="mini">不合格数据:{{item.loss}}</el-button>
                </el-popover>
              </el-descriptions-item>
            </el-descriptions>
            <el-row :gutter="20">
              <el-col :push="10" :span="3">处置记录</el-col>
              <el-col :push="10" :span="6">
                <el-pagination
                    v-show="total>0"
                    :total="total"
                    small
                    layout="prev, pager, next"
                    @current-change="changeRecord">
                </el-pagination>
              </el-col>
            </el-row>
            <el-row>
              <el-table
                  :data="tableData"
                  max-height="235"
                  border
                  style="width: 100%;">
                <el-table-column prop="engineNumber" label="发动机号" min-width="120" align="center"></el-table-column>
                <el-table-column prop="reason" label="不合格原因" min-width="250" align="center"></el-table-column>
                <el-table-column prop="measure" label="处置措施" min-width="200" align="center"></el-table-column>
                <el-table-column prop="handler" label="处置人" min-width="100" align="center"></el-table-column>
                <el-table-column prop="handledTime" label="时间" min-width="160"  align="center"></el-table-column>
              </el-table>
            </el-row>
          </el-col>
        </el-row>
        <el-row v-if="four">
          <el-col :span="19">

            <div style="display: flex; justify-content: space-between; align-items: center;">
              <span style="margin-left: auto; margin-right: auto;">{{this.diyizushuju}}</span>
              <el-button type="primary" size="mini" @click="InsertButton">修改</el-button>
            </div>

            <div style="display: grid;
                 /*grid-template-columns: repeat(3, 1fr); !* 将容器分为三列 *!*/
                 /*gap: 10px; 设置项目之间的间距 */
                 width: 99%;height: 99%;
              ">
                <ProcedureTrend  v-model="drawEngine"  :shang="shang112"   :zhong="zhong112"   :xia="xia112"></ProcedureTrend>
            </div>

            <div style="display: flex; justify-content: space-between; align-items: center;">
              <span style="margin-left: auto; margin-right: auto;">{{this.dierzushuju}}</span>
              <el-button type="primary" size="mini" @click="InsertButton2">修改</el-button>
            </div>
            <div style="display: grid;
                 /*grid-template-columns: repeat(3, 1fr); !* 将容器分为三列 *!*/
                 /*gap: 10px; 设置项目之间的间距 */
                 width: 99%">
              <ProcedureTrend  v-model="drawEngine2"   :shang="shang113"  :zhong="zhong113"  :xia="xia113" ></ProcedureTrend>
            </div>


          </el-col>
          <el-col :push="1" :span="4">
            <div style="border: 1px solid #2e54a1;">
              <el-button @click="changeNum(25)" size="mini">25组</el-button>
              <el-button @click="changeNum(50)" size="mini">50组</el-button>
              <table style="margin: auto; width: 100%;">
                <tr style="height: 36px;">
                  <th>发动机号</th>
                </tr>
                <tr v-for="item in trend">
                  <td>{{item}}</td>
                </tr>
              </table>
            </div>
          </el-col>
        </el-row>
      </el-main>
    </el-container>
    </el-container>
</template>

<script>
import Title from "@/components/Title.vue";
import {request, requestFormData, requestGet} from "@/api/api";
import QRCode from 'qrcode';
import Procedure from "@/components/linechart/Procedure.vue";
import ProcedureTightening from "@/components/general/ProcedureTightening.vue";
import ProcedureTightening2 from "@/components/general/ProcedureTightening2.vue";
import ProcedureTightening3 from "@/components/general/ProcedureTightening3.vue";
import ProcedureTightening4 from "@/components/general/ProcedureTightening4.vue";
import ProcedureTightening5 from "@/components/general/ProcedureTightening5.vue";
import ProcedureTightening6 from "@/components/general/ProcedureTightening6.vue";
import ProcedureTightening7 from "@/components/general/ProcedureTightening7.vue";
import ProcedureTightening8 from "@/components/general/ProcedureTightening8.vue";
import ProcedureTightening9 from "@/components/general/ProcedureTightening9.vue";
import ProcedureTightening10 from "@/components/general/ProcedureTightening10.vue";
import ProcedureTightening11 from "@/components/general/ProcedureTightening11.vue";
import ProcedureTightening12 from "@/components/general/ProcedureTightening12.vue";
import ProcedureTightening13 from "@/components/general/ProcedureTightening13.vue";
import ProcedureTightening14 from "@/components/general/ProcedureTightening14.vue";
import ProcedureTightening15 from "@/components/general/ProcedureTightening15.vue";
import ProcedureTightening16 from "@/components/general/ProcedureTightening16.vue";


import ProcedureTrend from "@/components/linechart/ProcedureTrend.vue";
import {Message} from "element-ui";
import moment from "moment/moment";

export default {
  components: {
    Title,
    Procedure,
    ProcedureTrend,
    ProcedureTightening,
    ProcedureTightening2,
    ProcedureTightening3,
    ProcedureTightening4,
    ProcedureTightening5,
    ProcedureTightening6,
    ProcedureTightening7,
    ProcedureTightening8,
    ProcedureTightening9,
    ProcedureTightening10,
    ProcedureTightening11,
    ProcedureTightening12,
    ProcedureTightening13,
    ProcedureTightening14,
    ProcedureTightening15,
    ProcedureTightening16,

  },
  data(){
    return {
      diyizushuju:'',
      dierzushuju:'',
      total: 0,
      input: '',
      engine: '',
      reason: '',
      tableData: [],
      qrCodeMain: '',
      queryList: [],
      counter: '',
      subpackages: [],
      UnqualifiedPoints: [], //不合格点位
      trend: [],
      drawEngine: [],
      drawEngine2: [],
      chooseNum: 25,
      chooseName: '',
      bool: true,
      text: '过程参数趋势平台',
      plot1: [],
      plot2: [],
      plot3: [],
      plot4: [],
      plot108:[],
      plot109:[],
      plot110:[],
      plot5: [],
      plot6: [],
      text108:[],
      text109:[],
      text110:[],
      text111:[],
      //获取到上中下限
      shang112:[],
      zhong112:[],
      xia112:[],
      shang113:[],
      zhong113:[],
      xia113:[],
      num1: [],
      num2: [],
      num3: [],
      num4: [],//拧紧机
      num108:[], //第二组数据
      num109:[], //第二组数据
      num110:[], //第二组数据
      num5: [],//拧紧机
      num: null,
      num0: null,
      textMessage: null,
      list: [],//获取最近25组发动机数据
      list1: [],
      list2: [],
      number: 15,
      one: false,//水管
      two: false,//op460
      two2:false,//OP110
      two3:false,//OP160
      two4:false,//OP170
      two5:false,//OP200
      two6:false,//OP240上
      two7:false,//OP240xia
      two8:false,//OP300
      two9:false,//OP340
      two10:false,//OP370
      two11:false,//OP390
      two12:false,//OP510
      two13:false,//OP530
      two14:false,//OP560
      two15:false,//OP590
      two16:false,//OP630
      xiugaishangxiaxian:false,
      xiugaishangxiaxian2:false,
      three: true,//缸体下线
      four: false,//各个拧紧机
      value: '',//下拉选择绑定
      options: [{
        value: '1',
        label: '缸体-导水管压装过程数据'
      },{
        value: '2',
        label: '拧紧机数据'
      }],
      query: {
        engineNumber: null,
        pageNum: 1,
        pageSize: 10,
      }
    }
  },
  created() {
    this.getNewData();
    this.pageQuery();
  },
  methods: {
    updata1112(){
      request('/test/shangxiaxian/updata', {
        "xm": this.diyizushuju,
        "shang": this.shang112,
        "xia": this.xia112,
      }).then((response) => {
        console.log(response)
      if(response.code=0){
    this.$message.success(response.msg)
        this.xiugaishangxiaxian=false
  }
    else {
    this.$message.warning(response.msg)
        this.xiugaishangxiaxian=false
     }
      }).catch((error) => {
        alert(error)
      })
    },
    updata1113(){
      request('/test/shangxiaxian/updata', {
        "xm": this.dierzushuju,
        "shang": this.shang113,
        "xia": this.xia113,
      }).then((response) => {
        console.log(response)
        if(response.code=0){
          this.$message.success(response.msg)
          this.xiugaishangxiaxian2=false
        }
        else {
          this.$message.warning(response.msg)
          this.xiugaishangxiaxian2=false
        }
      }).catch((error) => {
        alert(error)
      })
    },



    changeNum(num){
      this.chooseNum = num;
      this.creatTrend();
    },
    // 拧紧机数据查询
    drawMachine(name) {
      // console.log(name)
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630


      this.one = false
      this.two2=false
      this.two = false
      this.three = false
      this.four = true
      this.chooseName = name;
      this.creatTrend();
    },
    creatTrend() {
      let formData = new FormData();
      formData.append("num",this.chooseNum)
      formData.append("name",this.chooseName)
      // console.log(this.chooseNum)
      // console.log(this.chooseName)
      requestFormData("/abnormalRec/trend",formData).then(o => {
        this.trend = o.data.engines
        this.drawEngine = o.data[this.chooseName]
        // console.log(this.trend)
        // console.log(this.drawEngine)
      })
      requestFormData("/abnormalRec/trend2",formData).then(o => {
        // this.trend = o.data.engines
        this.drawEngine2 = o.data[this.chooseName]
        // console.log(this.trend)
        // console.log(this.drawEngine)
      })
       request('/test/shangxiaxian', {
        "gongxuType": this.chooseName,
      }).then((response) => {
    console.log(response)
         this.shang112 = response[0].shang
         this.zhong112=response[0].zhong
         this.xia112=response[0].xia
         this.diyizushuju=response[0].xm
         console.log(this.shang112)
         console.log(this.zhong112)
         console.log(this.xia112)
         this.shang113 = response[1].shang
         this.zhong113=response[1].zhong
         this.xia113=response[1].xia
         this.dierzushuju=response[1].xm
         console.log(this.shang113)
         console.log(this.zhong113)
         console.log(this.xia113)
      }).catch((error) => {
        alert(error)
      })


    },
    changeRecord(item) {
      this.query.pageNum = item
      this.pageQuery()
    },
    async pageQuery() {
      try {
        const response = await request("/cylinder/query", this.query);
        if (response.code === 0) {
          this.total = response.data.total;
          this.tableData = response.data.records;
        }
      } catch (error) {
        console.error("请求失败:", error);
      }
    },
    // 生成二维码的函数
    generateQrCodeMain(engin,reason) {
      let formContent = process.env.VUE_APP_LOCAL_URL + '/#/addRecord?engin=' + engin + "&reason=" + reason;
      QRCode.toDataURL(formContent, (err, url) => {
        if (err) {
          console.error(err)
        } else {
          this.qrCodeMain = url
        }
      })
    },
    //   导水管--页面跳转
    postPage(){
      this.$router.push({
        path: '/procedure_25'
      })
    },
    //  在装配车间数据库查询发动机号是否存在
    postData(){
      let formData = new FormData();
      formData.append('engine', this.num)
      this.textMessage = null
      requestFormData('/astonish/exist', formData).then(res => {
        if (res.code === 0){
          this.textMessage = res.msg
        }else {
          this.$message.warning(res.msg)
        }
      }).catch(error => {
        alert(error)
      })
    },
    //  导水管--点击25组发动机号查询绘图数据
    postData1(item){
      let formData = new FormData();
      formData.append('name', item.name)
      this.textMessage = null
      requestFormData('/astonish/get', formData).then(res => {
        this.plot1 = []
        this.plot2 = []
        this.plot3 = []
        this.plot4 = []
        this.plot5 = []
        this.plot6 = []
        this.plot1 = res.data.map(item => item.one)
        this.plot2 = res.data.map(item => item.two)
        this.plot3 = res.data.map(item => item.three)
        for(let i = 0; i < res.data.length; i++){
          this.plot4.push({
            "x": this.plot1[i],
            "y": this.plot2[i],
            "title": '位移-压力图'
          })
          this.plot5.push({
            "x": this.plot1[i],
            "y": this.plot3[i],
            "title": '时间-位移图'
          })
          this.plot6.push({
            "x": this.plot3[i],
            "y": this.plot2[i],
            "title": '时间-压力图'
          })
        }
        this.num1 = this.plot4
        this.num2 = this.plot5
        this.num3 = this.plot6
      }).catch(error => {
        alert(error)
      })
    },
    // 导水管绘图函数
    postDraw(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630

      this.one = true
      // this.two = false
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num)
      this.textMessage = null
      if (this.num !== null){
        requestFormData('/astonish/get', formData).then(res => {
          if(res.code === 0){
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            console.log(this.textMessage)
            this.plot1 = []
            this.plot2 = []
            this.plot3 = []
            this.plot4 = []
            this.plot5 = []
            this.plot6 = []
            this.plot1 = res.data.map(item => item.one)
            this.plot2 = res.data.map(item => item.two)
            this.plot3 = res.data.map(item => item.three)
            for(let i = 0; i < res.data.length; i++){
              this.plot4.push({
                "x": this.plot1[i],
                "y": this.plot2[i],
                "title": '位移-压力图'
              })
              this.plot5.push({
                "x": this.plot1[i],
                "y": this.plot3[i],
                "title": '时间-位移图'
              })
              this.plot6.push({
                "x": this.plot3[i],
                "y": this.plot2[i],
                "title": '时间-压力图'
              })
            }
            this.num1 = this.plot4
            this.num2 = this.plot5
            this.num3 = this.plot6
          }else{
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    // 导水管--右下角最新25组数据
    getNewData(){
      requestGet('/astonish/twenty-five').then(res => {
        this.list1 = []
        this.list2 = []
        let data = res.engines.reverse()
        let list1 = data.slice(0,14)
        list1.forEach(item => {
          this.list1.push({
            label: item.slice(40, 51),
            name: item
          })
        })
        let data2 = res.engines.reverse()
        let list2 = data2.slice(15,25)
        list2.forEach(item => {
          this.list2.push({
            label: item.slice(40, 51),
            name: item
          })
        })


        // this.list2 = data.slice(14,25)
      }).catch(error => {
        alert(error)
      })
    },
    //   拧紧机数据绘图函数
    yearData5(value){
      this.num0 = value
      this.postDraw1()
    },
    yearData6(value){
      this.num0 = value
      this.postDraw2()
    },
    yearData7(value){
      this.num0 = value
      this.postDraw3()
    },
    yearData8(value){
      this.num0 = value
      this.postDraw4()
    },
    yearData9(value){
      this.num0 = value
      this.postDraw5()
    },
    yearData10(value){
      this.num0 = value
      this.postDraw6()
    },
    yearData11(value){
      this.num0 = value
      this.postDraw7()
    },
    yearData12(value){
      this.num0 = value
      this.postDraw8()
    },
    yearData13(value){
      this.num0 = value
      this.postDraw9()
    },
    yearData14(value){
      this.num0 = value
      this.postDraw10()
    },
    yearData15(value){
      this.num0 = value
      this.postDraw11()
    },
    yearData16(value){
      this.num0 = value
      this.postDraw12()
    },
    yearData17(value){
      this.num0 = value
      this.postDraw13()
    },
    yearData18(value){
      this.num0 = value
      this.postDraw14()
    },
    yearData19(value){
      this.num0 = value
      this.postDraw15()
    },
    yearData20(value){
      this.num0 = value
      this.postDraw16()
    },
    postDraw1(){
      this.two= true,//op460
          this.two2 = false
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630
      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                "x4": text4.map(item => item.one)[i],
                "y4": text4.map(item => item.two)[i],
                "x5": text5.map(item => item.one)[i],
                "y5": text5.map(item => item.two)[i],
                "x6": text6.map(item => item.one)[i],
                "y6": text6.map(item => item.two)[i],
                "x7": text7.map(item => item.one)[i],
                "y7": text7.map(item => item.two)[i],
                "x8": text8.map(item => item.one)[i],
                "y8": text8.map(item => item.two)[i],
                "x9": text9.map(item => item.one)[i],
                "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw2(){
      this.two= false,//op460
          this.two2 = true
          this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630

      this.one = false

      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning2', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            console.log(text)
            let text1 = res.data[1]
            console.log(text1)
            let text2 = res.data[2]
            console.log(text2)
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                "x4": text4.map(item => item.one)[i],
                "y4": text4.map(item => item.two)[i],
                "x5": text5.map(item => item.one)[i],
                "y5": text5.map(item => item.two)[i],
                "x6": text6.map(item => item.one)[i],
                "y6": text6.map(item => item.two)[i],
                "x7": text7.map(item => item.one)[i],
                "y7": text7.map(item => item.two)[i],
                "x8": text8.map(item => item.one)[i],
                "y8": text8.map(item => item.two)[i],
                "x9": text9.map(item => item.one)[i],
                "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw3(){



      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=true,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630

      this.one = false

      this.three = false
      this.four = false

      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning3', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            this.plot108 = []
            let text = res.data[0]
            // console.log(text.length)
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3   = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
                     let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot108.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            // this.num108 = []
            this.num108 = this.plot108

            // console.log(this.num4)
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })

        requestFormData('/astonish/ning3-02', formData).then(res => {
          if (res.code === 0) {
            this.plot4 = []
            this.plot108 = []
            // this.$message.success(res.msg)
            this.textMessage = res.msg
             // console.log(this.textMessage)

            let text = res.data[0]
            console.log(text.length)
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            // let text8 = res.data[8]
            // let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                    // "x": this.text108.map(item => item.one)[i],
                    // "y": this.text108.map(item => item.two)[i],
                    // "x1": this.text109.map(item => item.one)[i],
                    // "y1": this.text109.map(item => item.two)[i],
                    // "x2": this.text110.map(item => item.one)[i],
                    // "y2": this.text110.map(item => item.two)[i],
                    // "x3": this.text111.map(item => item.one)[i],
                    // "y3": this.text111.map(item => item.two)[i],

                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            // this.num4 = []
            this.num4 = this.plot4
            console.log(this.num4)
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })




      }





    },
    postDraw4(){
      this.one = false
      this.two4 = true
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630
          this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning4', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw5(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=true,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630
      this.one = false
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning4', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })

        requestFormData('/astonish/ning4-02', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot108 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot108.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num108 = []
            this.num108 = this.plot108
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })


      }
    },
    postDraw6(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this.two6=true,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630

      this.one = false

      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning5', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })

        requestFormData('/astonish/ning5-02', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot108 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot108.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num108 = []
            this.num108 = this.plot108
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })

        requestFormData('/astonish/ning5-03', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot109 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot109.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num109 = []
            this.num109 = this.plot109
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })

        requestFormData('/astonish/ning5-04', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot110 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot110.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num110 = []
            this.num110 = this.plot110
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw7(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=true,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630
      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning6', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],












                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
        requestFormData('/astonish/ning6-02', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot108 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot108.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num108 = []
            this.num108 = this.plot108
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
        requestFormData('/astonish/ning6-03', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot109 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot109.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num109 = []
            this.num109 = this.plot109
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
        requestFormData('/astonish/ning6-04', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot110 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot110.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num110 = []
            this.num110 = this.plot110
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })



      }
    },
    postDraw8(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=true,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630
      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning7', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })


        requestFormData('/astonish/ning7-02', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot108 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot108.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num108 = []
            this.num108 = this.plot108
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw9(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=true,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630
      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning8', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text5.map(item => item.one)[i],
                "y1": text5.map(item => item.two)[i],
                "x2": text6.map(item => item.one)[i],
                "y2": text6.map(item => item.two)[i],
                "x3": text7.map(item => item.one)[i],
                "y3": text7.map(item => item.two)[i],
                "x4": text4.map(item => item.one)[i],
                "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw10(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=true,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630

      this.one = false
      // this.two = true
      this.three = false
      this.four = false

      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning9', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                // "x1": text1.map(item => item.one)[i],
                // "y1": text1.map(item => item.two)[i],
                // "x2": text2.map(item => item.one)[i],
                // "y2": text2.map(item => item.two)[i],
                // "x3": text3.map(item => item.one)[i],
                // "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw11(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=true,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630


      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning10', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                // "x1": text1.map(item => item.one)[i],
                // "y1": text1.map(item => item.two)[i],
                // "x2": text2.map(item => item.one)[i],
                // "y2": text2.map(item => item.two)[i],
                // "x3": text3.map(item => item.one)[i],
                // "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    InsertButton(){
      this.xiugaishangxiaxian=true
    },
    InsertButton2(){
      this.xiugaishangxiaxian2=true
    },
    postDraw12(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=true,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630

      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning11', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            let text10 = res.data[10]
            let text11 = res.data[11]
            let text12 = res.data[12]
            let text13 = res.data[13]
            let text14 = res.data[14]
            let text15 = res.data[15]
            let text16 = res.data[16]
            let text17 = res.data[17]
            let text18 = res.data[18]
            let text19 = res.data[19]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                "x4": text4.map(item => item.one)[i],
                "y4": text4.map(item => item.two)[i],
                "x5": text5.map(item => item.one)[i],
                "y5": text5.map(item => item.two)[i],
                "x6": text6.map(item => item.one)[i],
                "y6": text6.map(item => item.two)[i],
                "x7": text7.map(item => item.one)[i],
                "y7": text7.map(item => item.two)[i],
                "x8": text8.map(item => item.one)[i],
                "y8": text8.map(item => item.two)[i],
                "x9": text9.map(item => item.one)[i],
                "y9": text9.map(item => item.two)[i],
                "x10": text10.map(item => item.one)[i],
                "y10": text10.map(item => item.two)[i],
                "x11": text11.map(item => item.one)[i],
                "y11": text11.map(item => item.two)[i],
                "x12": text12.map(item => item.one)[i],
                "y12": text12.map(item => item.two)[i],
                "x13": text13.map(item => item.one)[i],
                "y13": text13.map(item => item.two)[i],
                "x14": text14.map(item => item.one)[i],
                "y14": text14.map(item => item.two)[i],
                "x15": text15.map(item => item.one)[i],
                "y15": text15.map(item => item.two)[i],
                "x16": text16.map(item => item.one)[i],
                "y16": text16.map(item => item.two)[i],
                "x17": text17.map(item => item.one)[i],
                "y17": text17.map(item => item.two)[i],
                "x18": text18.map(item => item.one)[i],
                "y18": text18.map(item => item.two)[i],
                "x19": text19.map(item => item.one)[i],
                "y19": text19.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw13(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=true,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630



      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning12', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[6]
            let text6 = res.data[7]
            let text7 = res.data[8]
            let text8 = res.data[11]
            let text9 = res.data[13]
            let text10 = res.data[14]
            let text11 = res.data[22]
            let text12 = res.data[26]
            let text13 = res.data[27]
            let text14 = res.data[29]
            let text15 = res.data[32]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                "x4": text4.map(item => item.one)[i],
                "y4": text4.map(item => item.two)[i],
                "x5": text5.map(item => item.one)[i],
                "y5": text5.map(item => item.two)[i],
                "x6": text6.map(item => item.one)[i],
                "y6": text6.map(item => item.two)[i],
                "x7": text7.map(item => item.one)[i],
                "y7": text7.map(item => item.two)[i],
                "x8": text8.map(item => item.one)[i],
                "y8": text8.map(item => item.two)[i],
                "x9": text9.map(item => item.one)[i],
                "y9": text9.map(item => item.two)[i],
                "x10": text10.map(item => item.one)[i],
                "y10": text10.map(item => item.two)[i],
                "x11": text11.map(item => item.one)[i],
                "y11": text11.map(item => item.two)[i],
                "x12": text12.map(item => item.one)[i],
                "y12": text12.map(item => item.two)[i],
                "x13": text13.map(item => item.one)[i],
                "y13": text13.map(item => item.two)[i],
                "x14": text14.map(item => item.one)[i],
                "y14": text14.map(item => item.two)[i],
                "x15": text15.map(item => item.one)[i],
                "y15": text15.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })




      }
    },
    postDraw14(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=true,//OP560
          this.two15=false,//OP590
          this.two16=false,//OP630


      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning13', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                // "x1": text1.map(item => item.one)[i],
                // "y1": text1.map(item => item.two)[i],
                // "x2": text2.map(item => item.one)[i],
                // "y2": text2.map(item => item.two)[i],
                // "x3": text3.map(item => item.one)[i],
                // "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw15(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=true,//OP590
          this.two16=false,//OP630

      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning14', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                // "x1": text1.map(item => item.one)[i],
                // "y1": text1.map(item => item.two)[i],
                // "x2": text2.map(item => item.one)[i],
                // "y2": text2.map(item => item.two)[i],
                // "x3": text3.map(item => item.one)[i],
                // "y3": text3.map(item => item.two)[i],
                // "x4": text4.map(item => item.one)[i],
                // "y4": text4.map(item => item.two)[i],
                // "x5": text5.map(item => item.one)[i],
                // "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    postDraw16(){
      this.two= false,//op460
          this.two2 = false  //OP110
      this.two3=false,//OP160
          this.two4=false,//OP170
          this.two5=false,//OP200
          this. two6=false,//OP240上
          this. two7=false,//OP240xia
          this. two8=false,//OP300
          this.two9=false,//OP340
          this.two10=false,//OP370
          this.two11=false,//OP390
          this.two12=false,//OP510
          this.two13=false,//OP530
          this.two14=false,//OP560
          this.two15=false,//OP590
          this.two16=true,//OP630

      this.one = false
      // this.two = true
      this.three = false
      this.four = false
      let formData = new FormData();
      formData.append('name', this.num0)
      this.textMessage = null
      if(this.num0 !== null){
        requestFormData('/astonish/ning15', formData).then(res => {
          if (res.code === 0) {
            // this.$message.success(res.msg)
            this.textMessage = res.msg
            this.plot4 = []
            let text = res.data[0]
            let text1 = res.data[1]
            let text2 = res.data[2]
            let text3 = res.data[3]
            let text4 = res.data[4]
            let text5 = res.data[5]
            let text6 = res.data[6]
            let text7 = res.data[7]
            let text8 = res.data[8]
            let text9 = res.data[9]
            for (let i = 0; i < text.length; i++) {
              this.plot4.push({
                "x": text.map(item => item.one)[i],
                "y": text.map(item => item.two)[i],
                "x1": text1.map(item => item.one)[i],
                "y1": text1.map(item => item.two)[i],
                "x2": text2.map(item => item.one)[i],
                "y2": text2.map(item => item.two)[i],
                "x3": text3.map(item => item.one)[i],
                "y3": text3.map(item => item.two)[i],
                "x4": text4.map(item => item.one)[i],
                "y4": text4.map(item => item.two)[i],
                "x5": text5.map(item => item.one)[i],
                "y5": text5.map(item => item.two)[i],
                // "x6": text6.map(item => item.one)[i],
                // "y6": text6.map(item => item.two)[i],
                // "x7": text7.map(item => item.one)[i],
                // "y7": text7.map(item => item.two)[i],
                // "x8": text8.map(item => item.one)[i],
                // "y8": text8.map(item => item.two)[i],
                // "x9": text9.map(item => item.one)[i],
                // "y9": text9.map(item => item.two)[i],
                "title": '位移-压力图'
              })
            }
            this.num4 = []
            this.num4 = this.plot4
          } else {
            this.$message.warning(res.msg)
          }
        }).catch(error => {
          alert(error)
        })
      }
    },
    //   缸体分装下线查询
    searchEngine(b) {
      this.engine = this.input
      let formData = new FormData;
      formData.append("no",this.input)
      formData.append("bool",b)
      requestFormData("/abnormalRec/engin",formData).then(response => {
        if (response.code === 0){
          this.subpackages = response.data.subpackages
          this.bool = response.data.isOk
          this.queryList = response.data.queryList
          this.UnqualifiedPoints = response.data.UnqualifiedPoints
          if (!response.data.isOk) {
            this.generateQrCodeMain(this.input,response.data.reason)
            if (b){
              this.onSubmit({
                "engineNumber": response.data.engineNumber,
                "reason": response.data.reason,
                "handledTime": moment((new Date()).toString()).format('YYYY-MM-DD HH:mm:ss')
              })
            }
          }
          this.counter = response.data.counter
          this.reason = response.data.reason
          this.input = ''
        }else {
          Message.error(response.msg)
        }
      })
    },
    //提交不合格记录
    onSubmit(form) {
      request("/cylinder/save", form)
          .then((response) => {
            if (response.code === 0) {
              this.pageQuery()
            } else {
              alert(response.msg)
            }
          })
    }
  }
}
</script>

<style scoped>
/deep/ .el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
  text-align: center;
}
table{
  empty-cells: show;
  border-collapse: collapse;
}
table tr th{
  border: 1px solid #2e54a1;
  border-left: none;
}
table tr td{
  border: 1px solid #2e54a1;
  border-left: none;
}
/deep/ .el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
  padding-bottom: 2px;
}

/deep/ .el-descriptions .is-bordered .el-descriptions-item__cell {
  border: 1px solid #EBEEF5;
  padding: 3px 2px;
}
/*.el-submenu.is-active .el-submenu__title {*/
/*  border-bottom-color: #409EFF;*/
/*  margin-bottom: -22px;*/
/*}*/
.el-submenu__title {
  font-size: 14px;
  color: #303133;
  padding: 0 20px;
  cursor: pointer;
  transition: border-color .3s,background-color .3s,color .3s;
  box-sizing: border-box;
  margin-bottom: -20px;
}
</style>
  • 9
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值