<template>
  <div id="informationTemplate">
    <table-list
      :tableSets="tableSet"
      :tableData="tableData"
      :navText="navText"
      @addClick="addClick"
      :loading="loading"
      @editInfo="editInfo"
      @aboutGoods="aboutGoods"
    >
      <template slot="btn" slot-scope="props">
        <el-button type="text" @click="addClick(props.scope.row, 0)"
          >修改</el-button
        >
        <el-button type="text" @click="associate(props.scope.row)"
          >关联</el-button
        >
        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
      </template>
    </table-list>
    <pagination
      :total="total"
      :pageSize="formData.pageSize"
      :currentPage="formData.pageNum"
      @handleSizeChange="handleSizeChange"
      @handleCurrentChange="handleCurrentChange"
    />
    <el-dialog
      @closed="loadingClose"
      :visible.sync="dialogVisible"
      width="630px"
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div slot="title" class="hearders">
        <div class="leftTitle">
          {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
        </div>
        <div class="rightBoxs">
          <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
        </div>
      </div>
      <div style="overflow-y: auto; max-height: 600px">
        <p class="p_infos">模板基本信息</p>
        <el-form
          label-position="right"
          label-width="110px"
          :model="listData"
          :rules="rules"
          ref="listData"
        >
          <el-form-item
            v-for="(items, indexs) in listitem"
            :key="indexs"
            :label="items.label"
            :prop="items.prop"
          >
            <el-radio-group
              v-if="items.scope === 'status'"
              v-model="listData[items.prop]"
            >
              <el-radio
                v-for="(item, index) in items.options"
                :key="index"
                :label="item.value"
                :disabled="statusPop === 2"
                >{{ item.label }}</el-radio
              >
            </el-radio-group>
            <div v-else-if="items.scope === 'activeType'">
              <div :class="changeHeight ? 'ach' : 'clh'">
                <div
                  v-for="(item, index) in zhType"
                  :key="index"
                  class="listBoxStys"
                >
                  {{
                    item.educationName +
                    " - " +
                    item.projectName +
                    "-" +
                    item.businessName
                  }}
                  <i
                    class="el-icon-error closeIcons"
                    @click="closeType(item.id)"
                  ></i>
                </div>
              </div>
              <el-button
                size="mini"
                v-if="zhType.length > 1"
                @click="changeType"
                >{{ changeHeight ? "展开" : "关闭" }}</el-button
              ><el-button
                size="mini"
                v-if="cauType.length > 0"
                @click="allclear"
                >清空</el-button
              >
            </div>
            <div
              v-else-if="items.scope === 'certificate'"
              style="display: flex; align-items: center"
            >
              <el-select
                v-model="eduType"
                placeholder="请选择教育类型"
                @change="eduChange"
              >
                <el-option
                  v-for="item in itemOption1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <el-popover
                placement="bottom"
                trigger="click"
                :disabled="eduType ? false : true"
                ><el-checkbox
                  v-model="checkAll"
                  @change="handleCheckAllChange"
                  :indeterminate="isIndeterminate"
                  >全选</el-checkbox
                >
                <el-checkbox-group
                  v-model="cauType"
                  class="checkboxSty"
                  @change="handleCheckedCitiesChange"
                >
                  <el-checkbox
                    v-for="(item, index) in itemOption2"
                    :label="item.id"
                    :key="index"
                    >{{
                      item.projectName + "-" + item.businessName
                    }}</el-checkbox
                  >
                </el-checkbox-group>
                <el-button
                  slot="reference"
                  style="margin-left: 12px"
                  @click="getMessage"
                  >请选择业务层次</el-button
                >
              </el-popover>
              <span style="margin-left: 10px">注：可多选</span>
            </div>
            <!-- <div v-else-if="items.scope === 'select'">
                <el-select
                  v-model="listData[items.prop]"
                  multiple
                  placeholder="请选择审核人"
                >
                  <el-option
                    v-for="item in userList"
                    :key="item.userId"
                    :label="item.nickName"
                    :value="item.userId"
                  >
                  </el-option>
                </el-select>
                <span style="margin-left: 10px">注：可多选</span>
              </div> -->
            <div v-else>
              <el-input v-model="listData[items.prop]"></el-input>
              <div v-if="items.ch">{{ items.ch }}</div>
            </div>
          </el-form-item>
        </el-form>
        <p class="p_infos">
          模板字段组合<el-button
            type="text"
            style="margin-left: 20px"
            @click="openYL"
            >预览</el-button
          >
        </p>
        <div class="dis_fs">
          <div style="width: 49%">
            <div>
              <el-button size="mini" type="primary" @click="openThisLiting"
                >添加</el-button
              >
              <span style="margin-left: 10px">按字段选择时间顺序排序</span>
            </div>
            <ul>
              <li
                v-for="(item, index) in listData.keyValue"
                :key="index"
                class="dis_fls"
              >
                <div>
                  <el-button
                    type="text"
                    @click="del1(index)"
                    style="margin-right: 14px"
                    >删除</el-button
                  >
                  {{ item.fieldName }}{{ item.required ? " (必填)" : "" }}
                </div>
                <div style="margin-right: 10px"></div>
              </li>
            </ul>
          </div>
          <div class="fengs"></div>
          <div style="width: 49%">
            <div>
              <el-button size="mini" type="primary" @click="openThisLitingRight"
                >添加</el-button
              >
              <span style="margin-left: 10px">按字段选择时间顺序排序</span>
            </div>
            <ul>
              <li
                v-for="(item, index) in listData.keyValue2"
                :key="index"
                class="dis_fls"
              >
                <div>
                  <el-button
                    type="text"
                    @click="del2(index)"
                    style="margin-right: 14px"
                    >删除</el-button
                  >
                  {{ item.fieldName }}{{ item.required ? " (必填)" : "" }}
                </div>
                <div style="margin-right: 10px"></div>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="close">取 消</el-button>
        <el-button
          type="primary"
          :loading="disabledBtn"
          v-if="statusPop !== 2"
          @click="submit('listData')"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisYL"
      width="800px"
      append-to-body
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div slot="title" class="hearders">
        <div class="leftTitle">预览</div>
        <div class="rightBoxs">
          <img src="@/assets/images/Close@2x.png" alt="" @click="closeYL" />
        </div>
      </div>
      <header class="headerStys">{{ listData.name }}</header>
      <el-row
        :gutter="20"
        style="background-color: #999; max-height: 600px; overflow-y: auto"
      >
        <el-col :span="12">
          <ul>
            <template v-for="(item, index) in listData.keyValue">
              <li
                :key="index"
                v-if="item.inputType === 1"
                class="autoFlex bgcFFF"
              >
                <span
                  ><i class="required" v-if="item.required">*</i
                  >{{ item.fieldName }}</span
                >
                <span class="color:#b4b4b4;">{{
                  "请输入" + item.fieldName
                }}</span>
              </li>
              <li
                :key="index"
                v-if="item.inputType === 2 || item.inputType === 5"
                class="autoFlex bgcFFF"
              >
                <span
                  ><i class="required" v-if="item.required">*</i
                  >{{ item.fieldName }}</span
                >
                <span class="color:#b4b4b4;"
                  >{{ "请选择" + item.fieldName
                  }}<i class="el-icon-arrow-right"></i
                ></span>
              </li>
              <li
                :key="index"
                v-if="item.inputType === 3"
                class="borstyflex bgcFFF"
              >
                <div class="autoFlex" style="border: 1px solid transparent">
                  <span
                    ><i class="required" v-if="item.required">*</i
                    >{{ item.fieldName }}</span
                  >
                  <div style="display: flex; align-items: center">
                    <i
                      v-if="item.fieldKey !== 'commitment_electr_signature'"
                      class="el-icon-warning-outline"
                      style="
                        font-weight: bold;
                        color: red;
                        font-size: 20px;
                        margin-right: 6px;
                      "
                    ></i>
                    <div v-if="item.fieldKey === 'recent_photos'">
                      证件照竖向<br />文件大小下≤2M
                    </div>
                    <div v-if="item.fieldKey === 'idcard_face_photo'">
                      人像面（横向）<br />文件大小下≤2M
                    </div>
                    <div v-if="item.fieldKey === 'idcard_national_photo'">
                      国徽面（横向）<br />文件大小下≤2M
                    </div>
                  </div>
                </div>
                <div v-if="item.fieldKey === 'commitment_electr_signature'">
                  <p>
                    本人自愿做出如下承诺：<br />本人己仔细阅读《广东
                    省住房和城乡建设厅关于推进住房和城乡建设领域施
                    工现场专业人员职业培训工作的通知》
                    全部内容并知晓和理解，本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定，本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求，如有虛假或与实际规定不符等情况造成的一切后果由本人承担。<br />
                    特此承诺！
                  </p>
                  <div>
                    <p style="color: red; text-align: center">
                      签名板（请在此处进行签名）
                    </p>
                    <div class="poters">手动签名区</div>
                  </div>
                </div>
                <div v-else style="text-align: center">
                  <img
                    class="imgs"
                    src="../../../../assets/images/imgpng.png"
                    alt="加载失败"
                  />
                </div>
              </li>
              <li
                :key="index"
                v-if="item.inputType === 4"
                class="borstyflex bgcFFF"
              >
                <div class="autoFlex" style="border: 1px solid transparent">
                  <span
                    ><i class="required" v-if="item.required">*</i
                    >{{ item.fieldName }}</span
                  >
                  <div style="display: flex; align-items: center">
                    <i
                      class="el-icon-warning-outline"
                      style="
                        font-weight: bold;
                        color: red;
                        font-size: 20px;
                        margin-right: 6px;
                      "
                    ></i>
                    <div
                      v-if="item.fieldKey === 'commitment_seal'"
                      style="font-size: 12px"
                    >
                      下载承诺书进行填写盖章<br />并上传<br />文件大小下≤2M
                      <el-button type="text" @click="getDowm"
                        >点击下载</el-button
                      >
                    </div>
                  </div>
                </div>
                <div style="text-align: center">
                  <img
                    class="imgs"
                    src="../../../../assets/images/imgsqty.png"
                    alt="加载失败"
                  />
                </div>
              </li>
            </template>
          </ul>
        </el-col>
        <el-col :span="12">
          <ul>
            <template v-for="(item, index) in listData.keyValue2">
              <li
                :key="index"
                v-if="item.inputType === 1"
                class="autoFlex bgcFFF"
              >
                <span
                  ><i class="required" v-if="item.required">*</i
                  >{{ item.fieldName }}</span
                >
                <span class="color:#b4b4b4;">{{
                  "请输入" + item.fieldName
                }}</span>
              </li>
              <li
                :key="index"
                v-if="item.inputType === 2 || item.inputType === 5"
                class="autoFlex bgcFFF"
              >
                <span
                  ><i class="required" v-if="item.required">*</i
                  >{{ item.fieldName }}</span
                >
                <span class="color:#b4b4b4;"
                  >{{ "请选择" + item.fieldName
                  }}<i class="el-icon-arrow-right"></i
                ></span>
              </li>
              <li
                :key="index"
                v-if="item.inputType === 3"
                class="borstyflex bgcFFF"
              >
                <div class="autoFlex" style="border: 1px solid transparent">
                  <span
                    ><i class="required" v-if="item.required">*</i
                    >{{ item.fieldName }}</span
                  >
                  <div style="display: flex; align-items: center">
                    <i
                      v-if="item.fieldKey !== 'commitment_electr_signature'"
                      class="el-icon-warning-outline"
                      style="
                        font-weight: bold;
                        color: red;
                        font-size: 20px;
                        margin-right: 6px;
                      "
                    ></i>
                    <div v-if="item.fieldKey === 'recent_photos'">
                      证件照竖向<br />文件大小下≤2M
                    </div>
                    <div v-if="item.fieldKey === 'idcard_face_photo'">
                      人像面（横向）<br />文件大小下≤2M
                    </div>
                    <div v-if="item.fieldKey === 'idcard_national_photo'">
                      国徽面（横向）<br />文件大小下≤2M
                    </div>
                  </div>
                </div>
                <div v-if="item.fieldKey === 'commitment_electr_signature'">
                  <p>
                    本人自愿做出如下承诺：<br />本人己仔细阅读《广东
                    省住房和城乡建设厅关于推进住房和城乡建设领域施
                    工现场专业人员职业培训工作的通知》
                    全部内容并知晓和理解，本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定，本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求，如有虛假或与实际规定不符等情况造成的一切后果由本人承担。<br />
                    特此承诺！
                  </p>
                  <div>
                    <p style="color: red; text-align: center">
                      签名板（请在此处进行签名）
                    </p>
                    <div class="poters">手动签名区</div>
                  </div>
                </div>
                <div v-else style="text-align: center">
                  <img
                    class="imgs"
                    src="../../../../assets/images/imgpng.png"
                    alt="加载失败"
                  />
                </div>
              </li>
              <li
                :key="index"
                v-if="item.inputType === 4"
                class="borstyflex bgcFFF"
              >
                <div class="autoFlex" style="border: 1px solid transparent">
                  <span
                    ><i class="required" v-if="item.required">*</i
                    >{{ item.fieldName }}</span
                  >
                  <div style="display: flex; align-items: center">
                    <i
                      class="el-icon-warning-outline"
                      style="
                        font-weight: bold;
                        color: red;
                        font-size: 20px;
                        margin-right: 6px;
                      "
                    ></i>
                    <div
                      v-if="item.fieldKey === 'commitment_seal'"
                      style="font-size: 12px"
                    >
                      下载承诺书进行填写盖章<br />并上传<br />文件大小下≤2M
                      <el-button type="text" @click="getDowm"
                        >点击下载</el-button
                      >
                    </div>
                  </div>
                </div>
                <div style="text-align: center">
                  <img
                    class="imgs"
                    src="../../../../assets/images/imgsqty.png"
                    alt="加载失败"
                  />
                </div>
              </li>
            </template>
          </ul>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeYL">取 消</el-button>
      </span>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisibleLitsing1"
      width="300px"
      append-to-body
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div slot="title" class="hearders">
        <div class="leftTitle">字段配置(第一步)</div>
        <div class="rightBoxs">
          <img
            src="@/assets/images/Close@2x.png"
            alt=""
            @click="closeLitsing"
          />
        </div>
      </div>
      <ul>
        <li v-for="(item, index) in pzList1" :key="index" class="disos">
          <div
            class="disChild"
            @click="item.disable === true ? '' : changeStatus1(item, index)"
          >
            <i class="checkSty" :class="item.disable === true ? 'disable' : ''">
              <i
                v-if="item.checked"
                class="el-icon-check"
                style="color: #409eff"
              ></i></i
            ><span>{{ item.fieldName }}</span>
          </div>
          <div
            class="disChild"
            @click="item.disable === true ? '' : changeStatus1s(item, index)"
          >
            <i class="radiosty" :class="item.disable === true ? 'disable' : ''"
              ><div :class="item.required ? 'activeRadio' : ''"></div></i
            ><span>必填</span>
          </div>
        </li>
      </ul>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeLitsing">取 消</el-button>
        <el-button type="primary" @click="submitLitsing">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisibleLitsing2"
      width="300px"
      append-to-body
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div slot="title" class="hearders">
        <div class="leftTitle">字段配置(第二步)</div>
        <div class="rightBoxs">
          <img
            src="@/assets/images/Close@2x.png"
            alt=""
            @click="closeLitsing2"
          />
        </div>
      </div>
      <ul>
        <li v-for="(item, index) in pzList2" :key="index" class="disos">
          <div
            class="disChild"
            @click="item.disable === true ? '' : changeStatus2(item, index)"
          >
            <i class="checkSty" :class="item.disable === true ? 'disable' : ''">
              <i
                v-if="item.checked"
                class="el-icon-check"
                style="color: #409eff"
              ></i></i
            ><span>{{ item.fieldName }}</span>
          </div>
          <!-- @click="item.disable == true ? '' : changeStatus2s(item, index)" (旧)下面按钮事件 -->
          <div class="disChild" @click="titleFunc">
            <i class="radiosty" :class="item.disable === true ? 'disable' : ''"
              ><div :class="item.required ? 'activeRadio' : ''"></div></i
            ><span>必填</span>
          </div>
        </li>
      </ul>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeLitsing2">取 消</el-button>
        <el-button type="primary" @click="submitLitsing2">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisibleAss"
      width="800px"
      append-to-body
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div slot="title" class="hearders">
        <div class="leftTitle">关联商品</div>
        <div class="rightBoxs">
          <img
            src="@/assets/images/Close@2x.png"
            alt=""
            @click="dialogVisibleAss = false"
          />
        </div>
      </div>
      <search-box-new
        ref="searchBox"
        :formData="formData5"
        :formList="formList5"
        @search="getInfosCX(1)"
        @init="init5"
      />
      <el-table
        ref="multipleTable"
        :data="boxtableData"
        border
        @select-all="selectAll"
        @select="select"
        :row-key="getRowKeys"
        :header-cell-style="{
          'background-color': '#eee',
          padding: '8px',
          color: '#333',
        }"
      >
        <el-table-column
          align="center"
          type="selection"
          width="55"
          header-align="center"
          :selectable="checkboxT"
          :reserve-selection="true"
        >
        </el-table-column>
        <template v-for="(item, index) in tableSetAss">
          <el-table-column
            v-if="item.scope !== 'inputs'"
            :width="item.width"
            :key="index"
            :label="item.label"
            align="center"
            :show-overflow-tooltip="true"
            header-align="center"
          >
            <template slot-scope="scope">
              <span v-if="item.scope === 'types'">{{
                scope.row[item.prop] === 1
                  ? "视频"
                  : scope.row[item.prop] === 2
                  ? "题库"
                  : scope.row[item.prop] === 3
                  ? "面授"
                  : scope.row[item.prop] === 4
                  ? "服务"
                  : scope.row[item.prop] === 5
                  ? "组合"
                  : "未知"
              }}</span>
              <span v-else-if="item.scope === 'maRY'">
                {{ scope.row["educationName"] }} -
                {{ scope.row["projectName"] }} - {{ scope.row["businessName"] }}
              </span>
              <span v-else-if="item.scope === 'Status'">
                {{
                  scope.row[item.prop] === 1
                    ? "有效"
                    : scope.row[item.prop] === 0
                    ? "无效"
                    : "未知"
                }}
              </span>
              <span v-else>{{ scope.row[item.prop] }}</span></template
            >
          </el-table-column></template
        >
      </el-table>
      <pagination
        :total="total5"
        :pageSize="formData5.pageSize"
        :currentPage="formData5.pageNum"
        @handleSizeChange="handleSizeChange5"
        @handleCurrentChange="handleCurrentChange5"
      />
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisibleAss = false">取 消</el-button>
        <el-button
          type="primary"
          :disabled="activeLists.length === 0"
          @click="submitForm"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisibleisActive"
      width="800px"
      append-to-body
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div slot="title" class="hearders">
        <div class="leftTitle">所有关联商品</div>
        <div class="rightBoxs">
          <img
            src="@/assets/images/Close@2x.png"
            alt=""
            @click="dialogVisibleisActive = false"
          />
        </div>
      </div>
      <el-table
        :data="boxtableDataIsActive"
        border
        :header-cell-style="{
          'background-color': '#eee',
          padding: '8px',
          color: '#333',
        }"
      >
        <template v-for="(item, index) in tableSetIsActive">
          <el-table-column
            v-if="item.scope !== 'inputs'"
            :width="item.width"
            :key="index"
            :label="item.label"
            align="center"
            header-align="center"
          >
            <template slot-scope="scope">
              <span v-if="item.scope === 'types'">{{
                scope.row[item.prop] === 1
                  ? "视频"
                  : scope.row[item.prop] === 2
                  ? "题库"
                  : scope.row[item.prop] === 3
                  ? "面授"
                  : scope.row[item.prop] === 4
                  ? "服务"
                  : scope.row[item.prop] === 5
                  ? "组合"
                  : "未知"
              }}</span>
              <span v-else-if="item.scope === 'maRY'">
                {{ scope.row["educationName"] }} -
                {{ scope.row["projectName"] }} - {{ scope.row["businessName"] }}
              </span>
              <span v-else-if="item.scope === 'Status'">
                {{
                  scope.row[item.prop] === 1
                    ? "有效"
                    : scope.row[item.prop] === 0
                    ? "无效"
                    : "未知"
                }}
              </span>
              <span v-else>{{ scope.row[item.prop] }}</span></template
            >
          </el-table-column></template
        ><el-table-column fixed="right" label="操作" width="120" align="center">
          <template slot-scope="scope">
            <el-button type="text" @click="delIsActive(scope.row, scope.$index)"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <pagination
        :total="totala"
        :pageSize="formDataa.pageSize"
        :currentPage="formDataa.pageNum"
        @handleSizeChange="handleSizeChangea"
        @handleCurrentChange="handleCurrentChangea"
      />
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisibleisActive = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<!-- 输入类型 1输入框 2下拉选择 3上传文件 4下载文件 5时间选择器 -->
<script>
import * as baseUrls from "@/utils/request.js";
import searchBoxNew from "@/components/searchBoxNew";
import tableList from "@/components/tableList";
import pagination from "@/components/pagination";
export default {
  name: "InformationTemplate",
  components: { searchBoxNew, tableList, pagination },
  data() {
    return {
      disabledBtn: false,
      isIndeterminate: false,
      checkAll: false,
      changeHeight: true,
      loading: false, //当前表单加载是否加载动画
      navText: {
        title: "资料模板",
        index: 0,
        ch: "条",
        num: true,
        choice: true,
        border: true,
        addHide: false,
        backFatherBtn: {
          status: false,
          title: "未定义",
        },
      },
      // 表单
      tableSet: [
        {
          label: "资料模板编码",
          prop: "code",
          hidden: true,
        },
        {
          label: "资料模板标题",
          prop: "name",
          hidden: true,
          scope: "editInfo",
          // width: "240px",
        },
        {
          label: "适用业务层级",
          prop: "businessList",
          hidden: true,
          scope: "mapTypesBUS",
        },
        // {
        //   label: "资料审核人",
        //   prop: "userList",
        //   hidden: true,
        //   scope: "teachers",
        //   width: "180px",
        // },
        {
          label: "关联商品",
          prop: "goodsIds",
          hidden: true,
          scope: "goodsIds",
        },
        {
          label: "状态",
          prop: "status",
          hidden: true,
          scope: "isOptions",
          options:[
            {
              label:"启用",
              value:1
            },{
              label:"停用",
              value:0
            }
          ]
        },
      ],
      tableData: [], //表单数据
      formData: {
        status: "0,1",
        pageSize: 10,
        pageNum: 1,
      },
      //搜索
      formList: [
        {
          prop: "educationId",
          placeholder: "教育类型",
          scope: "educationType",
        },
        {
          prop: "businessId",
          placeholder: "业务层次",
          scope: "businessLevel",
          edu: "educationId",
        },
        {
          prop: "subjectId",
          placeholder: "科目",
          scope: "sujectType",
          edu: "educationId",
        },
        {
          prop: "type",
          placeholder: "题目类型",
          scope: "selectBank",
        },
        {
          prop: "prefixName",
          placeholder: "请输入标题前缀",
        },
      ],
      total: 0, //一共多少条
      options1: [],
      options2: [],
      courseProjectType: [],
      itemOption1: [],
      itemOption2: [],
      eduType: "",
      cauType: [],
      zhType: [],
      // 弹窗字段
      listitem: [
        {
          label: "适用业务层级",
          scope: "certificate",
        },
        {
          label: "",
          scope: "activeType",
        },
        {
          label: "模板标题",
          prop: "name",
        },
        // {
        //   label: "指派审核人",
        //   prop: "userIds",
        //   scope: "select",
        // },
        {
          label: "状态",
          prop: "status",
          scope: "status",
          options: [
            {
              label: "启用",
              value: 1,
            },
            {
              label: "停用",
              value: 0,
            },
          ],
        },
      ],
      //   弹窗数据
      listData: {
        keyValue: [],
        keyValue2: [],
      },
      statusPop: -1,
      dialogVisible: false,
      dialogVisibleLitsing1: false,
      dialogVisibleLitsing2: false,
      dialogVisYL: false,
      pzList1: [], //配置列表
      pzList2: [], //配置列表
      pzList1sss: [], //配置列表
      pzList2sss: [], //配置列表
      bfPzList: [], //备份配置列表
      userList: [],

      activeLists: [],
      total5: 0,
      formData5: {
        goodsType: 1,
        status: 1,
        goodsStatus: 1,
        pageNum: 1,
        pageSize: 10,
      },
      formList5: [
        {
          prop: "educationTypeId",
          placeholder: "教育类型",
          scope: "educationType",
        },
        {
          prop: "businessId",
          placeholder: "业务层次",
          scope: "businessLevel",
          edu: "educationTypeId",
        },
        {
          prop: "goodsName",
          placeholder: "请输入商品名称",
        },
      ],
      tableSetAss: [
        {
          label: "商品编码",
          prop: "code",
          width: "130px",
        },
        {
          label: "年份",
          prop: "year",
        },
        {
          label: "商品名称",
          prop: "goodsName",
          width: "260px",
        },
        {
          label: "业务层级",
          scope: "maRY",
          width: "360px",
        },
        {
          label: "商品类型",
          prop: "goodsType",
          scope: "types",
          width: "100px",
        },
        {
          label: "有效状态",
          prop: "status",
          scope: "Status",
          width: "100px",
        },
        {
          label: "商品标价",
          prop: "standPrice",
          width: "100px",
        },
      ],
      disCheckList: [],
      boxtableData: [],
      id: "",
      dialogVisibleAss: false,
      tableSetIsActive: [
        {
          label: "商品编码",
          prop: "code",
          width: "130px",
        },
        {
          label: "年份",
          prop: "year",
        },
        {
          label: "商品名称",
          prop: "goodsName",
          width: "260px",
        },
        {
          label: "业务层级",
          scope: "maRY",
          width: "360px",
        },
        {
          label: "商品类型",
          prop: "goodsType",
          scope: "types",
          width: "140px",
        },
        {
          label: "有效状态",
          prop: "status",
          scope: "Status",
          width: "100px",
        },
        {
          label: "商品标价",
          prop: "standPrice",
          width: "100px",
        },
      ],
      boxtableDataIsActive: [],
      dialogVisibleisActive: false,
      ars: "", //关联业务层级储存
      //表单验证
      rules: {
        name: [{ required: true, message: "请输入模板标题", trigger: "blur" }],
        userIds: [
          { required: true, message: "请选择指派审核人", trigger: "change" },
        ],
        status: [{ required: true, message: "请选择状态", trigger: "change" }],
      },
      activeListGoods: [],
      totala: 0,
      formDataa: {
        pageNum: 1,
        pageSize: 10,
      },
    };
  },
  watch: {
    cauType: function () {
      this.changeTypes();
    },
  },
  mounted() {
    this.search();
    this.initOptions();
    this.getInfos();
    this.getUserInfoList();
  },
  activated() {
    this.search();
    this.initOptions();
    this.getInfos();
    this.getUserInfoList();
  },
  methods: {
    loadingClose() {
      this.disabledBtn = false;
    },
    allclear() {
      this.cauType = [];
      this.handleCheckedCitiesChange();
    },
    handleCheckedCitiesChange() {
      let nid = this.itemOption2.map((item) => {
        return item.id;
      });
      this.checkAll = nid.every((item) => {
        if (this.cauType.includes(item)) {
          this.isIndeterminate = true;
          return true;
        } else {
          return false;
        }
      });
      if (this.cauType.length) {
        this.isIndeterminate = true;
      } else {
        this.isIndeterminate = false;
      }
      if (this.checkAll) {
        this.isIndeterminate = false;
      }
    },
    handleCheckAllChange(val) {
      if (val) {
        let nid = this.itemOption2.map((item) => {
          return item.id;
        });
        let arrays = this.cauType.concat(nid);
        this.cauType = this.setFunc(arrays);
        this.isIndeterminate = false;
      } else {
        let nid = this.itemOption2.map((item) => {
          return item.id;
        });
        let newArr = [];
        this.cauType.forEach((item) => {
          if (!nid.includes(item)) {
            newArr.push(item);
          }
        });
        this.cauType = newArr;
        if (this.cauType.length) {
          this.isIndeterminate = true;
        } else {
          this.isIndeterminate = false;
        }
      }
    },
    setFunc(arr) {
      var arrays = [];
      for (let i = 0; i < arr.length; i++) {
        if (!arrays.includes(arr[i])) {
          arrays.push(arr[i]);
        }
      }
      return arrays;
    },
    handleSizeChangea(v) {
      this.formDataa.pageSize = v;
      this.formDataa.pageNum = 1;
      this.getNewInfos();
    },
    handleCurrentChangea(v) {
      this.formDataa.pageNum = v;
      this.getNewInfos();
    },
    getNewInfos() {
      this.$api.inquireGoods(this.formDataa).then((res) => {
        this.boxtableDataIsActive = res.rows;
        this.totala = res.total;
        this.search();
      });
    },
    getDowm() {
      let url = baseUrls.BASE_IMG_URL + "/oss/images/file/20211214.docx" +
        `?time=${this.$methodsTools.getNewTime()}`;;
      let link = document.createElement("a");
      let fileName = "导入模板" + ".xlsx";
      document.body.appendChild(link);
      link.href = url;
      link.dowmload = fileName;
      link.click();
      link.remove();
    },
    getActiveList() {
      this.$api.inquirebaseprofilefieldgoods_list().then((res) => {
        this.activeListGoods = res.data.map(Number);
      });
    },
    delIsActive(items) {
      var dataInt = this.formDataa.goodsIds.split(",").map(Number);
      var ats = dataInt.filter((item) => {
        return item != items.goodsId;
      });
      this.$api
        .editbaseprofile({ profileTpId: this.id, goodsIds: ats.toString() })
        .then((res) => {
          this.formDataa.goodsIds = ats.toString();
          this.$message.success("删除成功");
          if (!this.formDataa.goodsIds) {
            this.dialogVisibleisActive = false;
            this.search();
            return;
          }
          this.getNewInfos();
        });
    },
    submitFormIsActive() {
      // var arrays = [];
      // this.boxtableDataIsActive.map((item) => {
      //   arrays.push(item.goodsId);
      // });
      // this.$api
      //   .editbaseprofile({ profileTpId: this.id, goodsIds: arrays.toString() })
      //   .then((res) => {
      //     this.dialogVisibleisActive = false;
      //     this.$message.success("修改成功");
      //     this.search();
      //   });
    },
    aboutGoods(option) {
      if (!option.goodsIds) {
        this.$message.warning("该资料模板无关联商品");
        return;
      }
      this.formDataa.pageNum = 1;
      this.formDataa.goodsIds = option.goodsIds;
      this.$api.inquireGoods(this.formDataa).then((res) => {
        this.totala = res.total;
        this.boxtableDataIsActive = res.rows;
        this.dialogVisibleisActive = true;
        this.id = option.profileTpId;
      });
    },
    submitForm() {
      if (this.activeLists.length === 0) {
        this.dialogVisibleAss = false;
        return;
      }
      let arrays = this.disCheckList;
      this.activeLists.map((item) => {
        arrays.push(item.goodsId);
      });
      this.$api
        .editbaseprofile({ profileTpId: this.id, goodsIds: arrays.toString() })
        .then((res) => {
          this.dialogVisibleAss = false;
          this.$message.success("添加成功");
          this.activeLists = [];
          this.search();
        });
    },

    //关联
    associate(v) {
      var self = this;
      var ars = [];
      v.businessList.map((item) => {
        ars.push(item.businessId);
      });
      this.ars = ars.toString();
      this.$api
        .inquireGoods({
          goodsType: 1,
          businessIds: this.ars,
          status: 1,
          goodsStatus: 1,
          pageNum: 1,
          pageSize: 10,
        })
        .then((res) => {
          if (v.goodsIds) {
            this.disCheckList = v.goodsIds.split(",").map(Number);
          } else {
            this.disCheckList = [];
          }
          this.boxtableData = res.rows;
          this.total5 = res.total;
          this.dialogVisibleAss = true;
          this.id = v.profileTpId;
          this.$nextTick(function () {
            self.$refs.multipleTable.clearSelection();
          });
        });
    },
    selectAll(value) {
      this.activeLists = value;
    },
    select(value) {
      this.activeLists = value;
    },
    checkboxT(row, index) {
      if (this.activeListGoods.indexOf(row.goodsId) !== -1) {
        return false;
      } else {
        return true;
      }
    },
    getRowKeys(row) {
      return row.goodsId;
    },
    init5() {
      this.getInfosCX(2);
    },
    getInfosCX(int) {
      if (int === 1) {
        this.formData5.pageNum = 1;
      }
      if (int === 2) {
        this.formData5 = {
          goodsType: 1,
          status: 1,
          goodsStatus: 1,
          pageNum: 1,
          pageSize: 10,
        };
      }
      this.formData5.businessIds = this.ars;
      this.$api.inquireGoods(this.formData5).then((res) => {
        this.boxtableData = res.rows;
        this.total5 = res.total;
      });
    },
    titleFunc() {
      this.$message.warning("该选项默认必填且不允许修改");
    },
    openYL() {
      this.dialogVisYL = true;
    },
    closeYL() {
      this.dialogVisYL = false;
    },
    getUserInfoList() {
      this.$api.obtainUserList({ status: 1 }).then((res) => {
        this.userList = res.rows;
      });
    },
    changeStatus1(item, index) {
      if (item.checked) {
        item.checked = false;
        var indexs = this.pzList1sss.findIndex((items) => {
          return items.fieldKey === item.fieldKey;
        });
        this.pzList1sss.splice(indexs, 1);
      } else {
        item.checked = true;
        this.pzList1sss.push(item);
      }
    },
    changeStatus1s(item, index) {
      if (item.required) {
        item.required = false;
      } else {
        var ars = this.pzList1sss.some((items) => {
          return items.fieldKey === item.fieldKey;
        });
        if (ars) {
          item.required = true;
        } else {
          this.$message.warning("请先勾选相对应的配置项，再勾选对应必填项");
          return;
        }
      }
      this.pzList1sss.map((items) => {
        if (items.fieldKey === item.fieldKey) {
          items.required = item.required;
        }
      });
    },
    changeStatus2(item, index) {
      if (item.checked) {
        item.checked = false;
        this.pzList2sss.splice(index, 1);
      } else {
        item.checked = true;
        this.pzList2sss.push(item);
      }
    },
    changeStatus2s(item, index) {
      if (item.required) {
        item.required = false;
      } else {
        var ars = this.pzList2sss.some((items) => {
          return items.fieldKey === item.fieldKey;
        });
        if (ars) {
          item.required = true;
        } else {
          this.$message.warning("请先勾选相对应的配置项，再勾选对应必填项");
          return;
        }
        item.required = true;
      }
      this.pzList2sss.map((items) => {
        if (items.fieldKey === item.fieldKey) {
          items.required = item.required;
        }
      });
    },
    del1(index) {
      this.listData.keyValue.splice(index, 1);
    },
    del2(index) {
      this.listData.keyValue2.splice(index, 1);
    },
    getInfos() {
      this.$api.inquirebaseprofilefieldlist().then((res) => {
        res.rows.forEach((item) => {
          item.checked = false;
          item.required = false;
        });
        this.bfPzList = res.rows;
      });
    },
    openThisLiting() {
      var data = JSON.parse(JSON.stringify(this.bfPzList));
      if (this.listData.keyValue.length) {
        for (let j = 0; j < this.listData.keyValue.length; j++) {
          for (let i = 0; i < data.length; i++) {
            if (data[i].fieldKey == this.listData.keyValue[j].fieldKey) {
              data[i].checked = this.listData.keyValue[j].checked;
              data[i].required = this.listData.keyValue[j].required;
            }
          }
        }
      }
      if (this.listData.keyValue2.length) {
        for (let j = 0; j < this.listData.keyValue2.length; j++) {
          for (let i = 0; i < data.length; i++) {
            if (data[i].fieldKey == this.listData.keyValue2[j].fieldKey) {
              data[i].disable = true;
            }
          }
        }
      }
      this.pzList1sss = JSON.parse(JSON.stringify(this.listData.keyValue));
      data = data.filter((item) => {
        return item.fieldKey !== "commitment_seal";
      });
      this.pzList1 = data;
      this.dialogVisibleLitsing1 = true;
    },
    closeLitsing() {
      this.dialogVisibleLitsing1 = false;
    },
    submitLitsing() {
      for (let i = 0; i < this.pzList1sss.length; i++) {
        if (this.pzList1sss[i].fieldKey === "commitment_seal") {
          this.pzList1sss[i].url = "/oss/images/file/20211214.docx";
        }
      }
      this.listData.keyValue = this.pzList1sss;
      this.dialogVisibleLitsing1 = false;
    },
    openThisLitingRight() {
      var data = JSON.parse(JSON.stringify(this.bfPzList));
      if (this.listData.keyValue2.length) {
        for (let j = 0; j < this.listData.keyValue2.length; j++) {
          for (let i = 0; i < data.length; i++) {
            if (data[i].fieldKey == this.listData.keyValue2[j].fieldKey) {
              data[i].checked = this.listData.keyValue2[j].checked;
              data[i].required = this.listData.keyValue2[j].required;
            }
          }
        }
      }
      if (this.listData.keyValue.length) {
        for (let j = 0; j < this.listData.keyValue.length; j++) {
          for (let i = 0; i < data.length; i++) {
            if (data[i].fieldKey == this.listData.keyValue[j].fieldKey) {
              data[i].disable = true;
            }
          }
        }
      }
      this.pzList2sss = JSON.parse(JSON.stringify(this.listData.keyValue2));
      data = data.filter((item) => {
        if (item.fieldKey === "commitment_seal") {
          item.required = true;
        }
        return item.fieldKey === "commitment_seal";
      });
      this.pzList2 = data;
      this.dialogVisibleLitsing2 = true;
    },
    closeLitsing2() {
      this.dialogVisibleLitsing2 = false;
    },
    submitLitsing2() {
      for (let i = 0; i < this.pzList2sss.length; i++) {
        if (this.pzList2sss[i].fieldKey === "commitment_seal") {
          this.pzList2sss[i].url = "/oss/images/file/20211214.docx";
        }
      }
      this.listData.keyValue2 = this.pzList2sss;
      this.dialogVisibleLitsing2 = false;
    },
    getMessage() {
      if (!this.eduType) {
        this.$message.warning("请先选择教育类型");
      }
    },
    changeType() {
      this.changeHeight = !this.changeHeight;
    },
    changeTypes() {
      var arrays = [];
      this.cauType.map((item) => {
        this.courseProjectType.map((items, indexs) => {
          if (items.id === item) {
            arrays.push(items);
          }
        });
      });
      this.zhType = arrays;
    },
    eduChange() {
      var array = [];
      this.options2.map((item) => {
        if (item.educationId === this.eduType) {
          array.push(item);
        }
      });
      this.itemOption2 = array;
      this.handleCheckedCitiesChange();
    },
    initOptions() {
      this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
        var array = [];
        res.rows.map((item) => {
          array.push({ label: item.educationName, value: item.id });
        });
        this.options1 = array;
      });
      this.$api.inquirebusinessList({ status: 1 }).then((res) => {
        this.courseProjectType = res.rows;
        this.options2 = res.rows;
      });
    },
    editInfo(v) {
      this.addClick(v, 0);
    },
    search(int) {
      this.loading = true;
      if (int === 1) {
        this.formData.pageNum = 1;
      }
      if (int === 2) {
        this.formData = {
          status: "0,1",
          pageSize: 10,
          pageNum: 1,
        };
      }
      this.$api
        .inquirebaseprofiletplist(this.formData)
        .then((res) => {
          this.tableData = res.rows;
          this.total = res.total;
          this.navText.index = res.total;
          this.getActiveList();
        })
        .finally(() => {
          this.loading = false;
        });
    },
    init() {
      this.search(2);
    },
    closeType(id) {
      this.cauType.splice(this.cauType.indexOf(id), 1);
      this.handleCheckedCitiesChange();
    },
    del(v) {
      this.$alert(
        "确定删除此内容？<br />内容删除后将无法恢复，请慎重考虑",
        "提示",
        {
          dangerouslyUseHTMLString: true,
        }
      )
        .then(() => {
          var data = {
            profileTpId: v.profileTpId,
            status: -1,
          };
          this.$api.editbaseprofile(data).then((res) => {
            this.$message.success("删除成功");
            this.search();
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    addClick(v, int) {
      if (v === undefined) {
        this.statusPop = 1;
        this.listData = {
          status: 1,
          keyValue: [],
          keyValue2: [],
        };
        this.eduType = "";
        this.cauType = [];
        this.zhType = [];
      } else {
        this.statusPop = int;
        this.listData = JSON.parse(JSON.stringify(v));
        if (this.listData.keyValue) {
          this.listData.keyValue = JSON.parse(this.listData.keyValue);
        }
        if (this.listData.keyValue2) {
          this.listData.keyValue2 = JSON.parse(this.listData.keyValue2);
        }
        // if (this.listData.userIds) {
        //   this.listData.userIds = this.listData.userIds.split(",").map(Number);
        // }
        this.eduType = "";
        var array = [];
        v.businessList.map((items, indexs) => {
          array.push(items.businessId);
        });
        this.cauType = array;
      }
      this.itemOption1 = JSON.parse(JSON.stringify(this.options1));
      this.itemOption2 = JSON.parse(JSON.stringify(this.options2));
      this.$nextTick(() => {
        this.changeHeight = true;
        this.$refs.listData.clearValidate();
      });
      this.dialogVisible = true;
    },
    submit(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.rulesTableSumbit();
        } else {
          return false;
        }
      });
    },
    rulesTableSumbit() {
      this.disabledBtn = true;
      var data = JSON.parse(JSON.stringify(this.listData));
      var pushRays = [];
      this.zhType.map((item) => {
        pushRays.push({
          businessId: item.id,
          educationTypeId: item.educationId,
          projectId: item.projectId,
        });
      });
      data.businessList = pushRays;
      data.keyValue = JSON.stringify(this.listData.keyValue);
      data.keyValue2 = JSON.stringify(this.listData.keyValue2);
      // data.userIds = this.listData.userIds.toString();
      if (this.statusPop === 1) {
        this.$api
          .appbaseprofiletp(data)
          .then((res) => {
            this.$message.success("新增成功");
            this.dialogVisible = false;
            this.search();
          })
          .catch(() => {
            this.disabledBtn = false;
          });
      }
      if (this.statusPop === 0) {
        this.$api
          .editbaseprofile(data)
          .then((res) => {
            this.$message.success("修改成功");
            this.dialogVisible = false;
            this.search();
          })
          .catch(() => {
            this.disabledBtn = false;
          });
      }
    },
    close() {
      this.dialogVisible = false;
    },
    handleSizeChange(v) {
      this.formData.pageSize = v;
      this.formData.pageNum = 1;
      this.search();
    },
    handleCurrentChange(v) {
      this.formData.pageNum = v;
      this.search();
    },
    handleSizeChange5(v) {
      this.formData5.pageSize = v;
      this.formData5.pageNum = 1;
      this.getInfosCX();
    },
    handleCurrentChange5(v) {
      this.formData5.pageNum = v;
      this.getInfosCX();
    },
  },
};
</script>

