|
|
@ -2,7 +2,7 @@ |
|
|
|
<div class="container"> |
|
|
|
<div class="block"> |
|
|
|
<div class=""> |
|
|
|
<van-cell required is-link title="建议主题" @click="onShowPicker()" label="描述信息" :value="ideaTitleName"> |
|
|
|
<van-cell required is-link title="建议主题" @click="onShowPicker()" :value="ideaTitleName"> |
|
|
|
<!-- <div>{{ cascaderValue }}</div> --> |
|
|
|
</van-cell> |
|
|
|
|
|
|
@ -17,20 +17,21 @@ |
|
|
|
<div class="textarea"> |
|
|
|
<van-field v-model="formData.eventContent" autosize label="建议内容" maxlength="800" |
|
|
|
placeholder="请输入主要建议内容(内容描述不少于10个 字,不超过800字)" required rows="6" type="textarea"> |
|
|
|
<template #extra> |
|
|
|
<div class="flex flex-y" style="margin-top: 10px;"> |
|
|
|
<van-uploader max-size="5 * 1024 * 1024" v-model="fileList1" show-upload |
|
|
|
:after-read="afterReadFile" :before-read="beforeRead" accept=".doc,.docx,.pdf"> |
|
|
|
<div style="width: 83px; height: 83px; background-color: #f7f7f7;" class="flex flex-center1 flex-center2"> |
|
|
|
<img style="width: 30px; height: 30px;" |
|
|
|
src="../../assets/images/peoSuggestion/15.png" /> |
|
|
|
</div> |
|
|
|
<template #extra> |
|
|
|
<div class="flex flex-y" style="margin-top: 10px;"> |
|
|
|
<van-uploader max-size="5 * 1024 * 1024" v-model="fileList1" show-upload |
|
|
|
:after-read="afterReadFile" :before-read="beforeRead" accept=".doc,.docx,.pdf"> |
|
|
|
<div style="width: 83px; height: 83px; background-color: #f7f7f7;" |
|
|
|
class="flex flex-center1 flex-center2"> |
|
|
|
<img style="width: 30px; height: 30px;" |
|
|
|
src="../../assets/images/peoSuggestion/15.png" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
</van-uploader> |
|
|
|
<span |
|
|
|
style="color:#C1C1C1; font-size: 15px; line-height: 18px;margin-top: 10px;">您也可以将建议内容整理成文档上传,支持word、pdf格式,文件大小不超过5Mb.</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</van-uploader> |
|
|
|
<span |
|
|
|
style="color:#C1C1C1; font-size: 15px; line-height: 18px;margin-top: 10px;">您也可以将建议内容整理成文档上传,支持word、pdf格式,文件大小不超过5Mb。</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</van-field> |
|
|
|
|
|
|
|
</div> |
|
|
@ -54,7 +55,7 @@ |
|
|
|
</van-cell> |
|
|
|
</div> |
|
|
|
<div class="block"> |
|
|
|
<van-field v-model="formData.name" label="建议人" placeholder="请输入联系人" required> |
|
|
|
<van-field v-model="formData.name" label="建议人姓名" placeholder="请输入建议人姓名" required> |
|
|
|
<template #message> |
|
|
|
<div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;"> |
|
|
|
请输入公民姓名、法人或社会组织名称 |
|
|
@ -70,10 +71,9 @@ |
|
|
|
type="number" /> |
|
|
|
</div> |
|
|
|
<div class="block"> |
|
|
|
<van-field v-model="formData.age" label="年龄" placeholder="请输入联系人" type="number" @input="onInput" |
|
|
|
required> |
|
|
|
</van-field> |
|
|
|
</div> |
|
|
|
<van-field v-model="formData.age" label="年龄" placeholder="请输入年龄" type="number" @input="onInput" required> |
|
|
|
</van-field> |
|
|
|
</div> |
|
|
|
<div class="block"> |
|
|
|
<van-cell required is-link @click="onClickPopup" :value="operationName">你的身份(可多选)</van-cell> |
|
|
|
</div> |
|
|
@ -83,13 +83,18 @@ |
|
|
|
</div> |
|
|
|
<van-popup v-model="adviceType" position="bottom"> |
|
|
|
<van-picker title="标题" show-toolbar :columns="ideaTitleTypeList" @confirm="onConfirm" @cancel="onCancel" |
|
|
|
value-key="label" /> |
|
|
|
value-key="label" /> |
|
|
|
</van-popup> |
|
|
|
<van-popup v-model="showPopup" position="bottom" :style="{ height: '50%' }" @close="onClose" round closeable> |
|
|
|
<van-popup v-model="showPopup" position="bottom" :style="{ height: '50%' }" @close="onClose"> |
|
|
|
<div style="margin: 10px"> |
|
|
|
<van-checkbox-group v-model="formData.identityTypeCode" ref="checkboxGroup" @change="onCheck"> |
|
|
|
<van-checkbox-group @close="onClose" v-model="formData.identityTypeCode" ref="checkboxGroup"> |
|
|
|
<div class="flex flex-end" style="margin-bottom: 20px;"> |
|
|
|
<div style="font-size: 16px;" @click="onCancel1">取消</div> |
|
|
|
<div>身份选择</div> |
|
|
|
<div @click="onConfirm1">确定</div> |
|
|
|
</div> |
|
|
|
<van-checkbox v-for="(item, index) in ideaIdentityList" :key="index" :name="item.value" |
|
|
|
style="margin: 10px;" shape="square"> |
|
|
|
@click="onCheck(item)" style="margin: 10px;" shape="square"> |
|
|
|
{{ item.label }} |
|
|
|
</van-checkbox> |
|
|
|
</van-checkbox-group> |
|
|
@ -104,7 +109,7 @@ |
|
|
|
import { |
|
|
|
ideaList,icEventSpecialSubject,icEventOldAdd |
|
|
|
} from "@/api/peoSuggestion" |
|
|
|
import { wx1078fa1e99424de9, sendsmscode,editUser,dictlist } from '@/api/user' |
|
|
|
import { wxce2db0866b0698f8, sendsmscode,editUser,dictlist } from '@/api/user' |
|
|
|
import {uploadvariedfile} from '@/api/basic' |
|
|
|
import {sphereLifeSearcdetail } from "@/api/lingCircle" |
|
|
|
import Share from "@/components/Share" |
|
|
@ -123,6 +128,7 @@ export default { |
|
|
|
ideaTitleTypeList:[], |
|
|
|
adviceType:false, |
|
|
|
formData:{ |
|
|
|
attachmentList:[], |
|
|
|
age:"", |
|
|
|
ideaTitleType:"", |
|
|
|
operationType:"4", |
|
|
@ -167,6 +173,25 @@ export default { |
|
|
|
this.getDictionaries() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onConfirm1(){ |
|
|
|
console.log(this.formData.identityTypeCode,"但是克莱斯勒开发接口是"); |
|
|
|
this.showPopup = false; |
|
|
|
}, |
|
|
|
onCancel1(){ |
|
|
|
this.showPopup = false; |
|
|
|
this.formData.identityTypeCode=[] |
|
|
|
}, |
|
|
|
// 上传前校验文件类型 |
|
|
|
beforeRead(file) { |
|
|
|
const allowedTypes = ['application/pdf', |
|
|
|
'application/msword', |
|
|
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document']; |
|
|
|
if (!allowedTypes.includes(file.type)) { |
|
|
|
this.$toast.fail('仅支持上传 Word 或 PDF 文件'); |
|
|
|
return false; // 阻止上传 |
|
|
|
} |
|
|
|
return true; // 允许上传 |
|
|
|
}, |
|
|
|
//主题关闭 |
|
|
|
onCancel() { |
|
|
|
this.adviceType = false |
|
|
@ -182,11 +207,11 @@ export default { |
|
|
|
}, |
|
|
|
//身份选择 |
|
|
|
onCheck(selectedValues){ |
|
|
|
const selectedLabels = this.ideaIdentityList |
|
|
|
.filter(item => selectedValues.includes(item.value)) |
|
|
|
.map(item => item.label); |
|
|
|
this.operationName=selectedLabels.toString() |
|
|
|
console.log('选中的 Labels:', this.operationName); |
|
|
|
// const selectedLabels = this.ideaIdentityList |
|
|
|
// .filter(item => selectedValues.includes(item.value)) |
|
|
|
// .map(item => item.label); |
|
|
|
// this.operationName=selectedLabels.toString() |
|
|
|
// console.log('选中的 Labels:', this.operationName); |
|
|
|
}, |
|
|
|
onClose(){ |
|
|
|
this.showPopup = false; |
|
|
@ -212,12 +237,12 @@ export default { |
|
|
|
file.message = '上传成功' |
|
|
|
file.url = res.data.url |
|
|
|
let fileInfo = { |
|
|
|
type: type, |
|
|
|
format: format, |
|
|
|
// type: type, |
|
|
|
// format: format, |
|
|
|
name: name, |
|
|
|
url: url |
|
|
|
}; |
|
|
|
this.formData.imageList.push(fileInfo) |
|
|
|
this.formData.attachmentList.push(fileInfo) |
|
|
|
|
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|