<template>
	<div style="background-color:#f7f7f7;padding:10px 10px;">
		<div class="zhuti">
			<div style="height:58px;line-height:58px;">
				<div style="color:#0006"> <span>问卷调查</span> <span style="padding:0 5px;">></span> <span
						style="color:#000000e6">问卷管理</span></div>
			</div>
			<!-- 线上 -->
			<div v-if="!tongjiBox">
				<!-- 搜索 -->
				<div class="formSearch">
					<el-form :inline="true" :model="formSel">
						<el-form-item label="问卷标题">
							<el-input v-model="formSel.title" placeholder="请输入" style="width:168px;" />
						</el-form-item>
						<el-form-item label="问卷类型">
							<el-select v-model="formSel.questionnaireType" placeholder="请选择"
								style="width:168px;margin-right: 15px">
								<el-option label="物业问卷" value="物业问卷" />
								<el-option label="招商问卷" value="招商问卷" />
								<el-option label="满意度问卷" value="满意度问卷" />
								<el-option label="社会调查问卷" value="社会调查问卷" />
							</el-select>
						</el-form-item>
						<el-form-item label="状态">
							<el-select v-model="formSel.reviewStatus" placeholder="请选择"
								style="width:168px;margin-right: 15px">
								<el-option label="待提交" value="1" />
								<el-option label="待审核" value="2" />
								<el-option label="已通过" value="3" />
								<el-option label="不通过" value="4" />
								<el-option label="已禁用" value="5" />
							</el-select>
						</el-form-item>
					</el-form>
					<div>
						<el-button :disabled="isbutton" style="background-color: #3F9B6A;color: #fff"
							@click="onSubmit">查询
						</el-button>
						<el-button class="buttonHover"
							style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
							@click="resetting">重置
						</el-button>
					</div>
				</div>
				<div style="margin-bottom: 20px;">
					<div>
						<el-button style="background-color: #3F9B6A;color: #fff;padding:8px 15px;"
							icon="el-icon-circle-plus-outline" @click="addggXin">新增</el-button>
					</div>
				</div>
				<!-- 表格 -->

				<el-table :data="tableData.slice((currentPageList - 1) * pageSize, currentPageList * pageSize)"
					:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"
					tooltip-effect="dark custom-tooltip-effect">
					<el-table-column label="序号" min-width="80">
						<template slot-scope="scope">
							{{ scope.$index + 1 }}
						</template>
					</el-table-column>
					<!-- <el-table-column label="问卷编号" min-width="150" prop="id">
          </el-table-column> -->
					<el-table-column label="问卷类型" min-width="130" prop="questionnaireType" />
					<el-table-column label="问卷标题" prop="title" min-width="300" :show-overflow-tooltip="true" />
					<el-table-column label="开始时间" prop="startDate" min-width="150" />
					<el-table-column label="结束时间" prop="endDate" min-width="150" />
					<el-table-column label="已作答人数" prop="countNumber" min-width="100" />
					<el-table-column prop="createTime" label="创建时间" min-width="180" />
					<el-table-column prop="reviewStatus" label="状态" min-width="120">
						<template slot-scope="scope">
							{{ scope.row.reviewStatus == '1' ? '待提交' : scope.row.reviewStatus == '2' ? '待审核' : scope.row.reviewStatus
                ==
                '3' ? '已通过' : scope.row.reviewStatus == '4' ?'不通过':'已禁用' }}
						</template>
					</el-table-column>
					<el-table-column label="操作" min-width="280">
						<template slot-scope="scope">
							<div class="tableBtn greens" @click="details(0, scope.row)">查看</div>
							<div v-if="scope.row.reviewStatus == '1'" class="tableBtn greens"
								@click="bianls(scope.row)">编辑</div>
							<div v-if="scope.row.reviewStatus == '1'" class="tableBtn greens"
								@click="fabu('2', scope.row)">提交审核</div>
							<div v-if="scope.row.reviewStatus == '3'" class="tableBtn greens" @click="downs(scope.row)">
								禁用</div>
							<div v-if="scope.row.reviewStatus == '3' || scope.row.reviewStatus == '5'"
								class="tableBtn greens" @click="tongji(scope.row)">统计</div>
							<div v-if="scope.row.reviewStatus == '1'" class="tableBtn greens"
								@click="delwen(scope.row)">删除</div>
							<div v-if="scope.row.reviewStatus == '3' || scope.row.reviewStatus == '1'"
								class="tableBtn greens" @click="yulan(scope.row)">预览</div>
							<!-- <div @click="addbuss(3,scope.row)" class="tableBtn greens">终止</div> -->
						</template>
					</el-table-column>
				</el-table>
				<div style="display: flex;justify-content: space-between;margin-top: 10px;">
					<div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ total }}</span> 条</div>
					<el-pagination :current-page="currentPageList" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize"
						background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange"
						@current-change="handleCurrentChange" />
				</div>
				<!--       <div class="fenye">
          <el-pagination :hide-on-single-page='flag' background small size="mini" :current-page="currentPageList"
            :page-sizes="[10, 20, 50, 100]" layout="prev, pager, next,total" :total="total "
            @size-change="handleSizeChange" @current-change="handleCurrentChange" />
        </div> -->
			</div>
			<!-- 统计 -->
			<div v-if="tongjiBox">
				<div>
					<div style="display: flex;">
						<img :src="this.$hostUrl + secondData.coverImage" alt=""
							style="width:150px;height:100px;margin-right: 15px;border-radius:10px;">
						<div>
							<div
								style="font-weight: 600;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;">
								{{ secondData.title }}
							</div>
							<div style="padding:20px 0;">答卷数量：{{ total1 || 0 }}</div>
							<div>起止时间：{{ secondData.startDate }} 至 {{ secondData.endDate }}</div>
						</div>
					</div>
					<div>
						<el-tabs v-model="tongjiTabs" @tab-click="tongjiClick">
							<el-tab-pane label="作答情况" name="qingK">
								<div v-loading="loading" style="width: 100%">
									<div style="display: flex;align-items: center;margin-bottom: 20px;">
										<el-date-picker v-model="tongjiMsg.plan_Time"
											style="width: 30%;margin-right: 20px;" value-format="yyyy-MM-dd"
											type="daterange" range-separator="至" start-placeholder="开始日期"
											end-placeholder="结束日期" align="right" />
										<el-input v-model="tongjiMsg.userName" style="width:30%;margin-right: 20px;"
											placeholder="搜索提交人" />
										<el-button style="background-color: #3F9B6A;color: #fff"
											@click="tongjiSubmit">查询
										</el-button>
										<el-button class="buttonHover"
											style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
											@click="tongjiSubmitret">重置
										</el-button>
									</div>
									<el-table
										:data="tongjiSshu.slice((currentPage1 - 1) * pageSize, currentPage1 * pageSize)"
										:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }">
										<el-table-column label="序号" min-width="100">
											<template slot-scope="scope">
												{{ scope.$index + 1 }}
											</template>
										</el-table-column>
										<el-table-column label="提交人" min-width="150" prop="userName" />
										<el-table-column label="手机号" min-width="200" prop="contactNumber" />
										<el-table-column label="作答时长" prop="responseTime" min-width="150">
											<template slot-scope="scope">
												{{ secondsToMinutesAndSeconds(scope.row.responseTime) }}
											</template>
										</el-table-column>
										<el-table-column label="提交时间" prop="createTime" min-width="120" />
										<el-table-column label="操作" min-width="200">
											<template slot-scope="scope">
												<div class="tableBtn greens" @click="daxiang(scope.row)">详情</div>
											</template>
										</el-table-column>

									</el-table>
									<div class="fenye">
										<el-pagination :hide-on-single-page="flag1" background small size="mini"
											:current-page="currentPage1" :page-sizes="[10, 20, 50, 100]"
											layout="prev, pager, next,total" :total="total1"
											@current-change="handleCurrentChange1" />
									</div>
								</div>
							</el-tab-pane>
							<el-tab-pane label="数据统计" name="shuju">
								<div v-loading="shujuloading" style="padding:20px;">
									<div style="margin-bottom: 20px;font-size: 18px;">数据概况
										<span>截止{{ tongjiTu.statisticalTime }}</span>
									</div>
									<div
										style="display: flex;padding:20px 30px;width: 100%;justify-content: space-around;border: 1px solid #dddfe5;">
										<div style="text-align: center;">
											<div style="margin-bottom:10px;">今日新增</div>
											<div style="font-size:16px;">{{ tongjiTu.todayNumber || 0 }}</div>
										</div>
										<div style="text-align: center;">
											<div style="margin-bottom:10px;">答卷总数</div>
											<div style="font-size:16px;">{{ tongjiTu.countNumber || 0 }}</div>
										</div>

										<div style="text-align: center;">
											<div style="margin-bottom:10px;">平均答题时长</div>
											<div style="font-size:16px;">
												{{ secondsToMinutesAndSeconds(tongjiTu.averageDuration) }}
											</div>
										</div>
									</div>
									<div style="margin: 20px 0;font-size: 18px;">题目统计</div>
									<!-- {{tuwent}} -->
									<dynamic-chart-table v-for="(item, index) in tuwent" v-show="item.type != '文本'"
										:ref="'chat' + index" :key="index" :title="item.title" :table-data="tongjiTu"
										:tixingtype="item.type" :index="index" />

									<!-- <tiaoxing :title="item.tikuTitle" :tableData="tongjiTu.cereQuestionManagements" v-if="item.questionType=='多选'" v-for="(item,index) in tongjiTu.cereQuestionManagements"> -->

									</tiaoxing>
								</div>
							</el-tab-pane>

						</el-tabs>
					</div>

					<div style="padding-top:20px;display:flex;justify-content: flex-end;">
						<el-button class="buttonHover"
							style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
							@click="tongjiBoxFan">返回</el-button>

					</div>
				</div>
				<el-dialog :visible.sync="daxiangBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center
					:close-on-click-modal="false" append-to-body>
					<div style="padding:20px;">
						<div style="font-size: 14px;padding-bottom: 20px;color: #000;">答卷详情</div>
						<div style="display:flex;border-top: 1px solid #dddfe5;">
							<div style="padding:20px 20px 0  0;border-right: 1px solid #dddfe5;width:25%">
								<div style="margin-bottom:20px;">基本信息</div>
								<div>
									<div style="margin-bottom:15px;">提交人：<span
											style="color:#000">{{ daxiangData.userName }}</span></div>
									<div style="margin-bottom:15px;">手机号：<span
											style="color:#000">{{ daxiangData.contactNumber }}</span>
									</div>
									<div style="margin-bottom:15px;">作答时长：<span style="color:#000">{{
                    secondsToMinutesAndSeconds(daxiangData.responseTime) }}</span> </div>
									<div style="margin-bottom:15px;">提交时间：<span
											style="color:#000">{{ daxiangData.createTime }}</span>
									</div>
									<div style="margin-bottom:15px;">填写条件：<span style="color:#000">{{ secondData.fillingConditions
                      }}</span>
									</div>
									<div style="margin-bottom:15px;">问卷分数：<span style="color:#000">{{ daxiangData.questionnaireScore
                      }}</span>
									</div>
									<div>用户意见：<span style="color:#000" />{{ daxiangData.opinion }} </div>
								</div>
							</div>
							<div style="padding:20px;">
								<div style="margin-bottom:20px;">答卷详情</div>
								<div>

									<div v-for="(item, index) in daxiangData.question" class="question">
										<p class="question-title"><span v-if="item.required == '必填'"
												style="color: red;">*</span>{{ index
                      }}.<span style="">({{ item.type }})</span>
											{{ item.title }}
										</p>
										<div>
											<el-radio-group v-for="(val, idx) in item.options" v-if="item.type == '单选'"
												:key="idx" v-model="item.choose"
												style="display: flex;flex-direction: column;">
												<el-radio disabled :label="val.answer">{{ val.answer }}</el-radio>

											</el-radio-group>

											<el-checkbox-group v-for="(val, idx) in item.options"
												v-if="item.type == '多选'" :key="idx" v-model="val.disabled"
												style="display: flex;flex-direction: column;">

												<el-checkbox :label="val.answer" disabled>{{ val.answer }}</el-checkbox>

											</el-checkbox-group>

											<div v-if="item.type == '文本'" style="display: flex;flex-direction: column;">
												{{ item.choose}}

											</div>
										</div>
									</div>

								</div>
							</div>
						</div>
					</div>
				</el-dialog>
			</div>
		</div>
		<!-- 详情框 -->
		<el-dialog :visible.sync="detbox" custom-class="tongyong_css" style="padding: 0;" width="65%" center
			:close-on-click-modal="false" :show-close="false">
			<div style="padding:20px;">
				<div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div>
				<div>
					<div style="padding: 10px 0  20px 0;">基本信息</div>
					<el-descriptions class="margin-top" :column="3" border :label-style="labelStyle"
						:content-style="contentStyle">
						<el-descriptions-item :span="2">
							<template slot="label">
								问卷标题
							</template>
							{{ secondData.title }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								状态
							</template>
							{{ secondData.reviewStatus == '1' ? '待提交' : secondData.reviewStatus == '2' ? '待审核' :
                secondData.reviewStatus
                  ==
                  '3' ? '审核通过' : secondData.reviewStatus == '4' ?'不通过':'已禁用' }}
						</el-descriptions-item>

						<el-descriptions-item>
							<template slot="label">
								开始时间
							</template>
							{{ secondData.startDate }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								结束时间
							</template>
							{{ secondData.endDate }}
						</el-descriptions-item>

						<el-descriptions-item>
							<template slot="label">
								预计填写时长（分钟）
							</template>
							{{ secondData.estimatedTime }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								发布端口
							</template>
							{{ secondData.publishPort }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								问卷类型
							</template>
							{{ secondData.questionnaireType }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								填写条件
							</template>
							{{ secondData.fillingConditions }}
						</el-descriptions-item>
						<!-- <el-descriptions-item>
              <template slot="label">
                问卷介绍
              </template>
              {{secondData.remarks}}
            </el-descriptions-item> -->
					</el-descriptions>
					<div style="padding: 20px 0;">问卷介绍</div>
					<div v-html="secondData.remarks"></div>
					<div style="padding: 20px 0;">问卷封面</div>
					<div>
						<el-image style="width: 280px; height: 200px" :src="this.$hostUrl + secondData.coverImage"
							fit="fill" />
						<!-- <img :src="secondData.coverImage" alt="" style="width:25%" /> -->
					</div>
					<!-- <div style="padding: 20px 0 ;">参与答卷奖励</div> -->
					<!-- <el-descriptions class="margin-top" :column="3" border :label-style="labelStylejiang"
						:content-style="contentStylejiang">
						<el-descriptions-item>
							<template slot="label">
								提交问卷后
							</template>

							{{ secondData.rewardForParticipation!=''?'转盘抽奖':'不设置奖励'}}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								奖励
							</template>
							<div>
								<span>{{ secondData.rewardForParticipation!=''?getStatusText(secondData.actStyle):'无'}}</span>
								<span v-if="jiangli.id && jiangli.id!=''"
									style="padding: 0 20px;color: #3F9B6A;cursor: pointer;" @click="actGo(1)">查看</span>
							</div>
						</el-descriptions-item>
					</el-descriptions> -->
					<div style="padding: 20px 0 ;">问卷题目</div>
					<el-table :data="wenData"
						:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }">
						<el-table-column label="序号" min-width="100">
							<template slot-scope="scope">
								{{ scope.$index + 1 }}
							</template>
						</el-table-column>
						<el-table-column label="题目" min-width="300" prop="title" :show-overflow-tooltip="true" />
						<el-table-column label="题型" min-width="80" prop="type" />
						<el-table-column label="是否必填" prop="required" min-width="80" />
						<el-table-column label="选项" min-width="120">
							<template slot-scope="scope">
								<div v-for="(value, index) in scope.row.options " v-if="scope.row.type != '文本'"
									:key="index">
									{{ index + 1 }}：{{ value.answer }}
								</div>
								<div v-else>
									-
								</div>
							</template>

						</el-table-column>

					</el-table>
					<div style="padding: 20px 0 ;">系统信息</div>
					<el-descriptions class="margin-top" :column="3" border :label-style="labelStyle"
						:content-style="contentStyle">
						<el-descriptions-item>
							<template slot="label">
								创建人
							</template>
							{{ secondData.createUser }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								创建时间
							</template>
							{{ secondData.createTime }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								更新时间
							</template>
							{{ secondData.updateTime }}
						</el-descriptions-item>
					</el-descriptions>
					<div style="padding: 20px 0 ;">审核信息</div>
					<el-descriptions class="margin-top" :column="3" border :label-style="labelStyle"
						:content-style="contentStyle">
						<el-descriptions-item>
							<template slot="label">
								审核状态
							</template>
							{{ secondData.reviewStatus == '1' ? '待提交' : secondData.reviewStatus == '2' ? '待审核' :
                secondData.reviewStatus
                  ==
                  '3' ? '审核通过' : secondData.reviewStatus == '4' ?'不通过':'已禁用' }}
						</el-descriptions-item>
						<el-descriptions-item>
							<template slot="label">
								审核意见
							</template>
							<div>{{ secondData.reviewComments }}</div>
						</el-descriptions-item>

					</el-descriptions>
				</div>

				<div style="padding-top:20px;display:flex;justify-content: flex-end;">
					<el-button class="buttonHover"
						style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
						@click="detbox = false">返回</el-button>
				</div>
			</div>
	</el-dialog>

	<!-- 新增 -->
	<el-dialog :visible.sync="ggXin" custom-class="tongyong_css" style="padding: 0;" width="60%" class="dialog_css_Xq"
		center :close-on-click-modal="false" :show-close="false">
		<div style="padding:20px;max-height: calc(100vh - 200px);
  overflow-y: auto;">
			<div style="font-size: 14px;padding-bottom: 20px;color: #000;">新建问卷</div>
			<div>
				<el-tabs v-model="xiangTabs">
					<el-tab-pane label="基本信息" name="first">
						<div style="width: 100%">
							<div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
								<div
									style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;">
									<div>基本信息</div>
								</div>

								<el-form ref="inlineform" :model="formInline" :rules="rules" label-width="155px"
									style="padding:20px;">
									<el-form-item label="问卷标题" prop="title">
										<el-input v-model="formInline.title" maxlength="50" />
									</el-form-item>
									<el-form-item label="问卷起止时间" prop="">
										<el-date-picker v-model="Xin_Time" style="width: 100%;"
											value-format="yyyy-MM-dd" type="daterange" range-separator="至"
											start-placeholder="开始日期" end-placeholder="结束日期" align="right">
											:picker-options="pickerOptions">
										</el-date-picker>
									</el-form-item>
									<el-form-item label="发布端口" prop="publishPort">
										<el-select v-model="formInline.publishPort" placeholder="请选择">
											<el-option label="用户端" value="用户端" />
											<el-option label="商家端" value="商家端" />
											<el-option label="H5端" value="H5端" />
										</el-select>
									</el-form-item>
									<el-form-item label="问卷类型" prop="questionnaireType">
										<el-select v-model="formInline.questionnaireType" placeholder="请选择">
											<el-option label="物业问卷" value="物业问卷" />
											<el-option label="招商问卷" value="招商问卷" />
											<el-option label="满意度问卷" value="满意度问卷" />
											<el-option label="社会调查问卷" value="社会调查问卷" />
										</el-select>
									</el-form-item>
									<el-form-item label="预计填写时长(分钟)" prop="estimatedTime">
										<el-input v-model.number="formInline.estimatedTime" maxlength="10" />
									</el-form-item>

									<el-form-item label="问卷介绍" prop="remarks">
										<!-- <el-input v-model="formInline.remarks" maxlength="255"></el-input> -->
										<wang-editor ref="editor" v-model="formInline.remarks" :height="200" />
									</el-form-item>
									<el-form-item label="填写人" prop="filler">
										<el-select v-model="formInline.filler" placeholder="请选择">
											<!-- <el-option label="会员" value="会员" /> -->
											<el-option label="公众" value="公众" />
										</el-select>
									</el-form-item>
									<el-form-item label="填写条件" prop="fillingConditions">
										<el-radio-group v-model="formInline.fillingConditions" style="margin-top:13px;">
											<el-radio label="可重复填写">可重复填写</el-radio>
											<el-radio label="不可重复填写">不可重复填写</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="创建人" prop="createUser">
										<el-input v-model="formInline.createUser" placeholder="请输入" maxlength="50" />
										</el-select>
									</el-form-item>
									<el-form-item label="问卷封面" prop="coverImage">

										<div style="position: relative;">

											<upimg :limit="1" :file-size="1" :is-show-tip="true"
												:value="formInline.coverImage" @input="e => input(e, '1')" />
											<!-- <div style="position: absolute;left:160px;height:80px;">()</div> -->
											<!-- @input="e=>input(e,'ing')" @input="input" -->
										</div>
									</el-form-item>
									<el-form-item label="姓名" prop="needName">
										<el-radio-group v-model="formInline.needName" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="电话" prop="needPhone">
										<el-radio-group v-model="formInline.needPhone" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="性别" prop="needGender">
										<el-radio-group v-model="formInline.needGender" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>

									<el-form-item label="意见" prop="needOpinion">
										<el-radio-group v-model="formInline.needOpinion" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>
								</el-form>
							</div>
							<!-- <div>
									<div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
										<div
											style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;">
											<div>参与答卷奖励</div>
										</div>
										<el-form ref="form" :model="formInline" label-width="140px"
											style="padding:20px;">
											<el-radio-group v-model="radioreward" @change="radioClick">
												<el-radio label="不设置奖励" value="不设置奖励">不设置奖励</el-radio>
												<el-radio label="转盘抽奖" value="转盘抽奖">转盘抽奖</el-radio>
											</el-radio-group>
										</el-form> -->
							<!-- <div v-if="radioreward === '转盘抽奖'" style="padding: 0  0 20px 20px;">
											<div v-if="jiangli.id && jiangli.id!=''" style="padding: 10px 0;">
												<span>{{jiangli.actName}}</span>
												<span style="padding: 0 20px;color: #3F9B6A;cursor: pointer;"
													@click="actGo(1)">查看</span>
												<span style="color: #3F9B6A;cursor: pointer;"
													@click="actGo(2)">编辑</span>
											</div>
											<div v-else>
												<el-button style="color: #fff;background-color: #3F9B6A;"
													@click="actGo(0)">创建活动</el-button>
											</div>
										</div>

								</div>

							</div> -->
						</div>

					</el-tab-pane>
					<el-tab-pane label="问卷内容" name="second">
						<div style="width: 100%">
							<div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
								<div
									style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;">
									<div>问卷内容</div>
									<div>
										<div class="greens tableBtn" @click="addTikuShow">新增</div>
										<div class="greens tableBtn" @click="selTiku">从题库中选择</div>
									</div>

								</div>

								<div style="padding:20px;">
									<el-table :data="wenConstData"
										:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"
										class="xddTable">
										<el-table-column label="序号" min-width="100">
											<template slot-scope="scope">
												{{ scope.$index + 1 }}
											</template>
										</el-table-column>
										<el-table-column label="题目" min-width="300" prop="tikuTitle"
											show-overflow-tooltip />
										<el-table-column label="题型" min-width="80" prop="questionType" />
										<el-table-column label="是否必填" prop="isRequired" min-width="120" />
										<el-table-column label="" min-width="120">
											<template #default="scope">
												<span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;"
													@click="moveUp(scope.$index)" v-if="scope.$index != 0">↑</span>
												<span style="cursor: pointer; color: #3F9B6A;"
													@click="moveDown(scope.$index)"
													v-if="scope.$index != (wenConstData.length - 1)">↓</span>
											</template>
										</el-table-column>
										<el-table-column label="操作" min-width="80">
											<template slot-scope="scope">
												<!-- <div class="tableBtn greens">编辑</div> -->
												<div class="tableBtn greens" @click="delWenCon('1', scope.$index)">
													删除</div>
											</template>
										</el-table-column>
									</el-table>
								</div>
							</div>
						</div>
					</el-tab-pane>

				</el-tabs>
			</div>

			<!-- <span slot="footer" class="dialog-footer">
         <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
           @click="closeFn(1)">返回</el-button>
         <el-button @click="addCheck(2)" style="background-color: #3F9B6A;color: #fff">确认</el-button>

            </span> -->
		</div>
		<el-dialog :visible.sync="tikuBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center
			:close-on-click-modal="false" append-to-body @close="tikuquxiao(1)">
			<div style="padding:20px;">
				<div style="padding:20px;">
					<div style="display: flex;justify-content: space-between;margin-bottom: 20px;">

						<div>
							从题库中选择
							<el-select v-model="tikuNie" style="width:28%;margin-right: 15px;" @change="tikuchange">
								<el-option label="用户端题库" value="用户端题库" />
								<el-option label="商户端题库" value="商户端题库" />
								<el-option label="公共端题库" value="公共端题库" />
							</el-select>
							<el-select v-model="danxuan" style="width:28%;margin-right: 15px;" placeholder="请选择题型">
								<el-option label="单选" value="单选" />
								<el-option label="多选" value="多选" />
								<el-option label="文本" value="文本" />
							</el-select>
							<!-- <el-select v-model="manyi" style="width:20%;" placeholder="请选择题型">
                  <el-option label="物业满意度" value="物业满意度" />
                </el-select> -->
						</div>
						<div style="width: 68%;">
							<el-input v-model="timuMsg" style="width:50%;margin-right: 15px;" placeholder="请输入题目" />
							<el-button style="background-color: #3F9B6A;color: #fff" placeholder="请输入题目"
								@click="tikusous">查询
							</el-button>
							<el-button class="buttonHover"
								style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
								@click="tikuclose">重置
							</el-button>
						</div>
					</div>
					<!-- v-infinite-scroll="load" -->
					<div style="padding:20px;overflow-y: auto;height:495px;">

						<el-table ref="ziyuanData"
							:data="tikuziyuan.slice((currentPageListTi - 1) * pageSizeTi, currentPageListTi * pageSizeTi)"
							:row-key="row => row.id"
							:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"
							tooltip-effect="dark" @selection-change="handleSelectionChange"
							@toggleRowSelection="hangSelchange">
							<el-table-column type="selection" width="55" :reserve-selection="true" />
							<el-table-column label="序号" min-width="100">
								<template slot-scope="scope">
									{{ scope.$index + 1 }}
								</template>
							</el-table-column>
							<el-table-column label="题目" min-width="400" prop="tikuTitle" />
							<el-table-column label="题型" min-width="80" prop="questionType" />
							<el-table-column label="操作" min-width="120">
								<template slot-scope="scope">
									<div class="tableBtn greens" @click="gotimuxiang(scope.row)">详情</div>
								</template>
							</el-table-column>

						</el-table>
						<div style="display: flex;justify-content: space-between;margin-top: 10px;">
							<div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ totalTi }}</span> 条
							</div>
							<el-pagination :current-page="currentPageListTi" :page-sizes="[10, 20, 50, 100]"
								:page-size="pageSizeTi" background small layout="prev, pager, next" :total="totalTi"
								@size-change="handleSizeChangeTi" @current-change="handleCurrentChangeTi" />
						</div>
					</div>
				</div>
				<div style="padding-top:20px;display:flex;justify-content: flex-end;">
					<el-button style="background-color: #3F9B6A;color: #fff" @click="tiSelQue(1)">确定</el-button>
				</div>
			</div>
			<el-dialog :visible.sync="timuXiang" custom-class="tongyong_css" style="padding: 0;" width="50%" center
				:close-on-click-modal="false" append-to-body>
				<div style="padding:20px;">
					<div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div>
					<div>
						<el-descriptions class="margin-top" :column="1" border :label-style="labelStyle"
							:content-style="contentStyle">
							<el-descriptions-item>
								<template slot="label">
									题目
								</template>
								{{ timuData.tikuTitle }}
							</el-descriptions-item>
							<el-descriptions-item>
								<template slot="label">
									题型
								</template>
								{{ timuData.questionType }}
							</el-descriptions-item>
							<el-descriptions-item>
								<template slot="label">
									隶属题库
								</template>
								{{ timuData.questionBank }}
							</el-descriptions-item>
						</el-descriptions>
						<el-descriptions class="margin-top" :column="1" border :label-style="labelStyle"
							:content-style="contentStyle">
							<el-descriptions-item>
								<template slot="label">
									默认是否必填
								</template>
								{{ timuData.isRequired }}
							</el-descriptions-item>
							<el-descriptions-item>
								<template slot="label">
									选项
								</template>
								<div v-for="(value, key) in timuData.optionSettings" :key="key">
									{{ key }}：{{ value }}
								</div>
							</el-descriptions-item>

						</el-descriptions>
					</div>
					<div style="padding-top:20px;display:flex;justify-content: flex-end;">
						<el-button class="buttonHover"
							style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
							@click="timuXiang = false">返回</el-button>
					</div>
				</div>

			</el-dialog>
		</el-dialog>
		<el-dialog :visible.sync="tikuAdd" custom-class="tongyong_css" style="padding: 0;" width="60%" center
			:close-on-click-modal="false" append-to-body @close="quxiao(1)">
			<div style="padding:20px;">
				<div style="font-size: 14px;padding-bottom: 20px;color: #000;">
					新增题目
				</div>
				<div style="padding:20px;">
					<el-form ref="tixform" :model="zhong" :rules="tixrules" label-width="140px">
						<el-form-item label="题目" prop="tikuTitle">
							<el-input v-model="zhong.tikuTitle" maxlength="100" />
						</el-form-item>
						<el-form-item label="题型" prop="questionType">
							<el-select v-model="zhong.questionType" placeholder="请选择">
								<el-option label="单选" value="单选" />
								<el-option label="多选" value="多选" />
								<el-option label="文本" value="文本" />
							</el-select>
						</el-form-item>

						<el-form-item v-if="zhong.questionType == '多选'" label="最多可选" prop="maxChoose">
							<el-input-number v-model="zhong.maxChoose" :min="0" :max="options.length" /> 0为不限制填写数量
						</el-form-item>
						<el-form-item label="隶属题库" prop="questionBank">
							<el-select v-model="zhong.questionBank" placeholder="请选择">
								<el-option label="用户端题库" value="用户端题库" />
								<el-option label="商户端题库" value="商户端题库" />
								<el-option label="公共端题库" value="公共端题库" />
							</el-select>
						</el-form-item>
						<el-form-item label="布局类型" prop="layoutType">
							<el-radio-group v-model="zhong.layoutType" style="margin-top:13px;">
								<el-radio :label="1">垂直布局</el-radio>
								<el-radio :label="2">自由布局</el-radio>
							</el-radio-group>
						</el-form-item>
						<el-form-item label="是否必填" prop="isRequired">
							<!-- <el-select v-model="zhong.isRequired" placeholder="请选择">
                  <el-option label="必填" value="必填" />
                  <el-option label="非必填" value="非必填" />
                </el-select> -->
							<el-radio-group v-model="zhong.isRequired" style="margin-top:13px;">
								<el-radio label="必填">必填</el-radio>
								<el-radio label="非必填">非必填</el-radio>

							</el-radio-group>
						</el-form-item>

						<el-form-item v-if="zhong.questionType != '文本'" label="选项" prop="optionSettings">
							<el-table :data="options"
								:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }">
								<el-table-column prop="index" label="序号" width="180">
									<template #default="scope">
										{{ scope.$index + 1 }}
									</template>
								</el-table-column>
								<el-table-column prop="name" label="选项名称" width="300">
									<template #default="scope">
										<el-input v-model="scope.row.name" :readonly="scope.row.readonly" />
									</template>
								</el-table-column>
								<el-table-column prop="name" label="分数">
									<template #default="scope">
										<el-input v-model.number="scope.row.num" :min="0" :max="100"
											:readonly="scope.row.readonly" @input="validateScore(scope.row)" />
									</template>
								</el-table-column>
								 <el-table-column label=""  min-width="120">
									                    <template #default="{ $index }">
										                      <span
											style="cursor: pointer;margin-right: 5px; color: #3F9B6A;"
											@click="answerMoveUp($index)" v-if="$index != 0">↑</span>
										                      <span style="cursor: pointer; color: #3F9B6A;"
											@click="answerMoveDown($index)"
											v-if="$index != (options.length - 1)">↓</span>
										                    </template>
									                  </el-table-column>
								<el-table-column label="操作">
									<template #default="scope">
										<div class="tableBtn greens" @click="deleteOption(scope.$index)">删除</div>
									</template>
								</el-table-column>
							</el-table>
							<el-button style="width:100%;background-color: #3F9B6A;color: #fff" @click="addOption">+
								添加</el-button>
						</el-form-item>
					</el-form>
				</div>
				<div style="display: flex;justify-content: flex-end;">
					<el-button style="background-color: #3F9B6A;color: #fff" @click="Addtiku(1)">确定
					</el-button>
				</div>
			</div>
		</el-dialog>
		<template #footer>
			<div style="display: flex; justify-content: flex-end; align-items: center;">
				<el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
					@click="closeFn(1)">返回</el-button>
				<el-button style="background-color: #3F9B6A;color: #fff" @click="addCheck(2)">确认</el-button>

			</div>
		</template>
	</el-dialog>
	<!-- 编辑 -->
	<el-dialog :visible.sync="bainjiBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center
		:close-on-click-modal="false" :show-close="false">
		<div style="padding:20px;max-height: calc(100vh - 300px);
  overflow-y: auto;">
			<div style="font-size: 14px;padding-bottom: 20px;color: #000;">编辑问卷</div>
			<div>
				<el-tabs v-model="bianjiTabs" @tab-click="">
					<el-tab-pane label="基本信息" name="first">
						<div style="width: 100%">
							<div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
								<div style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;">
									<div>基本信息</div>
								</div>
								</div>
								<el-form ref="bianform" :model="secondData" :rules="rules" label-width="155px"
									style="padding:20px;">
									<el-form-item label="问卷标题" prop="title">
										<el-input v-model="secondData.title" maxlength="50" />
									</el-form-item>
									<el-form-item label="问卷起止时间">
										<el-date-picker v-model="plan_Time" style="width: 100%;"
											value-format="yyyy-MM-dd" type="daterange" range-separator="至"
											start-placeholder="开始日期" end-placeholder="结束日期" align="right"
											:picker-options="pickerOptions" />
									</el-form-item>
									<el-form-item label="发布端口" prop="publishPort">
										<el-select v-model="secondData.publishPort" placeholder="请选择">
											<el-option label="用户端" value="用户端" />
											<el-option label="商家端" value="商家端" />
											<el-option label="H5端" value="H5端" />
										</el-select>
									</el-form-item>
									<el-form-item label="问卷类型" prop="questionnaireType">
										<el-select v-model="secondData.questionnaireType" placeholder="请选择">
											<el-option label="物业问卷" value="物业问卷" />
											<el-option label="招商问卷" value="招商问卷" />
											<el-option label="满意度问卷" value="满意度问卷" />
											<el-option label="社会调查问卷" value="社会调查问卷" />

										</el-select>
									</el-form-item>
									<el-form-item label="预计填写时长(分钟)" prop="estimatedTime">
										<el-input v-model.number="secondData.estimatedTime" maxlength="1000" />
									</el-form-item>

									<el-form-item label="问卷介绍" prop="remarks">
										<!-- <el-input v-model="secondData.remarks"></el-input> -->
										<wang-editor ref="editor" v-model="secondData.remarks" :height="200" />
									</el-form-item>
									<el-form-item label="填写人" prop="filler">
										<el-select v-model="secondData.filler" placeholder="请选择">
											<!-- <el-option label="会员" value="会员" /> -->
											<el-option label="公众" value="公众" />
										</el-select>
									</el-form-item>
									<el-form-item label="填写条件" prop="fillingConditions">
										<el-radio-group v-model="secondData.fillingConditions" style="margin-top:13px;">
											<el-radio label="可重复填写">可重复填写</el-radio>
											<el-radio label="不可重复填写">不可重复填写</el-radio>
										</el-radio-group>
									</el-form-item>

									<el-form-item label="问卷封面" prop="coverImage">
										<upimg :value="secondData.coverImage" :limit="1" :file-size="1"
											:is-show-tip="false" @input="e => input(e, '2')" />
									</el-form-item>
									<el-form-item label="姓名" prop="needName">
										<el-radio-group v-model="secondData.needName" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="电话" prop="needPhone">
										<el-radio-group v-model="secondData.needPhone" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>
									<el-form-item label="性别" prop="needGender">
										<el-radio-group v-model="secondData.needGender" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>

									<el-form-item label="意见" prop="needOpinion">
										<el-radio-group v-model="secondData.needOpinion" style="margin-top:13px;">
											<el-radio label="必填">必填</el-radio>
											<el-radio label="不填">不填</el-radio>
										</el-radio-group>
									</el-form-item>
								</el-form>
							</div>
							<!-- <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
									<div
										style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;">
										<div>参与答卷奖励</div>
									</div> -->
							<!-- <el-form ref="form" :model="secondData" label-width="140px" style="padding:20px;">
										<el-radio-group v-model="radioreward" @change="radioClick">
											<el-radio label="不设置奖励" value="不设置奖励">不设置奖励</el-radio>
											<el-radio label="转盘抽奖" value="转盘抽奖">转盘抽奖</el-radio>
										</el-radio-group>
										<div v-if="radioreward === '转盘抽奖'" style="padding: 0  0 20px 20px;">
											<div v-if="jiangli.id && jiangli.id!=''" style="padding: 10px 0;">
												<span>{{jiangli.actName}}</span>
												<span style="padding: 0 20px;color: #3F9B6A;cursor: pointer;"
													@click="actGo(1)">查看</span>
												<span style="color: #3F9B6A;cursor: pointer;"
													@click="actGo(2)">编辑</span>
											</div>
											<div v-else>
												<el-button style="color: #fff;background-color: #3F9B6A;"
													@click="actGo(0)">创建活动</el-button>
											</div>


										</div>
									</el-form>
								</div>
							</div> -->
					</el-tab-pane>
					<el-tab-pane label="问卷内容" name="second">
						<div style="width: 100%">
							<div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;">
								<div
									style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;">
									<div>问卷内容</div>
									<div>
										<div class="greens tableBtn" @click="tikuAdd = true">新增</div>
										<div class="greens tableBtn" @click="selTiku">从题库中选择</div>
									</div>

								</div>

								<div style="padding:20px;">
									<el-table :data="secondDataTi"
										:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"
										class="xddTable">
										<el-table-column label="序号" min-width="100">
											<template slot-scope="scope">
												{{ scope.$index + 1 }}
											</template>
										</el-table-column>
										<el-table-column label="题目" min-width="150" prop="tikuTitle"
											show-overflow-tooltip />
										<el-table-column label="题型" min-width="80" prop="questionType" />
										<el-table-column label="是否必填" prop="isRequired" min-width="120" />
										<el-table-column label="" min-width="120">
											<template #default="scope">
												<span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;"
													@click="moveUp2(scope.$index)" v-if="scope.$index != 0">↑</span>
												<span style="cursor: pointer; color: #3F9B6A;"
													@click="moveDown2(scope.$index)"
													v-if="scope.$index != (secondDataTi.length - 1)">↓</span>
											</template>
										</el-table-column>
										<el-table-column label="操作" min-width="80">
											<template slot-scope="scope">
												<div class="tableBtn greens" @click="delWenCon('2', scope.$index)">
													删除</div>
											</template>
										</el-table-column>
									</el-table>
								</div>
							</div>
						</div>
					</el-tab-pane>

				</el-tabs>
			</div>

		</div>
		<el-dialog :visible.sync="tikuBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center
			:close-on-click-modal="false" append-to-body @close="tikuquxiao(2)">
			<div style="padding:20px;">

				<div style="padding:20px;">
					<div style="display: flex;justify-content: space-between;margin-bottom: 20px;">
						<div>
							从题库中选择
							<el-select v-model="tikuNie" style="width:28%;margin-right: 15px;" @change="tikuchange">
								<el-option label="用户端题库" value="用户端题库" />
								<el-option label="商户端题库" value="商户端题库" />
								<el-option label="公共端题库" value="公共端题库" />
							</el-select>
							<el-select v-model="danxuan" style="width:28%;margin-right: 15px;" placeholder="请选择题型">
								<el-option label="单选" value="单选" />
								<el-option label="多选" value="多选" />
								<el-option label="文本" value="文本" />
							</el-select>

						</div>

						<div style="width: 68%;">
							<el-input v-model="timuMsg" style="width:50%;margin-right: 15px;" />
							<el-button style="background-color: #3F9B6A;color: #fff" @click="tikusous">查询
							</el-button>
							<el-button class="buttonHover"
								style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
								@click="tikuclose">重置
							</el-button>
						</div>
					</div>
					<div style="padding:20px;overflow-y: auto;height:495px">

						<el-table ref="ziyuanData"
							:data="tikuziyuan.slice((currentPageListTi - 1) * pageSizeTi, currentPageListTi * pageSizeTi)"
							:row-key="row => row.id"
							:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"
							tooltip-effect="dark" @selection-change="handleSelectionChange"
							@toggleRowSelection="hangSelchange">
							<el-table-column type="selection" width="55" :reserve-selection="true" />
							<el-table-column label="序号" min-width="100">
								<template slot-scope="scope">
									{{ scope.$index + 1 }}
								</template>
							</el-table-column>
							<el-table-column label="题目" min-width="400" prop="tikuTitle" show-overflow-tooltip />
							<el-table-column label="题型" min-width="80" prop="questionType" />
							<el-table-column label="操作" min-width="120">
								<template slot-scope="scope">
									<div class="tableBtn greens" @click="gotimuxiang(scope.row)">详情</div>
								</template>
							</el-table-column>
						</el-table>
						<div style="display: flex;justify-content: space-between;margin-top: 10px;">
							<div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ totalTi }}</span> 条
							</div>
							<el-pagination :current-page="currentPageListTi" :page-sizes="[10, 20, 50, 100]"
								:page-size="pageSizeTi" background small layout="prev, pager, next" :total="totalTi"
								@size-change="handleSizeChangeTi" @current-change="handleCurrentChangeTi" />
						</div>
					</div>

				</div>
				<div style="padding-top:20px;display:flex;justify-content: flex-end;">
					<el-button style="background-color: #3F9B6A;color: #fff" @click="tiSelQue(2)">确定</el-button>
				</div>
			</div>
			<el-dialog :visible.sync="timuXiang" custom-class="tongyong_css" style="padding: 0;" width="50%" center
				:close-on-click-modal="false" append-to-body>
				<div style="padding:20px;">
					<div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div>
					<div>
						<el-descriptions class="margin-top" :column="1" border :label-style="labelStyle"
							:content-style="contentStyle">
							<el-descriptions-item>
								<template slot="label">
									题目
								</template>
								{{ timuData.tikuTitle }}
							</el-descriptions-item>
							<el-descriptions-item>
								<template slot="label">
									题型
								</template>
								{{ timuData.questionType }}
							</el-descriptions-item>
							<el-descriptions-item>
								<template slot="label">
									隶属题库
								</template>
								{{ timuData.questionBank }}
							</el-descriptions-item>
						</el-descriptions>
						<el-descriptions class="margin-top" :column="1" border :label-style="labelStyle"
							:content-style="contentStyle">
							<el-descriptions-item>
								<template slot="label">
									默认是否必填
								</template>
								{{ timuData.isRequired }}
							</el-descriptions-item>

							<el-descriptions-item>
								<template slot="label">
									选项
								</template>
								<div v-for="(value, key) in timuData.optionSettings" :key="key">
									{{ key }}：{{ value }}
								</div>
							</el-descriptions-item>

						</el-descriptions>
					</div>
					<div style="padding-top:20px;display:flex;justify-content: flex-end;">
						<el-button class="buttonHover"
							style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
							@click="timuXiang = false">返回</el-button>
					</div>
				</div>

			</el-dialog>
		</el-dialog>
		<el-dialog :visible.sync="tikuAdd" custom-class="tongyong_css" style="padding: 0;" width="60%" center
			:close-on-click-modal="false" append-to-body @close="quxiao(2)">
			<div style="padding:20px;">
				<div style="font-size: 14px;padding-bottom: 20px;color: #000;">
					新增题目
				</div>
				<div style="padding:20px;">
					<el-form ref="tixform" :model="zhong" :rules="tixrules" label-width="140px">
						<el-form-item label="题目">
							<el-input v-model="zhong.tikuTitle" maxlength="100" />
						</el-form-item>
						<el-form-item label="题型">
							<el-select v-model="zhong.questionType" placeholder="请选择">
								<el-option label="单选" value="单选" />
								<el-option label="多选" value="多选" />
								<el-option label="文本" value="文本" />
							</el-select>
						</el-form-item>
						<el-form-item v-if="zhong.questionType == '多选'" label="最多可选" prop="maxChoose">
							<el-input-number v-model="zhong.maxChoose" :min="0" :max="options.length" /> 0为不限制填写数量
						</el-form-item>
						<el-form-item label="隶属题库">
							<el-select v-model="zhong.questionBank" placeholder="请选择">
								<el-option label="用户端题库" value="用户端题库" />
								<el-option label="商户端题库" value="商户端题库" />
								<el-option label="公共端题库" value="公共端题库" />
							</el-select>
						</el-form-item>
						<el-form-item label="布局类型">
							<el-radio-group v-model="zhong.layoutType" style="margin-top:13px;">
								<el-radio :label="1">垂直布局</el-radio>
								<el-radio :label="2">自由布局</el-radio>
							</el-radio-group>
						</el-form-item>
						<el-form-item label="是否必填">
							<el-radio-group v-model="zhong.isRequired" style="margin-top:13px;">
								<el-radio label="必填">必填</el-radio>
								<el-radio label="非必填">非必填</el-radio>
							</el-radio-group>
						</el-form-item>
						<el-form-item v-if="zhong.questionType != '文本'" label="选项" prop="optionSettings">
							<el-table :data="options"
								:header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }">
								<el-table-column prop="index" label="序号" width="180">
									<template #default="scope">
										{{ scope.$index + 1 }}
									</template>
								</el-table-column>
								<el-table-column prop="name" label="选项名称" width="300">
									<template #default="scope">
										<el-input v-model="scope.row.name" :readonly="scope.row.readonly"
											maxlength="50" />
									</template>
								</el-table-column>
								<el-table-column prop="name" label="分数">
									<template #default="scope">
										<el-input v-model.number="scope.row.num" :min="0" :max="100"
											:readonly="scope.row.readonly" @input="validateScore(scope.row)" />
									</template>
								</el-table-column>
								<el-table-column label=""  min-width="120">
									<template #default="{ $index }">
										<span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;"
											@click="answerMoveUp($index)" v-if="$index != 0">↑</span>
										<span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)"
											v-if="$index != (options.length - 1)">↓</span>
									</template>
								</el-table-column>
								<el-table-column label="操作">
									<template #default="scope">
										<div class="tableBtn greens" @click="deleteOption(scope.$index)">删除</div>
									</template>
								</el-table-column>
							</el-table>
							<el-button style="width:100%;background-color: #3F9B6A;color: #fff" @click="addOption">+
								添加</el-button>
						</el-form-item>
					</el-form>
				</div>
				<div style="display: flex;justify-content: flex-end;">
					<el-button style="background-color: #3F9B6A;color: #fff" @click="Addtiku(2)">确定
					</el-button>
				</div>
			</div>
		</el-dialog>
		<template #footer>
			<div style="display: flex; justify-content: flex-end; align-items: center;">
				<el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
					@click="closeFn(2)">返回</el-button>
				<el-button style="background-color: #3F9B6A;color: #fff" @click="bianCheck">确认</el-button>
			</div>
		</template>
	</el-dialog>

	<!-- 禁用 -->

	<el-dialog :visible.sync="downShow" custom-class="tongyong_css" style="padding: 0;" width="50%" center
		:close-on-click-modal="false" append-to-body>
		<div style="padding:20px;">
			<div style="font-size: 14px;padding-bottom: 20px;color: #000;">禁用</div>
			<div style="padding:30px 0px  0px">
				<el-form ref="opinionForm" :model="opinionDel" :rules="pinForm" label-width="120px"
					style="position: relative">
					<el-form-item label="禁用原因" class="grid-content bg-purple" prop="name">
						<el-input v-model="opinionDel.opinionDelisting" type="textarea" placeholder="请输入禁用原因" />
					</el-form-item>

				</el-form>
			</div>
			<div style="display:flex;justify-content: flex-end;padding:20px;">
				<el-button style="background-color: #3F9B6A;color: #fff;" @click="downShow = false">取消</el-button>
				<el-button style="background-color: #3F9B6A;color: #fff;" @click="downShowCheck">确定</el-button>
			</div>
		</div>
	</el-dialog>
	<el-dialog :visible.sync="yulanShow" custom-class="tongyong_css" style="padding: 0;" width="43%" center
		:close-on-click-modal="false" append-to-body>
		<div style="padding:20px;">
			<div style="font-size: 14px;padding-bottom: 20px;color: #000;">预览</div>
			<div style="margin:auto;width:50%;height:600px;overflow-y: auto;overflow-x: hidden;">
				<div style="padding:20px;background-color: #f6f6f6;">
					<div>
						<h2 style="color: #000;text-align:center">{{ secondData.title }}</h2>

						<div class="" style="padding: 10px 0;">
							<img :src="this.$hostUrl + secondData.coverImage"
								style="width:100%;border-radius: 10px;"></img>
						</div>
					</div>
					<div style="padding: 15px;background-color: #fff;border-radius: 10px;">
						<div v-html="secondData.remarks">

							<!-- <div>
                  <div style="display:flex;padding:10px 0;justify-content: space-between;">
                    <div style="display:flex;">

                      {{secondData.createUser}}
                    </div>
                    <div>
                      {{secondData.createTime}}
                    </div>
                  </div>
                </div> -->
						</div>
					</div>
					<div v-for="(item, index) in secondData.question" class="question">
						<p class="question-title">
							<span v-if="item.required == '必填'" style="color: red;">*</span>
							{{ index }}.<span style="">({{ item.type }})</span>
							{{ item.title }}
						</p>
						<div>


							<el-radio-group v-for="(val, idx) in item.options"
								v-if="item.type == '单选' && item.layoutType != 2" :key="idx"
								style="display: content;flex-direction: column;width:100%;margin:0 0 4px 0">
								<el-radio disabled>
									<snap style=" white-space: normal !important;
  word-break: break-all !important;">
										{{ val.answer }}
									</snap>
								</el-radio>

							</el-radio-group>
							<div v-if="item.type == '单选' && item.layoutType == 2"
								style="display: flex;width: 100%;flex-wrap: wrap;">
								<div class="answerItem" v-for="(val, idx) in item.options" :key="idx">
									{{ val.answer }}
								</div>
							</div>
							<el-checkbox-group v-for="(val, idx) in item.options"
								v-if="item.type == '多选' && item.layoutType != 2" :key="idx"
								style="display: content;flex-direction: column;width:100%;margin:0 0 4px 0">
								<el-checkbox disabled>
									<snap style=" white-space: normal !important;
  word-break: break-all !important;">
										{{ val.answer }}
									</snap>
								</el-checkbox>
							</el-checkbox-group>

							<div v-if="item.type == '多选' && item.layoutType == 2"
								style="display: flex;width: 100%;flex-wrap: wrap;">
								<div class="answerItem" v-for="(val, idx) in item.options" :key="idx">
									{{ val.answer }}
								</div>
							</div>
							<div v-if="item.type == '文本'">
								<el-input v-model="model1.name" placeholder="请输入" disabled style="width:80%" />

							</div>
						</div>
					</div>
					<!-- <div class="question" v-for="(item,index) in secondData.cereQuestionManagements">
              <p class="question-title"><span v-if="item.isRequired.includes('必填')"
                  style="color: red;">*</span>{{index + 1}}.<span style="">({{item.questionType}})</span>
                  {{item.tikuTitle}}
              </p>
              <div>

                <el-radio-group v-for="(val, idx) in item.optionSettings" v-if="item.questionType =='单选'" :key="idx"
                  style="display: flex;flex-direction: column;">
                  <el-radio disabled>{{val}}</el-radio>

                </el-radio-group>
                <el-checkbox-group v-for="(val, idx) in item.optionSettings" v-if="item.questionType =='多选'" :key="idx"
                  style="display: flex;flex-direction: column;">
                  <el-checkbox :label="val" disabled></el-checkbox>
                </el-checkbox-group>
                <div  v-if="item.questionType =='文本'" >
                  <el-input v-model="model1.name" placeholder="请输入" disabled style="width:80%"></el-input>

                </div>
              </div>
            </div> -->

					<!-- 文本填写问题 -->
					<div class="">
						<!--    <p class="question-title">您的建议：</p >
                 <textarea v-model="suggestion"></textarea> -->
						<el-form label-position="right" :model="model1"
							style="background-color:#fff;border-radius: 10px;">
							<el-form-item v-if="secondData.needName == '必填'" label="姓名" prop="name"
								style="padding:10px 10px 0 10px;">
								<el-input v-model="model1.name" placeholder="请输入姓名" disabled style="width:80%" />
							</el-form-item>
							<el-form-item v-if="secondData.needPhone == '必填'" label="电话" prop="phone"
								style="padding: 0 10px;">
								<el-input v-model="model1.phone" placeholder="请输入电话" disabled style="width:80%" />
							</el-form-item>
							<el-form-item v-if="secondData.needGender == '必填'" label="性别" prop="sex"
								style="padding: 0 10px ;">
								<el-input v-model="model1.sex" placeholder="请输入性别" disabled style="width:80%" />
							</el-form-item>
							<el-form-item v-if="secondData.needOpinion == '必填'" label="意见" prop="yij"
								style="padding:0 10px 10px 10px;">
								<el-input v-model="model1.yij" type="textarea" placeholder="请输入内容" disabled
									style="width:80%" />
							</el-form-item>
						</el-form>

					</div>

					<el-button style="background-color: #3F9B6A;color: #fff;width:100%">提交问卷</el-button>
				</div>
			</div>
			<!-- <div style="padding:30px 0px  0px" v-if="secondData.reviewStatus == '3'"> -->
			<div style="padding:30px 0px  0px">
				问卷作答地址：{{ wenjuanUrl }} <span style="color:#3F9B6A" @click="copyUrl(wenjuanUrl)">复制</span>
			</div>
			<div style="display:flex;justify-content: flex-end;padding:20px;">
				<el-button style="background-color: #3F9B6A;color: #fff;" @click="yulanShow = false">取消</el-button>

			</div>
		</div>
	</el-dialog>

	</div>

