|
|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <uv-popup ref="popup_ref" mode="bottom" custom-style="min-height: 800rpx;padding:15rpx;" round="10">
|
|
|
+ <uv-popup ref="popup_ref" mode="bottom" custom-style="min-height: 800rpx;padding:15rpx;overflow-y:scroll;" round="10" closeable safeAreaInsetTop
|
|
|
+ @close="close">
|
|
|
<view class="w100 flex-center">纠错上报</view>
|
|
|
<uv-form
|
|
|
labelPosition="top"
|
|
|
@@ -10,7 +11,6 @@
|
|
|
ref="feedback_form_ref">
|
|
|
|
|
|
|
|
|
-
|
|
|
<uv-form-item label="概要描述" prop="title">
|
|
|
<uv-input required="true" type="text" :readonly="state.mode==='detail'" v-model="state.ruleForm.title" placeholder="请填写概要描述" clearable count
|
|
|
maxlength="100">
|
|
|
@@ -24,7 +24,7 @@
|
|
|
</template>
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="详细描述" prop="content">
|
|
|
- <uv-textarea required="true" height="120" :disabled="state.mode==='detail'" v-model="state.ruleForm.content" placeholder="请填写详细描述信息" count
|
|
|
+ <uv-textarea autoHeight required="true" height="50" :disabled="state.mode==='detail'" v-model="state.ruleForm.content" placeholder="请填写详细描述信息" count
|
|
|
maxlength="300">
|
|
|
</uv-textarea>
|
|
|
</uv-form-item>
|
|
|
@@ -41,20 +41,20 @@
|
|
|
></uv-upload>
|
|
|
</uv-form-item>
|
|
|
<uv-form-item label="平台答复" prop="content" v-if="state.mode==='detail'">
|
|
|
- <uv-textarea readonly height="120" v-model="state.ruleForm.replyContent" placeholder="请等待平台回复" >
|
|
|
+ <uv-textarea readonly height="50" v-model="state.ruleForm.replyContent" placeholder="请等待平台回复">
|
|
|
</uv-textarea>
|
|
|
</uv-form-item>
|
|
|
|
|
|
<uv-form-item label="答复时间" prop="content" v-if="state.mode==='detail'">
|
|
|
- <uv-text>{{ fmtDateTime(state.ruleForm.replyTime)}}</uv-text>
|
|
|
+ <uv-text>{{ fmtDateTime(state.ruleForm.replyTime) }}</uv-text>
|
|
|
</uv-form-item>
|
|
|
|
|
|
</uv-form>
|
|
|
|
|
|
- <view class="w100 flex-inline flex-justify-center">
|
|
|
- <uv-button type="info" size="mini" @click="close" hairline> 取 消</uv-button>
|
|
|
- <uv-button type="primary" size="mini" @click="handleSubmit" hairline class="ml10" customStyle="{'width':'120px','margin-left':'10px'}" v-if="state.mode==='add'">
|
|
|
- 提 交</uv-button>
|
|
|
+ <view class="w100 text-right">
|
|
|
+ <!-- <uv-text type="info" @click="close" :customStyle="{'width':'120px','margin-left':'10px'}"> 取 消</uv-text>-->
|
|
|
+ <viewt class="text-right_btn" @click="handleSubmit" v-if="state.mode==='add'" text="提 交">提交
|
|
|
+ </viewt>
|
|
|
</view>
|
|
|
</uv-popup>
|
|
|
|
|
|
@@ -76,7 +76,7 @@ const feedback_form_ref = ref()
|
|
|
const type_select_ref = ref()
|
|
|
|
|
|
const initState = () => ({
|
|
|
- attachList:[] as any[],
|
|
|
+ attachList: [] as any[],
|
|
|
ruleForm: {
|
|
|
title: '',
|
|
|
content: '',
|
|
|
@@ -94,10 +94,10 @@ const initState = () => ({
|
|
|
},
|
|
|
},
|
|
|
feedbackTypeList: [] as any[],
|
|
|
- mode:'add'
|
|
|
+ mode: 'add'
|
|
|
})
|
|
|
|
|
|
-const emit =defineEmits(['refresh'])
|
|
|
+const emit = defineEmits(['refresh'])
|
|
|
const state = reactive(initState())
|
|
|
|
|
|
onHide(() => {
|
|
|
@@ -112,16 +112,16 @@ const handleSubmit = () => {
|
|
|
title: '校验通过'
|
|
|
})
|
|
|
|
|
|
- state.ruleForm.attachList =JSON.stringify(state.attachList)
|
|
|
+ state.ruleForm.attachList = JSON.stringify(state.attachList)
|
|
|
body(`/feedback/add`, state.ruleForm).then(() => {
|
|
|
uni.showToast({
|
|
|
icon: 'success',
|
|
|
title: '提交成功,感谢您的反馈'
|
|
|
})
|
|
|
emit('refresh')
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
close();
|
|
|
- },1000)
|
|
|
+ }, 1000)
|
|
|
})
|
|
|
}).catch((errors: any) => {
|
|
|
uni.showToast({
|
|
|
@@ -134,7 +134,7 @@ const handleSubmit = () => {
|
|
|
|
|
|
const handleUpload = (event: any) => {
|
|
|
let file = event.file[0];
|
|
|
- upload(`/file/upload`,file).then((res: any) => {
|
|
|
+ upload(`/file/upload`, file).then((res: any) => {
|
|
|
console.log(res)
|
|
|
state.attachList.push({
|
|
|
name: res.data.name,
|
|
|
@@ -151,12 +151,12 @@ const handleDelete = (event: any) => {
|
|
|
const loadDict = () => {
|
|
|
body(`/dict/list`, {code: 'Feedback.type'}).then((res: any) => {
|
|
|
state.feedbackTypeList = res;
|
|
|
- state.ruleForm.typeName = state.feedbackTypeList.find(k=>k.value==state.ruleForm?.type)?.name
|
|
|
+ state.ruleForm.typeName = state.feedbackTypeList.find(k => k.value == state.ruleForm?.type)?.name
|
|
|
})
|
|
|
}
|
|
|
|
|
|
const handleShowAction = () => {
|
|
|
- if(state.mode==='detail'){
|
|
|
+ if (state.mode === 'detail') {
|
|
|
return;
|
|
|
}
|
|
|
type_select_ref.value?.open();
|
|
|
@@ -175,15 +175,15 @@ const close = () => {
|
|
|
popup_ref.value.close()
|
|
|
}
|
|
|
|
|
|
-const open = (item:any,mode='add') => {
|
|
|
+const open = (item: any, mode = 'add') => {
|
|
|
popup_ref.value.open();
|
|
|
- state.mode=mode;
|
|
|
- if(mode==='detail'){
|
|
|
- state.ruleForm = {...item}
|
|
|
- if(item.attachList){
|
|
|
+ state.mode = mode;
|
|
|
+ if (mode === 'detail') {
|
|
|
+ state.ruleForm = {...item}
|
|
|
+ if (item.attachList) {
|
|
|
state.attachList = JSON.parse(item.attachList)
|
|
|
}
|
|
|
- state.ruleForm.typeName = state.feedbackTypeList.find(k=>k.value==item.type)?.name
|
|
|
+ state.ruleForm.typeName = state.feedbackTypeList.find(k => k.value == item.type)?.name
|
|
|
}
|
|
|
loadDict();
|
|
|
}
|
|
|
@@ -194,5 +194,12 @@ defineExpose({
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+.text-right {
|
|
|
+ text-align: right;
|
|
|
|
|
|
+ .text-right_btn {
|
|
|
+ margin-right: 10px;
|
|
|
+ color:$uni-color-primary
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|