<template>
  <div style="background: #fafafa; height: calc(100vh - 225px); overflow-y: auto; margin: 10px 0; padding: 8px 0 0 0">
    <div v-if="showType == 0">
      <a-row>
        <a-col :span="24"><span class="title">课程测验次数设置</span><a-divider /></a-col>
        <div class="work-img">
          <img class="work-img-img" src="../../../assets/images/homework.png" />
        </div>
        <a-col :span="24" style="text-align: center; color: #494b56">
          <div>老师您好，</div>
          <div>请根据课程教学大纲的要求，设置学生修完本课程需要完成的课程测验次数。</div>
          <div style="margin-top: 30px" class="ant-btn buttonClass"><a @click="handleSzzycs(1)">设置测验次数</a></div>
          <div class="tishi">温馨提示：设置完成后，您也可以在课程教学过程中，随时根据实际情况进行调整。</div>
        </a-col>
      </a-row>
    </div>

    <div v-if="showType == 1">
      <a-row>
        <a-col :span="24"><span class="title">课程测验次数设置</span><a-divider /></a-col>
        <a-col :span="24" style="padding: 0 0 0 30px">
          <a-row>
            <a-col :span="24" style="margin-top: 10px; height: 50px">
              <a-row style="text-align: center">
                <a-col :span="8"
                  ><span>课程作业占比:</span><span>{{ kczyzb }}%;</span></a-col
                >
                <a-col :span="8"
                  ><span>期末考试占比:</span><span>{{ qmkszb }}%;</span></a-col
                >
                <a-col :span="8"
                  ><span>课堂测验占比:</span><span>{{ ktcyzb }}%;</span></a-col
                >
              </a-row>
            </a-col>
            <a-col :span="18" style="margin-top: 5px">
              <span style="color: #777777">学生修完本课程需要完成的测验次数：</span>
              <a-input-number style="width: 30%" v-model:value="zycs" @change="handleZycs" :max="100" :disabled="zycsDisabled" /><span
                style="margin-left: 5px"
                >次</span
              >
            </a-col>
            <a-col :span="6" style="text-align: right; padding: 5px 0 0 0">
              <a-button type="primary" @click="handleAddZycs" class="mar-right20"><Icon icon="ant-design:file-add-outlined" />新增测验</a-button>
            </a-col>
          </a-row>
        </a-col>
        <a-col :span="24" style="margin-top: 10px">
          <a-table :columns="columns" :data-source="tableData" :pagination="false">
            <template #bodyCell="{ column, record }">
              <template v-if="column.key === 'score'">
                <span>
                  <a-input-number v-model:value="record.score" :min="0" :max="100" @blur="handleJscjbfb">
                    <template #addonAfter> % </template></a-input-number
                  >
                </span>
              </template>
              <template v-else-if="column.key === 'lstitle'">
                <span> 第{{ record.sort }}次测验 </span>
              </template>
              <template v-else-if="column.key === 'action'">
                <span>
                  <a @click="handleDelZycs(record.sort)">删除</a>
                </span>
              </template>
            </template>
          </a-table>
        </a-col>
        <a-col :span="24" style="margin-top: 30px; font-size: 18px">
          <div style="text-align: center">
            <a-button type="primary" @click="handleBatchAdd"><Icon icon="ant-design:save-outlined" />保存</a-button>
            <a-divider type="vertical" />
            <a-button type="primary" @click="reloadZy"><Icon icon="ant-design:export-outlined" style="margin-right: 10px" />返回</a-button>
          </div>
        </a-col>
      </a-row>
    </div>

    <div v-if="showType == 2">
      <a-spin :spinning="confirmLoading">
        <a-row>
          <a-col :span="24">
            <span class="title">编辑测验</span> - <span class="title2">布置测验：设置第{{ zyInfo.sort }}次测验内容及要求</span>
            <a-divider />
          </a-col>
          <a-col :span="24">
            <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-row>
                <a-col :span="24">
                  <div class="region">
                    <div class="region-title">基本信息</div>
                    <a-col :span="24">
                      <a-form-item label="测验名称" v-bind="validateInfos.title">
                        <a-input v-model:value="zyInfo.title" placeholder="请输入测验题目" :disabled="editDisabled"></a-input>
                      </a-form-item>
                    </a-col>
                    <!-- <a-col :span="24">
                      <a-form-item label="考察内容" v-bind="validateInfos.kcnr">
                        <a-textarea v-model:value="zyInfo.kcnr" placeholder="请输入描述" hidden></a-textarea>
                        <a-button type="primary" @click="handleKcnr" :disabled="editDisabled">选择</a-button>
                      </a-form-item>
                    </a-col>
                    <a-col :span="24" style="padding: 0 20px" v-if="dataKhnr.length > 0">
                      <a-table :columns="columnsKhnr" rowKey="id" :data-source="dataKhnr" :pagination="false" />
                    </a-col> -->
                    <a-col :span="24">
                      <a-form-item label="测验开始时间" v-bind="validateInfos.startTime">
                        <a-date-picker
                          placeholder="请选择测验开始时间"
                          v-model:value="zyInfo.startTime"
                          :disabled-date="disabledDate"
                          :show-time="{ format: 'YYYY-MM-DD HH:mm' }"
                          valueFormat="YYYY-MM-DD HH:mm"
                          format="YYYY-MM-DD HH:mm"
                          style="width: 90%"
                          :disabled="editDisabled"
                        />
                        <span>
                          <a-popover title="温馨提示">
                            <template #content>
                              <p
                                >填写测验开始时间，则测验在指定时间进行发布；如未填写测验开始时间，则布置完成测验后，可手动点击“发布测验”进行测验发布。</p
                              >
                            </template>
                            <Icon
                              icon="ant-design:question-circle-outlined"
                              :size="20"
                              style="float: right; margin-top: 5px; color: #029c88; margin-right: 19px"
                            />
                          </a-popover>
                        </span>
                      </a-form-item>
                    </a-col>
                    <a-col :span="24">
                      <a-form-item label="测验结束时间" v-bind="validateInfos.endTime">
                        <a-date-picker
                          placeholder="请选择测验结束时间"
                          v-model:value="zyInfo.endTime"
                          :disabled-date="disabledDate"
                          :show-time="{ format: 'YYYY-MM-DD HH:mm' }"
                          valueFormat="YYYY-MM-DD HH:mm"
                          format="YYYY-MM-DD HH:mm"
                          style="width: 100%"
                        />
                      </a-form-item>
                    </a-col>
                    <a-col :span="24">
                      <a-form-item label="描述" v-bind="validateInfos.content">
                        <j-editor v-model:value="zyInfo.content" v-if="zyyqShow" @blur="handleZyyqShow(0)" />
                        <div style="color: #777777" v-html="zyInfo.content" v-if="!zyyqShow"></div>
                        <div @click="handleZyyqShow(1)" class="tishi" style="width: 100%" :disabled="!editDisabled">温馨提示：点击可编辑描述</div>
                      </a-form-item>
                    </a-col>
                  </div>
                </a-col>
                <a-col :span="24">
                  <a-row style="min-height: 100px">
                    <a-col :span="4" style="padding: 10px">
                      <a-card title="可选题型" style="height: 300px; border: 1px solid #e8e8e8">
                        <p
                          ><a-button type="primary" preIcon="ant-design:check-circle-outlined" @click="addTigan(3)" :disabled="editDisabled"
                            >单选</a-button
                          ></p
                        >
                        <p
                          ><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(4)" :disabled="editDisabled"
                            >多选</a-button
                          ></p
                        >
                        <p
                          ><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(5)" :disabled="editDisabled"
                            >填空</a-button
                          ></p
                        >
                        <!-- <p
                          ><a-button type="primary" preIcon="ant-design:check-square-outlined" @click="addTigan(8)" :disabled="editDisabled"
                            >文件</a-button
                          ></p
                        > -->
                      </a-card>
                      <a-card title="引用题库">
                        <p><a-button type="primary" @click="handleYylx('0')" :disabled="editDisabled">我的题库</a-button></p>
                        <p><a-button type="primary" @click="handleYylx('1')" :disabled="editDisabled">公有题库</a-button></p>
                        <!-- <p><a-button type="primary" @click="importOpen = true">导入试题</a-button></p> -->
                      </a-card>
                    </a-col>
                    <a-col :span="20" style="overflow-y: scroll; min-height: 100px">
                      <draggable @end="end" v-model="tiganData" item-key="id">
                        <template #item="{ index, element: item }">
                          <div>
                            <!-- 单选题 -->
                            <div style="width: 100%" v-if="item.wjType == 3 || item.wjType == '3'">
                              <a-card>
                                <template #title>
                                  <span>{{ index + 1 }}、</span>
                                  <a-textarea
                                    placeholder="请填写单选题题干"
                                    v-model:value="item.wjTitle"
                                    :bordered="false"
                                    :style="{ width: '30rem' }"
                                    :auto-size="{ minRows: 1, maxRows: 5 }"
                                    :disabled="editDisabled"
                                  />
                                  <span style="color: #c2bfbf">[单选]</span>
                                </template>
                                <template #extra>
                                  <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
                                    <a-select
                                      style="width: 120px"
                                      v-model:value="item.wjScore"
                                      placeholder="请选择分数"
                                      v-if="item.wjSfqh == '0'"
                                      :disabled="editDisabled"
                                    >
                                      <a-select-option value="5">5</a-select-option>
                                      <a-select-option value="4">4</a-select-option>
                                      <a-select-option value="3">3</a-select-option>
                                      <a-select-option value="2">2</a-select-option>
                                      <a-select-option value="1">1</a-select-option>
                                    </a-select>
                                    <span v-if="item.wjSfqh == '0'" @click="handleQiehuan(item, '1')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >自定义分数</span
                                    >
                                    <a-input-number
                                      v-model:value="item.wjScore"
                                      style="width: 120px"
                                      v-if="item.wjSfqh == '1'"
                                      :disabled="editDisabled"
                                    ></a-input-number>
                                    <span v-if="item.wjSfqh == '1'" @click="handleQiehuan(item, '0')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >返回</span
                                    >
                                  </a-tooltip>
                                  <a-tooltip placement="topRight" title="删除此题"
                                    ><Icon
                                      icon="ant-design:delete-outlined"
                                      style="cursor: pointer; font-size: 20px; margin: 10px"
                                      @click="handleDelTigan(item, index)"
                                      v-if="!editDisabled"
                                  /></a-tooltip>
                                </template>
                                <a-row v-if="isShow">
                                  <a-col :span="24" style="color: darkgrey; font-size: 13px"> 注：选中即为正确答案 </a-col>
                                </a-row>
                                <a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="!isShow">
                                  <div style="width: 100%" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index">
                                    <a-radio :value="tmxx.itemIndex + ``" style="width: 100%">
                                      <a-input
                                        placeholder="请填写选项"
                                        v-model:value="tmxx.itemTitle"
                                        :style="{ width: '30rem' }"
                                        :bordered="false"
                                        :disabled="editDisabled"
                                      />
                                      <!-- :style="{ width: handinpwei(tmxx.itemTitle) }" -->
                                      <span style="color: #ecb646" v-if="item.itemSelected == tmxx.itemIndex">(正确答案)</span>
                                      <a-tooltip placement="topLeft" title="在下方添加新的选项"
                                        ><Icon
                                          icon="ant-design:plus-circle-outlined"
                                          style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
                                          @click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)"
                                          v-if="!editDisabled"
                                      /></a-tooltip>
                                      <a-tooltip placement="topLeft" title="删除选项"
                                        ><Icon
                                          icon="ant-design:minus-circle-outlined"
                                          style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
                                          @click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)"
                                          v-if="!editDisabled"
                                      /></a-tooltip>
                                    </a-radio>
                                  </div>
                                </a-radio-group>
                              </a-card>
                            </div>
                            <!-- 多选题 -->
                            <div style="width: 100%" v-else-if="item.wjType == 4 || item.wjType == '4'">
                              <a-card>
                                <template #title>
                                  <span>{{ index + 1 }}、</span
                                  ><a-textarea
                                    placeholder="请填写多选题题干"
                                    v-model:value="item.wjTitle"
                                    :bordered="false"
                                    :style="{ width: '30rem' }"
                                    :auto-size="{ minRows: 1, maxRows: 5 }"
                                    :disabled="editDisabled"
                                  />
                                  <span style="color: #c2bfbf">[多选]</span>
                                </template>
                                <template #extra>
                                  <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
                                    <a-select
                                      style="width: 120px"
                                      v-model:value="item.wjScore"
                                      placeholder="请选择分数"
                                      v-if="item.wjSfqh == '0'"
                                      :disabled="editDisabled"
                                    >
                                      <a-select-option value="5">5</a-select-option>
                                      <a-select-option value="4">4</a-select-option>
                                      <a-select-option value="3">3</a-select-option>
                                      <a-select-option value="2">2</a-select-option>
                                      <a-select-option value="1">1</a-select-option>
                                    </a-select>
                                    <span v-if="item.wjSfqh == '0'" @click="handleQiehuan(item, '1')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >自定义分数</span
                                    >
                                    <a-input-number
                                      v-model:value="item.wjScore"
                                      style="width: 120px"
                                      v-if="item.wjSfqh == '1'"
                                      :disabled="editDisabled"
                                    ></a-input-number>
                                    <span v-if="item.wjSfqh == '1'" @click="handleQiehuan(item, '0')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >返回</span
                                    >
                                  </a-tooltip>
                                  <a-tooltip placement="topRight" title="删除此题"
                                    ><Icon
                                      icon="ant-design:delete-outlined"
                                      style="cursor: pointer; font-size: 20px; margin: 10px"
                                      @click="handleDelTigan(item, index)"
                                      v-if="!editDisabled"
                                  /></a-tooltip>
                                </template>
                                <a-row v-if="isShow">
                                  <a-col :span="24" style="color: darkgrey; font-size: 13px"> 注：选中即为正确答案 </a-col>
                                </a-row>
                                <a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" :disabled="!isShow" @change="handleChecked">
                                  <a-row>
                                    <a-col :span="24" v-for="(tmxx, index) in item.wjxWjxxTmxxList" :key="index">
                                      <!-- -{{item.itemSelected}}-{{tmxx.itemIndex}} -->
                                      <a-checkbox :value="tmxx.itemIndex"
                                        ><a-input
                                          placeholder="请填写选项"
                                          v-model:value="tmxx.itemTitle"
                                          :bordered="false"
                                          :style="{ width: '30rem' }"
                                          :disabled="editDisabled"
                                      /></a-checkbox>
                                      <span style="color: #ecb646" v-if="cheGrp(item.itemSelected, tmxx.itemIndex)">(正确答案)</span>
                                      <a-tooltip placement="topLeft" title="在下方添加新的选项"
                                        ><Icon
                                          icon="ant-design:plus-circle-outlined"
                                          style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
                                          @click="handleAddTmxx(tmxx, index, item.wjxWjxxTmxxList)"
                                          v-if="!editDisabled"
                                      /></a-tooltip>
                                      <a-tooltip placement="topLeft" title="删除选项"
                                        ><Icon
                                          icon="ant-design:minus-circle-outlined"
                                          style="cursor: pointer; margin: 5px; font-size: 20px; color: #1890ff"
                                          @click="handleRemTmxx(tmxx, index, item.wjxWjxxTmxxList)"
                                          v-if="!editDisabled"
                                      /></a-tooltip>
                                    </a-col>
                                  </a-row>
                                </a-checkbox-group>
                              </a-card>
                            </div>
                            <!-- 填空题 -->
                            <div style="width: 100%" v-else-if="item.wjType == 5 || item.wjType == '5'">
                              <a-card>
                                <template #title>
                                  <span>{{ index + 1 }}、</span
                                  ><a-textarea
                                    placeholder="请填写填空题题干"
                                    v-model:value="item.wjTitle"
                                    :bordered="false"
                                    :style="{ width: '30rem' }"
                                    :auto-size="{ minRows: 1, maxRows: 5 }"
                                    :disabled="editDisabled"
                                  />
                                  <span style="color: #c2bfbf">[填空]</span>
                                </template>
                                <template #extra>
                                  <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
                                    <a-select
                                      style="width: 120px"
                                      v-model:value="item.wjScore"
                                      placeholder="请选择分数"
                                      v-if="item.wjSfqh == '0'"
                                      :disabled="editDisabled"
                                    >
                                      <a-select-option value="5">5</a-select-option>
                                      <a-select-option value="4">4</a-select-option>
                                      <a-select-option value="3">3</a-select-option>
                                      <a-select-option value="2">2</a-select-option>
                                      <a-select-option value="1">1</a-select-option>
                                    </a-select>
                                    <span v-if="item.wjSfqh == '0'" @click="handleQiehuan(item, '1')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >自定义分数</span
                                    >
                                    <a-input-number
                                      v-model:value="item.wjScore"
                                      style="width: 120px"
                                      v-if="item.wjSfqh == '1'"
                                      :disabled="editDisabled"
                                    ></a-input-number>
                                    <span v-if="item.wjSfqh == '1'" @click="handleQiehuan(item, '0')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >返回</span
                                    >
                                  </a-tooltip>
                                  <a-tooltip placement="topRight" title="删除此题"
                                    ><Icon
                                      icon="ant-design:delete-outlined"
                                      style="cursor: pointer; font-size: 20px; margin: 10px"
                                      @click="handleDelTigan(item, index)"
                                      v-if="!editDisabled"
                                  /></a-tooltip>
                                </template>
                                <a-row v-if="isShow">
                                  <a-col :span="24">
                                    <a-textarea
                                      placeholder="请填写答案"
                                      v-model:value="item.wjAnswer"
                                      :bordered="false"
                                      style="width: 100%"
                                      :auto-size="{ minRows: 1, maxRows: 5 }"
                                      :disabled="editDisabled"
                                    />
                                  </a-col>
                                </a-row>
                              </a-card>
                            </div>
                            <!-- 文件上传 -->
                            <div style="width: 100%" v-else-if="item.wjType == 8 || item.wjType == '8'">
                              <a-card>
                                <template #title>
                                  <span>{{ index + 1 }}、</span>
                                  <a-textarea
                                    placeholder="请填写文件上传题题干"
                                    v-model:value="item.wjTitle"
                                    :bordered="false"
                                    :style="{ width: '30rem' }"
                                    :auto-size="{ minRows: 1, maxRows: 5 }"
                                    :disabled="editDisabled"
                                  />
                                  <span style="color: #c2bfbf">[文件上传]</span>
                                </template>
                                <template #extra>
                                  <a-tooltip placement="topLeft" title="题目分数" v-if="isShow">
                                    <a-select
                                      style="width: 120px"
                                      v-model:value="item.wjScore"
                                      placeholder="请选择分数"
                                      v-if="item.wjSfqh == '0'"
                                      :disabled="editDisabled"
                                    >
                                      <a-select-option value="5">5</a-select-option>
                                      <a-select-option value="4">4</a-select-option>
                                      <a-select-option value="3">3</a-select-option>
                                      <a-select-option value="2">2</a-select-option>
                                      <a-select-option value="1">1</a-select-option>
                                    </a-select>
                                    <span v-if="item.wjSfqh == '0'" @click="handleQiehuan(item, '1')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >自定义分数</span
                                    >
                                    <a-input-number
                                      v-model:value="item.wjScore"
                                      style="width: 120px"
                                      v-if="item.wjSfqh == '1'"
                                      :disabled="editDisabled"
                                    ></a-input-number>
                                    <span v-if="item.wjSfqh == '1'" @click="handleQiehuan(item, '0')" style="color: #9e9e9e" :disabled="editDisabled"
                                      >返回</span
                                    >
                                  </a-tooltip>
                                  <a-tooltip placement="topRight" title="删除此题"
                                    ><Icon
                                      icon="ant-design:delete-outlined"
                                      style="cursor: pointer; font-size: 20px; margin: 10px"
                                      @click="handleDelTigan(item, index)"
                                      v-if="!editDisabled"
                                  /></a-tooltip>
                                </template>
                              </a-card>
                            </div>

                            <div v-else></div>
                          </div>
                        </template>
                      </draggable>

                      <!-- 题干信息 -->
                      <div style="width: 100%" v-for="(item, index) in tiganData" :key="index"> </div>
                    </a-col>
                  </a-row>
                </a-col>

                <a-col :span="24" style="text-align: center; margin-top: 10px; margin-bottom: 40px">
                  <a-button type="primary" @click="submitForm" v-if="!editDisabled">保存</a-button>
                  <a-button type="primary" @click="reloadZy" style="margin-left: 15px">返回</a-button>
                </a-col>
              </a-row>
            </a-form>
          </a-col>
        </a-row>
      </a-spin>
    </div>

    <div v-if="showType == 3">
      <a-row>
        <a-col :span="24">
          <a-row>
            <a-col :span="20">
              <span class="title">统计分析</span>
            </a-col>
            <a-col :span="4" style="text-align: right">
              <a-button class="buttonClass" @click="reloadZy" style="margin-right: 10px"><Icon icon="ant-design:export-outlined" />返回</a-button>
            </a-col>
          </a-row>
          <a-divider />
        </a-col>
        <a-col :span="24">
          <a-row>
            <div style="width: 100%; height: 130px; background: #fff">
              <div style="display: flex; justify-content: space-between; padding-top: 5px">
                <span class="tjfx-col-title">{{ zyInfo.title }} </span>
                <span class="tjfx-col">
                  测验时间：{{ dayjs(zyInfo.startTime).format('MM.DD HH:mm') }} ~ {{ dayjs(zyInfo.endTime).format('MM.DD HH:mm') }}</span
                >
              </div>
              <div style="display: flex">
                <div class="tjfx-line diva" @click="handleDjjgs(zyInfo, '')"
                  ><span class="tjfx-colt">{{ zyInfo.xkrs }}</span
                  ><span class="tjfx-colw"> 总人数</span></div
                >
                <div class="tjfx-line diva" @click="handleDjjgs(zyInfo, '1')"
                  ><span class="tjfx-colt">{{ zyInfo.ywcrs }}</span
                  ><span class="tjfx-colw"> 已完成人数</span></div
                >
                <div class="tjfx-line diva" @click="handleDjjgs(zyInfo, '0')"
                  ><span class="tjfx-colt">{{ zyInfo.wwcrs }}</span
                  ><span class="tjfx-colw"> 未完成人数</span></div
                >
              </div>
              <!-- <div class="tjfx-col"> 总人数：{{ zyInfo.xkrs }} </div>
              <div class="tjfx-col"> 已完成人数：{{ zyInfo.ywcrs }} </div>
              <div class="tjfx-col"> 未完成人数：{{ zyInfo.wwcrs }} </div> -->
            </div>
            <a-col :span="24">
              <div class="region-title">基本信息</div>
            </a-col>
            <a-col :span="24" v-for="(item, index) in tiganData" :key="index">
              <div style="width: 100%">
                <!-- 单选题 -->
                <div style="width: 98%; margin: 0 auto" v-if="item.wjType == 3">
                  <!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">单选题</span> -->
                  <!-- <span class="tjfx-zql">正确率：15%</span> -->
                  <a-card>
                    <template #title>
                      <span>{{ index + 1 }}、</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word"></span>
                    </template>
                    <template #extra v-if="zyInfo.atype == 6">
                      <span class="question-type" style="margin-left: 40px">单选题</span>
                      <span style="margin-left: 40px"
                        >题目分值：<span class="answer-word"> {{ item.wjScore }}</span> 分</span
                      >
                    </template>
                    <a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
                      <div style="width: 100%" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
                        <a-radio :value="tmxx.itemIndex + ``" style="width: 100%; margin-bottom: 5px">
                          <span v-html="tmxx.itemTitle" style="font-size: 16px; color: #000"></span>
                          <span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案)</span>
                          <span class="tjfx-xzrs">选择人数：{{ tmxx.num }}人</span>
                        </a-radio>
                      </div>
                    </a-radio-group>
                  </a-card>
                </div>
                <!-- 多选题 -->
                <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 4">
                  <!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">多选题</span> -->
                  <!-- <span class="tjfx-zql">正确率：15%</span> -->
                  <a-card>
                    <template #title>
                      <span>{{ index + 1 }}、</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
                    </template>
                    <template #extra v-if="zyInfo.atype == 6">
                      <span class="question-type" style="margin-left: 40px">多选题</span>
                      <span style="margin-left: 40px"
                        >题目分值： <span class="answer-word">{{ item.wjScore }}</span> 分</span
                      >
                    </template>
                    <a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" size="default" disabled>
                      <a-row>
                        <a-col :span="24" v-for="(tmxx, index2) in item.wjxWjxxTmxxList" :key="index2">
                          <a-checkbox :value="tmxx.itemIndex" style="width: 100%; margin-bottom: 5px">
                            <span v-html="tmxx.itemTitle" style="width: 80%; font-size: 16px; color: #000"></span>
                            <span v-if="tmxx.itemSelected == 'true'" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案)</span>
                            <span class="tjfx-xzrs">选择人数：{{ tmxx.num }}人</span>
                          </a-checkbox>
                        </a-col>
                      </a-row>
                    </a-checkbox-group>
                  </a-card>
                </div>
                <!-- 填空题 -->
                <div style="width: 98%; margin: 0 auto" v-else-if="item.wjType == 5">
                  <!-- <span style="text-align: left;width: 50%;font-weight: bold;font-size: 18px;padding: 20px;">填空题</span> -->
                  <!-- <span class="tjfx-zql">正确率：15%</span> -->
                  <a-card>
                    <template #title>
                      <span>{{ index + 1 }}、</span><span v-html="item.wjTitle" style="white-space: pre-wrap; word-wrap: break-word" />
                      <span v-if="item.wjAnswer" style="color: #9e9e9e; margin-left: 30px; font-size: 12px">(正确答案:{{ item.wjAnswer }})</span>
                      <span class="tjfx-xzrs1" style="color: #9e9e9e">正确人数：{{ item.num }}人</span>
                      <span class="tjfx-xzrs1" style="color: #9e9e9e">错误人数：{{ item.num2 }}人</span>
                    </template>
                    <template #extra v-if="zyInfo.atype == 6">
                      <span class="question-type" style="margin-left: 40px">填空题</span>
                      <span style="margin-left: 40px"
                        >题目分值：<span class="answer-word"> {{ item.wjScore }}</span> 分</span
                      >
                    </template>
                  </a-card>
                </div>
                <div v-else> 无对应类型 </div>
              </div>
            </a-col>
          </a-row>
        </a-col>
      </a-row>
    </div>

    <div v-if="showType == 999">
      <a-row>
        <a-col :span="24"><span class="title">布置测验</span><a-divider /></a-col>
        <a-col :span="24" style="text-align: right; margin-top: 5px">
          <a-button type="primary" @click="handleSzzycs(1)"><Icon icon="ant-design:edit-outlined" />修改课程测验次数</a-button>
          <a-divider type="vertical" />
          <a-button type="primary" @click="handleAddOne"><Icon icon="ant-design:file-add-outlined" />新增测验</a-button>
          <!-- <a-divider type="vertical" />
          <a-button type="primary" @click="handleTiku('6')" style="margin-left: 8px; margin-right: 18px">题库</a-button> -->
        </a-col>
        <a-col :span="24">
          <a-row style="padding: 10px">
            <a-col :lg="24" v-for="(item, index) in tableData" style="padding: 0 5px 5px 5px" :key="index">
              <!-- :title="'11第' + item.sort + '次测验(占比' + item.score + '%)'" -->
              <!-- class="cardClass" -->
              <a-card v-if="!item.endTime" bodyStyle="">
                <template #title>第{{ item.sort }}次测验：暂未设置测验信息 <span class="card-label3"> 待设置</span> </template>
                <template #extra> </template>
                <!-- <p class="sznrClass">尚未布置测验题目及具体要求</p> -->
                <a-row>
                  <a-col :span="18">
                    <span style="margin-left: 10px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent> <Icon icon="ant-design:form-outlined" />设计测验 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" @click="handleEdit(item, false)">设置测验</a>
                            </a-menu-item>
                            <!-- <a-menu-item>
                              <a href="javascript:;" @click="handleEdit(item, false)">修改题目</a>
                            </a-menu-item> -->
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">测验详情</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:setting-outlined" />发送问卷 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">链接&二维码</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:setting-outlined" />答题结果 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">答题结果</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:line-chart-outlined" />测验结果 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">测验结果</a>
                            </a-menu-item>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">统计分析</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                  </a-col>
                  <a-col :span="6">
                    <div style="text-align: right">
                      <a @click="handleEdit(item, false)" class="ant-dropdown-link1">设置测验内容及要求</a>
                      <a-divider type="vertical" />
                      <a @click="handleDelete(item)" class="ant-dropdown-link1">删除</a>
                    </div>
                  </a-col>
                </a-row>
              </a-card>

              <a-card v-if="item.endTime && (item.qpublish == '1' || item.qpublish == '2')" bodyStyle="">
                <template #title>
                  <span>第{{ item.sort }}次测验：{{ item.title }}</span>
                  <span class="card-label">已发布</span>
                </template>
                <template #extra>
                  <span>ID:{{ item.id }}</span>

                  <span style="margin-left: 10px">{{ dayjs(item.endTime).format('MM.DD HH:mm') }}</span>
                </template>
                <a-row>
                  <a-col :span="20">
                    <span style="margin-left: 10px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent> <Icon icon="ant-design:form-outlined" /> 设计测验 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">设置测验</a>
                            </a-menu-item>
                            <!-- <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">修改题目</a>
                            </a-menu-item> -->
                            <a-menu-item>
                              <a href="javascript:;" @click="handleEdit(item, true)">测验详情</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent
                          ><Icon icon="ant-design:setting-outlined" @click="handleViewEwm(item)" /><span @click="handleViewEwm(item)"> 发送问卷</span>
                        </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" @click="handleViewEwm(item)">链接&二维码</a>
                              <!-- <QrCode :value="qrCodeUrl" class="enter-x flex justify-center xl:justify-start" :width="280" /> -->
                              <QrCode :value="goewm(item)" class="enter-x flex justify-center xl:justify-start" :width="280" />
                              <span
                                >链接：<a-input :value="goewm(item)" disabled style="width: 200px"></a-input>
                                <a-button @click="copyToClipboard(item)">复制</a-button>
                              </span>
                              <!--  -->
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:audit-outlined" /> 答题结果 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" @click="handleTeaDtjg(item)"> 答题结果</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:line-chart-outlined" /> 测验结果 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" @click="handleDjjgs(item, '')">测验结果</a>
                            </a-menu-item>
                            <a-menu-item>
                              <a href="javascript:;" @click="handleTjfx(item)">统计分析</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                  </a-col>
                  <a-col :span="4">
                    <div style="text-align: right">
                      <!-- <a @click="handleEdit(item, true)" v-if="item.ytjnum > 0">编辑测验</a>
                      <a-divider type="vertical" /> -->
                      <a @click="handleDelete(item)" v-if="item.ytjnum == '0'">删除</a>
                    </div>
                  </a-col>
                </a-row>
              </a-card>

              <a-card v-if="item.endTime && item.qpublish == '0'" bodyStyle="">
                <template #title>
                  <span>第{{ item.sort }}次测验：{{ item.title }}</span>
                  <span class="card-label2">待发布</span>
                </template>
                <template #extra>
                  <span>ID:{{ item.id }}</span>
                  <span style="margin-left: 10px">{{ dayjs(item.endTime).format('MM.DD HH:mm') }}</span>
                </template>
                <a-row>
                  <a-col :span="18">
                    <span style="margin-left: 10px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:form-outlined" /> 设计测验 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" @click="handleEdit(item, false)">设置测验</a>
                            </a-menu-item>
                            <!-- <a-menu-item>
                              <a href="javascript:;" @click="handleEdit(item, false)">修改题目</a>
                            </a-menu-item> -->
                            <a-menu-item>
                              <a href="javascript:;" @click="handleEdit(item, true)">测验详情</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:setting-outlined" />发送问卷 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">链接&二维码</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:setting-outlined" />答题结果 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">答题结果</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                    <span style="margin-left: 30px">
                      <a-dropdown>
                        <a class="ant-dropdown-link" @click.prevent><Icon icon="ant-design:line-chart-outlined" />测验结果 </a>
                        <template #overlay>
                          <a-menu>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">测验结果</a>
                            </a-menu-item>
                            <a-menu-item>
                              <a href="javascript:;" disabled style="color: #9e9e9e">统计分析</a>
                            </a-menu-item>
                          </a-menu>
                        </template>
                      </a-dropdown>
                    </span>
                  </a-col>
                  <a-col :span="6">
                    <div style="text-align: right">
                      <a @click="handleEdit(item, false)" class="ant-dropdown-link1">编辑测验</a>
                      <a-divider type="vertical" />
                      <a @click="handleFabu(item)" class="ant-dropdown-link1">发布测验</a>
                      <a-divider type="vertical" />
                      <a @click="handleDelete(item)" class="ant-dropdown-link1">删除</a>
                    </div>
                  </a-col>
                </a-row>
              </a-card>
            </a-col>
          </a-row>
        </a-col>
      </a-row>
    </div>
    <a-modal v-model:visible="ewmvisible" title="链接&二维码" :width="360" okText="下载" @ok="downloadEwm" cancelText="关闭">
      <div style="text-align: center; padding: 20px">
        <QrCode id="qrcode" :value="goewm(ewmInfo)" class="enter-x flex justify-center xl:justify-start" :width="280" style="margin-left: 20px" />
        <span
          >链接：<a-input :value="goewm(ewmInfo)" disabled style="width: 200px"></a-input>
          <a-button @click="copyToClipboard(ewmInfo)">复制</a-button>
        </span>
      </div>
    </a-modal>

    <a-modal
      title="Excel导入指导"
      :width="800"
      :visible="importOpen"
      :maskClosable="false"
      :okButtonProps="{ class: { 'jee-hidden': true } }"
      @cancel="importOpen = false"
      cancelText="关闭"
    >
      <div style="padding: 20px; background-color: rgb(225, 243, 237); border-radius: 5px; margin: 20px">
        <p>Excel导入指导</p>
        <p style="font-size: 18px; font-weight: 700p; color: red">*注意：导入题目时请先保存手动添加的题目，防止手动添加的题目丢失！！！</p>
        <p>1.下载题目导入模板文件。</p>
        <p>2.按要求格式填写题目信息。</p>
        <p>3.在模板内录入信息后，上传文件导入题目。</p>
        <p>4.点击导入题目，选择已完成录入的文件，平台将会验证数据的正确性。</p>
        <p>5.若发现错误，会给予提示，重新修正后再次上传:若无错误，即将数据导入到平台中。</p>
        <p
          ><a @click="downloadByUrl({ url: '/downPath/stdrmb.xls', target: '_self', fileName: '试题导入模板.xls' })"
            ><Icon icon="ant-design:download-outlined" :size="20" />导入模板下载</a
          ></p
        >
      </div>
      <div style="text-align: center; margin-top: 20px; margin-bottom: 20px">
        <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="importDrtmXls">导入试题</j-upload-button>
      </div>
    </a-modal>

    <KcTeachingUnitContentOneListModal ref="registerZcjcModal" @success="handleCheckZcjcSuccess"></KcTeachingUnitContentOneListModal>
    <WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage"></WjxWjxxTmlbDjjgsModal>
    <XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>

    <YinyongTikuListModal ref="YinyongTikuListModalpage" @success="handleYytkSuccess" />
    <YinyongTikuDcListModal ref="YinyongTikuDcListModalpage" @success="handleYytkSuccess" />
    <TikuListModal ref="TikuListModalPage"></TikuListModal>
  </div>
