<template>
  <div class="app-container">
    <el-card>
      <el-tabs v-model="PartType" style="height: 950px;padding: 0" type="border-card">
        <el-tab-pane label="产品信息维护" name="产品信息维护">
          <el-col>
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd('department_Form')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable()">删除</el-button>
          </el-col>
          <el-card class="box-card" style="width: 400px;height: 720px">
            <div slot="header" class="clearfix">
              <span>产品维护</span>
              <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL()">展开</el-button>
            </div>
            <div style="height: 650px;overflow:auto;">
              <el-tree
                ref="treeForm"
                :data="departmentData"
                :props="defaultProps"
                :default-expanded-keys="expandedList"
                :allow-drop="allowDrop"
                draggable
                show-checkbox
                node-key="id"
                check-strictly
                @node-drag-start="aaaaa"
                @node-drag-end="sortDrag"
                @node-expand="nodeExpand"
                @node-collapse="nodeCollapse"
                @check-change="handleClick"/>
            </div>
          </el-card>
        </el-tab-pane>
        <el-tab-pane label="动力头产品信息维护" name="动力头产品信息维护">
          <el-col style="width: 340px">
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd1('department_Form1')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit1()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable1()">删除</el-button>
            <el-card class="box-card" style="min-height: 700px; max-height: 743px;width: 330px">
              <div slot="header" class="clearfix">
                <span>电机型号维护</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL1()">展开</el-button>
              </div>
              <div style="height: 650px;overflow:auto">
                <el-tree
                  ref="treeForm1"
                  :data="departmentData1"
                  :props="defaultProps1"
                  :default-expanded-keys="expandedList1"
                  :allow-drop="allowDrop"
                  draggable
                  show-checkbox
                  node-key="id"
                  check-strictly
                  @node-drag-end="sortDrag1"
                  @node-expand="nodeExpand1"
                  @node-collapse="nodeCollapse1"
                  @check-change="handleClick1"/>
              </div>
            </el-card>
          </el-col>
          <el-col style="width: 340px">
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd2('department_Form')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit2()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable2()">删除</el-button>
            <el-card class="box-card" style="min-height: 700px; max-height: 743px;width: 330px">
              <div slot="header" class="clearfix">
                <span>轴承型号维护</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL2()">展开</el-button>
              </div>
              <div style="height: 650px;overflow:auto">
                <el-tree
                  ref="treeForm2"
                  :data="departmentData2"
                  :props="defaultProps2"
                  :default-expanded-keys="expandedList2"
                  :allow-drop="allowDrop"
                  draggable
                  show-checkbox
                  node-key="id"
                  check-strictly
                  @node-drag-end="sortDrag2"
                  @node-expand="nodeExpand2"
                  @node-collapse="nodeCollapse2"
                  @check-change="handleClick2"/>
              </div>
            </el-card>
          </el-col>
          <el-col style="width: 340px">
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd3('department_Form')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit3()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable3()">删除</el-button>
            <el-card class="box-card" style="min-height: 700px; max-height: 743px;width: 330px">
              <div slot="header" class="clearfix">
                <span>传动方式维护</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL3()">展开</el-button>
              </div>
              <div style="height: 650px;overflow:auto">
                <el-tree
                  ref="treeForm3"
                  :data="departmentData3"
                  :props="defaultProps3"
                  :default-expanded-keys="expandedList3"
                  :allow-drop="allowDrop"
                  draggable
                  show-checkbox
                  node-key="id"
                  check-strictly
                  @node-drag-end="sortDrag3"
                  @node-expand="nodeExpand3"
                  @node-collapse="nodeCollapse3"
                  @check-change="handleClick3"/>
              </div>
            </el-card>
          </el-col>
          <el-col style="width: 351px;margin-left: 10px">
            <div>
              <el-table v-loading="loading" :data="tableData11" highlight-current-row border stripe size="small" height="250" style="width: 351px">
                <el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
                <el-table-column :width="setColumnWidth('物料名称')" label="安装方向" align="center" show-overflow-tooltip>
                  <template slot-scope="scope">
                    <template v-if="scope.row.edit">
                      <el-input v-model="scope.row.安装方向" style="width:97%;margin-right:3px" clearable size="mini" />
                    </template>
                    <span v-else>{{ scope.row.安装方向 }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit11(scope.row)">确定</el-button>
                    <el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit11(scope.$index, scope.row)">取消</el-button>
                    <el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-delete" @click="handleDelete11(scope.row)"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-top" @click="upOne1(scope.row)"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-bottom" @click="downOne1(scope.row)"/>
                  </template>
                </el-table-column>
              </el-table>
              <el-button icon="el-icon-circle-plus-outline" size="mini" @click="createProductInformation11"/>
            </div>
          </el-col>
          <el-col style="width: 351px;margin-left: 10px">
            <div>
              <el-table v-loading="loading" :data="tableData5" highlight-current-row border stripe size="small" height="250" style="width: 351px">
                <el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
                <el-table-column :width="setColumnWidth('物料名称')" label="中心内冷" align="center" show-overflow-tooltip>
                  <template slot-scope="scope">
                    <template v-if="scope.row.edit">
                      <el-input v-model="scope.row.中心内冷" style="width:97%;margin-right:3px" clearable size="mini" />
                    </template>
                    <span v-else>{{ scope.row.中心内冷 }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit5(scope.row)">确定</el-button>
                    <el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit5(scope.$index, scope.row)">取消</el-button>
                    <el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-delete" @click="handleDelete5(scope.row)"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-top" @click="upOne2(scope.row)"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-bottom" @click="downOne2(scope.row)"/>
                  </template>
                </el-table-column>
              </el-table>
              <el-button icon="el-icon-circle-plus-outline" size="mini" @click="createProductInformation5"/>
            </div>
          </el-col>
          <el-col style="width: 351px;margin-left: 10px">
            <div>
              <el-table v-loading="loading" :data="tableData13" highlight-current-row border stripe size="small" height="250" style="width: 351px">
                <el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
                <el-table-column :width="setColumnWidth('物料名称')" label="拉杆" align="center" show-overflow-tooltip>
                  <template slot-scope="scope">
                    <template v-if="scope.row.edit">
                      <el-input v-model="scope.row.拉杆" style="width:97%;margin-right:3px" clearable size="mini" />
                    </template>
                    <span v-else>{{ scope.row.拉杆 }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit13(scope.row)">确定</el-button>
                    <el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit13(scope.$index, scope.row)">取消</el-button>
                    <el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-delete" @click="handleDelete13(scope.row)"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-top" @click="upOne3(scope.row)"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-bottom" @click="downOne3(scope.row)"/>
                  </template>
                </el-table-column>
              </el-table>
              <el-button icon="el-icon-circle-plus-outline" size="mini" @click="createProductInformation13"/>
            </div>
          </el-col>
        </el-tab-pane>
        <el-tab-pane label="滑台产品信息维护" name="滑台产品信息维护">
          <el-col style="width: 350px">
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd4('department_Form4')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit4()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable4()">删除</el-button>
            <el-card class="box-card" style="min-height: 700px; max-height: 743px;width: 330px">
              <div slot="header" class="clearfix">
                <span>电机维护</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL4()">展开</el-button>
              </div>
              <div style="height: 650px;overflow:auto">
                <el-tree
                  ref="treeForm4"
                  :data="departmentData4"
                  :props="defaultProps4"
                  :default-expanded-keys="expandedList4"
                  :allow-drop="allowDrop"
                  draggable
                  show-checkbox
                  node-key="id"
                  check-strictly
                  @node-drag-end="sortDrag4"
                  @node-expand="nodeExpand4"
                  @node-collapse="nodeCollapse4"
                  @check-change="handleClick4"/>
              </div>
            </el-card>
          </el-col>
          <el-col style="width: 350px">
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd5('department_Form5')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit5()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable5()">删除</el-button>
            <el-card class="box-card" style="min-height: 700px; max-height: 743px;width: 330px">
              <div slot="header" class="clearfix">
                <span>电机连接板维护</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL5()">展开</el-button>
              </div>
              <div style="height: 650px;overflow:auto">
                <el-tree
                  ref="treeForm5"
                  :data="departmentData5"
                  :props="defaultProps5"
                  :default-expanded-keys="expandedList5"
                  :allow-drop="allowDrop"
                  draggable
                  show-checkbox
                  node-key="id"
                  check-strictly
                  @node-drag-end="sortDrag5"
                  @node-expand="nodeExpand5"
                  @node-collapse="nodeCollapse5"
                  @check-change="handleClick5"/>
              </div>
            </el-card>
          </el-col>
          <el-col style="width: 350px">
            <el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd6('department_Form')">新增</el-button>
            <el-button type="warning" icon="el-icon-edit" size="small" plain @click="handleEdit6()">编辑</el-button>
            <el-button type="danger" icon="el-icon-delete" size="small" plain @click="deleteTable6()">删除</el-button>
            <el-card class="box-card" style="min-height: 700px; max-height: 743px;width: 330px">
              <div slot="header" class="clearfix">
                <span>联轴器维护</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="expandALL6()">展开</el-button>
              </div>
              <div style="height: 650px;overflow:auto">
                <el-tree
                  ref="treeForm6"
                  :data="departmentData6"
                  :props="defaultProps6"
                  :default-expanded-keys="expandedList6"
                  :allow-drop="allowDrop"
                  draggable
                  show-checkbox
                  node-key="id"
                  check-strictly
                  @node-drag-end="sortDrag6"
                  @node-expand="nodeExpand6"
                  @node-collapse="nodeCollapse6"
                  @check-change="handleClick6"/>
              </div>
            </el-card>
          </el-col>
          <el-col style="width: 511px;margin-left: 10px">
            <div style="margin-top: 35px">
              <el-table v-loading="loading" :data="tableData7" highlight-current-row border stripe size="small" height="700" style="width: 501px">
                <el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center"/>
                <el-table-column label="防护类型" align="center" show-overflow-tooltip>
                  <template slot-scope="scope">
                    <template v-if="scope.row.edit">
                      <el-input v-model="scope.row.防护类型" style="width:97%;margin-right:3px" clearable size="mini" />
                    </template>
                    <span v-else>{{ scope.row.防护类型 }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit7(scope.row)">确定</el-button>
                    <el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit7(scope.$index, scope.row)">取消</el-button>
                    <el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit"/>
                    <el-button v-if="!scope.row.edit" type="text" size="mini" icon="el-icon-delete" @click="handleDelete7(scope.row)"/>
                    <el-popover
                      :ref="`popoverCode${scope.$index}`"
                      placement="top"
                      width="140"
                      style="margin-left: 10px">
                      <span>调至</span><el-input v-model="inputNumber" min="1" size="small" type="number" style="width: 50px;margin-bottom: 10px;margin-left: 10px"/>
                      <div style="text-align: right; margin: 0">
                        <el-button size="mini" type="text" @click="close(scope.$index)">取消</el-button>
                        <el-button type="primary" size="mini" @click="upOne4(scope.row)">确定</el-button>
                      </div>
                      <el-button v-if="!scope.row.edit" slot="reference" type="text" size="mini" icon="el-icon-top" @click="$refs[`popoverCode${scope.$index}`].visibillty = true;inputNumber=scope.row.排序顺序"/>
                    </el-popover>
                  </template>
                </el-table-column>
              </el-table>
              <el-button icon="el-icon-circle-plus-outline" size="mini" @click="createProductInformation7"/>
            </div>
          </el-col>
        </el-tab-pane>
      </el-tabs>
    </el-card>
    <el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="350px">
      <el-form ref="form" :model="form1" :rules="rules1" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="动力头名称:" prop="动力头名称">
              <el-input v-model="form1.动力头名称" clearable size="small" style="width:200px" placeholder="请输入动力头名称"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation1('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogFormVisible2" center width="350px">
      <el-form ref="form" :model="form2" :rules="rules2" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="电机功率:" prop="电机功率">
              <el-input v-model="form2.电机功率" clearable size="small" style="width:200px" placeholder="请输入电机功率"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation2('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title3" :visible.sync="dialogFormVisible3" center width="350px">
      <el-form ref="form" :model="form3" :rules="rules3" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="轴承型号:" prop="轴承型号">
              <el-input v-model="form3.轴承型号" clearable size="small" style="width:200px" placeholder="请输入轴承型号"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation3('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title4" :visible.sync="dialogFormVisible4" center width="350px">
      <el-form ref="form" :model="form4" :rules="rules4" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="电机转速:" prop="电机转速">
              <el-input v-model="form4.电机转速" clearable size="small" style="width:200px" placeholder="请输入电机转速"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation4('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title5" :visible.sync="dialogFormVisible5" center width="350px">
      <el-form ref="form" :model="form5" :rules="rules5" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="中心内冷:" prop="中心内冷">
              <el-input v-model="form5.中心内冷" clearable size="small" style="width:200px" placeholder="请输入中心内冷"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation5('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title6" :visible.sync="dialogFormVisible6" center width="350px">
      <el-form ref="form" :model="form6" :rules="rules6" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="滑台名称:" prop="滑台名称">
              <el-input v-model="form6.滑台名称" clearable size="small" style="width:200px" placeholder="请输入滑台名称"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation6('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title7" :visible.sync="dialogFormVisible7" center width="350px">
      <el-form ref="form" :model="form7" :rules="rules7" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="防护类型:" prop="防护类型">
              <el-input v-model="form7.防护类型" clearable size="small" style="width:200px" placeholder="请输入防护类型"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation7('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title8" :visible.sync="dialogFormVisible8" center width="350px">
      <el-form ref="form" :model="form8" :rules="rules8" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="电机联接板:" prop="电机联接板">
              <el-input v-model="form8.电机联接板" clearable size="small" style="width:200px" placeholder="请输入电机联接板"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation8('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title9" :visible.sync="dialogFormVisible9" center width="350px">
      <el-form ref="form" :model="form9" :rules="rules9" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="电机型号:" prop="电机型号">
              <el-input v-model="form9.电机型号" clearable size="small" style="width:200px" placeholder="请输入电机型号"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation9('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title10" :visible.sync="dialogFormVisible10" center width="350px">
      <el-form ref="form" :model="form10" :rules="rules10" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="联轴器:" prop="联轴器">
              <el-input v-model="form10.联轴器" clearable size="small" style="width:200px" placeholder="请输入联轴器"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation10('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title11" :visible.sync="dialogFormVisible11" center width="350px">
      <el-form ref="form" :model="form11" :rules="rules11" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="安装方向:" prop="安装方向">
              <el-input v-model="form11.安装方向" clearable size="small" style="width:200px" placeholder="请输入安装方向"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation11('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title12" :visible.sync="dialogFormVisible12" center width="350px">
      <el-form ref="form" :model="form12" :rules="rules12" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="级别:" prop="级别">
              <el-input v-model="form12.级别" clearable size="small" style="width:200px" placeholder="请输入级别"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation12('form')">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog v-el-drag-dialog :title="title13" :visible.sync="dialogFormVisible13" center width="350px">
      <el-form ref="form" :model="form13" :rules="rules13" label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
        <el-row>
          <el-col :span="12">
            <el-form-item label="拉杆:" prop="拉杆">
              <el-input v-model="form13.拉杆" clearable size="small" style="width:200px" placeholder="请输入拉杆"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="callOff()">取消</el-button>
        <el-button type="distribution" size="small" @click="addProductInformation13('form')">确 定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑产品-->
    <el-dialog v-el-drag-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form" :model="department_Form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="产品名称" prop="DepartmentName">
          <el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title==='新增产品'" :disabled="handleAdd_disable" type="primary" @click="submitAdd('department_Form')">确定</el-button>
        <el-button v-else-if="department_Title==='编辑产品'" :disabled="handleAdd_disable" type="primary" @click="submitEdit('department_Form')">确定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑电机-->
    <el-dialog v-el-drag-dialog :title="department_Title1" :visible.sync="department_DFV1" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form1" :model="department_Form1" :rules="rules20" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="电机型号" prop="DepartmentName">
          <el-input v-model="department_Form1.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title1==='新增电机'" :disabled="handleAdd_disable1" type="primary" @click="submitAdd1('department_Form1')">确定</el-button>
        <el-button v-else-if="department_Title1==='编辑电机'" :disabled="handleAdd_disable1" type="primary" @click="submitEdit1('department_Form1')">确定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑轴承-->
    <el-dialog v-el-drag-dialog :title="department_Title2" :visible.sync="department_DFV2" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form2" :model="department_Form2" :rules="rules30" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="轴承型号" prop="DepartmentName">
          <el-input v-model="department_Form2.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title2==='新增轴承型号'" :disabled="handleAdd_disable2" type="primary" @click="submitAdd2('department_Form2')">确定</el-button>
        <el-button v-else-if="department_Title2==='编辑轴承型号'" :disabled="handleAdd_disable2" type="primary" @click="submitEdit2('department_Form2')">确定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑传动方式-->
    <el-dialog v-el-drag-dialog :title="department_Title3" :visible.sync="department_DFV3" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form3" :model="department_Form3" :rules="rules40" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="传动方式" prop="DepartmentName">
          <el-input v-model="department_Form3.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title3==='新增传动方式'" :disabled="handleAdd_disable3" type="primary" @click="submitAdd3('department_Form3')">确定</el-button>
        <el-button v-else-if="department_Title3==='编辑传动方式'" :disabled="handleAdd_disable3" type="primary" @click="submitEdit3('department_Form3')">确定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑滑台电机-->
    <el-dialog v-el-drag-dialog :title="department_Title4" :visible.sync="department_DFV4" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form4" :model="department_Form4" :rules="rules50" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="电机" prop="DepartmentName">
          <el-input v-model="department_Form4.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title4==='新增电机'" :disabled="handleAdd_disable4" type="primary" @click="submitAdd4('department_Form4')">确定</el-button>
        <el-button v-else-if="department_Title4==='编辑电机'" :disabled="handleAdd_disable4" type="primary" @click="submitEdit4('department_Form4')">确定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑电机联接板-->
    <el-dialog v-el-drag-dialog :title="department_Title5" :visible.sync="department_DFV5" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form5" :model="department_Form5" :rules="rules60" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="电机联接板" prop="DepartmentName">
          <el-input v-model="department_Form5.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title5==='新增电机联接板'" :disabled="handleAdd_disable5" type="primary" @click="submitAdd5('department_Form5')">确定</el-button>
        <el-button v-else-if="department_Title5==='编辑电机联接板'" :disabled="handleAdd_disable5" type="primary" @click="submitEdit5('department_Form5')">确定</el-button>
      </div>
    </el-dialog>
    <!--新增和编辑联轴器-->
    <el-dialog v-el-drag-dialog :title="department_Title6" :visible.sync="department_DFV6" center style="min-height: 200px" width="400px">
      <el-form ref="department_Form6" :model="department_Form6" :rules="rules70" label-position="left" label-width="110px" class="demo-ruleForm">
        <el-form-item label="联轴器" prop="DepartmentName">
          <el-input v-model="department_Form6.DepartmentName" size="small" style="width:200px"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button v-if="department_Title6==='新增联轴器'" :disabled="handleAdd_disable6" type="primary" @click="submitAdd6('department_Form6')">确定</el-button>
        <el-button v-else-if="department_Title6==='编辑联轴器'" :disabled="handleAdd_disable6" type="primary" @click="submitEdit6('department_Form6')">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import { tree } from '@/api/BasicData/PersonnelManagement'
export default {
  data() {
    return {
      inputNumber: 1,
      visible: false,
      startInt: '', // 开始拖拽点
      handleAdd_disable: false,
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      departmentData: [],
      expandAll: true,
      handleAdd_disable1: false,
      defaultProps1: {
        children: 'children',
        label: 'label'
      },
      departmentData1: [],
      expandAll1: true,
      department_Form: {
        DepartmentName: ''
      },
      department_Form1: {
        DepartmentName: ''
      },
      department_Title: '',
      department_DFV: false,
      department_Title1: '',
      department_DFV1: false,
      handleAdd_disable2: false,
      defaultProps2: {
        children: 'children',
        label: 'label'
      },
      departmentData2: [],
      expandAll2: true,
      department_Form2: {
        DepartmentName: ''
      },
      department_Title2: '',
      department_DFV2: false,
      handleAdd_disable3: false,
      defaultProps3: {
        children: 'children',
        label: 'label'
      },
      departmentData3: [],
      expandAll3: true,
      department_Form3: {
        DepartmentName: ''
      },
      department_Title3: '',
      department_DFV3: false,
      handleAdd_disable4: false,
      defaultProps4: {
        children: 'children',
        label: 'label'
      },
      departmentData4: [],
      expandAll4: true,
      department_Form4: {
        DepartmentName: ''
      },
      department_Title4: '',
      department_DFV4: false,
      handleAdd_disable5: false,
      defaultProps5: {
        children: 'children',
        label: 'label'
      },
      departmentData5: [],
      expandAll5: true,
      department_Form5: {
        DepartmentName: ''
      },
      department_Title5: '',
      department_DFV5: false,
      handleAdd_disable6: false,
      defaultProps6: {
        children: 'children',
        label: 'label'
      },
      departmentData6: [],
      expandAll6: true,
      department_Form6: {
        DepartmentName: ''
      },
      department_Title6: '',
      department_DFV6: false,
      nodeName: '',
      motorModel: '',
      motorModelId: '',
      BearingModel: '',
      BearingModelId: '',
      TransmissionMode: '',
      TransmissionModeId: '',
      motorModel1: '',
      motorModelId1: '',
      ConnectingPlate: '',
      ConnectingPlateId: '',
      coupling: '',
      couplingId: '',
      rules: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      rules20: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      rules30: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      rules40: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      rules50: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      rules60: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      rules70: {
        DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
      },
      i: 1,
      j: 1,
      k: 1,
      l: 1,
      m: 1,
      n: 1,
      p: 1,
      productId: 0,
      expandedList: [],
      expandedList1: [],
      expandedList2: [],
      expandedList3: [],
      expandedList4: [],
      expandedList5: [],
      expandedList6: [],
      loading: false,
      total: 0,
      PartType: '产品信息维护',
      tableData1: [],
      tableData2: [],
      tableData3: [],
      tableData4: [],
      tableData5: [],
      tableData6: [],
      tableData7: [],
      tableData8: [],
      tableData9: [],
      tableData10: [],
      tableData11: [],
      tableData12: [],
      tableData13: [],
      title1: '',
      dialogFormVisible1: false,
      title2: '',
      dialogFormVisible2: false,
      title3: '',
      dialogFormVisible3: false,
      title4: '',
      dialogFormVisible4: false,
      title5: '',
      dialogFormVisible5: false,
      title6: '',
      dialogFormVisible6: false,
      title7: '',
      dialogFormVisible7: false,
      title8: '',
      dialogFormVisible8: false,
      title9: '',
      dialogFormVisible9: false,
      title10: '',
      dialogFormVisible10: false,
      title11: '',
      dialogFormVisible11: false,
      title12: '',
      dialogFormVisible12: false,
      title13: '',
      dialogFormVisible13: false,
      form1: {
        动力头名称: ''
      },
      rules1: {
        动力头名称: [{ required: true, message: '动力头名称' }]
      },
      form2: {
        电机功率: ''
      },
      rules2: {
        电机功率: [{ required: true, message: '电机功率' }]
      },
      form3: {
        轴承型号: ''
      },
      rules3: {
        轴承型号: [{ required: true, message: '轴承型号' }]
      },
      form4: {
        电机转速: ''
      },
      rules4: {
        电机转速: [{ required: true, message: '电机转速' }]
      },
      form5: {
        中心内冷: ''
      },
      rules5: {
        中心内冷: [{ required: true, message: '中心内冷' }]
      },
      form6: {
        滑台名称: ''
      },
      rules6: {
        滑台名称: [{ required: true, message: '滑台名称' }]
      },
      form7: {
        防护类型: ''
      },
      rules7: {
        防护类型: [{ required: true, message: '防护类型' }]
      },
      form8: {
        电机联接板: ''
      },
      rules8: {
        电机联接板: [{ required: true, message: '电机联接板' }]
      },
      form9: {
        电机型号: ''
      },
      rules9: {
        电机型号: [{ required: true, message: '电机型号' }]
      },
      form10: {
        联轴器: ''
      },
      rules10: {
        联轴器: [{ required: true, message: '联轴器' }]
      },
      form11: {
        安装方向: ''
      },
      rules11: {
        安装方向: [{ required: true, message: '安装方向' }]
      },
      form12: {
        级别: ''
      },
      rules12: {
        级别: [{ required: true, message: '级别' }]
      },
      form13: {
        拉杆: ''
      },
      rules13: {
        拉杆: [{ required: true, message: '拉杆' }]
      },
      pageCurrent: 1,
      pageSize: 100,
      orderName: '',
      order: ''
    }
  },
  computed: {
    ...mapGetters([
      'id',
      'token'
    ])
  },
  created() {
    this.searchTable1()
    this.searchTable2()
    this.searchTable3()
    this.searchTable4()
    this.searchTable5()
    this.searchTable6()
    this.searchTable7()
    this.searchTable8()
    this.searchTable9()
    this.searchTable10()
    this.searchTable11()
    this.searchTable12()
    this.searchTable13()
    this.getTreeData()
    this.getTreeData1()
    this.getTreeData2()
    this.getTreeData3()
    this.getTreeData4()
    this.getTreeData5()
    this.getTreeData6()
  },
  methods: {
    aaaaa(Node, event) {
      // console.log(Node)
    },
    close(index) {
      this.$refs[`popoverCode${index}`].doClose()
    },
    close1(index) {
      this.$refs[`popover${index}`].doClose()
    },
    // 节点拖拽排序
    sortDrag(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '产品关系_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    // 节点拖拽排序1
    sortDrag1(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '电机型号_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData1()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    // 节点拖拽排序2
    sortDrag2(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '轴承型号_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData2()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    // 节点拖拽排序3
    sortDrag3(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '传动方式_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData3()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    // 节点拖拽排序4
    sortDrag4(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '滑台电机_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData4()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    // 节点拖拽排序5
    sortDrag5(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '联接板_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData5()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    // 节点拖拽排序6
    sortDrag6(Node, targetNode, type, event) {
      // console.log(Node, targetNode, type)
      let PId = 0
      if (targetNode.parent.key) {
        PId = targetNode.parent.key
      }
      var param = []
      param[0] = ['原始位置', Node.data.id]
      param[1] = ['最终位置', targetNode.data.id]
      param[2] = ['父节点', PId]
      var Data = this.CreateData('12', '联轴器_变更节点排序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message.success('更新成功')
          this.getTreeData5()
        } else {
          this.$message.error('更新失败')
        }
      })
    },
    allowDrop(draggingNode, dropNode, type) {
      if (type === 'inner') {
        return false
      } else {
        if (draggingNode.parent.id !== dropNode.parent.id) {
          return false
        } else {
          return true
        }
      }
    },
    expandALL() {
      this.expandAll = !this.expandAll
      for (let i = 0; i < this.$refs.treeForm.store._getAllNodes().length; i++) {
        this.$refs.treeForm.store._getAllNodes()[i].expanded = this.expandAll
      }
    },
    getTreeData() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '产品关系_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData = tree(data, 0)
      })
    },
    expandALL1() {
      this.expandAll1 = !this.expandAll1
      for (let i = 0; i < this.$refs.treeForm1.store._getAllNodes().length; i++) {
        this.$refs.treeForm1.store._getAllNodes()[i].expanded = this.expandAll1
      }
    },
    getTreeData1() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '电机型号_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData1 = tree(data, 0)
      })
    },
    expandALL2() {
      this.expandAll2 = !this.expandAll2
      for (let i = 0; i < this.$refs.treeForm2.store._getAllNodes().length; i++) {
        this.$refs.treeForm2.store._getAllNodes()[i].expanded = this.expandAll2
      }
    },
    getTreeData2() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '轴承型号_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData2 = tree(data, 0)
      })
    },
    expandALL3() {
      this.expandAll3 = !this.expandAll3
      for (let i = 0; i < this.$refs.treeForm3.store._getAllNodes().length; i++) {
        this.$refs.treeForm3.store._getAllNodes()[i].expanded = this.expandAll3
      }
    },
    getTreeData3() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '传动方式_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData3 = tree(data, 0)
      })
    },
    expandALL4() {
      this.expandAll4 = !this.expandAll4
      for (let i = 0; i < this.$refs.treeForm4.store._getAllNodes().length; i++) {
        this.$refs.treeForm4.store._getAllNodes()[i].expanded = this.expandAll4
      }
    },
    getTreeData4() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '滑台电机_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData4 = tree(data, 0)
      })
    },
    expandALL5() {
      this.expandAll5 = !this.expandAll5
      for (let i = 0; i < this.$refs.treeForm5.store._getAllNodes().length; i++) {
        this.$refs.treeForm5.store._getAllNodes()[i].expanded = this.expandAll5
      }
    },
    getTreeData5() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '联接板_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData5 = tree(data, 0)
      })
    },
    expandALL6() {
      this.expandAll6 = !this.expandAll6
      for (let i = 0; i < this.$refs.treeForm6.store._getAllNodes().length; i++) {
        this.$refs.treeForm6.store._getAllNodes()[i].expanded = this.expandAll6
      }
    },
    getTreeData6() {
      var param = []
      param[0] = ['子节点', 0]
      var Data = this.CreateData('11', '联轴器_查询节点', param)
      this.ExecDatabase(Data).then(response => {
        const data = response.data
        this.departmentData6 = tree(data, 0)
      })
    },
    nodeExpand(data) {
      console.log(this.departmentData, 55555)
      this.expandedList.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse(data) {
      this.expandedList.splice(this.expandedList.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick(data, checked) {
      if (this.$refs.treeForm.getCheckedKeys().length !== 0 && this.$refs.treeForm.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm.getCheckedKeys()
        if (data.length === 1) {
          this.productId = data[0]
        }
        this.nodeName = this.$refs.treeForm.getCheckedNodes()[0].label
      } else {
        this.productId = 0
      }
      this.i++
      if (this.i % 2 === 1) {
        if (checked) {
          this.$refs.treeForm.setCheckedNodes([data])
        } else {
          this.$refs.treeForm.setCheckedNodes([])
        }
      }
    },
    nodeExpand1(data) {
      this.expandedList1.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse1(data) {
      this.expandedList1.splice(this.expandedList1.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick1(data, checked) {
      if (this.$refs.treeForm1.getCheckedKeys().length !== 0 && this.$refs.treeForm1.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm1.getCheckedKeys()
        if (data.length === 1) {
          this.motorModelId = data[0]
        }
        this.motorModel = this.$refs.treeForm1.getCheckedNodes()[0].label
      } else {
        this.motorModelId = ''
      }
      this.j++
      if (this.j % 2 === 1) {
        if (checked) {
          this.$refs.treeForm1.setCheckedNodes([data])
        } else {
          this.$refs.treeForm1.setCheckedNodes([])
        }
      }
    },
    nodeExpand2(data) {
      this.expandedList2.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse2(data) {
      this.expandedList2.splice(this.expandedList2.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick2(data, checked) {
      if (this.$refs.treeForm2.getCheckedKeys().length !== 0 && this.$refs.treeForm2.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm2.getCheckedKeys()
        if (data.length === 1) {
          this.BearingModelId = data[0]
        }
        this.BearingModel = this.$refs.treeForm2.getCheckedNodes()[0].label
      } else {
        this.BearingModelId = ''
      }
      this.k++
      if (this.k % 2 === 1) {
        if (checked) {
          this.$refs.treeForm2.setCheckedNodes([data])
        } else {
          this.$refs.treeForm2.setCheckedNodes([])
        }
      }
    },
    nodeExpand3(data) {
      this.expandedList3.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse3(data) {
      this.expandedList3.splice(this.expandedList3.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick3(data, checked) {
      if (this.$refs.treeForm3.getCheckedKeys().length !== 0 && this.$refs.treeForm3.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm3.getCheckedKeys()
        if (data.length === 1) {
          this.TransmissionModeId = data[0]
        }
        this.TransmissionMode = this.$refs.treeForm3.getCheckedNodes()[0].label
      } else {
        this.TransmissionModeId = ''
      }
      this.l++
      if (this.l % 2 === 1) {
        if (checked) {
          this.$refs.treeForm3.setCheckedNodes([data])
        } else {
          this.$refs.treeForm3.setCheckedNodes([])
        }
      }
    },
    nodeExpand4(data) {
      this.expandedList4.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse4(data) {
      this.expandedList4.splice(this.expandedList4.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick4(data, checked) {
      if (this.$refs.treeForm4.getCheckedKeys().length !== 0 && this.$refs.treeForm4.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm4.getCheckedKeys()
        if (data.length === 1) {
          this.motorModelId1 = data[0]
        }
        this.motorModel1 = this.$refs.treeForm4.getCheckedNodes()[0].label
      } else {
        this.motorModelId1 = ''
      }
      this.m++
      if (this.m % 2 === 1) {
        if (checked) {
          this.$refs.treeForm4.setCheckedNodes([data])
        } else {
          this.$refs.treeForm4.setCheckedNodes([])
        }
      }
    },
    nodeExpand5(data) {
      this.expandedList5.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse5(data) {
      this.expandedList5.splice(this.expandedList5.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick5(data, checked) {
      if (this.$refs.treeForm5.getCheckedKeys().length !== 0 && this.$refs.treeForm5.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm5.getCheckedKeys()
        if (data.length === 1) {
          this.ConnectingPlateId = data[0]
        }
        this.ConnectingPlate = this.$refs.treeForm5.getCheckedNodes()[0].label
      } else {
        this.ConnectingPlateId = ''
      }
      this.n++
      if (this.n % 2 === 1) {
        if (checked) {
          this.$refs.treeForm5.setCheckedNodes([data])
        } else {
          this.$refs.treeForm5.setCheckedNodes([])
        }
      }
    },
    nodeExpand6(data) {
      this.expandedList6.push(data.id) // 在节点展开是添加到默认展开数组
    },
    nodeCollapse6(data) {
      this.expandedList6.splice(this.expandedList6.indexOf(data.id), 1) // 收起时删除数组里对应选项
    },
    handleClick6(data, checked) {
      if (this.$refs.treeForm6.getCheckedKeys().length !== 0 && this.$refs.treeForm6.getCheckedNodes().length !== 0) {
        const data = this.$refs.treeForm6.getCheckedKeys()
        if (data.length === 1) {
          this.couplingId = data[0]
        }
        this.coupling = this.$refs.treeForm6.getCheckedNodes()[0].label
      } else {
        this.couplingId = ''
      }
      this.p++
      if (this.p % 2 === 1) {
        if (checked) {
          this.$refs.treeForm6.setCheckedNodes([data])
        } else {
          this.$refs.treeForm6.setCheckedNodes([])
        }
      }
    },
    handleAdd(formName) {
      this.department_Form.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title = '新增产品'
      this.handleAdd_disable = false
      this.department_DFV = true
    },
    handleEdit() {
      this.addForm('department_Form')
      if (this.productId) {
        this.department_Title = '编辑产品'
        this.department_Form.DepartmentName = this.nodeName
        this.handleAdd_disable = false
        this.department_DFV = true
      } else {
        this.$message.warning(`请选择要修改的产品`)
      }
    },
    handleAdd1(formName) {
      this.department_Form1.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title1 = '新增电机'
      this.handleAdd_disable1 = false
      this.department_DFV1 = true
    },
    handleEdit1() {
      this.addForm('department_Form1')
      if (this.motorModelId) {
        this.department_Title1 = '编辑电机'
        this.department_Form1.DepartmentName = this.motorModel
        this.handleAdd_disable1 = false
        this.department_DFV1 = true
      } else {
        this.$message.warning(`请选择要修改的电机`)
      }
    },
    handleAdd2(formName) {
      this.department_Form2.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title2 = '新增轴承型号'
      this.handleAdd_disable2 = false
      this.department_DFV2 = true
    },
    handleEdit2() {
      this.addForm('department_Form2')
      if (this.BearingModelId) {
        this.department_Title2 = '编辑轴承型号'
        this.department_Form2.DepartmentName = this.BearingModel
        this.handleAdd_disable2 = false
        this.department_DFV2 = true
      } else {
        this.$message.warning(`请选择要修改的轴承`)
      }
    },
    handleAdd3(formName) {
      this.department_Form3.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title3 = '新增传动方式'
      this.handleAdd_disable3 = false
      this.department_DFV3 = true
    },
    handleEdit3() {
      this.addForm('department_Form3')
      if (this.TransmissionModeId) {
        this.department_Title3 = '编辑传动方式'
        this.department_Form3.DepartmentName = this.TransmissionMode
        this.handleAdd_disable3 = false
        this.department_DFV3 = true
      } else {
        this.$message.warning(`请选择要修改的传动方式`)
      }
    },
    handleAdd4(formName) {
      this.department_Form4.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title4 = '新增电机'
      this.handleAdd_disable4 = false
      this.department_DFV4 = true
    },
    handleEdit4() {
      this.addForm('department_Form4')
      if (this.motorModelId1) {
        this.department_Title4 = '编辑电机'
        this.department_Form4.DepartmentName = this.motorModel1
        this.handleAdd_disable4 = false
        this.department_DFV4 = true
      } else {
        this.$message.warning(`请选择要修改的传动方式`)
      }
    },
    handleAdd5(formName) {
      this.department_Form5.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title5 = '新增电机联接板'
      this.handleAdd_disable5 = false
      this.department_DFV5 = true
    },
    handleEdit5() {
      this.addForm('department_Form5')
      if (this.ConnectingPlateId) {
        this.department_Title5 = '编辑电机联接板'
        this.department_Form5.DepartmentName = this.ConnectingPlate
        this.handleAdd_disable5 = false
        this.department_DFV5 = true
      } else {
        this.$message.warning(`请选择要修改的传动方式`)
      }
    },
    handleAdd6(formName) {
      this.department_Form6.DepartmentName = ''
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
      this.department_Title6 = '新增联轴器'
      this.handleAdd_disable6 = false
      this.department_DFV6 = true
    },
    handleEdit6() {
      this.addForm('department_Form6')
      if (this.couplingId) {
        this.department_Title6 = '编辑联轴器'
        this.department_Form6.DepartmentName = this.coupling
        this.handleAdd_disable6 = false
        this.department_DFV6 = true
      } else {
        this.$message.warning(`请选择要修改的传动方式`)
      }
    },
    submitAdd(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable = true
          this.department_DFV = false
          var param = []
          param[0] = ['父节点', this.productId]
          param[1] = ['节点名称', this.department_Form.DepartmentName]
          var Data = this.CreateData('12', '产品关系_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData()
              this.$message.success('添加成功')
              this.i = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitAdd1(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable1 = true
          this.department_DFV1 = false
          this.motorModelId ? this.motorModelId : 0
          var param = []
          param[0] = ['父节点', this.motorModelId]
          param[1] = ['节点名称', this.department_Form1.DepartmentName]
          var Data = this.CreateData('12', '电机型号_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData1()
              this.$message.success('添加成功')
              this.j = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitAdd2(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable2 = true
          this.department_DFV2 = false
          this.BearingModelId ? this.BearingModelId : 0
          var param = []
          param[0] = ['父节点', this.BearingModelId]
          param[1] = ['节点名称', this.department_Form2.DepartmentName]
          var Data = this.CreateData('12', '轴承型号_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData2()
              this.$message.success('添加成功')
              this.k = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitAdd3(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable3 = true
          this.department_DFV3 = false
          this.TransmissionModeId ? this.TransmissionModeId : 0
          var param = []
          param[0] = ['父节点', this.TransmissionModeId]
          param[1] = ['节点名称', this.department_Form3.DepartmentName]
          var Data = this.CreateData('12', '传动方式_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData3()
              this.$message.success('添加成功')
              this.l = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitAdd4(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable4 = true
          this.department_DFV4 = false
          this.motorModelId1 ? this.motorModelId1 : 0
          var param = []
          param[0] = ['父节点', this.motorModelId1]
          param[1] = ['节点名称', this.department_Form4.DepartmentName]
          var Data = this.CreateData('12', '滑台电机_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData4()
              this.$message.success('添加成功')
              this.m = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitAdd5(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable5 = true
          this.department_DFV5 = false
          this.ConnectingPlateId ? this.ConnectingPlateId : 0
          var param = []
          param[0] = ['父节点', this.ConnectingPlateId]
          param[1] = ['节点名称', this.department_Form5.DepartmentName]
          var Data = this.CreateData('12', '联接板_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData5()
              this.$message.success('添加成功')
              this.n = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitAdd6(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable6 = true
          this.department_DFV6 = false
          this.couplingId ? this.couplingId : 0
          var param = []
          param[0] = ['父节点', this.couplingId]
          param[1] = ['节点名称', this.department_Form6.DepartmentName]
          var Data = this.CreateData('12', '联轴器_增加节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData6()
              this.$message.success('添加成功')
              this.p = 0
            } else {
              this.$message.error('添加失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable = true
          this.department_DFV = false
          var param = []
          param[0] = ['子节点', this.productId]
          param[1] = ['节点名称', this.department_Form.DepartmentName]
          var Data = this.CreateData('12', '产品关系_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit1(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable1 = true
          this.department_DFV1 = false
          var param = []
          param[0] = ['子节点', this.motorModelId]
          param[1] = ['节点名称', this.department_Form1.DepartmentName]
          var Data = this.CreateData('12', '电机型号_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData1()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit2(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable2 = true
          this.department_DFV2 = false
          var param = []
          param[0] = ['子节点', this.BearingModelId]
          param[1] = ['节点名称', this.department_Form2.DepartmentName]
          var Data = this.CreateData('12', '轴承型号_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData2()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit3(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable3 = true
          this.department_DFV3 = false
          var param = []
          param[0] = ['子节点', this.TransmissionModeId]
          param[1] = ['节点名称', this.department_Form3.DepartmentName]
          var Data = this.CreateData('12', '传动方式_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData3()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit4(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable4 = true
          this.department_DFV4 = false
          var param = []
          param[0] = ['子节点', this.motorModelId1]
          param[1] = ['节点名称', this.department_Form4.DepartmentName]
          var Data = this.CreateData('12', '滑台电机_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData4()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit5(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable5 = true
          this.department_DFV5 = false
          var param = []
          param[0] = ['子节点', this.ConnectingPlateId]
          param[1] = ['节点名称', this.department_Form5.DepartmentName]
          var Data = this.CreateData('12', '联接板_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData5()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    submitEdit6(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.handleAdd_disable6 = true
          this.department_DFV6 = false
          var param = []
          param[0] = ['子节点', this.couplingId]
          param[1] = ['节点名称', this.department_Form6.DepartmentName]
          var Data = this.CreateData('12', '联轴器_修改节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData6()
              this.$message.success('编辑成功')
            } else {
              this.$message.error('编辑失败')
            }
          })
        } else {
          return false
        }
      })
    },
    moveUp() {},
    deleteTable() {
      if (this.productId) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.productId]
          var Data = this.CreateData('12', '产品关系_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData()
              this.i = 1
              this.productId = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择产品`)
      }
    },
    deleteTable1() {
      if (this.motorModelId) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.motorModelId]
          var Data = this.CreateData('12', '电机型号_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData1()
              this.j = 1
              this.motorModelId = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择电机`)
      }
    },
    deleteTable2() {
      if (this.BearingModelId) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.BearingModelId]
          var Data = this.CreateData('12', '轴承型号_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData2()
              this.k = 1
              this.BearingModelId = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择轴承`)
      }
    },
    deleteTable3() {
      if (this.TransmissionModeId) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.TransmissionModeId]
          var Data = this.CreateData('12', '传动方式_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData3()
              this.l = 1
              this.TransmissionModeId = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择传动方式`)
      }
    },
    deleteTable4() {
      if (this.motorModelId1) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.motorModelId1]
          var Data = this.CreateData('12', '滑台电机_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData4()
              this.m = 1
              this.motorModelId1 = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择电机`)
      }
    },
    deleteTable5() {
      if (this.ConnectingPlateId) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.ConnectingPlateId]
          var Data = this.CreateData('12', '联接板_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData5()
              this.n = 1
              this.ConnectingPlateId = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择联接板`)
      }
    },
    deleteTable6() {
      if (this.couplingId) {
        this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var param = []
          param[0] = ['子节点', this.couplingId]
          var Data = this.CreateData('12', '联轴器_删除节点', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].result === '1') {
              this.getTreeData6()
              this.p = 1
              this.couplingId = ''
              this.$message.success('删除成功')
            } else {
              this.$message.error('删除失败')
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message.warning(`请选择联接板`)
      }
    },
    cancel() {
      this.department_DFV = false
      this.department_DFV1 = false
      this.department_DFV2 = false
      this.department_DFV3 = false
      this.department_DFV4 = false
      this.department_DFV5 = false
      this.department_DFV6 = false
    },
    cancelEdit1(index, row) {
      row.edit = false
      row.动力头名称 = this.tableData1[index].动力头名称_before
      this.$message('取消修改')
    },
    cancelEdit2(index, row) {
      row.edit = false
      row.电机功率 = this.tableData2[index].电机功率_before
      this.$message('取消修改')
    },
    cancelEdit3(index, row) {
      row.edit = false
      row.轴承型号 = this.tableData3[index].轴承型号_before
      this.$message('取消修改')
    },
    cancelEdit4(index, row) {
      row.edit = false
      row.电机转速 = this.tableData4[index].电机转速_before
      this.$message('取消修改')
    },
    cancelEdit5(index, row) {
      row.edit = false
      row.中心内冷 = this.tableData5[index].中心内冷_before
      this.$message('取消修改')
    },
    cancelEdit6(index, row) {
      row.edit = false
      row.滑台名称 = this.tableData6[index].滑台名称_before
      this.$message('取消修改')
    },
    cancelEdit7(index, row) {
      row.edit = false
      row.防护类型 = this.tableData7[index].防护类型_before
      this.$message('取消修改')
    },
    cancelEdit8(index, row) {
      row.edit = false
      row.电机联接板 = this.tableData8[index].电机联接板_before
      this.$message('取消修改')
    },
    cancelEdit9(index, row) {
      row.edit = false
      row.电机型号 = this.tableData9[index].电机型号_before
      this.$message('取消修改')
    },
    cancelEdit10(index, row) {
      row.edit = false
      row.联轴器 = this.tableData10[index].联轴器_before
      this.$message('取消修改')
    },
    cancelEdit11(index, row) {
      row.edit = false
      row.安装方向 = this.tableData11[index].安装方向_before
      this.$message('取消修改')
    },
    cancelEdit12(index, row) {
      row.edit = false
      row.级别 = this.tableData12[index].级别_before
      this.$message('取消修改')
    },
    cancelEdit13(index, row) {
      row.edit = false
      row.拉杆 = this.tableData5[index].拉杆_before
      this.$message('取消修改')
    },
    searchTable1() {
      this.loading = true
      this.tableData1 = []
      var param = []
      var Data = this.CreateData('11', '动力头名称_基础表_查询数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data.length !== 0) {
          for (let i = 0; i < response.data.length; i++) {
            this.tableData1.push({
              动力头名称: response.data[i].产品名称,
              动力头流水号: response.data[i].产品流水号,
              动力头名称_before: response.data[i].产品名称,
              edit: false
            })
          }
        }
        this.loading = false
      })
    },
    searchTable2() {
      this.loading = true
      this.tableData2 = []
      var param = []
      var Data = this.CreateData('11', '电机功率_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData2.push({
              电机功率: response.data.rows[i].电机功率,
              电机功率流水号: response.data.rows[i].电机功率流水号,
              电机功率_before: response.data.rows[i].电机功率,
              电机功率流水号_before: response.data.rows[i].电机功率流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable3() {
      this.loading = true
      this.tableData3 = []
      var param = []
      var Data = this.CreateData('11', '轴承型号_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData3.push({
              轴承型号: response.data.rows[i].轴承型号,
              轴承型号流水号: response.data.rows[i].轴承型号流水号,
              轴承型号_before: response.data.rows[i].轴承型号,
              轴承型号流水号_before: response.data.rows[i].轴承型号流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable4() {
      this.loading = true
      this.tableData4 = []
      var param = []
      var Data = this.CreateData('11', '电机转速_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData4.push({
              电机转速: response.data.rows[i].电机转速,
              电机转速流水号: response.data.rows[i].电机转速流水号,
              电机转速_before: response.data.rows[i].电机转速,
              电机转速流水号_before: response.data.rows[i].电机转速流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable5() {
      this.loading = true
      this.tableData5 = []
      var param = []
      var Data = this.CreateData('11', '中心内冷_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData5.push({
              中心内冷: response.data.rows[i].中心内冷,
              中心内冷流水号: response.data.rows[i].中心内冷流水号,
              中心内冷_before: response.data.rows[i].中心内冷,
              中心内冷流水号_before: response.data.rows[i].中心内冷流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable13() {
      this.loading = true
      this.tableData13 = []
      var param = []
      var Data = this.CreateData('11', '拉杆_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData13.push({
              拉杆: response.data.rows[i].拉杆,
              拉杆流水号: response.data.rows[i].拉杆流水号,
              拉杆_before: response.data.rows[i].拉杆,
              拉杆流水号_before: response.data.rows[i].拉杆流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable6() {
      this.loading = true
      this.tableData6 = []
      var param = []
      var Data = this.CreateData('11', '滑台名称_基础表_查询数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data.length !== 0) {
          for (let i = 0; i < response.data.length; i++) {
            this.tableData6.push({
              滑台名称: response.data[i].产品名称,
              滑台流水号: response.data[i].产品流水号,
              滑台名称_before: response.data[i].产品名称,
              edit: false
            })
          }
        }
        this.loading = false
      })
    },
    searchTable7() {
      this.loading = true
      this.tableData7 = []
      var param = []
      var Data = this.CreateData('11', '防护类型_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData7.push({
              防护类型: response.data.rows[i].防护类型,
              防护类型流水号: response.data.rows[i].防护类型流水号,
              排序顺序: response.data.rows[i].排序顺序,
              防护类型_before: response.data.rows[i].防护类型,
              防护类型流水号_before: response.data.rows[i].防护类型流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable8() {
      this.loading = true
      this.tableData8 = []
      var param = []
      var Data = this.CreateData('11', '电机联接板_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData8.push({
              电机联接板: response.data.rows[i].电机联接板,
              电机联接板流水号: response.data.rows[i].电机联接板流水号,
              电机联接板_before: response.data.rows[i].电机联接板,
              电机联接板流水号_before: response.data.rows[i].电机联接板流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable9() {
      this.loading = true
      this.tableData9 = []
      var param = []
      var Data = this.CreateData('11', '电机型号_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData9.push({
              电机型号: response.data.rows[i].电机型号,
              电机型号流水号: response.data.rows[i].电机型号流水号,
              电机型号_before: response.data.rows[i].电机型号,
              电机型号流水号_before: response.data.rows[i].电机型号流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable10() {
      this.loading = true
      this.tableData10 = []
      var param = []
      var Data = this.CreateData('11', '联轴器_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData10.push({
              联轴器: response.data.rows[i].联轴器,
              联轴器流水号: response.data.rows[i].联轴器流水号,
              联轴器_before: response.data.rows[i].联轴器,
              联轴器流水号_before: response.data.rows[i].联轴器流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable11() {
      this.loading = true
      this.tableData11 = []
      var param = []
      var Data = this.CreateData('11', '安装方向_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData11.push({
              安装方向: response.data.rows[i].安装方向,
              安装方向流水号: response.data.rows[i].安装方向流水号,
              安装方向_before: response.data.rows[i].安装方向,
              安装方向流水号_before: response.data.rows[i].安装方向流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    searchTable12() {
      this.loading = true
      this.tableData12 = []
      var param = []
      var Data = this.CreateData('11', '级别_基础表_查询数据', param, this.pageSize, this.pageCurrent)
      this.ExecDatabase(Data).then(response => {
        if (response.data.rows.length !== 0) {
          for (let i = 0; i < response.data.rows.length; i++) {
            this.tableData12.push({
              级别: response.data.rows[i].级别,
              级别流水号: response.data.rows[i].级别流水号,
              级别_before: response.data.rows[i].级别,
              级别流水号_before: response.data.rows[i].级别流水号,
              edit: false
            })
          }
        }
        this.total = response.data.total
        this.loading = false
      })
    },
    confirmEdit1(row) {
      var param = []
      param[0] = ['产品流水号', row.动力头流水号]
      param[1] = ['产品名称', row.动力头名称]
      var Data = this.CreateData('12', '动力头_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable1()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit2(row) {
      var param = []
      param[0] = ['电机功率流水号', row.电机功率流水号]
      param[1] = ['电机功率', row.电机功率]
      var Data = this.CreateData('12', '电机功率_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable2()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit3(row) {
      var param = []
      param[0] = ['轴承型号流水号', row.轴承型号流水号]
      param[1] = ['轴承型号', row.轴承型号]
      var Data = this.CreateData('12', '轴承型号_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable3()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit4(row) {
      var param = []
      param[0] = ['电机转速流水号', row.电机转速流水号]
      param[1] = ['电机转速', row.电机转速]
      var Data = this.CreateData('12', '电机转速_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable4()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit5(row) {
      var param = []
      param[0] = ['中心内冷流水号', row.中心内冷流水号]
      param[1] = ['中心内冷', row.中心内冷]
      var Data = this.CreateData('12', '中心内冷_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable5()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit6(row) {
      var param = []
      param[0] = ['产品流水号', row.滑台流水号]
      param[1] = ['产品名称', row.滑台名称]
      var Data = this.CreateData('12', '滑台_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable6()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit7(row) {
      var param = []
      param[0] = ['防护类型流水号', row.防护类型流水号]
      param[1] = ['防护类型', row.防护类型]
      var Data = this.CreateData('12', '防护类型_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable7()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit8(row) {
      var param = []
      param[0] = ['电机联接板流水号', row.电机联接板流水号]
      param[1] = ['电机联接板', row.电机联接板]
      var Data = this.CreateData('12', '电机联接板_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable8()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit9(row) {
      var param = []
      param[0] = ['电机型号流水号', row.电机型号流水号]
      param[1] = ['电机型号', row.电机型号]
      var Data = this.CreateData('12', '电机型号_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable9()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit10(row) {
      var param = []
      param[0] = ['联轴器流水号', row.联轴器流水号]
      param[1] = ['联轴器', row.联轴器]
      var Data = this.CreateData('12', '联轴器_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable10()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit11(row) {
      var param = []
      param[0] = ['安装方向流水号', row.安装方向流水号]
      param[1] = ['安装方向', row.安装方向]
      var Data = this.CreateData('12', '安装方向_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable11()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit12(row) {
      var param = []
      param[0] = ['级别流水号', row.级别流水号]
      param[1] = ['级别', row.级别]
      var Data = this.CreateData('12', '级别_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable12()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    confirmEdit13(row) {
      var param = []
      param[0] = ['拉杆流水号', row.拉杆流水号]
      param[1] = ['拉杆', row.拉杆]
      var Data = this.CreateData('12', '拉杆_基础表_修改数据', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable13()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    callOff() {
      this.dialogFormVisible1 = false
      this.dialogFormVisible2 = false
      this.dialogFormVisible3 = false
      this.dialogFormVisible4 = false
      this.dialogFormVisible5 = false
      this.dialogFormVisible6 = false
      this.dialogFormVisible7 = false
      this.dialogFormVisible8 = false
      this.dialogFormVisible9 = false
      this.dialogFormVisible10 = false
      this.dialogFormVisible11 = false
      this.dialogFormVisible12 = false
      this.dialogFormVisible13 = false
      this.$message.error('已取消')
    },
    createProductInformation1() {
      this.form1 = {}
      if (this.$refs['form1'] !== undefined) {
        this.$refs['form1'].resetFields()
      }
      this.title1 = '新增动力头名称'
      this.dialogFormVisible1 = true
    },
    createProductInformation2() {
      this.form2 = {}
      if (this.$refs['form2'] !== undefined) {
        this.$refs['form2'].resetFields()
      }
      this.title2 = '新增电机功率'
      this.dialogFormVisible2 = true
    },
    createProductInformation3() {
      this.form3 = {}
      if (this.$refs['form3'] !== undefined) {
        this.$refs['form3'].resetFields()
      }
      this.title3 = '新增轴承型号'
      this.dialogFormVisible3 = true
    },
    createProductInformation4() {
      this.form4 = {}
      if (this.$refs['form4'] !== undefined) {
        this.$refs['form4'].resetFields()
      }
      this.title4 = '新增电机转速'
      this.dialogFormVisible4 = true
    },
    createProductInformation5() {
      this.form5 = {}
      if (this.$refs['form5'] !== undefined) {
        this.$refs['form5'].resetFields()
      }
      this.title5 = '新增中心内冷'
      this.dialogFormVisible5 = true
    },
    createProductInformation6() {
      this.form6 = {}
      if (this.$refs['form6'] !== undefined) {
        this.$refs['form6'].resetFields()
      }
      this.title6 = '新增滑台名称'
      this.dialogFormVisible6 = true
    },
    createProductInformation7() {
      this.form7 = {}
      if (this.$refs['form7'] !== undefined) {
        this.$refs['form7'].resetFields()
      }
      this.title7 = '新增防护类型'
      this.dialogFormVisible7 = true
    },
    createProductInformation8() {
      this.form8 = {}
      if (this.$refs['form8'] !== undefined) {
        this.$refs['form8'].resetFields()
      }
      this.title8 = '新增电机联接板'
      this.dialogFormVisible8 = true
    },
    createProductInformation9() {
      this.form9 = {}
      if (this.$refs['form9'] !== undefined) {
        this.$refs['form9'].resetFields()
      }
      this.title9 = '新增电机型号'
      this.dialogFormVisible9 = true
    },
    createProductInformation10() {
      this.form10 = {}
      if (this.$refs['form10'] !== undefined) {
        this.$refs['form10'].resetFields()
      }
      this.title10 = '新增联轴器'
      this.dialogFormVisible10 = true
    },
    createProductInformation11() {
      this.form11 = {}
      if (this.$refs['form11'] !== undefined) {
        this.$refs['form11'].resetFields()
      }
      this.title11 = '新增安装方向'
      this.dialogFormVisible11 = true
    },
    createProductInformation12() {
      this.form12 = {}
      if (this.$refs['form12'] !== undefined) {
        this.$refs['form12'].resetFields()
      }
      this.title12 = '新增级别'
      this.dialogFormVisible12 = true
    },
    createProductInformation13() {
      this.form13 = {}
      if (this.$refs['form13'] !== undefined) {
        this.$refs['form13'].resetFields()
      }
      this.title13 = '新增拉杆'
      this.dialogFormVisible13 = true
    },
    addProductInformation1(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['产品名称', this.form1.动力头名称]
          param[1] = ['是否滑台', 2]
          var Data = this.CreateData('11', '产品名称_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable1()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible1 = false
        } else {
          return false
        }
      })
    },
    addProductInformation2(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['电机功率', this.form2.电机功率]
          var Data = this.CreateData('11', '电机功率_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable2()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible2 = false
        } else {
          return false
        }
      })
    },
    addProductInformation3(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['轴承型号', this.form3.轴承型号]
          var Data = this.CreateData('11', '轴承型号_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable3()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible3 = false
        } else {
          return false
        }
      })
    },
    addProductInformation4(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['电机转速', this.form4.电机转速]
          var Data = this.CreateData('11', '电机转速_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable4()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible4 = false
        } else {
          return false
        }
      })
    },
    addProductInformation5(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['中心内冷', this.form5.中心内冷]
          var Data = this.CreateData('11', '中心内冷_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable5()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible5 = false
        } else {
          return false
        }
      })
    },
    addProductInformation6(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['产品名称', this.form6.滑台名称]
          param[1] = ['是否滑台', 1]
          var Data = this.CreateData('11', '产品名称_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable6()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible6 = false
        } else {
          return false
        }
      })
    },
    addProductInformation7(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['防护类型', this.form7.防护类型]
          var Data = this.CreateData('11', '防护类型_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable7()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible7 = false
        } else {
          return false
        }
      })
    },
    addProductInformation8(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['电机联接板', this.form8.电机联接板]
          var Data = this.CreateData('11', '电机联接板_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable8()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible8 = false
        } else {
          return false
        }
      })
    },
    addProductInformation9(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['电机型号', this.form9.电机型号]
          var Data = this.CreateData('11', '电机型号_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable9()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible9 = false
        } else {
          return false
        }
      })
    },
    addProductInformation10(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['联轴器', this.form10.联轴器]
          var Data = this.CreateData('11', '联轴器_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable10()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible10 = false
        } else {
          return false
        }
      })
    },
    addProductInformation11(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['安装方向', this.form11.安装方向]
          var Data = this.CreateData('11', '安装方向_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable11()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible11 = false
        } else {
          return false
        }
      })
    },
    addProductInformation12(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['级别', this.form12.级别]
          var Data = this.CreateData('11', '级别_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable12()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible12 = false
        } else {
          return false
        }
      })
    },
    addProductInformation13(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var param = []
          param[0] = ['拉杆', this.form13.拉杆]
          var Data = this.CreateData('11', '拉杆_基础表_增加数据', param)
          this.ExecDatabase(Data).then(response => {
            if (response.data[0].结果 === 1) {
              this.$message({
                message: '信息增加成功',
                type: 'success'
              })
              this.searchTable13()
            } else {
              this.$message.error('信息增加失败')
            }
          })
          this.dialogFormVisible13 = false
        } else {
          return false
        }
      })
    },
    handleDelete1(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['产品流水号', row.动力头流水号]
        var Data = this.CreateData('12', '产品名称_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable1()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete2(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['电机功率流水号', row.电机功率流水号]
        var Data = this.CreateData('12', '电机功率_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable2()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete3(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['轴承型号流水号', row.轴承型号流水号]
        var Data = this.CreateData('12', '轴承型号_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable3()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete4(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['电机转速流水号', row.电机转速流水号]
        var Data = this.CreateData('12', '电机转速_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable4()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete5(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['中心内冷流水号', row.中心内冷流水号]
        var Data = this.CreateData('12', '中心内冷_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable5()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete6(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['产品流水号', row.滑台流水号]
        var Data = this.CreateData('12', '产品名称_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable6()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete7(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['防护类型流水号', row.防护类型流水号]
        var Data = this.CreateData('12', '防护类型_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable7()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete8(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['电机联接板流水号', row.电机联接板流水号]
        var Data = this.CreateData('12', '电机联接板_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable8()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete9(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['电机型号流水号', row.电机型号流水号]
        var Data = this.CreateData('12', '电机型号_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable9()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete10(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['联轴器流水号', row.联轴器流水号]
        var Data = this.CreateData('12', '联轴器_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable10()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete11(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['安装方向流水号', row.安装方向流水号]
        var Data = this.CreateData('12', '安装方向_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable11()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete12(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['级别流水号', row.级别流水号]
        var Data = this.CreateData('12', '级别_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable12()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleDelete13(row) {
      this.$confirm('是否删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var param = []
        param[0] = ['拉杆流水号', row.拉杆流水号]
        var Data = this.CreateData('12', '拉杆_基础表_删除数据', param)
        this.ExecDatabase(Data).then(response => {
          if (response.data[0].result === '1') {
            this.$message.success('删除成功')
            this.searchTable13()
          } else {
            this.$message.error('删除失败')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    upOne1(row) { // 上移
      var param = []
      param[0] = ['安装方向流水号', row.安装方向流水号]
      var Data = this.CreateData('12', '安装方向_基础表_上移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable11()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    downOne1(row) { // 下移
      var param = []
      param[0] = ['安装方向流水号', row.安装方向流水号]
      var Data = this.CreateData('12', '安装方向_基础表_下移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable11()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    upOne2(row) { // 上移
      var param = []
      param[0] = ['中心内冷流水号', row.中心内冷流水号]
      var Data = this.CreateData('12', '中心内冷_基础表_上移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable5()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    downOne2(row) { // 下移
      var param = []
      param[0] = ['中心内冷流水号', row.中心内冷流水号]
      var Data = this.CreateData('12', '中心内冷_基础表_下移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable5()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    upOne3(row) { // 上移
      var param = []
      param[0] = ['拉杆流水号', row.拉杆流水号]
      var Data = this.CreateData('12', '拉杆_基础表_上移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable13()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    downOne3(row) { // 下移
      var param = []
      param[0] = ['拉杆流水号', row.拉杆流水号]
      var Data = this.CreateData('12', '拉杆_基础表_下移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable13()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    upOne4(row) { // 上移
      var param = []
      param[0] = ['防护类型流水号', row.防护类型流水号]
      param[1] = ['调序数', this.inputNumber]
      var Data = this.CreateData('12', '防护类型_基础表_调序', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable7()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    downOne4(row) { // 下移
      var param = []
      param[0] = ['防护类型流水号', row.防护类型流水号]
      param[1] = ['下移数', this.inputNumber]
      var Data = this.CreateData('12', '防护类型_基础表_下移', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data[0].result === '1') {
          this.$message({
            message: '信息编辑成功',
            type: 'success'
          })
          this.searchTable7()
          row.edit = false
        } else {
          this.$message.error('信息编辑失败')
        }
      })
    },
    handleSizeChanges(val) {
      this.pageCurrent = 1
      this.pageSize = val
      this.searchTable()
    },
    handleCurrentChanges(val) {
      this.pageCurrent = val
      this.searchTable()
    }
  }
}
</script>
<style scoped lang="scss">
  /deep/ .el-card__body{
    padding: 0px!important;
  }
</style>

