first commit
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="反馈评分" fixed placeholder safe-area-inset-top></van-nav-bar>
|
||||
<proposal-info :proposal_id="proposalId" title="反馈评分" :handle="handle" ref="info">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
反馈评分
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-cell-group class="info">
|
||||
<van-cell title="反馈时间" :value="formData.feedbackTime"></van-cell>
|
||||
|
||||
|
||||
<van-cell title="承办满意度"></van-cell>
|
||||
<van-radio-group v-model="formData.feedbackCode" direction="horizontal"
|
||||
style="font-size: 12px;padding: 10px 0 10px 16px;box-sizing: border-box;background: #FFFFFF;">
|
||||
<van-radio v-for="item in feedbackOptions" :name="item.code" shape="square"
|
||||
checked-color="#081776">
|
||||
{{item.name}}
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
|
||||
<van-field
|
||||
input-align="right"
|
||||
v-model="formData.feedbackOpinion"
|
||||
rows="2"
|
||||
autosize
|
||||
required
|
||||
label="反馈意见"
|
||||
type="textarea"
|
||||
maxlength="1000"
|
||||
placeholder="请输入反馈意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-field name="files" label="附  件" required>
|
||||
<template #input>
|
||||
<upload :files.sync="formData.files"></upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="24">
|
||||
<van-button :color="themeColor" block size="large" @click="doFeedback">提 交
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-form>
|
||||
</template>
|
||||
</proposal-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
handle: true,
|
||||
feedbackOptions: [],
|
||||
proposalId: GetQueryString('proposal_id'),
|
||||
formData: {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
feedbackTime: moment().format('YYYY-MM-DD'),
|
||||
feedbackCode: 'satisfied',
|
||||
proposalId: GetQueryString('proposal_id')
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'proposal-info': httpVueLoader('/components/proposal/wechat/ProposalInfo.vue?v=' + new Date().getTime()),
|
||||
'upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
|
||||
},
|
||||
methods: {
|
||||
async doFeedback() {
|
||||
if (this.formData.feedbackOpinion === '') {
|
||||
vant.Toast('请输入反馈意见');
|
||||
return
|
||||
}
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
|
||||
this.formData.replyUnitId = this.undertakeId
|
||||
const resp = await $.post("/platform/proposal/transact/feedback/doFeedback", {
|
||||
feedback: JSON.stringify(this.formData),
|
||||
sign: ""
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(async () => {
|
||||
loading.type = 'success'
|
||||
loading.message = '提交成功'
|
||||
loading.close()
|
||||
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 1300
|
||||
this.$refs.info.openView(this.proposalId)
|
||||
}, 1200)
|
||||
} else {
|
||||
loading.type = 'fail'
|
||||
loading.message = '提交失败,请联系管理员'
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
|
||||
const proposal_id = GetQueryString("proposal_id")
|
||||
if (proposal_id === '') {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '非法参数',
|
||||
showConfirmButton: false
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.feedbackOptions = await getDictByCode("proposal_feedback")
|
||||
this.handle = await mProposal.GetProposalStateCode(this.proposalId) === 1300
|
||||
// const lastIndex = window.location.href.lastIndexOf('&')
|
||||
// if (window.location.href.substr(lastIndex + 1, 6) === 'ticket') {
|
||||
// window.document.location.replace(window.location.href.substring(0, lastIndex))
|
||||
// }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user