<template>
  <div class="taskGeneration_">
    <br />
    <div class="taskGeneration">
      <el-form>
        <el-row>
          <el-col :span="12">
            <span class="span_right">任务编号：</span>
            <el-input style="width: 70%" v-model="detailList.rwId" disabled></el-input>
          </el-col>
          <el-col :span="12">
            <span class="span_right">任务名称：</span>
            <el-input style="width: 70%" v-model="detailList.rwName" disabled></el-input>
          </el-col>
        </el-row>
        <br />
        <el-row>
          <el-col :span="12">
            <span class="span_right">检查单位：</span>
            <el-input style="width: 70%" v-model="detailList.jcdwmc" disabled></el-input>
          </el-col>
          <el-col :span="12">
            <span class="span_right">被检单位类型：</span>
            <el-select style="width:70%;" v-model="valueLx" disabled multiple placeholder="请选择">
              <el-option
                v-for="(item) in bjdwlxname"
                :key="item.jcQylx"
                :label="item.jcQylxmc"
                :value="item.jcQylx"
              ></el-option>
            </el-select>
          </el-col>
        </el-row>
        <br />
        <el-row>
          <el-col :span="12">
            <span class="span_right">检查开始时间：</span>
            <el-input class="inputWidth" v-model="detailList.jckssjDate" disabled></el-input>
          </el-col>
          <el-col :span="11">
            <span class="span_right">检查结束时间：</span>
            <el-input class="inputWidth" v-model="detailList.jcjssjDate" disabled></el-input>
          </el-col>
        </el-row>
        <br />
        <el-row>
          <el-col :span="12">
            <span class="span_right">关联文件：</span>
          </el-col>
          <el-col :span="12">
            <span class="span_right">附件：</span>
          </el-col>
        </el-row>
        <br />
        <br />
        <el-row>
          <el-col :span="24">
            <h1 class="title_style">待查表单</h1>
          </el-col>
        </el-row>
        <br />
        <el-row>
          <el-col :span="24">
            <inspectTableView
              :list="dcbdlist"
              @handleSelectionChange="handleSelectionChange"
              :options="tablePar"
              :columns="dcbdclums"
            ></inspectTableView>
          </el-col>
        </el-row>
        <br />
        <br />
        <div v-show="isShow_table">
          <el-row>
            <el-col :span="24">
              <h1 class="title_style">检查人员</h1>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-table
                ref="mutipleTable"
                :data="procuratorialPersonnelList"
                :border="true"
                highlight-current-row
                :header-cell-style="{'background':'#FAFAFA','color':'#333','font-weight':'600'}"
                style="width: 100%;margin:20px 10px 0 0"
                :default-expand-all="true"
              >
                <el-table-column property="name" label="组长" align="center">
                  <template slot-scope="scope">
                    <el-select collapse-tags v-model="scope.row.zz" multiple placeholder="请选择">
                      <el-option
                        v-for="item in jczList"
                        :key="item.id"
                        :label="item.ryxm"
                        :value="item.rybh"
                      ></el-option>
                    </el-select>
                  </template>
                </el-table-column>
                <el-table-column property="name" label="组员" align="center">
                  <template slot-scope="scope">
                    <el-select collapse-tags v-model="scope.row.zy" multiple placeholder="请选择">
                      <el-option
                        v-for="item in jczList"
                        :key="item.id"
                        :label="item.ryxm"
                        :value="item.rybh"
                      ></el-option>
                    </el-select>
                  </template>
                </el-table-column>
                <el-table-column property="name" label="外部人员" align="center">
                  <template slot-scope="scope">
                    <el-input v-model="scope.row.wbry"></el-input>
                  </template>
                </el-table-column>
                <el-table-column property="name" label="外部人员所属单位" align="center">
                  <template slot-scope="scope">
                    <el-input v-model="scope.row.wbryssdw"></el-input>
                  </template>
                </el-table-column>
                <el-table-column property="name" label="被检单位" align="center">
                  <template slot-scope="scope">
                    <el-select
                      collapse-tags
                      v-model="scope.row.bjdw"
                      multiple
                      placeholder="请选择"
                      style="padding:10px;"
                    >
                      <el-option
                        v-for="item in beijiandanweiList"
                        :key="item.qyjgdm"
                        :label="item.qymc"
                        :value="item.qyjgdm"
                      ></el-option>
                    </el-select>
                  </template>
                </el-table-column>
              </el-table>
            </el-col>
          </el-row>
          <br />
          <el-row>
            <el-col :span="24" style="text-align: center">
              <el-button
                style="background: #409EFF;"
                @click="plus()"
                type="primary"
                icon="el-icon-plus"
                circle
              ></el-button>
              <el-button
                style="background: #409EFF;"
                @click="minus()"
                type="primary"
                icon="el-icon-minus"
                circle
              ></el-button>
              <br />
            </el-col>
          </el-row>
          <br />
          <el-row>
            <el-col :span="24" style="text-align: center">
              <el-button type="primary" style="margin-left: 10px;" @click="savercjcfpjczxxbcs()">确定</el-button>
              <br />
            </el-col>
          </el-row>
        </div>
        <div>
          <div v-for="(item,index) in getInfo()" :key="index" v-show="jcz_show">
            <el-row>
              <el-col :span="24">
                <span>{{item.jczName}}：</span>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="10">
                <el-table
                  ref="mutipleTable"
                  :data="item.members"
                  :border="true"
                  highlight-current-row
                  :header-cell-style="{'background':'#FAFAFA','color':'#333','font-weight':'600'}"
                  style="width: 100%;margin:20px 10px 0 0"
                  :default-expand-all="true"
                >
                  <el-table-column label="人员属性" align="center">
                    <template slot-scope="scope">
                      <span v-if="scope.row.zylx == 0">组长</span>
                      <span v-if="scope.row.zylx == 1">组员</span>
                      <span v-if="scope.row.zylx == 2">外部人员</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="人员名称" align="center">
                    <template slot-scope="scope">{{scope.row.zyName}}</template>
                  </el-table-column>
                  <el-table-column label="所属单位" align="center">
                    <template slot-scope="scope">{{scope.row.zydw}}</template>
                  </el-table-column>
                  <el-table-column label="操作" align="center">
                    <template>
                      <span>查看&nbsp;</span>
                      <span>更换</span>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
              <el-col :span="1">
                <span>&nbsp;</span>
              </el-col>
              <el-col :span="10">
                <el-table
                  ref="mutipleTable"
                  :data="item.organizes"
                  :border="true"
                  highlight-current-row
                  :header-cell-style="{'background':'#FAFAFA','color':'#333','font-weight':'600'}"
                  style="width: 100%;margin:20px 10px 0 0"
                  :default-expand-all="true"
                >
                  <el-table-column property="name" label="被检单位" align="center">
                    <template slot-scope="scope">{{scope.row.bjdwName}}</template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-row>
          </div>
        </div>
        <br />
        <br />
        <div v-show="teamVOss.length>0">
          <el-row>
            <el-col :span="24">
              <h1 class="title_style">检查组</h1>
            </el-col>
          </el-row>
          <!--                    <el-row>-->
          <!--                        <el-col :span="24">-->
          <!--                            <h2 style="font-size: 16px;">&nbsp;&nbsp;&nbsp;检查组一</h2>-->
          <!--                        </el-col>-->
          <!--                    </el-row>-->
          <br />
          <el-row v-for="(item,index) in teamVOss" :key="index">
            <el-col :span="11">
              <h2>&nbsp;检查人员</h2>
              <inspectTableView
                :list="item.members"
                @handleSelectionChange="handleSelectionChange"
                :options="tablePar"
                :columns="jcrycolumnshx"
              ></inspectTableView>
            </el-col>
            <el-col :span="1">
              <span>&nbsp;</span>
            </el-col>
            <el-col :span="10">
              <h2>被查单位</h2>
              <inspectTableView
                :list="item.organizes"
                @handleSelectionChange="handleSelectionChange"
                :options="tablePar"
                :columns="bjdwcolumnshx"
              ></inspectTableView>
            </el-col>
          </el-row>
          <br />
        </div>
        <el-row>
          <el-col :span="24">
            <span>附件上传：</span>
            <el-button size="small" type="primary">点击上传</el-button>
          </el-col>
        </el-row>
        <br />
        <el-row>
          <el-col :span="12">
            <span class="span_right">下发人：</span>
            <el-input style="width: 70%" disabled v-model="detailList.userName"></el-input>
          </el-col>
          <el-col :span="12">
            <span class="span_right">下发时间：</span>
            <el-input style="width: 70%" disabled v-model="detailList.xfTime"></el-input>
          </el-col>
        </el-row>
        <br />
        <div class="btn_operation">
          <el-button type="primary" @click="stage()">暂存</el-button>
          <el-button type="primary" @click="go_triplePreventionInspection()">取消</el-button>
          <el-button type="primary" @click="mylowerHair()">下发</el-button>
        </div>
        <br />
      </el-form>
    </div>
  </div>