<style lang="less" scoped>
.headerStys {
  margin-bottom: 12px;
  font-weight: bold;
  font-size: 21px;
}
.bgcFFF {
  background-color: #fff;
}
.dis_fls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.disos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.radiosty {
  display: flex;
  width: 16px;
  height: 16px;
  border: 1px solid #eee;
  margin-right: 6px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;

  .activeRadio {
    transition: all 0.3s;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #409eff;
  }
}
.disChild {
  display: flex;
  cursor: pointer;
  align-items: center;
}
.checkSty {
  display: inline-block;
  margin-right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid #eee;
}
.disable {
  cursor: no-drop;
  background-color: #f5f7fa !important;
  color: #f5f7fa !important;
}
.dis_fs {
  display: flex;
  justify-content: space-between;
}
.fengs {
  flex: 1;
  border-left: 1px solid #999;
}
.autoFlex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #eee;
  padding: 0px 18px;
  margin-bottom: 4px;
  min-height: 50px;
  .required {
    color: brown;
    margin-right: 6px;
  }
}
.borstyflex {
  border: 1px solid #eee;
  padding: 0px 18px;
  margin-bottom: 4px;
  .imgs {
    width: 280px;
    height: 190px;
    border: 1px solid #eee;
    margin-bottom: 6px;
  }
}
/deep/.el-button {
  border-radius: 8px;
}
/deep/.el-dialog {
  border-radius: 8px;
  .el-dialog__header {
    padding: 0;
    .hearders {
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0px 18px 0px 20px;
      border-bottom: 1px solid #e2e2e2;
      .leftTitle {
        font-size: 14px;
        font-weight: bold;
        color: #2f4378;
      }
      .rightBoxs {
        display: flex;
        align-items: center;
        img {
          width: 14px;
          height: 14px;
          margin-left: 13px;
          cursor: pointer;
        }
      }
    }
  }
  .el-dialog__footer {
    padding: 0;
    .dialog-footer {
      padding: 0px 40px;
      height: 70px;
      border-top: 1px solid #e2e2e2;
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }
  }
}
.imgBox {
  width: 100%;
  // height: 210px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 8px 8px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  .imgLabel {
    flex: 1;
    width: 100%;
    border: 1px dotted #e2e2e2;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    .msPhoto {
      display: flex;
      justify-content: center;
      align-items: center;
      max-width: 100%;
      max-height: 270px;
      img {
        max-width: 100%;
        max-height: 270px;
      }
    }
    .imgbbx {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      i {
        font-weight: bold;
        margin: 14px 0;
        font-size: 24px;
      }
    }
  }
  p {
    margin: 5px 0px;
  }
}
.checkboxSty {
  max-height: 210px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.listBoxStys {
  flex-shrink: 0;
  padding: 0px 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-right: 10px;
  margin-bottom: 6px;
}
.closeIcons {
  color: red;
  cursor: pointer;
  margin-left: 6px;
}
.ach {
  display: flex;
  align-items: center;
  overflow: hidden;
}
.clh {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.p_infos {
  color: #999;
  border-bottom: 1px dashed #eee;
  padding-bottom: 6px;
}
.poters {
  border-radius: 4px;
  border: 1px solid #666;
  background-color: #eee;
  text-align: center;
  height: 100px;
  line-height: 100px;
  color: #999;
  margin-bottom: 6px;
}
</style>