</template>

<script lang="ts" name="zyInfo-zyInfo" setup>
import { ref, reactive, onMounted, unref } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { useRouter } from 'vue-router';
import dayjs, { Dayjs } from 'dayjs';
import { list, deleteOne, saveOrUpdate } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import { Form } from 'ant-design-vue';
import { getValueType } from '/@/utils';
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
import { useUserStore } from '/@/store/modules/user';
import draggable from 'vuedraggable';
import { QrCode } from '/@/components/Qrcode/index';
import { useGlobSetting } from '/@/hooks/setting';

import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue';
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import KcTeachingUnitContentOneListModal from '/@/views/zy/zyInfo/zyCheckZcjc/KcTeachingUnitContentOneListModal.vue';
import YinyongTikuListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuListModal.vue';
import YinyongTikuDcListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuDcListModal.vue';
import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue';
import { create } from 'sortablejs';
import { downloadByUrl } from '/@/utils/file/download';

const glob = useGlobSetting();
const globSetting = useGlobSetting();

/**
 * 导出文件xlsx的mime-type
 */
const XLSX_MIME_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
/**
 * 导出文件xlsx的文件后缀
 */
const XLSX_FILE_SUFFIX = '.xlsx';

//当前路由信息
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type, teano } = query; //获取传递参数
const { createConfirm, createMessage, createWarningModal } = useMessage();
//用户相关
const userStore = useUserStore();
const XxhbbksListModalPage = ref();
const WjxWjxxTmlbDjjgsModalPage = ref();
const registerZcjcModal = ref();
const YinyongTikuListModalpage = ref();
const YinyongTikuDcListModalpage = ref();
const TikuListModalPage = ref();