</template>

<script>
	import {
		async
	} from 'q'
	import Vue from 'vue'
	import axios from 'axios'
	import DynamicChartTable from '@/components/dajuanTongji/index.vue'
	import tiaoxing from '@/components/dajuanTongji/tiaoxing.vue'
	import wangEditor from '@/components/editor/index';
	import {
		TerminaGetAll,
		TerminaAdd,
		TerminaEdit,
		TerminaDel,
		QuestionGetAll,
		QuestionAdd,
	} from '../../api/investigation.js'
	import upimg from '@/components/ImageUpload/index'
	export default {
		components: {
			upimg,
			DynamicChartTable,
			tiaoxing,
			wangEditor
		},
		data() {
			return {

				tableHeight: 600, // 设置为你想要的表格高度，单位是像素
				rid: '男',
				checkList: ['服务态度差'],
				chartTitle: '题目',
				chartOptions: {},
				listOne: [],
				listTwo: [],
				listThree: [],

				hetongBox: false,
				detbox: false, // 详情
				leixing: true, // 切换
				index: 1,
				currentPage: 1,
				total: 0,
				flag: false,
				flag1: false,
				currentPage1: 1,
				total1: 0,
				pageSize: 10,
				totalTi: 0,
				currentPageListTi: 1,
				pageSizeTi: 10,
				ggXin: false,
				formInline: {
					createUser: '',
					title: '',
					startDate: '',
					endDate: '',
					publishPort: '',
					questionnaireType: '',
					estimatedTime: null,
					remarks: '',
					filler: '',
					fillingConditions: '可重复填写',
					coverImage: '',
					rewardForParticipation: '',
					questionId: '',
					responseStatus: '',
					reviewStatus: '1',
					needName: '必填',
					needPhone: '必填',
					needGender: '必填',
					needOpinion: '必填',
				},
				Xin_Time: [],
				plan_Time: [],
				followUpTime: [],
				tableData: [],
				secondData: {},
				formSel: {
					title: '',
					questionnaireType: '',
					reviewStatus: '',
					pageNumber: 0,
					pageSize: 10,
				},
				pageindex: {
					pageNumber: 0,
					pageSize: 10,
				},
				bianjiBox: 1,
				chengeTatle: 1,
				zhong: {
					tikuTitle: '',
					questionType: '',
					questionBank: '用户端题库',
					layoutType: 1,
					maxChoose: 0,
					isRequired: '必填',
					questionDescription: '',
					optionSettings: {},
				},
				detaiList: {},
				xiangTabs: 'first',
				bianjiTabs: 'first',
				tongjiTabs: 'qingK',
				bainjiBox: false,
				radioValue: 'A', // 参与答卷奖励
				jifen: '', // 积分奖励
				choujiang: '', // 转盘抽奖
				yhq: [], // 优惠券确定
				yhqSel: [], // 优惠券选择
				tikuBox: false, // 选择题库框
				tikuNie: '用户端题库',
				danxuan: '',
				manyi: '',
				timuMsg: '', // 题目搜索
				options: [
					// { index: 1, name: '男', readonly: true },
					//      { index: 2, name: '女', readonly: true }
				],
				tikuAdd: false, // 新增题目
				tongjiBox: false, // 统计
				daxiangData: {},
				daxiangBox: false,
				wenData: [],
				wenConstData: [],
				tikuziyuan: [], // 题目资源
				secondDataTi: [], // 详情题库
				labelStyle: {
					width: '250px'
				},
				contentStyle: {
					width: '246px'
				},
				labelStylejiang: {
					width: '180px'
				},
				contentStylejiang: {
					width: '300px'
				},
				timuXiang: false,
				timuData: {},
				multipleSelection: [],
				xuanzheData: [],
				rules: {
					title: [{
						required: true,
						message: '请输入问卷标题',
						trigger: 'blur'
					}],
					startDate: [{
						required: true,
						message: '请选择问卷起止时间',
						trigger: 'change'
					}],
					publishPort: [{
						required: true,
						message: '请选择发布端口',
						trigger: 'change'
					}],
					questionnaireType: [{
						required: true,
						message: '请选择问卷类型',
						trigger: 'change'
					}],
					estimatedTime: [{
							required: true,
							message: '请输入预计填写时长'
						},
						{
							type: 'number',
							message: '必须为数字值'
						},
						{
							validator: (rule, value, callback) => {
								if (value <= 0) {
									callback(new Error('预计填写时长必须大于0'));
								} else {
									callback();
								}
							}
						}
					],

					filler: [{
						required: true,
						message: '请选择填写人',
						trigger: 'change'
					}],
					fillingConditions: [{
						required: true,
						message: '请选择填写条件',
						trigger: 'change'
					}],
					coverImage: [{
						required: true,
						message: '请上传问卷封面',
						trigger: 'change'
					}],
					createUser: [{
						required: true,
						message: '请输入创建人',
						trigger: 'blur'
					}, ],
				},

				tixrules: {
					tikuTitle: [{
						required: true,
						message: '请输入题目',
						trigger: 'blur'
					}, ],
					questionType: [{
						required: true,
						message: '请选择题型',
						trigger: 'change'
					}],
					questionBank: [{
						required: true,
						message: '请选择所属题库',
						trigger: 'change'
					}],
					optionSettings: [{
						required: true,
						message: '请设置答案',
						trigger: 'change'
					}],

				},
				pinForm: {
					opinionDelisting: [{
						required: true,
						message: '请输入禁用原因',
						trigger: 'blur'
					}]
				},
				xiajiaId: '',
				downShow: false,
				opinionDel: {
					opinionDelisting: ''
				},
				yulanShow: false,
				wenjuanUrl: '',
				model1: {},
				tongjiSshu: [],
				tongjiTu: {},
				daanDui: [],
				tuwent: [],

				tongjiMsg: {
					plan_Time: [],
					userName: '',
					pageNumber: 0,
					pageSize: 10,
				},
				tiNum: 0,
				isbutton: false,
				currentPageList: 1,
				pickerOptions: {
					disabledDate(time) {
						return time.getTime() < Date.now() - 8.64e7; // 禁用当前时间之前的日期
					}
				},
				loading: false,
				shujuloading: false,
				iframeWin: null,
				radioreward: '不设置奖励'
			}
		},
		computed: {

		},
		created() {
			this.getAll()
		},
		mounted() {
			// this.iframeWin = this.$refs.iframe.contentWindow
		},
		methods: {
			input(e, e1) {
				// this.formInline[e1] = e

				if (e1 == '1') {
					this.formInline.coverImage = e
				} else {
					this.secondData.coverImage = e
				}


			},
			chenge(val) {
				this.formSel = {
					title: '',
					questionnaireType: '',
					reviewStatus: '',
					pageNumber: 0,
					pageSize: 10,
				}
				this.leixing = !this.leixing
				this.chengeTatle = val
			},
			async getAll() {
				const res = await TerminaGetAll(this.pageindex)
				this.tableData = res.data.content
				this.total = res.data.totalElements
			},

			// 新增确定按钮
			addCheck(val) {
				this.$refs.inlineform.validate((valid) => {
					if (valid) {
						if (this.Xin_Time != null) {
							this.formInline.startDate = this.Xin_Time[0]
							this.formInline.endDate = this.Xin_Time[1]
						} else {
							this.$message({
								message: '请选择问卷时间',
							})
							return false;
						}
						let ids = null
						if (this.wenConstData.length != 0) {
							ids = this.wenConstData.map(item => item.id);
							this.formInline.questionId = ids.join(',')
						} else {
							this.$message({
								message: '请选择问题',
							})
							return false;
						}
						this.formInline.createTime = this.currentTime()
						TerminaAdd(this.formInline).then(res => {
							if (res.data.code == '500') {
								this.$message({
									message: res.data.message,
									type: 'error'
								})
							} else {
								this.$message({
									message: '保存成功',
									type: 'success'
								})
								this.ggXin = false
								this.getAll()
								this.$refs.inlineform.resetFields()
								this.$refs.ziyuanData.clearSelection();
								this.multipleSelection = []
							}
						})
					} else {
						this.$message({
							message: '请填写完整信息',
							type: 'error'
						})
						return false;
					}
				})
			},
			// 获取时间
			currentTime() {
				const date = new Date();
				const year = date.getFullYear();
				let month = date.getMonth() + 1; // 月份从0~11，所以加一
				let day = date.getDate();
				let hours = date.getHours();
				let minutes = date.getMinutes();
				let seconds = date.getSeconds();

				// 为月、日、小时、分钟和秒添加前导零（如果需要）
				month = month < 10 ? '0' + month : month;
				day = day < 10 ? '0' + day : day;
				hours = hours < 10 ? '0' + hours : hours;
				minutes = minutes < 10 ? '0' + minutes : minutes;
				seconds = seconds < 10 ? '0' + seconds : seconds;

				// 返回格式化的日期和时间字符串
				return `${year}-${month}-${day} ${hours}:${minutes}`;
			},
			objectToArray(obj) {
				return Object.keys(obj).map(key => {
					const item = obj[key];
					return {
						id: key,
						...item
					}
				})
			},

			// 详情
			details(val, item) {
				this.detbox = true
				this.secondData = item
				if (typeof item.question === 'string') {
					item.question = JSON.parse(item.question)
				}
				const array = this.objectToArray(item.question)
				this.wenData = array
				// this.secondData.cereQuestionManagements.map((res, index) => {
				//   if (typeof res.optionSettings == 'string') {
				//     res.optionSettings = JSON.parse(res.optionSettings)

				//   }
				// })
			},

			addbuss(val, item) {
				this.index = val
				this.detbox = false
				this.ggXin = true
			},

			handleCurrentChange1(val) {
				this.tongjiMsg.pageNumber = val - 1
				if (this.tongjiMsg.plan_Time.length > 0) {
					this.tongjiMsg.createTime = this.tongjiMsg.plan_Time[0]
				}
				this.tongjiMsg.questionnaireId = this.secondData.id
				axios.post(`${this.$API}/cereQuestionnaireAnswering/queryByPage`, this.tongjiMsg)
					.then(
						response => {
							this.tongjiSshu = response.data.data.content
							this.total1 = response.data.data.totalElements
						})
			},
			handleSizeChange(val) {
				this.pageSize = val
			},
			handleCurrentChange(val) {
				this.pageindex = {
					pageNumber: val - 1,
					pageSize: 10,
				}

				TerminaGetAll(this.pageindex).then(res => {
					this.tableData = res.data.content
				})
			},
			handleSizeChangeTi(val) {
				this.pageSizeTi = val
			},
			async handleCurrentChangeTi(val) {
				const pageindex = {
					pageNumber: val - 1,
					pageSize: 10,
					questionBank: this.tikuNie,
					questionType: this.danxuan,
					tikuTitle: this.timuMsg,
				}
				const tiku = await QuestionGetAll(pageindex)
				this.tikuziyuan = tiku.data.content
				this.totalTi = tiku.data.totalElements
				// TerminaGetAll(this.pageindex).then(res => {
				//   this.tableData = res.data.content
				// })
			},
			closeFn(val) {
				this.bianjiTabs = 'first'
				this.xiangTabs = 'first'
				this.bianjiBox = 1
				if (val == 1) {
					this.$refs.inlineform.resetFields()
					this.ggXin = false
				} else {
					this.$refs.bianform.resetFields()
					this.bainjiBox = false
				}
			},
			// 详情编辑
			async bianji() {
				if (this.bianjiBox == 1) {
					this.bianjiBox = 2
				} else {
					this.bianjiBox = 1

					const formList = {}
					const res = await TerminaEdit(formList)

					this.detbox = false
				}
			},
			// 查看合同
			lookHetong(val) {
				this.hetongBox = true
			},
			// 查询按钮
			async onSubmit() {
				this.isbutton = true;
				const res = await TerminaGetAll(this.formSel)
				this.tableData = res.data.content
				this.total = res.data.totalElements
				this.isbutton = false;
			},
			// 重置按钮
			resetting() {
				this.formSel = {
						title: '',
						questionnaireType: '',
						reviewStatus: '',
						pageNumber: 0,
						pageSize: 10,
					},
					this.currentPageList = 1
				this.pageindex.pageNumber = 0
				this.getAll()
			},
			radioClick(value) {
				if (value === '不设置奖励') {
					this.jifen = '' // 积分奖励
					this.choujiang = '' // 转盘抽奖
					this.yhq = [] // 优惠券确定
				} else if (value === '奖励积分') {
					this.choujiang = '' // 转盘抽奖
					this.yhq = [] // 优惠券确定
				} else if (value === '转盘抽奖') {
					this.jifen = ''
					this.yhq = []
				} else if (value === '优惠券') {
					this.jifen = '' // 积分奖励
					this.choujiang = '' // 转盘抽奖
				}
			},
			async selTiku() {
				this.tiNum = 0
				// this.zhong = {
				//   tikuTitle:'',
				//          questionType:'',
				//          questionBank:'用户端题库',
				//          isRequired:'',
				//          questionDescription:'',
				//          optionSettings:{},
				// }
				this.tikuNie = '用户端题库'
				this.tikuBox = true
				const page = {
					pageNumber: 0,
					pageSize: 10,
					questionBank: '用户端题库',
				}

				const tiku = await QuestionGetAll(page)
				this.tikuziyuan = tiku.data.content
				this.totalTi = tiku.data.totalElements
			},
			addOption() {
				const newOption = {
					index: this.options.length + 1,
					name: '',
					readonly: false
				};
				this.options.push(newOption);
			},
			deleteOption(index) {
				this.options.splice(index, 1);
			},
			bianls(item) {
				this.secondData = item
				Vue.set(this.plan_Time, 0, this.secondData.startDate)
				Vue.set(this.plan_Time, 1, this.secondData.endDate)
				if (typeof item.question === 'string') {
					item.question = JSON.parse(item.question)
				}
				if (item.rewardForParticipation != '') {
					this.radioreward = '转盘抽奖'
				} else {
					this.radioreward = '不设置奖励'
				}
				this.secondDataTi = item.cereQuestionManagements
				this.bainjiBox = true

			},
			bianCheck() {
				if (this.secondData && this.secondData.cereQuestionManagements) {
					delete this.secondData.cereQuestionManagements;
				}

				if (typeof this.secondData.question != 'string') {
					this.secondData.question = JSON.stringify(this.secondData.question)
				}

				if (this.plan_Time.length != 0) {
					this.secondData.startDate = this.plan_Time[0]
					this.secondData.endDate = this.plan_Time[1]
				}

				let ids = []
				if (this.secondDataTi.length != 0) {
					ids = this.secondDataTi.map(item => item.id);
				}

				this.secondData.questionId = ids.join(',')
				this.secondData.updateTime = this.currentTime()

				TerminaEdit(this.secondData).then(res => {
					this.getAll()
					this.bainjiBox = false
				})
			},
			tongji(item) {
				this.tongjiSshu = []
				this.tongjiTu = {}
				this.total1 = 0
				this.tongjiTabs = 'qingK'
				this.tongjiMsg = {
					plan_Time: [],
					userName: '',
					pageNumber: 0,
					pageSize: 10,

				}

				var that = this;
				this.secondData = item
				this.secondData.cereQuestionManagements.map((res, index) => {
					if (typeof res.optionSettings === 'string') {
						res.optionSettings = JSON.parse(res.optionSettings)
					}
					this.secondData.cereQuestionManagements[index].ziduan = []
				})

				const postList = {
					pageNumber: 0,
					pageSize: 10,
					questionnaireId: item.id,
				}

				this.tongjiBox = true
				this.loading = true

				axios.post(`${this.$API}/cereQuestionnaireAnswering/queryByPage`, postList).then(
					response => {
						if (response.data.code == '200') {
							this.loading = false
							this.tongjiSshu = response.data.data.content
							this.total1 = response.data.data.totalElements
						}
					}).catch(err => {
					this.loading = false
					this.$message({
						message: '网络不好,请稍后再试',
						type: 'error'
					})
				})
			},
			tongjiClick(tab, event) {

				if (tab.index == '1') {
					this.shujuloading = true
					const postData = {
						questionnaireId: this.secondData.id
					}
					axios.post(`${this.$API}/cereQuestionnaireAnswering/statistics`, postData).then(
						response => {
							if (Object.keys(response.data.data).length === 0) {
								this.shujuloading = false
								this.$message({
									message: '数据还在统计中，请稍后再试',
									type: 'success'
								})

								return
							}
							this.shujuloading = false
							const obj = response.data.data

							this.tongjiTu = obj
							var tuwent = [];
							var tlist = [];
							if (typeof response.data.data.cereQuestionnaireTable.question === 'string') {
								this.tuwent = JSON.parse(response.data.data.cereQuestionnaireTable.question)
							}
							var that = this;

							this.$nextTick(function() {
								try {
									if (that.tuwent) {
										for (var i in that.tuwent) {
											try {
												that.$refs['chat' + i][0].init(obj)
											} catch (e) {
												console.error('chat  refs init error', e);
											}
										}
									} else {
										console.log('tuwent is null', that.tuwent)
									}
								} catch (e) {
									console.error('chat error', e);
								}
							});
							// this.tuwent = tlist;

							// this.tuwent = Object.values(this.tuwent).filter(res => res.type !== '文本');
						}).catch(err => {
						this.shujuloading = false
						this.$message({
							message: '网络不好,请稍后再试',
							type: 'error'
						})
					})
				}
			},
			xuanxiang(obj) {
				const result = [];

				for (const key in obj) {
					if (obj.hasOwnProperty(key)) {
						const item = obj[key];
						const [type, titleAndOptions] = item.split('$');

						const [isRequired, options] = titleAndOptions.split('#');

						const [title, values] = options.split(':');

						const [optionsPart, valuesPart] = values.split('>');

						const optionArray = optionsPart.split('^').map(part => part.split('|')[1]);

						const valueArray = valuesPart ? valuesPart.split('^').map(part => part.split('|')[1]) : [];

						result.push({
							type: type.trim(),
							ispu: isRequired.trim(),
							timu: title.trim(),
							xuanxiang: optionArray,
							xuanval: valueArray
						});
					}
				}

				return result;
			},
			daxiang(item) {
				this.daxiangData = item

				const selectoptions = null

				if (typeof this.daxiangData.question === 'string') {
					this.daxiangData.question = JSON.parse(this.daxiangData.question)
				}


				for (let key in this.daxiangData.question) {

					if (this.daxiangData.question[key].type == '单选') {

						if (Array.isArray(this.daxiangData.question[key].choose)) {
							this.daxiangData.question[key].choose = this.daxiangData.question[key].choose.join(',')

						}
					}
					if (this.daxiangData.question[key].type == '文本') {
						this.daxiangData.question[key].choose = this.daxiangData.question[key].choose[0]
					}
				}

				//    this.daxiangData.question = this.xuanxiang(question)

				// for (const key in  this.daxiangData.question) {
				//     if(this.daxiangData.question[key].type=='多选' && typeof this.daxiangData.question[key] =='string'){
				//         this.daxiangData.question[key].choose = this.daxiangData.question[key].choose.split(",")
				//     }
				// }

				this.secondData.cereQuestionManagements.map((res, index) => {
					if (this.daanDui[index]) {
						const obj = this.daanDui[index].split(',')
						res.ziduan = obj
					}
				})

				this.daxiangBox = true
			},

			// 新增题库
			Addtiku(val) {
				const that = this

				if (this.zhong.tikuTitle == '') {
					this.$message({
						message: '请输入题目',
					})
					return;
				}
				if (this.zhong.questionType == '') {
					this.$message({
						message: '请选择题型',
					})
					return;
				}
				if (this.zhong.questionType != '文本' && this.options.length == 0) {
					this.$message({
						message: '请添加答案选项',
					})
					return;
				}
				for (let i = 0; i < this.options.length; i++) {
					if (this.options[i].name == '') {
						this.$message({
							message: '答案选项不能为空',
						})
						return
					}
				}
				let accumulator = {}
				let fenshu = {}
				this.options.forEach((item, index) => {
					accumulator[index] = item.name
					fenshu[index] = Number(item.num) || 0
				})
				// this.zhong.optionSettings = this.options.reduce((accumulator, current) => {
				//   accumulator[current.index] = current.name;
				//   return accumulator;
				// }, {}) // 初始化累加器为空对象

				// this.zhong.score = this.options.reduce((accumulator, current) => {
				//   accumulator[current.index] = Number(current.num);
				//   return accumulator;
				// }, {}) // 初始化累加器为空对象
				this.zhong.optionSettings = JSON.stringify(accumulator)
				this.zhong.score = JSON.stringify(fenshu)

				// this.zhong.optionSettings = JSON.stringify(this.zhong.optionSettings)
				// this.zhong.score = JSON.stringify(this.zhong.score)
				this.zhong.createDate = this.currentTime()

				QuestionAdd(this.zhong).then((res) => {
					if (val == 1) {

						that.wenConstData.push(res.data)

					} else {
						that.secondDataTi.push(res.data)
					}
					this.$message({
						message: '保存成功',
						type: 'success'
					})
					this.getAll()
					this.options = []

					this.multipleSelection = []
					this.tikuAdd = false
				})
			},
			// 题库切换选择
			async tikuchange(val) {
				const page = {
					pageNumber: 0,
					pageSize: 10,
					questionBank: val,
				}
				const tiku = await QuestionGetAll(page)
				this.tikuziyuan = tiku.data.content
				this.totalTi = tiku.data.totalElements
			},

			async tikusous() {
				const page = {
					pageNumber: 0,
					pageSize: 10,
					questionBank: this.tikuNie,
					questionType: this.danxuan,
					tikuTitle: this.timuMsg,
				}
				const tiku = await QuestionGetAll(page)
				this.tikuziyuan = tiku.data.content
				this.totalTi = tiku.data.totalElements
			},
			async tikuclose() {
				this.tikuNie = '用户端题库'
				this.danxuan = ''
				this.timuMsg = ''
				this.manyi = ''
				const page = {
					pageNumber: 0,
					pageSize: 10,
					questionBank: this.tikuNie,
				}
				const tiku = await QuestionGetAll(page)
				this.tikuziyuan = tiku.data.content
				this.totalTi = tiku.data.totalElements
			},
			gotimuxiang(item) {
				this.timuData = item
				if (typeof item.optionSettings !== 'object') {
					this.timuData.optionSettings = JSON.parse(item.optionSettings)
				}
				this.timuXiang = true
			},
			handleSelectionChange(val) {
				// if(this.tikuNie =='用户端题库'){
				//     this.listOne = val
				// }else if(this.tikuNie =='商户端题库'){
				//   this.listTwo = val

				// }else{
				//   this.listThree = val
				// }

				this.multipleSelection = val

				// this.xuanzheData = this.xuanzheData.concat(val)
				// this.xuanzheData = [...new Set(this.xuanzheData)]
			},
			tiSelQue(val) {
				if (val == 1) {
					// wenConstData secondDataTi

					// this.wenConstData = [...this.listOne, ...this.listTwo, ...this.listThree]
					this.multipleSelection.forEach(item => {
						const isDuplicate = this.wenConstData.some(existingItem => existingItem.id === item.id);
						if (!isDuplicate) {
							this.wenConstData.push(item);
						}
					})
				} else {
					this.multipleSelection.forEach(item => {
						const isDuplicate = this.secondDataTi.some(existingItem => existingItem.id === item.id);

						if (!isDuplicate) {
							this.secondDataTi.push(item);
						}
					});
				}
				this.tiNum = 0
				this.tikuNie = ''
				this.danxuan = ''
				this.timuMsg = ''
				this.pageSizeTi = 10
				this.currentPageListTi = 1
				this.totalTi = 0
				this.$refs.ziyuanData.clearSelection()
				this.tikuBox = false
			},
			delWenCon(val, index) {
				if (val == '1') {
					this.xuanzheData.splice(index, 1)
					this.wenConstData.splice(index, 1)
				} else {
					this.secondDataTi.splice(index, 1)
				}
			},
			fabu(val, item) {
				const h = this.$createElement;
				this.$msgbox({
					title: '消息',
					message: h('p', null, [
						h('span', null, '是否提交 '),
					]),
					showCancelButton: true,
					showClose: false,
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					customClass: 'oe-dialog-btn',
					beforeClose: (action, instance, done) => {
						if (action === 'confirm') {
							TerminaEdit({
								id: item.id,
								reviewStatus: val
							}).then(res => {
								this.getAll()
								done();
							})
						} else {
							done();
						}
					}
				})
			},
			downs(item) {
				this.xiajiaId = item.id
				this.downShow = true
			},
			async downShowCheck() {
				if (this.opinionDel.opinionDelisting == '') {
					this.$message({
						message: '请输入禁用原因',
					})
					return;
				}
				await TerminaEdit({
					id: this.xiajiaId,
					reviewStatus: '5',
					opinionDelisting: this.opinionDel.opinionDelisting
				})
				this.downShow = false
				this.getAll()
			},
			delwen(item) {
				const h = this.$createElement;
				this.$msgbox({
					title: '消息',
					message: h('p', null, [
						h('span', null, '是否删除 '),
					]),
					showCancelButton: true,
					showClose: false,
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					customClass: 'oe-dialog-btn',
					beforeClose: (action, instance, done) => {
						if (action === 'confirm') {
							TerminaDel({
								id: item.id
							}).then(res => {
								this.getAll()
								done();
							})
						} else {
							done();
						}
					}
				})
			},
			addyu() {

			},
			parseData(obj) {
				const result = [];

				for (const key in obj) {
					if (obj.hasOwnProperty(key)) {
						const item = obj[key];
						const [type, titleAndOptions] = item.split('$');
						const [isRequired, options] = titleAndOptions.split('#');
						const [title, dansi] = options.split(':');
						const xuanxiang = dansi.split('^').map(option => {
							const [index, value, score] = option.split('|');
							return value;
						});

						result.push({
							timu: title,
							type: type,
							isphu: isRequired,
							xuanxiang: xuanxiang
						});
					}
				}

				return result;
			},
			yulan(item) {
				this.secondData = item

				if (typeof this.secondData.question != 'object') {
					this.secondData.question = JSON.parse(this.secondData.question)
				}
				const host = `${window.location.protocol}//${window.location.host}`
				this.wenjuanUrl = `${host}/questionnaire/meh5/pages_category_page1/question/question?ids=${item.id}`

				this.yulanShow = true

			},
			addggXin() {
				this.formInline = {
					createUser: '',
					title: '',
					startDate: '',
					endDate: '',
					publishPort: '',
					questionnaireType: '',
					estimatedTime: null,
					remarks: '',
					filler: '',
					fillingConditions: '可重复填写',
					coverImage: '',
					rewardForParticipation: '',
					questionId: '',
					responseStatus: '',
					reviewStatus: '1',
					needName: '必填',
					needPhone: '必填',
					needGender: '必填',
					needOpinion: '必填',
				}
				this.xuanzheData = []
				this.radioreward = '不设置奖励'
				const today = new Date();
				const startOfToday = new Date(today.getFullYear(), today.getMonth(), today.getDate());
				const endOfToday = new Date(today.getFullYear(), today.getMonth(), today.getDate());
				this.Xin_Time = [this.getCurrentDate(), this.getNextDayDate()]
				this.wenConstData = []
				this.ggXin = true
			},
			addTikuShow() {
				this.zhong = {
					tikuTitle: '',
					questionType: '',
					questionBank: '用户端题库',
					layoutType: 1,
					maxChoose: 0,
					isRequired: '必填',
					questionDescription: '',
					optionSettings: {},
				}
				this.options = []

				this.tikuAdd = true
			},
			quxiao(val) {
				this.multipleSelection = []
				this.options = []
				this.$refs.tixform.resetFields()
				// if (val == 1) {
				//   this.$refs.tixform.resetFields()
				// } else {

				//   this.$refs.form.resetFields()
				// }
			},

			hangSelchange() {
				const postList = {
					pageNumber: 0,
					pageSize: 10,
					questionnaireId: item.id,
				}
				axios.post(`${this.$API}/cereQuestionnaireAnswering/queryByPage`, postList).then(
					response => {
						this.tongjiSshu = response.data.data.content
						this.total1 = response.data.data.totalElements
					})
			},
			secondsToMinutesAndSeconds(s) {
				if (s) {
					// 将输入的秒数转换为数值类型并取整
					s = Math.floor(Number(s));

					// 计算分钟和剩余的秒数
					const minutes = Math.floor(s / 60);
					let remainingSeconds = s % 60;

					// 确保剩余的秒数始终是整数
					remainingSeconds = Math.floor(remainingSeconds);

					// 根据是否有分钟来返回相应的字符串
					if (minutes === 0) {
						return `${remainingSeconds} 秒`;
					} else {
						return `${minutes} 分 ${remainingSeconds} 秒`;
					}
				} else {
					return 0
				}
			},

			tongjiSubmit() {
				const page = {
					pageNumber: 0,
					pageSize: 10,
					userName: this.tongjiMsg.userName,
					questionnaireId: this.secondData.id,
				}

				if (this.tongjiMsg.plan_Time.length != 0) {
					page.startTime = this.tongjiMsg.plan_Time[0]
					page.endTime = this.tongjiMsg.plan_Time[1]
				}

				axios.post(`${this.$API}/cereQuestionnaireAnswering/queryByPage`, page).then(
					response => {
						this.tongjiSshu = response.data.data.content
						this.total1 = response.data.data.totalElements
					})
			},
			tongjiSubmitret() {
				this.tongjiMsg = {
					plan_Time: [],
					userName: '',
					pageNumber: 0,
					pageSize: 10,

				}
				const page = {
					pageNumber: 0,
					pageSize: 10,
					questionnaireId: this.secondData.id,
				}
				axios.post(`${this.$API}/cereQuestionnaireAnswering/queryByPage`, page).then(
					response => {
						this.tongjiSshu = response.data.data.content
						this.total1 = response.data.data.totalElements
					})
			},
			copyUrl(url) {
				const tempTextArea = document.createElement('textarea');
				// 设置 textarea 的值为要复制的 URL
				tempTextArea.value = url;
				// 将 textarea 添加到 DOM 中
				document.body.appendChild(tempTextArea);
				// 选中 textarea 中的内容
				tempTextArea.select();
				// 执行浏览器的复制命令
				document.execCommand('copy');
				// 从 DOM 中移除临时的 textarea 元素
				document.body.removeChild(tempTextArea);
				this.$message({
					message: '复制成功',
					type: 'success'
				})
			},
			tongjiBoxFan() {
				this.tongjiBox = false
				// this.getAll()
				// location.reload();
			},
			async load() {

				const page = {
					pageNumber: this.tiNum + 1,
					pageSize: 10,
					questionBank: this.tikuNie,
				}
				this.tiNum += 1
				const tiku = await QuestionGetAll(page)
				// this.tikuziyuan =  this.tikuziyuan.concat(tiku.data.content)
				const uniqueIds = new Set(this.tikuziyuan.map(item => item.id)); // 获取当前tikuziyuan中的所有唯一ID

				this.tikuziyuan = this.tikuziyuan.concat(
					tiku.data.content.reduce((acc, cur) => {
						if (!uniqueIds.has(cur.id)) { // 如果当前元素的ID不在uniqueIds集合中，则将其添加到acc数组中
							acc.push(cur);
							uniqueIds.add(cur.id); // 并将ID添加到uniqueIds集合中
						}
						return acc;
					}, [])
				)
			},
			getCurrentDate() {
				const now = new Date();
				const year = now.getFullYear();
				const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以要+1
				const day = String(now.getDate()).padStart(2, '0');
				return `${year}-${month}-${day}`;
			},

			getNextDayDate() {
				const now = new Date();
				now.setDate(now.getDate() + 1); // 设置到下一天
				const year = now.getFullYear();
				const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始，所以要+1
				const day = String(now.getDate()).padStart(2, '0');
				return `${year}-${month}-${day}`;
			},

			validateScore(row) {
				// 如果输入的不是数字或者是NaN，则重置为1
				if (isNaN(row.num) || row.num < 0) {
					row.num = 0;
				}
				// 如果输入的数字大于100，则重置为100
				if (row.num > 100) {
					row.num = 100;
				}
			},

			tikuquxiao(val) {
				this.tikuBox = false
				this.tiNum = 0
				this.tikuNie = ''
				this.danxuan = ''
				this.timuMsg = ''
				this.pageSizeTi = 10
				this.currentPageListTi = 1
				this.totalTi = 0
				this.$refs.ziyuanData.clearSelection()
			},
			moveUp(index) {
				[this.wenConstData[index], this.wenConstData[index - 1]] = [this.wenConstData[index - 1], this
					.wenConstData[index]
				]
				this.wenConstData.sort()
			},
			moveDown(index) {
				[this.wenConstData[index], this.wenConstData[index + 1]] = [this.wenConstData[index + 1], this
					.wenConstData[index]
				]
				this.wenConstData.sort()
			},
			moveUp2(index) {
					[this.secondDataTi[index], this.secondDataTi[index - 1]] = [this.secondDataTi[index - 1], this
						.secondDataTi[index]
					]
				this.secondDataTi.sort()
			},
			moveDown2(index) {
				[this.secondDataTi[index], this.secondDataTi[index + 1]] = [this.secondDataTi[index + 1], this
					.secondDataTi[index]
				]
				this.secondDataTi.sort()
			},
			answerMoveUp(index) {
				[this.options[index], this.options[index - 1]] = [this.options[index - 1], this.options[index]]
				this.options[index].index = index - 1
				this.options.sort()
			},
			answerMoveDown(index) {
				[this.options[index], this.options[index + 1]] = [this.options[index + 1], this.options[index]]
				this.options[index].index = index + 1
				this.options.sort()
			},
			getStatusText(val) {
				switch (val) {
					case '1':
						return '大转盘';
					case '2':
						return '砸金蛋';
					case '3':
						return '刮刮卡';
					case '4':
						return '翻牌乐';
					case '5':
						return '福袋';
					case '6':
						return '摇一摇';
					default:
						return '无';
				}
			}
		}

	}
</script>

<style scoped>
	.zhuti {
		padding: 0 20px 20px 20px;
		min-height: calc(100vh - 50px - 20px);
		background-color: #Fff;

	}

	.chengeXia {
		border-bottom: 6px solid #3F9B6A;
		padding-bottom: 4px;
		color: #3F9B6A;
	}

	/deep/ .el-form-item__content {
		line-height: 0;
	}

	.tableBtn {
		display: inline-block;
		margin-right: 10px;
		color: #ACACAC;
		cursor: pointer;
	}

	.formSearch {
		display: flex;
		width: 100%;
		font-size: 14px;
		justify-content: space-between;
	}

	.greens {
		color: #3F9B6A;
	}

	/deep/ .el-table__row {
		font-size: 14px;
		color: #000000e6;
		height: 42px;
	}

	.fenye {
		margin-top: 20px;
		display: flex;
		justify-content: flex-end;
	}

	/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
		background-color: #3F9B6A;
	}

	.el-row {
		margin-bottom: 20px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	.el-col {
		border-radius: 4px;
	}

	.bg-purple-dark {
		background: #99a9bf;
	}

	.bg-purple {
		background: #d3dce6;
	}

	.bg-purple-light {
		background: #e5e9f2;
	}

	.grid-content {
		border-radius: 4px;
		min-height: 36px;
	}

	.row-bg {
		padding: 10px 0;
		background-color: #f9fafc;
	}

	/deep/ .bg-purple[data-v-0e3fe4ec] {
		background: #fff;
		height: 50px;
	}

	/deep/ .bg-purple[data-v-3bebae82] {
		background: #fff;
		height: 50px;
	}

	::v-deep .bg-purple {
		background: #fff;
		height: 50px;
	}

	/deep/ .el-form--label-top .el-form-item__label {
		padding: 0;
	}

	::v-deep .el-form-item {
		margin-bottom: 16px;
	}

	.device-form .el-form-item__label::after {
		content: "*";
		color: #1A1A1A;
		margin-left: 5px;
		font-size: 16px;
	}

	::v-deep .el-dialog__wrapper {
		.el-dialog__header {
			background-color: #FAFAFA;
		}
	}

	::v-deep .el-input__inner:focus {
		border: #3F9B6A 1px solid;
	}

	.dialog-footer {
		display: flex;
		justify-content: flex-end;
		border-top: solid rgba(209, 209, 209, 0.2) 2px;
		padding-top: 20px;
	}

	::v-deep .el-input__inner:focus {
		border: #3F9B6A 1px solid;
	}

	::v-deep .el-input__inner:hover {
		border: #3F9B6A 1px solid;
	}

	::v-deep .el-select .el-input.is-focus .el-input__inner {
		border-color: #3F9B6A
	}

	.el-select-dropdown__item.selected {
		color: #3F9B6A;
	}

	.el-pagination__sizes .el-input .el-input__inner:hover {
		border-color: #3F9B6A;
	}

	::v-deep .el-dialog__wrapper {

		.dialog_css {
			margin-right: 12px;
			margin-top: 61px !important;

			.el-dialog__title {
				font-size: 16px !important;
				font-weight: 600;
				color: #000;
			}
		}

		.diaslog_zhong {
			margin-left: 25%;
			margin-top: 61px !important;
		}

	}

	::v-deep .diaslog_zhong {
		margin-left: 20%;
		margin-top: 61px !important;

		.el-dialog__header {
			background-color: #fff;
			border-bottom: 1px solid #EFEFEF;

			.el-dialog__title {
				font-size: 14px;
				color: #000000e6;
			}
		}

		.el-dialog__body {
			padding: 10px 30px 30px 20px
		}
	}

	/deep/ .el-table_1_column_8 .hetong {
		color: #7DBB9A;
		text-decoration: underline;
	}

	/deep/ .first-column-bg {
		background-color: #FAFAFA !important;
	}

	::v-deep .textarea {
		width: 85%;

		.el-textarea__inner {
			width: 100%;
		}
	}

	::v-deep .pass_input {
		width: 100%;

		.el-input__inner {
			border: none;
			padding: 0;
		}
	}

	::v-deep .pass_select {
		width: 100%;

		.el-input__inner {
			border: none;
			padding: 0;
		}

		.el-icon-arrow-up:before {
			content: ''
		}

	}

	/deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
		background-color: #fff;
	}

	/deep/ .el-radio__label,
	/deep/ .el-checkbox__label {
		white-space: normal !important;
		word-break: break-all !important;
	}

	/deep/ .el-input-number__decrease,
	/deep/.el-input-number__increase {
		height: 30px !important;
		line-height: 32px !important;
		margin-top: 3px;
	}
</style>
<style lang="scss" scoped>
	::v-deep .bian_css {
		.el-dialog__header {
			padding: 0px;
		}

		.el-input__inner {
			height: 18px;
			border: 0px;
			margin-top: 0px;
		}

		.el-input__inner:hover {
			border: 0px;
		}

		.el-input__inner:focus {
			border: 0px;
		}
	}

	::v-deep .buttonHover:hover {
		color: #3f9b6a !important;
		border-color: #c5e1d2 !important;
		background-color: #ecf5f0 !important;
		outline: none;
	}

	::v-deep .el-pagination__total {
		position: absolute;
		left: 33px;
	}

	::v-deep .diaslog_zhong {
		.el-dialog__body {
			padding: 10px 20px 20px 20px;
		}

		.el-upload--picture-card {
			width: 130px;
			height: 130px;
		}
	}

	::v-deep .el-radio-group {
		.el-radio {
			font-weight: 400;
			height: 29px;
		}
	}

	::v-deep .el-checkbox-group {
		.el-checkbox {
			height: 29px;
		}

		label {
			font-weight: 400;
		}
	}

	.questionnaire {
		width: 100%;
		flex-grow: 1;
		background-color: white;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
		border-radius: 5px;
		box-sizing: border-box;
	}

	.question-title {
		// font-size: 18px;
		color: #000;
		margin-bottom: 10px;
	}

	.question {
		background-color: white;
		padding: 15px;
		margin: 10px 0;
		border-radius: 10px;
	}

	.answerItem {
		width: auto;
		padding: 10px 15px;
		margin: 0 0 5px 10px;
		border-radius: 6px;
		background-color: #f5f7fa;
		display: flex;
		align-items: center;
	}

	// ::v-deep .tongyong_css {
	//   max-height: 850px;

	// }

	// .tongyong_css {
	//   max-height: calc(100vh - 200px); /* Adjust the 200px to the combined height of your header and footer */
	//   overflow-y: auto;
	// }
	::v-deep .xddTable {
		height: 100% !important;

		.el-table__body-wrapper {
			overflow: auto !important;
			height: 100% !important;
		}

		.el-table__body-wrapper is-scrolling-none {
			height: 100% !important;
		}

		.el-table--scrollable-y .el-table__body-wrapper {
			overflow-y: inherit !important;
		}

	}
</style>