Commit 35280aea106990ad2f93281834defa34aa52476f
1 parent
9dce0ee1
1
Showing
9 changed files
with
2432 additions
and
1702 deletions
.DS_Store
No preview for this file type
wenjuan-h5/config/api.js
| @@ -6,14 +6,14 @@ | @@ -6,14 +6,14 @@ | ||
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | -// const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/meserver/admin-server' | ||
| 10 | -// const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/meserver/api' | 9 | +const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/meserver/admin-server' |
| 10 | +const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/meserver/api' | ||
| 11 | // const DOMAIN_PREFIXPING = 'http://172.16.61.123:80/cdwlMall/admin-server' | 11 | // const DOMAIN_PREFIXPING = 'http://172.16.61.123:80/cdwlMall/admin-server' |
| 12 | // const DOMAIN_PREFIX = 'http://172.16.61.123:80/cdwlMall/api' | 12 | // const DOMAIN_PREFIX = 'http://172.16.61.123:80/cdwlMall/api' |
| 13 | 13 | ||
| 14 | -const host = `${window.location.protocol}//${window.location.host}` | ||
| 15 | -const DOMAIN_PREFIXPING = `${host}/cdwlMall/admin-server` | ||
| 16 | -const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` | 14 | +// const host = `${window.location.protocol}//${window.location.host}` |
| 15 | +// const DOMAIN_PREFIXPING = `${host}/cdwlMall/admin-server` | ||
| 16 | +// const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` | ||
| 17 | 17 | ||
| 18 | // const DOMAIN_PREFIXPING = `http://192.168.2.152:9003` | 18 | // const DOMAIN_PREFIXPING = `http://192.168.2.152:9003` |
| 19 | // const DOMAIN_PREFIX = 'http://192.168.2.152:9007' | 19 | // const DOMAIN_PREFIX = 'http://192.168.2.152:9007' |
| @@ -42,9 +42,9 @@ const TERMINAL = 1 | @@ -42,9 +42,9 @@ const TERMINAL = 1 | ||
| 42 | 42 | ||
| 43 | module.exports = { | 43 | module.exports = { |
| 44 | //问卷查询接口 | 44 | //问卷查询接口 |
| 45 | - wenjuanList: WX_API_BASEPING + '/cereQuestionnaireTable/queryById', | ||
| 46 | - //问卷提交接口 | ||
| 47 | - wenjuanUp: WX_API_BASE + '/cereQuestionnaireAnswering/add', | 45 | + wenjuanList: WX_API_BASEPING + '/cereQuestionnaireTable/queryById', |
| 46 | + //问卷提交接口 | ||
| 47 | + wenjuanUp: WX_API_BASE + '/cereQuestionnaireAnswering/add', | ||
| 48 | //问卷解析token | 48 | //问卷解析token |
| 49 | - jietoken: WX_API_BASE + '/cereQuestionnaireAnswering/get/token', | 49 | + jietoken: WX_API_BASE + '/cereQuestionnaireAnswering/get/token', |
| 50 | } | 50 | } |
wenjuan-h5/pages_category_page1/question/question copy.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="questionnaire"> | ||
| 3 | + | ||
| 4 | + <!-- 单选问题 --> | ||
| 5 | + <view style="padding:20px;background-color: #f6f6f6;"> | ||
| 6 | + <view> | ||
| 7 | + <h2 | ||
| 8 | + style="color: #000;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;text-align:center"> | ||
| 9 | + {{ wenjuan.title }} | ||
| 10 | + </h2> | ||
| 11 | + <!-- <h5 style="padding: 10px 0;color: #000;">请您认真作答以下题目</h5> --> | ||
| 12 | + <view class="" style="padding: 10px 0; height: 200px;"> | ||
| 13 | + <image :src="this.$hostUrl + wenjuan.coverImage" mode="scaleToFill" | ||
| 14 | + style="width:100%;height: 100%;border-radius: 10px;"></image> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + <view style="padding: 15px;background-color: #fff;border-radius: 10px;"> | ||
| 18 | + <view> | ||
| 19 | + <!-- <u-parse :content="wenjuan.remarks"></u-parse> --> | ||
| 20 | + <rich-text :nodes="wenjuan.remarks"></rich-text> | ||
| 21 | + <!-- {{wenjuan.remarks}} --> | ||
| 22 | + <!-- <view> | ||
| 23 | + <view style="display:flex;padding:10px 0;justify-content: space-between;"> | ||
| 24 | + <view style="display:flex;"> | ||
| 25 | + {{wenjuan.createUser}} | ||
| 26 | + </view> | ||
| 27 | + <view> | ||
| 28 | + {{wenjuan.createTime}} | ||
| 29 | + </view> | ||
| 30 | + </view> | ||
| 31 | + </view> --> | ||
| 32 | + <!-- <view>预计答题时间:{{this.wenjuan.estimatedTime}}分钟</view> --> | ||
| 33 | + </view> | ||
| 34 | + </view> | ||
| 35 | + <view class="question" v-for="(item, index) in wenjuan.question" style=""> | ||
| 36 | + <p class="question-title" | ||
| 37 | + style="font-weight:600;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;"> | ||
| 38 | + <span v-if="item.required == '必填'" style="color: red;">*</span>{{ index }}.<span | ||
| 39 | + style="color:#0FBB59;padding:0 3px;">({{ item.type }})</span> | ||
| 40 | + {{ item.title }} | ||
| 41 | + </p> | ||
| 42 | + <view> | ||
| 43 | + | ||
| 44 | + <!-- <radio-group @change="radioChange" v-model="item.choose" | ||
| 45 | + v-if="item.type =='单选'" > | ||
| 46 | + <label :class="item.choose == val ?'option green':'option gary' " :key="val.answer" v-for="(val, idx) in item.options"> | ||
| 47 | + <view> | ||
| 48 | + <radio :value="val.answer" activeBackgroundColor="#E5FFF0" | ||
| 49 | + activeBorderColor="#4FCF86" iconColor="#0FBB59" /> | ||
| 50 | + </view> | ||
| 51 | + <view>{{val.answer}}</view> | ||
| 52 | + </label> | ||
| 53 | + </radio-group> --> | ||
| 54 | + <u-radio-group v-model="item.choose" v-if="item.type == '单选'" style="width: 100%;"> | ||
| 55 | + <view v-if="item.layoutType != 2"> | ||
| 56 | + <u-radio v-for="(val, idx) in item.options" style="width: 100%;" | ||
| 57 | + :class="val.answer == item.choose ? 'option green' : 'option gary'" :name="val.answer" | ||
| 58 | + :disabled="item.disabled" :key="idx" :label-disabled="false" active-color="#4FCF86"> | ||
| 59 | + {{ val.answer }} | ||
| 60 | + </u-radio> | ||
| 61 | + </view> | ||
| 62 | + <view v-else-if="item.layoutType == 2" class="myMultiple"> | ||
| 63 | + <div v-for="(val, idx) in item.options" | ||
| 64 | + :class="['myOption gary', { optionActive: myChoose.answer == val.answer }]" :key="idx" | ||
| 65 | + @click="chooseAnswerOne(item.options, val, idx)"> | ||
| 66 | + <p class="chooseTag" v-if="myChoose.answer == val.answer"><u-icon name="checkbox-mark" | ||
| 67 | + color="#fff" size="8pt"></u-icon></p> | ||
| 68 | + {{ val.answer }} | ||
| 69 | + </div> | ||
| 70 | + </view> | ||
| 71 | + </u-radio-group> | ||
| 72 | + | ||
| 73 | + <u-checkbox-group v-model="item.choose" v-if="item.type == '多选'" style="width: 100%;"> | ||
| 74 | + {{item}} | ||
| 75 | + <view v-if="item.layoutType != 2"> | ||
| 76 | + <u-checkbox v-for="(val, idx) in item.options" style="width: 100%;" | ||
| 77 | + :class="val.disabled ? 'option green' : 'option gary'" v-model="val.disabled" | ||
| 78 | + :label-disabled="false" :name="val.answer" :key="idx" | ||
| 79 | + active-color="#4FCF86">{{ val.answer }}</u-checkbox> | ||
| 80 | + </view> | ||
| 81 | + <view v-else-if="item.layoutType == 2" class="myMultiple"> | ||
| 82 | + <div v-for="(val, index) in item.options" | ||
| 83 | + :class="['myOption gary', { optionActive: val.disabled == true }]" :key="index" | ||
| 84 | + @click="chooseAnswerMore(val, index,item)"> | ||
| 85 | + <p class="chooseTag" v-if="val.disabled == true"><u-icon name="checkbox-mark" | ||
| 86 | + color="#fff" size="8pt"></u-icon></p> | ||
| 87 | + {{ val.answer }} | ||
| 88 | + </div> | ||
| 89 | + </view> | ||
| 90 | + </u-checkbox-group> | ||
| 91 | + <!-- <checkbox-group @change="checkboxChange(index,$event,item,idx)" | ||
| 92 | + v-model="item.choose" | ||
| 93 | + > | ||
| 94 | + | ||
| 95 | + <label :class="item.choose == val.answer ?'option green':'option gary' " > | ||
| 96 | + <view style="margin-bottom:5px;"> | ||
| 97 | + | ||
| 98 | + <checkbox :name="val.answer" activeBackgroundColor="#E5FFF0" | ||
| 99 | + activeBorderColor="#4FCF86" iconColor="#0FBB59" /> | ||
| 100 | + <span>{{val.answer}}</span > | ||
| 101 | + </view> | ||
| 102 | + | ||
| 103 | + </label> | ||
| 104 | + </checkbox-group> --> | ||
| 105 | + <view v-if="item.type == '文本'"> | ||
| 106 | + <u-input type="textarea" v-model="item.choose" placeholder="请输入" :border="true"></u-input> | ||
| 107 | + </view> | ||
| 108 | + </view> | ||
| 109 | + </view> | ||
| 110 | + | ||
| 111 | + <!-- 文本填写问题 --> | ||
| 112 | + <view class=""> | ||
| 113 | + <!-- <p class="question-title">您的建议:</p > | ||
| 114 | + <textarea v-model="suggestion"></textarea> --> | ||
| 115 | + <u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" validate-on-rule-change="false" | ||
| 116 | + style="background-color:#fff;border-radius: 10px;"> | ||
| 117 | + <u-form-item label="姓名" prop="name" borderBottom ref="item1" v-if="wenjuan.needName == '必填'" | ||
| 118 | + style="padding:10px 20px 0;"> | ||
| 119 | + <u-input v-model="model1.name" placeholder="请输入姓名"></u-input> | ||
| 120 | + </u-form-item> | ||
| 121 | + <u-form-item label="电话" prop="phone" borderBottom v-if="wenjuan.needPhone == '必填'" | ||
| 122 | + style="padding: 0 20px;"> | ||
| 123 | + <u-input v-model="model1.phone" placeholder="请输入电话"></u-input> | ||
| 124 | + </u-form-item> | ||
| 125 | + <u-form-item label="性别" prop="sexl" borderBottom v-if="wenjuan.needGender == '必填'" | ||
| 126 | + style="padding: 0 20px ;"> | ||
| 127 | + <!-- <u-input v-model="model1.sexl" placeholder="请输入性别"></u-input> --> | ||
| 128 | + <u-radio-group v-model="model1.sexl"> | ||
| 129 | + <u-radio active-color="#0FBB59" @change="radioChange" v-for="(item, index) in SexList" | ||
| 130 | + :key="index" :name="item.name" :disabled="item.disabled"> | ||
| 131 | + {{ item.name }} | ||
| 132 | + </u-radio> | ||
| 133 | + </u-radio-group> | ||
| 134 | + </u-form-item> | ||
| 135 | + | ||
| 136 | + | ||
| 137 | + <view v-if="wenjuan.needOpinion == '必填'" style="padding:0 20px 10px 20px;"> | ||
| 138 | + <view style="margin-bottom:10px;">意见</view> | ||
| 139 | + | ||
| 140 | + <u-input v-model="model1.opinion" type="textarea" :border="true" :maxlength="maxLength" /> | ||
| 141 | + <div class="char-count" style="font-size:12px;"> | ||
| 142 | + {{ currentLength }} / {{ maxLength }} | ||
| 143 | + </div> | ||
| 144 | + </view> | ||
| 145 | + | ||
| 146 | + </u-form> | ||
| 147 | + | ||
| 148 | + </view> | ||
| 149 | + | ||
| 150 | + <button class="submit-btn" @click="submit">提交问卷</button> | ||
| 151 | + </view> | ||
| 152 | + <u-mask :show="show"> | ||
| 153 | + <view class="warp"> | ||
| 154 | + <view class="rect" @tap.stop> | ||
| 155 | + <image src="../../static/images/tijiao.png" style="position: absolute;top:40%;width:80%;left:10%" | ||
| 156 | + mode="aspectFit"></image> | ||
| 157 | + </view> | ||
| 158 | + </view> | ||
| 159 | + </u-mask> | ||
| 160 | + | ||
| 161 | + | ||
| 162 | + <u-toast ref="uToast" /> | ||
| 163 | + </view> | ||
| 164 | +</template> | ||
| 165 | + | ||
| 166 | +<script> | ||
| 167 | + const NET = require('@/utils/request') | ||
| 168 | + const API = require('@/config/api') | ||
| 169 | + export default { | ||
| 170 | + data() { | ||
| 171 | + return { | ||
| 172 | + show: false, | ||
| 173 | + maxLength: 500, // 假设最大字数为500 | ||
| 174 | + suggestion: '', | ||
| 175 | + model1: { | ||
| 176 | + name: '', | ||
| 177 | + phone: '', | ||
| 178 | + sexl: '', | ||
| 179 | + opinion: '', | ||
| 180 | + socialSecurityCardNumber: '' | ||
| 181 | + }, | ||
| 182 | + wenjuan: { | ||
| 183 | + | ||
| 184 | + }, | ||
| 185 | + wentile: [], | ||
| 186 | + rules: { | ||
| 187 | + name: [{ | ||
| 188 | + type: 'string', | ||
| 189 | + required: true, | ||
| 190 | + message: '请填写姓名', | ||
| 191 | + trigger: ['blur', 'change'] | ||
| 192 | + }], | ||
| 193 | + phone: [{ | ||
| 194 | + required: true, | ||
| 195 | + message: '请输入电话' | ||
| 196 | + }, | ||
| 197 | + { | ||
| 198 | + type: 'number', | ||
| 199 | + message: '必须为数字值' | ||
| 200 | + } | ||
| 201 | + ], | ||
| 202 | + }, | ||
| 203 | + | ||
| 204 | + current: [], | ||
| 205 | + pageTime: null, | ||
| 206 | + duoxuan: [], | ||
| 207 | + danAnswers: [], | ||
| 208 | + selectedAnswers: [], | ||
| 209 | + panduanId: [], | ||
| 210 | + wenjuanIds: '', | ||
| 211 | + scoreList: [], | ||
| 212 | + SexList: [{ | ||
| 213 | + name: '男', | ||
| 214 | + disabled: false | ||
| 215 | + }, | ||
| 216 | + { | ||
| 217 | + name: '女', | ||
| 218 | + disabled: false | ||
| 219 | + }, | ||
| 220 | + ], | ||
| 221 | + timeLeft: null, | ||
| 222 | + token: '', | ||
| 223 | + myChoose: {}, | ||
| 224 | + myChooseItem: [ | ||
| 225 | + | ||
| 226 | + ], | ||
| 227 | + panduan: false | ||
| 228 | + }; | ||
| 229 | + }, | ||
| 230 | + computed: { | ||
| 231 | + currentLength() { | ||
| 232 | + return this.model1.opinion.length; | ||
| 233 | + } | ||
| 234 | + }, | ||
| 235 | + onLoad(options) { | ||
| 236 | + | ||
| 237 | + if (options.ids != '') { | ||
| 238 | + if (options.src && options.token) { | ||
| 239 | + | ||
| 240 | + this.token = options.token | ||
| 241 | + let obj = { | ||
| 242 | + token: options.token | ||
| 243 | + } | ||
| 244 | + NET.request(API.jietoken, obj, 'get').then(res => { | ||
| 245 | + if (typeof res.data == 'string') { | ||
| 246 | + | ||
| 247 | + if (JSON.parse(res.data).phone) { | ||
| 248 | + this.model1.phone = Number(JSON.parse(res.data).phone) | ||
| 249 | + } | ||
| 250 | + if (JSON.parse(res.data).aac003Mask) { | ||
| 251 | + this.model1.name = JSON.parse(res.data).aac003Mask | ||
| 252 | + } | ||
| 253 | + if (JSON.parse(res.data).aac004) { | ||
| 254 | + this.model1.sexl = JSON.parse(res.data).aac004 | ||
| 255 | + this.panduan = true | ||
| 256 | + } | ||
| 257 | + if (JSON.parse(res.data).aac002Mask) { | ||
| 258 | + this.model1.socialSecurityCardNumber = JSON.parse(res.data).aac002Mask | ||
| 259 | + } | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + }) | ||
| 263 | + | ||
| 264 | + // if (options.token != undefined) {} | ||
| 265 | + | ||
| 266 | + } else if (options.phone != undefined) { | ||
| 267 | + this.model1.phone = options.phone | ||
| 268 | + } | ||
| 269 | + | ||
| 270 | + this.wenjuanIds = options.ids | ||
| 271 | + NET.request(API.wenjuanList, { | ||
| 272 | + id: options.ids, | ||
| 273 | + // reviewStatus: '3', | ||
| 274 | + }, 'post').then(res => { | ||
| 275 | + if (res.data.id) { | ||
| 276 | + this.wenjuan = res.data | ||
| 277 | + this.wenjuan.question = JSON.parse(res.data.question) | ||
| 278 | + //检查this.wenjuan.question这个list的每个里面是否有maxChoose参数,没有的话就加一个 | ||
| 279 | + this.wenjuan.question.forEach(item => { | ||
| 280 | + if (!item.maxChoose) { | ||
| 281 | + item.maxChoose = 0 | ||
| 282 | + } | ||
| 283 | + }) | ||
| 284 | + | ||
| 285 | + | ||
| 286 | + this.timeLeft = parseInt(this.wenjuan.estimatedTime, 10) * 60; // 将分钟转换为秒 | ||
| 287 | + this.updateCountdownDisplay() | ||
| 288 | + | ||
| 289 | + if (res.data.reviewStatus == '5' || res.data.reviewStatus == '4') { | ||
| 290 | + uni.reLaunch({ | ||
| 291 | + url: `/pages_category_page1/question/succe?flag=3` | ||
| 292 | + }) | ||
| 293 | + } | ||
| 294 | + } else { | ||
| 295 | + uni.reLaunch({ | ||
| 296 | + url: `/pages_category_page1/question/succe?flag=1` | ||
| 297 | + }) | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + // if (res.data.cereQuestionManagements.length > 0) { | ||
| 301 | + // for (let i = 0; i < res.data.cereQuestionManagements.length; i++) { | ||
| 302 | + // this.$set(res.data.cereQuestionManagements[i], 'value', []) | ||
| 303 | + // } | ||
| 304 | + // } | ||
| 305 | + | ||
| 306 | + // this.wentile = res.data.cereQuestionManagements | ||
| 307 | + | ||
| 308 | + // this.wenjuan.cereQuestionManagements.map(item => { | ||
| 309 | + | ||
| 310 | + // item.optionSettings = JSON.parse(item.optionSettings) | ||
| 311 | + // item.score = JSON.parse(item.score) | ||
| 312 | + // }) | ||
| 313 | + | ||
| 314 | + }) | ||
| 315 | + } else { | ||
| 316 | + uni.reLaunch({ | ||
| 317 | + url: `/pages_category_page1/question/succe?flag=1` | ||
| 318 | + }) | ||
| 319 | + } | ||
| 320 | + // 设置倒计时定时器 | ||
| 321 | + // const countdownInterval = setInterval(() => { | ||
| 322 | + // if (this.timeLeft > 0) { | ||
| 323 | + // this.timeLeft--; | ||
| 324 | + // this.updateCountdownDisplay(); | ||
| 325 | + // } else { | ||
| 326 | + // clearInterval(countdownInterval); | ||
| 327 | + // location.reload(true); | ||
| 328 | + // // console.log('倒计时结束'); | ||
| 329 | + // // 这里可以添加倒计时结束时的处理代码 | ||
| 330 | + // } | ||
| 331 | + // }, 1000); // 每秒更新一次 | ||
| 332 | + this.pageTime = this.getCurrentTimestamp() | ||
| 333 | + | ||
| 334 | + }, | ||
| 335 | + watch: {}, | ||
| 336 | + methods: { | ||
| 337 | + // 获取时间 | ||
| 338 | + currentTime() { | ||
| 339 | + let date = new Date(); | ||
| 340 | + let year = date.getFullYear(); | ||
| 341 | + let month = date.getMonth() + 1; // 月份从0~11,所以加一 | ||
| 342 | + let day = date.getDate(); | ||
| 343 | + let hours = date.getHours(); | ||
| 344 | + let minutes = date.getMinutes(); | ||
| 345 | + let seconds = date.getSeconds(); | ||
| 346 | + | ||
| 347 | + // 为月、日、小时、分钟和秒添加前导零(如果需要) | ||
| 348 | + month = month < 10 ? '0' + month : month; | ||
| 349 | + day = day < 10 ? '0' + day : day; | ||
| 350 | + hours = hours < 10 ? '0' + hours : hours; | ||
| 351 | + minutes = minutes < 10 ? '0' + minutes : minutes; | ||
| 352 | + seconds = seconds < 10 ? '0' + seconds : seconds; | ||
| 353 | + | ||
| 354 | + // 返回格式化的日期和时间字符串 | ||
| 355 | + return `${year}-${month}-${day} ${hours}:${minutes}`; | ||
| 356 | + }, | ||
| 357 | + updateCountdownDisplay() { | ||
| 358 | + const minutes = Math.floor(this.timeLeft / 60); | ||
| 359 | + const seconds = this.timeLeft % 60; | ||
| 360 | + // console.log(`${minutes} 分 ${seconds} 秒`); | ||
| 361 | + // 这里可以替换为更新DOM元素的代码 | ||
| 362 | + }, | ||
| 363 | + // formatTime(seconds) { | ||
| 364 | + // const minutes = Math.floor(seconds / 60); | ||
| 365 | + // const remainingSeconds = seconds % 60; | ||
| 366 | + // return `${minutes}分${remainingSeconds < 10 ? '0' : ''}${remainingSeconds}秒`; | ||
| 367 | + // }, | ||
| 368 | + getCurrentTimestamp() { | ||
| 369 | + let Times = Date.now(); | ||
| 370 | + return Times // 或者 new Date().getTime(); | ||
| 371 | + }, | ||
| 372 | + checkRequiredQuestions(qust) { | ||
| 373 | + for (let key in qust) { | ||
| 374 | + | ||
| 375 | + let question = qust[key]; | ||
| 376 | + if (question.required === '必填') { | ||
| 377 | + if (question.type === '文本' || question.type === '单选') { | ||
| 378 | + if (question.choose === '') { | ||
| 379 | + | ||
| 380 | + this.$refs.uToast.show({ | ||
| 381 | + title: '请填写所有必填题目', | ||
| 382 | + }) | ||
| 383 | + | ||
| 384 | + return false; // 返回false表示有未填写的必填题目 | ||
| 385 | + } | ||
| 386 | + } else if (question.type === '多选') { | ||
| 387 | + | ||
| 388 | + | ||
| 389 | + let hasEnabledOption = question.options.some(option => option.disabled); | ||
| 390 | + | ||
| 391 | + if (!hasEnabledOption) { | ||
| 392 | + this.$refs.uToast.show({ | ||
| 393 | + title: '请填写所有必填题目', | ||
| 394 | + }) | ||
| 395 | + | ||
| 396 | + return false; // 返回false表示有未填写的必填题目 | ||
| 397 | + } | ||
| 398 | + } | ||
| 399 | + } | ||
| 400 | + } | ||
| 401 | + return true; // 返回true表示所有必填题目都已填写 | ||
| 402 | + }, | ||
| 403 | + submit() { | ||
| 404 | + let putTime = this.getCurrentTimestamp() - this.pageTime | ||
| 405 | + putTime = (putTime / 1000).toFixed(2) | ||
| 406 | + if (!this.checkRequiredQuestions(this.wenjuan.question)) { | ||
| 407 | + return | ||
| 408 | + } | ||
| 409 | + if (this.model1.name == '' && this.wenjuan.needName == '必填') { | ||
| 410 | + this.$refs.uToast.show({ | ||
| 411 | + title: '请输入姓名', | ||
| 412 | + }) | ||
| 413 | + return; | ||
| 414 | + } | ||
| 415 | + if (this.wenjuan.needName == '不填' && this.token == '') { | ||
| 416 | + | ||
| 417 | + this.model1.name = '匿名' | ||
| 418 | + | ||
| 419 | + } | ||
| 420 | + if (this.model1.phone == '' && this.wenjuan.needPhone == '必填') { | ||
| 421 | + this.$refs.uToast.show({ | ||
| 422 | + title: '电话号码不能为空' | ||
| 423 | + }); | ||
| 424 | + return; | ||
| 425 | + } | ||
| 426 | + if (this.wenjuan.needPhone == '必填' && this.isChineseOrPunctuation(this.model1.phone)) { | ||
| 427 | + this.$refs.uToast.show({ | ||
| 428 | + title: '请输入电话且不能包含汉字或标点特殊符号', | ||
| 429 | + }) | ||
| 430 | + return; | ||
| 431 | + } | ||
| 432 | + | ||
| 433 | + // if(this.wenjuan.needPhone =='不填' && this.wenjuan.fillingConditions == '可重复填写'){ | ||
| 434 | + // this.model1.phone = '' | ||
| 435 | + // } | ||
| 436 | + | ||
| 437 | + if (this.model1.sexl != '男' && this.model1.sexl != '女' && this.wenjuan.needGender == '必填') { | ||
| 438 | + this.$refs.uToast.show({ | ||
| 439 | + title: '请选择性别', | ||
| 440 | + }) | ||
| 441 | + return; | ||
| 442 | + } | ||
| 443 | + if (this.wenjuan.needGender == '不填' && this.panduan == false) { | ||
| 444 | + | ||
| 445 | + this.model1.sexl = '未知' | ||
| 446 | + | ||
| 447 | + } | ||
| 448 | + if (this.model1.opinion == '' && this.wenjuan.needOpinion == '必填') { | ||
| 449 | + this.$refs.uToast.show({ | ||
| 450 | + title: '请输入意见', | ||
| 451 | + }) | ||
| 452 | + return; | ||
| 453 | + } | ||
| 454 | + | ||
| 455 | + | ||
| 456 | + | ||
| 457 | + // JSON.stringify(danAnswers) | ||
| 458 | + // let array = this.danAnswers.concat(this.selectedAnswers) | ||
| 459 | + // obj.answerOptions = JSON.stringify(array) | ||
| 460 | + var arr = [] | ||
| 461 | + // for (let i = 0; i < this.wentile.length; i++) { | ||
| 462 | + // var info = { | ||
| 463 | + // id: "", | ||
| 464 | + // value: [], | ||
| 465 | + // cores:0, | ||
| 466 | + // } | ||
| 467 | + // if (this.wentile[i].questionType == '单选' || this.wentile[i].questionType == '文本' ) { | ||
| 468 | + | ||
| 469 | + // info.id = this.wentile[i].id | ||
| 470 | + // info.value = this.wentile[i].value | ||
| 471 | + // let index =this.wentile[i].value | ||
| 472 | + // if(this.wentile[i].score){ | ||
| 473 | + | ||
| 474 | + // for (const key in this.wentile[i].score) { | ||
| 475 | + // if (this.wentile[i].score.hasOwnProperty(key)) { // 确保只获取对象自身的属性,而不是继承的属性 | ||
| 476 | + | ||
| 477 | + // if(key == index){ | ||
| 478 | + // info.cores = this.wentile[i].score[key]; // 设置 info.cores 为当前键对应的值 | ||
| 479 | + // break; // 如果找到了匹配的键,可以提前退出循环 | ||
| 480 | + // } | ||
| 481 | + // } | ||
| 482 | + // } | ||
| 483 | + // } | ||
| 484 | + // // console.log(this.wentile[i].cores[index]) | ||
| 485 | + // // info.cores.this.wentile[i].value = | ||
| 486 | + | ||
| 487 | + // arr.push(info) | ||
| 488 | + | ||
| 489 | + | ||
| 490 | + | ||
| 491 | + // // if (this.wentile[i].value != '' && this.wentile[i].value != null && this.wentile[i].value != | ||
| 492 | + // // undefined) { | ||
| 493 | + // // info.id = this.wentile[i].id | ||
| 494 | + // // info.value = this.wentile[i].value | ||
| 495 | + // // let index =this.wentile[i].value | ||
| 496 | + // // if(this.wentile[i].score){ | ||
| 497 | + | ||
| 498 | + // // for (const key in this.wentile[i].score) { | ||
| 499 | + // // if (this.wentile[i].score.hasOwnProperty(key)) { // 确保只获取对象自身的属性,而不是继承的属性 | ||
| 500 | + | ||
| 501 | + // // if(key == index){ | ||
| 502 | + // // info.cores = this.wentile[i].score[key]; // 设置 info.cores 为当前键对应的值 | ||
| 503 | + // // break; // 如果找到了匹配的键,可以提前退出循环 | ||
| 504 | + // // } | ||
| 505 | + // // } | ||
| 506 | + // // } | ||
| 507 | + // // } | ||
| 508 | + // // // console.log(this.wentile[i].cores[index]) | ||
| 509 | + // // // info.cores.this.wentile[i].value = | ||
| 510 | + | ||
| 511 | + // // arr.push(info) | ||
| 512 | + | ||
| 513 | + // // } | ||
| 514 | + // } else { | ||
| 515 | + // if (this.wentile[i].value.length > 0) { | ||
| 516 | + // info.id = this.wentile[i].id | ||
| 517 | + // info.value = this.wentile[i].value | ||
| 518 | + // let index =this.wentile[i].value | ||
| 519 | + // console.log(this.wentile[i].score); | ||
| 520 | + // if(this.wentile[i].score){ | ||
| 521 | + | ||
| 522 | + // for (const key in this.wentile[i].score) { | ||
| 523 | + // if (this.wentile[i].score.hasOwnProperty(key)) { // 确保只获取对象自身的属性,而不是继承的属性 | ||
| 524 | + // console.log('1111111111111111111',key,index) | ||
| 525 | + // for(let j=0;j<index.length;j++){ | ||
| 526 | + // if(key == index[j]){ | ||
| 527 | + // console.log(info.cores,this.wentile[i].score[key]) | ||
| 528 | + // info.cores += this.wentile[i].score[key]; // 设置 info.cores 为当前键对应的值 | ||
| 529 | + | ||
| 530 | + // } | ||
| 531 | + // } | ||
| 532 | + | ||
| 533 | + // } | ||
| 534 | + // } | ||
| 535 | + // } | ||
| 536 | + // arr.push(info) | ||
| 537 | + | ||
| 538 | + // } | ||
| 539 | + // } | ||
| 540 | + | ||
| 541 | + | ||
| 542 | + // } | ||
| 543 | + console.log(this.wenjuan) | ||
| 544 | + | ||
| 545 | + // let obj = { | ||
| 546 | + // questionnaireId: this.wenjuanIds, | ||
| 547 | + // userName: this.model1.name, | ||
| 548 | + // contactNumber: this.model1.phone, | ||
| 549 | + // gender: this.model1.sexl, | ||
| 550 | + // responseTime: putTime, | ||
| 551 | + // opinion:this.model1.opinion, | ||
| 552 | + // createTime: this.currentTime(), | ||
| 553 | + // answerOptions: {}, | ||
| 554 | + // answeringScore: '', | ||
| 555 | + // questionnaireScore: null, | ||
| 556 | + | ||
| 557 | + // } | ||
| 558 | + // obj.answeringScore = [] | ||
| 559 | + | ||
| 560 | + // for(let i=0;i<arr.length;i++){ | ||
| 561 | + // console.log() | ||
| 562 | + // if(arr[i].cores ==null){ | ||
| 563 | + // obj.answerOptions[i+1] = arr[i].value | ||
| 564 | + // }else{ | ||
| 565 | + // obj.questionnaireScore +=arr[i].cores | ||
| 566 | + // obj.answeringScore.push(arr[i].cores) | ||
| 567 | + // if(typeof arr[i].value !='string'){ | ||
| 568 | + | ||
| 569 | + // arr[i].value.sort((a, b) => a - b) | ||
| 570 | + // obj.answerOptions[i+1] = arr[i].value.join(',') | ||
| 571 | + // }else{ | ||
| 572 | + // obj.answerOptions[i+1]=arr[i].value | ||
| 573 | + // } | ||
| 574 | + // } | ||
| 575 | + | ||
| 576 | + | ||
| 577 | + // } | ||
| 578 | + // obj.answerOptions= JSON.stringify(obj.answerOptions) | ||
| 579 | + // obj.answeringScore = obj.answeringScore.join(',') | ||
| 580 | + | ||
| 581 | + var obj = { | ||
| 582 | + ...this.wenjuan | ||
| 583 | + } | ||
| 584 | + | ||
| 585 | + | ||
| 586 | + for (var key in obj.question) { | ||
| 587 | + console.log(obj.question[key]) | ||
| 588 | + if (obj.question[key].type == '多选') { | ||
| 589 | + obj.question[key].choose = [] | ||
| 590 | + obj.question[key].options.map(res => { | ||
| 591 | + if (res.disabled) { | ||
| 592 | + obj.question[key].choose.push(res.answer) | ||
| 593 | + } | ||
| 594 | + | ||
| 595 | + }) | ||
| 596 | + obj.question[key].choose = obj.question[key].choose.join(',') | ||
| 597 | + } | ||
| 598 | + } | ||
| 599 | + const result = Object.keys(obj.question).reduce((acc, key) => { | ||
| 600 | + const question = obj.question[key]; | ||
| 601 | + const chooseAnswers = question.choose.split(","); // 处理多选的情况 | ||
| 602 | + const indexes = chooseAnswers.map((choose) => { | ||
| 603 | + const optionIndex = question.options.findIndex( | ||
| 604 | + (option) => option.answer === choose | ||
| 605 | + ); | ||
| 606 | + return optionIndex >= 0 ? optionIndex + 1 : null; // 序号从1开始 | ||
| 607 | + }); | ||
| 608 | + | ||
| 609 | + acc[key] = indexes.filter((index) => index !== null).join(","); // 只保留有效序号 | ||
| 610 | + return acc; | ||
| 611 | + }, {}); | ||
| 612 | + | ||
| 613 | + // 计算总分数 | ||
| 614 | + const totalScore = Object.keys(obj.question).reduce((sum, key) => { | ||
| 615 | + const question = obj.question[key] | ||
| 616 | + if (question.type === "单选" || question.type === "多选") { | ||
| 617 | + const chooseAnswers = question.choose.split(","); // 多选时拆分答案 | ||
| 618 | + chooseAnswers.forEach((choose) => { | ||
| 619 | + const matchedOption = question.options.find( | ||
| 620 | + (option) => option.answer === choose | ||
| 621 | + ); | ||
| 622 | + if (matchedOption) { | ||
| 623 | + sum += parseFloat(matchedOption.score || 0); // 累加分数 | ||
| 624 | + } | ||
| 625 | + }); | ||
| 626 | + } | ||
| 627 | + return sum; | ||
| 628 | + }, 0); | ||
| 629 | + | ||
| 630 | + // console.log(obj.question,totalScore,result) | ||
| 631 | + // return | ||
| 632 | + obj.questionnaireId = this.wenjuanIds | ||
| 633 | + obj.userName = this.model1.name | ||
| 634 | + obj.contactNumber = this.model1.phone | ||
| 635 | + obj.gender = this.model1.sexl | ||
| 636 | + obj.responseTime = putTime | ||
| 637 | + obj.answerOptions = JSON.stringify(result) | ||
| 638 | + obj.createTime = this.currentTime() | ||
| 639 | + obj.opinion = this.model1.opinion | ||
| 640 | + obj.questionnaireScore = totalScore | ||
| 641 | + | ||
| 642 | + // let obj = { | ||
| 643 | + // questionnaireId: this.wenjuanIds, | ||
| 644 | + // userName: this.model1.name, | ||
| 645 | + // contactNumber: this.model1.phone, | ||
| 646 | + // gender: this.model1.sexl, | ||
| 647 | + // responseTime: putTime, | ||
| 648 | + // opinion:this.model1.opinion, | ||
| 649 | + // createTime: this.currentTime(), | ||
| 650 | + // answerOptions: {}, | ||
| 651 | + // answeringScore: '', | ||
| 652 | + // questionnaireScore: null, | ||
| 653 | + | ||
| 654 | + // } | ||
| 655 | + obj.question = JSON.stringify(obj.question) | ||
| 656 | + let tijiaoObj = { | ||
| 657 | + questionnaireId: this.wenjuanIds, | ||
| 658 | + userName: this.model1.name, | ||
| 659 | + contactNumber: this.model1.phone, | ||
| 660 | + gender: this.model1.sexl, | ||
| 661 | + responseTime: putTime, | ||
| 662 | + answerOptions: JSON.stringify(result), | ||
| 663 | + socialSecurityCardNumber: this.model1.socialSecurityCardNumber, | ||
| 664 | + createTime: this.currentTime(), | ||
| 665 | + opinion: this.model1.opinion, | ||
| 666 | + questionnaireScore: totalScore, | ||
| 667 | + question: obj.question | ||
| 668 | + } | ||
| 669 | + | ||
| 670 | + console.log(tijiaoObj) | ||
| 671 | + | ||
| 672 | + NET.request(API.wenjuanUp, tijiaoObj, 'post').then(res => { | ||
| 673 | + // this.show =true | ||
| 674 | + | ||
| 675 | + if (res.data == 'false') { | ||
| 676 | + uni.reLaunch({ | ||
| 677 | + url: `/pages_category_page1/question/succe?chonfu=true` | ||
| 678 | + }) | ||
| 679 | + } else { | ||
| 680 | + uni.reLaunch({ | ||
| 681 | + url: `/pages_category_page1/question/succe?ids=${this.wenjuanIds}` | ||
| 682 | + }) | ||
| 683 | + } | ||
| 684 | + | ||
| 685 | + }) | ||
| 686 | + | ||
| 687 | + }, | ||
| 688 | + | ||
| 689 | + isChineseOrPunctuation(str) { | ||
| 690 | + const regex = /[^\d]/; | ||
| 691 | + return regex.test(str); | ||
| 692 | + }, | ||
| 693 | + | ||
| 694 | + | ||
| 695 | + // radioChange(index, e, item, idx) { | ||
| 696 | + // console.log(index, e, item, idx) | ||
| 697 | + | ||
| 698 | + // // item.value = idx; | ||
| 699 | + // // this.$forceUpdate(); | ||
| 700 | + | ||
| 701 | + // }, | ||
| 702 | + radioChange(ind) { | ||
| 703 | + // console.log(index, e, item, idx) | ||
| 704 | + // console.error(this.items) | ||
| 705 | + // for (let i = 0; i < this.items.length; i++) { | ||
| 706 | + // if (this.items[i].value === evt.detail.value) { | ||
| 707 | + // this.current = i; | ||
| 708 | + // break; | ||
| 709 | + // } | ||
| 710 | + // } | ||
| 711 | + // item.value = idx; | ||
| 712 | + // this.$forceUpdate(); | ||
| 713 | + | ||
| 714 | + }, | ||
| 715 | + checkboxChange(index, e, item, idx) { | ||
| 716 | + | ||
| 717 | + // const index1 = item.value.indexOf(idx) | ||
| 718 | + // if (index1 !== -1) { | ||
| 719 | + // item.value.splice(index1, 1); | ||
| 720 | + // } else { | ||
| 721 | + // item.value.push(idx) | ||
| 722 | + // } | ||
| 723 | + // this.$forceUpdate(); | ||
| 724 | + }, | ||
| 725 | + chooseAnswerOne(options, chooseItem, idx) { | ||
| 726 | + | ||
| 727 | + options.forEach(item => { | ||
| 728 | + item.disabled = false | ||
| 729 | + }) | ||
| 730 | + | ||
| 731 | + for (let key in this.wenjuan.question) { | ||
| 732 | + this.wenjuan.question[key].options.map(res => { | ||
| 733 | + if (res.answer == chooseItem.answer) { | ||
| 734 | + this.wenjuan.question[key].choose = chooseItem.answer | ||
| 735 | + } | ||
| 736 | + }) | ||
| 737 | + | ||
| 738 | + | ||
| 739 | + } | ||
| 740 | + | ||
| 741 | + this.myChoose = { | ||
| 742 | + ...chooseItem | ||
| 743 | + } | ||
| 744 | + chooseItem.disabled = true | ||
| 745 | + }, | ||
| 746 | + chooseAnswerMore(chooseItem, idx, item) { | ||
| 747 | + if (item.maxChoose && item.maxChoose > 0) { | ||
| 748 | + // 获取当前题目的已选中选项数量 | ||
| 749 | + const selectedCount = item.options.filter(option => option.disabled).length; | ||
| 750 | + // 如果已选中到达 maxChoose,并且当前项未被选中,则不允许选择 | ||
| 751 | + if (selectedCount >= item.maxChoose && !chooseItem.disabled) { | ||
| 752 | + uni.showToast({ | ||
| 753 | + title: `最多只能选择 ${item.maxChoose} 个选项`, | ||
| 754 | + icon: 'none', | ||
| 755 | + duration: 2000 | ||
| 756 | + }); | ||
| 757 | + return; | ||
| 758 | + } | ||
| 759 | + } | ||
| 760 | + | ||
| 761 | + | ||
| 762 | + | ||
| 763 | + if (chooseItem.disabled) { | ||
| 764 | + chooseItem.disabled = false | ||
| 765 | + for (let key in this.wenjuan.question) { | ||
| 766 | + this.wenjuan.question[key].options.map(res => { | ||
| 767 | + if (res.answer == chooseItem.answer) { | ||
| 768 | + this.wenjuan.question[key].choose = '' | ||
| 769 | + } | ||
| 770 | + }) | ||
| 771 | + } | ||
| 772 | + } else { | ||
| 773 | + for (let key in this.wenjuan.question) { | ||
| 774 | + this.wenjuan.question[key].options.map(res => { | ||
| 775 | + if (res.answer == chooseItem.answer) { | ||
| 776 | + this.wenjuan.question[key].choose = chooseItem.answer | ||
| 777 | + } | ||
| 778 | + }) | ||
| 779 | + } | ||
| 780 | + chooseItem.disabled = true | ||
| 781 | + } | ||
| 782 | + }, | ||
| 783 | + chooseAnswer(item) { | ||
| 784 | + console.log(1111); | ||
| 785 | + } | ||
| 786 | + // chooseAnswerMore(chooseItem, idx) { | ||
| 787 | + // // 获取所有已选中的选项数量 | ||
| 788 | + | ||
| 789 | + // if (chooseItem.disabled) { | ||
| 790 | + // chooseItem.disabled = false | ||
| 791 | + // for (let key in this.wenjuan.question) { | ||
| 792 | + // this.wenjuan.question[key].options.map(res => { | ||
| 793 | + // if (res.answer == chooseItem.answer) { | ||
| 794 | + // this.wenjuan.question[key].choose = '' | ||
| 795 | + // } | ||
| 796 | + // }) | ||
| 797 | + // } | ||
| 798 | + // } else { | ||
| 799 | + // for (let key in this.wenjuan.question) { | ||
| 800 | + // this.wenjuan.question[key].options.map(res => { | ||
| 801 | + // if (res.answer == chooseItem.answer) { | ||
| 802 | + // this.wenjuan.question[key].choose = chooseItem.answer | ||
| 803 | + // } | ||
| 804 | + // }) | ||
| 805 | + // } | ||
| 806 | + // chooseItem.disabled = true | ||
| 807 | + // } | ||
| 808 | + // } | ||
| 809 | + | ||
| 810 | + } | ||
| 811 | + }; | ||
| 812 | +</script> | ||
| 813 | + | ||
| 814 | +<style> | ||
| 815 | + /* 整体页面背景渐变颜色设置 */ | ||
| 816 | + body { | ||
| 817 | + background: linear-gradient(to bottom, #e9f2f8, #d0e0ea); | ||
| 818 | + font-family: Arial, sans-serif; | ||
| 819 | + line-height: 1.6; | ||
| 820 | + height: 100vh; | ||
| 821 | + display: flex; | ||
| 822 | + flex-direction: column; | ||
| 823 | + align-items: center; | ||
| 824 | + justify-content: flex-start; | ||
| 825 | + margin: 0; | ||
| 826 | + padding: 0; | ||
| 827 | + } | ||
| 828 | + | ||
| 829 | + .question { | ||
| 830 | + background-color: white; | ||
| 831 | + padding: 15px; | ||
| 832 | + margin: 10px 0; | ||
| 833 | + border-radius: 10px; | ||
| 834 | + } | ||
| 835 | + | ||
| 836 | + /* 问卷容器样式,确保宽度自适应且不超出屏幕,设置内边距和背景等 */ | ||
| 837 | + .questionnaire { | ||
| 838 | + width: 100%; | ||
| 839 | + max-width: 600px; | ||
| 840 | + flex-grow: 1; | ||
| 841 | + margin: auto; | ||
| 842 | + /* padding: 30px; */ | ||
| 843 | + background-color: white; | ||
| 844 | + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
| 845 | + border-radius: 5px; | ||
| 846 | + box-sizing: border-box; | ||
| 847 | + } | ||
| 848 | + | ||
| 849 | + /* 页面标题样式,设置背景色、文字颜色、宽度及内边距等 */ | ||
| 850 | + h3 { | ||
| 851 | + text-align: center; | ||
| 852 | + color: #000; | ||
| 853 | + /* background-color: #007BFF; */ | ||
| 854 | + margin: 0; | ||
| 855 | + padding: 10px 0; | ||
| 856 | + width: 100%; | ||
| 857 | + box-sizing: border-box; | ||
| 858 | + } | ||
| 859 | + | ||
| 860 | + /* 问题标题样式,设置字体大小、颜色及下边框 */ | ||
| 861 | + .question-title { | ||
| 862 | + font-size: 18px; | ||
| 863 | + color: #000; | ||
| 864 | + margin-bottom: 10px; | ||
| 865 | + } | ||
| 866 | + | ||
| 867 | + /* 选项样式,设置列表样式及光标样式 */ | ||
| 868 | + .option { | ||
| 869 | + list-style-type: none; | ||
| 870 | + margin: 0; | ||
| 871 | + cursor: pointer; | ||
| 872 | + display: flex; | ||
| 873 | + align-items: center; | ||
| 874 | + margin-bottom: 10px; | ||
| 875 | + color: black; | ||
| 876 | + padding: 10px 20px; | ||
| 877 | + border-radius: 3px; | ||
| 878 | + transition: background-color 0.3s ease; | ||
| 879 | + margin-right: 10px; | ||
| 880 | + font-size: 15px; | ||
| 881 | + font-weight: 500; | ||
| 882 | + | ||
| 883 | + .u-radio__label { | ||
| 884 | + color: #000000; | ||
| 885 | + font-size: 15px; | ||
| 886 | + font-weight: 500; | ||
| 887 | + } | ||
| 888 | + } | ||
| 889 | + | ||
| 890 | + .myOption { | ||
| 891 | + margin: 0; | ||
| 892 | + cursor: pointer; | ||
| 893 | + display: flex; | ||
| 894 | + align-items: center; | ||
| 895 | + margin-bottom: 10px; | ||
| 896 | + padding: 15px 20px; | ||
| 897 | + border-radius: 3px; | ||
| 898 | + transition: background-color 0.3s ease; | ||
| 899 | + margin-right: 10px; | ||
| 900 | + font-size: 16px; | ||
| 901 | + color: #000; | ||
| 902 | + font-family: 'Alibaba PuHuiTi 2.0-55 Regular'; | ||
| 903 | + letter-spacing: 1px; | ||
| 904 | + overflow: hidden; | ||
| 905 | + position: relative; | ||
| 906 | + | ||
| 907 | + .chooseTag { | ||
| 908 | + position: absolute; | ||
| 909 | + top: 0; | ||
| 910 | + right: 0; | ||
| 911 | + width: 20px; | ||
| 912 | + height: 20px; | ||
| 913 | + background-color: #0fbb59; | ||
| 914 | + border-radius: 0 0 0 20px; | ||
| 915 | + display: flex; | ||
| 916 | + align-items: center; | ||
| 917 | + justify-content: center; | ||
| 918 | + | ||
| 919 | + .u-icon__icon { | ||
| 920 | + margin-left: 4px; | ||
| 921 | + margin-bottom: 2px; | ||
| 922 | + } | ||
| 923 | + } | ||
| 924 | + } | ||
| 925 | + | ||
| 926 | + .green { | ||
| 927 | + background-color: #cff4de; | ||
| 928 | + | ||
| 929 | + .u-radio__label { | ||
| 930 | + color: #12ad55; | ||
| 931 | + } | ||
| 932 | + } | ||
| 933 | + | ||
| 934 | + .gary { | ||
| 935 | + | ||
| 936 | + background-color: #f5f5f5; | ||
| 937 | + | ||
| 938 | + } | ||
| 939 | + | ||
| 940 | + .optionActive { | ||
| 941 | + background-color: #cff4de; | ||
| 942 | + color: #12ad55; | ||
| 943 | + } | ||
| 944 | + | ||
| 945 | + | ||
| 946 | + /* 文本域样式,设置宽度、高度、边框及内边距 */ | ||
| 947 | + textarea { | ||
| 948 | + width: 100%; | ||
| 949 | + height: 100px; | ||
| 950 | + border: 1px solid #ccc; | ||
| 951 | + border-radius: 3px; | ||
| 952 | + padding: 10px; | ||
| 953 | + resize: vertical; | ||
| 954 | + box-sizing: border-box; | ||
| 955 | + } | ||
| 956 | + | ||
| 957 | + /* 提交按钮样式,设置背景色、颜色、边框、内边距、光标及过渡效果 */ | ||
| 958 | + .submit-btn { | ||
| 959 | + background-color: #3F9B6A; | ||
| 960 | + color: white; | ||
| 961 | + border: none; | ||
| 962 | + padding: 0px 20px; | ||
| 963 | + border-radius: 3px; | ||
| 964 | + cursor: pointer; | ||
| 965 | + margin-top: 20px; | ||
| 966 | + transition: background-color 0.3s ease; | ||
| 967 | + width: 100%; | ||
| 968 | + box-sizing: border-box; | ||
| 969 | + } | ||
| 970 | + | ||
| 971 | + /* 提交按钮悬停效果,改变背景色 */ | ||
| 972 | + .submit-btn:hover { | ||
| 973 | + background-color: #3F9B6A; | ||
| 974 | + } | ||
| 975 | + | ||
| 976 | + .uni-checkbox-input { | ||
| 977 | + width: 15px; | ||
| 978 | + height: 15px; | ||
| 979 | + } | ||
| 980 | + | ||
| 981 | + .uni-radio-input { | ||
| 982 | + width: 15px; | ||
| 983 | + height: 15px; | ||
| 984 | + } | ||
| 985 | + | ||
| 986 | + ::v-deep .u-radio__label { | ||
| 987 | + white-space: normal !important; | ||
| 988 | + /* 允许文本换行 */ | ||
| 989 | + word-break: break-all !important; | ||
| 990 | + /* 当内容过长时,自动换行 */ | ||
| 991 | + } | ||
| 992 | + | ||
| 993 | + ::v-deep .myMultiple { | ||
| 994 | + display: flex; | ||
| 995 | + width: 100%; | ||
| 996 | + flex-wrap: wrap; | ||
| 997 | + | ||
| 998 | + } | ||
| 999 | +</style> | ||
| 0 | \ No newline at end of file | 1000 | \ No newline at end of file |
wenjuan-h5/pages_category_page1/question/question.vue
| @@ -6,11 +6,11 @@ | @@ -6,11 +6,11 @@ | ||
| 6 | <view> | 6 | <view> |
| 7 | <h2 | 7 | <h2 |
| 8 | style="color: #000;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;text-align:center"> | 8 | style="color: #000;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;text-align:center"> |
| 9 | - {{wenjuan.title}} | 9 | + {{ wenjuan.title }} |
| 10 | </h2> | 10 | </h2> |
| 11 | <!-- <h5 style="padding: 10px 0;color: #000;">请您认真作答以下题目</h5> --> | 11 | <!-- <h5 style="padding: 10px 0;color: #000;">请您认真作答以下题目</h5> --> |
| 12 | <view class="" style="padding: 10px 0; height: 200px;"> | 12 | <view class="" style="padding: 10px 0; height: 200px;"> |
| 13 | - <image :src="this.$hostUrl+wenjuan.coverImage" mode="scaleToFill" | 13 | + <image :src="this.$hostUrl + wenjuan.coverImage" mode="scaleToFill" |
| 14 | style="width:100%;height: 100%;border-radius: 10px;"></image> | 14 | style="width:100%;height: 100%;border-radius: 10px;"></image> |
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| @@ -32,15 +32,15 @@ | @@ -32,15 +32,15 @@ | ||
| 32 | <!-- <view>预计答题时间:{{this.wenjuan.estimatedTime}}分钟</view> --> | 32 | <!-- <view>预计答题时间:{{this.wenjuan.estimatedTime}}分钟</view> --> |
| 33 | </view> | 33 | </view> |
| 34 | </view> | 34 | </view> |
| 35 | - <view class="question" v-for="(item,index) in wenjuan.question" style=""> | 35 | + <view class="question" v-for="(item, index) in wenjuan.question" style=""> |
| 36 | <p class="question-title" | 36 | <p class="question-title" |
| 37 | style="font-weight:600;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;"> | 37 | style="font-weight:600;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;"> |
| 38 | - <span v-if="item.required=='必填'" style="color: red;">*</span>{{index}}.<span | ||
| 39 | - style="color:#0FBB59;padding:0 3px;">({{item.type}})</span> | ||
| 40 | - {{item.title}} | 38 | + <span v-if="item.required == '必填'" style="color: red;">*</span>{{ index }}.<span |
| 39 | + style="color:#0FBB59;padding:0 3px;">({{ item.type }})</span> | ||
| 40 | + {{ item.title }} | ||
| 41 | </p> | 41 | </p> |
| 42 | <view> | 42 | <view> |
| 43 | - | 43 | + |
| 44 | <!-- <radio-group @change="radioChange" v-model="item.choose" | 44 | <!-- <radio-group @change="radioChange" v-model="item.choose" |
| 45 | v-if="item.type =='单选'" > | 45 | v-if="item.type =='单选'" > |
| 46 | <label :class="item.choose == val ?'option green':'option gary' " :key="val.answer" v-for="(val, idx) in item.options"> | 46 | <label :class="item.choose == val ?'option green':'option gary' " :key="val.answer" v-for="(val, idx) in item.options"> |
| @@ -51,37 +51,39 @@ | @@ -51,37 +51,39 @@ | ||
| 51 | <view>{{val.answer}}</view> | 51 | <view>{{val.answer}}</view> |
| 52 | </label> | 52 | </label> |
| 53 | </radio-group> --> | 53 | </radio-group> --> |
| 54 | - <u-radio-group v-model="item.choose" v-if="item.type =='单选'" style="width: 100%;"> | ||
| 55 | - <view v-if="item.layoutType!=2"> | 54 | + <u-radio-group v-model="item.choose" v-if="item.type == '单选'" style="width: 100%;"> |
| 55 | + <view v-if="item.layoutType != 2"> | ||
| 56 | <u-radio v-for="(val, idx) in item.options" style="width: 100%;" | 56 | <u-radio v-for="(val, idx) in item.options" style="width: 100%;" |
| 57 | - :class="val.answer == item.choose ?'option green':'option gary' " :name="val.answer" | 57 | + :class="val.answer == item.choose ? 'option green' : 'option gary'" :name="val.answer" |
| 58 | :disabled="item.disabled" :key="idx" :label-disabled="false" active-color="#4FCF86"> | 58 | :disabled="item.disabled" :key="idx" :label-disabled="false" active-color="#4FCF86"> |
| 59 | - {{val.answer}} | 59 | + {{ val.answer }} |
| 60 | </u-radio> | 60 | </u-radio> |
| 61 | </view> | 61 | </view> |
| 62 | - <view v-else-if="item.layoutType==2" class="myMultiple"> | 62 | + <view v-else-if="item.layoutType == 2" class="myMultiple"> |
| 63 | <div v-for="(val, idx) in item.options" | 63 | <div v-for="(val, idx) in item.options" |
| 64 | - :class="['myOption gary',{optionActive:myChoose.answer == val.answer}]" :key="idx" | ||
| 65 | - @click="chooseAnswerOne(item.options,val,idx)"> | ||
| 66 | - <p class="chooseTag" v-if="myChoose.answer == val.answer"><u-icon name="checkbox-mark" color="#fff" size="8pt" ></u-icon></p> | ||
| 67 | - {{val.answer}} | 64 | + :class="['myOption gary', { optionActive: myChoose.answer == val.answer }]" :key="idx" |
| 65 | + @click="chooseAnswerOne(item.options, val, idx)"> | ||
| 66 | + <p class="chooseTag" v-if="myChoose.answer == val.answer"><u-icon name="checkbox-mark" | ||
| 67 | + color="#fff" size="8pt"></u-icon></p> | ||
| 68 | + {{ val.answer }} | ||
| 68 | </div> | 69 | </div> |
| 69 | </view> | 70 | </view> |
| 70 | </u-radio-group> | 71 | </u-radio-group> |
| 71 | - | ||
| 72 | - <u-checkbox-group v-model="item.choose" v-if="item.type =='多选'" style="width: 100%;"> | ||
| 73 | - <view v-if="item.layoutType!=2"> | 72 | + |
| 73 | + <u-checkbox-group v-model="item.choose" v-if="item.type == '多选'" style="width: 100%;"> | ||
| 74 | + <view v-if="item.layoutType != 2"> | ||
| 74 | <u-checkbox v-for="(val, idx) in item.options" style="width: 100%;" | 75 | <u-checkbox v-for="(val, idx) in item.options" style="width: 100%;" |
| 75 | - :class="val.disabled ?'option green':'option gary' " v-model="val.disabled" | 76 | + :class="val.disabled ? 'option green' : 'option gary'" v-model="val.disabled" |
| 76 | :label-disabled="false" :name="val.answer" :key="idx" active-color="#4FCF86" | 77 | :label-disabled="false" :name="val.answer" :key="idx" active-color="#4FCF86" |
| 77 | - @click="chooseAnswer(val)">{{val.answer}}</u-checkbox> | 78 | + @click="chooseAnswer(val)">{{ val.answer }}</u-checkbox> |
| 78 | </view> | 79 | </view> |
| 79 | - <view v-else-if="item.layoutType==2" class="myMultiple"> | 80 | + <view v-else-if="item.layoutType == 2" class="myMultiple"> |
| 80 | <div v-for="(val, index) in item.options" | 81 | <div v-for="(val, index) in item.options" |
| 81 | - :class="['myOption gary',{optionActive:val.disabled==true}]" | ||
| 82 | - :key="index" @click="chooseAnswerMore(val,index)"> | ||
| 83 | - <p class="chooseTag" v-if="val.disabled==true"><u-icon name="checkbox-mark" color="#fff" size="8pt" ></u-icon></p> | ||
| 84 | - {{val.answer}} | 82 | + :class="['myOption gary', { optionActive: val.disabled == true }]" :key="index" |
| 83 | + @click="chooseAnswerMore(val, index)"> | ||
| 84 | + <p class="chooseTag" v-if="val.disabled == true"><u-icon name="checkbox-mark" | ||
| 85 | + color="#fff" size="8pt"></u-icon></p> | ||
| 86 | + {{ val.answer }} | ||
| 85 | </div> | 87 | </div> |
| 86 | </view> | 88 | </view> |
| 87 | </u-checkbox-group> | 89 | </u-checkbox-group> |
| @@ -99,7 +101,7 @@ | @@ -99,7 +101,7 @@ | ||
| 99 | 101 | ||
| 100 | </label> | 102 | </label> |
| 101 | </checkbox-group> --> | 103 | </checkbox-group> --> |
| 102 | - <view v-if="item.type =='文本'"> | 104 | + <view v-if="item.type == '文本'"> |
| 103 | <u-input type="textarea" v-model="item.choose" placeholder="请输入" :border="true"></u-input> | 105 | <u-input type="textarea" v-model="item.choose" placeholder="请输入" :border="true"></u-input> |
| 104 | </view> | 106 | </view> |
| 105 | </view> | 107 | </view> |
| @@ -111,27 +113,27 @@ | @@ -111,27 +113,27 @@ | ||
| 111 | <textarea v-model="suggestion"></textarea> --> | 113 | <textarea v-model="suggestion"></textarea> --> |
| 112 | <u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" validate-on-rule-change="false" | 114 | <u-form labelPosition="left" :model="model1" :rules="rules" ref="uForm" validate-on-rule-change="false" |
| 113 | style="background-color:#fff;border-radius: 10px;"> | 115 | style="background-color:#fff;border-radius: 10px;"> |
| 114 | - <u-form-item label="姓名" prop="name" borderBottom ref="item1" v-if="wenjuan.needName =='必填'" | 116 | + <u-form-item label="姓名" prop="name" borderBottom ref="item1" v-if="wenjuan.needName == '必填'" |
| 115 | style="padding:10px 20px 0;"> | 117 | style="padding:10px 20px 0;"> |
| 116 | <u-input v-model="model1.name" placeholder="请输入姓名"></u-input> | 118 | <u-input v-model="model1.name" placeholder="请输入姓名"></u-input> |
| 117 | </u-form-item> | 119 | </u-form-item> |
| 118 | - <u-form-item label="电话" prop="phone" borderBottom v-if="wenjuan.needPhone =='必填'" | 120 | + <u-form-item label="电话" prop="phone" borderBottom v-if="wenjuan.needPhone == '必填'" |
| 119 | style="padding: 0 20px;"> | 121 | style="padding: 0 20px;"> |
| 120 | <u-input v-model="model1.phone" placeholder="请输入电话"></u-input> | 122 | <u-input v-model="model1.phone" placeholder="请输入电话"></u-input> |
| 121 | </u-form-item> | 123 | </u-form-item> |
| 122 | - <u-form-item label="性别" prop="sexl" borderBottom v-if="wenjuan.needGender =='必填'" | 124 | + <u-form-item label="性别" prop="sexl" borderBottom v-if="wenjuan.needGender == '必填'" |
| 123 | style="padding: 0 20px ;"> | 125 | style="padding: 0 20px ;"> |
| 124 | <!-- <u-input v-model="model1.sexl" placeholder="请输入性别"></u-input> --> | 126 | <!-- <u-input v-model="model1.sexl" placeholder="请输入性别"></u-input> --> |
| 125 | <u-radio-group v-model="model1.sexl"> | 127 | <u-radio-group v-model="model1.sexl"> |
| 126 | <u-radio active-color="#0FBB59" @change="radioChange" v-for="(item, index) in SexList" | 128 | <u-radio active-color="#0FBB59" @change="radioChange" v-for="(item, index) in SexList" |
| 127 | :key="index" :name="item.name" :disabled="item.disabled"> | 129 | :key="index" :name="item.name" :disabled="item.disabled"> |
| 128 | - {{item.name}} | 130 | + {{ item.name }} |
| 129 | </u-radio> | 131 | </u-radio> |
| 130 | </u-radio-group> | 132 | </u-radio-group> |
| 131 | </u-form-item> | 133 | </u-form-item> |
| 132 | 134 | ||
| 133 | 135 | ||
| 134 | - <view v-if="wenjuan.needOpinion =='必填'" style="padding:0 20px 10px 20px;"> | 136 | + <view v-if="wenjuan.needOpinion == '必填'" style="padding:0 20px 10px 20px;"> |
| 135 | <view style="margin-bottom:10px;">意见</view> | 137 | <view style="margin-bottom:10px;">意见</view> |
| 136 | 138 | ||
| 137 | <u-input v-model="model1.opinion" type="textarea" :border="true" :maxlength="maxLength" /> | 139 | <u-input v-model="model1.opinion" type="textarea" :border="true" :maxlength="maxLength" /> |
| @@ -174,7 +176,7 @@ | @@ -174,7 +176,7 @@ | ||
| 174 | phone: '', | 176 | phone: '', |
| 175 | sexl: '', | 177 | sexl: '', |
| 176 | opinion: '', | 178 | opinion: '', |
| 177 | - socialSecurityCardNumber:'' | 179 | + socialSecurityCardNumber: '' |
| 178 | }, | 180 | }, |
| 179 | wenjuan: { | 181 | wenjuan: { |
| 180 | 182 | ||
| @@ -219,9 +221,9 @@ | @@ -219,9 +221,9 @@ | ||
| 219 | token: '', | 221 | token: '', |
| 220 | myChoose: {}, | 222 | myChoose: {}, |
| 221 | myChooseItem: [ | 223 | myChooseItem: [ |
| 222 | - | 224 | + |
| 223 | ], | 225 | ], |
| 224 | - panduan:false | 226 | + panduan: false |
| 225 | }; | 227 | }; |
| 226 | }, | 228 | }, |
| 227 | computed: { | 229 | computed: { |
| @@ -240,7 +242,7 @@ | @@ -240,7 +242,7 @@ | ||
| 240 | } | 242 | } |
| 241 | NET.request(API.jietoken, obj, 'get').then(res => { | 243 | NET.request(API.jietoken, obj, 'get').then(res => { |
| 242 | if (typeof res.data == 'string') { | 244 | if (typeof res.data == 'string') { |
| 243 | - | 245 | + |
| 244 | if (JSON.parse(res.data).phone) { | 246 | if (JSON.parse(res.data).phone) { |
| 245 | this.model1.phone = Number(JSON.parse(res.data).phone) | 247 | this.model1.phone = Number(JSON.parse(res.data).phone) |
| 246 | } | 248 | } |
| @@ -251,7 +253,7 @@ | @@ -251,7 +253,7 @@ | ||
| 251 | this.model1.sexl = JSON.parse(res.data).aac004 | 253 | this.model1.sexl = JSON.parse(res.data).aac004 |
| 252 | this.panduan = true | 254 | this.panduan = true |
| 253 | } | 255 | } |
| 254 | - if (JSON.parse(res.data).aac002Mask) { | 256 | + if (JSON.parse(res.data).aac002Mask) { |
| 255 | this.model1.socialSecurityCardNumber = JSON.parse(res.data).aac002Mask | 257 | this.model1.socialSecurityCardNumber = JSON.parse(res.data).aac002Mask |
| 256 | } | 258 | } |
| 257 | } | 259 | } |
| @@ -272,7 +274,13 @@ | @@ -272,7 +274,13 @@ | ||
| 272 | if (res.data.id) { | 274 | if (res.data.id) { |
| 273 | this.wenjuan = res.data | 275 | this.wenjuan = res.data |
| 274 | this.wenjuan.question = JSON.parse(res.data.question) | 276 | this.wenjuan.question = JSON.parse(res.data.question) |
| 275 | - | 277 | + //检查this.wenjuan.question这个list的每个里面是否有maxChoose参数,没有的话就加一个 |
| 278 | + this.wenjuan.question.forEach(item => { | ||
| 279 | + if (!item.maxChoose) { | ||
| 280 | + item.maxChoose = 0 | ||
| 281 | + } | ||
| 282 | + }) | ||
| 283 | + | ||
| 276 | 284 | ||
| 277 | this.timeLeft = parseInt(this.wenjuan.estimatedTime, 10) * 60; // 将分钟转换为秒 | 285 | this.timeLeft = parseInt(this.wenjuan.estimatedTime, 10) * 60; // 将分钟转换为秒 |
| 278 | this.updateCountdownDisplay() | 286 | this.updateCountdownDisplay() |
| @@ -368,7 +376,7 @@ | @@ -368,7 +376,7 @@ | ||
| 368 | if (question.required === '必填') { | 376 | if (question.required === '必填') { |
| 369 | if (question.type === '文本' || question.type === '单选') { | 377 | if (question.type === '文本' || question.type === '单选') { |
| 370 | if (question.choose === '') { | 378 | if (question.choose === '') { |
| 371 | - | 379 | + |
| 372 | this.$refs.uToast.show({ | 380 | this.$refs.uToast.show({ |
| 373 | title: '请填写所有必填题目', | 381 | title: '请填写所有必填题目', |
| 374 | }) | 382 | }) |
| @@ -384,7 +392,7 @@ | @@ -384,7 +392,7 @@ | ||
| 384 | this.$refs.uToast.show({ | 392 | this.$refs.uToast.show({ |
| 385 | title: '请填写所有必填题目', | 393 | title: '请填写所有必填题目', |
| 386 | }) | 394 | }) |
| 387 | - | 395 | + |
| 388 | return false; // 返回false表示有未填写的必填题目 | 396 | return false; // 返回false表示有未填写的必填题目 |
| 389 | } | 397 | } |
| 390 | } | 398 | } |
| @@ -393,15 +401,11 @@ | @@ -393,15 +401,11 @@ | ||
| 393 | return true; // 返回true表示所有必填题目都已填写 | 401 | return true; // 返回true表示所有必填题目都已填写 |
| 394 | }, | 402 | }, |
| 395 | submit() { | 403 | submit() { |
| 396 | - | ||
| 397 | let putTime = this.getCurrentTimestamp() - this.pageTime | 404 | let putTime = this.getCurrentTimestamp() - this.pageTime |
| 398 | putTime = (putTime / 1000).toFixed(2) | 405 | putTime = (putTime / 1000).toFixed(2) |
| 399 | - | ||
| 400 | if (!this.checkRequiredQuestions(this.wenjuan.question)) { | 406 | if (!this.checkRequiredQuestions(this.wenjuan.question)) { |
| 401 | return | 407 | return |
| 402 | } | 408 | } |
| 403 | - | ||
| 404 | - | ||
| 405 | if (this.model1.name == '' && this.wenjuan.needName == '必填') { | 409 | if (this.model1.name == '' && this.wenjuan.needName == '必填') { |
| 406 | this.$refs.uToast.show({ | 410 | this.$refs.uToast.show({ |
| 407 | title: '请输入姓名', | 411 | title: '请输入姓名', |
| @@ -429,7 +433,7 @@ | @@ -429,7 +433,7 @@ | ||
| 429 | // if(this.wenjuan.needPhone =='不填' && this.wenjuan.fillingConditions == '可重复填写'){ | 433 | // if(this.wenjuan.needPhone =='不填' && this.wenjuan.fillingConditions == '可重复填写'){ |
| 430 | // this.model1.phone = '' | 434 | // this.model1.phone = '' |
| 431 | // } | 435 | // } |
| 432 | - | 436 | + |
| 433 | if (this.model1.sexl != '男' && this.model1.sexl != '女' && this.wenjuan.needGender == '必填') { | 437 | if (this.model1.sexl != '男' && this.model1.sexl != '女' && this.wenjuan.needGender == '必填') { |
| 434 | this.$refs.uToast.show({ | 438 | this.$refs.uToast.show({ |
| 435 | title: '请选择性别', | 439 | title: '请选择性别', |
| @@ -656,7 +660,7 @@ | @@ -656,7 +660,7 @@ | ||
| 656 | gender: this.model1.sexl, | 660 | gender: this.model1.sexl, |
| 657 | responseTime: putTime, | 661 | responseTime: putTime, |
| 658 | answerOptions: JSON.stringify(result), | 662 | answerOptions: JSON.stringify(result), |
| 659 | - socialSecurityCardNumber:this.model1.socialSecurityCardNumber, | 663 | + socialSecurityCardNumber: this.model1.socialSecurityCardNumber, |
| 660 | createTime: this.currentTime(), | 664 | createTime: this.currentTime(), |
| 661 | opinion: this.model1.opinion, | 665 | opinion: this.model1.opinion, |
| 662 | questionnaireScore: totalScore, | 666 | questionnaireScore: totalScore, |
| @@ -719,47 +723,47 @@ | @@ -719,47 +723,47 @@ | ||
| 719 | // this.$forceUpdate(); | 723 | // this.$forceUpdate(); |
| 720 | }, | 724 | }, |
| 721 | chooseAnswerOne(options, chooseItem, idx) { | 725 | chooseAnswerOne(options, chooseItem, idx) { |
| 722 | - | 726 | + |
| 723 | options.forEach(item => { | 727 | options.forEach(item => { |
| 724 | item.disabled = false | 728 | item.disabled = false |
| 725 | }) | 729 | }) |
| 726 | - | 730 | + |
| 727 | for (let key in this.wenjuan.question) { | 731 | for (let key in this.wenjuan.question) { |
| 728 | - this.wenjuan.question[key].options.map(res=>{ | ||
| 729 | - if (res.answer == chooseItem.answer) { | ||
| 730 | - this.wenjuan.question[key].choose = chooseItem.answer | ||
| 731 | - } | ||
| 732 | - }) | ||
| 733 | - | ||
| 734 | - | 732 | + this.wenjuan.question[key].options.map(res => { |
| 733 | + if (res.answer == chooseItem.answer) { | ||
| 734 | + this.wenjuan.question[key].choose = chooseItem.answer | ||
| 735 | + } | ||
| 736 | + }) | ||
| 737 | + | ||
| 738 | + | ||
| 735 | } | 739 | } |
| 736 | - | 740 | + |
| 737 | this.myChoose = { | 741 | this.myChoose = { |
| 738 | ...chooseItem | 742 | ...chooseItem |
| 739 | } | 743 | } |
| 740 | chooseItem.disabled = true | 744 | chooseItem.disabled = true |
| 741 | }, | 745 | }, |
| 742 | chooseAnswerMore(chooseItem, idx) { | 746 | chooseAnswerMore(chooseItem, idx) { |
| 743 | - | ||
| 744 | - if(chooseItem.disabled){ | ||
| 745 | - chooseItem.disabled=false | ||
| 746 | - for (let key in this.wenjuan.question) { | ||
| 747 | - this.wenjuan.question[key].options.map(res=>{ | ||
| 748 | - if (res.answer == chooseItem.answer) { | ||
| 749 | - this.wenjuan.question[key].choose = '' | ||
| 750 | - } | ||
| 751 | - }) | ||
| 752 | - } | ||
| 753 | - }else{ | ||
| 754 | - for (let key in this.wenjuan.question) { | ||
| 755 | - this.wenjuan.question[key].options.map(res=>{ | ||
| 756 | - if (res.answer == chooseItem.answer) { | ||
| 757 | - this.wenjuan.question[key].choose = chooseItem.answer | ||
| 758 | - } | ||
| 759 | - }) | ||
| 760 | - } | ||
| 761 | - chooseItem.disabled=true | ||
| 762 | - } | 747 | + |
| 748 | + if (chooseItem.disabled) { | ||
| 749 | + chooseItem.disabled = false | ||
| 750 | + for (let key in this.wenjuan.question) { | ||
| 751 | + this.wenjuan.question[key].options.map(res => { | ||
| 752 | + if (res.answer == chooseItem.answer) { | ||
| 753 | + this.wenjuan.question[key].choose = '' | ||
| 754 | + } | ||
| 755 | + }) | ||
| 756 | + } | ||
| 757 | + } else { | ||
| 758 | + for (let key in this.wenjuan.question) { | ||
| 759 | + this.wenjuan.question[key].options.map(res => { | ||
| 760 | + if (res.answer == chooseItem.answer) { | ||
| 761 | + this.wenjuan.question[key].choose = chooseItem.answer | ||
| 762 | + } | ||
| 763 | + }) | ||
| 764 | + } | ||
| 765 | + chooseItem.disabled = true | ||
| 766 | + } | ||
| 763 | 767 | ||
| 764 | } | 768 | } |
| 765 | 769 | ||
| @@ -794,7 +798,7 @@ | @@ -794,7 +798,7 @@ | ||
| 794 | width: 100%; | 798 | width: 100%; |
| 795 | max-width: 600px; | 799 | max-width: 600px; |
| 796 | flex-grow: 1; | 800 | flex-grow: 1; |
| 797 | - margin:auto; | 801 | + margin: auto; |
| 798 | /* padding: 30px; */ | 802 | /* padding: 30px; */ |
| 799 | background-color: white; | 803 | background-color: white; |
| 800 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | 804 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| @@ -834,13 +838,15 @@ | @@ -834,13 +838,15 @@ | ||
| 834 | transition: background-color 0.3s ease; | 838 | transition: background-color 0.3s ease; |
| 835 | margin-right: 10px; | 839 | margin-right: 10px; |
| 836 | font-size: 15px; | 840 | font-size: 15px; |
| 837 | - font-weight:500; | ||
| 838 | - .u-radio__label{ | ||
| 839 | - color: #000000 ; | 841 | + font-weight: 500; |
| 842 | + | ||
| 843 | + .u-radio__label { | ||
| 844 | + color: #000000; | ||
| 840 | font-size: 15px; | 845 | font-size: 15px; |
| 841 | - font-weight:500; | 846 | + font-weight: 500; |
| 842 | } | 847 | } |
| 843 | } | 848 | } |
| 849 | + | ||
| 844 | .myOption { | 850 | .myOption { |
| 845 | margin: 0; | 851 | margin: 0; |
| 846 | cursor: pointer; | 852 | cursor: pointer; |
| @@ -857,7 +863,8 @@ | @@ -857,7 +863,8 @@ | ||
| 857 | letter-spacing: 1px; | 863 | letter-spacing: 1px; |
| 858 | overflow: hidden; | 864 | overflow: hidden; |
| 859 | position: relative; | 865 | position: relative; |
| 860 | - .chooseTag{ | 866 | + |
| 867 | + .chooseTag { | ||
| 861 | position: absolute; | 868 | position: absolute; |
| 862 | top: 0; | 869 | top: 0; |
| 863 | right: 0; | 870 | right: 0; |
| @@ -868,23 +875,26 @@ | @@ -868,23 +875,26 @@ | ||
| 868 | display: flex; | 875 | display: flex; |
| 869 | align-items: center; | 876 | align-items: center; |
| 870 | justify-content: center; | 877 | justify-content: center; |
| 871 | - .u-icon__icon{ | 878 | + |
| 879 | + .u-icon__icon { | ||
| 872 | margin-left: 4px; | 880 | margin-left: 4px; |
| 873 | margin-bottom: 2px; | 881 | margin-bottom: 2px; |
| 874 | } | 882 | } |
| 875 | } | 883 | } |
| 876 | } | 884 | } |
| 885 | + | ||
| 877 | .green { | 886 | .green { |
| 878 | background-color: #cff4de; | 887 | background-color: #cff4de; |
| 879 | - .u-radio__label{ | ||
| 880 | - color: #12ad55 ; | 888 | + |
| 889 | + .u-radio__label { | ||
| 890 | + color: #12ad55; | ||
| 881 | } | 891 | } |
| 882 | } | 892 | } |
| 883 | 893 | ||
| 884 | .gary { | 894 | .gary { |
| 885 | 895 | ||
| 886 | background-color: #f5f5f5; | 896 | background-color: #f5f5f5; |
| 887 | - | 897 | + |
| 888 | } | 898 | } |
| 889 | 899 | ||
| 890 | .optionActive { | 900 | .optionActive { |
wenjuan-pc/.env.development
| @@ -5,12 +5,14 @@ ENV = 'development' | @@ -5,12 +5,14 @@ ENV = 'development' | ||
| 5 | VUE_APP_BASE_API = '/dev-api' | 5 | VUE_APP_BASE_API = '/dev-api' |
| 6 | # VUE_APP_DOMAIN_PREFIX_1='http://192.168.2.120:9003' | 6 | # VUE_APP_DOMAIN_PREFIX_1='http://192.168.2.120:9003' |
| 7 | # VUE_APP_DOMAIN_PREFIX_2='http://192.168.2.120:9007' | 7 | # VUE_APP_DOMAIN_PREFIX_2='http://192.168.2.120:9007' |
| 8 | - VUE_APP_DOMAIN_PREFIX_1='https://h5.028wlkj.com/cdwlMall/admin-server/' | ||
| 9 | - VUE_APP_DOMAIN_PREFIX_2='https://h5.028wlkj.com/cdwlMall/meserver/api' | 8 | +# VUE_APP_DOMAIN_PREFIX_1='https://h5.028wlkj.com/cdwlMall/admin-server/' |
| 9 | +# VUE_APP_DOMAIN_PREFIX_2='https://h5.028wlkj.com/cdwlMall/meserver/api' | ||
| 10 | # VUE_APP_DOMAIN_PREFIX_1='http://172.16.61.48/meserver/admin-server/' | 10 | # VUE_APP_DOMAIN_PREFIX_1='http://172.16.61.48/meserver/admin-server/' |
| 11 | # VUE_APP_DOMAIN_PREFIX_2='http://172.16.61.48/meserver/api' | 11 | # VUE_APP_DOMAIN_PREFIX_2='http://172.16.61.48/meserver/api' |
| 12 | #VUE_APP_DOMAIN_PREFIX_1='http://172.16.61.123:80/cdwlMall/admin-server/' | 12 | #VUE_APP_DOMAIN_PREFIX_1='http://172.16.61.123:80/cdwlMall/admin-server/' |
| 13 | #VUE_APP_DOMAIN_PREFIX_2='http://172.16.61.123:80/cdwlMall/api' | 13 | #VUE_APP_DOMAIN_PREFIX_2='http://172.16.61.123:80/cdwlMall/api' |
| 14 | +VUE_APP_DOMAIN_PREFIX_1='https://jy.scjysm.asia:18086/meserver/admin-server' | ||
| 15 | +VUE_APP_DOMAIN_PREFIX_2='https://jy.scjysm.asia:18086/cdwlMall/meserver/api' | ||
| 14 | # 开发环境 | 16 | # 开发环境 |
| 15 | # 演示环境 | 17 | # 演示环境 |
| 16 | # VUE_APP_DOMAIN_PREFIX = '/api' | 18 | # VUE_APP_DOMAIN_PREFIX = '/api' |
wenjuan-pc/src/utils/request.js
| @@ -53,7 +53,7 @@ service.interceptors.response.use( | @@ -53,7 +53,7 @@ service.interceptors.response.use( | ||
| 53 | if (response.config.responseType === 'blob') { | 53 | if (response.config.responseType === 'blob') { |
| 54 | return response.data | 54 | return response.data |
| 55 | } | 55 | } |
| 56 | - if (res.code !== '' && res.code !== 200) { | 56 | + if (res.code !== '' && res.code !== 200&& res.code !== "200") { |
| 57 | Message({ | 57 | Message({ |
| 58 | message: res.message || 'Error', | 58 | message: res.message || 'Error', |
| 59 | type: 'error', | 59 | type: 'error', |
wenjuan-pc/src/views/investigation/index.vue
| @@ -3,8 +3,7 @@ | @@ -3,8 +3,7 @@ | ||
| 3 | <div class="zhuti"> | 3 | <div class="zhuti"> |
| 4 | <div style="height:58px;line-height:58px;"> | 4 | <div style="height:58px;line-height:58px;"> |
| 5 | <div style="color:#0006"> <span>问卷调查</span> <span style="padding:0 5px;">></span> <span | 5 | <div style="color:#0006"> <span>问卷调查</span> <span style="padding:0 5px;">></span> <span |
| 6 | - style="color:#000000e6" | ||
| 7 | - >问卷管理</span></div> | 6 | + style="color:#000000e6">问卷管理</span></div> |
| 8 | </div> | 7 | </div> |
| 9 | <!-- 线上 --> | 8 | <!-- 线上 --> |
| 10 | <div v-if="!tongjiBox"> | 9 | <div v-if="!tongjiBox"> |
| @@ -35,33 +34,25 @@ | @@ -35,33 +34,25 @@ | ||
| 35 | <div> | 34 | <div> |
| 36 | <el-button :disabled="isbutton" style="background-color: #3F9B6A;color: #fff" @click="onSubmit">查询 | 35 | <el-button :disabled="isbutton" style="background-color: #3F9B6A;color: #fff" @click="onSubmit">查询 |
| 37 | </el-button> | 36 | </el-button> |
| 38 | - <el-button | ||
| 39 | - class="buttonHover" | ||
| 40 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 41 | - @click="resetting" | ||
| 42 | - >重置 | 37 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 38 | + @click="resetting">重置 | ||
| 43 | </el-button> | 39 | </el-button> |
| 44 | </div> | 40 | </div> |
| 45 | </div> | 41 | </div> |
| 46 | <div style="margin-bottom: 20px;"> | 42 | <div style="margin-bottom: 20px;"> |
| 47 | <div> | 43 | <div> |
| 48 | - <el-button | ||
| 49 | - style="background-color: #3F9B6A;color: #fff;padding:8px 15px;" | ||
| 50 | - icon="el-icon-circle-plus-outline" | ||
| 51 | - @click="addggXin" | ||
| 52 | - >新增</el-button> | 44 | + <el-button style="background-color: #3F9B6A;color: #fff;padding:8px 15px;" |
| 45 | + icon="el-icon-circle-plus-outline" @click="addggXin">新增</el-button> | ||
| 53 | </div> | 46 | </div> |
| 54 | </div> | 47 | </div> |
| 55 | <!-- 表格 --> | 48 | <!-- 表格 --> |
| 56 | 49 | ||
| 57 | - <el-table | ||
| 58 | - :data="tableData.slice((currentPageList - 1) * pageSize, currentPageList * pageSize)" | ||
| 59 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 60 | - tooltip-effect="dark custom-tooltip-effect" | ||
| 61 | - > | 50 | + <el-table :data="tableData.slice((currentPageList - 1) * pageSize, currentPageList * pageSize)" |
| 51 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }" | ||
| 52 | + tooltip-effect="dark custom-tooltip-effect"> | ||
| 62 | <el-table-column label="序号" min-width="80"> | 53 | <el-table-column label="序号" min-width="80"> |
| 63 | <template slot-scope="scope"> | 54 | <template slot-scope="scope"> |
| 64 | - {{ scope.$index +1 }} | 55 | + {{ scope.$index + 1 }} |
| 65 | </template> | 56 | </template> |
| 66 | </el-table-column> | 57 | </el-table-column> |
| 67 | <!-- <el-table-column label="问卷编号" min-width="150" prop="id"> | 58 | <!-- <el-table-column label="问卷编号" min-width="150" prop="id"> |
| @@ -74,43 +65,31 @@ | @@ -74,43 +65,31 @@ | ||
| 74 | <el-table-column prop="createTime" label="创建时间" min-width="180" /> | 65 | <el-table-column prop="createTime" label="创建时间" min-width="180" /> |
| 75 | <el-table-column prop="reviewStatus" label="状态" min-width="120"> | 66 | <el-table-column prop="reviewStatus" label="状态" min-width="120"> |
| 76 | <template slot-scope="scope"> | 67 | <template slot-scope="scope"> |
| 77 | - {{ scope.row.reviewStatus == '1'?'待提交':scope.row.reviewStatus == '2'?'待审核':scope.row.reviewStatus == '3'?'已通过':scope.row.reviewStatus == '4'?'不通过':'已禁用' }} | 68 | + {{ scope.row.reviewStatus == '1' ? '待提交' : scope.row.reviewStatus == '2' ? '待审核' : scope.row.reviewStatus |
| 69 | + == | ||
| 70 | + '3' ? '已通过' : scope.row.reviewStatus == '4' ?'不通过':'已禁用' }} | ||
| 78 | </template> | 71 | </template> |
| 79 | </el-table-column> | 72 | </el-table-column> |
| 80 | <el-table-column label="操作" min-width="280"> | 73 | <el-table-column label="操作" min-width="280"> |
| 81 | <template slot-scope="scope"> | 74 | <template slot-scope="scope"> |
| 82 | - <div class="tableBtn greens" @click="details(0,scope.row)">查看</div> | ||
| 83 | - <div v-if="scope.row.reviewStatus =='1'" class="tableBtn greens" @click="bianls(scope.row)">编辑</div> | ||
| 84 | - <div v-if="scope.row.reviewStatus =='1'" class="tableBtn greens" @click="fabu('2',scope.row)">提交审核</div> | ||
| 85 | - <div v-if="scope.row.reviewStatus =='3'" class="tableBtn greens" @click="downs(scope.row)">禁用</div> | ||
| 86 | - <div | ||
| 87 | - v-if="scope.row.reviewStatus =='3' || scope.row.reviewStatus =='5'" | ||
| 88 | - class="tableBtn greens" | ||
| 89 | - @click="tongji(scope.row)" | ||
| 90 | - >统计</div> | ||
| 91 | - <div v-if="scope.row.reviewStatus =='1'" class="tableBtn greens" @click="delwen(scope.row)">删除</div> | ||
| 92 | - <div | ||
| 93 | - v-if="scope.row.reviewStatus =='3' || scope.row.reviewStatus =='1'" | ||
| 94 | - class="tableBtn greens" | ||
| 95 | - @click="yulan(scope.row)" | ||
| 96 | - >预览</div> | 75 | + <div class="tableBtn greens" @click="details(0, scope.row)">查看</div> |
| 76 | + <div v-if="scope.row.reviewStatus == '1'" class="tableBtn greens" @click="bianls(scope.row)">编辑</div> | ||
| 77 | + <div v-if="scope.row.reviewStatus == '1'" class="tableBtn greens" @click="fabu('2', scope.row)">提交审核</div> | ||
| 78 | + <div v-if="scope.row.reviewStatus == '3'" class="tableBtn greens" @click="downs(scope.row)">禁用</div> | ||
| 79 | + <div v-if="scope.row.reviewStatus == '3' || scope.row.reviewStatus == '5'" class="tableBtn greens" | ||
| 80 | + @click="tongji(scope.row)">统计</div> | ||
| 81 | + <div v-if="scope.row.reviewStatus == '1'" class="tableBtn greens" @click="delwen(scope.row)">删除</div> | ||
| 82 | + <div v-if="scope.row.reviewStatus == '3' || scope.row.reviewStatus == '1'" class="tableBtn greens" | ||
| 83 | + @click="yulan(scope.row)">预览</div> | ||
| 97 | <!-- <div @click="addbuss(3,scope.row)" class="tableBtn greens">终止</div> --> | 84 | <!-- <div @click="addbuss(3,scope.row)" class="tableBtn greens">终止</div> --> |
| 98 | </template> | 85 | </template> |
| 99 | </el-table-column> | 86 | </el-table-column> |
| 100 | </el-table> | 87 | </el-table> |
| 101 | <div style="display: flex;justify-content: space-between;margin-top: 10px;"> | 88 | <div style="display: flex;justify-content: space-between;margin-top: 10px;"> |
| 102 | <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ total }}</span> 条</div> | 89 | <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ total }}</span> 条</div> |
| 103 | - <el-pagination | ||
| 104 | - :current-page="currentPageList" | ||
| 105 | - :page-sizes="[10, 20, 50, 100]" | ||
| 106 | - :page-size="pageSize" | ||
| 107 | - background | ||
| 108 | - small | ||
| 109 | - layout="prev, pager, next" | ||
| 110 | - :total="total" | ||
| 111 | - @size-change="handleSizeChange" | ||
| 112 | - @current-change="handleCurrentChange" | ||
| 113 | - /> | 90 | + <el-pagination :current-page="currentPageList" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" |
| 91 | + background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange" | ||
| 92 | + @current-change="handleCurrentChange" /> | ||
| 114 | </div> | 93 | </div> |
| 115 | <!-- <div class="fenye"> | 94 | <!-- <div class="fenye"> |
| 116 | <el-pagination :hide-on-single-page='flag' background small size="mini" :current-page="currentPageList" | 95 | <el-pagination :hide-on-single-page='flag' background small size="mini" :current-page="currentPageList" |
| @@ -122,53 +101,34 @@ | @@ -122,53 +101,34 @@ | ||
| 122 | <div v-if="tongjiBox"> | 101 | <div v-if="tongjiBox"> |
| 123 | <div> | 102 | <div> |
| 124 | <div style="display: flex;"> | 103 | <div style="display: flex;"> |
| 125 | - <img | ||
| 126 | - :src="this.$hostUrl + secondData.coverImage" | ||
| 127 | - alt="" | ||
| 128 | - style="width:150px;height:100px;margin-right: 15px;border-radius:10px;" | ||
| 129 | - > | 104 | + <img :src="this.$hostUrl + secondData.coverImage" alt="" |
| 105 | + style="width:150px;height:100px;margin-right: 15px;border-radius:10px;"> | ||
| 130 | <div> | 106 | <div> |
| 131 | - <div style="font-weight: 600;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;">{{ secondData.title }}</div> | 107 | + <div |
| 108 | + style="font-weight: 600;overflow: hidden; text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;word-break: break-all;"> | ||
| 109 | + {{ secondData.title }}</div> | ||
| 132 | <div style="padding:20px 0;">答卷数量:{{ total1 || 0 }}</div> | 110 | <div style="padding:20px 0;">答卷数量:{{ total1 || 0 }}</div> |
| 133 | <div>起止时间:{{ secondData.startDate }} 至 {{ secondData.endDate }}</div> | 111 | <div>起止时间:{{ secondData.startDate }} 至 {{ secondData.endDate }}</div> |
| 134 | </div> | 112 | </div> |
| 135 | </div> | 113 | </div> |
| 136 | <div> | 114 | <div> |
| 137 | - <el-tabs | ||
| 138 | - v-model="tongjiTabs" | ||
| 139 | - @tab-click="tongjiClick" | ||
| 140 | - > | 115 | + <el-tabs v-model="tongjiTabs" @tab-click="tongjiClick"> |
| 141 | <el-tab-pane label="作答情况" name="qingK"> | 116 | <el-tab-pane label="作答情况" name="qingK"> |
| 142 | <div v-loading="loading" style="width: 100%"> | 117 | <div v-loading="loading" style="width: 100%"> |
| 143 | <div style="display: flex;align-items: center;margin-bottom: 20px;"> | 118 | <div style="display: flex;align-items: center;margin-bottom: 20px;"> |
| 144 | - <el-date-picker | ||
| 145 | - v-model="tongjiMsg.plan_Time" | ||
| 146 | - style="width: 30%;margin-right: 20px;" | ||
| 147 | - value-format="yyyy-MM-dd" | ||
| 148 | - type="daterange" | ||
| 149 | - range-separator="至" | ||
| 150 | - start-placeholder="开始日期" | ||
| 151 | - end-placeholder="结束日期" | ||
| 152 | - align="right" | ||
| 153 | - /> | ||
| 154 | - <el-input | ||
| 155 | - v-model="tongjiMsg.userName" | ||
| 156 | - style="width:30%;margin-right: 20px;" | ||
| 157 | - placeholder="搜索提交人" | ||
| 158 | - /> | 119 | + <el-date-picker v-model="tongjiMsg.plan_Time" style="width: 30%;margin-right: 20px;" |
| 120 | + value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期" | ||
| 121 | + end-placeholder="结束日期" align="right" /> | ||
| 122 | + <el-input v-model="tongjiMsg.userName" style="width:30%;margin-right: 20px;" placeholder="搜索提交人" /> | ||
| 159 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tongjiSubmit">查询 | 123 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tongjiSubmit">查询 |
| 160 | </el-button> | 124 | </el-button> |
| 161 | - <el-button | ||
| 162 | - class="buttonHover" | 125 | + <el-button class="buttonHover" |
| 163 | style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | 126 | style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 164 | - @click="tongjiSubmitret" | ||
| 165 | - >重置 | 127 | + @click="tongjiSubmitret">重置 |
| 166 | </el-button> | 128 | </el-button> |
| 167 | </div> | 129 | </div> |
| 168 | - <el-table | ||
| 169 | - :data="tongjiSshu.slice((currentPage1 - 1) * pageSize, currentPage1 * pageSize)" | ||
| 170 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 171 | - > | 130 | + <el-table :data="tongjiSshu.slice((currentPage1 - 1) * pageSize, currentPage1 * pageSize)" |
| 131 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"> | ||
| 172 | <el-table-column label="序号" min-width="100"> | 132 | <el-table-column label="序号" min-width="100"> |
| 173 | <template slot-scope="scope"> | 133 | <template slot-scope="scope"> |
| 174 | {{ scope.$index + 1 }} | 134 | {{ scope.$index + 1 }} |
| @@ -190,29 +150,18 @@ | @@ -190,29 +150,18 @@ | ||
| 190 | 150 | ||
| 191 | </el-table> | 151 | </el-table> |
| 192 | <div class="fenye"> | 152 | <div class="fenye"> |
| 193 | - <el-pagination | ||
| 194 | - :hide-on-single-page="flag1" | ||
| 195 | - background | ||
| 196 | - small | ||
| 197 | - size="mini" | ||
| 198 | - :current-page="currentPage1" | ||
| 199 | - :page-sizes="[10, 20, 50, 100]" | ||
| 200 | - layout="prev, pager, next,total" | ||
| 201 | - :total="total1" | ||
| 202 | - @current-change="handleCurrentChange1" | ||
| 203 | - /> | 153 | + <el-pagination :hide-on-single-page="flag1" background small size="mini" |
| 154 | + :current-page="currentPage1" :page-sizes="[10, 20, 50, 100]" layout="prev, pager, next,total" | ||
| 155 | + :total="total1" @current-change="handleCurrentChange1" /> | ||
| 204 | </div> | 156 | </div> |
| 205 | </div> | 157 | </div> |
| 206 | </el-tab-pane> | 158 | </el-tab-pane> |
| 207 | - <el-tab-pane | ||
| 208 | - label="数据统计" | ||
| 209 | - name="shuju" | ||
| 210 | - > | 159 | + <el-tab-pane label="数据统计" name="shuju"> |
| 211 | <div v-loading="shujuloading" style="padding:20px;"> | 160 | <div v-loading="shujuloading" style="padding:20px;"> |
| 212 | - <div style="margin-bottom: 20px;font-size: 18px;">数据概况 <span>截止{{ tongjiTu.statisticalTime }}</span></div> | 161 | + <div style="margin-bottom: 20px;font-size: 18px;">数据概况 <span>截止{{ tongjiTu.statisticalTime }}</span> |
| 162 | + </div> | ||
| 213 | <div | 163 | <div |
| 214 | - style="display: flex;padding:20px 30px;width: 100%;justify-content: space-around;border: 1px solid #dddfe5;" | ||
| 215 | - > | 164 | + style="display: flex;padding:20px 30px;width: 100%;justify-content: space-around;border: 1px solid #dddfe5;"> |
| 216 | <div style="text-align: center;"> | 165 | <div style="text-align: center;"> |
| 217 | <div style="margin-bottom:10px;">今日新增</div> | 166 | <div style="margin-bottom:10px;">今日新增</div> |
| 218 | <div style="font-size:16px;">{{ tongjiTu.todayNumber || 0 }}</div> | 167 | <div style="font-size:16px;">{{ tongjiTu.todayNumber || 0 }}</div> |
| @@ -229,16 +178,8 @@ | @@ -229,16 +178,8 @@ | ||
| 229 | </div> | 178 | </div> |
| 230 | <div style="margin: 20px 0;font-size: 18px;">题目统计</div> | 179 | <div style="margin: 20px 0;font-size: 18px;">题目统计</div> |
| 231 | <!-- {{tuwent}} --> | 180 | <!-- {{tuwent}} --> |
| 232 | - <dynamic-chart-table | ||
| 233 | - v-for="(item,index) in tuwent" | ||
| 234 | - v-show="item.type !='文本'" | ||
| 235 | - :ref="'chat'+index" | ||
| 236 | - :key="index" | ||
| 237 | - :title="item.title" | ||
| 238 | - :table-data="tongjiTu" | ||
| 239 | - :tixingtype="item.type" | ||
| 240 | - :index="index" | ||
| 241 | - /> | 181 | + <dynamic-chart-table v-for="(item, index) in tuwent" v-show="item.type != '文本'" :ref="'chat' + index" |
| 182 | + :key="index" :title="item.title" :table-data="tongjiTu" :tixingtype="item.type" :index="index" /> | ||
| 242 | 183 | ||
| 243 | <!-- <tiaoxing :title="item.tikuTitle" :tableData="tongjiTu.cereQuestionManagements" v-if="item.questionType=='多选'" v-for="(item,index) in tongjiTu.cereQuestionManagements"> --> | 184 | <!-- <tiaoxing :title="item.tikuTitle" :tableData="tongjiTu.cereQuestionManagements" v-if="item.questionType=='多选'" v-for="(item,index) in tongjiTu.cereQuestionManagements"> --> |
| 244 | 185 | ||
| @@ -250,23 +191,13 @@ | @@ -250,23 +191,13 @@ | ||
| 250 | </div> | 191 | </div> |
| 251 | 192 | ||
| 252 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> | 193 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> |
| 253 | - <el-button | ||
| 254 | - class="buttonHover" | ||
| 255 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 256 | - @click="tongjiBoxFan" | ||
| 257 | - >返回</el-button> | 194 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 195 | + @click="tongjiBoxFan">返回</el-button> | ||
| 258 | 196 | ||
| 259 | </div> | 197 | </div> |
| 260 | </div> | 198 | </div> |
| 261 | - <el-dialog | ||
| 262 | - :visible.sync="daxiangBox" | ||
| 263 | - custom-class="tongyong_css" | ||
| 264 | - style="padding: 0;" | ||
| 265 | - width="60%" | ||
| 266 | - center | ||
| 267 | - :close-on-click-modal="false" | ||
| 268 | - append-to-body | ||
| 269 | - > | 199 | + <el-dialog :visible.sync="daxiangBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center |
| 200 | + :close-on-click-modal="false" append-to-body> | ||
| 270 | <div style="padding:20px;"> | 201 | <div style="padding:20px;"> |
| 271 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">答卷详情</div> | 202 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">答卷详情</div> |
| 272 | <div style="display:flex;border-top: 1px solid #dddfe5;"> | 203 | <div style="display:flex;border-top: 1px solid #dddfe5;"> |
| @@ -276,16 +207,16 @@ | @@ -276,16 +207,16 @@ | ||
| 276 | <div style="margin-bottom:15px;">提交人:<span style="color:#000">{{ daxiangData.userName }}</span></div> | 207 | <div style="margin-bottom:15px;">提交人:<span style="color:#000">{{ daxiangData.userName }}</span></div> |
| 277 | <div style="margin-bottom:15px;">手机号:<span style="color:#000">{{ daxiangData.contactNumber }}</span> | 208 | <div style="margin-bottom:15px;">手机号:<span style="color:#000">{{ daxiangData.contactNumber }}</span> |
| 278 | </div> | 209 | </div> |
| 279 | - <div style="margin-bottom:15px;">作答时长:<span | ||
| 280 | - style="color:#000" | ||
| 281 | - >{{ secondsToMinutesAndSeconds(daxiangData.responseTime) }}</span> </div> | 210 | + <div style="margin-bottom:15px;">作答时长:<span style="color:#000">{{ |
| 211 | + secondsToMinutesAndSeconds(daxiangData.responseTime) }}</span> </div> | ||
| 282 | <div style="margin-bottom:15px;">提交时间:<span style="color:#000">{{ daxiangData.createTime }}</span> | 212 | <div style="margin-bottom:15px;">提交时间:<span style="color:#000">{{ daxiangData.createTime }}</span> |
| 283 | </div> | 213 | </div> |
| 284 | - <div style="margin-bottom:15px;">填写条件:<span style="color:#000">{{ secondData.fillingConditions }}</span> | 214 | + <div style="margin-bottom:15px;">填写条件:<span style="color:#000">{{ secondData.fillingConditions |
| 215 | + }}</span> | ||
| 216 | + </div> | ||
| 217 | + <div style="margin-bottom:15px;">问卷分数:<span style="color:#000">{{ daxiangData.questionnaireScore | ||
| 218 | + }}</span> | ||
| 285 | </div> | 219 | </div> |
| 286 | - <div style="margin-bottom:15px;">问卷分数:<span | ||
| 287 | - style="color:#000" | ||
| 288 | - >{{ daxiangData.questionnaireScore }}</span> </div> | ||
| 289 | <div>用户意见:<span style="color:#000" />{{ daxiangData.opinion }} </div> | 220 | <div>用户意见:<span style="color:#000" />{{ daxiangData.opinion }} </div> |
| 290 | </div> | 221 | </div> |
| 291 | </div> | 222 | </div> |
| @@ -293,38 +224,26 @@ | @@ -293,38 +224,26 @@ | ||
| 293 | <div style="margin-bottom:20px;">答卷详情</div> | 224 | <div style="margin-bottom:20px;">答卷详情</div> |
| 294 | <div> | 225 | <div> |
| 295 | 226 | ||
| 296 | - <div v-for="(item,index) in daxiangData.question" class="question"> | ||
| 297 | - <p class="question-title"><span | ||
| 298 | - v-if="item.required=='必填'" | ||
| 299 | - style="color: red;" | ||
| 300 | - >*</span>{{ index }}.<span style="">({{ item.type }})</span> | 227 | + <div v-for="(item, index) in daxiangData.question" class="question"> |
| 228 | + <p class="question-title"><span v-if="item.required == '必填'" style="color: red;">*</span>{{ index | ||
| 229 | + }}.<span style="">({{ item.type }})</span> | ||
| 301 | {{ item.title }} | 230 | {{ item.title }} |
| 302 | </p> | 231 | </p> |
| 303 | <div> | 232 | <div> |
| 304 | - <el-radio-group | ||
| 305 | - v-for="(val, idx) in item.options" | ||
| 306 | - v-if="item.type =='单选'" | ||
| 307 | - :key="idx" | ||
| 308 | - v-model="item.choose" | ||
| 309 | - style="display: flex;flex-direction: column;" | ||
| 310 | - > | 233 | + <el-radio-group v-for="(val, idx) in item.options" v-if="item.type == '单选'" :key="idx" |
| 234 | + v-model="item.choose" style="display: flex;flex-direction: column;"> | ||
| 311 | <el-radio disabled :label="val.answer">{{ val.answer }}</el-radio> | 235 | <el-radio disabled :label="val.answer">{{ val.answer }}</el-radio> |
| 312 | 236 | ||
| 313 | </el-radio-group> | 237 | </el-radio-group> |
| 314 | 238 | ||
| 315 | - <el-checkbox-group | ||
| 316 | - v-for="(val, idx) in item.options" | ||
| 317 | - v-if="item.type =='多选'" | ||
| 318 | - :key="idx" | ||
| 319 | - v-model="val.disabled" | ||
| 320 | - style="display: flex;flex-direction: column;" | ||
| 321 | - > | 239 | + <el-checkbox-group v-for="(val, idx) in item.options" v-if="item.type == '多选'" :key="idx" |
| 240 | + v-model="val.disabled" style="display: flex;flex-direction: column;"> | ||
| 322 | 241 | ||
| 323 | <el-checkbox :label="val.answer" disabled>{{ val.answer }}</el-checkbox> | 242 | <el-checkbox :label="val.answer" disabled>{{ val.answer }}</el-checkbox> |
| 324 | 243 | ||
| 325 | </el-checkbox-group> | 244 | </el-checkbox-group> |
| 326 | 245 | ||
| 327 | - <div v-if="item.type =='文本'" style="display: flex;flex-direction: column;"> | 246 | + <div v-if="item.type == '文本'" style="display: flex;flex-direction: column;"> |
| 328 | {{ item.choose }} | 247 | {{ item.choose }} |
| 329 | 248 | ||
| 330 | </div> | 249 | </div> |
| @@ -339,20 +258,14 @@ | @@ -339,20 +258,14 @@ | ||
| 339 | </div> | 258 | </div> |
| 340 | </div> | 259 | </div> |
| 341 | <!-- 详情框 --> | 260 | <!-- 详情框 --> |
| 342 | - <el-dialog | ||
| 343 | - :visible.sync="detbox" | ||
| 344 | - custom-class="tongyong_css" | ||
| 345 | - style="padding: 0;" | ||
| 346 | - width="65%" | ||
| 347 | - center | ||
| 348 | - :close-on-click-modal="false" | ||
| 349 | - :show-close="false" | ||
| 350 | - > | 261 | + <el-dialog :visible.sync="detbox" custom-class="tongyong_css" style="padding: 0;" width="65%" center |
| 262 | + :close-on-click-modal="false" :show-close="false"> | ||
| 351 | <div style="padding:20px;"> | 263 | <div style="padding:20px;"> |
| 352 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div> | 264 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div> |
| 353 | <div> | 265 | <div> |
| 354 | <div style="padding: 10px 0 20px 0;">基本信息</div> | 266 | <div style="padding: 10px 0 20px 0;">基本信息</div> |
| 355 | - <el-descriptions class="margin-top" :column="3" border :label-style="labelStyle" :content-style="contentStyle"> | 267 | + <el-descriptions class="margin-top" :column="3" border :label-style="labelStyle" |
| 268 | + :content-style="contentStyle"> | ||
| 356 | <el-descriptions-item :span="2"> | 269 | <el-descriptions-item :span="2"> |
| 357 | <template slot="label"> | 270 | <template slot="label"> |
| 358 | 问卷标题 | 271 | 问卷标题 |
| @@ -363,7 +276,10 @@ | @@ -363,7 +276,10 @@ | ||
| 363 | <template slot="label"> | 276 | <template slot="label"> |
| 364 | 状态 | 277 | 状态 |
| 365 | </template> | 278 | </template> |
| 366 | - {{ secondData.reviewStatus == '1'?'待提交':secondData.reviewStatus == '2'?'待审核':secondData.reviewStatus == '3'?'审核通过':secondData.reviewStatus == '4'?'不通过':'已禁用' }} | 279 | + {{ secondData.reviewStatus == '1' ? '待提交' : secondData.reviewStatus == '2' ? '待审核' : |
| 280 | + secondData.reviewStatus | ||
| 281 | + == | ||
| 282 | + '3' ? '审核通过' : secondData.reviewStatus == '4' ?'不通过':'已禁用' }} | ||
| 367 | </el-descriptions-item> | 283 | </el-descriptions-item> |
| 368 | 284 | ||
| 369 | <el-descriptions-item> | 285 | <el-descriptions-item> |
| @@ -414,22 +330,12 @@ | @@ -414,22 +330,12 @@ | ||
| 414 | <div v-html="secondData.remarks" /> | 330 | <div v-html="secondData.remarks" /> |
| 415 | <div style="padding: 20px 0;">问卷封面</div> | 331 | <div style="padding: 20px 0;">问卷封面</div> |
| 416 | <div> | 332 | <div> |
| 417 | - <el-image | ||
| 418 | - style="width: 280px; height: 200px" | ||
| 419 | - :src="this.$hostUrl + secondData.coverImage" | ||
| 420 | - fit="fill" | ||
| 421 | - /> | 333 | + <el-image style="width: 280px; height: 200px" :src="this.$hostUrl + secondData.coverImage" fit="fill" /> |
| 422 | <!-- <img :src="secondData.coverImage" alt="" style="width:25%" /> --> | 334 | <!-- <img :src="secondData.coverImage" alt="" style="width:25%" /> --> |
| 423 | </div> | 335 | </div> |
| 424 | - <div v-if="secondData.filler=='会员'" style="padding: 20px 0 ;">参与答卷奖励</div> | ||
| 425 | - <el-descriptions | ||
| 426 | - v-if="secondData.filler=='会员'" | ||
| 427 | - class="margin-top" | ||
| 428 | - :column="3" | ||
| 429 | - border | ||
| 430 | - :label-style="labelStyle" | ||
| 431 | - :content-style="contentStyle" | ||
| 432 | - > | 336 | + <div v-if="secondData.filler == '会员'" style="padding: 20px 0 ;">参与答卷奖励</div> |
| 337 | + <el-descriptions v-if="secondData.filler == '会员'" class="margin-top" :column="3" border | ||
| 338 | + :label-style="labelStyle" :content-style="contentStyle"> | ||
| 433 | <el-descriptions-item> | 339 | <el-descriptions-item> |
| 434 | <template slot="label"> | 340 | <template slot="label"> |
| 435 | 提交问卷后 | 341 | 提交问卷后 |
| @@ -444,13 +350,11 @@ | @@ -444,13 +350,11 @@ | ||
| 444 | </el-descriptions-item> | 350 | </el-descriptions-item> |
| 445 | </el-descriptions> | 351 | </el-descriptions> |
| 446 | <div style="padding: 20px 0 ;">问卷题目</div> | 352 | <div style="padding: 20px 0 ;">问卷题目</div> |
| 447 | - <el-table | ||
| 448 | - :data="wenData" | ||
| 449 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 450 | - > | 353 | + <el-table :data="wenData" |
| 354 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"> | ||
| 451 | <el-table-column label="序号" min-width="100"> | 355 | <el-table-column label="序号" min-width="100"> |
| 452 | <template slot-scope="scope"> | 356 | <template slot-scope="scope"> |
| 453 | - {{ scope.$index +1 }} | 357 | + {{ scope.$index + 1 }} |
| 454 | </template> | 358 | </template> |
| 455 | </el-table-column> | 359 | </el-table-column> |
| 456 | <el-table-column label="题目" min-width="300" prop="title" :show-overflow-tooltip="true" /> | 360 | <el-table-column label="题目" min-width="300" prop="title" :show-overflow-tooltip="true" /> |
| @@ -458,8 +362,8 @@ | @@ -458,8 +362,8 @@ | ||
| 458 | <el-table-column label="是否必填" prop="required" min-width="80" /> | 362 | <el-table-column label="是否必填" prop="required" min-width="80" /> |
| 459 | <el-table-column label="选项" min-width="120"> | 363 | <el-table-column label="选项" min-width="120"> |
| 460 | <template slot-scope="scope"> | 364 | <template slot-scope="scope"> |
| 461 | - <div v-for="(value, index) in scope.row.options " v-if="scope.row.type !='文本'" :key="index"> | ||
| 462 | - {{ index +1 }}:{{ value.answer }} | 365 | + <div v-for="(value, index) in scope.row.options " v-if="scope.row.type != '文本'" :key="index"> |
| 366 | + {{ index + 1 }}:{{ value.answer }} | ||
| 463 | </div> | 367 | </div> |
| 464 | <div v-else> | 368 | <div v-else> |
| 465 | - | 369 | - |
| @@ -470,7 +374,8 @@ | @@ -470,7 +374,8 @@ | ||
| 470 | 374 | ||
| 471 | </el-table> | 375 | </el-table> |
| 472 | <div style="padding: 20px 0 ;">系统信息</div> | 376 | <div style="padding: 20px 0 ;">系统信息</div> |
| 473 | - <el-descriptions class="margin-top" :column="3" border :label-style="labelStyle" :content-style="contentStyle"> | 377 | + <el-descriptions class="margin-top" :column="3" border :label-style="labelStyle" |
| 378 | + :content-style="contentStyle"> | ||
| 474 | <el-descriptions-item> | 379 | <el-descriptions-item> |
| 475 | <template slot="label"> | 380 | <template slot="label"> |
| 476 | 创建人 | 381 | 创建人 |
| @@ -491,12 +396,16 @@ | @@ -491,12 +396,16 @@ | ||
| 491 | </el-descriptions-item> | 396 | </el-descriptions-item> |
| 492 | </el-descriptions> | 397 | </el-descriptions> |
| 493 | <div style="padding: 20px 0 ;">审核信息</div> | 398 | <div style="padding: 20px 0 ;">审核信息</div> |
| 494 | - <el-descriptions class="margin-top" :column="3" border :label-style="labelStyle" :content-style="contentStyle"> | 399 | + <el-descriptions class="margin-top" :column="3" border :label-style="labelStyle" |
| 400 | + :content-style="contentStyle"> | ||
| 495 | <el-descriptions-item> | 401 | <el-descriptions-item> |
| 496 | <template slot="label"> | 402 | <template slot="label"> |
| 497 | 审核状态 | 403 | 审核状态 |
| 498 | </template> | 404 | </template> |
| 499 | - {{ secondData.reviewStatus == '1'?'待提交':secondData.reviewStatus == '2'?'待审核':secondData.reviewStatus == '3'?'审核通过':secondData.reviewStatus == '4'?'不通过':'已禁用' }} | 405 | + {{ secondData.reviewStatus == '1' ? '待提交' : secondData.reviewStatus == '2' ? '待审核' : |
| 406 | + secondData.reviewStatus | ||
| 407 | + == | ||
| 408 | + '3' ? '审核通过' : secondData.reviewStatus == '4' ?'不通过':'已禁用' }} | ||
| 500 | </el-descriptions-item> | 409 | </el-descriptions-item> |
| 501 | <el-descriptions-item> | 410 | <el-descriptions-item> |
| 502 | <template slot="label"> | 411 | <template slot="label"> |
| @@ -509,31 +418,18 @@ | @@ -509,31 +418,18 @@ | ||
| 509 | </div> | 418 | </div> |
| 510 | 419 | ||
| 511 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> | 420 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> |
| 512 | - <el-button | ||
| 513 | - class="buttonHover" | ||
| 514 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 515 | - @click="detbox = false " | ||
| 516 | - >返回</el-button> | 421 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 422 | + @click="detbox = false">返回</el-button> | ||
| 517 | </div> | 423 | </div> |
| 518 | </div> | 424 | </div> |
| 519 | 425 | ||
| 520 | </el-dialog> | 426 | </el-dialog> |
| 521 | 427 | ||
| 522 | <!-- 新增 --> | 428 | <!-- 新增 --> |
| 523 | - <el-dialog | ||
| 524 | - :visible.sync="ggXin" | ||
| 525 | - custom-class="tongyong_css" | ||
| 526 | - style="padding: 0;" | ||
| 527 | - width="60%" | ||
| 528 | - class="dialog_css_Xq" | ||
| 529 | - center | ||
| 530 | - :close-on-click-modal="false" | ||
| 531 | - :show-close="false" | ||
| 532 | - > | ||
| 533 | - <div | ||
| 534 | - style="padding:20px;max-height: calc(100vh - 200px); | ||
| 535 | - overflow-y: auto;" | ||
| 536 | - > | 429 | + <el-dialog :visible.sync="ggXin" custom-class="tongyong_css" style="padding: 0;" width="60%" class="dialog_css_Xq" |
| 430 | + center :close-on-click-modal="false" :show-close="false"> | ||
| 431 | + <div style="padding:20px;max-height: calc(100vh - 200px); | ||
| 432 | + overflow-y: auto;"> | ||
| 537 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">新建问卷</div> | 433 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">新建问卷</div> |
| 538 | <div> | 434 | <div> |
| 539 | <el-tabs v-model="xiangTabs"> | 435 | <el-tabs v-model="xiangTabs"> |
| @@ -541,32 +437,18 @@ | @@ -541,32 +437,18 @@ | ||
| 541 | <div style="width: 100%"> | 437 | <div style="width: 100%"> |
| 542 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | 438 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> |
| 543 | <div | 439 | <div |
| 544 | - style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;" | ||
| 545 | - > | 440 | + style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;"> |
| 546 | <div>基本信息</div> | 441 | <div>基本信息</div> |
| 547 | </div> | 442 | </div> |
| 548 | 443 | ||
| 549 | - <el-form | ||
| 550 | - ref="inlineform" | ||
| 551 | - :model="formInline" | ||
| 552 | - :rules="rules" | ||
| 553 | - label-width="155px" | ||
| 554 | - style="padding:20px;" | ||
| 555 | - > | 444 | + <el-form ref="inlineform" :model="formInline" :rules="rules" label-width="155px" |
| 445 | + style="padding:20px;"> | ||
| 556 | <el-form-item label="问卷标题" prop="title"> | 446 | <el-form-item label="问卷标题" prop="title"> |
| 557 | <el-input v-model="formInline.title" maxlength="50" /> | 447 | <el-input v-model="formInline.title" maxlength="50" /> |
| 558 | </el-form-item> | 448 | </el-form-item> |
| 559 | <el-form-item label="问卷起止时间" prop=""> | 449 | <el-form-item label="问卷起止时间" prop=""> |
| 560 | - <el-date-picker | ||
| 561 | - v-model="Xin_Time" | ||
| 562 | - style="width: 100%;" | ||
| 563 | - value-format="yyyy-MM-dd" | ||
| 564 | - type="daterange" | ||
| 565 | - range-separator="至" | ||
| 566 | - start-placeholder="开始日期" | ||
| 567 | - end-placeholder="结束日期" | ||
| 568 | - align="right" | ||
| 569 | - > | 450 | + <el-date-picker v-model="Xin_Time" style="width: 100%;" value-format="yyyy-MM-dd" type="daterange" |
| 451 | + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right"> | ||
| 570 | :picker-options="pickerOptions"> | 452 | :picker-options="pickerOptions"> |
| 571 | </el-date-picker> | 453 | </el-date-picker> |
| 572 | </el-form-item> | 454 | </el-form-item> |
| @@ -613,7 +495,8 @@ | @@ -613,7 +495,8 @@ | ||
| 613 | 495 | ||
| 614 | <div style="position: relative;"> | 496 | <div style="position: relative;"> |
| 615 | 497 | ||
| 616 | - <upimg :limit="1" :file-size="1" :is-show-tip="true" :value="formInline.coverImage" @input="e=>input(e,'1')" /> | 498 | + <upimg :limit="1" :file-size="1" :is-show-tip="true" :value="formInline.coverImage" |
| 499 | + @input="e => input(e, '1')" /> | ||
| 617 | <!-- <div style="position: absolute;left:160px;height:80px;">()</div> --> | 500 | <!-- <div style="position: absolute;left:160px;height:80px;">()</div> --> |
| 618 | <!-- @input="e=>input(e,'ing')" @input="input" --> | 501 | <!-- @input="e=>input(e,'ing')" @input="input" --> |
| 619 | </div> | 502 | </div> |
| @@ -645,11 +528,10 @@ | @@ -645,11 +528,10 @@ | ||
| 645 | </el-form-item> | 528 | </el-form-item> |
| 646 | </el-form> | 529 | </el-form> |
| 647 | </div> | 530 | </div> |
| 648 | - <div v-if="formInline.filler=='会员'"> | 531 | + <div v-if="formInline.filler == '会员'"> |
| 649 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | 532 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> |
| 650 | <div | 533 | <div |
| 651 | - style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;" | ||
| 652 | - > | 534 | + style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;"> |
| 653 | <div>参与答卷奖励</div> | 535 | <div>参与答卷奖励</div> |
| 654 | </div> | 536 | </div> |
| 655 | <el-form ref="form" :model="formInline" label-width="140px" style="padding:20px;"> | 537 | <el-form ref="form" :model="formInline" label-width="140px" style="padding:20px;"> |
| @@ -685,8 +567,7 @@ | @@ -685,8 +567,7 @@ | ||
| 685 | <div style="width: 100%"> | 567 | <div style="width: 100%"> |
| 686 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | 568 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> |
| 687 | <div | 569 | <div |
| 688 | - style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;" | ||
| 689 | - > | 570 | + style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;"> |
| 690 | <div>问卷内容</div> | 571 | <div>问卷内容</div> |
| 691 | <div> | 572 | <div> |
| 692 | <div class="greens tableBtn" @click="addTikuShow">新增</div> | 573 | <div class="greens tableBtn" @click="addTikuShow">新增</div> |
| @@ -696,11 +577,9 @@ | @@ -696,11 +577,9 @@ | ||
| 696 | </div> | 577 | </div> |
| 697 | 578 | ||
| 698 | <div style="padding:20px;"> | 579 | <div style="padding:20px;"> |
| 699 | - <el-table | ||
| 700 | - :data="wenConstData" | ||
| 701 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 702 | - class="xddTable" | ||
| 703 | - > | 580 | + <el-table :data="wenConstData" |
| 581 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }" | ||
| 582 | + class="xddTable"> | ||
| 704 | <el-table-column label="序号" min-width="100"> | 583 | <el-table-column label="序号" min-width="100"> |
| 705 | <template slot-scope="scope"> | 584 | <template slot-scope="scope"> |
| 706 | {{ scope.$index + 1 }} | 585 | {{ scope.$index + 1 }} |
| @@ -709,16 +588,18 @@ | @@ -709,16 +588,18 @@ | ||
| 709 | <el-table-column label="题目" min-width="300" prop="tikuTitle" show-overflow-tooltip /> | 588 | <el-table-column label="题目" min-width="300" prop="tikuTitle" show-overflow-tooltip /> |
| 710 | <el-table-column label="题型" min-width="80" prop="questionType" /> | 589 | <el-table-column label="题型" min-width="80" prop="questionType" /> |
| 711 | <el-table-column label="是否必填" prop="isRequired" min-width="120" /> | 590 | <el-table-column label="是否必填" prop="isRequired" min-width="120" /> |
| 712 | - <el-table-column label="" min-width="120" > | 591 | + <el-table-column label="" min-width="120"> |
| 713 | <template #default="scope"> | 592 | <template #default="scope"> |
| 714 | - <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="moveUp(scope.$index)" v-if="scope.$index!=0">↑</span> | ||
| 715 | - <span style="cursor: pointer; color: #3F9B6A;" @click="moveDown(scope.$index)" v-if="scope.$index != (wenConstData.length-1)">↓</span> | 593 | + <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="moveUp(scope.$index)" |
| 594 | + v-if="scope.$index != 0">↑</span> | ||
| 595 | + <span style="cursor: pointer; color: #3F9B6A;" @click="moveDown(scope.$index)" | ||
| 596 | + v-if="scope.$index != (wenConstData.length - 1)">↓</span> | ||
| 716 | </template> | 597 | </template> |
| 717 | </el-table-column> | 598 | </el-table-column> |
| 718 | <el-table-column label="操作" min-width="80"> | 599 | <el-table-column label="操作" min-width="80"> |
| 719 | <template slot-scope="scope"> | 600 | <template slot-scope="scope"> |
| 720 | <!-- <div class="tableBtn greens">编辑</div> --> | 601 | <!-- <div class="tableBtn greens">编辑</div> --> |
| 721 | - <div class="tableBtn greens" @click="delWenCon('1',scope.$index)">删除</div> | 602 | + <div class="tableBtn greens" @click="delWenCon('1', scope.$index)">删除</div> |
| 722 | </template> | 603 | </template> |
| 723 | </el-table-column> | 604 | </el-table-column> |
| 724 | </el-table> | 605 | </el-table> |
| @@ -737,16 +618,8 @@ | @@ -737,16 +618,8 @@ | ||
| 737 | 618 | ||
| 738 | </span> --> | 619 | </span> --> |
| 739 | </div> | 620 | </div> |
| 740 | - <el-dialog | ||
| 741 | - :visible.sync="tikuBox" | ||
| 742 | - custom-class="tongyong_css" | ||
| 743 | - style="padding: 0;" | ||
| 744 | - width="60%" | ||
| 745 | - center | ||
| 746 | - :close-on-click-modal="false" | ||
| 747 | - append-to-body | ||
| 748 | - @close="tikuquxiao(1)" | ||
| 749 | - > | 621 | + <el-dialog :visible.sync="tikuBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center |
| 622 | + :close-on-click-modal="false" append-to-body @close="tikuquxiao(1)"> | ||
| 750 | <div style="padding:20px;"> | 623 | <div style="padding:20px;"> |
| 751 | <div style="padding:20px;"> | 624 | <div style="padding:20px;"> |
| 752 | <div style="display: flex;justify-content: space-between;margin-bottom: 20px;"> | 625 | <div style="display: flex;justify-content: space-between;margin-bottom: 20px;"> |
| @@ -771,30 +644,23 @@ | @@ -771,30 +644,23 @@ | ||
| 771 | <el-input v-model="timuMsg" style="width:50%;margin-right: 15px;" placeholder="请输入题目" /> | 644 | <el-input v-model="timuMsg" style="width:50%;margin-right: 15px;" placeholder="请输入题目" /> |
| 772 | <el-button style="background-color: #3F9B6A;color: #fff" placeholder="请输入题目" @click="tikusous">查询 | 645 | <el-button style="background-color: #3F9B6A;color: #fff" placeholder="请输入题目" @click="tikusous">查询 |
| 773 | </el-button> | 646 | </el-button> |
| 774 | - <el-button | ||
| 775 | - class="buttonHover" | ||
| 776 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 777 | - @click="tikuclose" | ||
| 778 | - >重置 | 647 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 648 | + @click="tikuclose">重置 | ||
| 779 | </el-button> | 649 | </el-button> |
| 780 | </div> | 650 | </div> |
| 781 | </div> | 651 | </div> |
| 782 | <!-- v-infinite-scroll="load" --> | 652 | <!-- v-infinite-scroll="load" --> |
| 783 | <div style="padding:20px;overflow-y: auto;height:495px;"> | 653 | <div style="padding:20px;overflow-y: auto;height:495px;"> |
| 784 | 654 | ||
| 785 | - <el-table | ||
| 786 | - ref="ziyuanData" | 655 | + <el-table ref="ziyuanData" |
| 787 | :data="tikuziyuan.slice((currentPageListTi - 1) * pageSizeTi, currentPageListTi * pageSizeTi)" | 656 | :data="tikuziyuan.slice((currentPageListTi - 1) * pageSizeTi, currentPageListTi * pageSizeTi)" |
| 788 | - :row-key="row=>row.id" | ||
| 789 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 790 | - tooltip-effect="dark" | ||
| 791 | - @selection-change="handleSelectionChange" | ||
| 792 | - @toggleRowSelection="hangSelchange" | ||
| 793 | - > | 657 | + :row-key="row => row.id" |
| 658 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }" | ||
| 659 | + tooltip-effect="dark" @selection-change="handleSelectionChange" @toggleRowSelection="hangSelchange"> | ||
| 794 | <el-table-column type="selection" width="55" :reserve-selection="true" /> | 660 | <el-table-column type="selection" width="55" :reserve-selection="true" /> |
| 795 | <el-table-column label="序号" min-width="100"> | 661 | <el-table-column label="序号" min-width="100"> |
| 796 | <template slot-scope="scope"> | 662 | <template slot-scope="scope"> |
| 797 | - {{ scope.$index +1 }} | 663 | + {{ scope.$index + 1 }} |
| 798 | </template> | 664 | </template> |
| 799 | </el-table-column> | 665 | </el-table-column> |
| 800 | <el-table-column label="题目" min-width="400" prop="tikuTitle" /> | 666 | <el-table-column label="题目" min-width="400" prop="tikuTitle" /> |
| @@ -808,17 +674,9 @@ | @@ -808,17 +674,9 @@ | ||
| 808 | </el-table> | 674 | </el-table> |
| 809 | <div style="display: flex;justify-content: space-between;margin-top: 10px;"> | 675 | <div style="display: flex;justify-content: space-between;margin-top: 10px;"> |
| 810 | <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ totalTi }}</span> 条</div> | 676 | <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ totalTi }}</span> 条</div> |
| 811 | - <el-pagination | ||
| 812 | - :current-page="currentPageListTi" | ||
| 813 | - :page-sizes="[10, 20, 50, 100]" | ||
| 814 | - :page-size="pageSizeTi" | ||
| 815 | - background | ||
| 816 | - small | ||
| 817 | - layout="prev, pager, next" | ||
| 818 | - :total="totalTi" | ||
| 819 | - @size-change="handleSizeChangeTi" | ||
| 820 | - @current-change="handleCurrentChangeTi" | ||
| 821 | - /> | 677 | + <el-pagination :current-page="currentPageListTi" :page-sizes="[10, 20, 50, 100]" :page-size="pageSizeTi" |
| 678 | + background small layout="prev, pager, next" :total="totalTi" @size-change="handleSizeChangeTi" | ||
| 679 | + @current-change="handleCurrentChangeTi" /> | ||
| 822 | </div> | 680 | </div> |
| 823 | </div> | 681 | </div> |
| 824 | </div> | 682 | </div> |
| @@ -826,25 +684,13 @@ | @@ -826,25 +684,13 @@ | ||
| 826 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tiSelQue(1)">确定</el-button> | 684 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tiSelQue(1)">确定</el-button> |
| 827 | </div> | 685 | </div> |
| 828 | </div> | 686 | </div> |
| 829 | - <el-dialog | ||
| 830 | - :visible.sync="timuXiang" | ||
| 831 | - custom-class="tongyong_css" | ||
| 832 | - style="padding: 0;" | ||
| 833 | - width="50%" | ||
| 834 | - center | ||
| 835 | - :close-on-click-modal="false" | ||
| 836 | - append-to-body | ||
| 837 | - > | 687 | + <el-dialog :visible.sync="timuXiang" custom-class="tongyong_css" style="padding: 0;" width="50%" center |
| 688 | + :close-on-click-modal="false" append-to-body> | ||
| 838 | <div style="padding:20px;"> | 689 | <div style="padding:20px;"> |
| 839 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div> | 690 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div> |
| 840 | <div> | 691 | <div> |
| 841 | - <el-descriptions | ||
| 842 | - class="margin-top" | ||
| 843 | - :column="1" | ||
| 844 | - border | ||
| 845 | - :label-style="labelStyle" | ||
| 846 | - :content-style="contentStyle" | ||
| 847 | - > | 692 | + <el-descriptions class="margin-top" :column="1" border :label-style="labelStyle" |
| 693 | + :content-style="contentStyle"> | ||
| 848 | <el-descriptions-item> | 694 | <el-descriptions-item> |
| 849 | <template slot="label"> | 695 | <template slot="label"> |
| 850 | 题目 | 696 | 题目 |
| @@ -864,13 +710,8 @@ | @@ -864,13 +710,8 @@ | ||
| 864 | {{ timuData.questionBank }} | 710 | {{ timuData.questionBank }} |
| 865 | </el-descriptions-item> | 711 | </el-descriptions-item> |
| 866 | </el-descriptions> | 712 | </el-descriptions> |
| 867 | - <el-descriptions | ||
| 868 | - class="margin-top" | ||
| 869 | - :column="1" | ||
| 870 | - border | ||
| 871 | - :label-style="labelStyle" | ||
| 872 | - :content-style="contentStyle" | ||
| 873 | - > | 713 | + <el-descriptions class="margin-top" :column="1" border :label-style="labelStyle" |
| 714 | + :content-style="contentStyle"> | ||
| 874 | <el-descriptions-item> | 715 | <el-descriptions-item> |
| 875 | <template slot="label"> | 716 | <template slot="label"> |
| 876 | 默认是否必填 | 717 | 默认是否必填 |
| @@ -889,26 +730,15 @@ | @@ -889,26 +730,15 @@ | ||
| 889 | </el-descriptions> | 730 | </el-descriptions> |
| 890 | </div> | 731 | </div> |
| 891 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> | 732 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> |
| 892 | - <el-button | ||
| 893 | - class="buttonHover" | ||
| 894 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 895 | - @click="timuXiang = false" | ||
| 896 | - >返回</el-button> | 733 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 734 | + @click="timuXiang = false">返回</el-button> | ||
| 897 | </div> | 735 | </div> |
| 898 | </div> | 736 | </div> |
| 899 | 737 | ||
| 900 | </el-dialog> | 738 | </el-dialog> |
| 901 | </el-dialog> | 739 | </el-dialog> |
| 902 | - <el-dialog | ||
| 903 | - :visible.sync="tikuAdd" | ||
| 904 | - custom-class="tongyong_css" | ||
| 905 | - style="padding: 0;" | ||
| 906 | - width="60%" | ||
| 907 | - center | ||
| 908 | - :close-on-click-modal="false" | ||
| 909 | - append-to-body | ||
| 910 | - @close="quxiao(1)" | ||
| 911 | - > | 740 | + <el-dialog :visible.sync="tikuAdd" custom-class="tongyong_css" style="padding: 0;" width="60%" center |
| 741 | + :close-on-click-modal="false" append-to-body @close="quxiao(1)"> | ||
| 912 | <div style="padding:20px;"> | 742 | <div style="padding:20px;"> |
| 913 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;"> | 743 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;"> |
| 914 | 新增题目 | 744 | 新增题目 |
| @@ -925,6 +755,10 @@ | @@ -925,6 +755,10 @@ | ||
| 925 | <el-option label="文本" value="文本" /> | 755 | <el-option label="文本" value="文本" /> |
| 926 | </el-select> | 756 | </el-select> |
| 927 | </el-form-item> | 757 | </el-form-item> |
| 758 | + | ||
| 759 | + <el-form-item v-if="zhong.questionType == '多选'" label="最多可选" prop="maxChoose"> | ||
| 760 | + <el-input-number v-model="zhong.maxChoose" :min="0" :max="options.length" /> 0为不限制填写数量 | ||
| 761 | + </el-form-item> | ||
| 928 | <el-form-item label="隶属题库" prop="questionBank"> | 762 | <el-form-item label="隶属题库" prop="questionBank"> |
| 929 | <el-select v-model="zhong.questionBank" placeholder="请选择"> | 763 | <el-select v-model="zhong.questionBank" placeholder="请选择"> |
| 930 | <el-option label="用户端题库" value="用户端题库" /> | 764 | <el-option label="用户端题库" value="用户端题库" /> |
| @@ -950,11 +784,9 @@ | @@ -950,11 +784,9 @@ | ||
| 950 | </el-radio-group> | 784 | </el-radio-group> |
| 951 | </el-form-item> | 785 | </el-form-item> |
| 952 | 786 | ||
| 953 | - <el-form-item v-if="zhong.questionType !='文本'" label="选项" prop="optionSettings"> | ||
| 954 | - <el-table | ||
| 955 | - :data="options" | ||
| 956 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 957 | - > | 787 | + <el-form-item v-if="zhong.questionType != '文本'" label="选项" prop="optionSettings"> |
| 788 | + <el-table :data="options" | ||
| 789 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"> | ||
| 958 | <el-table-column prop="index" label="序号" width="180"> | 790 | <el-table-column prop="index" label="序号" width="180"> |
| 959 | <template #default="scope"> | 791 | <template #default="scope"> |
| 960 | {{ scope.$index + 1 }} | 792 | {{ scope.$index + 1 }} |
| @@ -967,21 +799,18 @@ | @@ -967,21 +799,18 @@ | ||
| 967 | </el-table-column> | 799 | </el-table-column> |
| 968 | <el-table-column prop="name" label="分数"> | 800 | <el-table-column prop="name" label="分数"> |
| 969 | <template #default="scope"> | 801 | <template #default="scope"> |
| 970 | - <el-input | ||
| 971 | - v-model.number="scope.row.num" | ||
| 972 | - :min="0" | ||
| 973 | - :max="100" | ||
| 974 | - :readonly="scope.row.readonly" | ||
| 975 | - @input="validateScore(scope.row)" | ||
| 976 | - /> | 802 | + <el-input v-model.number="scope.row.num" :min="0" :max="100" :readonly="scope.row.readonly" |
| 803 | + @input="validateScore(scope.row)" /> | ||
| 977 | </template> | 804 | </template> |
| 978 | </el-table-column> | 805 | </el-table-column> |
| 979 | - <el-table-column label="" min-width="120" > | ||
| 980 | - <template #default="{$index}"> | ||
| 981 | - <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="answerMoveUp($index)" v-if="$index!=0">↑</span> | ||
| 982 | - <span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)" v-if="$index != (options.length-1)">↓</span> | ||
| 983 | - </template> | ||
| 984 | - </el-table-column> | 806 | + <el-table-column label="" min-width="120"> |
| 807 | + <template #default="{ $index }"> | ||
| 808 | + <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" | ||
| 809 | + @click="answerMoveUp($index)" v-if="$index != 0">↑</span> | ||
| 810 | + <span style="cursor: pointer; color: #3F9B6A;" | ||
| 811 | + @click="answerMoveDown($index)" v-if="$index != (options.length - 1)">↓</span> | ||
| 812 | + </template> | ||
| 813 | + </el-table-column> | ||
| 985 | <el-table-column label="操作"> | 814 | <el-table-column label="操作"> |
| 986 | <template #default="scope"> | 815 | <template #default="scope"> |
| 987 | <div class="tableBtn greens" @click="deleteOption(scope.$index)">删除</div> | 816 | <div class="tableBtn greens" @click="deleteOption(scope.$index)">删除</div> |
| @@ -1000,30 +829,18 @@ | @@ -1000,30 +829,18 @@ | ||
| 1000 | </el-dialog> | 829 | </el-dialog> |
| 1001 | <template #footer> | 830 | <template #footer> |
| 1002 | <div style="display: flex; justify-content: flex-end; align-items: center;"> | 831 | <div style="display: flex; justify-content: flex-end; align-items: center;"> |
| 1003 | - <el-button | ||
| 1004 | - class="buttonHover" | ||
| 1005 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 1006 | - @click="closeFn(1)" | ||
| 1007 | - >返回</el-button> | 832 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 833 | + @click="closeFn(1)">返回</el-button> | ||
| 1008 | <el-button style="background-color: #3F9B6A;color: #fff" @click="addCheck(2)">确认</el-button> | 834 | <el-button style="background-color: #3F9B6A;color: #fff" @click="addCheck(2)">确认</el-button> |
| 1009 | 835 | ||
| 1010 | </div> | 836 | </div> |
| 1011 | </template> | 837 | </template> |
| 1012 | </el-dialog> | 838 | </el-dialog> |
| 1013 | <!-- 编辑 --> | 839 | <!-- 编辑 --> |
| 1014 | - <el-dialog | ||
| 1015 | - :visible.sync="bainjiBox" | ||
| 1016 | - custom-class="tongyong_css" | ||
| 1017 | - style="padding: 0;" | ||
| 1018 | - width="60%" | ||
| 1019 | - center | ||
| 1020 | - :close-on-click-modal="false" | ||
| 1021 | - :show-close="false" | ||
| 1022 | - > | ||
| 1023 | - <div | ||
| 1024 | - style="padding:20px;max-height: calc(100vh - 300px); | ||
| 1025 | - overflow-y: auto;" | ||
| 1026 | - > | 840 | + <el-dialog :visible.sync="bainjiBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center |
| 841 | + :close-on-click-modal="false" :show-close="false"> | ||
| 842 | + <div style="padding:20px;max-height: calc(100vh - 300px); | ||
| 843 | + overflow-y: auto;"> | ||
| 1027 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">编辑问卷</div> | 844 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">编辑问卷</div> |
| 1028 | <div> | 845 | <div> |
| 1029 | <el-tabs v-model="bianjiTabs" @tab-click=""> | 846 | <el-tabs v-model="bianjiTabs" @tab-click=""> |
| @@ -1031,8 +848,7 @@ | @@ -1031,8 +848,7 @@ | ||
| 1031 | <div style="width: 100%"> | 848 | <div style="width: 100%"> |
| 1032 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | 849 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> |
| 1033 | <div | 850 | <div |
| 1034 | - style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;" | ||
| 1035 | - > | 851 | + style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;"> |
| 1036 | <div>基本信息</div> | 852 | <div>基本信息</div> |
| 1037 | </div> | 853 | </div> |
| 1038 | <el-form ref="bianform" :model="secondData" :rules="rules" label-width="155px" style="padding:20px;"> | 854 | <el-form ref="bianform" :model="secondData" :rules="rules" label-width="155px" style="padding:20px;"> |
| @@ -1040,17 +856,9 @@ | @@ -1040,17 +856,9 @@ | ||
| 1040 | <el-input v-model="secondData.title" maxlength="50" /> | 856 | <el-input v-model="secondData.title" maxlength="50" /> |
| 1041 | </el-form-item> | 857 | </el-form-item> |
| 1042 | <el-form-item label="问卷起止时间"> | 858 | <el-form-item label="问卷起止时间"> |
| 1043 | - <el-date-picker | ||
| 1044 | - v-model="plan_Time" | ||
| 1045 | - style="width: 100%;" | ||
| 1046 | - value-format="yyyy-MM-dd" | ||
| 1047 | - type="daterange" | ||
| 1048 | - range-separator="至" | ||
| 1049 | - start-placeholder="开始日期" | ||
| 1050 | - end-placeholder="结束日期" | ||
| 1051 | - align="right" | ||
| 1052 | - :picker-options="pickerOptions" | ||
| 1053 | - /> | 859 | + <el-date-picker v-model="plan_Time" style="width: 100%;" value-format="yyyy-MM-dd" |
| 860 | + type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" | ||
| 861 | + align="right" :picker-options="pickerOptions" /> | ||
| 1054 | </el-form-item> | 862 | </el-form-item> |
| 1055 | <el-form-item label="发布端口" prop="publishPort"> | 863 | <el-form-item label="发布端口" prop="publishPort"> |
| 1056 | <el-select v-model="secondData.publishPort" placeholder="请选择"> | 864 | <el-select v-model="secondData.publishPort" placeholder="请选择"> |
| @@ -1090,7 +898,8 @@ | @@ -1090,7 +898,8 @@ | ||
| 1090 | </el-form-item> | 898 | </el-form-item> |
| 1091 | 899 | ||
| 1092 | <el-form-item label="问卷封面" prop="coverImage"> | 900 | <el-form-item label="问卷封面" prop="coverImage"> |
| 1093 | - <upimg :value="secondData.coverImage" :limit="1" :file-size="1" :is-show-tip="false" @input="e=>input(e,'2')" /> | 901 | + <upimg :value="secondData.coverImage" :limit="1" :file-size="1" :is-show-tip="false" |
| 902 | + @input="e => input(e, '2')" /> | ||
| 1094 | </el-form-item> | 903 | </el-form-item> |
| 1095 | <el-form-item label="姓名" prop="needName"> | 904 | <el-form-item label="姓名" prop="needName"> |
| 1096 | <el-radio-group v-model="secondData.needName" style="margin-top:13px;"> | 905 | <el-radio-group v-model="secondData.needName" style="margin-top:13px;"> |
| @@ -1119,10 +928,10 @@ | @@ -1119,10 +928,10 @@ | ||
| 1119 | </el-form-item> | 928 | </el-form-item> |
| 1120 | </el-form> | 929 | </el-form> |
| 1121 | </div> | 930 | </div> |
| 1122 | - <div v-if="secondData.filler=='会员'" style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | 931 | + <div v-if="secondData.filler == '会员'" |
| 932 | + style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | ||
| 1123 | <div | 933 | <div |
| 1124 | - style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;" | ||
| 1125 | - > | 934 | + style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;"> |
| 1126 | <div>参与答卷奖励</div> | 935 | <div>参与答卷奖励</div> |
| 1127 | </div> | 936 | </div> |
| 1128 | <el-form ref="form" :model="secondData" label-width="140px" style="padding:20px;"> | 937 | <el-form ref="form" :model="secondData" label-width="140px" style="padding:20px;"> |
| @@ -1157,8 +966,7 @@ | @@ -1157,8 +966,7 @@ | ||
| 1157 | <div style="width: 100%"> | 966 | <div style="width: 100%"> |
| 1158 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> | 967 | <div style="border:1px solid #DCDFE6;font-size:14px;margin-bottom:10px;"> |
| 1159 | <div | 968 | <div |
| 1160 | - style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;" | ||
| 1161 | - > | 969 | + style="padding:10px 20px;border-bottom:1px solid #DCDFE6;display:flex;justify-content: space-between;"> |
| 1162 | <div>问卷内容</div> | 970 | <div>问卷内容</div> |
| 1163 | <div> | 971 | <div> |
| 1164 | <div class="greens tableBtn" @click="tikuAdd = true">新增</div> | 972 | <div class="greens tableBtn" @click="tikuAdd = true">新增</div> |
| @@ -1168,11 +976,9 @@ | @@ -1168,11 +976,9 @@ | ||
| 1168 | </div> | 976 | </div> |
| 1169 | 977 | ||
| 1170 | <div style="padding:20px;"> | 978 | <div style="padding:20px;"> |
| 1171 | - <el-table | ||
| 1172 | - :data="secondDataTi" | ||
| 1173 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 1174 | - class="xddTable" | ||
| 1175 | - > | 979 | + <el-table :data="secondDataTi" |
| 980 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }" | ||
| 981 | + class="xddTable"> | ||
| 1176 | <el-table-column label="序号" min-width="100"> | 982 | <el-table-column label="序号" min-width="100"> |
| 1177 | <template slot-scope="scope"> | 983 | <template slot-scope="scope"> |
| 1178 | {{ scope.$index + 1 }} | 984 | {{ scope.$index + 1 }} |
| @@ -1181,15 +987,17 @@ | @@ -1181,15 +987,17 @@ | ||
| 1181 | <el-table-column label="题目" min-width="150" prop="tikuTitle" show-overflow-tooltip /> | 987 | <el-table-column label="题目" min-width="150" prop="tikuTitle" show-overflow-tooltip /> |
| 1182 | <el-table-column label="题型" min-width="80" prop="questionType" /> | 988 | <el-table-column label="题型" min-width="80" prop="questionType" /> |
| 1183 | <el-table-column label="是否必填" prop="isRequired" min-width="120" /> | 989 | <el-table-column label="是否必填" prop="isRequired" min-width="120" /> |
| 1184 | - <el-table-column label="" min-width="120" > | 990 | + <el-table-column label="" min-width="120"> |
| 1185 | <template #default="scope"> | 991 | <template #default="scope"> |
| 1186 | - <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="moveUp2(scope.$index)" v-if="scope.$index!=0">↑</span> | ||
| 1187 | - <span style="cursor: pointer; color: #3F9B6A;" @click="moveDown2(scope.$index)" v-if="scope.$index != (secondDataTi.length-1)">↓</span> | 992 | + <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" |
| 993 | + @click="moveUp2(scope.$index)" v-if="scope.$index != 0">↑</span> | ||
| 994 | + <span style="cursor: pointer; color: #3F9B6A;" @click="moveDown2(scope.$index)" | ||
| 995 | + v-if="scope.$index != (secondDataTi.length - 1)">↓</span> | ||
| 1188 | </template> | 996 | </template> |
| 1189 | </el-table-column> | 997 | </el-table-column> |
| 1190 | <el-table-column label="操作" min-width="80"> | 998 | <el-table-column label="操作" min-width="80"> |
| 1191 | <template slot-scope="scope"> | 999 | <template slot-scope="scope"> |
| 1192 | - <div class="tableBtn greens" @click="delWenCon('2',scope.$index)">删除</div> | 1000 | + <div class="tableBtn greens" @click="delWenCon('2', scope.$index)">删除</div> |
| 1193 | </template> | 1001 | </template> |
| 1194 | </el-table-column> | 1002 | </el-table-column> |
| 1195 | </el-table> | 1003 | </el-table> |
| @@ -1202,16 +1010,8 @@ | @@ -1202,16 +1010,8 @@ | ||
| 1202 | </div> | 1010 | </div> |
| 1203 | 1011 | ||
| 1204 | </div> | 1012 | </div> |
| 1205 | - <el-dialog | ||
| 1206 | - :visible.sync="tikuBox" | ||
| 1207 | - custom-class="tongyong_css" | ||
| 1208 | - style="padding: 0;" | ||
| 1209 | - width="60%" | ||
| 1210 | - center | ||
| 1211 | - :close-on-click-modal="false" | ||
| 1212 | - append-to-body | ||
| 1213 | - @close="tikuquxiao(2)" | ||
| 1214 | - > | 1013 | + <el-dialog :visible.sync="tikuBox" custom-class="tongyong_css" style="padding: 0;" width="60%" center |
| 1014 | + :close-on-click-modal="false" append-to-body @close="tikuquxiao(2)"> | ||
| 1215 | <div style="padding:20px;"> | 1015 | <div style="padding:20px;"> |
| 1216 | 1016 | ||
| 1217 | <div style="padding:20px;"> | 1017 | <div style="padding:20px;"> |
| @@ -1235,29 +1035,22 @@ | @@ -1235,29 +1035,22 @@ | ||
| 1235 | <el-input v-model="timuMsg" style="width:50%;margin-right: 15px;" /> | 1035 | <el-input v-model="timuMsg" style="width:50%;margin-right: 15px;" /> |
| 1236 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tikusous">查询 | 1036 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tikusous">查询 |
| 1237 | </el-button> | 1037 | </el-button> |
| 1238 | - <el-button | ||
| 1239 | - class="buttonHover" | ||
| 1240 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 1241 | - @click="tikuclose" | ||
| 1242 | - >重置 | 1038 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 1039 | + @click="tikuclose">重置 | ||
| 1243 | </el-button> | 1040 | </el-button> |
| 1244 | </div> | 1041 | </div> |
| 1245 | </div> | 1042 | </div> |
| 1246 | <div style="padding:20px;overflow-y: auto;height:495px"> | 1043 | <div style="padding:20px;overflow-y: auto;height:495px"> |
| 1247 | 1044 | ||
| 1248 | - <el-table | ||
| 1249 | - ref="ziyuanData" | 1045 | + <el-table ref="ziyuanData" |
| 1250 | :data="tikuziyuan.slice((currentPageListTi - 1) * pageSizeTi, currentPageListTi * pageSizeTi)" | 1046 | :data="tikuziyuan.slice((currentPageListTi - 1) * pageSizeTi, currentPageListTi * pageSizeTi)" |
| 1251 | - :row-key="row=>row.id" | ||
| 1252 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 1253 | - tooltip-effect="dark" | ||
| 1254 | - @selection-change="handleSelectionChange" | ||
| 1255 | - @toggleRowSelection="hangSelchange" | ||
| 1256 | - > | 1047 | + :row-key="row => row.id" |
| 1048 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }" | ||
| 1049 | + tooltip-effect="dark" @selection-change="handleSelectionChange" @toggleRowSelection="hangSelchange"> | ||
| 1257 | <el-table-column type="selection" width="55" :reserve-selection="true" /> | 1050 | <el-table-column type="selection" width="55" :reserve-selection="true" /> |
| 1258 | <el-table-column label="序号" min-width="100"> | 1051 | <el-table-column label="序号" min-width="100"> |
| 1259 | <template slot-scope="scope"> | 1052 | <template slot-scope="scope"> |
| 1260 | - {{ scope.$index +1 }} | 1053 | + {{ scope.$index + 1 }} |
| 1261 | </template> | 1054 | </template> |
| 1262 | </el-table-column> | 1055 | </el-table-column> |
| 1263 | <el-table-column label="题目" min-width="400" prop="tikuTitle" show-overflow-tooltip /> | 1056 | <el-table-column label="题目" min-width="400" prop="tikuTitle" show-overflow-tooltip /> |
| @@ -1270,17 +1063,9 @@ | @@ -1270,17 +1063,9 @@ | ||
| 1270 | </el-table> | 1063 | </el-table> |
| 1271 | <div style="display: flex;justify-content: space-between;margin-top: 10px;"> | 1064 | <div style="display: flex;justify-content: space-between;margin-top: 10px;"> |
| 1272 | <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ totalTi }}</span> 条</div> | 1065 | <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{ totalTi }}</span> 条</div> |
| 1273 | - <el-pagination | ||
| 1274 | - :current-page="currentPageListTi" | ||
| 1275 | - :page-sizes="[10, 20, 50, 100]" | ||
| 1276 | - :page-size="pageSizeTi" | ||
| 1277 | - background | ||
| 1278 | - small | ||
| 1279 | - layout="prev, pager, next" | ||
| 1280 | - :total="totalTi" | ||
| 1281 | - @size-change="handleSizeChangeTi" | ||
| 1282 | - @current-change="handleCurrentChangeTi" | ||
| 1283 | - /> | 1066 | + <el-pagination :current-page="currentPageListTi" :page-sizes="[10, 20, 50, 100]" :page-size="pageSizeTi" |
| 1067 | + background small layout="prev, pager, next" :total="totalTi" @size-change="handleSizeChangeTi" | ||
| 1068 | + @current-change="handleCurrentChangeTi" /> | ||
| 1284 | </div> | 1069 | </div> |
| 1285 | </div> | 1070 | </div> |
| 1286 | 1071 | ||
| @@ -1289,25 +1074,13 @@ | @@ -1289,25 +1074,13 @@ | ||
| 1289 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tiSelQue(2)">确定</el-button> | 1074 | <el-button style="background-color: #3F9B6A;color: #fff" @click="tiSelQue(2)">确定</el-button> |
| 1290 | </div> | 1075 | </div> |
| 1291 | </div> | 1076 | </div> |
| 1292 | - <el-dialog | ||
| 1293 | - :visible.sync="timuXiang" | ||
| 1294 | - custom-class="tongyong_css" | ||
| 1295 | - style="padding: 0;" | ||
| 1296 | - width="50%" | ||
| 1297 | - center | ||
| 1298 | - :close-on-click-modal="false" | ||
| 1299 | - append-to-body | ||
| 1300 | - > | 1077 | + <el-dialog :visible.sync="timuXiang" custom-class="tongyong_css" style="padding: 0;" width="50%" center |
| 1078 | + :close-on-click-modal="false" append-to-body> | ||
| 1301 | <div style="padding:20px;"> | 1079 | <div style="padding:20px;"> |
| 1302 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div> | 1080 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">详情页</div> |
| 1303 | <div> | 1081 | <div> |
| 1304 | - <el-descriptions | ||
| 1305 | - class="margin-top" | ||
| 1306 | - :column="1" | ||
| 1307 | - border | ||
| 1308 | - :label-style="labelStyle" | ||
| 1309 | - :content-style="contentStyle" | ||
| 1310 | - > | 1082 | + <el-descriptions class="margin-top" :column="1" border :label-style="labelStyle" |
| 1083 | + :content-style="contentStyle"> | ||
| 1311 | <el-descriptions-item> | 1084 | <el-descriptions-item> |
| 1312 | <template slot="label"> | 1085 | <template slot="label"> |
| 1313 | 题目 | 1086 | 题目 |
| @@ -1327,13 +1100,8 @@ | @@ -1327,13 +1100,8 @@ | ||
| 1327 | {{ timuData.questionBank }} | 1100 | {{ timuData.questionBank }} |
| 1328 | </el-descriptions-item> | 1101 | </el-descriptions-item> |
| 1329 | </el-descriptions> | 1102 | </el-descriptions> |
| 1330 | - <el-descriptions | ||
| 1331 | - class="margin-top" | ||
| 1332 | - :column="1" | ||
| 1333 | - border | ||
| 1334 | - :label-style="labelStyle" | ||
| 1335 | - :content-style="contentStyle" | ||
| 1336 | - > | 1103 | + <el-descriptions class="margin-top" :column="1" border :label-style="labelStyle" |
| 1104 | + :content-style="contentStyle"> | ||
| 1337 | <el-descriptions-item> | 1105 | <el-descriptions-item> |
| 1338 | <template slot="label"> | 1106 | <template slot="label"> |
| 1339 | 默认是否必填 | 1107 | 默认是否必填 |
| @@ -1353,26 +1121,15 @@ | @@ -1353,26 +1121,15 @@ | ||
| 1353 | </el-descriptions> | 1121 | </el-descriptions> |
| 1354 | </div> | 1122 | </div> |
| 1355 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> | 1123 | <div style="padding-top:20px;display:flex;justify-content: flex-end;"> |
| 1356 | - <el-button | ||
| 1357 | - class="buttonHover" | ||
| 1358 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 1359 | - @click="timuXiang = false" | ||
| 1360 | - >返回</el-button> | 1124 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 1125 | + @click="timuXiang = false">返回</el-button> | ||
| 1361 | </div> | 1126 | </div> |
| 1362 | </div> | 1127 | </div> |
| 1363 | 1128 | ||
| 1364 | </el-dialog> | 1129 | </el-dialog> |
| 1365 | </el-dialog> | 1130 | </el-dialog> |
| 1366 | - <el-dialog | ||
| 1367 | - :visible.sync="tikuAdd" | ||
| 1368 | - custom-class="tongyong_css" | ||
| 1369 | - style="padding: 0;" | ||
| 1370 | - width="60%" | ||
| 1371 | - center | ||
| 1372 | - :close-on-click-modal="false" | ||
| 1373 | - append-to-body | ||
| 1374 | - @close="quxiao(2)" | ||
| 1375 | - > | 1131 | + <el-dialog :visible.sync="tikuAdd" custom-class="tongyong_css" style="padding: 0;" width="60%" center |
| 1132 | + :close-on-click-modal="false" append-to-body @close="quxiao(2)"> | ||
| 1376 | <div style="padding:20px;"> | 1133 | <div style="padding:20px;"> |
| 1377 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;"> | 1134 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;"> |
| 1378 | 新增题目 | 1135 | 新增题目 |
| @@ -1389,6 +1146,9 @@ | @@ -1389,6 +1146,9 @@ | ||
| 1389 | <el-option label="文本" value="文本" /> | 1146 | <el-option label="文本" value="文本" /> |
| 1390 | </el-select> | 1147 | </el-select> |
| 1391 | </el-form-item> | 1148 | </el-form-item> |
| 1149 | + <el-form-item v-if="zhong.questionType == '多选'" label="最多可选" prop="maxChoose"> | ||
| 1150 | + <el-input-number v-model="zhong.maxChoose" :min="0" :max="options.length" /> 0为不限制填写数量 | ||
| 1151 | + </el-form-item> | ||
| 1392 | <el-form-item label="隶属题库"> | 1152 | <el-form-item label="隶属题库"> |
| 1393 | <el-select v-model="zhong.questionBank" placeholder="请选择"> | 1153 | <el-select v-model="zhong.questionBank" placeholder="请选择"> |
| 1394 | <el-option label="用户端题库" value="用户端题库" /> | 1154 | <el-option label="用户端题库" value="用户端题库" /> |
| @@ -1408,11 +1168,9 @@ | @@ -1408,11 +1168,9 @@ | ||
| 1408 | <el-radio label="非必填">非必填</el-radio> | 1168 | <el-radio label="非必填">非必填</el-radio> |
| 1409 | </el-radio-group> | 1169 | </el-radio-group> |
| 1410 | </el-form-item> | 1170 | </el-form-item> |
| 1411 | - <el-form-item v-if="zhong.questionType !='文本'" label="选项" prop="optionSettings"> | ||
| 1412 | - <el-table | ||
| 1413 | - :data="options" | ||
| 1414 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 1415 | - > | 1171 | + <el-form-item v-if="zhong.questionType != '文本'" label="选项" prop="optionSettings"> |
| 1172 | + <el-table :data="options" | ||
| 1173 | + :header-cell-style="{ fontSize: '14px', color: '#0009', fontWeight: 'normal', backgroundColor: '#F2F3F5' }"> | ||
| 1416 | <el-table-column prop="index" label="序号" width="180"> | 1174 | <el-table-column prop="index" label="序号" width="180"> |
| 1417 | <template #default="scope"> | 1175 | <template #default="scope"> |
| 1418 | {{ scope.$index + 1 }} | 1176 | {{ scope.$index + 1 }} |
| @@ -1425,21 +1183,18 @@ | @@ -1425,21 +1183,18 @@ | ||
| 1425 | </el-table-column> | 1183 | </el-table-column> |
| 1426 | <el-table-column prop="name" label="分数"> | 1184 | <el-table-column prop="name" label="分数"> |
| 1427 | <template #default="scope"> | 1185 | <template #default="scope"> |
| 1428 | - <el-input | ||
| 1429 | - v-model.number="scope.row.num" | ||
| 1430 | - :min="0" | ||
| 1431 | - :max="100" | ||
| 1432 | - :readonly="scope.row.readonly" | ||
| 1433 | - @input="validateScore(scope.row)" | ||
| 1434 | - /> | 1186 | + <el-input v-model.number="scope.row.num" :min="0" :max="100" :readonly="scope.row.readonly" |
| 1187 | + @input="validateScore(scope.row)" /> | ||
| 1188 | + </template> | ||
| 1189 | + </el-table-column> | ||
| 1190 | + <el-table-column label="" min-width="120"> | ||
| 1191 | + <template #default="{ $index }"> | ||
| 1192 | + <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="answerMoveUp($index)" | ||
| 1193 | + v-if="$index != 0">↑</span> | ||
| 1194 | + <span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)" | ||
| 1195 | + v-if="$index != (options.length - 1)">↓</span> | ||
| 1435 | </template> | 1196 | </template> |
| 1436 | </el-table-column> | 1197 | </el-table-column> |
| 1437 | - <el-table-column label="" min-width="120" > | ||
| 1438 | - <template #default="{$index}"> | ||
| 1439 | - <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="answerMoveUp($index)" v-if="$index!=0">↑</span> | ||
| 1440 | - <span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)" v-if="$index != (options.length-1)">↓</span> | ||
| 1441 | - </template> | ||
| 1442 | - </el-table-column> | ||
| 1443 | <el-table-column label="操作"> | 1198 | <el-table-column label="操作"> |
| 1444 | <template #default="scope"> | 1199 | <template #default="scope"> |
| 1445 | <div class="tableBtn greens" @click="deleteOption(scope.$index)">删除</div> | 1200 | <div class="tableBtn greens" @click="deleteOption(scope.$index)">删除</div> |
| @@ -1458,11 +1213,8 @@ | @@ -1458,11 +1213,8 @@ | ||
| 1458 | </el-dialog> | 1213 | </el-dialog> |
| 1459 | <template #footer> | 1214 | <template #footer> |
| 1460 | <div style="display: flex; justify-content: flex-end; align-items: center;"> | 1215 | <div style="display: flex; justify-content: flex-end; align-items: center;"> |
| 1461 | - <el-button | ||
| 1462 | - class="buttonHover" | ||
| 1463 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" | ||
| 1464 | - @click="closeFn(2)" | ||
| 1465 | - >返回</el-button> | 1216 | + <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" |
| 1217 | + @click="closeFn(2)">返回</el-button> | ||
| 1466 | <el-button style="background-color: #3F9B6A;color: #fff" @click="bianCheck">确认</el-button> | 1218 | <el-button style="background-color: #3F9B6A;color: #fff" @click="bianCheck">确认</el-button> |
| 1467 | </div> | 1219 | </div> |
| 1468 | </template> | 1220 | </template> |
| @@ -1470,19 +1222,13 @@ | @@ -1470,19 +1222,13 @@ | ||
| 1470 | 1222 | ||
| 1471 | <!-- 禁用 --> | 1223 | <!-- 禁用 --> |
| 1472 | 1224 | ||
| 1473 | - <el-dialog | ||
| 1474 | - :visible.sync="downShow" | ||
| 1475 | - custom-class="tongyong_css" | ||
| 1476 | - style="padding: 0;" | ||
| 1477 | - width="50%" | ||
| 1478 | - center | ||
| 1479 | - :close-on-click-modal="false" | ||
| 1480 | - append-to-body | ||
| 1481 | - > | 1225 | + <el-dialog :visible.sync="downShow" custom-class="tongyong_css" style="padding: 0;" width="50%" center |
| 1226 | + :close-on-click-modal="false" append-to-body> | ||
| 1482 | <div style="padding:20px;"> | 1227 | <div style="padding:20px;"> |
| 1483 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">禁用</div> | 1228 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">禁用</div> |
| 1484 | <div style="padding:30px 0px 0px"> | 1229 | <div style="padding:30px 0px 0px"> |
| 1485 | - <el-form ref="opinionForm" :model="opinionDel" :rules="pinForm" label-width="120px" style="position: relative"> | 1230 | + <el-form ref="opinionForm" :model="opinionDel" :rules="pinForm" label-width="120px" |
| 1231 | + style="position: relative"> | ||
| 1486 | <el-form-item label="禁用原因" class="grid-content bg-purple" prop="name"> | 1232 | <el-form-item label="禁用原因" class="grid-content bg-purple" prop="name"> |
| 1487 | <el-input v-model="opinionDel.opinionDelisting" type="textarea" placeholder="请输入禁用原因" /> | 1233 | <el-input v-model="opinionDel.opinionDelisting" type="textarea" placeholder="请输入禁用原因" /> |
| 1488 | </el-form-item> | 1234 | </el-form-item> |
| @@ -1490,20 +1236,13 @@ | @@ -1490,20 +1236,13 @@ | ||
| 1490 | </el-form> | 1236 | </el-form> |
| 1491 | </div> | 1237 | </div> |
| 1492 | <div style="display:flex;justify-content: flex-end;padding:20px;"> | 1238 | <div style="display:flex;justify-content: flex-end;padding:20px;"> |
| 1493 | - <el-button style="background-color: #3F9B6A;color: #fff;" @click="downShow=false">取消</el-button> | 1239 | + <el-button style="background-color: #3F9B6A;color: #fff;" @click="downShow = false">取消</el-button> |
| 1494 | <el-button style="background-color: #3F9B6A;color: #fff;" @click="downShowCheck">确定</el-button> | 1240 | <el-button style="background-color: #3F9B6A;color: #fff;" @click="downShowCheck">确定</el-button> |
| 1495 | </div> | 1241 | </div> |
| 1496 | </div> | 1242 | </div> |
| 1497 | </el-dialog> | 1243 | </el-dialog> |
| 1498 | - <el-dialog | ||
| 1499 | - :visible.sync="yulanShow" | ||
| 1500 | - custom-class="tongyong_css" | ||
| 1501 | - style="padding: 0;" | ||
| 1502 | - width="43%" | ||
| 1503 | - center | ||
| 1504 | - :close-on-click-modal="false" | ||
| 1505 | - append-to-body | ||
| 1506 | - > | 1244 | + <el-dialog :visible.sync="yulanShow" custom-class="tongyong_css" style="padding: 0;" width="43%" center |
| 1245 | + :close-on-click-modal="false" append-to-body> | ||
| 1507 | <div style="padding:20px;"> | 1246 | <div style="padding:20px;"> |
| 1508 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">预览</div> | 1247 | <div style="font-size: 14px;padding-bottom: 20px;color: #000;">预览</div> |
| 1509 | <div style="margin:auto;width:50%;height:600px;overflow-y: auto;overflow-x: hidden;"> | 1248 | <div style="margin:auto;width:50%;height:600px;overflow-y: auto;overflow-x: hidden;"> |
| @@ -1531,54 +1270,44 @@ | @@ -1531,54 +1270,44 @@ | ||
| 1531 | </div> --> | 1270 | </div> --> |
| 1532 | </div> | 1271 | </div> |
| 1533 | </div> | 1272 | </div> |
| 1534 | - <div v-for="(item,index) in secondData.question" class="question"> | 1273 | + <div v-for="(item, index) in secondData.question" class="question"> |
| 1535 | <p class="question-title"> | 1274 | <p class="question-title"> |
| 1536 | <span v-if="item.required == '必填'" style="color: red;">*</span> | 1275 | <span v-if="item.required == '必填'" style="color: red;">*</span> |
| 1537 | {{ index }}.<span style="">({{ item.type }})</span> | 1276 | {{ index }}.<span style="">({{ item.type }})</span> |
| 1538 | {{ item.title }} | 1277 | {{ item.title }} |
| 1539 | </p> | 1278 | </p> |
| 1540 | <div> | 1279 | <div> |
| 1541 | - | ||
| 1542 | - | ||
| 1543 | - <el-radio-group | ||
| 1544 | - v-for="(val, idx) in item.options" | ||
| 1545 | - v-if="item.type =='单选'&&item.layoutType!=2" | ||
| 1546 | - :key="idx" | ||
| 1547 | - style="display: content;flex-direction: column;width:100%;margin:0 0 4px 0" | ||
| 1548 | - > | 1280 | + |
| 1281 | + | ||
| 1282 | + <el-radio-group v-for="(val, idx) in item.options" v-if="item.type == '单选' && item.layoutType != 2" | ||
| 1283 | + :key="idx" style="display: content;flex-direction: column;width:100%;margin:0 0 4px 0"> | ||
| 1549 | <el-radio disabled> | 1284 | <el-radio disabled> |
| 1550 | - <snap | ||
| 1551 | - style=" white-space: normal !important; | ||
| 1552 | - word-break: break-all !important;" | ||
| 1553 | - > | 1285 | + <snap style=" white-space: normal !important; |
| 1286 | + word-break: break-all !important;"> | ||
| 1554 | {{ val.answer }} | 1287 | {{ val.answer }} |
| 1555 | - </snap> | 1288 | + </snap> |
| 1556 | </el-radio> | 1289 | </el-radio> |
| 1557 | 1290 | ||
| 1558 | </el-radio-group> | 1291 | </el-radio-group> |
| 1559 | - <div v-if="item.type =='单选'&&item.layoutType==2" style="display: flex;width: 100%;flex-wrap: wrap;"> | ||
| 1560 | - <div class="answerItem" v-for="(val, idx) in item.options" :key="idx">{{ val.answer }}</div> | 1292 | + <div v-if="item.type == '单选' && item.layoutType == 2" |
| 1293 | + style="display: flex;width: 100%;flex-wrap: wrap;"> | ||
| 1294 | + <div class="answerItem" v-for="(val, idx) in item.options" :key="idx">{{ val.answer }}</div> | ||
| 1561 | </div> | 1295 | </div> |
| 1562 | - <el-checkbox-group | ||
| 1563 | - v-for="(val, idx) in item.options" | ||
| 1564 | - v-if="item.type =='多选'&&item.layoutType!=2" | ||
| 1565 | - :key="idx" | ||
| 1566 | - style="display: content;flex-direction: column;width:100%;margin:0 0 4px 0" | ||
| 1567 | - > | 1296 | + <el-checkbox-group v-for="(val, idx) in item.options" v-if="item.type == '多选' && item.layoutType != 2" |
| 1297 | + :key="idx" style="display: content;flex-direction: column;width:100%;margin:0 0 4px 0"> | ||
| 1568 | <el-checkbox disabled> | 1298 | <el-checkbox disabled> |
| 1569 | - <snap | ||
| 1570 | - style=" white-space: normal !important; | ||
| 1571 | - word-break: break-all !important;" | ||
| 1572 | - > | 1299 | + <snap style=" white-space: normal !important; |
| 1300 | + word-break: break-all !important;"> | ||
| 1573 | {{ val.answer }} | 1301 | {{ val.answer }} |
| 1574 | </snap> | 1302 | </snap> |
| 1575 | </el-checkbox> | 1303 | </el-checkbox> |
| 1576 | </el-checkbox-group> | 1304 | </el-checkbox-group> |
| 1577 | - | ||
| 1578 | - <div v-if="item.type =='多选'&&item.layoutType==2" style="display: flex;width: 100%;flex-wrap: wrap;"> | ||
| 1579 | - <div class="answerItem" v-for="(val, idx) in item.options" :key="idx">{{ val.answer }}</div> | 1305 | + |
| 1306 | + <div v-if="item.type == '多选' && item.layoutType == 2" | ||
| 1307 | + style="display: flex;width: 100%;flex-wrap: wrap;"> | ||
| 1308 | + <div class="answerItem" v-for="(val, idx) in item.options" :key="idx">{{ val.answer }}</div> | ||
| 1580 | </div> | 1309 | </div> |
| 1581 | - <div v-if="item.type =='文本'"> | 1310 | + <div v-if="item.type == '文本'"> |
| 1582 | <el-input v-model="model1.name" placeholder="请输入" disabled style="width:80%" /> | 1311 | <el-input v-model="model1.name" placeholder="请输入" disabled style="width:80%" /> |
| 1583 | 1312 | ||
| 1584 | </div> | 1313 | </div> |
| @@ -1612,12 +1341,8 @@ | @@ -1612,12 +1341,8 @@ | ||
| 1612 | <!-- <p class="question-title">您的建议:</p > | 1341 | <!-- <p class="question-title">您的建议:</p > |
| 1613 | <textarea v-model="suggestion"></textarea> --> | 1342 | <textarea v-model="suggestion"></textarea> --> |
| 1614 | <el-form label-position="right" :model="model1" style="background-color:#fff;border-radius: 10px;"> | 1343 | <el-form label-position="right" :model="model1" style="background-color:#fff;border-radius: 10px;"> |
| 1615 | - <el-form-item | ||
| 1616 | - v-if="secondData.needName == '必填'" | ||
| 1617 | - label="姓名" | ||
| 1618 | - prop="name" | ||
| 1619 | - style="padding:10px 10px 0 10px;" | ||
| 1620 | - > | 1344 | + <el-form-item v-if="secondData.needName == '必填'" label="姓名" prop="name" |
| 1345 | + style="padding:10px 10px 0 10px;"> | ||
| 1621 | <el-input v-model="model1.name" placeholder="请输入姓名" disabled style="width:80%" /> | 1346 | <el-input v-model="model1.name" placeholder="请输入姓名" disabled style="width:80%" /> |
| 1622 | </el-form-item> | 1347 | </el-form-item> |
| 1623 | <el-form-item v-if="secondData.needPhone == '必填'" label="电话" prop="phone" style="padding: 0 10px;"> | 1348 | <el-form-item v-if="secondData.needPhone == '必填'" label="电话" prop="phone" style="padding: 0 10px;"> |
| @@ -1626,19 +1351,9 @@ | @@ -1626,19 +1351,9 @@ | ||
| 1626 | <el-form-item v-if="secondData.needGender == '必填'" label="性别" prop="sex" style="padding: 0 10px ;"> | 1351 | <el-form-item v-if="secondData.needGender == '必填'" label="性别" prop="sex" style="padding: 0 10px ;"> |
| 1627 | <el-input v-model="model1.sex" placeholder="请输入性别" disabled style="width:80%" /> | 1352 | <el-input v-model="model1.sex" placeholder="请输入性别" disabled style="width:80%" /> |
| 1628 | </el-form-item> | 1353 | </el-form-item> |
| 1629 | - <el-form-item | ||
| 1630 | - v-if="secondData.needOpinion == '必填'" | ||
| 1631 | - label="意见" | ||
| 1632 | - prop="yij" | ||
| 1633 | - style="padding:0 10px 10px 10px;" | ||
| 1634 | - > | ||
| 1635 | - <el-input | ||
| 1636 | - v-model="model1.yij" | ||
| 1637 | - type="textarea" | ||
| 1638 | - placeholder="请输入内容" | ||
| 1639 | - disabled | ||
| 1640 | - style="width:80%" | ||
| 1641 | - /> | 1354 | + <el-form-item v-if="secondData.needOpinion == '必填'" label="意见" prop="yij" |
| 1355 | + style="padding:0 10px 10px 10px;"> | ||
| 1356 | + <el-input v-model="model1.yij" type="textarea" placeholder="请输入内容" disabled style="width:80%" /> | ||
| 1642 | </el-form-item> | 1357 | </el-form-item> |
| 1643 | </el-form> | 1358 | </el-form> |
| 1644 | 1359 | ||
| @@ -1652,7 +1367,7 @@ | @@ -1652,7 +1367,7 @@ | ||
| 1652 | 问卷作答地址:{{ wenjuanUrl }} <span style="color:#3F9B6A" @click="copyUrl(wenjuanUrl)">复制</span> | 1367 | 问卷作答地址:{{ wenjuanUrl }} <span style="color:#3F9B6A" @click="copyUrl(wenjuanUrl)">复制</span> |
| 1653 | </div> | 1368 | </div> |
| 1654 | <div style="display:flex;justify-content: flex-end;padding:20px;"> | 1369 | <div style="display:flex;justify-content: flex-end;padding:20px;"> |
| 1655 | - <el-button style="background-color: #3F9B6A;color: #fff;" @click="yulanShow=false">取消</el-button> | 1370 | + <el-button style="background-color: #3F9B6A;color: #fff;" @click="yulanShow = false">取消</el-button> |
| 1656 | 1371 | ||
| 1657 | </div> | 1372 | </div> |
| 1658 | </div> | 1373 | </div> |
| @@ -1686,7 +1401,7 @@ export default { | @@ -1686,7 +1401,7 @@ export default { | ||
| 1686 | tiaoxing, | 1401 | tiaoxing, |
| 1687 | wangEditor | 1402 | wangEditor |
| 1688 | }, | 1403 | }, |
| 1689 | - data () { | 1404 | + data() { |
| 1690 | return { | 1405 | return { |
| 1691 | 1406 | ||
| 1692 | tableHeight: 600, // 设置为你想要的表格高度,单位是像素 | 1407 | tableHeight: 600, // 设置为你想要的表格高度,单位是像素 |
| @@ -1756,7 +1471,8 @@ export default { | @@ -1756,7 +1471,8 @@ export default { | ||
| 1756 | tikuTitle: '', | 1471 | tikuTitle: '', |
| 1757 | questionType: '', | 1472 | questionType: '', |
| 1758 | questionBank: '用户端题库', | 1473 | questionBank: '用户端题库', |
| 1759 | - layoutType:1, | 1474 | + layoutType: 1, |
| 1475 | + maxChoose: 0, | ||
| 1760 | isRequired: '必填', | 1476 | isRequired: '必填', |
| 1761 | questionDescription: '', | 1477 | questionDescription: '', |
| 1762 | optionSettings: {}, | 1478 | optionSettings: {}, |
| @@ -1857,7 +1573,7 @@ export default { | @@ -1857,7 +1573,7 @@ export default { | ||
| 1857 | required: true, | 1573 | required: true, |
| 1858 | message: '请输入创建人', | 1574 | message: '请输入创建人', |
| 1859 | trigger: 'blur' | 1575 | trigger: 'blur' |
| 1860 | - }, ], | 1576 | + },], |
| 1861 | }, | 1577 | }, |
| 1862 | 1578 | ||
| 1863 | tixrules: { | 1579 | tixrules: { |
| @@ -1865,7 +1581,7 @@ export default { | @@ -1865,7 +1581,7 @@ export default { | ||
| 1865 | required: true, | 1581 | required: true, |
| 1866 | message: '请输入题目', | 1582 | message: '请输入题目', |
| 1867 | trigger: 'blur' | 1583 | trigger: 'blur' |
| 1868 | - }, ], | 1584 | + },], |
| 1869 | questionType: [{ | 1585 | questionType: [{ |
| 1870 | required: true, | 1586 | required: true, |
| 1871 | message: '请选择题型', | 1587 | message: '请选择题型', |
| @@ -1913,7 +1629,7 @@ export default { | @@ -1913,7 +1629,7 @@ export default { | ||
| 1913 | isbutton: false, | 1629 | isbutton: false, |
| 1914 | currentPageList: 1, | 1630 | currentPageList: 1, |
| 1915 | pickerOptions: { | 1631 | pickerOptions: { |
| 1916 | - disabledDate (time) { | 1632 | + disabledDate(time) { |
| 1917 | return time.getTime() < Date.now() - 8.64e7; // 禁用当前时间之前的日期 | 1633 | return time.getTime() < Date.now() - 8.64e7; // 禁用当前时间之前的日期 |
| 1918 | } | 1634 | } |
| 1919 | }, | 1635 | }, |
| @@ -1925,22 +1641,22 @@ export default { | @@ -1925,22 +1641,22 @@ export default { | ||
| 1925 | computed: { | 1641 | computed: { |
| 1926 | 1642 | ||
| 1927 | }, | 1643 | }, |
| 1928 | - created () { | 1644 | + created() { |
| 1929 | this.getAll() | 1645 | this.getAll() |
| 1930 | }, | 1646 | }, |
| 1931 | methods: { | 1647 | methods: { |
| 1932 | - input (e, e1) { | 1648 | + input(e, e1) { |
| 1933 | // this.formInline[e1] = e | 1649 | // this.formInline[e1] = e |
| 1934 | - | 1650 | + |
| 1935 | if (e1 == '1') { | 1651 | if (e1 == '1') { |
| 1936 | this.formInline.coverImage = e | 1652 | this.formInline.coverImage = e |
| 1937 | } else { | 1653 | } else { |
| 1938 | this.secondData.coverImage = e | 1654 | this.secondData.coverImage = e |
| 1939 | } | 1655 | } |
| 1940 | 1656 | ||
| 1941 | - | 1657 | + |
| 1942 | }, | 1658 | }, |
| 1943 | - chenge (val) { | 1659 | + chenge(val) { |
| 1944 | this.formSel = { | 1660 | this.formSel = { |
| 1945 | title: '', | 1661 | title: '', |
| 1946 | questionnaireType: '', | 1662 | questionnaireType: '', |
| @@ -1951,14 +1667,14 @@ export default { | @@ -1951,14 +1667,14 @@ export default { | ||
| 1951 | this.leixing = !this.leixing | 1667 | this.leixing = !this.leixing |
| 1952 | this.chengeTatle = val | 1668 | this.chengeTatle = val |
| 1953 | }, | 1669 | }, |
| 1954 | - async getAll () { | 1670 | + async getAll() { |
| 1955 | const res = await TerminaGetAll(this.pageindex) | 1671 | const res = await TerminaGetAll(this.pageindex) |
| 1956 | this.tableData = res.data.content | 1672 | this.tableData = res.data.content |
| 1957 | this.total = res.data.totalElements | 1673 | this.total = res.data.totalElements |
| 1958 | }, | 1674 | }, |
| 1959 | 1675 | ||
| 1960 | // 新增确定按钮 | 1676 | // 新增确定按钮 |
| 1961 | - addCheck (val) { | 1677 | + addCheck(val) { |
| 1962 | this.$refs.inlineform.validate((valid) => { | 1678 | this.$refs.inlineform.validate((valid) => { |
| 1963 | if (valid) { | 1679 | if (valid) { |
| 1964 | if (this.Xin_Time != null) { | 1680 | if (this.Xin_Time != null) { |
| @@ -2028,7 +1744,7 @@ export default { | @@ -2028,7 +1744,7 @@ export default { | ||
| 2028 | }) | 1744 | }) |
| 2029 | }, | 1745 | }, |
| 2030 | // 获取时间 | 1746 | // 获取时间 |
| 2031 | - currentTime () { | 1747 | + currentTime() { |
| 2032 | const date = new Date(); | 1748 | const date = new Date(); |
| 2033 | const year = date.getFullYear(); | 1749 | const year = date.getFullYear(); |
| 2034 | let month = date.getMonth() + 1; // 月份从0~11,所以加一 | 1750 | let month = date.getMonth() + 1; // 月份从0~11,所以加一 |
| @@ -2047,7 +1763,7 @@ export default { | @@ -2047,7 +1763,7 @@ export default { | ||
| 2047 | // 返回格式化的日期和时间字符串 | 1763 | // 返回格式化的日期和时间字符串 |
| 2048 | return `${year}-${month}-${day} ${hours}:${minutes}`; | 1764 | return `${year}-${month}-${day} ${hours}:${minutes}`; |
| 2049 | }, | 1765 | }, |
| 2050 | - objectToArray (obj) { | 1766 | + objectToArray(obj) { |
| 2051 | return Object.keys(obj).map(key => { | 1767 | return Object.keys(obj).map(key => { |
| 2052 | const item = obj[key]; | 1768 | const item = obj[key]; |
| 2053 | return { | 1769 | return { |
| @@ -2058,7 +1774,7 @@ export default { | @@ -2058,7 +1774,7 @@ export default { | ||
| 2058 | }, | 1774 | }, |
| 2059 | 1775 | ||
| 2060 | // 详情 | 1776 | // 详情 |
| 2061 | - details (val, item) { | 1777 | + details(val, item) { |
| 2062 | this.detbox = true | 1778 | this.detbox = true |
| 2063 | this.secondData = item | 1779 | this.secondData = item |
| 2064 | if (typeof item.question === 'string') { | 1780 | if (typeof item.question === 'string') { |
| @@ -2075,13 +1791,13 @@ export default { | @@ -2075,13 +1791,13 @@ export default { | ||
| 2075 | // }) | 1791 | // }) |
| 2076 | }, | 1792 | }, |
| 2077 | 1793 | ||
| 2078 | - addbuss (val, item) { | 1794 | + addbuss(val, item) { |
| 2079 | this.index = val | 1795 | this.index = val |
| 2080 | this.detbox = false | 1796 | this.detbox = false |
| 2081 | this.ggXin = true | 1797 | this.ggXin = true |
| 2082 | }, | 1798 | }, |
| 2083 | 1799 | ||
| 2084 | - handleCurrentChange1 (val) { | 1800 | + handleCurrentChange1(val) { |
| 2085 | this.tongjiMsg.pageNumber = val - 1 | 1801 | this.tongjiMsg.pageNumber = val - 1 |
| 2086 | if (this.tongjiMsg.plan_Time.length > 0) { | 1802 | if (this.tongjiMsg.plan_Time.length > 0) { |
| 2087 | this.tongjiMsg.createTime = this.tongjiMsg.plan_Time[0] | 1803 | this.tongjiMsg.createTime = this.tongjiMsg.plan_Time[0] |
| @@ -2094,10 +1810,10 @@ export default { | @@ -2094,10 +1810,10 @@ export default { | ||
| 2094 | this.total1 = response.data.data.totalElements | 1810 | this.total1 = response.data.data.totalElements |
| 2095 | }) | 1811 | }) |
| 2096 | }, | 1812 | }, |
| 2097 | - handleSizeChange (val) { | 1813 | + handleSizeChange(val) { |
| 2098 | this.pageSize = val | 1814 | this.pageSize = val |
| 2099 | }, | 1815 | }, |
| 2100 | - handleCurrentChange (val) { | 1816 | + handleCurrentChange(val) { |
| 2101 | this.pageindex = { | 1817 | this.pageindex = { |
| 2102 | pageNumber: val - 1, | 1818 | pageNumber: val - 1, |
| 2103 | pageSize: 10, | 1819 | pageSize: 10, |
| @@ -2107,10 +1823,10 @@ export default { | @@ -2107,10 +1823,10 @@ export default { | ||
| 2107 | this.tableData = res.data.content | 1823 | this.tableData = res.data.content |
| 2108 | }) | 1824 | }) |
| 2109 | }, | 1825 | }, |
| 2110 | - handleSizeChangeTi (val) { | 1826 | + handleSizeChangeTi(val) { |
| 2111 | this.pageSizeTi = val | 1827 | this.pageSizeTi = val |
| 2112 | }, | 1828 | }, |
| 2113 | - async handleCurrentChangeTi (val) { | 1829 | + async handleCurrentChangeTi(val) { |
| 2114 | const pageindex = { | 1830 | const pageindex = { |
| 2115 | pageNumber: val - 1, | 1831 | pageNumber: val - 1, |
| 2116 | pageSize: 10, | 1832 | pageSize: 10, |
| @@ -2125,7 +1841,7 @@ export default { | @@ -2125,7 +1841,7 @@ export default { | ||
| 2125 | // this.tableData = res.data.content | 1841 | // this.tableData = res.data.content |
| 2126 | // }) | 1842 | // }) |
| 2127 | }, | 1843 | }, |
| 2128 | - closeFn (val) { | 1844 | + closeFn(val) { |
| 2129 | this.bianjiTabs = 'first' | 1845 | this.bianjiTabs = 'first' |
| 2130 | this.xiangTabs = 'first' | 1846 | this.xiangTabs = 'first' |
| 2131 | this.bianjiBox = 1 | 1847 | this.bianjiBox = 1 |
| @@ -2138,7 +1854,7 @@ export default { | @@ -2138,7 +1854,7 @@ export default { | ||
| 2138 | } | 1854 | } |
| 2139 | }, | 1855 | }, |
| 2140 | // 详情编辑 | 1856 | // 详情编辑 |
| 2141 | - async bianji () { | 1857 | + async bianji() { |
| 2142 | if (this.bianjiBox == 1) { | 1858 | if (this.bianjiBox == 1) { |
| 2143 | this.bianjiBox = 2 | 1859 | this.bianjiBox = 2 |
| 2144 | } else { | 1860 | } else { |
| @@ -2151,11 +1867,11 @@ export default { | @@ -2151,11 +1867,11 @@ export default { | ||
| 2151 | } | 1867 | } |
| 2152 | }, | 1868 | }, |
| 2153 | // 查看合同 | 1869 | // 查看合同 |
| 2154 | - lookHetong (val) { | 1870 | + lookHetong(val) { |
| 2155 | this.hetongBox = true | 1871 | this.hetongBox = true |
| 2156 | }, | 1872 | }, |
| 2157 | // 查询按钮 | 1873 | // 查询按钮 |
| 2158 | - async onSubmit () { | 1874 | + async onSubmit() { |
| 2159 | this.isbutton = true; | 1875 | this.isbutton = true; |
| 2160 | const res = await TerminaGetAll(this.formSel) | 1876 | const res = await TerminaGetAll(this.formSel) |
| 2161 | this.tableData = res.data.content | 1877 | this.tableData = res.data.content |
| @@ -2163,7 +1879,7 @@ export default { | @@ -2163,7 +1879,7 @@ export default { | ||
| 2163 | this.isbutton = false; | 1879 | this.isbutton = false; |
| 2164 | }, | 1880 | }, |
| 2165 | // 重置按钮 | 1881 | // 重置按钮 |
| 2166 | - resetting () { | 1882 | + resetting() { |
| 2167 | this.formSel = { | 1883 | this.formSel = { |
| 2168 | title: '', | 1884 | title: '', |
| 2169 | questionnaireType: '', | 1885 | questionnaireType: '', |
| @@ -2171,11 +1887,11 @@ export default { | @@ -2171,11 +1887,11 @@ export default { | ||
| 2171 | pageNumber: 0, | 1887 | pageNumber: 0, |
| 2172 | pageSize: 10, | 1888 | pageSize: 10, |
| 2173 | }, | 1889 | }, |
| 2174 | - this.currentPageList = 1 | 1890 | + this.currentPageList = 1 |
| 2175 | this.pageindex.pageNumber = 0 | 1891 | this.pageindex.pageNumber = 0 |
| 2176 | this.getAll() | 1892 | this.getAll() |
| 2177 | }, | 1893 | }, |
| 2178 | - radioClick (value) { | 1894 | + radioClick(value) { |
| 2179 | if (value === '不设置奖励') { | 1895 | if (value === '不设置奖励') { |
| 2180 | this.jifen = '' // 积分奖励 | 1896 | this.jifen = '' // 积分奖励 |
| 2181 | this.choujiang = '' // 转盘抽奖 | 1897 | this.choujiang = '' // 转盘抽奖 |
| @@ -2191,7 +1907,7 @@ export default { | @@ -2191,7 +1907,7 @@ export default { | ||
| 2191 | this.choujiang = '' // 转盘抽奖 | 1907 | this.choujiang = '' // 转盘抽奖 |
| 2192 | } | 1908 | } |
| 2193 | }, | 1909 | }, |
| 2194 | - async selTiku () { | 1910 | + async selTiku() { |
| 2195 | this.tiNum = 0 | 1911 | this.tiNum = 0 |
| 2196 | // this.zhong = { | 1912 | // this.zhong = { |
| 2197 | // tikuTitle:'', | 1913 | // tikuTitle:'', |
| @@ -2213,7 +1929,7 @@ export default { | @@ -2213,7 +1929,7 @@ export default { | ||
| 2213 | this.tikuziyuan = tiku.data.content | 1929 | this.tikuziyuan = tiku.data.content |
| 2214 | this.totalTi = tiku.data.totalElements | 1930 | this.totalTi = tiku.data.totalElements |
| 2215 | }, | 1931 | }, |
| 2216 | - addOption () { | 1932 | + addOption() { |
| 2217 | const newOption = { | 1933 | const newOption = { |
| 2218 | index: this.options.length + 1, | 1934 | index: this.options.length + 1, |
| 2219 | name: '', | 1935 | name: '', |
| @@ -2221,10 +1937,10 @@ export default { | @@ -2221,10 +1937,10 @@ export default { | ||
| 2221 | }; | 1937 | }; |
| 2222 | this.options.push(newOption); | 1938 | this.options.push(newOption); |
| 2223 | }, | 1939 | }, |
| 2224 | - deleteOption (index) { | 1940 | + deleteOption(index) { |
| 2225 | this.options.splice(index, 1); | 1941 | this.options.splice(index, 1); |
| 2226 | }, | 1942 | }, |
| 2227 | - bianls (item) { | 1943 | + bianls(item) { |
| 2228 | this.secondData = item | 1944 | this.secondData = item |
| 2229 | Vue.set(this.plan_Time, 0, this.secondData.startDate) | 1945 | Vue.set(this.plan_Time, 0, this.secondData.startDate) |
| 2230 | Vue.set(this.plan_Time, 1, this.secondData.endDate) | 1946 | Vue.set(this.plan_Time, 1, this.secondData.endDate) |
| @@ -2234,17 +1950,17 @@ export default { | @@ -2234,17 +1950,17 @@ export default { | ||
| 2234 | 1950 | ||
| 2235 | this.secondDataTi = item.cereQuestionManagements | 1951 | this.secondDataTi = item.cereQuestionManagements |
| 2236 | this.bainjiBox = true | 1952 | this.bainjiBox = true |
| 2237 | - | 1953 | + |
| 2238 | }, | 1954 | }, |
| 2239 | - bianCheck () { | 1955 | + bianCheck() { |
| 2240 | if (this.secondData && this.secondData.cereQuestionManagements) { | 1956 | if (this.secondData && this.secondData.cereQuestionManagements) { |
| 2241 | delete this.secondData.cereQuestionManagements; | 1957 | delete this.secondData.cereQuestionManagements; |
| 2242 | } | 1958 | } |
| 2243 | - | 1959 | + |
| 2244 | if (typeof this.secondData.question != 'string') { | 1960 | if (typeof this.secondData.question != 'string') { |
| 2245 | this.secondData.question = JSON.stringify(this.secondData.question) | 1961 | this.secondData.question = JSON.stringify(this.secondData.question) |
| 2246 | } | 1962 | } |
| 2247 | - | 1963 | + |
| 2248 | if (this.plan_Time.length != 0) { | 1964 | if (this.plan_Time.length != 0) { |
| 2249 | this.secondData.startDate = this.plan_Time[0] | 1965 | this.secondData.startDate = this.plan_Time[0] |
| 2250 | this.secondData.endDate = this.plan_Time[1] | 1966 | this.secondData.endDate = this.plan_Time[1] |
| @@ -2256,13 +1972,13 @@ export default { | @@ -2256,13 +1972,13 @@ export default { | ||
| 2256 | } | 1972 | } |
| 2257 | this.secondData.questionId = ids.join(',') | 1973 | this.secondData.questionId = ids.join(',') |
| 2258 | this.secondData.updateTime = this.currentTime() | 1974 | this.secondData.updateTime = this.currentTime() |
| 2259 | - | 1975 | + |
| 2260 | TerminaEdit(this.secondData).then(res => { | 1976 | TerminaEdit(this.secondData).then(res => { |
| 2261 | this.getAll() | 1977 | this.getAll() |
| 2262 | this.bainjiBox = false | 1978 | this.bainjiBox = false |
| 2263 | }) | 1979 | }) |
| 2264 | }, | 1980 | }, |
| 2265 | - tongji (item) { | 1981 | + tongji(item) { |
| 2266 | this.tongjiSshu = [] | 1982 | this.tongjiSshu = [] |
| 2267 | this.tongjiTu = {} | 1983 | this.tongjiTu = {} |
| 2268 | this.total1 = 0 | 1984 | this.total1 = 0 |
| @@ -2301,15 +2017,15 @@ export default { | @@ -2301,15 +2017,15 @@ export default { | ||
| 2301 | this.total1 = response.data.data.totalElements | 2017 | this.total1 = response.data.data.totalElements |
| 2302 | } | 2018 | } |
| 2303 | }).catch(err => { | 2019 | }).catch(err => { |
| 2304 | - this.loading = false | ||
| 2305 | - this.$message({ | ||
| 2306 | - message: '网络不好,请稍后再试', | ||
| 2307 | - type: 'error' | 2020 | + this.loading = false |
| 2021 | + this.$message({ | ||
| 2022 | + message: '网络不好,请稍后再试', | ||
| 2023 | + type: 'error' | ||
| 2024 | + }) | ||
| 2308 | }) | 2025 | }) |
| 2309 | - }) | ||
| 2310 | }, | 2026 | }, |
| 2311 | - tongjiClick (tab, event) { | ||
| 2312 | - | 2027 | + tongjiClick(tab, event) { |
| 2028 | + | ||
| 2313 | if (tab.index == '1') { | 2029 | if (tab.index == '1') { |
| 2314 | this.shujuloading = true | 2030 | this.shujuloading = true |
| 2315 | const postData = { | 2031 | const postData = { |
| @@ -2358,15 +2074,15 @@ export default { | @@ -2358,15 +2074,15 @@ export default { | ||
| 2358 | 2074 | ||
| 2359 | // this.tuwent = Object.values(this.tuwent).filter(res => res.type !== '文本'); | 2075 | // this.tuwent = Object.values(this.tuwent).filter(res => res.type !== '文本'); |
| 2360 | }).catch(err => { | 2076 | }).catch(err => { |
| 2361 | - this.shujuloading = false | ||
| 2362 | - this.$message({ | ||
| 2363 | - message: '网络不好,请稍后再试', | ||
| 2364 | - type: 'error' | 2077 | + this.shujuloading = false |
| 2078 | + this.$message({ | ||
| 2079 | + message: '网络不好,请稍后再试', | ||
| 2080 | + type: 'error' | ||
| 2081 | + }) | ||
| 2365 | }) | 2082 | }) |
| 2366 | - }) | ||
| 2367 | } | 2083 | } |
| 2368 | }, | 2084 | }, |
| 2369 | - xuanxiang (obj) { | 2085 | + xuanxiang(obj) { |
| 2370 | const result = []; | 2086 | const result = []; |
| 2371 | 2087 | ||
| 2372 | for (const key in obj) { | 2088 | for (const key in obj) { |
| @@ -2396,7 +2112,7 @@ export default { | @@ -2396,7 +2112,7 @@ export default { | ||
| 2396 | 2112 | ||
| 2397 | return result; | 2113 | return result; |
| 2398 | }, | 2114 | }, |
| 2399 | - daxiang (item) { | 2115 | + daxiang(item) { |
| 2400 | this.daxiangData = item | 2116 | this.daxiangData = item |
| 2401 | 2117 | ||
| 2402 | const selectoptions = null | 2118 | const selectoptions = null |
| @@ -2423,7 +2139,7 @@ export default { | @@ -2423,7 +2139,7 @@ export default { | ||
| 2423 | }, | 2139 | }, |
| 2424 | 2140 | ||
| 2425 | // 新增题库 | 2141 | // 新增题库 |
| 2426 | - Addtiku (val) { | 2142 | + Addtiku(val) { |
| 2427 | const that = this | 2143 | const that = this |
| 2428 | 2144 | ||
| 2429 | if (this.zhong.tikuTitle == '') { | 2145 | if (this.zhong.tikuTitle == '') { |
| @@ -2452,12 +2168,12 @@ export default { | @@ -2452,12 +2168,12 @@ export default { | ||
| 2452 | return | 2168 | return |
| 2453 | } | 2169 | } |
| 2454 | } | 2170 | } |
| 2455 | - let accumulator= {} | ||
| 2456 | - let fenshu ={} | ||
| 2457 | - this.options.forEach((item,index)=>{ | ||
| 2458 | - accumulator[index] = item.name | ||
| 2459 | - fenshu[index] = Number(item.num) || 0 | ||
| 2460 | - }) | 2171 | + let accumulator = {} |
| 2172 | + let fenshu = {} | ||
| 2173 | + this.options.forEach((item, index) => { | ||
| 2174 | + accumulator[index] = item.name | ||
| 2175 | + fenshu[index] = Number(item.num) || 0 | ||
| 2176 | + }) | ||
| 2461 | // this.zhong.optionSettings = this.options.reduce((accumulator, current) => { | 2177 | // this.zhong.optionSettings = this.options.reduce((accumulator, current) => { |
| 2462 | // accumulator[current.index] = current.name; | 2178 | // accumulator[current.index] = current.name; |
| 2463 | // return accumulator; | 2179 | // return accumulator; |
| @@ -2467,18 +2183,18 @@ export default { | @@ -2467,18 +2183,18 @@ export default { | ||
| 2467 | // accumulator[current.index] = Number(current.num); | 2183 | // accumulator[current.index] = Number(current.num); |
| 2468 | // return accumulator; | 2184 | // return accumulator; |
| 2469 | // }, {}) // 初始化累加器为空对象 | 2185 | // }, {}) // 初始化累加器为空对象 |
| 2470 | -this.zhong.optionSettings = JSON.stringify(accumulator) | ||
| 2471 | -this.zhong.score = JSON.stringify(fenshu) | ||
| 2472 | - | 2186 | + this.zhong.optionSettings = JSON.stringify(accumulator) |
| 2187 | + this.zhong.score = JSON.stringify(fenshu) | ||
| 2188 | + | ||
| 2473 | // this.zhong.optionSettings = JSON.stringify(this.zhong.optionSettings) | 2189 | // this.zhong.optionSettings = JSON.stringify(this.zhong.optionSettings) |
| 2474 | // this.zhong.score = JSON.stringify(this.zhong.score) | 2190 | // this.zhong.score = JSON.stringify(this.zhong.score) |
| 2475 | this.zhong.createDate = this.currentTime() | 2191 | this.zhong.createDate = this.currentTime() |
| 2476 | 2192 | ||
| 2477 | QuestionAdd(this.zhong).then((res) => { | 2193 | QuestionAdd(this.zhong).then((res) => { |
| 2478 | if (val == 1) { | 2194 | if (val == 1) { |
| 2479 | - | 2195 | + |
| 2480 | that.wenConstData.push(res.data) | 2196 | that.wenConstData.push(res.data) |
| 2481 | - | 2197 | + |
| 2482 | } else { | 2198 | } else { |
| 2483 | that.secondDataTi.push(res.data) | 2199 | that.secondDataTi.push(res.data) |
| 2484 | } | 2200 | } |
| @@ -2494,7 +2210,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2494,7 +2210,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2494 | }) | 2210 | }) |
| 2495 | }, | 2211 | }, |
| 2496 | // 题库切换选择 | 2212 | // 题库切换选择 |
| 2497 | - async tikuchange (val) { | 2213 | + async tikuchange(val) { |
| 2498 | const page = { | 2214 | const page = { |
| 2499 | pageNumber: 0, | 2215 | pageNumber: 0, |
| 2500 | pageSize: 10, | 2216 | pageSize: 10, |
| @@ -2505,7 +2221,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2505,7 +2221,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2505 | this.totalTi = tiku.data.totalElements | 2221 | this.totalTi = tiku.data.totalElements |
| 2506 | }, | 2222 | }, |
| 2507 | 2223 | ||
| 2508 | - async tikusous () { | 2224 | + async tikusous() { |
| 2509 | const page = { | 2225 | const page = { |
| 2510 | pageNumber: 0, | 2226 | pageNumber: 0, |
| 2511 | pageSize: 10, | 2227 | pageSize: 10, |
| @@ -2517,7 +2233,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2517,7 +2233,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2517 | this.tikuziyuan = tiku.data.content | 2233 | this.tikuziyuan = tiku.data.content |
| 2518 | this.totalTi = tiku.data.totalElements | 2234 | this.totalTi = tiku.data.totalElements |
| 2519 | }, | 2235 | }, |
| 2520 | - async tikuclose () { | 2236 | + async tikuclose() { |
| 2521 | this.tikuNie = '用户端题库' | 2237 | this.tikuNie = '用户端题库' |
| 2522 | this.danxuan = '' | 2238 | this.danxuan = '' |
| 2523 | this.timuMsg = '' | 2239 | this.timuMsg = '' |
| @@ -2531,14 +2247,14 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2531,14 +2247,14 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2531 | this.tikuziyuan = tiku.data.content | 2247 | this.tikuziyuan = tiku.data.content |
| 2532 | this.totalTi = tiku.data.totalElements | 2248 | this.totalTi = tiku.data.totalElements |
| 2533 | }, | 2249 | }, |
| 2534 | - gotimuxiang (item) { | 2250 | + gotimuxiang(item) { |
| 2535 | this.timuData = item | 2251 | this.timuData = item |
| 2536 | if (typeof item.optionSettings !== 'object') { | 2252 | if (typeof item.optionSettings !== 'object') { |
| 2537 | this.timuData.optionSettings = JSON.parse(item.optionSettings) | 2253 | this.timuData.optionSettings = JSON.parse(item.optionSettings) |
| 2538 | } | 2254 | } |
| 2539 | this.timuXiang = true | 2255 | this.timuXiang = true |
| 2540 | }, | 2256 | }, |
| 2541 | - handleSelectionChange (val) { | 2257 | + handleSelectionChange(val) { |
| 2542 | // if(this.tikuNie =='用户端题库'){ | 2258 | // if(this.tikuNie =='用户端题库'){ |
| 2543 | // this.listOne = val | 2259 | // this.listOne = val |
| 2544 | // }else if(this.tikuNie =='商户端题库'){ | 2260 | // }else if(this.tikuNie =='商户端题库'){ |
| @@ -2553,7 +2269,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2553,7 +2269,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2553 | // this.xuanzheData = this.xuanzheData.concat(val) | 2269 | // this.xuanzheData = this.xuanzheData.concat(val) |
| 2554 | // this.xuanzheData = [...new Set(this.xuanzheData)] | 2270 | // this.xuanzheData = [...new Set(this.xuanzheData)] |
| 2555 | }, | 2271 | }, |
| 2556 | - tiSelQue (val) { | 2272 | + tiSelQue(val) { |
| 2557 | if (val == 1) { | 2273 | if (val == 1) { |
| 2558 | // wenConstData secondDataTi | 2274 | // wenConstData secondDataTi |
| 2559 | 2275 | ||
| @@ -2567,7 +2283,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2567,7 +2283,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2567 | } else { | 2283 | } else { |
| 2568 | this.multipleSelection.forEach(item => { | 2284 | this.multipleSelection.forEach(item => { |
| 2569 | const isDuplicate = this.secondDataTi.some(existingItem => existingItem.id === item.id); | 2285 | const isDuplicate = this.secondDataTi.some(existingItem => existingItem.id === item.id); |
| 2570 | - | 2286 | + |
| 2571 | if (!isDuplicate) { | 2287 | if (!isDuplicate) { |
| 2572 | this.secondDataTi.push(item); | 2288 | this.secondDataTi.push(item); |
| 2573 | } | 2289 | } |
| @@ -2583,7 +2299,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2583,7 +2299,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2583 | this.$refs.ziyuanData.clearSelection() | 2299 | this.$refs.ziyuanData.clearSelection() |
| 2584 | this.tikuBox = false | 2300 | this.tikuBox = false |
| 2585 | }, | 2301 | }, |
| 2586 | - delWenCon (val, index) { | 2302 | + delWenCon(val, index) { |
| 2587 | if (val == '1') { | 2303 | if (val == '1') { |
| 2588 | this.xuanzheData.splice(index, 1) | 2304 | this.xuanzheData.splice(index, 1) |
| 2589 | this.wenConstData.splice(index, 1) | 2305 | this.wenConstData.splice(index, 1) |
| @@ -2591,7 +2307,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2591,7 +2307,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2591 | this.secondDataTi.splice(index, 1) | 2307 | this.secondDataTi.splice(index, 1) |
| 2592 | } | 2308 | } |
| 2593 | }, | 2309 | }, |
| 2594 | - fabu (val, item) { | 2310 | + fabu(val, item) { |
| 2595 | const h = this.$createElement; | 2311 | const h = this.$createElement; |
| 2596 | this.$msgbox({ | 2312 | this.$msgbox({ |
| 2597 | title: '消息', | 2313 | title: '消息', |
| @@ -2618,11 +2334,11 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2618,11 +2334,11 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2618 | } | 2334 | } |
| 2619 | }) | 2335 | }) |
| 2620 | }, | 2336 | }, |
| 2621 | - downs (item) { | 2337 | + downs(item) { |
| 2622 | this.xiajiaId = item.id | 2338 | this.xiajiaId = item.id |
| 2623 | this.downShow = true | 2339 | this.downShow = true |
| 2624 | }, | 2340 | }, |
| 2625 | - async downShowCheck () { | 2341 | + async downShowCheck() { |
| 2626 | if (this.opinionDel.opinionDelisting == '') { | 2342 | if (this.opinionDel.opinionDelisting == '') { |
| 2627 | this.$message({ | 2343 | this.$message({ |
| 2628 | message: '请输入禁用原因', | 2344 | message: '请输入禁用原因', |
| @@ -2637,7 +2353,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2637,7 +2353,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2637 | this.downShow = false | 2353 | this.downShow = false |
| 2638 | this.getAll() | 2354 | this.getAll() |
| 2639 | }, | 2355 | }, |
| 2640 | - delwen (item) { | 2356 | + delwen(item) { |
| 2641 | const h = this.$createElement; | 2357 | const h = this.$createElement; |
| 2642 | this.$msgbox({ | 2358 | this.$msgbox({ |
| 2643 | title: '消息', | 2359 | title: '消息', |
| @@ -2663,10 +2379,10 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2663,10 +2379,10 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2663 | } | 2379 | } |
| 2664 | }) | 2380 | }) |
| 2665 | }, | 2381 | }, |
| 2666 | - addyu () { | 2382 | + addyu() { |
| 2667 | 2383 | ||
| 2668 | }, | 2384 | }, |
| 2669 | - parseData (obj) { | 2385 | + parseData(obj) { |
| 2670 | const result = []; | 2386 | const result = []; |
| 2671 | 2387 | ||
| 2672 | for (const key in obj) { | 2388 | for (const key in obj) { |
| @@ -2691,7 +2407,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2691,7 +2407,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2691 | 2407 | ||
| 2692 | return result; | 2408 | return result; |
| 2693 | }, | 2409 | }, |
| 2694 | - yulan (item) { | 2410 | + yulan(item) { |
| 2695 | this.secondData = item | 2411 | this.secondData = item |
| 2696 | 2412 | ||
| 2697 | if (typeof this.secondData.question != 'object') { | 2413 | if (typeof this.secondData.question != 'object') { |
| @@ -2701,9 +2417,9 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2701,9 +2417,9 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2701 | this.wenjuanUrl = `${host}/cdwlMall/meh5/pages_category_page1/question/question?ids=${item.id}` | 2417 | this.wenjuanUrl = `${host}/cdwlMall/meh5/pages_category_page1/question/question?ids=${item.id}` |
| 2702 | 2418 | ||
| 2703 | this.yulanShow = true | 2419 | this.yulanShow = true |
| 2704 | - | 2420 | + |
| 2705 | }, | 2421 | }, |
| 2706 | - addggXin () { | 2422 | + addggXin() { |
| 2707 | this.formInline = { | 2423 | this.formInline = { |
| 2708 | createUser: '', | 2424 | createUser: '', |
| 2709 | title: '', | 2425 | title: '', |
| @@ -2734,12 +2450,13 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2734,12 +2450,13 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2734 | this.wenConstData = [] | 2450 | this.wenConstData = [] |
| 2735 | this.ggXin = true | 2451 | this.ggXin = true |
| 2736 | }, | 2452 | }, |
| 2737 | - addTikuShow () { | 2453 | + addTikuShow() { |
| 2738 | this.zhong = { | 2454 | this.zhong = { |
| 2739 | tikuTitle: '', | 2455 | tikuTitle: '', |
| 2740 | questionType: '', | 2456 | questionType: '', |
| 2741 | questionBank: '用户端题库', | 2457 | questionBank: '用户端题库', |
| 2742 | - layoutType:1, | 2458 | + layoutType: 1, |
| 2459 | + maxChoose: 0, | ||
| 2743 | isRequired: '必填', | 2460 | isRequired: '必填', |
| 2744 | questionDescription: '', | 2461 | questionDescription: '', |
| 2745 | optionSettings: {}, | 2462 | optionSettings: {}, |
| @@ -2748,7 +2465,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2748,7 +2465,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2748 | 2465 | ||
| 2749 | this.tikuAdd = true | 2466 | this.tikuAdd = true |
| 2750 | }, | 2467 | }, |
| 2751 | - quxiao (val) { | 2468 | + quxiao(val) { |
| 2752 | this.multipleSelection = [] | 2469 | this.multipleSelection = [] |
| 2753 | this.options = [] | 2470 | this.options = [] |
| 2754 | this.$refs.tixform.resetFields() | 2471 | this.$refs.tixform.resetFields() |
| @@ -2760,7 +2477,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2760,7 +2477,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2760 | // } | 2477 | // } |
| 2761 | }, | 2478 | }, |
| 2762 | 2479 | ||
| 2763 | - hangSelchange () { | 2480 | + hangSelchange() { |
| 2764 | const postList = { | 2481 | const postList = { |
| 2765 | pageNumber: 0, | 2482 | pageNumber: 0, |
| 2766 | pageSize: 10, | 2483 | pageSize: 10, |
| @@ -2772,7 +2489,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2772,7 +2489,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2772 | this.total1 = response.data.data.totalElements | 2489 | this.total1 = response.data.data.totalElements |
| 2773 | }) | 2490 | }) |
| 2774 | }, | 2491 | }, |
| 2775 | - secondsToMinutesAndSeconds (s) { | 2492 | + secondsToMinutesAndSeconds(s) { |
| 2776 | if (s) { | 2493 | if (s) { |
| 2777 | // 将输入的秒数转换为数值类型并取整 | 2494 | // 将输入的秒数转换为数值类型并取整 |
| 2778 | s = Math.floor(Number(s)); | 2495 | s = Math.floor(Number(s)); |
| @@ -2795,7 +2512,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2795,7 +2512,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2795 | } | 2512 | } |
| 2796 | }, | 2513 | }, |
| 2797 | 2514 | ||
| 2798 | - tongjiSubmit () { | 2515 | + tongjiSubmit() { |
| 2799 | const page = { | 2516 | const page = { |
| 2800 | pageNumber: 0, | 2517 | pageNumber: 0, |
| 2801 | pageSize: 10, | 2518 | pageSize: 10, |
| @@ -2814,7 +2531,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2814,7 +2531,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2814 | this.total1 = response.data.data.totalElements | 2531 | this.total1 = response.data.data.totalElements |
| 2815 | }) | 2532 | }) |
| 2816 | }, | 2533 | }, |
| 2817 | - tongjiSubmitret () { | 2534 | + tongjiSubmitret() { |
| 2818 | this.tongjiMsg = { | 2535 | this.tongjiMsg = { |
| 2819 | plan_Time: [], | 2536 | plan_Time: [], |
| 2820 | userName: '', | 2537 | userName: '', |
| @@ -2833,7 +2550,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2833,7 +2550,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2833 | this.total1 = response.data.data.totalElements | 2550 | this.total1 = response.data.data.totalElements |
| 2834 | }) | 2551 | }) |
| 2835 | }, | 2552 | }, |
| 2836 | - copyUrl (url) { | 2553 | + copyUrl(url) { |
| 2837 | const tempTextArea = document.createElement('textarea'); | 2554 | const tempTextArea = document.createElement('textarea'); |
| 2838 | // 设置 textarea 的值为要复制的 URL | 2555 | // 设置 textarea 的值为要复制的 URL |
| 2839 | tempTextArea.value = url; | 2556 | tempTextArea.value = url; |
| @@ -2850,13 +2567,13 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2850,13 +2567,13 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2850 | type: 'success' | 2567 | type: 'success' |
| 2851 | }) | 2568 | }) |
| 2852 | }, | 2569 | }, |
| 2853 | - tongjiBoxFan () { | 2570 | + tongjiBoxFan() { |
| 2854 | this.tongjiBox = false | 2571 | this.tongjiBox = false |
| 2855 | // this.getAll() | 2572 | // this.getAll() |
| 2856 | // location.reload(); | 2573 | // location.reload(); |
| 2857 | }, | 2574 | }, |
| 2858 | - async load () { | ||
| 2859 | - | 2575 | + async load() { |
| 2576 | + | ||
| 2860 | const page = { | 2577 | const page = { |
| 2861 | pageNumber: this.tiNum + 1, | 2578 | pageNumber: this.tiNum + 1, |
| 2862 | pageSize: 10, | 2579 | pageSize: 10, |
| @@ -2877,7 +2594,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2877,7 +2594,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2877 | }, []) | 2594 | }, []) |
| 2878 | ) | 2595 | ) |
| 2879 | }, | 2596 | }, |
| 2880 | - getCurrentDate () { | 2597 | + getCurrentDate() { |
| 2881 | const now = new Date(); | 2598 | const now = new Date(); |
| 2882 | const year = now.getFullYear(); | 2599 | const year = now.getFullYear(); |
| 2883 | const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要+1 | 2600 | const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要+1 |
| @@ -2885,7 +2602,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2885,7 +2602,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2885 | return `${year}-${month}-${day}`; | 2602 | return `${year}-${month}-${day}`; |
| 2886 | }, | 2603 | }, |
| 2887 | 2604 | ||
| 2888 | - getNextDayDate () { | 2605 | + getNextDayDate() { |
| 2889 | const now = new Date(); | 2606 | const now = new Date(); |
| 2890 | now.setDate(now.getDate() + 1); // 设置到下一天 | 2607 | now.setDate(now.getDate() + 1); // 设置到下一天 |
| 2891 | const year = now.getFullYear(); | 2608 | const year = now.getFullYear(); |
| @@ -2894,7 +2611,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2894,7 +2611,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2894 | return `${year}-${month}-${day}`; | 2611 | return `${year}-${month}-${day}`; |
| 2895 | }, | 2612 | }, |
| 2896 | 2613 | ||
| 2897 | - validateScore (row) { | 2614 | + validateScore(row) { |
| 2898 | // 如果输入的不是数字或者是NaN,则重置为1 | 2615 | // 如果输入的不是数字或者是NaN,则重置为1 |
| 2899 | if (isNaN(row.num) || row.num < 0) { | 2616 | if (isNaN(row.num) || row.num < 0) { |
| 2900 | row.num = 0; | 2617 | row.num = 0; |
| @@ -2905,7 +2622,7 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2905,7 +2622,7 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2905 | } | 2622 | } |
| 2906 | }, | 2623 | }, |
| 2907 | 2624 | ||
| 2908 | - tikuquxiao (val) { | 2625 | + tikuquxiao(val) { |
| 2909 | this.tikuBox = false | 2626 | this.tikuBox = false |
| 2910 | this.tiNum = 0 | 2627 | this.tiNum = 0 |
| 2911 | this.tikuNie = '' | 2628 | this.tikuNie = '' |
| @@ -2916,393 +2633,404 @@ this.zhong.score = JSON.stringify(fenshu) | @@ -2916,393 +2633,404 @@ this.zhong.score = JSON.stringify(fenshu) | ||
| 2916 | this.totalTi = 0 | 2633 | this.totalTi = 0 |
| 2917 | this.$refs.ziyuanData.clearSelection() | 2634 | this.$refs.ziyuanData.clearSelection() |
| 2918 | }, | 2635 | }, |
| 2919 | - moveUp (index) { | ||
| 2920 | - [this.wenConstData[index],this.wenConstData[index-1]]=[this.wenConstData[index - 1],this.wenConstData[index]] | 2636 | + moveUp(index) { |
| 2637 | + [this.wenConstData[index], this.wenConstData[index - 1]] = [this.wenConstData[index - 1], this.wenConstData[index]] | ||
| 2921 | this.wenConstData.sort() | 2638 | this.wenConstData.sort() |
| 2922 | }, | 2639 | }, |
| 2923 | - moveDown (index) { | ||
| 2924 | - [this.wenConstData[index],this.wenConstData[index+1]]=[this.wenConstData[index+1],this.wenConstData[index]] | 2640 | + moveDown(index) { |
| 2641 | + [this.wenConstData[index], this.wenConstData[index + 1]] = [this.wenConstData[index + 1], this.wenConstData[index]] | ||
| 2925 | this.wenConstData.sort() | 2642 | this.wenConstData.sort() |
| 2926 | }, | 2643 | }, |
| 2927 | - moveUp2 (index) { | 2644 | + moveUp2(index) { |
| 2928 | s | 2645 | s |
| 2929 | - [this.secondDataTi[index],this.secondDataTi[index-1]]=[this.secondDataTi[index - 1],this.secondDataTi[index]] | 2646 | + [this.secondDataTi[index], this.secondDataTi[index - 1]] = [this.secondDataTi[index - 1], this.secondDataTi[index]] |
| 2930 | this.secondDataTi.sort() | 2647 | this.secondDataTi.sort() |
| 2931 | }, | 2648 | }, |
| 2932 | - moveDown2 (index) { | ||
| 2933 | - [this.secondDataTi[index],this.secondDataTi[index+1]]=[this.secondDataTi[index+1],this.secondDataTi[index]] | 2649 | + moveDown2(index) { |
| 2650 | + [this.secondDataTi[index], this.secondDataTi[index + 1]] = [this.secondDataTi[index + 1], this.secondDataTi[index]] | ||
| 2934 | this.secondDataTi.sort() | 2651 | this.secondDataTi.sort() |
| 2935 | }, | 2652 | }, |
| 2936 | - answerMoveUp (index) { | ||
| 2937 | - [this.options[index],this.options[index-1]]=[this.options[index - 1],this.options[index]] | ||
| 2938 | - this.options[index].index = index - 1 | ||
| 2939 | - this.options.sort() | ||
| 2940 | - }, | ||
| 2941 | - answerMoveDown (index) { | ||
| 2942 | - [this.options[index],this.options[index+1]]=[this.options[index+1],this.options[index]] | ||
| 2943 | - this.options[index].index = index + 1 | ||
| 2944 | - this.options.sort() | ||
| 2945 | - }, | 2653 | + answerMoveUp(index) { |
| 2654 | + [this.options[index], this.options[index - 1]] = [this.options[index - 1], this.options[index]] | ||
| 2655 | + this.options[index].index = index - 1 | ||
| 2656 | + this.options.sort() | ||
| 2657 | + }, | ||
| 2658 | + answerMoveDown(index) { | ||
| 2659 | + [this.options[index], this.options[index + 1]] = [this.options[index + 1], this.options[index]] | ||
| 2660 | + this.options[index].index = index + 1 | ||
| 2661 | + this.options.sort() | ||
| 2662 | + }, | ||
| 2946 | } | 2663 | } |
| 2947 | 2664 | ||
| 2948 | } | 2665 | } |
| 2949 | </script> | 2666 | </script> |
| 2950 | 2667 | ||
| 2951 | <style scoped> | 2668 | <style scoped> |
| 2952 | - .zhuti { | ||
| 2953 | - padding: 0 20px 20px 20px; | ||
| 2954 | - min-height: calc(100vh - 50px - 20px); | ||
| 2955 | - background-color: #Fff; | ||
| 2956 | - | ||
| 2957 | - } | 2669 | +.zhuti { |
| 2670 | + padding: 0 20px 20px 20px; | ||
| 2671 | + min-height: calc(100vh - 50px - 20px); | ||
| 2672 | + background-color: #Fff; | ||
| 2958 | 2673 | ||
| 2959 | - .chengeXia { | ||
| 2960 | - border-bottom: 6px solid #3F9B6A; | ||
| 2961 | - padding-bottom: 4px; | ||
| 2962 | - color: #3F9B6A; | ||
| 2963 | - } | 2674 | +} |
| 2964 | 2675 | ||
| 2965 | - /deep/ .el-form-item__content { | ||
| 2966 | - line-height: 0; | ||
| 2967 | - } | 2676 | +.chengeXia { |
| 2677 | + border-bottom: 6px solid #3F9B6A; | ||
| 2678 | + padding-bottom: 4px; | ||
| 2679 | + color: #3F9B6A; | ||
| 2680 | +} | ||
| 2968 | 2681 | ||
| 2969 | - .tableBtn { | ||
| 2970 | - display: inline-block; | ||
| 2971 | - margin-right: 10px; | ||
| 2972 | - color: #ACACAC; | ||
| 2973 | - cursor: pointer; | ||
| 2974 | - } | 2682 | +/deep/ .el-form-item__content { |
| 2683 | + line-height: 0; | ||
| 2684 | +} | ||
| 2975 | 2685 | ||
| 2976 | - .formSearch { | ||
| 2977 | - display: flex; | ||
| 2978 | - width: 100%; | ||
| 2979 | - font-size: 14px; | ||
| 2980 | - justify-content: space-between; | ||
| 2981 | - } | 2686 | +.tableBtn { |
| 2687 | + display: inline-block; | ||
| 2688 | + margin-right: 10px; | ||
| 2689 | + color: #ACACAC; | ||
| 2690 | + cursor: pointer; | ||
| 2691 | +} | ||
| 2982 | 2692 | ||
| 2983 | - .greens { | ||
| 2984 | - color: #3F9B6A; | ||
| 2985 | - } | 2693 | +.formSearch { |
| 2694 | + display: flex; | ||
| 2695 | + width: 100%; | ||
| 2696 | + font-size: 14px; | ||
| 2697 | + justify-content: space-between; | ||
| 2698 | +} | ||
| 2986 | 2699 | ||
| 2987 | - /deep/ .el-table__row { | ||
| 2988 | - font-size: 14px; | ||
| 2989 | - color: #000000e6; | ||
| 2990 | - height: 42px; | ||
| 2991 | - } | 2700 | +.greens { |
| 2701 | + color: #3F9B6A; | ||
| 2702 | +} | ||
| 2992 | 2703 | ||
| 2993 | - .fenye { | ||
| 2994 | - margin-top: 20px; | ||
| 2995 | - display: flex; | ||
| 2996 | - justify-content: flex-end; | ||
| 2997 | - } | 2704 | +/deep/ .el-table__row { |
| 2705 | + font-size: 14px; | ||
| 2706 | + color: #000000e6; | ||
| 2707 | + height: 42px; | ||
| 2708 | +} | ||
| 2998 | 2709 | ||
| 2999 | - /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { | ||
| 3000 | - background-color: #3F9B6A; | ||
| 3001 | - } | 2710 | +.fenye { |
| 2711 | + margin-top: 20px; | ||
| 2712 | + display: flex; | ||
| 2713 | + justify-content: flex-end; | ||
| 2714 | +} | ||
| 3002 | 2715 | ||
| 3003 | - .el-row { | ||
| 3004 | - margin-bottom: 20px; | 2716 | +/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { |
| 2717 | + background-color: #3F9B6A; | ||
| 2718 | +} | ||
| 3005 | 2719 | ||
| 3006 | - &:last-child { | ||
| 3007 | - margin-bottom: 0; | ||
| 3008 | - } | ||
| 3009 | - } | 2720 | +.el-row { |
| 2721 | + margin-bottom: 20px; | ||
| 3010 | 2722 | ||
| 3011 | - .el-col { | ||
| 3012 | - border-radius: 4px; | 2723 | + &:last-child { |
| 2724 | + margin-bottom: 0; | ||
| 3013 | } | 2725 | } |
| 2726 | +} | ||
| 3014 | 2727 | ||
| 3015 | - .bg-purple-dark { | ||
| 3016 | - background: #99a9bf; | ||
| 3017 | - } | 2728 | +.el-col { |
| 2729 | + border-radius: 4px; | ||
| 2730 | +} | ||
| 3018 | 2731 | ||
| 3019 | - .bg-purple { | ||
| 3020 | - background: #d3dce6; | ||
| 3021 | - } | 2732 | +.bg-purple-dark { |
| 2733 | + background: #99a9bf; | ||
| 2734 | +} | ||
| 3022 | 2735 | ||
| 3023 | - .bg-purple-light { | ||
| 3024 | - background: #e5e9f2; | ||
| 3025 | - } | 2736 | +.bg-purple { |
| 2737 | + background: #d3dce6; | ||
| 2738 | +} | ||
| 3026 | 2739 | ||
| 3027 | - .grid-content { | ||
| 3028 | - border-radius: 4px; | ||
| 3029 | - min-height: 36px; | ||
| 3030 | - } | 2740 | +.bg-purple-light { |
| 2741 | + background: #e5e9f2; | ||
| 2742 | +} | ||
| 3031 | 2743 | ||
| 3032 | - .row-bg { | ||
| 3033 | - padding: 10px 0; | ||
| 3034 | - background-color: #f9fafc; | ||
| 3035 | - } | 2744 | +.grid-content { |
| 2745 | + border-radius: 4px; | ||
| 2746 | + min-height: 36px; | ||
| 2747 | +} | ||
| 3036 | 2748 | ||
| 3037 | - /deep/ .bg-purple[data-v-0e3fe4ec] { | ||
| 3038 | - background: #fff; | ||
| 3039 | - height: 50px; | ||
| 3040 | - } | 2749 | +.row-bg { |
| 2750 | + padding: 10px 0; | ||
| 2751 | + background-color: #f9fafc; | ||
| 2752 | +} | ||
| 3041 | 2753 | ||
| 3042 | - /deep/ .bg-purple[data-v-3bebae82] { | ||
| 3043 | - background: #fff; | ||
| 3044 | - height: 50px; | ||
| 3045 | - } | 2754 | +/deep/ .bg-purple[data-v-0e3fe4ec] { |
| 2755 | + background: #fff; | ||
| 2756 | + height: 50px; | ||
| 2757 | +} | ||
| 3046 | 2758 | ||
| 3047 | - ::v-deep .bg-purple { | ||
| 3048 | - background: #fff; | ||
| 3049 | - height: 50px; | ||
| 3050 | - } | 2759 | +/deep/ .bg-purple[data-v-3bebae82] { |
| 2760 | + background: #fff; | ||
| 2761 | + height: 50px; | ||
| 2762 | +} | ||
| 3051 | 2763 | ||
| 3052 | - /deep/ .el-form--label-top .el-form-item__label { | ||
| 3053 | - padding: 0; | ||
| 3054 | - } | 2764 | +::v-deep .bg-purple { |
| 2765 | + background: #fff; | ||
| 2766 | + height: 50px; | ||
| 2767 | +} | ||
| 3055 | 2768 | ||
| 3056 | - ::v-deep .el-form-item { | ||
| 3057 | - margin-bottom: 16px; | ||
| 3058 | - } | 2769 | +/deep/ .el-form--label-top .el-form-item__label { |
| 2770 | + padding: 0; | ||
| 2771 | +} | ||
| 3059 | 2772 | ||
| 3060 | - .device-form .el-form-item__label::after { | ||
| 3061 | - content: "*"; | ||
| 3062 | - color: #1A1A1A; | ||
| 3063 | - margin-left: 5px; | ||
| 3064 | - font-size: 16px; | ||
| 3065 | - } | 2773 | +::v-deep .el-form-item { |
| 2774 | + margin-bottom: 16px; | ||
| 2775 | +} | ||
| 3066 | 2776 | ||
| 3067 | - ::v-deep .el-dialog__wrapper { | ||
| 3068 | - .el-dialog__header { | ||
| 3069 | - background-color: #FAFAFA; | ||
| 3070 | - } | ||
| 3071 | - } | 2777 | +.device-form .el-form-item__label::after { |
| 2778 | + content: "*"; | ||
| 2779 | + color: #1A1A1A; | ||
| 2780 | + margin-left: 5px; | ||
| 2781 | + font-size: 16px; | ||
| 2782 | +} | ||
| 3072 | 2783 | ||
| 3073 | - ::v-deep .el-input__inner:focus { | ||
| 3074 | - border: #3F9B6A 1px solid; | 2784 | +::v-deep .el-dialog__wrapper { |
| 2785 | + .el-dialog__header { | ||
| 2786 | + background-color: #FAFAFA; | ||
| 3075 | } | 2787 | } |
| 2788 | +} | ||
| 3076 | 2789 | ||
| 3077 | - .dialog-footer { | ||
| 3078 | - display: flex; | ||
| 3079 | - justify-content: flex-end; | ||
| 3080 | - border-top: solid rgba(209, 209, 209, 0.2) 2px; | ||
| 3081 | - padding-top: 20px; | ||
| 3082 | - } | 2790 | +::v-deep .el-input__inner:focus { |
| 2791 | + border: #3F9B6A 1px solid; | ||
| 2792 | +} | ||
| 3083 | 2793 | ||
| 3084 | - ::v-deep .el-input__inner:focus { | ||
| 3085 | - border: #3F9B6A 1px solid; | ||
| 3086 | - } | 2794 | +.dialog-footer { |
| 2795 | + display: flex; | ||
| 2796 | + justify-content: flex-end; | ||
| 2797 | + border-top: solid rgba(209, 209, 209, 0.2) 2px; | ||
| 2798 | + padding-top: 20px; | ||
| 2799 | +} | ||
| 3087 | 2800 | ||
| 3088 | - ::v-deep .el-input__inner:hover { | ||
| 3089 | - border: #3F9B6A 1px solid; | ||
| 3090 | - } | 2801 | +::v-deep .el-input__inner:focus { |
| 2802 | + border: #3F9B6A 1px solid; | ||
| 2803 | +} | ||
| 3091 | 2804 | ||
| 3092 | - ::v-deep .el-select .el-input.is-focus .el-input__inner { | ||
| 3093 | - border-color: #3F9B6A | ||
| 3094 | - } | 2805 | +::v-deep .el-input__inner:hover { |
| 2806 | + border: #3F9B6A 1px solid; | ||
| 2807 | +} | ||
| 3095 | 2808 | ||
| 3096 | - .el-select-dropdown__item.selected { | ||
| 3097 | - color: #3F9B6A; | ||
| 3098 | - } | 2809 | +::v-deep .el-select .el-input.is-focus .el-input__inner { |
| 2810 | + border-color: #3F9B6A | ||
| 2811 | +} | ||
| 3099 | 2812 | ||
| 3100 | - .el-pagination__sizes .el-input .el-input__inner:hover { | ||
| 3101 | - border-color: #3F9B6A; | ||
| 3102 | - } | 2813 | +.el-select-dropdown__item.selected { |
| 2814 | + color: #3F9B6A; | ||
| 2815 | +} | ||
| 3103 | 2816 | ||
| 3104 | - ::v-deep .el-dialog__wrapper { | 2817 | +.el-pagination__sizes .el-input .el-input__inner:hover { |
| 2818 | + border-color: #3F9B6A; | ||
| 2819 | +} | ||
| 3105 | 2820 | ||
| 3106 | - .dialog_css { | ||
| 3107 | - margin-right: 12px; | ||
| 3108 | - margin-top: 61px !important; | 2821 | +::v-deep .el-dialog__wrapper { |
| 3109 | 2822 | ||
| 3110 | - .el-dialog__title { | ||
| 3111 | - font-size: 16px !important; | ||
| 3112 | - font-weight: 600; | ||
| 3113 | - color: #000; | ||
| 3114 | - } | ||
| 3115 | - } | 2823 | + .dialog_css { |
| 2824 | + margin-right: 12px; | ||
| 2825 | + margin-top: 61px !important; | ||
| 3116 | 2826 | ||
| 3117 | - .diaslog_zhong { | ||
| 3118 | - margin-left: 25%; | ||
| 3119 | - margin-top: 61px !important; | 2827 | + .el-dialog__title { |
| 2828 | + font-size: 16px !important; | ||
| 2829 | + font-weight: 600; | ||
| 2830 | + color: #000; | ||
| 3120 | } | 2831 | } |
| 3121 | - | ||
| 3122 | } | 2832 | } |
| 3123 | 2833 | ||
| 3124 | - ::v-deep .diaslog_zhong { | ||
| 3125 | - margin-left: 20%; | 2834 | + .diaslog_zhong { |
| 2835 | + margin-left: 25%; | ||
| 3126 | margin-top: 61px !important; | 2836 | margin-top: 61px !important; |
| 2837 | + } | ||
| 3127 | 2838 | ||
| 3128 | - .el-dialog__header { | ||
| 3129 | - background-color: #fff; | ||
| 3130 | - border-bottom: 1px solid #EFEFEF; | 2839 | +} |
| 3131 | 2840 | ||
| 3132 | - .el-dialog__title { | ||
| 3133 | - font-size: 14px; | ||
| 3134 | - color: #000000e6; | ||
| 3135 | - } | ||
| 3136 | - } | 2841 | +::v-deep .diaslog_zhong { |
| 2842 | + margin-left: 20%; | ||
| 2843 | + margin-top: 61px !important; | ||
| 2844 | + | ||
| 2845 | + .el-dialog__header { | ||
| 2846 | + background-color: #fff; | ||
| 2847 | + border-bottom: 1px solid #EFEFEF; | ||
| 3137 | 2848 | ||
| 3138 | - .el-dialog__body { | ||
| 3139 | - padding: 10px 30px 30px 20px | 2849 | + .el-dialog__title { |
| 2850 | + font-size: 14px; | ||
| 2851 | + color: #000000e6; | ||
| 3140 | } | 2852 | } |
| 3141 | } | 2853 | } |
| 3142 | 2854 | ||
| 3143 | - /deep/ .el-table_1_column_8 .hetong { | ||
| 3144 | - color: #7DBB9A; | ||
| 3145 | - text-decoration: underline; | 2855 | + .el-dialog__body { |
| 2856 | + padding: 10px 30px 30px 20px | ||
| 3146 | } | 2857 | } |
| 2858 | +} | ||
| 3147 | 2859 | ||
| 3148 | - /deep/ .first-column-bg { | ||
| 3149 | - background-color: #FAFAFA !important; | ||
| 3150 | - } | 2860 | +/deep/ .el-table_1_column_8 .hetong { |
| 2861 | + color: #7DBB9A; | ||
| 2862 | + text-decoration: underline; | ||
| 2863 | +} | ||
| 3151 | 2864 | ||
| 3152 | - ::v-deep .textarea { | ||
| 3153 | - width: 85%; | 2865 | +/deep/ .first-column-bg { |
| 2866 | + background-color: #FAFAFA !important; | ||
| 2867 | +} | ||
| 3154 | 2868 | ||
| 3155 | - .el-textarea__inner { | ||
| 3156 | - width: 100%; | ||
| 3157 | - } | ||
| 3158 | - } | 2869 | +::v-deep .textarea { |
| 2870 | + width: 85%; | ||
| 3159 | 2871 | ||
| 3160 | - ::v-deep .pass_input { | 2872 | + .el-textarea__inner { |
| 3161 | width: 100%; | 2873 | width: 100%; |
| 3162 | - | ||
| 3163 | - .el-input__inner { | ||
| 3164 | - border: none; | ||
| 3165 | - padding: 0; | ||
| 3166 | - } | ||
| 3167 | } | 2874 | } |
| 2875 | +} | ||
| 3168 | 2876 | ||
| 3169 | - ::v-deep .pass_select { | ||
| 3170 | - width: 100%; | 2877 | +::v-deep .pass_input { |
| 2878 | + width: 100%; | ||
| 3171 | 2879 | ||
| 3172 | - .el-input__inner { | ||
| 3173 | - border: none; | ||
| 3174 | - padding: 0; | ||
| 3175 | - } | 2880 | + .el-input__inner { |
| 2881 | + border: none; | ||
| 2882 | + padding: 0; | ||
| 2883 | + } | ||
| 2884 | +} | ||
| 3176 | 2885 | ||
| 3177 | - .el-icon-arrow-up:before { | ||
| 3178 | - content: '' | ||
| 3179 | - } | 2886 | +::v-deep .pass_select { |
| 2887 | + width: 100%; | ||
| 3180 | 2888 | ||
| 2889 | + .el-input__inner { | ||
| 2890 | + border: none; | ||
| 2891 | + padding: 0; | ||
| 3181 | } | 2892 | } |
| 3182 | 2893 | ||
| 3183 | - /deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { | ||
| 3184 | - background-color: #fff; | 2894 | + .el-icon-arrow-up:before { |
| 2895 | + content: '' | ||
| 3185 | } | 2896 | } |
| 3186 | 2897 | ||
| 3187 | - /deep/ .el-radio__label, | ||
| 3188 | - /deep/ .el-checkbox__label { | ||
| 3189 | - white-space: normal !important; | ||
| 3190 | - word-break: break-all !important; | ||
| 3191 | - } | ||
| 3192 | -</style> | ||
| 3193 | -<style lang="scss" scoped> | ||
| 3194 | - ::v-deep .bian_css { | ||
| 3195 | - .el-dialog__header { | ||
| 3196 | - padding: 0px; | ||
| 3197 | - } | 2898 | +} |
| 3198 | 2899 | ||
| 3199 | - .el-input__inner { | ||
| 3200 | - height: 18px; | ||
| 3201 | - border: 0px; | ||
| 3202 | - margin-top: 0px; | ||
| 3203 | - } | 2900 | +/deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { |
| 2901 | + background-color: #fff; | ||
| 2902 | +} | ||
| 3204 | 2903 | ||
| 3205 | - .el-input__inner:hover { | ||
| 3206 | - border: 0px; | ||
| 3207 | - } | 2904 | +/deep/ .el-radio__label, |
| 2905 | +/deep/ .el-checkbox__label { | ||
| 2906 | + white-space: normal !important; | ||
| 2907 | + word-break: break-all !important; | ||
| 2908 | +} | ||
| 3208 | 2909 | ||
| 3209 | - .el-input__inner:focus { | ||
| 3210 | - border: 0px; | ||
| 3211 | - } | 2910 | +/deep/ .el-input-number__decrease, |
| 2911 | +/deep/.el-input-number__increase { | ||
| 2912 | + height: 30px !important; | ||
| 2913 | + line-height: 32px !important; | ||
| 2914 | + margin-top: 3px; | ||
| 2915 | +} | ||
| 2916 | +</style> | ||
| 2917 | +<style lang="scss" scoped> | ||
| 2918 | +::v-deep .bian_css { | ||
| 2919 | + .el-dialog__header { | ||
| 2920 | + padding: 0px; | ||
| 3212 | } | 2921 | } |
| 3213 | 2922 | ||
| 3214 | - ::v-deep .buttonHover:hover { | ||
| 3215 | - color: #3f9b6a !important; | ||
| 3216 | - border-color: #c5e1d2 !important; | ||
| 3217 | - background-color: #ecf5f0 !important; | ||
| 3218 | - outline: none; | 2923 | + .el-input__inner { |
| 2924 | + height: 18px; | ||
| 2925 | + border: 0px; | ||
| 2926 | + margin-top: 0px; | ||
| 3219 | } | 2927 | } |
| 3220 | 2928 | ||
| 3221 | - ::v-deep .el-pagination__total { | ||
| 3222 | - position: absolute; | ||
| 3223 | - left: 33px; | 2929 | + .el-input__inner:hover { |
| 2930 | + border: 0px; | ||
| 3224 | } | 2931 | } |
| 3225 | 2932 | ||
| 3226 | - ::v-deep .diaslog_zhong { | ||
| 3227 | - .el-dialog__body { | ||
| 3228 | - padding: 10px 20px 20px 20px; | ||
| 3229 | - } | ||
| 3230 | - | ||
| 3231 | - .el-upload--picture-card { | ||
| 3232 | - width: 130px; | ||
| 3233 | - height: 130px; | ||
| 3234 | - } | 2933 | + .el-input__inner:focus { |
| 2934 | + border: 0px; | ||
| 3235 | } | 2935 | } |
| 2936 | +} | ||
| 3236 | 2937 | ||
| 3237 | - ::v-deep .el-radio-group { | ||
| 3238 | - .el-radio { | ||
| 3239 | - font-weight: 400; | ||
| 3240 | - height: 29px; | ||
| 3241 | - } | ||
| 3242 | - } | 2938 | +::v-deep .buttonHover:hover { |
| 2939 | + color: #3f9b6a !important; | ||
| 2940 | + border-color: #c5e1d2 !important; | ||
| 2941 | + background-color: #ecf5f0 !important; | ||
| 2942 | + outline: none; | ||
| 2943 | +} | ||
| 3243 | 2944 | ||
| 3244 | - ::v-deep .el-checkbox-group { | ||
| 3245 | - .el-checkbox { | ||
| 3246 | - height: 29px; | ||
| 3247 | - } | 2945 | +::v-deep .el-pagination__total { |
| 2946 | + position: absolute; | ||
| 2947 | + left: 33px; | ||
| 2948 | +} | ||
| 3248 | 2949 | ||
| 3249 | - label { | ||
| 3250 | - font-weight: 400; | ||
| 3251 | - } | 2950 | +::v-deep .diaslog_zhong { |
| 2951 | + .el-dialog__body { | ||
| 2952 | + padding: 10px 20px 20px 20px; | ||
| 3252 | } | 2953 | } |
| 3253 | 2954 | ||
| 3254 | - .questionnaire { | ||
| 3255 | - width: 100%; | ||
| 3256 | - flex-grow: 1; | ||
| 3257 | - background-color: white; | ||
| 3258 | - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
| 3259 | - border-radius: 5px; | ||
| 3260 | - box-sizing: border-box; | 2955 | + .el-upload--picture-card { |
| 2956 | + width: 130px; | ||
| 2957 | + height: 130px; | ||
| 3261 | } | 2958 | } |
| 2959 | +} | ||
| 3262 | 2960 | ||
| 3263 | - .question-title { | ||
| 3264 | - // font-size: 18px; | ||
| 3265 | - color: #000; | ||
| 3266 | - margin-bottom: 10px; | 2961 | +::v-deep .el-radio-group { |
| 2962 | + .el-radio { | ||
| 2963 | + font-weight: 400; | ||
| 2964 | + height: 29px; | ||
| 3267 | } | 2965 | } |
| 2966 | +} | ||
| 3268 | 2967 | ||
| 3269 | - .question { | ||
| 3270 | - background-color: white; | ||
| 3271 | - padding: 15px; | ||
| 3272 | - margin: 10px 0; | ||
| 3273 | - border-radius: 10px; | 2968 | +::v-deep .el-checkbox-group { |
| 2969 | + .el-checkbox { | ||
| 2970 | + height: 29px; | ||
| 3274 | } | 2971 | } |
| 3275 | - .answerItem{ | ||
| 3276 | - width: auto; | ||
| 3277 | - padding:10px 15px; | ||
| 3278 | - margin: 0 0 5px 10px; | ||
| 3279 | - border-radius: 6px; | ||
| 3280 | - background-color: #f5f7fa; | ||
| 3281 | - display: flex; | ||
| 3282 | - align-items: center; | 2972 | + |
| 2973 | + label { | ||
| 2974 | + font-weight: 400; | ||
| 3283 | } | 2975 | } |
| 2976 | +} | ||
| 3284 | 2977 | ||
| 3285 | - // ::v-deep .tongyong_css { | ||
| 3286 | - // max-height: 850px; | 2978 | +.questionnaire { |
| 2979 | + width: 100%; | ||
| 2980 | + flex-grow: 1; | ||
| 2981 | + background-color: white; | ||
| 2982 | + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
| 2983 | + border-radius: 5px; | ||
| 2984 | + box-sizing: border-box; | ||
| 2985 | +} | ||
| 3287 | 2986 | ||
| 3288 | - // } | 2987 | +.question-title { |
| 2988 | + // font-size: 18px; | ||
| 2989 | + color: #000; | ||
| 2990 | + margin-bottom: 10px; | ||
| 2991 | +} | ||
| 3289 | 2992 | ||
| 3290 | - // .tongyong_css { | ||
| 3291 | - // max-height: calc(100vh - 200px); /* Adjust the 200px to the combined height of your header and footer */ | ||
| 3292 | - // overflow-y: auto; | ||
| 3293 | - // } | ||
| 3294 | - ::v-deep .xddTable { | ||
| 3295 | - height: 100% !important; | ||
| 3296 | - .el-table__body-wrapper{ | ||
| 3297 | - overflow:auto !important; | ||
| 3298 | - height: 100% !important; | ||
| 3299 | - } | ||
| 3300 | - .el-table__body-wrapper is-scrolling-none{ | ||
| 3301 | - height: 100% !important; | ||
| 3302 | - } | ||
| 3303 | - .el-table--scrollable-y .el-table__body-wrapper{ | ||
| 3304 | - overflow-y:inherit !important; | ||
| 3305 | - } | 2993 | +.question { |
| 2994 | + background-color: white; | ||
| 2995 | + padding: 15px; | ||
| 2996 | + margin: 10px 0; | ||
| 2997 | + border-radius: 10px; | ||
| 2998 | +} | ||
| 3306 | 2999 | ||
| 3000 | +.answerItem { | ||
| 3001 | + width: auto; | ||
| 3002 | + padding: 10px 15px; | ||
| 3003 | + margin: 0 0 5px 10px; | ||
| 3004 | + border-radius: 6px; | ||
| 3005 | + background-color: #f5f7fa; | ||
| 3006 | + display: flex; | ||
| 3007 | + align-items: center; | ||
| 3008 | +} | ||
| 3009 | + | ||
| 3010 | +// ::v-deep .tongyong_css { | ||
| 3011 | +// max-height: 850px; | ||
| 3012 | + | ||
| 3013 | +// } | ||
| 3014 | + | ||
| 3015 | +// .tongyong_css { | ||
| 3016 | +// max-height: calc(100vh - 200px); /* Adjust the 200px to the combined height of your header and footer */ | ||
| 3017 | +// overflow-y: auto; | ||
| 3018 | +// } | ||
| 3019 | +::v-deep .xddTable { | ||
| 3020 | + height: 100% !important; | ||
| 3021 | + | ||
| 3022 | + .el-table__body-wrapper { | ||
| 3023 | + overflow: auto !important; | ||
| 3024 | + height: 100% !important; | ||
| 3307 | } | 3025 | } |
| 3026 | + | ||
| 3027 | + .el-table__body-wrapper is-scrolling-none { | ||
| 3028 | + height: 100% !important; | ||
| 3029 | + } | ||
| 3030 | + | ||
| 3031 | + .el-table--scrollable-y .el-table__body-wrapper { | ||
| 3032 | + overflow-y: inherit !important; | ||
| 3033 | + } | ||
| 3034 | + | ||
| 3035 | +} | ||
| 3308 | </style> | 3036 | </style> |
wenjuan-pc/src/views/investigation/question.vue
| @@ -52,17 +52,16 @@ | @@ -52,17 +52,16 @@ | ||
| 52 | </div> | 52 | </div> |
| 53 | <!-- 表格 --> | 53 | <!-- 表格 --> |
| 54 | 54 | ||
| 55 | - <el-table :data=" | ||
| 56 | - tableData.slice( | ||
| 57 | - (currentPage - 1) * pageSize, | ||
| 58 | - currentPage * pageSize | ||
| 59 | - ) | ||
| 60 | - " :header-cell-style="{ | ||
| 61 | - fontSize: '14px', | ||
| 62 | - color: '#0009', | ||
| 63 | - fontWeight: 'normal', | ||
| 64 | - backgroundColor: '#F2F3F5', | ||
| 65 | - }" tooltip-effect="dark custom-tooltip-effect"> | 55 | + <el-table :data="tableData.slice( |
| 56 | + (currentPage - 1) * pageSize, | ||
| 57 | + currentPage * pageSize | ||
| 58 | + ) | ||
| 59 | + " :header-cell-style="{ | ||
| 60 | + fontSize: '14px', | ||
| 61 | + color: '#0009', | ||
| 62 | + fontWeight: 'normal', | ||
| 63 | + backgroundColor: '#F2F3F5', | ||
| 64 | + }" tooltip-effect="dark custom-tooltip-effect"> | ||
| 66 | <el-table-column label="序号" min-width="150"> | 65 | <el-table-column label="序号" min-width="150"> |
| 67 | <template slot-scope="scope"> | 66 | <template slot-scope="scope"> |
| 68 | {{ scope.$index + 1 }} | 67 | {{ scope.$index + 1 }} |
| @@ -163,6 +162,10 @@ | @@ -163,6 +162,10 @@ | ||
| 163 | <el-option label="文本" value="文本" /> | 162 | <el-option label="文本" value="文本" /> |
| 164 | </el-select> | 163 | </el-select> |
| 165 | </el-form-item> | 164 | </el-form-item> |
| 165 | + <!-- 如果formInline.questionType为多选,那么就显示最多可以选择多少个,计步器来设置,默认是 0 --> | ||
| 166 | + <el-form-item v-if="formInline.questionType == '多选'" label="最多可选" prop="maxChoose"> | ||
| 167 | + <el-input-number v-model="formInline.maxChoose" :min="0" :max="options.length " />0为不限制填写数量 | ||
| 168 | + </el-form-item> | ||
| 166 | <el-form-item label="隶属题库" prop="questionBank"> | 169 | <el-form-item label="隶属题库" prop="questionBank"> |
| 167 | <el-select v-model="formInline.questionBank" placeholder="请选择"> | 170 | <el-select v-model="formInline.questionBank" placeholder="请选择"> |
| 168 | <el-option label="用户端题库" value="用户端题库" /> | 171 | <el-option label="用户端题库" value="用户端题库" /> |
| @@ -188,11 +191,11 @@ | @@ -188,11 +191,11 @@ | ||
| 188 | </el-form-item> | 191 | </el-form-item> |
| 189 | <el-form-item v-if="formInline.questionType != '文本'" label="答案设置" prop="optionSettings"> | 192 | <el-form-item v-if="formInline.questionType != '文本'" label="答案设置" prop="optionSettings"> |
| 190 | <el-table :data="options" :header-cell-style="{ | 193 | <el-table :data="options" :header-cell-style="{ |
| 191 | - fontSize: '14px', | ||
| 192 | - color: '#0009', | ||
| 193 | - fontWeight: 'normal', | ||
| 194 | - backgroundColor: '#F2F3F5', | ||
| 195 | - }"> | 194 | + fontSize: '14px', |
| 195 | + color: '#0009', | ||
| 196 | + fontWeight: 'normal', | ||
| 197 | + backgroundColor: '#F2F3F5', | ||
| 198 | + }"> | ||
| 196 | <el-table-column prop="index" label="序号" width="80"> | 199 | <el-table-column prop="index" label="序号" width="80"> |
| 197 | <template #default="scope"> | 200 | <template #default="scope"> |
| 198 | {{ scope.$index + 1 }} | 201 | {{ scope.$index + 1 }} |
| @@ -210,12 +213,14 @@ | @@ -210,12 +213,14 @@ | ||
| 210 | :readonly="scope.row.readonly" @input="validateScore(scope.row)" /> | 213 | :readonly="scope.row.readonly" @input="validateScore(scope.row)" /> |
| 211 | </template> | 214 | </template> |
| 212 | </el-table-column> | 215 | </el-table-column> |
| 213 | - <el-table-column label="" min-width="120" > | ||
| 214 | - <template #default="{$index}"> | ||
| 215 | - <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="answerMoveUp($index)" v-if="$index!=0">↑</span> | ||
| 216 | - <span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)" v-if="$index != (options.length-1)">↓</span> | ||
| 217 | - </template> | ||
| 218 | - </el-table-column> | 216 | + <el-table-column label="" min-width="120"> |
| 217 | + <template #default="{ $index }"> | ||
| 218 | + <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" | ||
| 219 | + @click="answerMoveUp($index)" v-if="$index != 0">↑</span> | ||
| 220 | + <span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)" | ||
| 221 | + v-if="$index != (options.length - 1)">↓</span> | ||
| 222 | + </template> | ||
| 223 | + </el-table-column> | ||
| 219 | <el-table-column label="操作"> | 224 | <el-table-column label="操作"> |
| 220 | <template #default="scope"> | 225 | <template #default="scope"> |
| 221 | <div class="tableBtn greens" @click="deleteOption(scope.$index)"> | 226 | <div class="tableBtn greens" @click="deleteOption(scope.$index)"> |
| @@ -259,6 +264,10 @@ | @@ -259,6 +264,10 @@ | ||
| 259 | <el-option label="文本" value="文本" /> | 264 | <el-option label="文本" value="文本" /> |
| 260 | </el-select> | 265 | </el-select> |
| 261 | </el-form-item> | 266 | </el-form-item> |
| 267 | + <!-- 如果formInline.questionType为多选,那么就显示最多可以选择多少个,计步器来设置,默认是 0 --> | ||
| 268 | + <el-form-item v-if="secondData.questionType == '多选'" label="最多可选" prop="maxChoose"> | ||
| 269 | + <el-input-number v-model="secondData.maxChoose" :min="0" :max="options.length " /> 0为不限制填写数量 | ||
| 270 | + </el-form-item> | ||
| 262 | <el-form-item label="隶属题库" prop="questionBank"> | 271 | <el-form-item label="隶属题库" prop="questionBank"> |
| 263 | <el-select v-model="secondData.questionBank" placeholder="请选择"> | 272 | <el-select v-model="secondData.questionBank" placeholder="请选择"> |
| 264 | <el-option label="用户端题库" value="用户端题库" /> | 273 | <el-option label="用户端题库" value="用户端题库" /> |
| @@ -284,42 +293,46 @@ | @@ -284,42 +293,46 @@ | ||
| 284 | </el-form-item> | 293 | </el-form-item> |
| 285 | <el-form-item v-if="secondData.questionType != '文本'" label="答案设置"> | 294 | <el-form-item v-if="secondData.questionType != '文本'" label="答案设置"> |
| 286 | <el-table :data="options" :header-cell-style="{ | 295 | <el-table :data="options" :header-cell-style="{ |
| 287 | - fontSize: '14px', | ||
| 288 | - color: '#0009', | ||
| 289 | - fontWeight: 'normal', | ||
| 290 | - backgroundColor: '#F2F3F5', | ||
| 291 | - }"> | ||
| 292 | - | ||
| 293 | - <el-table-column prop="index" label="序号" width="180"> | ||
| 294 | - <template #default="scope"> | ||
| 295 | - {{ scope.$index + 1 }} | ||
| 296 | - </template> | ||
| 297 | - </el-table-column> | ||
| 298 | - <el-table-column prop="name" label="选项名称"> | ||
| 299 | - <template #default="scope"> | ||
| 300 | - <el-input v-model="scope.row.name" :readonly="scope.row.readonly" /> | ||
| 301 | - </template> | ||
| 302 | - </el-table-column> | ||
| 303 | - <el-table-column prop="name" label="分数"> | ||
| 304 | - <template #default="scope"> | ||
| 305 | - <el-input v-model="scope.row.num" :min="0" :max="100" | ||
| 306 | - :readonly="scope.row.readonly" @input="validateScore(scope.row)" /> | ||
| 307 | - </template> | ||
| 308 | - </el-table-column> | ||
| 309 | - <el-table-column label="" min-width="120" > | ||
| 310 | - <template #default="{$index}"> | ||
| 311 | - <span style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" @click="answerMoveUp($index)" v-if="$index!=0">↑</span> | ||
| 312 | - <span style="cursor: pointer; color: #3F9B6A;" @click="answerMoveDown($index)" v-if="$index != (options.length-1)">↓</span> | ||
| 313 | - </template> | 296 | + fontSize: '14px', |
| 297 | + color: '#0009', | ||
| 298 | + fontWeight: 'normal', | ||
| 299 | + backgroundColor: '#F2F3F5', | ||
| 300 | + }"> | ||
| 301 | + | ||
| 302 | + <el-table-column prop="index" label="序号" width="180"> | ||
| 303 | + <template #default="scope"> | ||
| 304 | + {{ scope.$index + 1 }} | ||
| 305 | + </template> | ||
| 306 | + </el-table-column> | ||
| 307 | + <el-table-column prop="name" label="选项名称"> | ||
| 308 | + <template #default="scope"> | ||
| 309 | + <el-input v-model="scope.row.name" :readonly="scope.row.readonly" /> | ||
| 310 | + </template> | ||
| 311 | + </el-table-column> | ||
| 312 | + <el-table-column prop="name" label="分数"> | ||
| 313 | + <template #default="scope"> | ||
| 314 | + <el-input v-model="scope.row.num" :min="0" :max="100" | ||
| 315 | + :readonly="scope.row.readonly" @input="validateScore(scope.row)" /> | ||
| 316 | + </template> | ||
| 317 | + </el-table-column> | ||
| 318 | + <el-table-column label="" min-width="120"> | ||
| 319 | + <template #default="{ $index }"> | ||
| 320 | + <span | ||
| 321 | + style="cursor: pointer;margin-right: 5px; color: #3F9B6A;" | ||
| 322 | + @click="answerMoveUp($index)" v-if="$index != 0">↑</span> | ||
| 323 | + <span style="cursor: pointer; color: #3F9B6A;" | ||
| 324 | + @click="answerMoveDown($index)" | ||
| 325 | + v-if="$index != (options.length - 1)">↓</span> | ||
| 326 | + </template> | ||
| 314 | </el-table-column> | 327 | </el-table-column> |
| 315 | - <el-table-column label="操作"> | ||
| 316 | - <template #default="scope"> | ||
| 317 | - <div class="tableBtn greens" @click="deleteOption(scope.$index)"> | ||
| 318 | - 删除 | ||
| 319 | - </div> | ||
| 320 | - </template> | ||
| 321 | - </el-table-column> | ||
| 322 | - | 328 | + <el-table-column label="操作"> |
| 329 | + <template #default="scope"> | ||
| 330 | + <div class="tableBtn greens" @click="deleteOption(scope.$index)"> | ||
| 331 | + 删除 | ||
| 332 | + </div> | ||
| 333 | + </template> | ||
| 334 | + </el-table-column> | ||
| 335 | + | ||
| 323 | </el-table> | 336 | </el-table> |
| 324 | 337 | ||
| 325 | <el-button style="width: 100%; background-color: #3f9b6a; color: #fff" @click="addOption">+ | 338 | <el-button style="width: 100%; background-color: #3f9b6a; color: #fff" @click="addOption">+ |
| @@ -342,701 +355,679 @@ | @@ -342,701 +355,679 @@ | ||
| 342 | </template> | 355 | </template> |
| 343 | 356 | ||
| 344 | <script> | 357 | <script> |
| 345 | - import { | ||
| 346 | - async | ||
| 347 | - } from "q"; | ||
| 348 | - import axios from "axios"; | ||
| 349 | - import { | ||
| 350 | - QuestionGetAll, | ||
| 351 | - QuestionAdd, | ||
| 352 | - QuestionEdit, | ||
| 353 | - QuestionDel, | ||
| 354 | - } from "../../api/question.js"; | ||
| 355 | - import upimg from "@/components/ImageUpload/index"; | ||
| 356 | - export default { | ||
| 357 | - components: { | ||
| 358 | - upimg, | ||
| 359 | - }, | ||
| 360 | - data() { | ||
| 361 | - return { | ||
| 362 | - detbox: false, // 详情 | ||
| 363 | - currentPage: 1, | ||
| 364 | - total: 10, | ||
| 365 | - flag: false, | 358 | +import { |
| 359 | + async | ||
| 360 | +} from "q"; | ||
| 361 | +import axios from "axios"; | ||
| 362 | +import { | ||
| 363 | + QuestionGetAll, | ||
| 364 | + QuestionAdd, | ||
| 365 | + QuestionEdit, | ||
| 366 | + QuestionDel, | ||
| 367 | +} from "../../api/question.js"; | ||
| 368 | +import upimg from "@/components/ImageUpload/index"; | ||
| 369 | +export default { | ||
| 370 | + components: { | ||
| 371 | + upimg, | ||
| 372 | + }, | ||
| 373 | + data() { | ||
| 374 | + return { | ||
| 375 | + detbox: false, // 详情 | ||
| 376 | + currentPage: 1, | ||
| 377 | + total: 10, | ||
| 378 | + flag: false, | ||
| 379 | + pageSize: 10, | ||
| 380 | + ggXin: false, | ||
| 381 | + formInline: { | ||
| 382 | + tikuTitle: "", | ||
| 383 | + questionType: "", | ||
| 384 | + questionBank: "用户端题库", | ||
| 385 | + isRequired: "必填", | ||
| 386 | + maxChoose:0, | ||
| 387 | + questionDescription: "", | ||
| 388 | + optionSettings: {}, | ||
| 389 | + }, | ||
| 390 | + tableData: [], | ||
| 391 | + secondData: {}, | ||
| 392 | + formSel: { | ||
| 393 | + questionBank: "用户端题库", | ||
| 394 | + tikuTitle: "", | ||
| 395 | + questionType: "", | ||
| 396 | + pageNumber: 0, | ||
| 397 | + pageSize: 10, | ||
| 398 | + }, | ||
| 399 | + pageindex: { | ||
| 400 | + pageNumber: 0, | ||
| 401 | + pageSize: 10, | ||
| 402 | + questionBank: "用户端题库", | ||
| 403 | + }, | ||
| 404 | + bainjiBox: false, | ||
| 405 | + options: [], | ||
| 406 | + labelStyle: { | ||
| 407 | + width: "160px", | ||
| 408 | + }, | ||
| 409 | + contentStyle: { | ||
| 410 | + width: "246px", | ||
| 411 | + }, | ||
| 412 | + rules: { | ||
| 413 | + tikuTitle: [{ | ||
| 414 | + required: true, | ||
| 415 | + message: "请输入题目", | ||
| 416 | + trigger: "blur" | ||
| 417 | + }], | ||
| 418 | + questionType: [{ | ||
| 419 | + required: true, | ||
| 420 | + message: "请选择题型", | ||
| 421 | + trigger: "change" | ||
| 422 | + },], | ||
| 423 | + questionBank: [{ | ||
| 424 | + required: true, | ||
| 425 | + message: "请选择所属题库", | ||
| 426 | + trigger: "change" | ||
| 427 | + },], | ||
| 428 | + layoutType: [{ | ||
| 429 | + required: true, | ||
| 430 | + message: "请选择布局类型", | ||
| 431 | + trigger: "change" | ||
| 432 | + },], | ||
| 433 | + optionSettings: [{ | ||
| 434 | + required: true, | ||
| 435 | + message: "请设置答案", | ||
| 436 | + trigger: "change" | ||
| 437 | + },], | ||
| 438 | + }, | ||
| 439 | + }; | ||
| 440 | + }, | ||
| 441 | + computed: {}, | ||
| 442 | + mounted() { | ||
| 443 | + this.getAll(); | ||
| 444 | + }, | ||
| 445 | + methods: { | ||
| 446 | + chenge(val) { | ||
| 447 | + this.formSel = { | ||
| 448 | + questionBank: "用户端题库", | ||
| 449 | + tikuTitle: "", | ||
| 450 | + questionType: "", | ||
| 451 | + pageNumber: 0, | ||
| 366 | pageSize: 10, | 452 | pageSize: 10, |
| 367 | - ggXin: false, | ||
| 368 | - formInline: { | ||
| 369 | - tikuTitle: "", | ||
| 370 | - questionType: "", | ||
| 371 | - questionBank: "用户端题库", | ||
| 372 | - isRequired: "必填", | ||
| 373 | - questionDescription: "", | ||
| 374 | - optionSettings: {}, | ||
| 375 | - }, | ||
| 376 | - tableData: [], | ||
| 377 | - secondData: {}, | ||
| 378 | - formSel: { | ||
| 379 | - questionBank: "用户端题库", | ||
| 380 | - tikuTitle: "", | ||
| 381 | - questionType: "", | ||
| 382 | - pageNumber: 0, | ||
| 383 | - pageSize: 10, | ||
| 384 | - }, | ||
| 385 | - pageindex: { | ||
| 386 | - pageNumber: 0, | ||
| 387 | - pageSize: 10, | ||
| 388 | - questionBank: "用户端题库", | ||
| 389 | - }, | ||
| 390 | - bainjiBox: false, | ||
| 391 | - options: [], | ||
| 392 | - labelStyle: { | ||
| 393 | - width: "160px", | ||
| 394 | - }, | ||
| 395 | - contentStyle: { | ||
| 396 | - width: "246px", | ||
| 397 | - }, | ||
| 398 | - rules: { | ||
| 399 | - tikuTitle: [{ | ||
| 400 | - required: true, | ||
| 401 | - message: "请输入题目", | ||
| 402 | - trigger: "blur" | ||
| 403 | - }], | ||
| 404 | - questionType: [{ | ||
| 405 | - required: true, | ||
| 406 | - message: "请选择题型", | ||
| 407 | - trigger: "change" | ||
| 408 | - }, ], | ||
| 409 | - questionBank: [{ | ||
| 410 | - required: true, | ||
| 411 | - message: "请选择所属题库", | ||
| 412 | - trigger: "change" | ||
| 413 | - }, ], | ||
| 414 | - layoutType: [{ | ||
| 415 | - required: true, | ||
| 416 | - message: "请选择布局类型", | ||
| 417 | - trigger: "change" | ||
| 418 | - }, ], | ||
| 419 | - optionSettings: [{ | ||
| 420 | - required: true, | ||
| 421 | - message: "请设置答案", | ||
| 422 | - trigger: "change" | ||
| 423 | - }, ], | ||
| 424 | - }, | ||
| 425 | }; | 453 | }; |
| 426 | }, | 454 | }, |
| 427 | - computed: {}, | ||
| 428 | - mounted() { | ||
| 429 | - this.getAll(); | 455 | + getAll() { |
| 456 | + QuestionGetAll(this.pageindex).then((res) => { | ||
| 457 | + this.tableData = res.data.content; | ||
| 458 | + this.total = res.data.totalElements; | ||
| 459 | + }); | ||
| 430 | }, | 460 | }, |
| 431 | - methods: { | ||
| 432 | - chenge(val) { | ||
| 433 | - this.formSel = { | ||
| 434 | - questionBank: "用户端题库", | ||
| 435 | - tikuTitle: "", | ||
| 436 | - questionType: "", | ||
| 437 | - pageNumber: 0, | ||
| 438 | - pageSize: 10, | ||
| 439 | - }; | ||
| 440 | - }, | ||
| 441 | - getAll() { | ||
| 442 | - QuestionGetAll(this.pageindex).then((res) => { | ||
| 443 | - this.tableData = res.data.content; | ||
| 444 | - this.total = res.data.totalElements; | ||
| 445 | - }); | ||
| 446 | - }, | ||
| 447 | 461 | ||
| 448 | - // 新增确定按钮 | ||
| 449 | - addCheck(val) { | ||
| 450 | - this.$refs.reform.validate((valid) => { | ||
| 451 | - if (valid) { | ||
| 452 | - if ( | ||
| 453 | - this.formInline.questionType != "文本" && | ||
| 454 | - this.options.length == 0 | ||
| 455 | - ) { | 462 | + // 新增确定按钮 |
| 463 | + addCheck(val) { | ||
| 464 | + this.$refs.reform.validate((valid) => { | ||
| 465 | + if (valid) { | ||
| 466 | + if ( | ||
| 467 | + this.formInline.questionType != "文本" && | ||
| 468 | + this.options.length == 0 | ||
| 469 | + ) { | ||
| 470 | + this.$message({ | ||
| 471 | + message: "请添加答案选项", | ||
| 472 | + }); | ||
| 473 | + return; | ||
| 474 | + } | ||
| 475 | + for (let i = 0; i < this.options.length; i++) { | ||
| 476 | + if (this.options[i].name == "") { | ||
| 456 | this.$message({ | 477 | this.$message({ |
| 457 | - message: "请添加答案选项", | 478 | + message: "答案选项不能为空", |
| 458 | }); | 479 | }); |
| 459 | return; | 480 | return; |
| 460 | } | 481 | } |
| 461 | - for (let i = 0; i < this.options.length; i++) { | ||
| 462 | - if (this.options[i].name == "") { | ||
| 463 | - this.$message({ | ||
| 464 | - message: "答案选项不能为空", | ||
| 465 | - }); | ||
| 466 | - return; | ||
| 467 | - } | ||
| 468 | - } | ||
| 469 | - let accumulator= {} | ||
| 470 | - let fenshu = {} | ||
| 471 | - this.options.forEach((item,index)=>{ | ||
| 472 | - accumulator[index] = item.name | ||
| 473 | - fenshu[index] = Number(item.num) || 0 | ||
| 474 | - }) | ||
| 475 | - // this.formInline.optionSettings = this.options.reduce( | ||
| 476 | - // (accumulator, current) => { | ||
| 477 | - // console.log(accumulator) | ||
| 478 | - // accumulator[current.index].index = current.name; | ||
| 479 | - // return accumulator; | ||
| 480 | - // }, {}, | ||
| 481 | - | ||
| 482 | - // ); // 初始化累加器为空对象 | ||
| 483 | - this.formInline.optionSettings = accumulator | ||
| 484 | - this.formInline.score = fenshu | ||
| 485 | - // this.formInline.score = this.options.reduce( | ||
| 486 | - // (accumulator, current) => { | ||
| 487 | - // accumulator[current.index] = Number(current.num); | ||
| 488 | - // return accumulator; | ||
| 489 | - // }, {} | ||
| 490 | - // ); // 初始化累加器为空对象 | ||
| 491 | - // console.log(this.formInline.optionSettings,this.formInline.score) | ||
| 492 | - // return | ||
| 493 | - this.formInline.optionSettings = JSON.stringify( | ||
| 494 | - this.formInline.optionSettings | ||
| 495 | - ); | ||
| 496 | - this.formInline.score = JSON.stringify(this.formInline.score); | ||
| 497 | - this.formInline.createDate = this.currentTime(); | ||
| 498 | - QuestionAdd(this.formInline).then((res) => { | ||
| 499 | - this.$message({ | ||
| 500 | - message: "保存成功", | ||
| 501 | - type: "success", | ||
| 502 | - }); | ||
| 503 | - this.formInline = { | ||
| 504 | - tikuTitle: "", | ||
| 505 | - questionType: "", | ||
| 506 | - questionBank: "用户端题库", | ||
| 507 | - isRequired: "必填", | ||
| 508 | - questionDescription: "", | ||
| 509 | - optionSettings: {}, | ||
| 510 | - }; | ||
| 511 | - this.getAll(); | 482 | + } |
| 483 | + let accumulator = {} | ||
| 484 | + let fenshu = {} | ||
| 485 | + this.options.forEach((item, index) => { | ||
| 486 | + accumulator[index] = item.name | ||
| 487 | + fenshu[index] = Number(item.num) || 0 | ||
| 488 | + }) | ||
| 489 | + this.formInline.optionSettings = accumulator | ||
| 490 | + this.formInline.score = fenshu | ||
| 491 | + this.formInline.optionSettings = JSON.stringify( | ||
| 492 | + this.formInline.optionSettings | ||
| 493 | + ); | ||
| 494 | + this.formInline.score = JSON.stringify(this.formInline.score); | ||
| 495 | + this.formInline.createDate = this.currentTime(); | ||
| 496 | + QuestionAdd(this.formInline).then((res) => { | ||
| 497 | + this.$message({ | ||
| 498 | + message: "保存成功", | ||
| 499 | + type: "success", | ||
| 512 | }); | 500 | }); |
| 501 | + this.formInline = { | ||
| 502 | + tikuTitle: "", | ||
| 503 | + questionType: "", | ||
| 504 | + questionBank: "用户端题库", | ||
| 505 | + isRequired: "必填", | ||
| 506 | + questionDescription: "", | ||
| 507 | + optionSettings: {}, | ||
| 508 | + }; | ||
| 509 | + this.getAll(); | ||
| 510 | + }); | ||
| 513 | 511 | ||
| 514 | - this.ggXin = false; | ||
| 515 | - } else { | ||
| 516 | - return false; | 512 | + this.ggXin = false; |
| 513 | + } else { | ||
| 514 | + return false; | ||
| 515 | + } | ||
| 516 | + }); | ||
| 517 | + }, | ||
| 518 | + // 编辑确定 | ||
| 519 | + async bianCheck() { | ||
| 520 | + this.$refs.bianform.validate((valid) => { | ||
| 521 | + if (valid) { | ||
| 522 | + if ( | ||
| 523 | + this.secondData.questionType != "文本" && | ||
| 524 | + this.options.length == 0 | ||
| 525 | + ) { | ||
| 526 | + this.$message({ | ||
| 527 | + message: "请添加答案选项", | ||
| 528 | + }); | ||
| 529 | + return; | ||
| 517 | } | 530 | } |
| 518 | - }); | ||
| 519 | - }, | ||
| 520 | - // 编辑确定 | ||
| 521 | - async bianCheck() { | ||
| 522 | - this.$refs.bianform.validate((valid) => { | ||
| 523 | - if (valid) { | ||
| 524 | - if ( | ||
| 525 | - this.secondData.questionType != "文本" && | ||
| 526 | - this.options.length == 0 | ||
| 527 | - ) { | 531 | + for (let i = 0; i < this.options.length; i++) { |
| 532 | + if (this.options[i].name == "") { | ||
| 528 | this.$message({ | 533 | this.$message({ |
| 529 | - message: "请添加答案选项", | 534 | + message: "答案选项不能为空", |
| 530 | }); | 535 | }); |
| 531 | return; | 536 | return; |
| 532 | } | 537 | } |
| 533 | - for (let i = 0; i < this.options.length; i++) { | ||
| 534 | - if (this.options[i].name == "") { | ||
| 535 | - this.$message({ | ||
| 536 | - message: "答案选项不能为空", | ||
| 537 | - }); | ||
| 538 | - return; | ||
| 539 | - } | ||
| 540 | - } | ||
| 541 | - let accumulator= {} | ||
| 542 | - let fenshu ={} | ||
| 543 | - this.options.forEach((item,index)=>{ | ||
| 544 | - | ||
| 545 | - accumulator[index] = item.name | ||
| 546 | - fenshu[index] = Number(item.num) || 0 | ||
| 547 | - }) | ||
| 548 | - | ||
| 549 | - | ||
| 550 | - // this.secondData.score = fenshu | ||
| 551 | - | ||
| 552 | - // this.formInline.optionSettings = accumulator | ||
| 553 | - // this.secondData.optionSettings = this.options.reduce( | ||
| 554 | - // (accumulator, current) => { | ||
| 555 | - // accumulator[current.index] = current.name; | ||
| 556 | - // return accumulator; | ||
| 557 | - // }, {} | ||
| 558 | - // ); // 初始化累加器为空对象 | ||
| 559 | - // this.secondData.score = this.options.reduce( | ||
| 560 | - // (accumulator, current) => { | ||
| 561 | - // accumulator[current.index] = Number(current.num); | ||
| 562 | - // return accumulator; | ||
| 563 | - // }, {} | ||
| 564 | - // ); // 初始化累加器为空对象 | ||
| 565 | - | ||
| 566 | - this.secondData.optionSettings = JSON.stringify( | ||
| 567 | - accumulator | ||
| 568 | - ); | ||
| 569 | - this.secondData.score = JSON.stringify(fenshu); | ||
| 570 | - | ||
| 571 | - QuestionEdit(this.secondData).then((res) => { | ||
| 572 | - this.$message({ | ||
| 573 | - message: "保存成功", | ||
| 574 | - type: "success", | ||
| 575 | - }); | ||
| 576 | - | ||
| 577 | - this.getAll(); | ||
| 578 | - }); | ||
| 579 | - | ||
| 580 | - this.bainjiBox = false; | ||
| 581 | - } else { | 538 | + } |
| 539 | + let accumulator = {} | ||
| 540 | + let fenshu = {} | ||
| 541 | + this.options.forEach((item, index) => { | ||
| 542 | + | ||
| 543 | + accumulator[index] = item.name | ||
| 544 | + fenshu[index] = Number(item.num) || 0 | ||
| 545 | + }) | ||
| 546 | + this.secondData.optionSettings = JSON.stringify( | ||
| 547 | + accumulator | ||
| 548 | + ); | ||
| 549 | + this.secondData.score = JSON.stringify(fenshu); | ||
| 550 | + | ||
| 551 | + QuestionEdit(this.secondData).then((res) => { | ||
| 582 | this.$message({ | 552 | this.$message({ |
| 583 | - message: "请填写完整信息", | ||
| 584 | - type: "error", | 553 | + message: "保存成功", |
| 554 | + type: "success", | ||
| 585 | }); | 555 | }); |
| 586 | - return false; | ||
| 587 | - } | ||
| 588 | - }); | ||
| 589 | - }, | ||
| 590 | - // 获取时间 | ||
| 591 | - currentTime() { | ||
| 592 | - const date = new Date(); | ||
| 593 | - const year = date.getFullYear(); | ||
| 594 | - let month = date.getMonth() + 1; // 月份从0~11,所以加一 | ||
| 595 | - let day = date.getDate(); | ||
| 596 | - let hours = date.getHours(); | ||
| 597 | - let minutes = date.getMinutes(); | ||
| 598 | - let seconds = date.getSeconds(); | ||
| 599 | - | ||
| 600 | - // 为月、日、小时、分钟和秒添加前导零(如果需要) | ||
| 601 | - month = month < 10 ? "0" + month : month; | ||
| 602 | - day = day < 10 ? "0" + day : day; | ||
| 603 | - hours = hours < 10 ? "0" + hours : hours; | ||
| 604 | - minutes = minutes < 10 ? "0" + minutes : minutes; | ||
| 605 | - seconds = seconds < 10 ? "0" + seconds : seconds; | ||
| 606 | - | ||
| 607 | - // 返回格式化的日期和时间字符串 | ||
| 608 | - return `${year}-${month}-${day} ${hours}:${minutes}`; | ||
| 609 | - }, | ||
| 610 | 556 | ||
| 611 | - // 详情 | ||
| 612 | - details(val, item) { | ||
| 613 | - this.secondData = item; | 557 | + this.getAll(); |
| 558 | + }); | ||
| 614 | 559 | ||
| 615 | - if (typeof item.optionSettings === "string") { | ||
| 616 | - this.secondData.optionSettings = JSON.parse(item.optionSettings); | ||
| 617 | - } | ||
| 618 | - this.detbox = true; | ||
| 619 | - }, | ||
| 620 | - addbuss(val, item) { | ||
| 621 | - this.detbox = false; | ||
| 622 | - this.ggXin = true; | ||
| 623 | - }, | ||
| 624 | - handleSizeChange(val) { | ||
| 625 | - this.pageSize = val; | ||
| 626 | - }, | ||
| 627 | - handleCurrentChange(val) { | ||
| 628 | - // this.currentPage = val | ||
| 629 | - this.pageindex.pageNumber = val - 1; | ||
| 630 | - QuestionGetAll(this.pageindex).then((res) => { | ||
| 631 | - this.tableData = res.data.content; | ||
| 632 | - }); | ||
| 633 | - }, | ||
| 634 | - | ||
| 635 | - closeFn(val) { | ||
| 636 | - if (val == 1) { | ||
| 637 | - this.ggXin = false; | ||
| 638 | - } else { | ||
| 639 | this.bainjiBox = false; | 560 | this.bainjiBox = false; |
| 640 | - } | ||
| 641 | - }, | ||
| 642 | - | ||
| 643 | - // 查询按钮 | ||
| 644 | - async onSubmit() { | ||
| 645 | - const res = await QuestionGetAll(this.formSel); | ||
| 646 | - this.tableData = res.data.content; | ||
| 647 | - this.total = res.data.totalElements; | ||
| 648 | - }, | ||
| 649 | - // 重置按钮 | ||
| 650 | - resetting() { | ||
| 651 | - this.formSel = { | ||
| 652 | - questionBank: "用户端题库", | ||
| 653 | - pageNumber: 0, | ||
| 654 | - pageSize: 10, | ||
| 655 | - }; | ||
| 656 | - this.currentPage = 1; | ||
| 657 | - this.pageindex.pageNumber = 0; | ||
| 658 | - this.getAll(); | ||
| 659 | - }, | ||
| 660 | - addOption() { | ||
| 661 | - const newOption = { | ||
| 662 | - index: this.options.length + 1, | ||
| 663 | - name: "", | ||
| 664 | - readonly: false, | ||
| 665 | - }; | ||
| 666 | - this.options.push(newOption); | ||
| 667 | - }, | ||
| 668 | - deleteOption(index) { | ||
| 669 | - this.options.splice(index, 1); | ||
| 670 | - }, | ||
| 671 | - bianls(item) { | ||
| 672 | - let settings = null; | ||
| 673 | - let socer = null; | ||
| 674 | - if (typeof item.optionSettings !== "object") { | ||
| 675 | - settings = JSON.parse(item.optionSettings); | ||
| 676 | - } else { | ||
| 677 | - settings = item.optionSettings; | ||
| 678 | - } | ||
| 679 | - if (typeof item.score !== "object") { | ||
| 680 | - socer = JSON.parse(item.score); | ||
| 681 | } else { | 561 | } else { |
| 682 | - socer = item.score; | 562 | + this.$message({ |
| 563 | + message: "请填写完整信息", | ||
| 564 | + type: "error", | ||
| 565 | + }); | ||
| 566 | + return false; | ||
| 683 | } | 567 | } |
| 684 | - const keys = Object.keys(settings); | ||
| 685 | - this.options = keys.map((key) => ({ | ||
| 686 | - index: parseInt(key), // 将字符串键转换为整数 | ||
| 687 | - name: settings[key], | ||
| 688 | - num: socer[key], // 添加 socer 的值 | ||
| 689 | - })); | ||
| 690 | - | ||
| 691 | - this.bainjiBox = true; | ||
| 692 | - this.secondData = item; | ||
| 693 | - }, | ||
| 694 | - tikuDel(item) { | ||
| 695 | - const h = this.$createElement; | ||
| 696 | - this.$msgbox({ | ||
| 697 | - title: "消息", | ||
| 698 | - message: h("p", null, [h("span", null, "是否删除 ")]), | ||
| 699 | - showCancelButton: true, | ||
| 700 | - showClose: false, | ||
| 701 | - confirmButtonText: "确定", | ||
| 702 | - cancelButtonText: "取消", | ||
| 703 | - customClass: "oe-dialog-btn", | ||
| 704 | - beforeClose: (action, instance, done) => { | ||
| 705 | - if (action === "confirm") { | ||
| 706 | - QuestionDel({ | ||
| 707 | - id: item.id, | ||
| 708 | - }).then((res) => { | ||
| 709 | - this.getAll(); | ||
| 710 | - done(); | ||
| 711 | - }); | ||
| 712 | - } else { | ||
| 713 | - done(); | ||
| 714 | - } | ||
| 715 | - }, | ||
| 716 | - }); | ||
| 717 | - }, | ||
| 718 | - async tikuBox(val) { | ||
| 719 | - this.pageindex.questionBank = val; | 568 | + }); |
| 569 | + }, | ||
| 570 | + // 获取时间 | ||
| 571 | + currentTime() { | ||
| 572 | + const date = new Date(); | ||
| 573 | + const year = date.getFullYear(); | ||
| 574 | + let month = date.getMonth() + 1; // 月份从0~11,所以加一 | ||
| 575 | + let day = date.getDate(); | ||
| 576 | + let hours = date.getHours(); | ||
| 577 | + let minutes = date.getMinutes(); | ||
| 578 | + let seconds = date.getSeconds(); | ||
| 579 | + | ||
| 580 | + // 为月、日、小时、分钟和秒添加前导零(如果需要) | ||
| 581 | + month = month < 10 ? "0" + month : month; | ||
| 582 | + day = day < 10 ? "0" + day : day; | ||
| 583 | + hours = hours < 10 ? "0" + hours : hours; | ||
| 584 | + minutes = minutes < 10 ? "0" + minutes : minutes; | ||
| 585 | + seconds = seconds < 10 ? "0" + seconds : seconds; | ||
| 586 | + | ||
| 587 | + // 返回格式化的日期和时间字符串 | ||
| 588 | + return `${year}-${month}-${day} ${hours}:${minutes}`; | ||
| 589 | + }, | ||
| 590 | + | ||
| 591 | + // 详情 | ||
| 592 | + details(val, item) { | ||
| 593 | + this.secondData = item; | ||
| 720 | 594 | ||
| 721 | - const res = await QuestionGetAll(this.pageindex); | 595 | + if (typeof item.optionSettings === "string") { |
| 596 | + this.secondData.optionSettings = JSON.parse(item.optionSettings); | ||
| 597 | + } | ||
| 598 | + this.detbox = true; | ||
| 599 | + }, | ||
| 600 | + addbuss(val, item) { | ||
| 601 | + this.detbox = false; | ||
| 602 | + this.ggXin = true; | ||
| 603 | + }, | ||
| 604 | + handleSizeChange(val) { | ||
| 605 | + this.pageSize = val; | ||
| 606 | + }, | ||
| 607 | + handleCurrentChange(val) { | ||
| 608 | + // this.currentPage = val | ||
| 609 | + this.pageindex.pageNumber = val - 1; | ||
| 610 | + QuestionGetAll(this.pageindex).then((res) => { | ||
| 722 | this.tableData = res.data.content; | 611 | this.tableData = res.data.content; |
| 723 | - this.total = res.data.totalElements; | ||
| 724 | - }, | ||
| 725 | - addTimu() { | ||
| 726 | - this.formInline = { | ||
| 727 | - tikuTitle: "", | ||
| 728 | - questionType: "", | ||
| 729 | - questionBank: "用户端题库", | ||
| 730 | - isRequired: "必填", | ||
| 731 | - layoutType: 1, | ||
| 732 | - questionDescription: "", | ||
| 733 | - optionSettings: {}, | ||
| 734 | - }; | ||
| 735 | - this.options = []; | ||
| 736 | - // this.$refs.reform.resetFields() | ||
| 737 | - this.ggXin = true; | ||
| 738 | - }, | ||
| 739 | - validateScore(row) { | ||
| 740 | - // 如果输入的不是数字或者是NaN,则重置为1 | ||
| 741 | - if (isNaN(row.num) || row.num < 0) { | ||
| 742 | - row.num = 0; | ||
| 743 | - } | ||
| 744 | - // 如果输入的数字大于100,则重置为100 | ||
| 745 | - if (row.num > 100) { | ||
| 746 | - row.num = 100; | ||
| 747 | - } | ||
| 748 | - }, | ||
| 749 | - answerMoveUp (index) { | ||
| 750 | - [this.options[index],this.options[index-1]]=[this.options[index - 1],this.options[index]] | ||
| 751 | - console.log(this.options[index]) | ||
| 752 | - this.options[index].index = index - 1 | ||
| 753 | - this.options.sort() | ||
| 754 | - | ||
| 755 | - | ||
| 756 | - }, | ||
| 757 | - answerMoveDown (index) { | ||
| 758 | - [this.options[index],this.options[index+1]]=[this.options[index+1],this.options[index]] | ||
| 759 | - this.options[index].index = index + 1 | ||
| 760 | - this.options.sort() | ||
| 761 | - | ||
| 762 | - }, | 612 | + }); |
| 763 | }, | 613 | }, |
| 764 | - }; | ||
| 765 | -</script> | ||
| 766 | - | ||
| 767 | -<style scoped> | ||
| 768 | - .zhuti { | ||
| 769 | - padding: 0 20px 20px 20px; | ||
| 770 | - min-height: calc(100vh - 50px - 20px); | ||
| 771 | - background-color: #fff; | ||
| 772 | - } | ||
| 773 | 614 | ||
| 774 | - .chengeXia { | ||
| 775 | - border-bottom: 6px solid #3f9b6a; | ||
| 776 | - padding-bottom: 4px; | ||
| 777 | - color: #3f9b6a; | ||
| 778 | - } | 615 | + closeFn(val) { |
| 616 | + if (val == 1) { | ||
| 617 | + this.ggXin = false; | ||
| 618 | + } else { | ||
| 619 | + this.bainjiBox = false; | ||
| 620 | + } | ||
| 621 | + }, | ||
| 779 | 622 | ||
| 780 | - /deep/ .el-form-item__content { | ||
| 781 | - line-height: 0; | ||
| 782 | - } | 623 | + // 查询按钮 |
| 624 | + async onSubmit() { | ||
| 625 | + const res = await QuestionGetAll(this.formSel); | ||
| 626 | + this.tableData = res.data.content; | ||
| 627 | + this.total = res.data.totalElements; | ||
| 628 | + }, | ||
| 629 | + // 重置按钮 | ||
| 630 | + resetting() { | ||
| 631 | + this.formSel = { | ||
| 632 | + questionBank: "用户端题库", | ||
| 633 | + pageNumber: 0, | ||
| 634 | + pageSize: 10, | ||
| 635 | + }; | ||
| 636 | + this.currentPage = 1; | ||
| 637 | + this.pageindex.pageNumber = 0; | ||
| 638 | + this.getAll(); | ||
| 639 | + }, | ||
| 640 | + addOption() { | ||
| 641 | + const newOption = { | ||
| 642 | + index: this.options.length + 1, | ||
| 643 | + name: "", | ||
| 644 | + readonly: false, | ||
| 645 | + }; | ||
| 646 | + this.options.push(newOption); | ||
| 647 | + }, | ||
| 648 | + deleteOption(index) { | ||
| 649 | + this.options.splice(index, 1); | ||
| 650 | + }, | ||
| 651 | + bianls(item) { | ||
| 652 | + let settings = null; | ||
| 653 | + let socer = null; | ||
| 654 | + if (typeof item.optionSettings !== "object") { | ||
| 655 | + settings = JSON.parse(item.optionSettings); | ||
| 656 | + } else { | ||
| 657 | + settings = item.optionSettings; | ||
| 658 | + } | ||
| 659 | + if (typeof item.score !== "object") { | ||
| 660 | + socer = JSON.parse(item.score); | ||
| 661 | + } else { | ||
| 662 | + socer = item.score; | ||
| 663 | + } | ||
| 664 | + console.log("我是点击后的数据",item) | ||
| 665 | + const keys = Object.keys(settings); | ||
| 666 | + this.options = keys.map((key) => ({ | ||
| 667 | + index: parseInt(key), // 将字符串键转换为整数 | ||
| 668 | + name: settings[key], | ||
| 669 | + num: socer[key], // 添加 socer 的值 | ||
| 670 | + })); | ||
| 671 | + | ||
| 672 | + this.bainjiBox = true; | ||
| 673 | + //判断item.maxChoose是undefined的话,默认为0 | ||
| 674 | + | ||
| 675 | + this.secondData = item; | ||
| 676 | + this.secondData.maxChoose = item.maxChoose || 0; | ||
| 677 | + }, | ||
| 678 | + tikuDel(item) { | ||
| 679 | + const h = this.$createElement; | ||
| 680 | + this.$msgbox({ | ||
| 681 | + title: "消息", | ||
| 682 | + message: h("p", null, [h("span", null, "是否删除 ")]), | ||
| 683 | + showCancelButton: true, | ||
| 684 | + showClose: false, | ||
| 685 | + confirmButtonText: "确定", | ||
| 686 | + cancelButtonText: "取消", | ||
| 687 | + customClass: "oe-dialog-btn", | ||
| 688 | + beforeClose: (action, instance, done) => { | ||
| 689 | + if (action === "confirm") { | ||
| 690 | + QuestionDel({ | ||
| 691 | + id: item.id, | ||
| 692 | + }).then((res) => { | ||
| 693 | + this.getAll(); | ||
| 694 | + done(); | ||
| 695 | + }); | ||
| 696 | + } else { | ||
| 697 | + done(); | ||
| 698 | + } | ||
| 699 | + }, | ||
| 700 | + }); | ||
| 701 | + }, | ||
| 702 | + async tikuBox(val) { | ||
| 703 | + this.pageindex.questionBank = val; | ||
| 783 | 704 | ||
| 784 | - .tableBtn { | ||
| 785 | - display: inline-block; | ||
| 786 | - margin-right: 10px; | ||
| 787 | - color: #acacac; | ||
| 788 | - cursor: pointer; | ||
| 789 | - } | 705 | + const res = await QuestionGetAll(this.pageindex); |
| 706 | + this.tableData = res.data.content; | ||
| 707 | + this.total = res.data.totalElements; | ||
| 708 | + }, | ||
| 709 | + addTimu() { | ||
| 710 | + this.formInline = { | ||
| 711 | + tikuTitle: "", | ||
| 712 | + questionType: "", | ||
| 713 | + questionBank: "用户端题库", | ||
| 714 | + isRequired: "必填", | ||
| 715 | + maxChoose: 0, | ||
| 716 | + layoutType: 1, | ||
| 717 | + questionDescription: "", | ||
| 718 | + optionSettings: {}, | ||
| 719 | + }; | ||
| 720 | + this.options = []; | ||
| 721 | + // this.$refs.reform.resetFields() | ||
| 722 | + this.ggXin = true; | ||
| 723 | + }, | ||
| 724 | + validateScore(row) { | ||
| 725 | + // 如果输入的不是数字或者是NaN,则重置为1 | ||
| 726 | + if (isNaN(row.num) || row.num < 0) { | ||
| 727 | + row.num = 0; | ||
| 728 | + } | ||
| 729 | + // 如果输入的数字大于100,则重置为100 | ||
| 730 | + if (row.num > 100) { | ||
| 731 | + row.num = 100; | ||
| 732 | + } | ||
| 733 | + }, | ||
| 734 | + answerMoveUp(index) { | ||
| 735 | + [this.options[index], this.options[index - 1]] = [this.options[index - 1], this.options[index]] | ||
| 736 | + console.log(this.options[index]) | ||
| 737 | + this.options[index].index = index - 1 | ||
| 738 | + this.options.sort() | ||
| 790 | 739 | ||
| 791 | - .formSearch { | ||
| 792 | - display: flex; | ||
| 793 | - width: 100%; | ||
| 794 | - font-size: 14px; | ||
| 795 | - justify-content: space-between; | ||
| 796 | - } | ||
| 797 | 740 | ||
| 798 | - .greens { | ||
| 799 | - color: #3f9b6a; | ||
| 800 | - } | 741 | + }, |
| 742 | + answerMoveDown(index) { | ||
| 743 | + [this.options[index], this.options[index + 1]] = [this.options[index + 1], this.options[index]] | ||
| 744 | + this.options[index].index = index + 1 | ||
| 745 | + this.options.sort() | ||
| 801 | 746 | ||
| 802 | - /deep/ .el-table__row { | ||
| 803 | - font-size: 14px; | ||
| 804 | - color: #000000e6; | ||
| 805 | - height: 42px; | ||
| 806 | - } | 747 | + }, |
| 748 | + }, | ||
| 749 | +}; | ||
| 750 | +</script> | ||
| 807 | 751 | ||
| 808 | - .fenye { | ||
| 809 | - margin-top: 20px; | ||
| 810 | - display: flex; | ||
| 811 | - justify-content: flex-end; | 752 | +<style scoped> |
| 753 | +.zhuti { | ||
| 754 | + padding: 0 20px 20px 20px; | ||
| 755 | + min-height: calc(100vh - 50px - 20px); | ||
| 756 | + background-color: #fff; | ||
| 757 | +} | ||
| 758 | + | ||
| 759 | +.chengeXia { | ||
| 760 | + border-bottom: 6px solid #3f9b6a; | ||
| 761 | + padding-bottom: 4px; | ||
| 762 | + color: #3f9b6a; | ||
| 763 | +} | ||
| 764 | + | ||
| 765 | +/deep/ .el-form-item__content { | ||
| 766 | + line-height: 0; | ||
| 767 | +} | ||
| 768 | + | ||
| 769 | +.tableBtn { | ||
| 770 | + display: inline-block; | ||
| 771 | + margin-right: 10px; | ||
| 772 | + color: #acacac; | ||
| 773 | + cursor: pointer; | ||
| 774 | +} | ||
| 775 | + | ||
| 776 | +.formSearch { | ||
| 777 | + display: flex; | ||
| 778 | + width: 100%; | ||
| 779 | + font-size: 14px; | ||
| 780 | + justify-content: space-between; | ||
| 781 | +} | ||
| 782 | + | ||
| 783 | +.greens { | ||
| 784 | + color: #3f9b6a; | ||
| 785 | +} | ||
| 786 | + | ||
| 787 | +/deep/ .el-table__row { | ||
| 788 | + font-size: 14px; | ||
| 789 | + color: #000000e6; | ||
| 790 | + height: 42px; | ||
| 791 | +} | ||
| 792 | + | ||
| 793 | +.fenye { | ||
| 794 | + margin-top: 20px; | ||
| 795 | + display: flex; | ||
| 796 | + justify-content: flex-end; | ||
| 797 | +} | ||
| 798 | + | ||
| 799 | +/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { | ||
| 800 | + background-color: #3f9b6a; | ||
| 801 | +} | ||
| 802 | + | ||
| 803 | +.el-row { | ||
| 804 | + margin-bottom: 20px; | ||
| 805 | + | ||
| 806 | + &:last-child { | ||
| 807 | + margin-bottom: 0; | ||
| 812 | } | 808 | } |
| 813 | - | ||
| 814 | - /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { | ||
| 815 | - background-color: #3f9b6a; | 809 | +} |
| 810 | + | ||
| 811 | +.el-col { | ||
| 812 | + border-radius: 4px; | ||
| 813 | +} | ||
| 814 | + | ||
| 815 | +.bg-purple-dark { | ||
| 816 | + background: #99a9bf; | ||
| 817 | +} | ||
| 818 | + | ||
| 819 | +.bg-purple { | ||
| 820 | + background: #d3dce6; | ||
| 821 | +} | ||
| 822 | + | ||
| 823 | +.bg-purple-light { | ||
| 824 | + background: #e5e9f2; | ||
| 825 | +} | ||
| 826 | + | ||
| 827 | +.grid-content { | ||
| 828 | + border-radius: 4px; | ||
| 829 | + min-height: 36px; | ||
| 830 | +} | ||
| 831 | + | ||
| 832 | +.row-bg { | ||
| 833 | + padding: 10px 0; | ||
| 834 | + background-color: #f9fafc; | ||
| 835 | +} | ||
| 836 | + | ||
| 837 | +/deep/ .bg-purple[data-v-0e3fe4ec] { | ||
| 838 | + background: #fff; | ||
| 839 | + height: 50px; | ||
| 840 | +} | ||
| 841 | + | ||
| 842 | +/deep/ .bg-purple[data-v-3bebae82] { | ||
| 843 | + background: #fff; | ||
| 844 | + height: 50px; | ||
| 845 | +} | ||
| 846 | + | ||
| 847 | +::v-deep .bg-purple { | ||
| 848 | + background: #fff; | ||
| 849 | + height: 50px; | ||
| 850 | +} | ||
| 851 | + | ||
| 852 | +/deep/ .el-form--label-top .el-form-item__label { | ||
| 853 | + padding: 0; | ||
| 854 | +} | ||
| 855 | + | ||
| 856 | +::v-deep .el-form-item { | ||
| 857 | + margin-bottom: 16px; | ||
| 858 | +} | ||
| 859 | + | ||
| 860 | +.device-form .el-form-item__label::after { | ||
| 861 | + content: "*"; | ||
| 862 | + color: #1a1a1a; | ||
| 863 | + margin-left: 5px; | ||
| 864 | + font-size: 16px; | ||
| 865 | +} | ||
| 866 | + | ||
| 867 | +::v-deep .el-dialog__wrapper { | ||
| 868 | + .el-dialog__header { | ||
| 869 | + background-color: #fafafa; | ||
| 816 | } | 870 | } |
| 871 | +} | ||
| 872 | + | ||
| 873 | +::v-deep .el-input__inner:focus { | ||
| 874 | + border: #3f9b6a 1px solid; | ||
| 875 | +} | ||
| 876 | + | ||
| 877 | +.dialog-footer { | ||
| 878 | + display: flex; | ||
| 879 | + justify-content: flex-end; | ||
| 880 | + border-top: solid rgba(209, 209, 209, 0.2) 2px; | ||
| 881 | + padding-top: 20px; | ||
| 882 | +} | ||
| 883 | + | ||
| 884 | +::v-deep .el-input__inner:focus { | ||
| 885 | + border: #3f9b6a 1px solid; | ||
| 886 | +} | ||
| 887 | + | ||
| 888 | +::v-deep .el-input__inner:hover { | ||
| 889 | + border: #3f9b6a 1px solid; | ||
| 890 | +} | ||
| 891 | + | ||
| 892 | +::v-deep .el-select .el-input.is-focus .el-input__inner { | ||
| 893 | + border-color: #3f9b6a; | ||
| 894 | +} | ||
| 895 | + | ||
| 896 | +.el-select-dropdown__item.selected { | ||
| 897 | + color: #3f9b6a; | ||
| 898 | +} | ||
| 899 | + | ||
| 900 | +.el-pagination__sizes .el-input .el-input__inner:hover { | ||
| 901 | + border-color: #3f9b6a; | ||
| 902 | +} | ||
| 903 | + | ||
| 904 | +::v-deep .el-dialog__wrapper { | ||
| 905 | + .dialog_css { | ||
| 906 | + margin-right: 12px; | ||
| 907 | + margin-top: 61px !important; | ||
| 817 | 908 | ||
| 818 | - .el-row { | ||
| 819 | - margin-bottom: 20px; | ||
| 820 | - | ||
| 821 | - &:last-child { | ||
| 822 | - margin-bottom: 0; | 909 | + .el-dialog__title { |
| 910 | + font-size: 16px !important; | ||
| 911 | + font-weight: 600; | ||
| 912 | + color: #000; | ||
| 823 | } | 913 | } |
| 824 | } | 914 | } |
| 825 | 915 | ||
| 826 | - .el-col { | ||
| 827 | - border-radius: 4px; | ||
| 828 | - } | ||
| 829 | - | ||
| 830 | - .bg-purple-dark { | ||
| 831 | - background: #99a9bf; | ||
| 832 | - } | ||
| 833 | - | ||
| 834 | - .bg-purple { | ||
| 835 | - background: #d3dce6; | ||
| 836 | - } | ||
| 837 | - | ||
| 838 | - .bg-purple-light { | ||
| 839 | - background: #e5e9f2; | ||
| 840 | - } | ||
| 841 | - | ||
| 842 | - .grid-content { | ||
| 843 | - border-radius: 4px; | ||
| 844 | - min-height: 36px; | ||
| 845 | - } | ||
| 846 | - | ||
| 847 | - .row-bg { | ||
| 848 | - padding: 10px 0; | ||
| 849 | - background-color: #f9fafc; | ||
| 850 | - } | ||
| 851 | - | ||
| 852 | - /deep/ .bg-purple[data-v-0e3fe4ec] { | ||
| 853 | - background: #fff; | ||
| 854 | - height: 50px; | ||
| 855 | - } | ||
| 856 | - | ||
| 857 | - /deep/ .bg-purple[data-v-3bebae82] { | ||
| 858 | - background: #fff; | ||
| 859 | - height: 50px; | ||
| 860 | - } | ||
| 861 | - | ||
| 862 | - ::v-deep .bg-purple { | ||
| 863 | - background: #fff; | ||
| 864 | - height: 50px; | ||
| 865 | - } | ||
| 866 | - | ||
| 867 | - /deep/ .el-form--label-top .el-form-item__label { | ||
| 868 | - padding: 0; | 916 | + .diaslog_zhong { |
| 917 | + margin-left: 25%; | ||
| 918 | + margin-top: 61px !important; | ||
| 869 | } | 919 | } |
| 920 | +} | ||
| 870 | 921 | ||
| 871 | - ::v-deep .el-form-item { | ||
| 872 | - margin-bottom: 16px; | ||
| 873 | - } | 922 | +::v-deep .diaslog_zhong { |
| 923 | + margin-left: 20%; | ||
| 924 | + margin-top: 61px !important; | ||
| 874 | 925 | ||
| 875 | - .device-form .el-form-item__label::after { | ||
| 876 | - content: "*"; | ||
| 877 | - color: #1a1a1a; | ||
| 878 | - margin-left: 5px; | ||
| 879 | - font-size: 16px; | ||
| 880 | - } | 926 | + .el-dialog__header { |
| 927 | + background-color: #fff; | ||
| 928 | + border-bottom: 1px solid #efefef; | ||
| 881 | 929 | ||
| 882 | - ::v-deep .el-dialog__wrapper { | ||
| 883 | - .el-dialog__header { | ||
| 884 | - background-color: #fafafa; | 930 | + .el-dialog__title { |
| 931 | + font-size: 14px; | ||
| 932 | + color: #000000e6; | ||
| 885 | } | 933 | } |
| 886 | } | 934 | } |
| 887 | 935 | ||
| 888 | - ::v-deep .el-input__inner:focus { | ||
| 889 | - border: #3f9b6a 1px solid; | 936 | + .el-dialog__body { |
| 937 | + padding: 10px 30px 30px 20px; | ||
| 890 | } | 938 | } |
| 939 | +} | ||
| 891 | 940 | ||
| 892 | - .dialog-footer { | ||
| 893 | - display: flex; | ||
| 894 | - justify-content: flex-end; | ||
| 895 | - border-top: solid rgba(209, 209, 209, 0.2) 2px; | ||
| 896 | - padding-top: 20px; | ||
| 897 | - } | ||
| 898 | - | ||
| 899 | - ::v-deep .el-input__inner:focus { | ||
| 900 | - border: #3f9b6a 1px solid; | ||
| 901 | - } | 941 | +/deep/ .el-table_1_column_8 .hetong { |
| 942 | + color: #7dbb9a; | ||
| 943 | + text-decoration: underline; | ||
| 944 | +} | ||
| 902 | 945 | ||
| 903 | - ::v-deep .el-input__inner:hover { | ||
| 904 | - border: #3f9b6a 1px solid; | ||
| 905 | - } | 946 | +/deep/ .first-column-bg { |
| 947 | + background-color: #fafafa !important; | ||
| 948 | +} | ||
| 906 | 949 | ||
| 907 | - ::v-deep .el-select .el-input.is-focus .el-input__inner { | ||
| 908 | - border-color: #3f9b6a; | ||
| 909 | - } | ||
| 910 | - | ||
| 911 | - .el-select-dropdown__item.selected { | ||
| 912 | - color: #3f9b6a; | ||
| 913 | - } | 950 | +::v-deep .textarea { |
| 951 | + width: 85%; | ||
| 914 | 952 | ||
| 915 | - .el-pagination__sizes .el-input .el-input__inner:hover { | ||
| 916 | - border-color: #3f9b6a; | 953 | + .el-textarea__inner { |
| 954 | + width: 100%; | ||
| 917 | } | 955 | } |
| 956 | +} | ||
| 918 | 957 | ||
| 919 | - ::v-deep .el-dialog__wrapper { | ||
| 920 | - .dialog_css { | ||
| 921 | - margin-right: 12px; | ||
| 922 | - margin-top: 61px !important; | ||
| 923 | - | ||
| 924 | - .el-dialog__title { | ||
| 925 | - font-size: 16px !important; | ||
| 926 | - font-weight: 600; | ||
| 927 | - color: #000; | ||
| 928 | - } | ||
| 929 | - } | 958 | +::v-deep .pass_input { |
| 959 | + width: 100%; | ||
| 930 | 960 | ||
| 931 | - .diaslog_zhong { | ||
| 932 | - margin-left: 25%; | ||
| 933 | - margin-top: 61px !important; | ||
| 934 | - } | 961 | + .el-input__inner { |
| 962 | + border: none; | ||
| 963 | + padding: 0; | ||
| 935 | } | 964 | } |
| 965 | +} | ||
| 936 | 966 | ||
| 937 | - ::v-deep .diaslog_zhong { | ||
| 938 | - margin-left: 20%; | ||
| 939 | - margin-top: 61px !important; | ||
| 940 | - | ||
| 941 | - .el-dialog__header { | ||
| 942 | - background-color: #fff; | ||
| 943 | - border-bottom: 1px solid #efefef; | 967 | +::v-deep .pass_select { |
| 968 | + width: 100%; | ||
| 944 | 969 | ||
| 945 | - .el-dialog__title { | ||
| 946 | - font-size: 14px; | ||
| 947 | - color: #000000e6; | ||
| 948 | - } | ||
| 949 | - } | ||
| 950 | - | ||
| 951 | - .el-dialog__body { | ||
| 952 | - padding: 10px 30px 30px 20px; | ||
| 953 | - } | ||
| 954 | - } | ||
| 955 | - | ||
| 956 | - /deep/ .el-table_1_column_8 .hetong { | ||
| 957 | - color: #7dbb9a; | ||
| 958 | - text-decoration: underline; | ||
| 959 | - } | ||
| 960 | - | ||
| 961 | - /deep/ .first-column-bg { | ||
| 962 | - background-color: #fafafa !important; | 970 | + .el-input__inner { |
| 971 | + border: none; | ||
| 972 | + padding: 0; | ||
| 963 | } | 973 | } |
| 964 | 974 | ||
| 965 | - ::v-deep .textarea { | ||
| 966 | - width: 85%; | ||
| 967 | - | ||
| 968 | - .el-textarea__inner { | ||
| 969 | - width: 100%; | ||
| 970 | - } | 975 | + .el-icon-arrow-up:before { |
| 976 | + content: ""; | ||
| 971 | } | 977 | } |
| 972 | - | ||
| 973 | - ::v-deep .pass_input { | ||
| 974 | - width: 100%; | ||
| 975 | - | ||
| 976 | - .el-input__inner { | ||
| 977 | - border: none; | ||
| 978 | - padding: 0; | ||
| 979 | - } | 978 | +} |
| 979 | + | ||
| 980 | +/deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { | ||
| 981 | + background-color: #fff; | ||
| 982 | +} | ||
| 983 | +/deep/ .el-input-number__decrease,/deep/.el-input-number__increase{ | ||
| 984 | + height: 30px !important; | ||
| 985 | + line-height: 32px !important; | ||
| 986 | + margin-top: 3px; | ||
| 987 | +} | ||
| 988 | +</style> | ||
| 989 | +<style lang="scss" scoped> | ||
| 990 | +::v-deep .bian_css { | ||
| 991 | + .el-dialog__header { | ||
| 992 | + padding: 0px; | ||
| 980 | } | 993 | } |
| 981 | 994 | ||
| 982 | - ::v-deep .pass_select { | ||
| 983 | - width: 100%; | ||
| 984 | - | ||
| 985 | - .el-input__inner { | ||
| 986 | - border: none; | ||
| 987 | - padding: 0; | ||
| 988 | - } | ||
| 989 | - | ||
| 990 | - .el-icon-arrow-up:before { | ||
| 991 | - content: ""; | ||
| 992 | - } | 995 | + .el-input__inner { |
| 996 | + height: 18px; | ||
| 997 | + border: 0px; | ||
| 998 | + margin-top: 0px; | ||
| 993 | } | 999 | } |
| 994 | 1000 | ||
| 995 | - /deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { | ||
| 996 | - background-color: #fff; | 1001 | + .el-input__inner:hover { |
| 1002 | + border: 0px; | ||
| 997 | } | 1003 | } |
| 998 | -</style> | ||
| 999 | -<style lang="scss" scoped> | ||
| 1000 | - ::v-deep .bian_css { | ||
| 1001 | - .el-dialog__header { | ||
| 1002 | - padding: 0px; | ||
| 1003 | - } | ||
| 1004 | - | ||
| 1005 | - .el-input__inner { | ||
| 1006 | - height: 18px; | ||
| 1007 | - border: 0px; | ||
| 1008 | - margin-top: 0px; | ||
| 1009 | - } | ||
| 1010 | - | ||
| 1011 | - .el-input__inner:hover { | ||
| 1012 | - border: 0px; | ||
| 1013 | - } | ||
| 1014 | 1004 | ||
| 1015 | - .el-input__inner:focus { | ||
| 1016 | - border: 0px; | ||
| 1017 | - } | 1005 | + .el-input__inner:focus { |
| 1006 | + border: 0px; | ||
| 1018 | } | 1007 | } |
| 1019 | - | ||
| 1020 | - ::v-deep .buttonHover:hover { | ||
| 1021 | - color: #3f9b6a !important; | ||
| 1022 | - border-color: #c5e1d2 !important; | ||
| 1023 | - background-color: #ecf5f0 !important; | ||
| 1024 | - outline: none; | 1008 | +} |
| 1009 | + | ||
| 1010 | +::v-deep .buttonHover:hover { | ||
| 1011 | + color: #3f9b6a !important; | ||
| 1012 | + border-color: #c5e1d2 !important; | ||
| 1013 | + background-color: #ecf5f0 !important; | ||
| 1014 | + outline: none; | ||
| 1015 | +} | ||
| 1016 | + | ||
| 1017 | +::v-deep .el-pagination__total { | ||
| 1018 | + position: absolute; | ||
| 1019 | + left: 33px; | ||
| 1020 | +} | ||
| 1021 | + | ||
| 1022 | +::v-deep .diaslog_zhong { | ||
| 1023 | + .el-dialog__body { | ||
| 1024 | + padding: 10px 20px 20px 20px; | ||
| 1025 | } | 1025 | } |
| 1026 | 1026 | ||
| 1027 | - ::v-deep .el-pagination__total { | ||
| 1028 | - position: absolute; | ||
| 1029 | - left: 33px; | 1027 | + .el-upload--picture-card { |
| 1028 | + width: 130px; | ||
| 1029 | + height: 130px; | ||
| 1030 | } | 1030 | } |
| 1031 | +} | ||
| 1031 | 1032 | ||
| 1032 | - ::v-deep .diaslog_zhong { | ||
| 1033 | - .el-dialog__body { | ||
| 1034 | - padding: 10px 20px 20px 20px; | ||
| 1035 | - } | ||
| 1036 | - | ||
| 1037 | - .el-upload--picture-card { | ||
| 1038 | - width: 130px; | ||
| 1039 | - height: 130px; | ||
| 1040 | - } | ||
| 1041 | - } | ||
| 1042 | </style> | 1033 | </style> |
| 1043 | \ No newline at end of file | 1034 | \ No newline at end of file |
wenjuan/.DS_Store
0 → 100644
No preview for this file type