const showType = ref<number>(0);
const zycs = ref<number>(0);
const zycsDisabled = ref<boolean>(false);
const tableData = ref<any>([]);
const queryParamZy = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(100);
const editDisabled = ref<boolean>(false);
const zyInfo = ref<any>({});
const dataKhnr = ref<any>([]);
const confirmLoading = ref<boolean>(false);
const zyyqShow = ref<boolean>(false);
const useForm = Form.useForm;
const formRef = ref();
const tiganData = ref<any>([]);
const isShow = ref<boolean>(false);
const mainId = ref<string>('');
const wjLeixing = ref<string>('6');
const qrCodeUrl = ref<string>('');
const ewmvisible = ref<boolean>(false);
const ewmInfo = ref<any>({});

const kczyzb = ref<number>(0);
const qmkszb = ref<number>(0);
const ktcyzb = ref<number>(0);
const importOpen = ref<boolean>(false);

//设置测验删除功能
const disabledDate = (current: Dayjs) => {
  return current && current < dayjs().subtract(1, 'days').endOf('day');
};

//表单验证
const validatorRules = {
  title: [{ required: true, message: '请输入测验名称!' }],
  startTime: [{ required: true, message: '请输入开始时间!' }],
  endTime: [{ required: true, message: '请输入结束时间!' }],
};
const { resetFields, validate, validateInfos } = useForm(zyInfo, validatorRules, { immediate: true });
const labelCol = reactive({
  xs: { span: 24 },
  sm: { span: 4 },
});
const wrapperCol = reactive({
  xs: { span: 24 },
  sm: { span: 16 },
});
const labelCol2 = reactive({
  sm: { span: 6 },
});
const wrapperCol2 = reactive({
  sm: { span: 18 },
});
const labelCol3 = reactive({
  sm: { span: 4 },
});
const wrapperCol3 = reactive({
  sm: { span: 20 },
});
const labelCol4 = reactive({
  sm: { span: 10 },
});
const wrapperCol4 = reactive({
  sm: { span: 12 },
});
//弹出二维码页面
function handleViewEwm(record) {
  console.log('🙎', record);
  ewmvisible.value = true;
  ewmInfo.value = record;
}

