Commit c182fe0f authored by xinzhedeai's avatar xinzhedeai

检查单修改

parent 7be58656
...@@ -9,12 +9,12 @@ axios.defaults.timeout = 50000 ...@@ -9,12 +9,12 @@ axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/json' axios.defaults.headers.post['Content-Type'] = 'application/json'
// axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token') // axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token')
// 商户token // 商户token
// axios.defaults.headers.common['Authorization'] = axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6IjNjMmRiMWFiLWIyZGMtNDBjYi04YjM5LWRiNTJmM2VmYzNkYyJ9.sfZyPP-COShNCjwxKR26zGDsPHXss97gu7JEpaMapIZyMQEsxzMigVickcqdhaqDwTRcfr0IxAj64vnrriS9Cw' 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6IjNjMmRiMWFiLWIyZGMtNDBjYi04YjM5LWRiNTJmM2VmYzNkYyJ9.sfZyPP-COShNCjwxKR26zGDsPHXss97gu7JEpaMapIZyMQEsxzMigVickcqdhaqDwTRcfr0IxAj64vnrriS9Cw'
// admin账号token // admin账号token
axios.defaults.headers.common['Authorization'] = // axios.defaults.headers.common['Authorization'] =
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ' // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ'
// 请求拦截器 // 请求拦截器
......
...@@ -2,19 +2,21 @@ ...@@ -2,19 +2,21 @@
* 请求拦截、相应拦截、错误统一处理 * 请求拦截、相应拦截、错误统一处理
*/ */
// 环境的切换 // 环境的切换
axios.defaults.baseURL = 'http://192.168.2.37:8080' // axios.defaults.baseURL = 'http://192.168.2.37:8080'
axios.defaults.baseURL = 'https://gqyjpt.weihai.cn/prod-api'
axios.defaults.timeout = 50000 axios.defaults.timeout = 50000
// post请求头 // post请求头
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.headers.post['Content-Type'] = 'application/json' axios.defaults.headers.post['Content-Type'] = 'application/json'
// axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token') axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token')
// 商户token // 商户token
// axios.defaults.headers.common['Authorization'] = // axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6IjNjMmRiMWFiLWIyZGMtNDBjYi04YjM5LWRiNTJmM2VmYzNkYyJ9.sfZyPP-COShNCjwxKR26zGDsPHXss97gu7JEpaMapIZyMQEsxzMigVickcqdhaqDwTRcfr0IxAj64vnrriS9Cw' // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6IjNjMmRiMWFiLWIyZGMtNDBjYi04YjM5LWRiNTJmM2VmYzNkYyJ9.sfZyPP-COShNCjwxKR26zGDsPHXss97gu7JEpaMapIZyMQEsxzMigVickcqdhaqDwTRcfr0IxAj64vnrriS9Cw'
// admin账号token // admin账号token
axios.defaults.headers.common['Authorization'] = // axios.defaults.headers.common['Authorization'] =
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ' // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ'
// 请求拦截器 // 请求拦截器
......
...@@ -174,6 +174,13 @@ ...@@ -174,6 +174,13 @@
background: #f5f6fa; background: #f5f6fa;
padding: 0.1rem 0.3rem; padding: 0.1rem 0.3rem;
} }
/* 图片预览大小 */
.expand-section .van-uploader__preview-image {
display: block;
width: 1.4rem;
height: 1.4rem;
overflow: hidden;
}
/* 子复选框组 */ /* 子复选框组 */
.sub-checkbox-group { .sub-checkbox-group {
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<van-cell v-if="item.itemType==2"> <van-cell v-if="item.itemType==2">
<div class="limit_date_wrapper"> <div class="limit_date_wrapper">
<span>住宿人数:</span> <span>住宿人数:</span>
<input type="text" v-model="item.gqCheckQuestionList[0].content" :disabled="flag!=='ADD'" <input type="text" v-model="item.gqCheckQuestionList[0].content" :disabled="flag!=='ADD'" maxlength="3"
style="width:.8rem;height:.4rem;text-align:center;" /> style="width:.8rem;height:.4rem;text-align:center;" />
</div> </div>
</van-cell> </van-cell>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<van-uploader style="width: 80px; height:80px;" v-model="item.photos" multiple <van-uploader style="width: 80px; height:80px;" v-model="item.photos" multiple
:max-count="4" :after-read="handleFileUpload" class="uploader-wrapper" /> :max-count="4" :after-read="handleFileUpload" class="uploader-wrapper" />
</div> --> </div> -->
<van-uploader v-model="item.photos" multiple :max-count="2" /> <van-uploader v-model="item.photos" multiple :max-count="4" />
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
...@@ -188,9 +188,9 @@ ...@@ -188,9 +188,9 @@
<van-button type="info" size="small" @click="add4JC_XQ" <van-button type="info" size="small" @click="add4JC_XQ"
v-show="checkPageIndex===3&&flag=='ADD'">完成检查</van-button> v-show="checkPageIndex===3&&flag=='ADD'">完成检查</van-button>
<van-button v-show="checkPageIndex<3" type="info" size="small" <van-button v-show="checkPageIndex<3" type="info" size="small"
@click="checkPageIndex++">下一项</van-button> @click="validRequired">下一项</van-button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -100,6 +100,27 @@ window.onload = function() { ...@@ -100,6 +100,27 @@ window.onload = function() {
} }
}, },
methods: { methods: {
validRequired(){
// const currentPageData = this.checkData[this.checkPageIndex];
// const errorRows = currentPageData.gqCheckItemList.filter((item)=>{
// console.log(item)
// if(item.itemAnswer === 2){
// return !item.description || !item.photos.length || !item.deadlineDays
// }
// return false
// })
// console.log('errorRows.length', errorRows.length)
// if(errorRows.length){
// vant.Dialog.alert({
// title: '信息提示',
// message: '请填写完整信息,必填项不可为空',
// })
// return
// }
this.checkPageIndex++;
},
getOriginMatchedItemById(id) { getOriginMatchedItemById(id) {
const result = this.originCheckData[this.checkPageIndex]['gqCheckItemList'].find(item => const result = this.originCheckData[this.checkPageIndex]['gqCheckItemList'].find(item =>
item.id === id) || [] item.id === id) || []
...@@ -113,7 +134,7 @@ window.onload = function() { ...@@ -113,7 +134,7 @@ window.onload = function() {
newItem.itemAnswer = val newItem.itemAnswer = val
// console.log(this.checkData[this.checkPageIndex]['gqCheckItemList']) // console.log(this.checkData[this.checkPageIndex]['gqCheckItemList'])
this.$set(this.checkData[this.checkPageIndex]['gqCheckItemList'], index, JSON.parse(JSON this.$set(this.checkData[this.checkPageIndex]['gqCheckItemList'], index, JSON.parse(JSON
.stringify())); .stringify(newItem)));
console.log(val, this.checkData[this.checkPageIndex]['gqCheckItemList'][index], '数据改变了后', console.log(val, this.checkData[this.checkPageIndex]['gqCheckItemList'][index], '数据改变了后',
index) index)
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment