diff --git a/.DS_Store b/.DS_Store index f307a0f..49d1a25 100644 --- a/.DS_Store +++ b/.DS_Store diff --git a/wenjuan-h5/config/api.js b/wenjuan-h5/config/api.js index 1bd08c4..22286ac 100644 --- a/wenjuan-h5/config/api.js +++ b/wenjuan-h5/config/api.js @@ -6,14 +6,14 @@ -// const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/meserver/admin-server' -// const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/meserver/api' +const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/meserver/admin-server' +const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/meserver/api' // const DOMAIN_PREFIXPING = 'http://172.16.61.123:80/cdwlMall/admin-server' // const DOMAIN_PREFIX = 'http://172.16.61.123:80/cdwlMall/api' -const host = `${window.location.protocol}//${window.location.host}` -const DOMAIN_PREFIXPING = `${host}/cdwlMall/admin-server` -const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` +// const host = `${window.location.protocol}//${window.location.host}` +// const DOMAIN_PREFIXPING = `${host}/cdwlMall/admin-server` +// const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` // const DOMAIN_PREFIXPING = `http://192.168.2.152:9003` // const DOMAIN_PREFIX = 'http://192.168.2.152:9007' @@ -42,9 +42,9 @@ const TERMINAL = 1 module.exports = { //问卷查询接口 - wenjuanList: WX_API_BASEPING + '/cereQuestionnaireTable/queryById', - //问卷提交接口 - wenjuanUp: WX_API_BASE + '/cereQuestionnaireAnswering/add', + wenjuanList: WX_API_BASEPING + '/cereQuestionnaireTable/queryById', + //问卷提交接口 + wenjuanUp: WX_API_BASE + '/cereQuestionnaireAnswering/add', //问卷解析token - jietoken: WX_API_BASE + '/cereQuestionnaireAnswering/get/token', + jietoken: WX_API_BASE + '/cereQuestionnaireAnswering/get/token', } diff --git a/wenjuan-h5/pages_category_page1/question/question copy.vue b/wenjuan-h5/pages_category_page1/question/question copy.vue new file mode 100644 index 0000000..70c32e6 --- /dev/null +++ b/wenjuan-h5/pages_category_page1/question/question copy.vue @@ -0,0 +1,999 @@ + + + + + \ No newline at end of file diff --git a/wenjuan-h5/pages_category_page1/question/question.vue b/wenjuan-h5/pages_category_page1/question/question.vue index 3733494..3ac7862 100644 --- a/wenjuan-h5/pages_category_page1/question/question.vue +++ b/wenjuan-h5/pages_category_page1/question/question.vue @@ -6,11 +6,11 @@

- {{wenjuan.title}} + {{ wenjuan.title }}

-
@@ -32,15 +32,15 @@ - +

- *{{index}}.({{item.type}}) - {{item.title}} + *{{ index }}.({{ item.type }}) + {{ item.title }}

- + - - + + - {{val.answer}} + {{ val.answer }} - +
-

- {{val.answer}} + :class="['myOption gary', { optionActive: myChoose.answer == val.answer }]" :key="idx" + @click="chooseAnswerOne(item.options, val, idx)"> +

+ {{ val.answer }}
- - - + + + {{val.answer}} + @click="chooseAnswer(val)">{{ val.answer }} - +
-

- {{val.answer}} + :class="['myOption gary', { optionActive: val.disabled == true }]" :key="index" + @click="chooseAnswerMore(val, index)"> +