//题库类型（6作业，1问卷）
function handleTiku(wjLeixing) {
  var record = { wjLeixing };
  TikuListModalPage.value.disableSubmit = true;
  TikuListModalPage.value.init(record);
}

async function exportTmlbXls(isXlsx = false) {
  var name = '问卷导入模板';
  var url = '/wjxWjxxTmlb/wjxWjxxTmlb/exportDownXls';
  var params = { title: '-1' };
  const data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 9000000 }, { isTransformResponse: false });
  if (!data) {
    createMessage.warning('文件下载失败');
    return;
  }
  if (!name || typeof name != 'string') {
    name = '导出文件';
  }
  let blobOptions = { type: 'application/vnd.ms-excel' };
  let fileSuffix = '.xls';
  if (isXlsx === true) {
    blobOptions['type'] = XLSX_MIME_TYPE;
    fileSuffix = XLSX_FILE_SUFFIX;
  }
  if (typeof window.navigator.msSaveBlob !== 'undefined') {
    window.navigator.msSaveBlob(new Blob([data], blobOptions), name + fileSuffix);
  } else {
    let url = window.URL.createObjectURL(new Blob([data], blobOptions));
    let link = document.createElement('a');
    link.style.display = 'none';
    link.href = url;
    link.setAttribute('download', name + fileSuffix);
    document.body.appendChild(link);
    link.click();
    document.body.removeChild(link); //下载完成移除元素
    window.URL.revokeObjectURL(url); //释放掉blob对象
  }
}

async function importDrtmXls(data, url) {
  url = '/wjxWjxxTmlb/wjxWjxxTmlb/importTmlbExcel?mainId=' + zyInfo.value.id;
  console.log('🧤', url);
  const isReturn = (fileInfo) => {
    try {
      if (fileInfo.code === 201) {
        let {
          message,
          result: { msg, fileUrl, fileName },
        } = fileInfo;
        let href = glob.uploadUrl + fileUrl;
        createWarningModal({
          title: message,
          centered: false,
          content: `<div>
              <span>${msg}</span><br/>
              <span>具体详情请<a href = ${href} download = ${fileName}> 点击下载 </a> </span>
            </div>`,
        });
        //update-begin---author:wangshuai ---date:20221121  for：[VUEN-2827]导入无权限，提示图标错误------------
      } else if (fileInfo.code === 500 || fileInfo.code === 510) {
        createMessage.error(fileInfo.message || `${data.file.name} 导入失败`);
        //update-end---author:wangshuai ---date:20221121  for：[VUEN-2827]导入无权限，提示图标错误------------
      } else {
        createWarningModal({
          centered: false,
          content: `<div>
              <span>${fileInfo.message}</span><br/>
            </div>`,
        });
      }
    } catch (error) {
      console.log('导入的数据异常', error);
    } finally {
    }
  };
  await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
  console.log('22222222222222222222222',zyInfo.value);
  handleEdit(zyInfo.value, false);
  importOpen.value = false
}
/**
 * 导入xls
 * @param data 导入的数据
 * @param url
 */
async function importXls(data, url) {
  url = '/wjxWjxxTmlb/wjxWjxxTmlb/importExcel';
  const isReturn = (fileInfo) => {
    try {
      if (fileInfo.code === 201) {
        let {
          message,
          result: { msg, fileUrl, fileName },
        } = fileInfo;
        let href = glob.uploadUrl + fileUrl;
        createWarningModal({
          title: message,
          centered: false,
          content: `<div>
              <span>${msg}</span><br/>
              <span>具体详情请<a href = ${href} download = ${fileName}> 点击下载 </a> </span>
            </div>`,
        });
        //update-begin---author:wangshuai ---date:20221121  for：[VUEN-2827]导入无权限，提示图标错误------------
      } else if (fileInfo.code === 500 || fileInfo.code === 510) {
        createMessage.error(fileInfo.message || `${data.file.name} 导入失败`);
        //update-end---author:wangshuai ---date:20221121  for：[VUEN-2827]导入无权限，提示图标错误------------
      } else {
        createWarningModal({
          centered: false,
          content: `<div>
              <span>${fileInfo.message}</span><br/>
            </div>`,
        });
      }
    } catch (error) {
      console.log('导入的数据异常', error);
    } finally {
    }
  };
  await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
}

//答题结果
function handleTeaDtjg(item) {
  console.log('🧳', item);

  var url = '/site/WjxCywjV2Dtjg';
  url = url + '?rwbh=' + rwbh + '&xqxn=' + xqxn + '&teano=' + teano + '&cyid=' + item.id;
  window.open(url, '_blank');
}
//下载二维码
function downloadEwm() {
  let myCanvas = document.getElementById('qrcode').getElementsByTagName('canvas');
  console.log('🧵', myCanvas);
  let a = document.createElement('a');
  a.href = myCanvas[0].toDataURL('image/URL');
  a.download = '二维码';
  a.click();
}

//统计分析
function handleTjfx(record) {
  console.log('🥺', record);
  zyInfo.value = record;
  defHttp.get({ url: '/wjxWjxxTmlb/wjxWjxxTmlb/getTmxxPeop', params: { id: record.id } }).then((res) => {
    tiganData.value = res;
  });

  handleShowType(3);
}

function handleChecked(record) {
  console.log('👙', record);
  record = record + '';
  console.log('🙃', record);
}

function goewm(record) {
  var baseUrl = window.location.origin;
  var url = baseUrl + '/site/studentDjcy?cytitle=' + record.title + '&cyid=' + record.id + '&cyatype=' + record.atype + '&sfzd=0&sfbs=xs';
  return url;
}

