Commit ce73501e by 钟乾明

u: 云之家request参数需要编码

parent eaa89736
<template>
<div id="app" class="full">
<div id="app"
class="full">
<transition>
<keep-alive :include="includedComponents">
<router-view></router-view>
......@@ -34,7 +35,10 @@ export default {
setToken()
this.updateFid(testFid)
this.updateCurrentPageType(5)
await this.fetchInspect({billId: Coder.replace(testFid), isGradeNode: false}) // 29 30评分节点放开
await this.fetchInspect({
billId: Coder.replace(testFid),
isGradeNode: false
}) // 29 30评分节点放开
this.updateReadyState(true)
}, 1000)
}
......@@ -52,7 +56,7 @@ export default {
this.cacheRouterNames.push(to.name)
} else {
// 返回上个页面
if (this.cacheRouterNames[this.cacheRouterNames.length - 1] === from.name) {
if (this.cacheRouterNames[ this.cacheRouterNames.length - 1 ] === from.name) {
this.cacheRouterNames.pop()
}
}
......@@ -68,7 +72,10 @@ export default {
}
},
computed: {
...mapState(['loading', 'PageTypes']),
...mapState([
'loading',
'PageTypes'
]),
includedComponents () {
return this.cacheRouterNames.join(',')
},
......@@ -154,7 +161,10 @@ export default {
switch (params.page) {
case 'review_grade':
// 评分节点
await this.fetchInspect({billId: encodeURIComponent(Coder.replace(params.billId)), isGradeNode: true})
await this.fetchInspect({
billId: (Coder.encode(params.billId)),
isGradeNode: true
})
if (this.isGCSupplierType) {
if (recType == 3) {
type = this.PageTypes.Grade_Done
......
......@@ -129,7 +129,7 @@ export default {
fetchData () {
this.$store.commit('showLoading', true)
if (!this.isGradeNode) {
this.fetchInspect({billId: Coder.replace(this.currentFid), isGradeNode: this.isGradeNode})
this.fetchInspect({billId: Coder.encode(this.currentFid), isGradeNode: this.isGradeNode})
.then(() => this.$store.commit('showLoading', false))
.catch(() => this.$store.commit('showLoading', false))
} else {
......
......@@ -52,7 +52,7 @@ export default {
mounted () {
this.init()
this.$store.commit('showLoading', true)
this.fetchReviewSummaryInfo({billId: Coder.replace(this.currentSupplierInfo.id)})
this.fetchReviewSummaryInfo({billId: Coder.encode(this.currentSupplierInfo.id)})
.then(() => this.$store.commit('showLoading', false))
.catch(() => this.$store.commit('showLoading', false))
},
......
......@@ -116,8 +116,8 @@ export default {
},
mounted () {
let fid = this.isGradeNode ? this.reviewGrpId : this.currentFid
this.fetchAttachmentList({ billId: Coder.replace(fid) })
this.fetchGetHisAttachmentList({ billId: Coder.replace(fid) })
this.fetchAttachmentList({ billId: Coder.encode(fid) })
this.fetchGetHisAttachmentList({ billId: Coder.encode(fid) })
},
data () {
return {
......
......@@ -297,7 +297,7 @@ export default {
]),
fetchData () {
this.$store.commit('showLoading', true)
this.fetchAdjustGradeInfo({billId: Coder.replace(this.currentFid)})
this.fetchAdjustGradeInfo({billId: Coder.encode(this.currentFid)})
.then(() => this.$store.commit('showLoading', false))
.catch(() => this.$store.commit('showLoading', false))
},
......
......@@ -102,7 +102,7 @@ export default {
mixins: [reviewSummaryMixin],
mounted () {
this.$store.commit('showLoading', true)
this.fetchReviewSummaryInfo({billId: Coder.replace(this.currentSupplierInfo.id)})
this.fetchReviewSummaryInfo({billId: Coder.encode(this.currentSupplierInfo.id)})
.then(() => {
this.conditionOption = this.reviewSummaryInfo.useCondition
this.productGradeId = this.reviewSummaryInfo.productGrade
......
......@@ -120,7 +120,7 @@ export default {
}
},
mounted () {
this.fetchScores({billId: Coder.replace(this.memberGradeInfo.id)})
this.fetchScores({billId: Coder.encode(this.memberGradeInfo.id)})
},
activated () {
if (!this.showProjectScore_showBusinessScore) {
......
......@@ -273,7 +273,7 @@ export default {
]),
fetchData () {
this.$store.commit('showLoading', true)
this.fetchpauseresumeInfo({billId: Coder.replace(this.currentFid)})
this.fetchpauseresumeInfo({billId: Coder.encode(this.currentFid)})
.then(() => this.$store.commit('showLoading', false))
.catch(() => this.$store.commit('showLoading', false))
},
......
......@@ -94,7 +94,7 @@
]),
fetchData () {
this.$store.commit('showLoading', true)
this.fetchEvaluateDistributInfo({billId: Coder.replace(this.currentFid)})
this.fetchEvaluateDistributInfo({billId: Coder.encode(this.currentFid)})
.then(() => {
this.checkInitData()
this.$store.commit('showLoading', false)
......
......@@ -208,7 +208,7 @@ export default {
'fetchAdjustProjectInfo'
]),
fetchData () {
this.fetchAdjustProjectInfo({billId: Coder.replace(this.currentFid)})
this.fetchAdjustProjectInfo({billId: Coder.encode(this.currentFid)})
},
init () {
switch (this.currentPageType) {
......
......@@ -169,7 +169,7 @@ export default {
]),
fetchData () {
this.$store.commit('showLoading', true)
this.fetchAdjustRegionInfo({billId: Coder.replace(this.currentFid)})
this.fetchAdjustRegionInfo({billId: Coder.encode(this.currentFid)})
.then(() => this.$store.commit('showLoading', false))
.catch(() => this.$store.commit('showLoading', false))
},
......
......@@ -242,7 +242,7 @@ export default {
]),
fetchData () {
this.$store.commit('showLoading', true)
this.fetchAdjustSupplierInfo({billId: Coder.replace(this.currentFid)})
this.fetchAdjustSupplierInfo({billId: Coder.encode(this.currentFid)})
.then(() => this.$store.commit('showLoading', false))
.catch(() => this.$store.commit('showLoading', false))
},
......
......@@ -72,7 +72,7 @@ function request (opt) {
var val = urlParams[key]
if (isObject(val)) {
val = JSON.stringify(val)
val = decodeURIComponent(val)//有对象参数的先解码
val = decodeURIComponent(val)// 有对象参数的先解码
val = encodeURIComponent(val)
} else if (/[^\x00-\xff]/.test(val)) {
val = encodeURIComponent(val)
......@@ -115,6 +115,7 @@ function request (opt) {
if (type !== 'string') {
val = val + ''
}
// 因content-type可能存在大小写不规范,这里先过滤掉,后面根据serializer统一添加
var _key = key.toLowerCase()
if (_key !== 'content-type') {
......@@ -142,6 +143,7 @@ function request (opt) {
headers: resp.header,
config: opt
}
var validateStatus = response.config.validateStatus
// Note: status is not exposed by XDomainRequest
if (
......
......@@ -42,7 +42,7 @@ export default {
// }
// request(i);
for (let i = 0; i < evaluateFormIdArr.length; i++) {
let res = await getEvaluateForm({billId: Coder.replace(evaluateFormIdArr[i].evaluateItemId)})
let res = await getEvaluateForm({billId: Coder.encode(evaluateFormIdArr[i].evaluateItemId)})
if (res.code === 200 && typeof res.data !== 'string') {
evaluateFromItem.push(res.data)
}
......
......@@ -143,10 +143,10 @@ export default {
}
let arr = []
arr.push(getReviewGrpList({billId: Coder.replace(reviewGrpId), entryName: 'PersonEntry'}))
arr.push(getReviewGrpList({billId: Coder.replace(reviewGrpId), entryName: 'ProjectEntry'}))
arr.push(getReviewGrpList({billId: Coder.replace(reviewGrpId), entryName: 'SupplierEntry'}))
arr.push(getAttachmentList({billId: Coder.replace(reviewGrpId)}))
arr.push(getReviewGrpList({billId: (Coder.encode(reviewGrpId)), entryName: 'PersonEntry'}))
arr.push(getReviewGrpList({billId: (Coder.encode(reviewGrpId)), entryName: 'ProjectEntry'}))
arr.push(getReviewGrpList({billId: (Coder.encode(reviewGrpId)), entryName: 'SupplierEntry'}))
arr.push(getAttachmentList({billId: (Coder.encode(reviewGrpId))}))
Promise.all(arr)
.then(resultArr => {
// 考察组成员
......@@ -175,7 +175,7 @@ export default {
if (isGradeNode) {
let arr = []
response.data.rows.forEach(v => {
arr.push(getReviewFormInfo({billId: encodeURIComponent(Coder.replace(v.id))}))
arr.push(getReviewFormInfo({billId: (Coder.encode(v.id))}))
})
Promise.all(arr)
.then(resultArr => {
......@@ -194,7 +194,7 @@ export default {
} else {
let arr = []
response.data.rows.forEach(v => {
arr.push(getReviewSummaryInfo({billId: encodeURIComponent(Coder.replace(v.id))}))
arr.push(getReviewSummaryInfo({billId: (Coder.encode(v.id))}))
})
Promise.all(arr)
.then(resultArr => {
......@@ -470,7 +470,7 @@ export default {
if (response.code === 200) {
if (response.data.error === 0) {
Toast.success(response.data.msg)
const result = await getAttachmentList({ billId: Coder.replace(state.AttachmentInfo.billId) })
const result = await getAttachmentList({ billId: (Coder.encode(state.AttachmentInfo.billId)) })
if (result !== 40650) {
commit('updateInspectAttachmentInfo', result)
} else {
......@@ -488,8 +488,8 @@ export default {
const response = await attachmentCancel(payload)
if (response.code === 200) {
Toast.success('作废成功')
const hisresult = await getGetHisAttachmentList({ billId: Coder.replace(state.AttachmentInfo.billId) })
const result = await getAttachmentList({ billId: Coder.replace(state.AttachmentInfo.billId) })
const hisresult = await getGetHisAttachmentList({ billId: (Coder.encode(state.AttachmentInfo.billId)) })
const result = await getAttachmentList({ billId: (Coder.encode(state.AttachmentInfo.billId)) })
if (hisresult !== 40650) {
commit('updateInspectHisAttachmentInfo', hisresult)
} else {
......
......@@ -44,7 +44,7 @@ export default {
if (state.pauseresumeInfo) {
// 原供方等级列表
commit('showLoading', true, { root: true })
let response = await getpauseresumeGradeList({billId: Coder.replace(state.pauseresumeInfo.supplier), entryName: 'SupplierRankEntry'})
let response = await getpauseresumeGradeList({billId: (Coder.encode(state.pauseresumeInfo.supplier)), entryName: 'SupplierRankEntry'})
commit('showLoading', false, { root: true })
if (response.code === 200) {
commit('updateOldpauseresumeList', (response.data && response.data.rows) || [])
......
......@@ -42,7 +42,7 @@ export default {
if (state.adjustProjectInfo) {
// 原供方等级列表
commit('showLoading', true, { root: true })
let response = await getAdjustProjectOldRegion({billId: Coder.replace(state.adjustProjectInfo.supplier), entryName: 'SupplierRankEntry'})
let response = await getAdjustProjectOldRegion({billId: (Coder.encode(state.adjustProjectInfo.supplier)), entryName: 'SupplierRankEntry'})
commit('showLoading', false, { root: true })
if (response.code === 200) {
commit('updateOldGradeList', (response.data && response.data.rows) || [])
......
......@@ -42,7 +42,7 @@ export default {
if (state.adjustSupplierInfo) {
// 原供方等级列表
commit('showLoading', true, { root: true })
let response = await getAdjustSupplierGradeList({billId: Coder.replace(state.adjustSupplierInfo.supplier), entryName: 'SupplierRankEntry'})
let response = await getAdjustSupplierGradeList({billId: (Coder.encode(state.adjustSupplierInfo.supplier)), entryName: 'SupplierRankEntry'})
commit('showLoading', false, { root: true })
if (response.code === 200) {
commit('updateOldSupplierList', (response.data && response.data.rows) || [])
......
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 sign in to comment