<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="商机名称" prop="boName">
        <el-input
          v-model="queryParams.boName"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="客户" prop="customerName">
        <el-input
          v-model="queryParams.customerName"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="负责人" prop="principalName">
        <el-input
          v-model="queryParams.principalName"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="商机来源" prop="boSource">
        <el-select
          v-model="queryParams.boSource"
          clearable
        >
          <el-option
            v-for="dict in dict.type.mk_bo_source"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="SPD商机" name="0">
        <el-table :data="boList" v-loading="loading">
          <el-table-column label="客户" align="center" prop="customerName" />
          <el-table-column label="部门" align="center" prop="deptName" />
          <el-table-column label="负责人" align="center" prop="principalName" />
          <el-table-column label="商机名称" align="center" prop="boName" />
          <el-table-column label="商机编码" align="center" prop="boCode" />
          <el-table-column label="创建日期" align="center" prop="createTime" />
          <el-table-column label="商机挖掘" align="center" prop="b000">
            <template slot-scope="scope">
              <dev v-if="scope.row.b000">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b000}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="商机审核" align="center" prop="b001" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b001">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b001}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="项目立项" align="center" prop="b002" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b002">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b002}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="解决方案" align="center" prop="b007" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b007">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b007}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="投标与签合同" align="center" prop="b008" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b008">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b008}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="完成" align="center" prop="b099" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b099">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b099}}
              </dev>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="耗材集采商机" name="1">
        <el-table :data="boList" v-loading="loading">
          <el-table-column label="客户" align="center" prop="customerName" />
          <el-table-column label="部门" align="center" prop="deptName" />
          <el-table-column label="负责人" align="center" prop="principalName" />
          <el-table-column label="商机名称" align="center" prop="boName" />
          <el-table-column label="商机编码" align="center" prop="boCode" />
          <el-table-column label="创建日期" align="center" prop="createTime" />
          <el-table-column label="商机挖掘" align="center" prop="b100">
            <template slot-scope="scope">
              <dev v-if="scope.row.b100">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b100}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="商机审核" align="center" prop="b101" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b101">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b101}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="项目立项" align="center" prop="b102" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b102">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b102}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="解决方案" align="center" prop="b104" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b104">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b104}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="院内决策" align="center" prop="b105" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b105">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b105}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="投标与签合同" align="center" prop="b106" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b106">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b106}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="完成" align="center" prop="b199" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b199">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b199}}
              </dev>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="医疗耗材商机" name="2">
        <el-table :data="boList" v-loading="loading">
          <el-table-column label="客户" align="center" prop="customerName" />
          <el-table-column label="部门" align="center" prop="deptName" />
          <el-table-column label="负责人" align="center" prop="principalName" />
          <el-table-column label="商机名称" align="center" prop="boName" />
          <el-table-column label="商机编码" align="center" prop="boCode" />
          <el-table-column label="创建日期" align="center" prop="createTime" />
          <el-table-column label="商机挖掘" align="center" prop="b200">
            <template slot-scope="scope">
              <dev v-if="scope.row.b200">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b200}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="需求信息收集" align="center" prop="b201">
            <template slot-scope="scope">
              <dev v-if="scope.row.b201">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b201}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="商机审核" align="center" prop="b202" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b202">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b202}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="项目立项" align="center" prop="b203" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b203">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b203}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="解决方案" align="center" prop="b205" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b205">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b205}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="临床申请" align="center" prop="b206" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b206">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b206}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="院内决策" align="center" prop="b207" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b207">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b207}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="投标与签合同" align="center" prop="b208" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b208">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b208}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="完成" align="center" prop="b299" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b299">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b299}}
              </dev>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="医疗设备商机" name="3">
        <el-table :data="boList" v-loading="loading">
          <el-table-column label="客户" align="center" prop="customerName" />
          <el-table-column label="部门" align="center" prop="deptName" />
          <el-table-column label="负责人" align="center" prop="principalName" />
          <el-table-column label="商机名称" align="center" prop="boName" />
          <el-table-column label="商机编码" align="center" prop="boCode" />
          <el-table-column label="创建日期" align="center" prop="createTime" />
          <el-table-column label="商机挖掘" align="center" prop="b300">
            <template slot-scope="scope">
              <dev v-if="scope.row.b300">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b300}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="需求信息收集" align="center" prop="b301">
            <template slot-scope="scope">
              <dev v-if="scope.row.b301">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b301}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="商机审核" align="center" prop="b302" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b302">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b302}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="项目立项" align="center" prop="b303" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b303">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b303}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="解决方案" align="center" prop="b306" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b306">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b306}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="投标与签合同" align="center" prop="b307" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b307">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b307}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="完成" align="center" prop="b399" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b399">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b399}}
              </dev>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="军队医疗设备商机" name="4">
        <el-table :data="boList" v-loading="loading">
          <el-table-column label="客户" align="center" prop="customerName" />
          <el-table-column label="部门" align="center" prop="deptName" />
          <el-table-column label="负责人" align="center" prop="principalName" />
          <el-table-column label="商机名称" align="center" prop="boName" />
          <el-table-column label="商机编码" align="center" prop="boCode" />
          <el-table-column label="创建日期" align="center" prop="createTime" />
          <el-table-column label="商机挖掘" align="center" prop="b400">
            <template slot-scope="scope">
              <dev v-if="scope.row.b400">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b400}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="需求信息收集" align="center" prop="b401">
            <template slot-scope="scope">
              <dev v-if="scope.row.b401">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b401}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="商机审核" align="center" prop="b402" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b402">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b402}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="项目立项" align="center" prop="b403" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b403">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b403}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="解决方案" align="center" prop="b406" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b406">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b406}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="投标与签合同" align="center" prop="b407" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b407">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b407}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="完成" align="center" prop="b499" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b499">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b499}}
              </dev>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="工程商机" name="5">
        <el-table :data="boList" v-loading="loading">
          <el-table-column label="客户" align="center" prop="customerName" />
          <el-table-column label="部门" align="center" prop="deptName" />
          <el-table-column label="负责人" align="center" prop="principalName" />
          <el-table-column label="商机名称" align="center" prop="boName" />
          <el-table-column label="商机编码" align="center" prop="boCode" />
          <el-table-column label="创建日期" align="center" prop="createTime" />
          <el-table-column label="需求信息收集" align="center" prop="b500">
            <template slot-scope="scope">
              <dev v-if="scope.row.b500">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b500}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="商机审核" align="center" prop="b501" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b501">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b501}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="项目立项" align="center" prop="b502" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b502">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b502}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="考察" align="center" prop="b503" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b503">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b503}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="解决方案" align="center" prop="b504" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b504">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b504}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="投标与签合同" align="center" prop="b505" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b505">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b505}}
              </dev>
            </template>
          </el-table-column>
          <el-table-column label="完成" align="center" prop="b599" >
            <template slot-scope="scope">
              <dev v-if="scope.row.b599">
                <el-button size="medium" type="text" icon="el-icon-s-flag" />
                {{scope.row.b599}}
              </dev>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
    </el-tabs>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>