async function copyToClipboard(record) {
  try {
    var baseUrl = window.location.origin;
    var url = baseUrl + '/site/studentDjcy?cytitle=' + record.title + '&cyid=' + record.id + '&cyatype=' + record.atype + '&sfzd=0&sfbs=xs';
    await navigator.clipboard.writeText(url);
    createMessage.success('内容已复制到剪贴板');
    console.log('内容已复制到剪贴板');
  } catch (err) {
    console.error('复制到剪贴板失败:', err);
  }
}

//切换题目分数类型
function handleQiehuan(record, type) {
  console.log(`🚀 ~ handleQiehuan ~ type:`, type);
  console.log(`🚀 ~ handleQiehuan ~ record:`, record);
  record.wjSfqh = type;
}

//引用题库
function handleYylx(sylx) {
  var createBy = '';
  var wjSytype = '';
  if (sylx == '0') {
    //我的题库
    createBy = userStore.getUserInfo.username;
  } else {
    //公有题库
    wjSytype = '1';
  }
  var record = { wjLeixing, createBy, wjSytype };
  if (wjLeixing.value == '6') {
    YinyongTikuListModalpage.value.disableSubmit = false;
    YinyongTikuListModalpage.value.init(record);
  } else {
    YinyongTikuDcListModalpage.value.disableSubmit = false;
    YinyongTikuDcListModalpage.value.init(record);
  }
}

function handleJscjbfb() {
  var list = tableData.value;

  var cjbfb = qmkszb.value; //成绩百分比
  var cjbfb2 = kczyzb.value; //成绩百分比
  var zcj = 0;
  var score22 = 0;
  for (var i = 0; i < list.length; i++) {
    console.log('🥵', list);
    var score = list[i].score;
    if (score == null || score + '' == '') {
      createMessage.error('第' + (i + 1) + '次作业占总成绩的百分比不能为空！');
      break;
    }
    score22 = parseInt(score22) + parseInt(score);
    if (score < 0 || score > 100) {
      createMessage.error('作业成绩百分比必须在0-100之间！');
      break;
    }
    if (score22 > 100) {
      createMessage.error('作业总的百分比（课程作业占比+期末考试占比+课堂测验占比）已经超过100%，请重新输入');
      break;
    }
  }
  zcj = parseInt(score22) + parseInt(cjbfb) + parseInt(cjbfb2);
  if (zcj > 100) {
    createMessage.error('作业总的百分比（课程作业占比+期末考试占比+课堂测验占比）已经超过100%，请重新输入');
  }
}

//引用题库回调
function handleYytkSuccess(record) {
  for (var i = 0; i < record.length; i++) {
    var type = record[i].wjType;
    var list = tiganData.value;

    var wjxWjxxTmxxList = record[i].wjxWjxxTmxxList;

    if (type == 3) {
      var addwjxWjxxTmxxList = [];
      var sfxz = '';
      for (var j = 0; j < wjxWjxxTmxxList.length; j++) {
        if (wjxWjxxTmxxList[j].itemSelected == 'true') {
          sfxz = wjxWjxxTmxxList[j].itemIndex;
        }
        addwjxWjxxTmxxList.push({ itemTitle: wjxWjxxTmxxList[j].itemTitle, itemIndex: wjxWjxxTmxxList[j].itemIndex });
      }
      if (wjLeixing.value == '1') {
        sfxz = '';
      }
      let params = {
        wjType: parseInt(type),
        wjIndex: list.length + 1,
        mainId: mainId,
        wjTitle: record[i].wjTitle,
        wjScore: record[i].wjScore,
        wjLeixing,
        itemSelected: sfxz + '',
        wjSfqh: '0',
        wjxWjxxTmxxList: addwjxWjxxTmxxList,
      };
      list.push(params);
      tiganData.value = [...list];
    } else if (type == 4) {
      var addwjxWjxxTmxxList = [];
      let sfxz = [];
      for (var j = 0; j < wjxWjxxTmxxList.length; j++) {
        if (wjxWjxxTmxxList[j].itemSelected == 'true') {
          sfxz.push(wjxWjxxTmxxList[j].itemIndex);
        }
        addwjxWjxxTmxxList.push({ itemTitle: wjxWjxxTmxxList[j].itemTitle, itemIndex: wjxWjxxTmxxList[j].itemIndex });
      }
      if (wjLeixing.value == '1') {
        sfxz = [];
      }
      let params = {
        wjType: parseInt(type),
        wjIndex: list.length + 1,
        mainId: mainId,
        wjTitle: record[i].wjTitle,
        wjScore: record[i].wjScore,
        wjLeixing,
        itemSelected: sfxz,
        wjSfqh: '0',
        wjxWjxxTmxxList: addwjxWjxxTmxxList,
      };
      list.push(params);
      tiganData.value = [...list];
    } else if (type == 5) {
      var huida = record[i].wjAnswer;
      if (wjLeixing.value == '1') {
        huida = '';
      }
      let params = {
        wjType: parseInt(type),
        wjIndex: list.length + 1,
        mainId: mainId,
        wjTitle: record[i].wjTitle,
        wjScore: record[i].wjScore,
        wjLeixing,
        wjAnswer: huida,
        wjSfqh: '0',
      };
      list.push(params);
      tiganData.value = [...list];
    }
  }
}

//添加选项
function handleAddTmxx(record, index, list) {
  var itemIndex = 0;
  for (var i = 0; i < list.length; i++) {
    var lssx = list[i].itemIndex;
    if (itemIndex < parseInt(lssx)) {
      itemIndex = lssx;
    }
  }

  list.push({ itemTitle: null, itemIndex: parseInt(itemIndex) + 1 });
}

//删除选项
function handleRemTmxx(record, index, list) {
  if (list.length <= 2) {
    createMessage.error('至少保留两个选项');
  } else {
    list.splice(index, 1);
  }
}

//删除题目
function handleDelTigan(record, index) {
  tiganData.value.splice(index, 1);
  for (var i = 0; i < tiganData.value.length; i++) {
    tiganData.value[i].wjIndex = i + 1;
  }
}

function letterCount(val) {
  return val.replace(/[^a-zA-Z]/g, '').length;
}

function digitCount(val) {
  return val.replace(/\D/g, '').length;
}

function chineseCharCount(val) {
  const regex = /[\u4e00-\u9fa5]/g;
  return val.match(regex)?.length || 0;
}

//计算输入框宽度
function handinpwei(value) {
  if (!value) {
    return '20rem';
  } else {
    var a = letterCount(value); //判断字母
    var b = digitCount(value); //判断数字
    var c = chineseCharCount(value); //判断中文

    var d = a + b + c;
    if (d * 1.1 < 20) {
      return '20rem';
    } else if (d * 1.1 > 60) {
      return '60rem';
    } else {
      return d * 1.1 + 'rem';
    }
  }
}

//添加单选题
function addTigan(type) {
  console.log('😸', type);
  var list = tiganData.value;
  console.log('👩‍🦱', list);
  if (type == 3) {
    console.log('11111111111111111111');
    var chk = '';
    if (isShow.value) {
      chk = '1';
    }
    console.log('2222222222222222222');
    let params = {
      wjType: parseInt(type),
      wjIndex: list.length + 1,
      mainId: mainId,
      wjTitle: null,
      wjScore: null,
      wjLeixing,
      itemSelected: chk,
      wjSfqh: '0',
      wjxWjxxTmxxList: [
        { itemTitle: null, itemIndex: '1' },
        { itemTitle: null, itemIndex: '2' },
      ],
    };
    console.log('💇‍♀️', params);
    list.push(params);
    console.log('👩‍🔬', list);
    tiganData.value = [...list];
  } else if (type == 4) {
    let chk = '';
    if (isShow.value) {
      chk = '1,2';
    }
    let params = {
      wjType: parseInt(type),
      wjIndex: list.length + 1,
      mainId: mainId,
      wjTitle: null,
      wjScore: null,
      wjLeixing,
      itemSelected: chk,
      wjSfqh: '0',
      wjxWjxxTmxxList: [
        { itemTitle: null, itemIndex: '1' },
        { itemTitle: null, itemIndex: '2' },
      ],
    };
    list.push(params);
    tiganData.value = [...list];
  } else if (type == 5) {
    let params = {
      wjType: parseInt(type),
      wjIndex: list.length + 1,
      mainId: mainId,
      wjTitle: null,
      wjScore: null,
      wjLeixing,
      wjAnswer: null,
      wjSfqh: '0',
    };
    list.push(params);
    tiganData.value = [...list];
  } else if (type == 8) {
    var chk = '';
    if (isShow.value) {
      chk = '1';
    }
    let params = {
      wjType: parseInt(type),
      wjIndex: list.length + 1,
      mainId: mainId,
      wjTitle: null,
      wjScore: null,
      wjLeixing,
      wjSfqh: '0',
    };
    list.push(params);
    tiganData.value = [...list];
  }
}

/**
 * 拖动结束事件
 * @param evt
 */
function end(evt) {
  for (var i = 0; i < tiganData.value.length; i++) {
    tiganData.value[i].wjIndex = i + 1;
  }
  console.log(`🚀 ~ end ~ tiganData:`, tiganData);
}