+ {{ val.answer }}
@@ -99,7 +101,7 @@ --> - + @@ -111,27 +113,27 @@ --> - - - - {{item.name}} + {{ item.name }} - + 意见 @@ -174,7 +176,7 @@ phone: '', sexl: '', opinion: '', - socialSecurityCardNumber:'' + socialSecurityCardNumber: '' }, wenjuan: { @@ -219,9 +221,9 @@ token: '', myChoose: {}, myChooseItem: [ - + ], - panduan:false + panduan: false }; }, computed: { @@ -240,7 +242,7 @@ } NET.request(API.jietoken, obj, 'get').then(res => { if (typeof res.data == 'string') { - + if (JSON.parse(res.data).phone) { this.model1.phone = Number(JSON.parse(res.data).phone) } @@ -251,7 +253,7 @@ this.model1.sexl = JSON.parse(res.data).aac004 this.panduan = true } - if (JSON.parse(res.data).aac002Mask) { + if (JSON.parse(res.data).aac002Mask) { this.model1.socialSecurityCardNumber = JSON.parse(res.data).aac002Mask } } @@ -272,7 +274,13 @@ if (res.data.id) { this.wenjuan = res.data this.wenjuan.question = JSON.parse(res.data.question) - + //检查this.wenjuan.question这个list的每个里面是否有maxChoose参数,没有的话就加一个 + this.wenjuan.question.forEach(item => { + if (!item.maxChoose) { + item.maxChoose = 0 + } + }) + this.timeLeft = parseInt(this.wenjuan.estimatedTime, 10) * 60; // 将分钟转换为秒 this.updateCountdownDisplay() @@ -368,7 +376,7 @@ if (question.required === '必填') { if (question.type === '文本' || question.type === '单选') { if (question.choose === '') { - + this.$refs.uToast.show({ title: '请填写所有必填题目', }) @@ -384,7 +392,7 @@ this.$refs.uToast.show({ title: '请填写所有必填题目', }) - + return false; // 返回false表示有未填写的必填题目 } } @@ -393,15 +401,11 @@ return true; // 返回true表示所有必填题目都已填写 }, submit() { - let putTime = this.getCurrentTimestamp() - this.pageTime putTime = (putTime / 1000).toFixed(2) - if (!this.checkRequiredQuestions(this.wenjuan.question)) { return } - - if (this.model1.name == '' && this.wenjuan.needName == '必填') { this.$refs.uToast.show({ title: '请输入姓名', @@ -429,7 +433,7 @@ // if(this.wenjuan.needPhone =='不填' && this.wenjuan.fillingConditions == '可重复填写'){ // this.model1.phone = '' // } - + if (this.model1.sexl != '男' && this.model1.sexl != '女' && this.wenjuan.needGender == '必填') { this.$refs.uToast.show({ title: '请选择性别', @@ -656,7 +660,7 @@ gender: this.model1.sexl, responseTime: putTime, answerOptions: JSON.stringify(result), - socialSecurityCardNumber:this.model1.socialSecurityCardNumber, + socialSecurityCardNumber: this.model1.socialSecurityCardNumber, createTime: this.currentTime(), opinion: this.model1.opinion, questionnaireScore: totalScore, @@ -719,47 +723,47 @@ // this.$forceUpdate(); }, chooseAnswerOne(options, chooseItem, idx) { - + options.forEach(item => { item.disabled = false }) - + for (let key in this.wenjuan.question) { - this.wenjuan.question[key].options.map(res=>{ - if (res.answer == chooseItem.answer) { - this.wenjuan.question[key].choose = chooseItem.answer - } - }) - - + this.wenjuan.question[key].options.map(res => { + if (res.answer == chooseItem.answer) { + this.wenjuan.question[key].choose = chooseItem.answer + } + }) + + } - + this.myChoose = { ...chooseItem } chooseItem.disabled = true }, chooseAnswerMore(chooseItem, idx) { - - if(chooseItem.disabled){ - chooseItem.disabled=false - for (let key in this.wenjuan.question) { - this.wenjuan.question[key].options.map(res=>{ - if (res.answer == chooseItem.answer) { - this.wenjuan.question[key].choose = '' - } - }) - } - }else{ - for (let key in this.wenjuan.question) { - this.wenjuan.question[key].options.map(res=>{ - if (res.answer == chooseItem.answer) { - this.wenjuan.question[key].choose = chooseItem.answer - } - }) - } - chooseItem.disabled=true - } + + if (chooseItem.disabled) { + chooseItem.disabled = false + for (let key in this.wenjuan.question) { + this.wenjuan.question[key].options.map(res => { + if (res.answer == chooseItem.answer) { + this.wenjuan.question[key].choose = '' + } + }) + } + } else { + for (let key in this.wenjuan.question) { + this.wenjuan.question[key].options.map(res => { + if (res.answer == chooseItem.answer) { + this.wenjuan.question[key].choose = chooseItem.answer + } + }) + } + chooseItem.disabled = true + } } @@ -794,7 +798,7 @@ width: 100%; max-width: 600px; flex-grow: 1; - margin:auto; + margin: auto; /* padding: 30px; */ background-color: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); @@ -834,13 +838,15 @@ transition: background-color 0.3s ease; margin-right: 10px; font-size: 15px; - font-weight:500; - .u-radio__label{ - color: #000000 ; + font-weight: 500; + + .u-radio__label { + color: #000000; font-size: 15px; - font-weight:500; + font-weight: 500; } } + .myOption { margin: 0; cursor: pointer; @@ -857,7 +863,8 @@ letter-spacing: 1px; overflow: hidden; position: relative; - .chooseTag{ + + .chooseTag { position: absolute; top: 0; right: 0; @@ -868,23 +875,26 @@ display: flex; align-items: center; justify-content: center; - .u-icon__icon{ + + .u-icon__icon { margin-left: 4px; margin-bottom: 2px; } } } + .green { background-color: #cff4de; - .u-radio__label{ - color: #12ad55 ; + + .u-radio__label { + color: #12ad55; } } .gary { background-color: #f5f5f5; - + } .optionActive { diff --git a/wenjuan-pc/.env.development b/wenjuan-pc/.env.development index 1465f9b..11e1d0a 100644 --- a/wenjuan-pc/.env.development +++ b/wenjuan-pc/.env.development @@ -5,12 +5,14 @@ ENV = 'development' VUE_APP_BASE_API = '/dev-api' # VUE_APP_DOMAIN_PREFIX_1='http://192.168.2.120:9003' # VUE_APP_DOMAIN_PREFIX_2='http://192.168.2.120:9007' - VUE_APP_DOMAIN_PREFIX_1='https://h5.028wlkj.com/cdwlMall/admin-server/' - VUE_APP_DOMAIN_PREFIX_2='https://h5.028wlkj.com/cdwlMall/meserver/api' +# VUE_APP_DOMAIN_PREFIX_1='https://h5.028wlkj.com/cdwlMall/admin-server/' +# VUE_APP_DOMAIN_PREFIX_2='https://h5.028wlkj.com/cdwlMall/meserver/api' # VUE_APP_DOMAIN_PREFIX_1='http://172.16.61.48/meserver/admin-server/' # VUE_APP_DOMAIN_PREFIX_2='http://172.16.61.48/meserver/api' #VUE_APP_DOMAIN_PREFIX_1='http://172.16.61.123:80/cdwlMall/admin-server/' #VUE_APP_DOMAIN_PREFIX_2='http://172.16.61.123:80/cdwlMall/api' +VUE_APP_DOMAIN_PREFIX_1='https://jy.scjysm.asia:18086/meserver/admin-server' +VUE_APP_DOMAIN_PREFIX_2='https://jy.scjysm.asia:18086/cdwlMall/meserver/api' # 开发环境 # 演示环境 # VUE_APP_DOMAIN_PREFIX = '/api' diff --git a/wenjuan-pc/src/utils/request.js b/wenjuan-pc/src/utils/request.js index 9caf459..efa79e2 100644 --- a/wenjuan-pc/src/utils/request.js +++ b/wenjuan-pc/src/utils/request.js @@ -53,7 +53,7 @@ service.interceptors.response.use( if (response.config.responseType === 'blob') { return response.data } - if (res.code !== '' && res.code !== 200) { + if (res.code !== '' && res.code !== 200&& res.code !== "200") { Message({ message: res.message || 'Error', type: 'error', diff --git a/wenjuan-pc/src/views/investigation/index.vue b/wenjuan-pc/src/views/investigation/index.vue index 69fc760..6688ca7 100644 --- a/wenjuan-pc/src/views/investigation/index.vue +++ b/wenjuan-pc/src/views/investigation/index.vue @@ -3,8 +3,7 @@
问卷调查 > 问卷管理
+ style="color:#000000e6">问卷管理
@@ -35,33 +34,25 @@
查询 - 重置 + 重置
- 新增 + 新增
- +
{{ total }}
- +
- + @@ -250,23 +191,13 @@
- 返回 + 返回
- +
答卷详情
@@ -276,16 +207,16 @@
提交人:{{ daxiangData.userName }}
手机号:{{ daxiangData.contactNumber }}
-
作答时长:{{ secondsToMinutesAndSeconds(daxiangData.responseTime) }}
+
作答时长:{{ + secondsToMinutesAndSeconds(daxiangData.responseTime) }}
提交时间:{{ daxiangData.createTime }}
-
填写条件:{{ secondData.fillingConditions }} +
填写条件:{{ secondData.fillingConditions + }} +
+
问卷分数:{{ daxiangData.questionnaireScore + }}
-
问卷分数:{{ daxiangData.questionnaireScore }}
用户意见:{{ daxiangData.opinion }}
@@ -293,38 +224,26 @@
答卷详情
-
-

*{{ index }}.({{ item.type }}) +

+

*{{ index + }}.({{ item.type }}) {{ item.title }}

- + {{ val.answer }} - + {{ val.answer }} -
+
{{ item.choose }}
@@ -339,20 +258,14 @@
- +
详情页
基本信息
- +