Browse Source

人民建议征集

xiaowang-feature
是小王呀\24601 8 months ago
parent
commit
e81e1cea19
  1. BIN
      src/assets/images/peoSuggestion/13.png
  2. BIN
      src/assets/images/peoSuggestion/14.png
  3. 2
      src/router/router.config.js
  4. 2
      src/utils/jweixin.js
  5. 40
      src/views/peoSuggestion/SpecialsolicitationFill.vue
  6. 2
      src/views/peoSuggestion/index.vue
  7. 61
      src/views/peoSuggestion/solicitationDaily.vue
  8. 5
      yarn.lock

BIN
src/assets/images/peoSuggestion/13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/assets/images/peoSuggestion/14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

2
src/router/router.config.js

@ -147,7 +147,7 @@ export const constantRouterMap = [
path: '/peoSuggestion', path: '/peoSuggestion',
name: 'peoSuggestion', name: 'peoSuggestion',
component: () => import('@/views/peoSuggestion'), component: () => import('@/views/peoSuggestion'),
meta: { title: '人民意见征集', keepAlive: false } meta: { title: '人民建议征集', keepAlive: false }
}, },
{ {

2
src/utils/jweixin.js

@ -19,7 +19,7 @@ export const setConfig = function (jsApiList = []) {
wx.ready(function(){ wx.ready(function(){
wx.updateAppMessageShareData({ wx.updateAppMessageShareData({
title: '城peoSuggestion阳社会工作人民意见征集', // 分享标题 title: '城阳社会工作人民建议征集', // 分享标题
desc: '倾听民声,汇集民智,期待您的好建议、金点子。', // 分享描述 desc: '倾听民声,汇集民智,期待您的好建议、金点子。', // 分享描述
link: `${location.href.split('#')[0]+"#/peoSuggestion"}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 link: `${location.href.split('#')[0]+"#/peoSuggestion"}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致

40
src/views/peoSuggestion/SpecialsolicitationFill.vue

@ -17,14 +17,12 @@
<img style="width: 30px; height: 30px;" <img style="width: 30px; height: 30px;"
src="../../assets/images/peoSuggestion/15.png" /> src="../../assets/images/peoSuggestion/15.png" />
</div> </div>
</van-uploader> </van-uploader>
<span <span
style="color:#C1C1C1; font-size: 15px; line-height: 18px;margin-top: 10px;">您也可以将建议内容整理成文档上传支持wordpdf格式文件大小不超过5Mb.</span> style="color:#C1C1C1; font-size: 15px; line-height: 18px;margin-top: 10px;">您也可以将建议内容整理成文档上传支持wordpdf格式文件大小不超过5Mb</span>
</div> </div>
</template> </template>
</van-field> </van-field>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
@ -48,7 +46,7 @@
</van-cell> </van-cell>
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="formData.name" label="姓名" placeholder="请输入联系人" required> <van-field v-model="formData.name" label="建议人姓名" placeholder="请输入建议人姓名" required>
<template #message> <template #message>
<div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;"> <div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;">
请输入公民姓名法人或社会组织名称 请输入公民姓名法人或社会组织名称
@ -57,11 +55,11 @@
</van-field> </van-field>
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="formData.mobile" label="手机号码" maxlength="11" placeholder="请输入联系电话" required <van-field v-model="formData.mobile" label="联系电话" maxlength="11" placeholder="请输入联系电话" required
type="number" /> type="number" />
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="formData.age" label="年龄" placeholder="请输入联系人" type="number" @input="onInput" <van-field v-model="formData.age" label="年龄" placeholder="请输入年龄" type="number" @input="onInput"
required> required>
</van-field> </van-field>
</div> </div>
@ -72,11 +70,15 @@
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" <van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)"
style="width: 300px; margin-bottom: 50px;" round @click="onClickdaily">提交</van-button> style="width: 300px; margin-bottom: 50px;" round @click="onClickdaily">提交</van-button>
</div> </div>
<van-popup v-model="showPopup" position="bottom" :style="{ height: '50%' }" @close="onClose" round <van-popup v-model="showPopup" position="bottom" :style="{ height: '50%' }" @close="onClose" >
closeable>
<div style="margin: 10px"> <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" >
<van-checkbox v-for="(item, index) in ideaIdentityList" :key="index" :name="item.value" <div class="flex flex-end" style="margin-bottom: 20px;">
<div style="font-size: 16px;" @click="onCancel">取消</div>
<div>身份选择</div>
<div @click="onConfirm" >确定</div>
</div>
<van-checkbox v-for="(item, index) in ideaIdentityList" :key="index" :name="item.value" @click="onCheck(item)"
style="margin: 10px;" shape="square"> style="margin: 10px;" shape="square">
{{ item.label }} {{ item.label }}
</van-checkbox> </van-checkbox>
@ -108,6 +110,7 @@ export default {
showPopup:false, showPopup:false,
ideaIdentityList:[], ideaIdentityList:[],
formData:{ formData:{
attachmentList:[],
openId:"", openId:"",
fileList:[], fileList:[],
identityTypeCode:[], identityTypeCode:[],
@ -161,15 +164,22 @@ export default {
}, },
methods: { methods: {
onCheck(name){ onConfirm(){
console.log(this.formData.identityTypeCode,"但是克莱斯勒开发接口是"); console.log(this.formData.identityTypeCode,"但是克莱斯勒开发接口是");
this.showPopup = false;
},
onCheck(name){
console.log(name,"但是克莱斯勒开发接口是");
}, },
onClose(){ onClose(){
this.showPopup = false; this.showPopup = false;
}, },
onCancel(){
this.showPopup = false;
this.formData.identityTypeCode=[]
},
onClickPopup() { onClickPopup() {
console.log("sdkjfkldsj"); console.log("sdkjfkldsj");
this.showPopup = true; this.showPopup = true;
}, },
// //
@ -211,12 +221,12 @@ export default {
file.message = '上传成功' file.message = '上传成功'
file.url = res.data.url file.url = res.data.url
let fileInfo = { let fileInfo = {
type: type, // type: type,
format: format, // format: format,
name: name, name: name,
url: url url: url
}; };
this.formData.imageList.push(res.data.url) this.formData.attachmentList.push(res.data.url)
console.log(fileInfo,"sdlkjdslgfjdgls"); console.log(fileInfo,"sdlkjdslgfjdgls");
// this.attrs.push(fileInfo) // this.attrs.push(fileInfo)
}) })

2
src/views/peoSuggestion/index.vue

@ -179,7 +179,7 @@
<img style="width: 180px;" :src="qrCodeImage" alt="二维码" /> <img style="width: 180px;" :src="qrCodeImage" alt="二维码" />
</div> </div>
<div style="padding: 20px; text-align: center;"> <div style="padding: 20px; text-align: center;">
人民意见征集二维码</div> 人民建议征集二维码</div>
长按二维码保存到手机 长按二维码保存到手机
<!-- <van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" round <!-- <van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" round
@click="submit">下载二维码</van-button> --> @click="submit">下载二维码</van-button> -->

61
src/views/peoSuggestion/solicitationDaily.vue

@ -2,7 +2,7 @@
<div class="container"> <div class="container">
<div class="block"> <div class="block">
<div class=""> <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> --> <!-- <div>{{ cascaderValue }}</div> -->
</van-cell> </van-cell>
@ -21,14 +21,15 @@
<div class="flex flex-y" style="margin-top: 10px;"> <div class="flex flex-y" style="margin-top: 10px;">
<van-uploader max-size="5 * 1024 * 1024" v-model="fileList1" show-upload <van-uploader max-size="5 * 1024 * 1024" v-model="fileList1" show-upload
:after-read="afterReadFile" :before-read="beforeRead" accept=".doc,.docx,.pdf"> :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"> <div style="width: 83px; height: 83px; background-color: #f7f7f7;"
class="flex flex-center1 flex-center2">
<img style="width: 30px; height: 30px;" <img style="width: 30px; height: 30px;"
src="../../assets/images/peoSuggestion/15.png" /> src="../../assets/images/peoSuggestion/15.png" />
</div> </div>
</van-uploader> </van-uploader>
<span <span
style="color:#C1C1C1; font-size: 15px; line-height: 18px;margin-top: 10px;">您也可以将建议内容整理成文档上传支持wordpdf格式文件大小不超过5Mb.</span> style="color:#C1C1C1; font-size: 15px; line-height: 18px;margin-top: 10px;">您也可以将建议内容整理成文档上传支持wordpdf格式文件大小不超过5Mb</span>
</div> </div>
</template> </template>
</van-field> </van-field>
@ -54,7 +55,7 @@
</van-cell> </van-cell>
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="formData.name" label="建议人" placeholder="请输入联系人" required> <van-field v-model="formData.name" label="建议人姓名" placeholder="请输入建议人姓名" required>
<template #message> <template #message>
<div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;"> <div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;">
请输入公民姓名法人或社会组织名称 请输入公民姓名法人或社会组织名称
@ -70,8 +71,7 @@
type="number" /> type="number" />
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="formData.age" label="年龄" placeholder="请输入联系人" type="number" @input="onInput" <van-field v-model="formData.age" label="年龄" placeholder="请输入年龄" type="number" @input="onInput" required>
required>
</van-field> </van-field>
</div> </div>
<div class="block"> <div class="block">
@ -85,11 +85,16 @@
<van-picker title="标题" show-toolbar :columns="ideaTitleTypeList" @confirm="onConfirm" @cancel="onCancel" <van-picker title="标题" show-toolbar :columns="ideaTitleTypeList" @confirm="onConfirm" @cancel="onCancel"
value-key="label" /> value-key="label" />
</van-popup> </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"> <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" <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 }} {{ item.label }}
</van-checkbox> </van-checkbox>
</van-checkbox-group> </van-checkbox-group>
@ -104,7 +109,7 @@
import { import {
ideaList,icEventSpecialSubject,icEventOldAdd ideaList,icEventSpecialSubject,icEventOldAdd
} from "@/api/peoSuggestion" } 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 {uploadvariedfile} from '@/api/basic'
import {sphereLifeSearcdetail } from "@/api/lingCircle" import {sphereLifeSearcdetail } from "@/api/lingCircle"
import Share from "@/components/Share" import Share from "@/components/Share"
@ -123,6 +128,7 @@ export default {
ideaTitleTypeList:[], ideaTitleTypeList:[],
adviceType:false, adviceType:false,
formData:{ formData:{
attachmentList:[],
age:"", age:"",
ideaTitleType:"", ideaTitleType:"",
operationType:"4", operationType:"4",
@ -167,6 +173,25 @@ export default {
this.getDictionaries() this.getDictionaries()
}, },
methods: { 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() { onCancel() {
this.adviceType = false this.adviceType = false
@ -182,11 +207,11 @@ export default {
}, },
// //
onCheck(selectedValues){ onCheck(selectedValues){
const selectedLabels = this.ideaIdentityList // const selectedLabels = this.ideaIdentityList
.filter(item => selectedValues.includes(item.value)) // .filter(item => selectedValues.includes(item.value))
.map(item => item.label); // .map(item => item.label);
this.operationName=selectedLabels.toString() // this.operationName=selectedLabels.toString()
console.log('选中的 Labels:', this.operationName); // console.log(' Labels:', this.operationName);
}, },
onClose(){ onClose(){
this.showPopup = false; this.showPopup = false;
@ -212,12 +237,12 @@ export default {
file.message = '上传成功' file.message = '上传成功'
file.url = res.data.url file.url = res.data.url
let fileInfo = { let fileInfo = {
type: type, // type: type,
format: format, // format: format,
name: name, name: name,
url: url url: url
}; };
this.formData.imageList.push(fileInfo) this.formData.attachmentList.push(fileInfo)
}) })
.catch(() => { .catch(() => {

5
yarn.lock

@ -4923,6 +4923,11 @@ jsonfile@^6.0.1:
optionalDependencies: optionalDependencies:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
jweixin-module@^1.6.0:
version "1.6.0"
resolved "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz#4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd"
integrity sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==
keyv@^4.5.3: keyv@^4.5.3:
version "4.5.4" version "4.5.4"
resolved "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" resolved "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"

Loading…
Cancel
Save