function cheGrp(a, b) {
  var retChe = false;
  if (a) {
    for (var i = 0; i < a.length; i++) {
      if (a[i] == b) {
        retChe = true;
        break;
      }
    }
  }

  return retChe;
}

//显示第几个类型模块
function handleShowType(val) {
  zycs.value = tableData.value.length;
  if (tableData.value.length > 0) {
    zycsDisabled.value = true;
  } else {
    zycsDisabled.value = false;
  }
  console.log('👩‍👩‍👧‍👧', zycsDisabled);

  showType.value = val;
}

/**
 * 发布
 */
function handleFabu(record: Recordable) {
  createConfirm({
    iconType: 'warning',
    title: '发布测验',
    content: '是否发布此测验？',
    okText: '确认',
    cancelText: '取消',
    onOk: () => {
      //发布问卷
      defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id, wjlx: wjLeixing.value } }).then((res) => {
        reloadZy();
      });
    },
  });
  //推送微信信息
  setTimeout(() => {
    defHttp.get({ url: '/wjxWjxx/wjxWjxx/sendWjWechat', params: { id: record.id, wjlx: wjLeixing.value } }).then((res) => {});
  }, 5000);
}

//动态添加测验次数
function handleZycs() {
  var dataList = tableData.value;
  var changeZycs = zycs.value;
  if (changeZycs > dataList.length) {
    for (var i = dataList.length; i < changeZycs; i++) {
      dataList.push({
        sort: i + 1,
        lstitle: '第' + (i + 1) + '次测验',
        score: '',
        rwbh: rwbh,
        xqxn: xqxn,
        atype: wjLeixing.value,
      });
    }
  } else if (changeZycs < dataList.length) {
    for (var i = dataList.length; i > changeZycs; i--) {
      dataList.pop();
    }
  } else {
    for (let i = 0; i < dataList.length; i++) {
      var ppar = dataList[i];
      ppar.sort = i + 1;
      dataList[i] = ppar;
    }
  }
  tableData.value = dataList;
}
//新增一次测验，再最后面添加
function handleAddZycs() {
  var changeZycs = zycs.value;
  zycs.value = changeZycs + 1;
  handleZycs();
}
//删除指定第几次测验
function handleDelZycs(index) {
  var dataList = tableData.value;
  dataList.splice(index - 1, 1);
  tableData.value = dataList;
  zycs.value = dataList.length;
  handleZycs();
}

function handleSzzycs(val) {
  defHttp.get({ url: '/zyInfo/zyInfo/zyzb', params: { rwbh, xqxn, zyLeixing: '1' } }).then((res) => {
    console.log('😥', res);
    var list = res;
    for (var i = 0; i < list.length; i++) {
      if (list[i].zyLeixing == '0') {
        kczyzb.value = list[i].score;
      } else if (list[i].zyLeixing == '1') {
        qmkszb.value = list[i].score;
      } else if (list[i].zyLeixing == '2') {
      } else if (list[i].zyLeixing == '3') {
        ktcyzb.value = list[i].score;
      }
    }
  });
  handleShowType(1);
}
//批量进行保存
function handleBatchAdd() {
  var list = tableData.value;
  var sfjx = 0; //是否继续
  var cjbfb = kczyzb.value; //成绩百分比
  var cjbfb2 = qmkszb.value; //成绩百分比
  var zcj = 0;

  var score22 = 0;
  if (list.length == 0) {
    createMessage.error('作业次数不能为空！');
    return;
  }
  for (var i = 0; i < list.length; i++) {
    console.log('🥵', list);
    var score = list[i].score;
    if (score == null || score + '' == '') {
      createMessage.error('第' + (i + 1) + '次作业占总成绩的百分比不能为空！');
      sfjx = 1;
      break;
    }
    if (score < 0 || score > 100) {
      createMessage.error('作业成绩百分比必须在0-100之间！');
      sfjx = 1;
      break;
    }
    score22 = parseInt(score22) + parseInt(score);
    if (score22 > 100) {
      createMessage.error('作业总的百分比（课程作业占比+期末考试占比+课堂测验占比）已经超过100%，请重新输入');
      sfjx = 1;
      break;
    }
  }

  zcj = parseInt(score22) + parseInt(cjbfb) + parseInt(cjbfb2);

  if (zcj > 100) {
    createMessage.error('作业总的百分比（课程作业占比+期末考试占比+课堂测验占比）已经超过100%，请重新输入');
    sfjx = 1;
  }
  if (sfjx == 1) {
    return;
  }

  createConfirm({
    iconType: 'warning',
    title: '确认保存',
    content: '设置完课程测验次数后，需要对每次测验的内容和要求进行设置，然后进行发布',
    okText: '确认',
    cancelText: '取消',
    onOk: () => {
      defHttp.post({ url: '/wjxWjxx/wjxWjxx/batchAdd', data: list }).then((res) => {
        reloadZy();
      });
    },
  });
}

const columns = [
  {
    title: '序号',
    dataIndex: 'sort',
    key: 'sort',
  },
  {
    title: '测验次数',
    dataIndex: 'lstitle',
    key: 'lstitle',
  },
  {
    title: '本次测验占总成绩的百分比',
    dataIndex: 'score',
    key: 'score',
  },
  {
    title: '操作',
    key: 'action',
  },
];

const columnsKhnr = [
  {
    title: '序号',
    dataIndex: 'no',
    key: 'no',
    customRender: (text) => {
      return text.index + 1;
    },
    width: 80,
  },
  {
    title: '章次',
    dataIndex: 'title',
    key: 'title',
  },
  {
    title: '节次',
    dataIndex: 'twoTitle',
    key: 'twoTitle',
  },
];

/**
 * 提交数据
 */
async function submitForm() {
  // 触发表单验证
  await validate();
  confirmLoading.value = true;
  const isUpdate = ref<boolean>(false);
  //时间格式化
  let model = zyInfo.value;
  if (model.id) {
    isUpdate.value = true;
  }
  //循环数据
  for (let data in model) {
    //如果该数据是数组并且是字符串类型
    if (model[data] instanceof Array) {
      let valueType = getValueType(formRef.value.getProps, data);
      //如果是字符串类型的需要变成以逗号分割的字符串
      if (valueType === 'string') {
        model[data] = model[data].join(',');
      }
    }
  }
  console.log('👕', model);

  var endTime = model.endTime;
  var startTime = model.startTime;
  if (endTime && startTime) {
    var endTimestamp = Date.parse(endTime);
    var startTimestamp = Date.parse(startTime);
    if (endTimestamp < startTimestamp) {
      createMessage.warning('测验发布时间不能大于测验结束时间！');
      confirmLoading.value = false;
      return;
    }
  }
  const data = tiganData.value;

  const values = Object.assign([], data);
  if (values.length > 0) {
    var sfjx = '1';
    for (let i = 0; i < values.length; i++) {
      let param = values[i];

      values[i].itemSelected = param.itemSelected + '';

      if (!param.wjTitle) {
        createMessage.error('请填写题目信息');
        sfjx = '0';
        confirmLoading.value = false;
        return;
      }
      if (isShow.value) {
        if (!param.wjScore) {
          createMessage.error('请填写题目分数');
          sfjx = '0';
          confirmLoading.value = false;
          return;
        }
      }

      var wjType = param.wjType;
      if (wjType == 3 && wjType == 4) {
        var itemlist = param.wjxWjxxTmxxList;
        for (let j = 0; j < itemlist.length; j++) {
          if (!itemlist[j].itemTitle) {
            createMessage.error('请填写选项信息');
            sfjx = '0';
            confirmLoading.value = false;
            return;
          }
        }

        if (isShow.value) {
          var zqda = values[i].itemSelected;
          if (!zqda || zqda == 'NaN' || zqda == 'undefined') {
            createMessage.error('请选择正确答案');
            sfjx = '0';
            confirmLoading.value = false;
            return;
          }
        }
      } else if (wjType == 8) {
      } else if (wjType == 6) {
        if (isShow.value) {
          var wjAnswer = values[i].wjAnswer;
          if (!wjAnswer || wjAnswer == 'NaN' || wjAnswer == 'undefined') {
            createMessage.error('请选择正确答案');
            sfjx = '0';
            confirmLoading.value = false;
            return;
          }
        }
      }
    }
    if (sfjx == '0') {
      return;
    }
  } else {
    createMessage.error('至少创建一个试题');
    confirmLoading.value = false;
    return;
  }

  model.list = values;
  console.log('😨', model);
  confirmLoading.value = false;
  await saveOrUpdate(model, isUpdate.value)
    .then((res) => {
      if (res.success) {
        createMessage.success(res.message);
        reloadZy();
      } else {
        createMessage.warning(res.message);
      }
    })
    .finally(() => {
      confirmLoading.value = false;
    });
}

/**
 * 编辑事件
 */