</template>

<script>
import inspectTableView from "@/components/table/el-index";
import {
  getzidianbiao,
  savercjcfpjczxxbc,
  getrcjcfpjczxxbc,
  dcbdList,
  bjdwmchq,
  temporaryStorage,
  lowerHair
} from "@/api/missionDispatchManage/dailyinspection/index.js";

export default {
  name: "taskGeneration",
  components: {
    inspectTableView
  },
  mounted() {
    this.get_checkSubitems(); //检查子项字典表
    this.dcbdLists(); //待查表单和列表数据获取
    this.get_CheckContent(); //检查内容字典表
    this.getrcjcfpjczxxbcs(); //获取检查组信息
    this.plus(); //默认有一个检查组
    this.get_checkType(); //被检单位类型字典表
    this.get_bjdwlist(); //被检单位列表获取
    // this.jczxqx()//检查子项全选
  },
  methods: {
    //设置jcz_show为false
    jcz_show_false() {
      if (this.getInfo().length == 0) {
        this.jcz_show = false;
      }
    },
    //检查组增加
    plus() {
      // if(this.getInfo()){
      //
      // }

      this.procuratorialPersonnelList.push({
        zz: [], //组长
        zy: [], //组员
        wbry: "", //外部人员
        wbryssdw: "", //外部人员所属单位
        bjdw: [] //被检单位
      });
    },
    //检查组后删
    minus() {
      console.log(this.jcz_show);
      this.procuratorialPersonnelList.pop();
    },
    //被检单位类型回显
    // this.valueLx
    bjdwhx() {
      this.bjdwlxname.forEach(item => {
        this.valueLx.push(item.jcQylx);
      });
    },
    //检查子项全选
    jczxqx() {
      this.valueZxAll = [];
      this.jczxzdb.forEach(item => {
        this.valueZxAll.push(item.dictCode);
      });
    },
    //下发
    mylowerHair() {
      this.jczsave();
      let params = this.set_xhsj();
      lowerHair(params)
        .then(res => {
          if (res.infoCode == 200) {
            this.$message({
              showClose: true,
              message: "下发成功",
              type: "success"
            });
            this.$router.push("/inspection/triplePreventionInspection");
          } else {
            this.$message({
              showClose: true,
              message: "下发失败",
              type: "warning"
            });
          }
        })
        .catch(err => {
          this.$message({
            showClose: true,
            message: "下发失败",
            type: "warning"
          });
        });
    },
    //生成暂存需要传的数据
    zancunshuju() {
      let obj = {
        bjdwxzfs: this.detailList.bjdwxzfs ? this.detailList.bjdwxzfs : "0",
        // "checkContentVO":this.valueNr,
        checkContentVO: [],
        jcdwId: this.detailList.jcdwId,
        jcdwmc: this.detailList.jcdwmc,
        jcfs: this.detailList.jcfs,
        jcjssjDate: this.detailList.jcjssjDate,
        jckssjDate: this.detailList.jckssjDate,
        jcxmlx: this.jcxmlxval,
        jczqdfs: this.detailList.jczqdfs,
        jhId: this.detailList.jhId,
        rwId: this.detailList.rwId,
        rwName: this.detailList.rwName,
        rwZt: this.detailList.rwZt,
        rwlx: this.detailList.rwlx,
        rwlxName: this.detailList.rwlxName,
        sfxs: this.detailList.sfxs,
        taskCheckItemsVO: [],
        // "taskCheckItemsVO":this.valueZxAll,
        // "taskCheckItemsVO":this.detailList.taskCheckItemsVO,
        userId: this.detailList.userId,
        userName: this.detailList.userName
      };
      this.checkContentList.forEach(item => {
        // debugger
        if (this.valueNr.length != 0) {
          this.valueNr.forEach(msg => {
            // debugger
            if (msg == item.dictCode) {
              obj.checkContentVO.push({
                jcnrId: item.dictCode,
                jcnrName: item.dictName
              });
            }
          });
        }
      });
      if (this.jcxmlxval == 0) {
        this.jczxzdb.forEach(item => {
          // debugger
          if (this.valueZx.length != 0) {
            this.valueZx.forEach(msg => {
              // debugger
              if (msg == item.dictCode) {
                obj.taskCheckItemsVO.push({
                  jcxmId: item.dictCode,
                  jcxmName: item.dictName
                });
              }
            });
          }
        });
      }
      if (this.jcxmlxval != 0) {
        this.jczxzdb.forEach(item => {
          // debugger
          this.valueZxAll.forEach(msg => {
            // debugger
            if (msg == item.dictCode) {
              obj.taskCheckItemsVO.push({
                jcxmId: item.dictCode,
                jcxmName: item.dictName
              });
            }
          });
        });
      }

      return obj;
    },
    //暂存
    stage() {
      this.jcz_show_false();
      this.jczsave();
      if (this.jcz_show == false) {
        this.$message({
          showClose: true,
          message: "请先选择检查人员",
          type: "warning"
        });
        return;
      }
      if (this.jcz_show == true) {
        let params = this.zancunshuju();
        temporaryStorage(params)
          .then(res => {
            if (res.infoCode == 200) {
              this.$message({
                showClose: true,
                message: "暂存成功",
                type: "success"
              });
              this.$router.push("/inspection/triplePreventionInspection");
            } else {
              this.$message({
                showClose: true,
                message: "暂存失败",
                type: "warning"
              });
            }
          })
          .catch(err => {
            this.$message({
              showClose: true,
              message: "暂存失败",
              type: "warning"
            });
          });
      }
    },
    //下一步暂存
    next_stage() {
      // this.jcz_show_false()
      // this.jczsave()
      // if(this.jcz_show == false){
      //     this.$message({
      //         showClose: true,
      //         message: '请先选择检查人员',
      //         type: 'warning'
      //     });
      //     return
      // }
      // if(this.jcz_show == true){
      let params = this.zancunshuju();
      temporaryStorage(params)
        .then(res => {
          if (res.infoCode == 200) {
            this.$message({
              showClose: true,
              message: "已暂存",
              type: "success"
            });
            // this.$router.push("/inspection/dailyinspection")
          } else {
            this.$message({
              showClose: true,
              message: "暂存失败",
              type: "warning"
            });
          }
        })
        .catch(err => {
          this.$message({
            showClose: true,
            message: "暂存失败",
            type: "warning"
          });
        });
      // }
    },
    //被检单位获取
    get_bjdwlist() {
      let params = {
        orjCode: {
          qyjgdm: sessionStorage.getItem("orgCode")
        }
      };
      bjdwmchq(params)
        .then(res => {
          this.beijiandanweiList = res.data;
        })
        .catch(err => {
          console.log(err);
        });
    },
    //获取字典表检查子项信息jczxzdb
    get_checkType() {
      let params = {
        groupId: "50001"
      };
      getzidianbiao(params)
        .then(res => {
          if (res.infoCode == 200) {
            this.bjdwlxzdb = res.data;
          }
        })
        .catch(err => {
          console.log(err);
        });
    },
    //获取字典表检查子项信息
    get_checkSubitems() {
      let params = {
        groupId: "50004"
      };
      getzidianbiao(params)
        .then(res => {
          if (res.infoCode == 200) {
            this.jczxzdb = res.data;
            this.jczxqx();
          }
        })
        .catch(err => {
          console.log(err);
        });
    },
    //待查表单数据获取
    dcbdLists() {
      let params = {
        rwId: this.$route.query.rwid,
        jhId: this.$route.query.jhid
      };
      dcbdList(params)
        .then(res => {
          this.detailList = res.data;
          this.dcbdlist = res.data.taskFormVO;
          this.teamVOss = res.data.teamVOs;
          this.bjdwlxname = res.data.inspectedUnitsType;
          this.jcnrzdbfh = res.data.checkContentVO;
          this.jczxlist = res.data.taskCheckItemsVO; //检查子项
          this.bjdwhx();
        })
        .catch(err => {
          console.log(err);
        });
    },
    //检查组信息生成
    savercjcfpjczxxbcs() {
      if (this.getInfo().length > 0) {
        this.jcz_show = true;
      } else {
        alert("请先添加组");
      }
    },
    //检查组信息保存
    jczsave() {
      let params = this.getInfo();
      savercjcfpjczxxbc(params)
        .then(res => {
          if (res.infoCode == 200) {
            this.$message({
              showClose: true,
              message: "保存成功",
              type: "success"
            });
          } else {
            this.$message({
              showClose: true,
              message: "保存失败,未确定检查人员",
              type: "warning"
            });
          }
        })
        .catch(err => {
          this.$message({
            showClose: true,
            message: "保存失败",
            type: "warning"
          });
        });
    },
    //生成下发时要传的数据
    set_xhsj() {
      console.log();
      let xfObj = {
        bjdwxzfs: this.detailList.bjdwxzfs,
        inspectedUnitsVO: [],
        taskFormVO: [],
        jcdwId: this.detailList.jcdwId,
        jcdwmc: this.detailList.jcdwmc,
        jcfs: this.jcfs,
        jcjssjDate: this.detailList.jcjssjDate,
        jckssjDate: this.detailList.jckssjDate,
        jcxmlx: this.detailList.jcxmlx,
        jczqdfs: this.detailList.jczqdfs,
        jhId: this.detailList.jhId,
        rwId: this.detailList.rwId,
        rwName: this.detailList.rwName,
        rwZt: this.detailList.rwZt,
        rwlx: this.detailList.rwlx,
        rwlxName: this.detailList.rwlxName
      };
      this.dcbdlist.forEach(item => {
        xfObj.taskFormVO.push({
          bdId: item.bdId,
          bdName: item.bdName,
          bdLu: item.bdLu
        });
      });
      this.procuratorialPersonnelList.forEach(items => {
        items.bjdw.forEach(item => {
          this.beijiandanweiList.forEach(res => {
            if (item == res.qyjgdm) {
              xfObj.inspectedUnitsVO.push({
                bjdwId: res.qyjgdm,
                bjdwName: res.qymc
              });
            }
          });
        });
      });
      return xfObj;
    },
    //获取检查组组长组员信息
    getrcjcfpjczxxbcs() {
      getrcjcfpjczxxbc()
        .then(res => {
          this.jczList = res.data;
        })
        .catch(err => {
          console.log(err);
        });
    },
    //测试
    look() {},
    //返回到列表页
    go_triplePreventionInspection() {
      this.$router.push("/inspection/triplePreventionInspection");
    },
    //点击下一步传radiolength
    next_avoid() {
      this.next_stage();
      let arr = [];
      if (!this.bjdwlxname) {
        console.log("1");
      } else {
        this.bjdwlxname.forEach(item => {
          arr.push({
            qylx: item.jcQylx,
            qylxmc: item.jcQylxmc
          });
        });
      }
      this.$router.push({
        path: "/inspection/dailyAvoid",
        query: {
          status: this.radio,
          bjdwlx: JSON.stringify(arr),
          bjqyxzfs: this.detailList.bjdwxzfs ? this.detailList.bjdwxzfs : "0",
          rwid: this.$route.query.rwid
        }
      });
    },
    //点击下一步传radio
    next_avoid1() {
      this.next_stage();
      let arr = [];
      if (!this.bjdwlxname) {
        console.log("1");
      } else {
        this.bjdwlxname.forEach(item => {
          arr.push({
            qylx: item.jcQylx,
            qylxmc: item.jcQylxmc
          });
        });
      }

      this.$router.push({
        path: "/inspection/dailyAvoid",
        query: {
          bjdwlx: JSON.stringify(arr),
          bjqyxzfs: this.detailList.bjdwxzfs ? this.detailList.bjdwxzfs : "0",
          status: this.radio,
          rwid: this.$route.query.rwid
        }
      });
    },
    //检查内容字典表
    get_CheckContent() {
      let params = {
        groupId: "50002"
      };
      getzidianbiao(params)
        .then(res => {
          if (res.infoCode == 200) {
            this.checkContentList = res.data;
          }
        })
        .catch(err => {
          console.log(err);
        });
    },
    inspectType() {
      this.$store.commit("saveStatus", this.radio);
      if (this.radio == 2 || this.radio == 1) {
        this.isShow_table = false;
      } else {
        this.isShow_table = true;
      }
      console.log(this.isShow_table);
    },
    //拼出检查组需要保存的数据
    getInfo() {
      let returnData = [];
      this.procuratorialPersonnelList.forEach(items => {
        console.log("1010----------------1", items);
        let obj = {
          rwId: this.$route.query.rwid,
          members: [],
          organizes: []
        };

        let wbrys = items.wbry.split(",");
        let wbryssdws = items.wbryssdw.split(",");
        console.log(wbrys);
        console.log(wbryssdws);
        wbrys.forEach((items, index) => {
          obj.members.push({
            zyName: items,
            zydw: wbryssdws[index],
            zylx: 2
          });
        });

        // debugger
        // this.wbryArr = items.wbry.split(",")
        // this.wbryssdwArr = items.wbryssdw.split(",")
        // if(this.wbryArr.length == this.wbryssdwArr.length){
        //     obj.members.push({
        //         isCz: res.sfyz == 'Y' ? 1 : 0,
        //         zyId: res.rybh,
        //         zyName: res.ryxm,
        //         zydw: res.zzjgmc,
        //         zyks: res.bmmc,
        //         zylx: 0
        //     });
        // }
        items.zz.forEach(item => {
          this.jczList.forEach(res => {
            if (item == res.rybh) {
              obj.members.push({
                isCz: res.sfyz == "Y" ? 1 : 0,
                zyId: res.rybh,
                zyName: res.ryxm,
                zydw: res.zzjgmc,
                zyks: res.bmmc,
                zylx: 0
              });
            }
          });
        });
        items.zy.forEach(item => {
          this.jczList.forEach(res => {
            if (item == res.rybh) {
              obj.members.push({
                isCz: res.sfyz == "Y" ? 1 : 0,
                zyId: res.rybh,
                zyName: res.ryxm,
                zydw: res.zzjgmc,
                zyks: res.bmmc,
                zylx: 1
              });
            }
          });
        });

        items.bjdw.forEach(item => {
          this.beijiandanweiList.forEach(res => {
            if (item == res.qyjgdm) {
              obj.organizes.push({
                bjdwId: res.qyjgdm,
                bjdwName: res.qymc
              });
            }
          });
        });

        returnData.push(obj);
      });
      console.log(returnData);
      return returnData;
    }
  },
  data() {
    return {
      jcxmlxval: 1,
      jcxmlxList: [
        {
          label: "单项检查",
          id: 0
        },
        {
          label: "综合检查",
          id: 1
        }
      ],
      jcz_show: false, //点击确定显示检查组
      teamVOss: [], //检查表单回显6
      jczxlist: [], //检查子项list
      wbry: "", //外部人员
      valueZxAll: [], //检查子项全选
      wbrydw: "", //外部人员单位
      checkContentList: [], //检查内容列表
      jczxzdb: [], //检查子项列表
      jcxmzdb: [], //检查项目列表
      bjdwlxzdb: [], //备件单位类型列表
      jcnrzdbfh: [], //检查内容字典表返回
      jczxzdbfh: [], //检查子项字典表返回
      jcxmzdbfh: [], //检查项目字典表返回
      dcbdlist: [], //待查表单数据
      bjdwlxname: [], //被检单位类型
      beijiandanweiList: [], //被检单位列表
      dcbdclums: [
        {
          align: "center",
          prop: "bdName",
          label: "表单名称"
        },
        {
          align: "center",
          prop: "",
          label: "操作",
          render: (h, params) => {
            return h("a", [
              h(
                "span",
                {
                  on: {
                    click: () => {
                      this.$router.push({
                        path: `${params.row.bdLu}`,
                        query: {
                          look: "look"
                        }
                      });
                    }
                  }
                },
                "查看"
              )
            ]);
          }
        }
      ],
      jcfs: 0,
      valueZx: [], //检查子项值
      valueNr: [], //检查内容值
      valueLx: [], //检查类型值
      jczList: [],
      SubitemMsg: {},
      detailList: {},
      bjdwcolumnshx: [
        {
          prop: "bjdwName",
          label: "被检单位",
          align: "center"
        },
        {
          prop: "title",
          label: "操作",
          align: "center",
          render: (h, params) => {
            return h("a", [
              h(
                "span",
                {
                  on: {
                    click: () => {
                      console.log(1);
                    }
                  }
                },
                "新增被检单位"
              )
            ]);
          }
        }
      ],
      jcrycolumnshx: [
        {
          prop: "",
          label: "人员属性",
          align: "center",
          render: (h, params) => {
            return h("div", [
              h("span", params.row.zylx == 0 ? "组长" : "组员")
            ]);
          }
        },
        {
          prop: "zyName",
          label: "人员名称",
          align: "center"
        },
        {
          prop: "zydw",
          label: "所属单位",
          align: "center"
        },
        {
          prop: "title",
          label: "操作",
          align: "center",
          render: (h, params) => {
            return h("a", [
              h(
                "span",
                {
                  on: {
                    click: () => {
                      console.log(1);
                    }
                  }
                },
                "更换"
              )
            ]);
          }
        }
      ],
      options: [
        {
          value: "选项1",
          label: "黄金糕"
        },
        {
          value: "选项2",
          label: "双皮奶"
        },
        {
          value: "选项3",
          label: "蚵仔煎"
        },
        {
          value: "选项4",
          label: "龙须面"
        },
        {
          value: "选项5",
          label: "北京烤鸭"
        }
      ],
      value: "",
      procuratorialPersonnelList: [],
      isShow_table: true,
      radio: 3,
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        resource2: "",
        resource3: ""
      },

      list: [
        {
          id: "24",
          title: "11"
        }
      ],
      pageInfo: {
        currentPage: 2,
        pageSize: 10,
        total: 100,
        handleSizeChange: val => {
          console.log(val);
        },
        handleCurrentChange: val => {
          console.log(val);
        }
      },
      tablePar: {
        stripe: true, // 是否为斑马纹 table
        loading: false, // 是否添加表格loading加载动画
        highlightCurrentRow: true, // 是否支持当前行高亮显示
        mutiSelect: false, // 是否支持列表项选中功能
        showIndex: true //是否显示选择框
      },
      options: {
        stripe: true, // 是否为斑马纹 table
        loading: false, // 是否添加表格loading加载动画
        highlightCurrentRow: true, // 是否支持当前行高亮显示
        mutiSelect: false // 是否支持列表项选中功能
      },
      handleSelectionChange(val) {
        console.log("val:", val);
      },
      columns: [
        {
          prop: "title",
          label: "表单名称",
          align: "center"
        },
        {
          prop: "title",
          label: "操作",
          align: "center",
          render: (h, params) => {
            return h("a", [
              h(
                "span",
                {
                  on: {
                    click: () => {
                      console.log(1);
                    }
                  }
                },
                "查看"
              )
            ]);
          }
        }
      ],
      columns2: [
        {
          prop: "title",
          label: "表单名称",
          align: "center"
        },
        {
          prop: "title",
          label: "操作",
          align: "center",
          render: (h, params) => {
            return h("a", [
              h(
                "span",
                {
                  on: {
                    click: () => {
                      console.log(1);
                    }
                  }
                },
                "查看"
              )
            ]);
          }
        }
      ],
      list2: [
        {
          id: "24",
          title: "11"
        }
      ],

      handleSelectionChange1(val) {
        console.log("val:", val);
      },
      columns1: [
        {
          prop: "title",
          label: "组长",
          align: "center"
        },
        {
          prop: "title",
          label: "组员",
          align: "center"
        },
        {
          prop: "title",
          label: "外部人员",
          align: "center"
        },
        {
          prop: "title",
          label: "外部人员所属单位",
          align: "center"
        },
        {
          prop: "title",
          label: "被检单位",
          align: "center"
        }
      ],
      list3: [
        {
          id: "24",
          title: "11"
        }
      ],
      columns3: [
        {
          prop: "title",
          label: "表单名称",
          align: "center"
        }
      ]
    };
  }
};
</script>

<style scoped>
.span_right {
  text-align: right;
  display: inline-block;
  width: 156px;
}

.input_width {
  width: 85%;
}

.taskGeneration_ {
  margin-left: 10px;
  overflow-y: auto;
  height: calc(100vh - 218px);
  width: calc(100% - 40px);
  overflow-x: hidden;
  background: #f6f7f9;
  border: 1px solid #efeded;
  padding: 0 10px;
}

.title_style {
  border-left: 3px solid #409eff;
  padding-left: 4px;
  font-size: 15px;
  margin-bottom: 10px;
}

.btn_operation {
  text-align: center;
}

.inputWidth {
  width: 300px;
}
</style>
