Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
| | |
| | | <view class="main"> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">时间</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请选择问题发生的时间" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | <view class=" flex a-center j-between flex1" @click="showDate=true"> |
| | | <input v-model="time" disabled placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" maxlength="10" placeholder="请选择问题发生的时间" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">问题类型</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请选择问题类型" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | <view class=" flex a-center j-between flex1" @click="showList=true"> |
| | | <input v-model="problemType" disabled placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" maxlength="10" placeholder="请选择问题类型" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">群众</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请输入群众姓名" /> |
| | | <input v-model="name" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" placeholder="请输入群众姓名" /> |
| | | |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">联系电话</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请输入群众联系电话" /> |
| | | <input v-model="contactNumber" type="number" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" maxlength="11" placeholder="请输入群众联系电话" /> |
| | | |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between" @click="goTopage"> |
| | | <text class="w-108 fs-27 font-bold mr-85">地点</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请选择问题发生具体地点" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | |
| | | <view class=" flex a-center j-between flex1"> |
| | | <input v-model="location" disabled placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" placeholder="请选择问题发生具体地点" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">详细地址</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请输入详细地址描述" /> |
| | | <input v-model="detailedAddress" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" placeholder="请输入详细地址描述" /> |
| | | </view> |
| | | <view class="mt-35"> |
| | | <text class="w-108 fs-27 font-bold mr-85">问题描述</text> |
| | | <view class="bg mt-27 fs-27"> |
| | | <view class="h-94 " style="border-bottom: 2rpx solid rgba(0, 10, 26, 0.07);"> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="h-94 pl-31 flex1" |
| | | placeholder="请输入问题标题" /> |
| | | <input v-model="descriptionTitle" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="h-94 pl-31 flex1" placeholder="请输入问题标题" /> |
| | | </view> |
| | | <textarea name="" id="" cols="30" placeholder="请输入问题描述内容" |
| | | <textarea name="" v-model="descriptionContent" id="" cols="30" placeholder="请输入问题描述内容" |
| | | placeholder-style="color: rgba(0, 0, 0, 0.30);font-size:27rpx;" rows="10"></textarea> |
| | | </view> |
| | | </view> |
| | | <view class="mt-35"> |
| | | <text class="w-108 fs-27 font-bold mr-85">图片</text> |
| | | <view class="mt-27 flex a-center"> |
| | | <view class="img mr-15"> |
| | | <image src="/static/logo.png" class="w-140 h-140" mode=""></image> |
| | | <view class="img mr-15" v-for="item,index in images" :key="index"> |
| | | <image :src="item" class="w-140 h-140" mode=""></image> |
| | | <view class="img-icon"> |
| | | <image class="w-19 h-19" src="/static/Appeal/amplify.png" mode=""></image> |
| | | <image class="w-19 h-19 ml-35" src="/static/Appeal/trash.png" mode=""></image> |
| | | <image class="w-19 h-19" @click="previewImage(index)" src="/static/Appeal/amplify.png" |
| | | mode=""></image> |
| | | <image class="w-19 h-19 ml-35" @click="deletimg(item)" src="/static/Appeal/trash.png" mode=""> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode=""></image> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode="" @click="uploadImg"></image> |
| | | </view> |
| | | </view> |
| | | <view class="mt-35"> |
| | | <text class="w-108 fs-27 font-bold mr-85">视频</text> |
| | | <view class="mt-27 flex a-center"> |
| | | <view class="img mr-15"> |
| | | <image src="/static/logo.png" class="w-140 h-140" mode=""></image> |
| | | <view class="img mr-15" v-for="item,index in videos" :key="index"> |
| | | <video :controls="false" :show-center-play-btn="false" :src="item" class="w-140 h-140" mode=""></video> |
| | | <view class="img-icon"> |
| | | <image class="w-19 h-19" src="/static/Appeal/amplify.png" mode=""></image> |
| | | <image class="w-19 h-19 ml-35" src="/static/Appeal/trash.png" mode=""></image> |
| | | <image class="w-19 h-19" @click="gotoPage(item)" src="/static/Appeal/amplify.png" mode=""></image> |
| | | <image class="w-19 h-19 ml-35" @click="deletvideo(item)" src="/static/Appeal/trash.png" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode=""></image> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode="" @click="uploadVideo"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn" @click="submit"> |
| | | 保存 |
| | | </view> |
| | | <u-datetime-picker :show="showDate" v-model="value1" mode="date"></u-datetime-picker> |
| | | <u-picker :show="showList" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> |
| | | <u-datetime-picker :show="showDate" v-model="value1" mode="date" :closeOnClickOverlay="true" |
| | | @confirm="confirmone" @close="close" @cancel="cancel"></u-datetime-picker> |
| | | <u-picker :show="showList" :columns="columns" @confirm="confirmtwo" :closeOnClickOverlay="true" @close="close" |
| | | @cancel="cancel"></u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js'; |
| | | import { |
| | | save, |
| | | getproblem |
| | | } from './service.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | showList: false, |
| | | showDate: false, |
| | | value1: Number(new Date()), |
| | | columns: [['医疗','教育','就业','住房','养老']], |
| | | columns: [ |
| | | ['医疗', '教育', '就业', '住房', '养老'] |
| | | ], |
| | | time: '', |
| | | problemType: '', |
| | | name: '', |
| | | contactNumber: '', |
| | | location: '', |
| | | detailedAddress: '', |
| | | descriptionTitle: '', |
| | | descriptionContent: '', |
| | | images: [], |
| | | videos: [], |
| | | }; |
| | | }, |
| | | methods:{ |
| | | confirm(e){ |
| | | console.log(e,'eeee'); |
| | | onLoad() { |
| | | this.getproblem() |
| | | }, |
| | | methods: { |
| | | previewImage(index) { |
| | | uni.previewImage({ |
| | | urls: this.images, |
| | | current: this.images[index], |
| | | longPressActions: { |
| | | itemList: ['发送给朋友', '保存图片', '收藏'], |
| | | success: function(data) { |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | }, |
| | | fail: function(err) { |
| | | console.log(err.errMsg); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | cancel(e){ |
| | | console.log(e,'eeee'); |
| | | deletimg(e) { |
| | | this.images = this.images.filter(item => item != e) |
| | | |
| | | }, |
| | | goTopage(){ |
| | | deletvideo(e){ |
| | | this.videos = this.videos.filter(item => item != e) |
| | | }, |
| | | gotoPage(e){ |
| | | uni.navigateTo({ |
| | | url:'/pages/location/location' |
| | | url:`/pages/work-detail/maxVideo?url=${e}` |
| | | }) |
| | | } |
| | | }, |
| | | getproblem() { |
| | | getproblem().then((resp => { |
| | | console.log(resp, '问题类型') |
| | | })) |
| | | }, |
| | | submit() { |
| | | const preciseRegex = '/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/'; |
| | | if(!this.time){ |
| | | uni.showToast({ |
| | | title:'请选择时间', |
| | | icon:'none' |
| | | }) |
| | | |
| | | }else if(!this.problemType){ |
| | | uni.showToast({ |
| | | title:'请选择问题类型', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.name){ |
| | | uni.showToast({ |
| | | title:'请输入群众姓名', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.contactNumber){ |
| | | uni.showToast({ |
| | | title:'请输入联系电话', |
| | | icon:'none' |
| | | }) |
| | | }else if(!preciseRegex.test(phoneNumber)){ |
| | | uni.showToast({ |
| | | title:'请输入正确的手机号', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.location){ |
| | | uni.showToast({ |
| | | title:'请选择地点', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.detailedAddress){ |
| | | uni.showToast({ |
| | | title:'请输入详细地址', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.descriptionTitle){ |
| | | uni.showToast({ |
| | | title:'请输入问题标题', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.descriptionContent){ |
| | | uni.showToast({ |
| | | title:'请输入问题描述', |
| | | icon:'none' |
| | | }) |
| | | }else if(this.images==0){ |
| | | uni.showToast({ |
| | | title:'请上传图片', |
| | | icon:'none' |
| | | }) |
| | | }else if(this.videos==0){ |
| | | uni.showToast({ |
| | | title:'请上传视频', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | const data = { |
| | | time: this.time, |
| | | problemType: this.problemType, |
| | | name: this.name, |
| | | contactNumber: this.contactNumber, |
| | | location: this.location, |
| | | detailedAddress: this.detailedAddress, |
| | | descriptionTitle: this.descriptionTitle, |
| | | descriptionContent: this.descriptionContent, |
| | | images: this.images.join(','), |
| | | videos: this.videos.join(','), |
| | | } |
| | | save().then(resp => { |
| | | console.log(resp, '保存'); |
| | | if(resp.code==200){ |
| | | uni.showToast({ |
| | | title:'保存成功', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | confirmone(e) { |
| | | console.log(e, 'eeee'); |
| | | this.time = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.showDate = false |
| | | }, |
| | | confirmtwo(e) { |
| | | console.log(e, 'eeee'); |
| | | this.problemType = e.value[0] |
| | | this.showList = false |
| | | }, |
| | | cancel() { |
| | | this.showDate = false |
| | | this.showList = false |
| | | }, |
| | | close(e) { |
| | | this.showDate = false |
| | | this.showList = false |
| | | }, |
| | | goTopage() { |
| | | uni.navigateTo({ |
| | | url: '/pages/location/location' |
| | | }) |
| | | }, |
| | | uploadImg() { |
| | | uni.chooseImage({ |
| | | count: 1, //默认9 |
| | | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], //从相册选择 |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | filePath: res.tempFilePaths[0], |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes'); |
| | | this.images = [...this.images, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | | fail: () => { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '上传失败', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | uploadVideo() { |
| | | uni.chooseVideo({ |
| | | count: 1, //默认9 |
| | | sourceType: ['camera', 'album'], |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | filePath: res.tempFilePath, |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data).data, 'uploadFileRes'); |
| | | this.videos = [...this.videos, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | | fail: () => { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '上传失败', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | |
| | | export const save =(params)=>{ |
| | | return request.post(`/api/huacheng-sangeshenbian/applet/complaint/save`,params) |
| | | } |
| | | export const getproblem =(params)=>{ |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/problem-type/list`,params) |
| | | } |
| | |
| | | 说明内容
|
| | | </view>
|
| | | <view class="mt-27 bgColor1 pt-25 pl-31 pr-31 pb-29 lh-38 fs-27">
|
| | | 1、处理措施:记录为解决该问题所采取的具体措施,包括政策宣传、处理沟通、现场处理等方式。
|
| | | 2、处理时间:记录处理该问题的时间节点,包括开始处理时间、处理完成时间等。
|
| | | 3、参与人员:记录参与处理该问题的人员名单,包括走访人员、相关部门工作人员等。
|
| | | 4、结果概述:简要描述问题的处理结果,是否得到有效解决,是否达到走访对象的期望等。
|
| | | 5、后续跟进:如需进一步跟进或处理,记录后续跟进的计划、时间节点及责任人员。
|
| | | <view class="">
|
| | | 1、处理措施:记录为解决该问题所采取的具体措施,包括政策宣传、处理沟通、现场处理等方式。
|
| | | </view>
|
| | | <view class="">
|
| | | 2、处理时间:记录处理该问题的时间节点,包括开始处理时间、处理完成时间等。
|
| | | </view>
|
| | | <view class="">
|
| | | 3、参与人员:记录参与处理该问题的人员名单,包括走访人员、相关部门工作人员等。
|
| | | </view>
|
| | | <view class="">
|
| | | 4、结果概述:简要描述问题的处理结果,是否得到有效解决,是否达到走访对象的期望等。
|
| | | </view>
|
| | | <view class="">
|
| | | 5、后续跟进:如需进一步跟进或处理,记录后续跟进的计划、时间节点及责任人员。
|
| | | </view>
|
| | | </view>
|
| | | <view class="fs-27 font-bold mt-38">
|
| | | 图片
|
| | |
| | | 视频
|
| | | </view>
|
| | | <view class="flex a-center j-between mt-27 wrap">
|
| | | <image src="../../static/logo.png" mode="aspectFill" class="w-140 h-140 mr-15 shrink0 mb-10" v-for="item in 4" :key="item"></image>
|
| | | <view class="relative mr-15 shrink0 mb-10" v-for="item in 4" :key="item">
|
| | | <image src="../../static/logo.png" mode="aspectFill" class="w-140 h-140" ></image>
|
| | | <image src="../../static/detailImg/open.png" mode="aspectFill" class="w100 h100 absolute top0 left0"></image>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="h-10 safe-b">
|
| | |
| | | <image class="h-32" src="/static/home/img5.png" mode=""></image> |
| | | </view> |
| | | <swiper class="swiper " :indicator-dots="false" :autoplay="true" :interval="3000"> |
| | | <swiper-item> |
| | | <image style="height: 270rpx;width: 688rpx;" src="/static/home/img2.png" mode=""></image> |
| | | <swiper-item v-for="item,index in bannerlist" :key="index"> |
| | | <image style="height: 270rpx;width: 688rpx;border-radius: 19rpx;" :src="item.url" mode=""></image> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <image style="height: 270rpx;width: 688rpx;" src="/static/home/img2.png" mode=""></image> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <image style="height: 270rpx;width: 688rpx;" src="/static/home/img2.png" mode=""></image> |
| | | </swiper-item> |
| | | |
| | | </swiper> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class=" mt-15"> |
| | | <view class="flex a-center"> |
| | | <view class="msg mr-19" @click="isactive=1" :class="isactive==1? 'active':''"> |
| | | <view class="msg mr-19" @click="changeActive(1)" :class="isactive==1? 'active':''"> |
| | | 消息 |
| | | <view class="tips"> |
| | | 6 |
| | | {{msgList.length}} |
| | | </view> |
| | | </view> |
| | | <view class="representative" @click="isactive=2" :class="isactive==2? 'active':''"> |
| | | <view class="representative" @click="changeActive(2)" :class="isactive==2? 'active':''"> |
| | | 待办 |
| | | <view class="tips"> |
| | | 6 |
| | | {{msgList.length}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list mt-29"> |
| | | <view class="flex a-center mb-27" v-for="item in 5"> |
| | | <view class="flex a-center mb-27" v-for="item in msgList" :key="item.id"> |
| | | <view class="avater pb-33"> |
| | | <image class="w-85 h-85 br50" src="/static/home/img9.png" mode=""></image> |
| | | <view class="tips"> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="border-b flex1 ml-18 pb-33"> |
| | | <view class="border-b flex1 ml-18 pb-33" > |
| | | <view class="fs-31 font-w500 flex flex1 j-between"> |
| | | <text>钟山淑</text> |
| | | <text class="fs-23 font-w400">16分钟前</text> |
| | | <text>{{item.title}}</text> |
| | | <text class="fs-23 font-w400">{{item.responseTime}}分钟前</text> |
| | | |
| | | </view> |
| | | <view class="fs-27 flex j-between mt-8"> |
| | | <text>向你发来10份报告</text> |
| | | <view class="read">已读</view> |
| | | <view class="noread">未读</view> |
| | | <text>{{item.title}}</text> |
| | | <view class="read" v-if="item.readStatus==1">已读</view> |
| | | <view class="noread" v-else>未读</view> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | showData: false, |
| | | isClick: false, |
| | | pageNum:1, |
| | | bannerlist:[], |
| | | msgList:[], |
| | | msgListTotal:[], |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | getBanner() { |
| | | getBanner().then(resp => { |
| | | console.log(resp, '获取banner'); |
| | | this.bannerlist =resp.data |
| | | }) |
| | | }, |
| | | getMessagelist() { |
| | |
| | | } |
| | | getMessagelist(data).then(resp => { |
| | | console.log(resp, '获取消息列表'); |
| | | this.msgListTotal=resp.data.records |
| | | this.msgList =resp.data.records.filter(item=> item.promptType==2) |
| | | }) |
| | | }, |
| | | changeActive(value){ |
| | | this.isactive =value |
| | | this.msgList =this.msgListTotal.filter(item=> item.promptType==1) |
| | | }, |
| | | change() { |
| | | console.log('1111'); |
| | |
| | | border-radius: 19rpx; |
| | | |
| | | } |
| | | // swiper-item{ |
| | | // border-radius: 19rpx; |
| | | // } |
| | | |
| | | .msg { |
| | | width: 173rpx; |
| | |
| | | </view>
|
| | | </view>
|
| | | <view class="pl-31 pr-31">
|
| | | <view class="mt-31 br-19 bgColor3 shadow2 oh pb-31" v-for="(item,index) in 10" :key="index">
|
| | | <view class="mt-31 br-19 bgColor3 shadow2 oh pb-31" v-for="(item,index) in list" :key="item.id">
|
| | | <view class="pt-21 pl-27 pr-27 flex a-center j-between fs-27 font-bold">
|
| | | <view class="">
|
| | | 诉求号:7843523454
|
| | | 诉求号:{{ item.serialNumber || '' }}
|
| | | </view>
|
| | | <view class="color3">
|
| | | 上级驳回
|
| | | {{ statusObj[item.status] }}
|
| | | </view>
|
| | | </view>
|
| | | <view class="mt-40 fs-23 pl-40 pr-40">
|
| | | <view class="flex j-between a-center">
|
| | | <view class="color4">
|
| | | 上报人:<text class="color5">李雷</text>
|
| | | 上报人:<text class="color5">{{ item.reporter || '' }}</text>
|
| | | </view>
|
| | | <view class="color4">
|
| | | 所属部门:<text class="color5">部门AA</text>
|
| | | 所属部门:<text class="color5">{{ item.departmentName || '' }}</text>
|
| | | </view>
|
| | | </view>
|
| | | <view class="mt-15">
|
| | | <view class="color4">
|
| | | 提交时间:<text class="color5">2025-2-11 11:09:09</text>
|
| | | 提交时间:<text class="color5">{{ item.reportTime | formatTime }}</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="mt-27 ml-40 mr-40 br-19 bgColor4 pt-34 pb-34 fs-27 pl-27 pr-27 flex a-center j-between">
|
| | | <text>江苏省常州市溧阳市牛顿大道172号</text>
|
| | | <text>{{ item.location || '' }}</text>
|
| | | <image src="../../static/location.png" mode="aspectFill" class="w-31 h-31 ml-10 shrink0"></image>
|
| | | </view>
|
| | | <view class="ml-40 mr-40 mt-31 flex j-between a-center fs-27 txt-center">
|
| | |
| | | 问题类型
|
| | | </view>
|
| | | <view class="tip">
|
| | | 教育
|
| | | {{ item.problemType || '' }}
|
| | | </view>
|
| | | </view>
|
| | | <view class="">
|
| | |
| | | 群众
|
| | | </view>
|
| | | <view class="mt-10">
|
| | | 沙振
|
| | | {{ item.name || '' }}
|
| | | </view>
|
| | | </view>
|
| | | <view class="">
|
| | |
| | | 联系电话
|
| | | </view>
|
| | | <view class="mt-10">
|
| | | 14225874426
|
| | | {{ item.contactNumber || '' }}
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | 问题描述
|
| | | </view>
|
| | | <view class="mt-10 lh-38">
|
| | | 说出来的是你想的,做出来的是你说的,交出来的是你做的
|
| | | {{ item.descriptionContent || '' }}
|
| | | </view>
|
| | | </view>
|
| | | <view class="fs-27 mt-31 ml-40">
|
| | |
| | | 描述图片
|
| | | </view>
|
| | | <view class="mt-19 flex wrap a-center">
|
| | | <image v-for="(item,index) in 4" :key="index" src="../../static/logo.png" class="br-19 w-142 h-154 mr-13 mb-10 shrink0" mode=""></image>
|
| | | <image v-for="(item1,index) in item.images" :key="index" :src="item1"
|
| | | class="br-19 w-142 h-154 mr-13 mb-10 shrink0" mode="aspectFill"></image>
|
| | | </view>
|
| | | </view>
|
| | | <view class="mt-31 border1">
|
| | | <view class="left"></view>
|
| | | <view class="right"></view>
|
| | | <view class="txt-center fs-23 mt-27 color6">
|
| | | 创建时间:2025-9-11 11:01:09
|
| | | 创建时间:{{ item.createTime | formatTime }}
|
| | | </view>
|
| | | <view class="flex a-center j-center fs-23 mt-29 txt-center">
|
| | | <view class="h-58 lh-58 bgColor5 w-192 br-29 color7">
|
| | |
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | |
| | |
|
| | | </view>
|
| | | </view>
|
| | | <view class="safe-b pt-20"></view>
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js'
|
| | | import {
|
| | | getList
|
| | | } from './service.js'
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | | active: 1
|
| | | active: 1,
|
| | | searchParams: {
|
| | | pageNum: 1,
|
| | | pageSize: 10,
|
| | | type: 0
|
| | | },
|
| | | list:[],
|
| | | status: 'loadMore',
|
| | | statusObj: {
|
| | | // 0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销 5-上报待审核 6-上级驳回
|
| | | '0': '正在办理',
|
| | | '1': '延期办理',
|
| | | '2': '超时办理',
|
| | | '3': '已办结',
|
| | | '4': '群众撤销',
|
| | | '5': '上报待审核',
|
| | | '6': '上级驳回'
|
| | | }
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | onReachBottom() {
|
| | |
|
| | | },
|
| | | filters: {
|
| | | formatTime(val) {
|
| | | return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
|
| | | }
|
| | | },
|
| | | onShow() {
|
| | | this.fetchList(this.searchParams,(e)=>{
|
| | | this.list = e.records || []
|
| | | if (this.list.length == e.total) {
|
| | | this.status = 'noMore'
|
| | | } else {
|
| | | this.status = 'loadMore'
|
| | | }
|
| | | })
|
| | | },
|
| | | methods: {
|
| | | fetchList(params,callback) {
|
| | | if (this.status == 'loading') return
|
| | | this.status = 'loading'
|
| | | getList(params).then(res=>{
|
| | | if (res.code == 200) {
|
| | | res.data.records.map(item=>{
|
| | | item.images = item.images.split(',')
|
| | | })
|
| | | callback(res.data)
|
| | | }
|
| | | })
|
| | | }
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
| | | min-height: 100vh;
|
| | | background-color: #f7f7f7;
|
| | | }
|
| | | |
| | |
|
| | | .tip {
|
| | | height: 40rpx;
|
| | | background-color: #FFFBE6;
|
| | |
| | | .shadow1 {
|
| | | box-shadow: 0rpx 12rpx 15rpx 0rpx rgba(0, 0, 0, 0.1);
|
| | | }
|
| | | |
| | |
|
| | | .shadow2 {
|
| | | box-shadow: 0rpx 0rpx 27rpx 0rpx rgba(0, 0, 0, 0.1);
|
| | | }
|
| | |
| | | .color2 {
|
| | | color: #232323;
|
| | | }
|
| | | |
| | |
|
| | | .color3 {
|
| | | color: #FF4948;
|
| | | }
|
| | | |
| | |
|
| | | .color4 {
|
| | | color: #929191;
|
| | | }
|
| | | |
| | |
|
| | | .color5 {
|
| | | color: #000;
|
| | | }
|
| | | |
| | |
|
| | | .color6 {
|
| | | color: #666666;
|
| | | }
|
| | | |
| | |
|
| | | .color7 {
|
| | | color: #727272;
|
| | | }
|
| | | |
| | |
|
| | | .color8 {
|
| | | color: #fff;
|
| | | }
|
| | |
| | | bottom: -5rpx;
|
| | | margin: auto;
|
| | | }
|
| | | |
| | |
|
| | | .bgColor2 {
|
| | | background-color: #fff;
|
| | | }
|
| | | |
| | |
|
| | | .bgColor3 {
|
| | | background: linear-gradient( 180deg, #FFDCDB 0%, rgba(255,255,255,0) 138rpx, #fff 100%);
|
| | | background: linear-gradient(180deg, #FFDCDB 0%, rgba(255, 255, 255, 0) 138rpx, #fff 100%);
|
| | | }
|
| | | |
| | |
|
| | | .bgColor4 {
|
| | | background: linear-gradient( 270deg, rgba(255,241,0,0.5) 0%, rgba(255,249,172,0.25) 48%, rgba(255,255,255,0.2) 100%, #FFFFFF 100%);
|
| | | background: linear-gradient(270deg, rgba(255, 241, 0, 0.5) 0%, rgba(255, 249, 172, 0.25) 48%, rgba(255, 255, 255, 0.2) 100%, #FFFFFF 100%);
|
| | | }
|
| | | |
| | |
|
| | | .bgColor5 {
|
| | | background: #F3F3F3;
|
| | | }
|
| | | |
| | |
|
| | | .bgColor6 {
|
| | | background: linear-gradient( 270deg, #FC8D55 0%, #FF4948 100%);
|
| | | background: linear-gradient(270deg, #FC8D55 0%, #FF4948 100%);
|
| | | }
|
| | | |
| | |
|
| | | .border1 {
|
| | | border-top: 2rpx solid #EDEEEF;
|
| | | position: relative;
|
| | |
|
| | | .left {
|
| | | width: 40rpx;
|
| | | height: 40rpx;
|
| | |
| | | left: -20rpx;
|
| | | top: -20rpx;
|
| | | }
|
| | |
|
| | | .right {
|
| | | width: 40rpx;
|
| | | height: 40rpx;
|
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | // 工单列表 |
| | | export const getList =(params)=>{ |
| | | return request.post(`/api/huacheng-sangeshenbian/applet/complaint/list`,params) |
| | | } |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <u-navbar title="选择地点" bgColor="transparent" titleStyle="font-size: 35rpx;font-weight:bold;" placeholder> |
| | | <view slot="left"> |
| | | <view slot="left" @click="back"> |
| | | <image src="/static/location/back.png" class="w-19 h-35" mode=""></image> |
| | | </view> |
| | | </u-navbar> |
| | | <view class="" id="container"> |
| | | |
| | | <view class="" id="container" @regionchange="onRegionChange"> |
| | | |
| | | </view> |
| | | <view class=""> |
| | | <view class="searchMain mb-35"> |
| | | <view class=" main"> |
| | | <view class="searchMain mb-35 mt-38"> |
| | | <view class="search fs-27 "> |
| | | <text class="mr-35 ml-50">成都市</text> |
| | | <image class="w-17 h-8 mr-35" src="/static/location/toleft.png" mode=""></image> |
| | | <image class="w-31 h-31 mr-13" src="/static/location/search.png" mode=""></image> |
| | | <input class="flex1" placeholder="搜索小区/写字楼等" placeholder-style="font-size:27rpx"></input> |
| | | <view class="sure"> |
| | | <input class="flex1" v-model="keyword" placeholder="搜索小区/写字楼等" |
| | | placeholder-style="font-size:27rpx"></input> |
| | | <view class="sure" @click="searchLocation"> |
| | | 确定 |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="card" :class="" v-for="item in 5"> |
| | | <text>天府新谷九号楼二单元</text> |
| | | <text class="font-w500 fs-23 mt-25" style="color: rgba(0, 0, 0, 0.6);">四川省成都市高新区府城大道西段399号天</text> |
| | | <view class="card" @click="changeAdr(item.id,item)" :class="item.id ==uid ?'activecard':''" |
| | | v-for="item in locationList" :key="item.id"> |
| | | <text>{{item.address}}</text> |
| | | <text class="font-w500 fs-23 mt-25" style="color: rgba(0, 0, 0, 0.6);">{{item.address}}</text> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | return { |
| | | latitude: 39.909, |
| | | longitude: 116.39742, |
| | | map: null, |
| | | uid: 0, |
| | | keyword: '', |
| | | locationList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | methods: { |
| | | back() { |
| | | uni.navigateBack() |
| | | }, |
| | | onRegionChange(e) { |
| | | if (e.type === 'end') { |
| | | // 地图移动结束时执行操作 |
| | | console.log('地图移动结束,新的中心点经度:', e.longitude, '新的中心点纬度:', e.latitude); |
| | | } |
| | | }, |
| | | changeAdr(value, addr) { |
| | | console.log(value, addr, 'asdasdada'); |
| | | this.uid = value |
| | | const pages = getCurrentPages() |
| | | let prevPage = pages[pages.length - 2]; |
| | | prevPage.location = addr.address |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 500) |
| | | }, |
| | | // 搜索地点 |
| | | searchLocation() { |
| | | if (!this.keyword) return; |
| | | uni.request({ |
| | | url: `https://api.map.baidu.com/place/v2/search`, |
| | | method: 'GET', |
| | | data: { |
| | | query: this.keyword, |
| | | location: `${30.39},${104.04}`, |
| | | radius: 10000, // 搜索半径,单位:米 |
| | | output: 'json', |
| | | ak: '3mHKIXMArjgIkgADzOlTYp4XssNSNkwr' // 替换为你自己的 AK |
| | | }, |
| | | success: (res) => { |
| | | console.log(res, '-------'); |
| | | if (res.data.status === 0) { |
| | | this.searchResults = res.data.results; |
| | | this.latitude = res.data.results[0].location.lat |
| | | this.longitude = res.data.results[0].location.lng |
| | | this.locationList = res.data.results.map((result, index) => { |
| | | |
| | | result.id = index + 1 |
| | | |
| | | return result |
| | | }); |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | console.error('搜索失败:', err); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | onReady() { |
| | | var map = new BMapGL.Map("container"); // 创建地图实例 |
| | | var point = new BMapGL.Point(116.404, 39.915); // 创建点坐标 |
| | | map.centerAndZoom(point, 15); |
| | | } |
| | | onLoad() { |
| | | |
| | | }, |
| | | onReady() { |
| | | this.map = new BMapGL.Map("container"); // 创建地图实例 |
| | | |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | this.longitude = res.longitude; |
| | | this.latitude = res.latitude; |
| | | var point = new BMapGL.Point(res.longitude, res.latitude); // 创建点坐标 |
| | | this.map.centerAndZoom(point, 12); |
| | | var myGeo = new BMapGL.Geocoder(); |
| | | // 根据坐标得到地址描述 |
| | | myGeo.getLocation(new BMapGL.Point(res.longitude, res.latitude), (result) => { |
| | | console.log(result, 'result'); |
| | | this.locationList = result.surroundingPois.map((item, index) => { |
| | | item.id = index + 1 |
| | | return item |
| | | }) |
| | | |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | #container { |
| | | width: 100vw; |
| | | height: 517rpx; |
| | | height: 534rpx; |
| | | } |
| | | |
| | | .content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | |
| | | .main { |
| | | background-color: #fff; |
| | | border-radius: 34rpx; |
| | | position: absolute; |
| | | top: 517rpx; |
| | | z-index: 100; |
| | | |
| | | .activecard { |
| | | background: #F2F2F2; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | .searchMain { |
| | | padding-left: 40rpx; |
| | |
| | | font-size: 31rpx; |
| | | color: rgba(0, 0, 0, 0.8); |
| | | padding: 34rpx 38rpx 33rpx 38rpx; |
| | | background: #F2F2F2; |
| | | background: #fff; |
| | | border-bottom: 2rpx solid rgba(0, 10, 26, 0.07); |
| | | } |
| | | </style> |
| | |
| | | export default { |
| | | dev: { |
| | | SERVER_URL: 'http://192.168.110.80:6194/', |
| | | SERVER_URL: 'http://192.168.110.188:6194', |
| | | }, |
| | | test: { |
| | | SERVER_URL: '', |
| | |
| | | import { AvatarDropdown, AvatarName } from './components/RightContent/AvatarDropdown'; |
| | | import { errorConfig } from './requestErrorConfig'; |
| | | const loginPath = '/login'; |
| | | import logo from '../public/logo/logo.png' |
| | | import '../public/font.css' |
| | | |
| | | |
| | |
| | | permission?: Array<Permissions>; |
| | | loading?: boolean; |
| | | }> { |
| | | |
| | | // 如果不是登录页面,执行 |
| | | const { location } = history; |
| | | |
| | | if (location.pathname !== loginPath && !localStorage.getItem('userInfo')) { |
| | | history.replace(loginPath) |
| | | |
| | | return { |
| | | permission: JSON.parse(localStorage.getItem('access') || '') || [], |
| | | currentUser: JSON.parse(localStorage.getItem('userInfo') || '') || {}, |
| | | settings: { ...defaultSettings, fixedHeader: true } as Partial<LayoutSettings>, |
| | | }; |
| | | } |
| | | return { |
| | | permission: JSON.parse(localStorage.getItem('access') || '') || [], |
| | | currentUser: JSON.parse(localStorage.getItem('userInfo') || '') || {}, |
| | |
| | | export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => { |
| | | |
| | | return { |
| | | siderWidth: '210', |
| | | token: { |
| | | |
| | | }, |
| | | logo: false, |
| | | avatarProps: { |
| | | title: <AvatarName />, |
| | | render: (_, avatarChildren) => { |
| | |
| | | }, |
| | | waterMarkProps: { |
| | | content: false, |
| | | }, |
| | | onPageChange: () => { |
| | | const { location: { pathname } } = history; |
| | | // 如果没有登录,重定向到 login |
| | | if (!initialState?.currentUser && location.pathname !== loginPath) { |
| | | // history.push(loginPath); |
| | | return |
| | | } |
| | | }, |
| | | // 自定义 403 页面 |
| | | unAccessible: <div></div>, |
| | |
| | | ); |
| | | }, |
| | | ...initialState?.settings, |
| | | logo |
| | | }; |
| | | }; |
| | | |
| | |
| | | left: unset; |
| | | } |
| | | |
| | | .ant-pro-layout .ant-pro-sider.ant-pro-sider-fixed-mix { |
| | | height: calc(100% - 74px); |
| | | inset-block-start: 74px; |
| | | } |
| | | |
| | | .ant-layout-has-sider>div:nth-child(1) { |
| | | max-width: 210px !important; |
| | | min-width: 64px !important; |
| | | } |
| | | |
| | | .ant-layout-header { |
| | | height: 74px !important; |
| | | } |
| | | |
| | | .ant-pro-global-header { |
| | | height: 74px !important; |
| | | } |
| | | |
| | | canvas { |
| | | display: block; |
| | | } |
| | |
| | | display: block; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .del-confirm { |
| | | .del-icon { |
| | | margin-right: 5px; |
| | | width: 22px; |
| | | height: 22px; |
| | | background-color: rgba(233, 157, 66, 1); |
| | | color: #fff; |
| | | border-radius: 50%; |
| | | align-content: center; |
| | | text-align: center; |
| | | } |
| | | |
| | | .ant-modal-confirm-btns { |
| | | .ant-btn-default:last-child { |
| | | border-color: #1677ff !important; |
| | | color: #fff !important; |
| | | background-color: #1677ff !important; |
| | | } |
| | | |
| | | .ant-btn-default { |
| | | color: #000 !important; |
| | | border-color: #d9d9d9 !important; |
| | | } |
| | | } |
| | | } |
| | |
| | | import { LockOutlined, SafetyOutlined, UserOutlined } from '@ant-design/icons'; |
| | | import { LoginForm, ProFormText } from '@ant-design/pro-components'; |
| | | import { useEmotionCss } from '@ant-design/use-emotion-css'; |
| | | import { Helmet, history, SelectLang, useIntl, useModel } from '@umijs/max'; |
| | | import { history, SelectLang, useIntl, useModel } from '@umijs/max'; |
| | | import { Alert, message, Space } from 'antd'; |
| | | // import CryptoJS from 'crypto-js'; |
| | | import CryptoJS from 'crypto-js'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import Captcha from 'react-captcha-code'; |
| | | import { useAccess } from 'umi'; |
| | | import Settings from '../../../config/defaultSettings'; |
| | | import logo from '../../../public/logo/logo.png'; |
| | | import EditPwd from './editPwd.jsx'; |
| | | import { updatePwd } from './service.js'; |
| | | import './style.less'; |
| | |
| | | const captchaRef = useRef(); |
| | | const [type, setType] = useState<string>('username'); |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | const access = useAccess(); |
| | | const style1 = { |
| | | display: 'flex', |
| | | }; |
| | | |
| | | const containerClassName = useEmotionCss(() => { |
| | | return { |
| | | height: '100vh', |
| | |
| | | id: 'pages.login.success', |
| | | defaultMessage: '登录成功!', |
| | | }); |
| | | const userInfo = data.userInfo.user |
| | | const userInfo = { userName: data.name }; |
| | | localStorage.setItem('userInfo', JSON.stringify(userInfo)); |
| | | let permissionList: any[] = [ |
| | | "/work_order_transaction_management/work_order_item_configuration", |
| | | "/work_order_transaction_management", |
| | | "/system_setting/role_management/edit", |
| | | "/work_order_transaction_management/banner_management", |
| | | "/work_order_transaction_management/banner_management/del", |
| | | "/system_setting/position_management/add", |
| | | "/message_notification/mark_read", |
| | | "/system_setting/role_management", |
| | | "/system_setting/unit_management/del", |
| | | "/system_setting/people_management/freeze", |
| | | "/work_order_transaction_management/problem_type_management", |
| | | "/system_setting/position_management/edit", |
| | | "/system_setting/people_management/del", |
| | | "/work_order_transaction_management/problem_type_management/edit", |
| | | "/position_management/del", |
| | | "/system_setting/unit_management/edit", |
| | | "/system_setting/people_management/edit", |
| | | "/work_order_transaction_management/problem_type_management/add", |
| | | "/system_setting/unit_management/add", |
| | | "/system_setting/unit_management", |
| | | "/message_notification", |
| | | "/system_setting/role_management/add", |
| | | "/work_order_transaction_management/banner_management/edit", |
| | | "/system_setting/role_management/del", |
| | | "/work_order_transaction_management/problem_type_management/del", |
| | | "/system_setting/people_management/add", |
| | | "/work_order_transaction_management/banner_management/add", |
| | | "/system_setting/position_management", |
| | | "/system_setting", |
| | | "/system_setting/people_management", |
| | | ]; |
| | | let accessObj: any = {}; |
| | | permissionList.map((item) => { |
| | | if (JSON.stringify(data.menu) === JSON.stringify(['*:*:*'])) { |
| | | accessObj[item] = true; |
| | | } else { |
| | | accessObj[item] = data.menu.includes(item); |
| | | } |
| | | }); |
| | | |
| | | |
| | | setInitialState((s: any) => ({ |
| | | ...s, |
| | | token: 'data.token.access_token', |
| | | token: data.token, |
| | | permission: accessObj, |
| | | currentUser: userInfo, |
| | | settings: Settings, |
| | | })); |
| | | |
| | | localStorage.setItem('access', JSON.stringify(accessObj)); |
| | | message.success(defaultLoginSuccessMessage); |
| | | const urlParams = new URL(window.location.href).searchParams; |
| | | setTimeout(() => { |
| | |
| | | }, 0); |
| | | }; |
| | | |
| | | const filterPermission = (list: any[], arr: any[]) => { |
| | | return list.map((item) => { |
| | | if (item.children) { |
| | | filterPermission(item.children, arr); |
| | | } |
| | | arr.push(item); |
| | | return item; |
| | | }); |
| | | }; |
| | | |
| | | const handleClick = (e: String) => { |
| | | setCaptcha(e); |
| | | }; |
| | | // 生成随机字符串 |
| | | const generateRandomString = (length: number) => { |
| | | const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
| | | const str = []; |
| | | for (let i = 0; i < length; i++) { |
| | | const randomIndex = Math.floor(Math.random() * chars.length); |
| | | str.push(chars[randomIndex]); |
| | | } |
| | | return str.join(''); |
| | | }; |
| | | const handleSubmit = async (values: API.LoginParams) => { |
| | | try { |
| | | // 登录 |
| | | const res = await login({ ...values }); |
| | | if (res.code == 200) { |
| | | let accessObj: any = {}; |
| | | localStorage.setItem('access', JSON.stringify(accessObj)); |
| | | setInitialState((s: any) => ({ |
| | | ...s, |
| | | permission: accessObj, |
| | | })); |
| | | localStorage.setItem('token', res.token); |
| | | getUserInfo(res); |
| | | localStorage.setItem('token', res.data.token); |
| | | getUserInfo(res.data); |
| | | return; |
| | | } else { |
| | | throw new Error('登录发生错误'); |
| | | } |
| | | // 如果失败去设置用户错误信息 |
| | | // setUserLoginState(res); |
| | | } catch (error) { |
| | | captchaRef?.current?.refresh(); |
| | | } |
| | |
| | | return ( |
| | | <div className={containerClassName}> |
| | | <div className="loginContent"> |
| | | <Helmet> |
| | | <title> |
| | | {intl.formatMessage({ |
| | | id: 'menu.login', |
| | | defaultMessage: '登录页', |
| | | })} |
| | | - {Settings.title} |
| | | </title> |
| | | </Helmet> |
| | | <Lang /> |
| | | |
| | | <div |
| | | style={{ |
| | | position: 'absolute', |
| | |
| | | left: '50%', |
| | | transform: 'translate(-50%,-50%)', |
| | | display: 'flex', |
| | | flexDirection: 'column', |
| | | alignItems: 'center', |
| | | }} |
| | | > |
| | | {/* <div style={{ width: '787px' }}> |
| | | <h1 |
| | | style={{ fontSize: '48px', color: '#fff', textAlign: 'center', marginBottom: '48px' }} |
| | | > |
| | | 三个身边 |
| | | <div style={{ width: '787px', fontSize: '26px', textAlign: 'center' }}> |
| | | <h1> |
| | | “三个身边”群众工作机制问题化解 |
| | | </h1> |
| | | </div> */} |
| | | <h1>平台</h1> |
| | | </div> |
| | | <LoginForm |
| | | contentStyle={{ |
| | | minWidth: 280, |
| | | maxWidth: '75vw', |
| | | }} |
| | | logo={logo} |
| | | title="" |
| | | subTitle={' '} |
| | | logo={false} |
| | | title={false} |
| | | subTitle={false} |
| | | initialValues={{ |
| | | autoLogin: true, |
| | | }} |
| | | // actions={[ |
| | | // <FormattedMessage |
| | | // key="loginWith" |
| | | // id="pages.login.loginWith" |
| | | // defaultMessage="其他登录方式" |
| | | // />, |
| | | // <ActionIcons key="icons" />, |
| | | // ]} |
| | | onFinish={async (values) => { |
| | | if (values.code != captcha) { |
| | | captchaRef?.current?.refresh(); |
| | |
| | | return; |
| | | } |
| | | delete values.code; |
| | | values.password = CryptoJS.MD5(values.password).toString(); |
| | | await handleSubmit(values as API.LoginParams); |
| | | }} |
| | | > |
| | | {/* <Tabs |
| | | activeKey={type} |
| | | onChange={setType} |
| | | centered |
| | | items={[ |
| | | { |
| | | key: 'username', |
| | | label: intl.formatMessage({ |
| | | id: 'pages.login.accountLogin.tab', |
| | | defaultMessage: '账户密码登录', |
| | | }), |
| | | }, |
| | | { |
| | | key: 'mobile', |
| | | label: intl.formatMessage({ |
| | | id: 'pages.login.phoneLogin.tab', |
| | | defaultMessage: '手机号登录', |
| | | }), |
| | | }, |
| | | ]} |
| | | /> */} |
| | | |
| | | <h1 style={{ fontSize: '26px', textAlign: 'center', marginBottom: '20px' }}>登录</h1> |
| | | {status === 'error' && loginType === 'username' && ( |
| | | <LoginMessage |
| | | content={intl.formatMessage({ |
| | |
| | | {type === 'username' && ( |
| | | <> |
| | | <ProFormText |
| | | name="username" |
| | | name="phone" |
| | | fieldProps={{ |
| | | size: 'large', |
| | | prefix: <UserOutlined />, |
| | |
| | | <Captcha onChange={handleClick} ref={captchaRef} bgColor="#fff" /> |
| | | </div> |
| | | </Space> |
| | | |
| | | {/* <div |
| | | style={{ color: '#0086F6', textAlign: 'right', marginBottom: '21px' }} |
| | | className="login-form-forgot" |
| | | onClick={() => { |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 修改密码 |
| | | </div> */} |
| | | </> |
| | | )} |
| | | |
| | | {status === 'error' && loginType === 'mobile' && <LoginMessage content="验证码错误" />} |
| | | {/* <ProFormText |
| | | fieldProps={{ |
| | | size: 'large', |
| | | prefix: <MobileOutlined />, |
| | | }} |
| | | name="mobile" |
| | | placeholder={intl.formatMessage({ |
| | | id: 'pages.login.phoneNumber.placeholder', |
| | | defaultMessage: '手机号', |
| | | })} |
| | | rules={[ |
| | | { |
| | | required: true, |
| | | message: ( |
| | | <FormattedMessage |
| | | id="pages.login.phoneNumber.required" |
| | | defaultMessage="请输入手机号!" |
| | | /> |
| | | ), |
| | | }, |
| | | { |
| | | pattern: /^1\d{10}$/, |
| | | message: ( |
| | | <FormattedMessage |
| | | id="pages.login.phoneNumber.invalid" |
| | | defaultMessage="手机号格式错误!" |
| | | /> |
| | | ), |
| | | }, |
| | | ]} |
| | | /> */} |
| | | |
| | | {/* <div |
| | | style={{ |
| | | marginBottom: 24, |
| | | }} |
| | | > |
| | | <ProFormCheckbox noStyle name="autoLogin"> |
| | | <FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" /> |
| | | </ProFormCheckbox> |
| | | <a |
| | | style={{ |
| | | float: 'right', |
| | | }} |
| | | > |
| | | <FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" /> |
| | | </a> |
| | | </div> */} |
| | | </LoginForm> |
| | | </div> |
| | | <EditPwd |
| | |
| | | |
| | | |
| | | export async function login(data) { |
| | | return request('/api/huacheng-sangeshenbian/sangeshenbian/systemUser/login', { |
| | | return request('/api/huacheng-sangeshenbian/systemUser/login', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | |
| | | .ant-pro-form-login-container{ |
| | | .ant-pro-form-login-container { |
| | | background-color: #fff; |
| | | border-radius: 23px; |
| | | padding: 45px 60px; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); |
| | | margin-left: 50px; |
| | | } |
| | | |
| | | .ant-pro-form-login-header { |
| | |
| | | height: 190px; |
| | | } |
| | | |
| | | |
| | | .ant-pro-form-login-top{ |
| | | width: 413px; |
| | | height: 167px; |
| | | margin-bottom: 64px; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | |
| | | .ant-pro-form-login-logo { |
| | | width: 190px; |
| | | height: 190px; |
| | | overflow: hidden; |
| | | margin-inline-end:0px |
| | | |
| | | .ant-pro-form-login-top { |
| | | display: none; |
| | | } |
| | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | console.log('fileList',fileList) |
| | | |
| | | values.picUrl = fileList[0].url |
| | | delete values.image |
| | | if (searchParams.get('id')) { |
| | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | console.log('fileList',fileList) |
| | | |
| | | values.picUrl = fileList[0].url |
| | | delete values.image |
| | | if (searchParams.get('id')) { |
| | |
| | | const { data } = response as unknown as ResponseStructure; |
| | | if (data?.code === 103 || data?.code === 401) { |
| | | localStorage.clear() |
| | | // history.replace('/login') |
| | | history.replace('/login') |
| | | return Promise.resolve(response) |
| | | } |
| | | if (data?.code != 200) { |