function handleEdit(record, type) {
  console.log('🤲', record);
  if (!type) {
    isShow.value = true;
  } else {
    isShow.value = false;
  }
  if (!record.sturead) {
    record.sturead = '1';
  }
  if (!record.xshpkg) {
    record.xshpkg = '1';
  }
  if (!record.sfzzcj) {
    record.sfzzcj = '1';
  }
  if (!record.xssfck) {
    record.xssfck = '1';
  }
  editDisabled.value = type;
  zyInfo.value = record;
  dataKhnr.value = [];
  mainId.value = record.id;

  defHttp.get({ url: '/wjxWjxxTmlb/wjxWjxxTmlb/queryByMainId', params: { id: record.id } }).then((res) => {
    tiganData.value = res;
  });
  handleShowType(2);
}

//测验要求切换
function handleZyyqShow(type) {
  console.log('👯', type);
  if (type == 1) {
    zyyqShow.value = true;
  } else {
    zyyqShow.value = false;
  }
}

//查询列表数据
function reloadZy() {
  queryParamZy.value.pageNo = current.value;
  queryParamZy.value.pageSize = pageSize.value;
  queryParamZy.value.rwbh = rwbh;
  queryParamZy.value.xqxn = xqxn;
  queryParamZy.value.atype = wjLeixing.value;
  defHttp.get({ url: '/wjxWjxx/wjxWjxx/list', params: queryParamZy.value }).then((res) => {
    total.value = res.total;
    pageNo.value = res.pages;
    current.value = res.current;
    tableData.value = res.records;
    if (tableData.value.length > 0) {
      showType.value = 999;
    } else {
      showType.value = 0;
    }
  });
}

/**
 * 删除事件
 */
async function handleDelete(record) {
  if (record.endTime) {
    createConfirm({
      iconType: 'warning',
      title: '删除',
      content: '您已经对测验的内容和要求进行了设置，如果继续删除，内容和要求将一并删除，确认进行删除吗？',
      okText: '确认',
      cancelText: '取消',
      onOk: () => {
        deleteOne({ id: record.id }, reloadZy);
      },
    });
  } else {
    deleteOne({ id: record.id }, reloadZy);
  }
}

//新增一次测验
function handleAddOne() {
  defHttp.post({ url: '/wjxWjxx/wjxWjxx/addOne', params: { rwbh, xqxn, atype: wjLeixing.value } }).then((res) => {
    reloadZy();
  });
}

//选择考察内容
function handleKcnr() {
  registerZcjcModal.value.disableSubmit = false;
  registerZcjcModal.value.init({ rwbh, xnxq: xqxn, createBy: teano });
}

//选择章次节次后的回调
function handleCheckZcjcSuccess(record) {
  console.log('🙅‍♂️', record);
  console.log('🙅‍♂️', record[0]);
  var kcnr = '';
  kcnr = kcnr ? kcnr : '';
  for (var i = 0; i < record.length; i++) {
    kcnr = kcnr + record[i] + ',';
  }
  if (kcnr.indexOf(',') > -1) {
    kcnr = kcnr.substring(0, kcnr.length - 1);
  }
  zyInfo.value.kcnr = kcnr;

  console.log('💑', kcnr);
  if (kcnr) {
    defHttp.get({ url: '/teachingunitcontent/kcTeachingUnitContentOne/getAllList', params: { id: kcnr } }).then((res) => {
      console.log('🤦‍♀️', res);
      dataKhnr.value = res;
    });
  } else {
    dataKhnr.value = [];
  }
}

/**
 * 学生答卷列表
 */
function handleDjjgs(record: Recordable, flag) {
  WjxWjxxTmlbDjjgsModalPage.value.disableSubmit = true;
  WjxWjxxTmlbDjjgsModalPage.value.edit(record, flag);
}

/**
 * 获取选课人数
 */
function openXkrs(record) {
  XxhbbksListModalPage.value.disableSubmit = true;
  XxhbbksListModalPage.value.init(record);
}

onMounted(() => {
  reloadZy();
});
</script>

<style lang="less" scoped>
.title {
  margin-left: 20px;
  font-size: 18px;
}
.title2 {
  font-size: 18px;
}
.ant-divider-horizontal {
  display: flex;
  clear: both;
  width: 100%;
  min-width: 100%;
  margin: 3px 0 5px;
}
.tishi {
  width: 100%;
  font-size: 12px;
  color: #fd8f02;
  margin-top: -4px;
  background: #fffbf2;
  text-align: center;
  padding: 6px 0;
}
.cardClass {
  min-height: 200px;
}
.sznrClass {
  line-height: 40px;
  text-align: center;
}
.ant-card {
  box-sizing: border-box;
  border-radius: 5px;
  border: 1px solid #e6e6e6;
  margin: 6px 0;
  background: #fff;
}

.ant-card:hover {
  box-shadow: 2px 2px 10px 1px #d4d4d4;
}
.ant-card-head {
  min-height: 48px;
  margin-bottom: -1px;
  padding: 0 24px;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 500;
  font-size: 16px;
  background: transparent;
  border-bottom: 1px solid #dadada;
  border-radius: 2px 2px 0 0;
}
.ellipsis {
  overflow: hidden; /* 确保超出容器的内容被裁剪 */
  white-space: nowrap; /* 确保文本在一行内显示 */
  text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.ellip-title {
  display: flex;
  justify-content: space-between;
}
.elli-title {
  font-size: 16px;
  font-weight: bold;
}
.ellip-word {
  font-size: 14px;
  color: #666666;
}
.zuanqu:hover {
  cursor: pointer;
  color: #18a689;
}
.data-suggest {
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 25%;
  margin-right: 3px;
  padding: 8px 3px;
  border-radius: 5px;
  background: #f7f7f7;
  margin-top: 10px;
}
.data-suggest span:nth-child(1) {
  font-size: 16px;
  font-weight: bold;
}
.data-suggest span:nth-child(2) {
  font-size: 12px;
}
.work-img {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 80px;
  margin-bottom: 30px;
}
.work-img-img {
  width: 180px;
  height: 139px;
}
.buttonClass {
  background: #1ab394;
  font-weight: 600;
  color: #fff;
  border-radius: 3px;
  border: none;
}
.mar-right20 {
  margin-right: 14px;
}
.button-zhta {
  color: #666666;
  cursor: pointer;
}
.button-zhta:hover {
  cursor: pointer;
  color: #18a689;
}

.diva {
  cursor: pointer;
  color: #18a689;
}
.sear-distance {
  padding: 0 10px;
}
.ant-form-item {
  box-sizing: border-box;
  margin: 10px 0;
  padding: 0;
  color: rgba(0, 0, 0, 0.85);
  font-size: 14px;
  font-variant: tabular-nums;
  line-height: 1.5715;
  list-style: none;
  font-feature-settings: tnum;
  /* margin-bottom: 24px; */
  vertical-align: top;
}
.bled-countenance {
  color: #333333;
}
.bled-countenance2 {
  color: #999999;
  font-size: 12px;
}
.region {
  margin: 5px 10px;
  padding-bottom: 20px;
  background: #fff;
  border-radius: 5px;
}
.region-title {
  font-size: 16px;
  color: #029c88;
  padding: 8px 20px;
  border-left: 5px solid #029c88;
  margin: 10px;
  border-radius: 5px;
  background: #fff;
}
.tjfx-col {
  font-size: 12px;
  padding: 8px 20px;
  line-height: 25px;
}
.tjfx-col-title {
  font-size: 16px;
  padding: 8px 20px;
  line-height: 25px;
  font-weight: bold;
}
.tjfx-line {
  width: 30%;
  text-align: center;
  display: flex;
  flex-direction: column;
  background: #f7f7f7;
  border-radius: 5px;
  margin: 0 15px;
  padding: 8px 0;
}
.tjfx-colt {
  font-size: 22px;
  font-weight: bold;
  color: #1ab394;
}
.tjfx-colw {
  font-size: 14px;
  color: #666;
}
.tjfx-title {
  width: 90%;
  float: left;
}
.tjfx-type {
  width: 10%;
  float: left;
}
.tjfx-xzrs {
  margin-left: 30px;
  font-size: 12px;
  position: absolute;
  right: 15px;
}
.tjfx-xzrs1 {
  margin-left: 30px;
  font-size: 12px;
}
.tjfx-zql {
  text-align: right;
  width: 50%;
  font-size: 16px;
  padding: 20px;
}
.question-type {
  background: #eaf9f6;
  color: #1ab394;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid #1ab394;
}
.answer-word {
  color: #ff8710;
  font-weight: bold;
}
.ant-dropdown-link {
  color: #029c88;
}
.ant-dropdown-link:hover {
  color: #333;
}
.ant-dropdown-link1 {
  color: #666;
}
.ant-dropdown-link1:hover {
  color: #029c88;
}
.card-label {
  background: #81cbbc;
  border-radius: 4px;
  color: #fff;
  padding: 3px 6px;
  margin-left: 10px;
  font-size: 12px;
}
.card-label2 {
  background: #84c4fa;
  border-radius: 4px;
  color: #fff;
  padding: 3px 6px;
  margin-left: 10px;
  font-size: 12px;
}
.card-label3 {
  background: #fabe84;
  border-radius: 4px;
  color: #fff;
  padding: 3px 6px;
  margin-left: 10px;
  font-size: 12px;
}
/deep/.ant-card-head-title {
  display: inline-block;
  flex: 1;
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}
</style>