<script>
import { listBasic } from "@/api/business/spd/bo/statement";

export default {
  dicts: [
    "mk_bo_type",
    "mk_bo_source",
  ],
  data() {
    return {
      // 遮罩层
      loading: true,
      //查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        boType: null,
        boName: null,
        customerName: null,
        principalName: null,
        boSource: null,
      },
      // 显示搜索条件
      showSearch: true,
      //列表数据
      boList:[],
      //当前页签
      activeName: '0',
      //分页参数
      total:0,
      loading: true,
    };
  },
  created() {
    var e = {
      name: '0',
    }
    this.handleClick(e);
  },
  methods: {
    /** 查询任务列表 */
    getList() {
      var e = {
        name: this.activeName,
      }
      this.handleClick(e);
    },
    handleClick(e) {
      this.loading = true;
      console.log('e',e);
      this.queryParams.boType = e.name;
      switch (e.name) {
        case "0":
          listBasic(this.queryParams).then(response => {
            this.boList = response.rows;
            console.log('this.boList',this.boList);
            for(var i = 0;i < this.boList.length;i++){
              var nodes = this.boList[i].boNodeFlowList;
              if(!nodes){continue;}
              var nodesfilter = nodes.filter(n => n.code == '0-00');
              if(nodesfilter.length > 0){
                this.boList[i].b000 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '0-01');
              if(nodesfilter.length > 0){
                this.boList[i].b001 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '0-02');
              if(nodesfilter.length > 0){
                this.boList[i].b002 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '0-07');
              if(nodesfilter.length > 0){
                this.boList[i].b007 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '0-08');
              if(nodesfilter.length > 0){
                this.boList[i].b008 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '0-99');
              if(nodesfilter.length > 0){
                this.boList[i].b099 = nodesfilter[0].day;
              }
            }
            this.total = response.total;
            this.loading = false;
          });
          break;
        case "1":
          listBasic(this.queryParams).then(response => {
            this.boList = response.rows;
            for(var i = 0;i < this.boList.length;i++){
              var nodes = this.boList[i].boNodeFlowList;
              if(!nodes){continue;}
              var nodesfilter = nodes.filter(n => n.code == '1-00');
              if(nodesfilter.length > 0){
                this.boList[i].b100 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '1-01');
              if(nodesfilter.length > 0){
                this.boList[i].b101 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '1-02');
              if(nodesfilter.length > 0){
                this.boList[i].b102 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '1-04');
              if(nodesfilter.length > 0){
                this.boList[i].b104 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '1-05');
              if(nodesfilter.length > 0){
                this.boList[i].b105 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '1-06');
              if(nodesfilter.length > 0){
                this.boList[i].b106 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '1-99');
              if(nodesfilter.length > 0){
                this.boList[i].b199 = nodesfilter[0].day;
              }
            }
            this.total = response.total;
            this.loading = false;
          });
          break;
        case "2":
          listBasic(this.queryParams).then(response => {
            this.boList = response.rows;
            for(var i = 0;i < this.boList.length;i++){
              var nodes = this.boList[i].boNodeFlowList;
              if(!nodes){continue;}
              var nodesfilter = nodes.filter(n => n.code == '2-00');
              if(nodesfilter.length > 0){
                this.boList[i].b200 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-01');
              if(nodesfilter.length > 0){
                this.boList[i].b201 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-02');
              if(nodesfilter.length > 0){
                this.boList[i].b202 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-03');
              if(nodesfilter.length > 0){
                this.boList[i].b203 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-05');
              if(nodesfilter.length > 0){
                this.boList[i].b205 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-06');
              if(nodesfilter.length > 0){
                this.boList[i].b206 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-07');
              if(nodesfilter.length > 0){
                this.boList[i].b207 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-08');
              if(nodesfilter.length > 0){
                this.boList[i].b208 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '2-99');
              if(nodesfilter.length > 0){
                this.boList[i].b299 = nodesfilter[0].day;
              }
            }
            this.total = response.total;
            this.loading = false;
          });
          break;
        case "3":
          listBasic(this.queryParams).then(response => {
            this.boList = response.rows;
            for(var i = 0;i < this.boList.length;i++){
              var nodes = this.boList[i].boNodeFlowList;
              if(!nodes){continue;}
              var nodesfilter = nodes.filter(n => n.code == '3-00');
              if(nodesfilter.length > 0){
                this.boList[i].b300 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '3-01');
              if(nodesfilter.length > 0){
                this.boList[i].b301 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '3-02');
              if(nodesfilter.length > 0){
                this.boList[i].b302 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '3-03');
              if(nodesfilter.length > 0){
                this.boList[i].b303 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '3-06');
              if(nodesfilter.length > 0){
                this.boList[i].b306 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '3-07');
              if(nodesfilter.length > 0){
                this.boList[i].b307 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '3-99');
              if(nodesfilter.length > 0){
                this.boList[i].b399 = nodesfilter[0].day;
              }
            }
            this.total = response.total;
            this.loading = false;
          });
          break;
        case "4":
          listBasic(this.queryParams).then(response => {
            this.boList = response.rows;
            for(var i = 0;i < this.boList.length;i++){
              var nodes = this.boList[i].boNodeFlowList;
              if(!nodes){continue;}
              var nodesfilter = nodes.filter(n => n.code == '4-00');
              if(nodesfilter.length > 0){
                this.boList[i].b400 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '4-01');
              if(nodesfilter.length > 0){
                this.boList[i].b401 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '4-02');
              if(nodesfilter.length > 0){
                this.boList[i].b402 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '4-03');
              if(nodesfilter.length > 0){
                this.boList[i].b403 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '4-06');
              if(nodesfilter.length > 0){
                this.boList[i].b406 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '4-07');
              if(nodesfilter.length > 0){
                this.boList[i].b407 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '4-99');
              if(nodesfilter.length > 0){
                this.boList[i].b499 = nodesfilter[0].day;
              }
            }
            this.total = response.total;
            this.loading = false;
          });
          break;
        case "5":
          listBasic(this.queryParams).then(response => {
            this.boList = response.rows;
            for(var i = 0;i < this.boList.length;i++){
              var nodes = this.boList[i].boNodeFlowList;
              if(!nodes){continue;}
              var nodesfilter = nodes.filter(n => n.code == '5-00');
              if(nodesfilter.length > 0){
                this.boList[i].b500 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '5-01');
              if(nodesfilter.length > 0){
                this.boList[i].b501 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '5-02');
              if(nodesfilter.length > 0){
                this.boList[i].b502 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '5-03');
              if(nodesfilter.length > 0){
                this.boList[i].b503 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '5-04');
              if(nodesfilter.length > 0){
                this.boList[i].b504 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '5-05');
              if(nodesfilter.length > 0){
                this.boList[i].b505 = nodesfilter[0].day;
              }
              nodesfilter = nodes.filter(n => n.code == '5-99');
              if(nodesfilter.length > 0){
                this.boList[i].b599 = nodesfilter[0].day;
              }
            }
            this.total = response.total;
            this.loading = false;
          });
          break;
        default:
          break;
      }
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
  }
};
</script>
