Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
| | |
| | | export default { |
| | | // BASE_URL: 'https://huacheng.psciio.com', |
| | | BASE_URL: 'http://192.168.110.188:6194', |
| | | imageUrl: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | uploadToken: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | imageUrl: 'https://huacheng.psciio.com/api/huacheng-applets/common/uploadimages', |
| | | } |
| | |
| | | { |
| | | "name": "三个身边", |
| | | "appid": "", |
| | | "appid": "__UNI__5950066", |
| | | "description": "", |
| | | "versionName": "1.0.0", |
| | | "versionCode": "100", |
| | |
| | | "treeShaking": { |
| | | "enable": false |
| | | } |
| | | }, |
| | | "router": { |
| | | "base": "./" |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
| | | |
| | | { |
| | | "path": "pages/index/index", |
| | | "style": { |
| | | "navigationBarTitleText": "首页", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/list/list", |
| | | "style": { |
| | | "navigationBarTitleText": "诉求列表", |
| | | "navigationBarBackgroundColor": "#fff" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/delay/delay", |
| | | "style": { |
| | | "navigationBarTitleText": "延期情况说明", |
| | | "navigationBarBackgroundColor": "#fff" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/progress/progress", |
| | | "style": { |
| | | "navigationBarTitleText": "办理进度", |
| | | "navigationBarBackgroundColor": "#fff" |
| | | } |
| | | }, |
| | | |
| | | { |
| | | "path": "pages/index/index", |
| | | "style": { |
| | | "navigationBarTitleText": "首页", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/list/list", |
| | | "style": { |
| | | "navigationBarTitleText": "诉求列表", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/delay/delay", |
| | | "style": { |
| | | "navigationBarTitleText": "延期情况说明", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/progress/progress", |
| | | "style": { |
| | | "navigationBarTitleText": "办理进度", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | |
| | | { |
| | | "path": "pages/add-progress/index", |
| | | "style": { |
| | | "navigationBarTitleText": "办理进度", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, { |
| | | "path": "pages/work-detail/work-detail", |
| | | "style": { |
| | | "navigationBarBackgroundColor": "#ffffff", |
| | | "navigationBarTitleText": "诉求详情", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work-detail/maxVideo", |
| | | "style": { |
| | | "navigationBarBackgroundColor": "#000000", |
| | | "navigationBarTitleText": "播放视频", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | |
| | | "path": "pages/problemReporting/problemReporting", |
| | | "style": { |
| | | "navigationBarTitleText": "问题上报", |
| | | "navigationBarBackgroundColor": "#ffffff" |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/dispatchWorkOrder/dispatchWorkOrder", |
| | | "style": { |
| | | "navigationBarTitleText": "工单下派", |
| | | "navigationBarBackgroundColor": "#ffffff" |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/Appeal/Appeal", |
| | | "style": { |
| | | "navigationBarTitleText": "诉求录入", |
| | | "navigationBarBackgroundColor": "#ffffff" |
| | | // "navigationBarTitleText": "诉求录入", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/location/location", |
| | | "style": { |
| | | "navigationBarTitleText": "选择地点", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | |
| | | "path": "pages/result-entry/index", |
| | | "style": { |
| | | "navigationBarTitleText": "办结结果录入", |
| | | "navigationBarBackgroundColor": "#ffffff" |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work-detail/postpone-apply", |
| | | "style": { |
| | | "navigationBarTitleText": "延期申请", |
| | | "navigationBarBackgroundColor": "#ffffff" |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/progress/progress", |
| | | "style": { |
| | | "navigationBarTitleText": "办理进度录入", |
| | | "navigationBarBackgroundColor": "#ffffff" |
| | | "navigationStyle": "custom" |
| | | } |
| | | } |
| | | ], |
| | |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">发生时间</text> |
| | | <view class=" flex a-center j-between flex1" @click="showDate=true"> |
| | | <input v-model="time" disabled @click="showDate=true" 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"> |
| | | <view class="flex1" v-if="time"> |
| | | {{time}} |
| | | </view> |
| | | <view class="flex1" v-else style="color: rgba(0,0,0,0.3);font-size:27rpx;"> |
| | | 请选择问题发生的时间 |
| | | </view> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">问题类型</text> |
| | | <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="请选择问题类型" /> |
| | | |
| | | <view class="flex1" v-if="problemType"> |
| | | {{problemType}} |
| | | </view> |
| | | <view class="flex1" v-else style="color: rgba(0,0,0,0.3);font-size:27rpx;"> |
| | | 请选择问题类型 |
| | | </view> |
| | | <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" @click="goTopagelocation()"> |
| | | <text class="w-108 fs-27 font-bold mr-85">地点</text> |
| | | <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="请选择问题发生具体地点" /> |
| | | |
| | | <view class="flex1" v-if="location"> |
| | | {{location}} |
| | | </view> |
| | | <view class="flex1" v-else style="color: rgba(0,0,0,0.3);font-size:27rpx;"> |
| | | 请选择问题发生具体地点 |
| | | </view> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | |
| | | save, |
| | | getproblem |
| | | } from './service.js' |
| | | import config from '@/config/index.js' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | images: [], |
| | | videos: [], |
| | | }; |
| | | }, |
| | | onReady() { |
| | | uni.setNavigationBarTitle({ |
| | | title: '诉求录入' |
| | | }) |
| | | }, |
| | | onLoad() { |
| | | this.getproblem() |
| | |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | url: config.imageUrl, |
| | | filePath: res.tempFilePaths[0], |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes'); |
| | |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | url: config.imageUrl, |
| | | filePath: res.tempFilePath, |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data).data, 'uploadFileRes'); |
| | |
| | | <template> |
| | | <view class="px-31 pt-38"> |
| | | <u-navbar placeholder title="办理进度" @leftClick="back"></u-navbar> |
| | | <view v-if="Object.keys(info).length != 0" class="br-19 bs-1 pt-21 pb-35 px-27 bgcolor2"> |
| | | <view class="flex a-center j-between fs-23 lh-33 font-bold"> |
| | | <view>诉求号:{{ info.serialNumber }}</view> |
| | |
| | | }) |
| | | }, |
| | | uploadImg(type) { |
| | | if (!this.againCklicFlag) return |
| | | // if (!this.againCklicFlag) return |
| | | this.againCklicFlag = false |
| | | if (type == 1) { |
| | | uni.chooseImage({ |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | }) |
| | | } |
| | | }, |
| | | fail: () => { |
| | | this.againCklicFlag = true |
| | | } |
| | | }) |
| | | } else { |
| | | uni.chooseVideo({ |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: cuni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | fail: () => { |
| | | this.againCklicFlag = true |
| | | } |
| | | }) |
| | | } |
| | |
| | | <text class="color2 fs-27" @click="showData =!showData">查看更多</text> |
| | | </view> |
| | | <view class="flex flex-wrap j-between"> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==1" @click="onClick()" > |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==1" @click="onClick()"> |
| | | <image class="w-94 h-77 ml-38" src="/static/home/img7.png" mode=""></image> |
| | | <text class="ml-37 font-bold">党员证件</text> |
| | | </view> |
| | |
| | | <image class="w-79 h-77 ml-38" src="/static/home/img1.png" mode=""></image> |
| | | <text class="ml-37 font-bold">回访评价</text> |
| | | </view> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==2"> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="member==2"> |
| | | <image class="w-81 h-77 ml-38" src="/static/home/img8.png" mode=""></image> |
| | | <text class="ml-37 font-bold">统计分析</text> |
| | | </view> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="showData&&member==1"> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" v-if="showData&&member==1"> |
| | | <image class="w-81 h-77 ml-38" src="/static/home/img8.png" mode=""></image> |
| | | <text class="ml-37 font-bold">统计分析</text> |
| | | </view> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" @click="onClick()" v-if="showData&&member==2"> |
| | | <view class="pt-38 pb-38 bg1 w-333 br-19 mt-19 flex a-center" @click="onClick()" |
| | | v-if="showData&&member==2"> |
| | | <image class="w-94 h-77 ml-38" src="/static/home/img7.png" mode=""></image> |
| | | <text class="ml-37 font-bold">党员证</text> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="list mt-29"> |
| | | <view v-if="isactive==1?msgList.length == 0:msgLists.length == 0" class="txt-center"> |
| | | <image src="../../static/空空如也@2x.png" mode="widthFix" class="w80"></image> |
| | | <view class="fs-23 mt-20 mb-20 color4">暂无数据</view> |
| | | </view> |
| | | <view class="flex a-center mb-27" v-for="item in isactive==1?msgList:msgLists" :key="item.id"> |
| | | <view class="avater pb-33"> |
| | | <image class="w-85 h-85 br50" src="/static/home/img9.png" mode=""></image> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <text class="flex j-center fs-27 color4 pb-48" @click="Allread">全部已读</text> |
| | | <text v-if="isactive==1?msgList.length > 0:msgLists.length > 0" |
| | | class="flex j-center fs-27 color4 pb-48" @click="Allread">全部已读</text> |
| | | |
| | | </view> |
| | | |
| | |
| | | } |
| | | |
| | | }, |
| | | onLoad() { |
| | | onLoad(e) { |
| | | if (e.token) { |
| | | uni.setStorageSync('token', 'Bearer ' + e.token) |
| | | } |
| | | this.getBanner() |
| | | this.getMessagelist() |
| | | this.getappletcinfo() |
| | |
| | | this.isLoading = false |
| | | } |
| | | this.msgListTotal = this.msgListTotal.map(item => { |
| | | const timeDifference = new Date().getTime() - new Date(item.createTime).getTime() |
| | | const timeDifference = new Date().getTime() - new Date(item.createTime) |
| | | .getTime() |
| | | // 使用 dayjs 的 duration 来处理时间差 |
| | | |
| | | |
| | |
| | | |
| | | return item |
| | | }) |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item |
| | | .promptType == |
| | | 2) |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item |
| | | .promptType == |
| | | 1) |
| | | this.noreadlists = this.msgLists.filter(item => item.readStatus === 0) |
| | | this.noreadlist = this.msgList.filter(item => item.readStatus === 0) |
| | |
| | | changeActive(value) { |
| | | this.isactive = value |
| | | if (value == 1) { |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == 2) |
| | | this.noreadlist = this.msgList.filter(item => item.readStatus === 0) |
| | | this.msgList = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | 2) |
| | | this.noreadlist = this.msgList.filter(item => item.readStatus === 0) |
| | | } else { |
| | | |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == 1) |
| | | this.msgLists = JSON.parse(JSON.stringify(this.msgListTotal)).filter(item => item.promptType == |
| | | 1) |
| | | this.noreadlists = this.msgLists.filter(item => item.readStatus === 0) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .bg-img { |
| | | height: 648rpx; |
| | | height: 550rpx; |
| | | } |
| | | |
| | | .swiper { |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <u-navbar title="选择地点" bgColor="transparent" titleStyle="font-size: 35rpx;font-weight:bold;" placeholder> |
| | | <view slot="left" @click="back"> |
| | | <image src="/static/location/back.png" class="w-19 h-35" mode=""></image> |
| | | </view> |
| | | </u-navbar> |
| | | <view slot="left" @click="back"> |
| | | <image src="/static/location/back.png" class="w-19 h-35" mode=""></image> |
| | | </view> |
| | | <view class="" id="container"> |
| | | |
| | | </view> |
| | |
| | | </view> |
| | | <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> |
| | | <text>{{item.title || item.name}}</text> |
| | | <text class="font-w500 fs-23 mt-25" |
| | | style="color: rgba(0, 0, 0, 0.6);">{{item.address || item.name}}</text> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | searchLocation |
| | | } from './service' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | keyword: '', |
| | | locationList: [], |
| | | city: '攀枝花市', |
| | | markers:[], |
| | | markers: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | | clearMarkers() { |
| | | // 清除所有标点 |
| | | this.markers.forEach((marker) => { |
| | | this.map.removeOverlay(marker); |
| | | }); |
| | | this.markers = []; // 清空存储标点的数组 |
| | | }, |
| | | clearMarkers() { |
| | | // 清除所有标点 |
| | | this.markers.forEach((marker) => { |
| | | this.map.removeOverlay(marker); |
| | | }); |
| | | this.markers = []; // 清空存储标点的数组 |
| | | }, |
| | | back() { |
| | | uni.navigateBack() |
| | | }, |
| | | |
| | | changeAdr(value, addr) { |
| | | console.log(value, addr, 'asdasdada'); |
| | | this.uid = value |
| | | const pages = getCurrentPages() |
| | | let prevPage = pages[pages.length - 2]; |
| | | prevPage.location = addr.address |
| | | prevPage.latitude = addr.point.lat |
| | | prevPage.longitude = addr.point.lng |
| | | |
| | | if (addr.point) { |
| | | prevPage.latitude = addr.point.lat |
| | | prevPage.longitude = addr.point.lng |
| | | } |
| | | if (addr.location) { |
| | | prevPage.latitude = addr.location.lat |
| | | prevPage.longitude = addr.location.lng |
| | | } |
| | | prevPage.location = addr.address || addr.name |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 200) |
| | |
| | | // 搜索地点 |
| | | searchLocation() { |
| | | if (!this.keyword) return; |
| | | searchLocation({ |
| | | query: this.keyword, |
| | | location: `${this.latitude},${this.longitude }`, |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.searchResults = res.data; |
| | | if (res.data.length > 0) { |
| | | this.latitude = res.data[0].location.lat |
| | | this.longitude = res.data[0].location.lng |
| | | } |
| | | this.locationList = res.data.map((result, index) => { |
| | | result.id = index + 1 |
| | | return result |
| | | }); |
| | | console.log(this.locationList); |
| | | } |
| | | }) |
| | | return |
| | | uni.request({ |
| | | url: `https://api.map.baidu.com/place/v2/search`, |
| | | method: 'GET', |
| | |
| | | item.id = index + 1 |
| | | return item |
| | | }) |
| | | |
| | | console.log(this.locationList); |
| | | }) |
| | | this.map.addEventListener('click', (e) => { |
| | | this.clearMarkers() |
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | // 地点搜索 |
| | | export const searchLocation = (params) => { |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/home/search-location`, params) |
| | | } |
| | |
| | | <view class="color1">{{ ["正在办理", "延期办理", "超时办理", "已办结", "群众撤销", "上报待审核", "上级驳回"][info.status] }}</view> |
| | | </view> |
| | | <view class="mx-13 mt-33 pt-35 pb-33 px-27 br-19 flex a-center j-between bgcolor1"> |
| | | <view class="fs-27 lh-38 color2">{{ info.detailedAddress }}</view> |
| | | <view class="fs-27 lh-38 color2">{{ info.location }}</view> |
| | | <image src="@/static/detailImg/dwei.png" class="w-31 h-31 shrink0" /> |
| | | </view> |
| | | <view class="flex a-center j-between mt-31 mx-13"> |
| | |
| | | <view class="flex1"> |
| | | <view class="flex a-center j-between mb-10"> |
| | | <view class="name">{{ item.createByName }}</view> |
| | | <view class="time">{{ item.createTime }}</view> |
| | | <view class="time">{{ item.createTime | formatTime }}</view> |
| | | </view> |
| | | <view class="context">{{ item.describe }}</view> |
| | | <view class="proImg"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from '../../uni_modules/uview-ui/libs/util/dayjs' |
| | | import { |
| | | getComplaintDetail |
| | | } from './service' |
| | |
| | | type: true, |
| | | } |
| | | }, |
| | | filters: { |
| | | formatTime(val) { |
| | | if (!val) return '' |
| | | return dayjs(val).format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | }, |
| | | onLoad(params) { |
| | | this.id = params.id |
| | | if (params.type) { |
| | |
| | | <view class="shrink0 color2 font-w400"> |
| | | <view>创建时间</view> |
| | | <view>问题类型</view> |
| | | <view>群众</view> |
| | | <view>群众姓名</view> |
| | | <view>联系电话</view> |
| | | <view>详细地址</view> |
| | | </view> |
| | | <view class="font-bold txt-aligin-r" style="max-width: 404rpx;"> |
| | | <view>{{ info.createTime }}</view> |
| | | <view>{{ info.createTime | formatTime }}</view> |
| | | <view>{{ info.problemType }}</view> |
| | | <view>{{ info.name }}</view> |
| | | <view>{{ info.contactNumber }}</view> |
| | |
| | | </view> |
| | | <view class="fs-27 mt-35 lh-38 font-bold">描述图片</view> |
| | | <view class="flex wrap mt-27"> |
| | | <view @tap="viewImage(item)" class="relative mr-15" v-for="item in info.images.split(',')" |
| | | :key="item"> |
| | | <view @tap="viewImage(item)" class="relative mr-15" |
| | | v-for="item in info.images && info.images.split(',')" :key="item"> |
| | | <image :src="item" class="w-140 h-140 shrink0 br-8" /> |
| | | <view class="absolute w-140 h-140 bgcolor5 top0 left0 br-8 flex a-center j-center"> |
| | | <image @tap="viewImage(item)" src="@/static/Appeal/amplify.png" class="w-19 h-19" /> |
| | |
| | | </view> |
| | | <view class="fs-27 mt-37 lh-38 font-bold">描述视频</view> |
| | | <view class="flex wrap mt-27"> |
| | | <view @tap="openVideo(item)" class="relative mr-15" v-for="item in info.videos.split(',')" |
| | | :key="item"> |
| | | <view @tap="openVideo(item)" class="relative mr-15" |
| | | v-for="item in info.videos && info.videos.split(',')" :key="item"> |
| | | <video id="myVideo" class="w-140 h-140 mt-19 shrink0" disabled :controls="false" |
| | | :show-center-play-btn="false" :src="item" /> |
| | | <view class="videoOpen" @click.stop="openVideo(item)"> |
| | |
| | | saveResult, |
| | | getComplaintDetail |
| | | } from './service' |
| | | import dayjs from '../../uni_modules/uview-ui/libs/util/dayjs' |
| | | import config from '@/config/index.js' |
| | | export default { |
| | | data() { |
| | |
| | | this.info = res.data |
| | | }) |
| | | }, |
| | | filters: { |
| | | formatTime(val) { |
| | | if (!val) return '' |
| | | return dayjs(val).format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | if (!this.status) { |
| | |
| | | mask: true |
| | | }) |
| | | } |
| | | if (this.completionImages.length == 0) { |
| | | return uni.showToast({ |
| | | title: '请上传办结结果图片', |
| | | icon: 'none', |
| | | mask: true |
| | | }) |
| | | } |
| | | if (this.completionVideos.length == 0) { |
| | | return uni.showToast({ |
| | | title: '请上传办结结果视频', |
| | | icon: 'none', |
| | | mask: true |
| | | }) |
| | | } |
| | | |
| | | saveResult({ |
| | | id: this.id, |
| | | status: this.status == '已办结' ? 3 : 4, |
| | |
| | | }) |
| | | }, |
| | | uploadImg(type) { |
| | | if (!this.againCklicFlag) return |
| | | // if (!this.againCklicFlag) return |
| | | this.againCklicFlag = false |
| | | if (type == 1) { |
| | | uni.chooseImage({ |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | <template> |
| | | <view> |
| | | <u-navbar title=" " bgColor="#000000" autoBack leftIconColor="#ffffff"> |
| | | </u-navbar> |
| | | <view class="preview-full"> |
| | | <video class="videoMax" :autoplay="true" :src="videoUrl" :show-fullscreen-btn="false"> |
| | | |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: config.uploadToken |
| | | Authorization: uni.getStorageSync('token') |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <u-navbar title="诉求详情" :bgColor="scoreTopHeight>100?'#ffffff':'transparent'" autoBack> |
| | | </u-navbar> |
| | | <view class="topColor"> |
| | | </view> |
| | | <view class="allContent"> |
| | |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | // alert(uni.getStorageSync('token')) |
| | | this.getDetailInfo() |
| | | }, |
| | | onLoad(params) { |
| | |
| | | getUserInfo().then(res => { |
| | | if (res.data == null) { |
| | | this.isParty = true |
| | | console.log('111111') |
| | | } |
| | | this.userInfo = { |
| | | ...res.data |
| | |
| | | |
| | | return new Promise(function(resolve, reject) { |
| | | |
| | | let token = |
| | | 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0ODk0OTc5Nzk5NDA4NjUsInR5cGUiOjEsImV4cCI6MTc0MTc2NDEyMiwiY3JlYXRlZCI6MTc0MDQ2ODEyMjU3MX0.LNEAn1IfHwgB0Xxr7AcDyBe9kKSGhW1R2EKvoIOymc0dAS8lMO7LLHfU9qB12e534cI2Cv8oummkOPI_70EO5w' |
| | | //党员 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0ODk0OTc5Nzk5NDA4NjUsInR5cGUiOjEsImV4cCI6MTc0MTc2NDEyMiwiY3JlYXRlZCI6MTc0MDQ2ODEyMjU3MX0.LNEAn1IfHwgB0Xxr7AcDyBe9kKSGhW1R2EKvoIOymc0dAS8lMO7LLHfU9qB12e534cI2Cv8oummkOPI_70EO5w |
| | | // 社区 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE1OTAxNzYwNTgxNTY1NDgwOTgsInR5cGUiOjEsImV4cCI6MTc0MTcwNTE1OSwiY3JlYXRlZCI6MTc0MDQwOTE1OTEwMH0.AmeZFq2Pj2y2bRF1AolsRWHA4ehobBdx1-LtQHIJzub8WjEh_TxZ-PTEI7uiujlLWKhJE07PCVCggAdeuF3UIA |
| | | // 市 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0MjE4MjgwODU4Mzc4MjYsInR5cGUiOjEsImV4cCI6MTc0MTY5ODg0OCwiY3JlYXRlZCI6MTc0MDQwMjg0ODMzN30.7IYRD37yTkhqcnKyXWcqKk_iTisMp3ar_ByfuVR7Go9rK8ZnGJrlwC3z4NF_ly7IIoBHgE2E4IAvfm3ccam8wg |
| | | //街道 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjY2OTc5LCJ0eXBlIjoxLCJleHAiOjE3NDE3MDU4NDMsImNyZWF0ZWQiOjE3NDA0MDk4NDMyNTZ9.MOPT3X3Cw9AUmeuIpqDA1a1xZd7V85NSraJddxCrPHvOkaZ8dMI-aUB9gqninzqsMzwmMx6phbD8aBpTlYcWwA |
| | | // 县级 eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjU2MDYyLCJ0eXBlIjoxLCJleHAiOjE3NDE3MDU5MTgsImNyZWF0ZWQiOjE3NDA0MDk5MTg3MDF9.k9ck3gWfVElSCl1uUI_5fZ3lEbFgtbQs_OaJku4I4bXoUO77kUnHsghkPBFdRknFHa49fTdAEdHn0wsb_XN5tg |
| | | let token = uni.getStorageSync('token') |
| | | let header = { |
| | | 'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json', |
| | | 'Authorization': 'Bearer ' + token, |
| | | 'Authorization': token, |
| | | 'lang': uni.getStorageSync('locale') === 'zh-Hans' ? 'zh_CN' : 'zh-tw', |
| | | } |
| | | const requestTask = uni.request({ |
| | |
| | | |
| | | const [unreadCount, setUnreadCount] = useState(0); |
| | | useEffect(() => { |
| | | const timer = setInterval(() => { |
| | | getUnreadCount().then((res: any) => { |
| | | setUnreadCount(res.data || 0); |
| | | }); |
| | | }, 1000 * 5) |
| | | // const timer = setInterval(() => { |
| | | // getUnreadCount().then((res: any) => { |
| | | // setUnreadCount(res.data || 0); |
| | | // }); |
| | | // }, 1000 * 5) |
| | | |
| | | return () => clearInterval(timer); |
| | | // return () => clearInterval(timer); |
| | | }, []); |
| | | |
| | | |
| | |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { Button, message, Space } from 'antd'; |
| | | import { Button, message, Space, Select } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { Access, history, useAccess } from 'umi'; |
| | | import { getList, updateStatus, deleteBanner } from './service' |
| | | import { getList, setStatus } from './service' |
| | | const Banner = () => { |
| | | |
| | | const actionRef = useRef(); |
| | |
| | | const columns = [ |
| | | { |
| | | title: '诉求标题', |
| | | dataIndex: 'bannerName' |
| | | dataIndex: 'title' |
| | | }, |
| | | { |
| | | title: '承办者', |
| | | dataIndex: 'bannerName1' |
| | | dataIndex: 'undertakerUser' |
| | | }, |
| | | { |
| | | title: '联系方式', |
| | | dataIndex: 'bannerName' |
| | | dataIndex: 'phone' |
| | | }, |
| | | { |
| | | title: '所在单位', |
| | | dataIndex: 'bannerName' |
| | | dataIndex: 'department', |
| | | renderFormItem: (_, { type, defaultRender, ...rest }, form) => { |
| | | return ( |
| | | <Select |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | filterOption={false} |
| | | options={[{ label: '市级', value: '1' }, { label: '区县', value: '2' }, { label: '街道', value: '3' }, { label: '社区', value: '4' }, { label: '党员', value: '5' }]} |
| | | > |
| | | </Select > |
| | | ) |
| | | }, |
| | | render: (_, record) => { |
| | | return record.department |
| | | } |
| | | }, |
| | | { |
| | | title: '所属职位', |
| | | dataIndex: 'bannerName' |
| | | dataIndex: 'position', |
| | | renderFormItem: (_, { type, defaultRender, ...rest }, form) => { |
| | | return ( |
| | | <Select |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | filterOption={false} |
| | | options={[{ label: '市级', value: '1' }, { label: '区县', value: '2' }, { label: '街道', value: '3' }, { label: '社区', value: '4' }, { label: '党员', value: '5' }]} |
| | | > |
| | | </Select > |
| | | ) |
| | | }, |
| | | render: (_, record) => { |
| | | return record.position |
| | | } |
| | | }, |
| | | { |
| | | title: '诉求应处理时间', |
| | | dataIndex: 'bannerName', |
| | | dataIndex: 'responseTime', |
| | | hideInSearch: true, |
| | | }, |
| | | { |
| | | title: '提示类型', |
| | | dataIndex: 'bannerName', |
| | | dataIndex: 'promptType', |
| | | hideInSearch: true, |
| | | valueEnum: { |
| | | '1': { text: '临期提醒' }, |
| | | '2': { text: '超时提醒' }, |
| | | } |
| | | }, |
| | | |
| | | { |
| | | title: '状态', |
| | | dataIndex: 'listingStatus', |
| | | dataIndex: 'readStatus', |
| | | hideInSearch: true, |
| | | valueEnum: { |
| | | '上架中': { text: '已读' }, |
| | | '已下架': { text: '未读' }, |
| | | '1': { text: '已读' }, |
| | | '0': { text: '未读' }, |
| | | } |
| | | }, |
| | | { |
| | |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | | let status = await sendRequest(deleteBanner, record.id) |
| | | let status = await sendRequest(setStatus, record.id) |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | | } |
| | | }, '确认标记已读所选信息吗?'); |
| | | }, '确认将所选信息标记为已读吗?'); |
| | | }} |
| | | > |
| | | 标记已读 |
| | |
| | | |
| | | // 列表 |
| | | export const getList = async (data) => { |
| | | return request(`/promotion/mgt/promotion-banner/page`, { |
| | | method: 'POST', |
| | | return request(`/api/huacheng-sangeshenbian/messageNotification/list`, { |
| | | method: 'GET', |
| | | data |
| | | }); |
| | | } |
| | | // 详情 |
| | | export const getDetail = async (id) => { |
| | | return request(`/promotion/mgt/promotion-banner/detail/${id}`, { |
| | | method: 'GET', |
| | | // 设置已读 |
| | | export const setStatus = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/messageNotification/read/${id}`, { |
| | | method: 'PUT', |
| | | // data |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 详情列表 |
| | | export const getDetailList = async (data) => { |
| | | return request(`/goods/mgt/goods-sku/page`, { |
| | |
| | | */ |
| | | const okHandle = () => { |
| | | form.validateFields().then((values) => { |
| | | if (editData.deptId) { |
| | | values.deptId = editData.deptId; |
| | | if (editData.id) { |
| | | values.id = editData.id; |
| | | onUpdate(values); |
| | | } else { |
| | | onSave(values); |
| | |
| | | > |
| | | <Form layout="horizontal" {...formItemLayout} form={form} initialValues={{ isAuctioneer: 1 }}> |
| | | <Form.Item |
| | | name="deptName" |
| | | name="name" |
| | | required |
| | | label="职位名称" |
| | | rules={[{ required: true, message: '请输入职位名称' }]} |
| | |
| | | import { useRef, useState } from 'react'; |
| | | import { Access, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/addAndEdit'; |
| | | import { add, edit, del, getList, updateStatus, resetPaswword } from './service'; |
| | | import { add, edit, del, getList } from './service'; |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | |
| | | const columns = [ |
| | | { |
| | | title: '职位名称', |
| | | dataIndex: 'deptName', |
| | | dataIndex: 'name', |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | columns={columns} |
| | | pagination={false} |
| | | request={async (params) => { |
| | | return await buildProTableDataSource(getList, params); |
| | | return buildProTableDataSource(getList, params); |
| | | }} |
| | | toolBarRender={(action, selectRows) => [ |
| | | <Space> |
| | |
| | | import { request } from '@umijs/max'; |
| | | |
| | | // 分页获取部门列表 |
| | | export const getList = async (data) => { |
| | | return request(`/system/dept/list`, { |
| | | export const getList = async (params) => { |
| | | console.log('111111111111',params); |
| | | |
| | | return request(`/api/huacheng-sangeshenbian/systemPost/list`, { |
| | | method: 'GET', |
| | | params:data |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // 新增部门 |
| | | export const add = async (data) => { |
| | | return request('/system/dept', { |
| | | return request('/api/huacheng-sangeshenbian/systemPost/add', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | |
| | | |
| | | // 修改部门 |
| | | export const edit = async (data) => { |
| | | return request('/system/dept', { |
| | | method: 'PUT', |
| | | return request('/api/huacheng-sangeshenbian/systemPost/edit', { |
| | | method: 'POST', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | // 删除部门管理 |
| | | export const del = async (data) => { |
| | | return request(`/system/dept/${data}`, { |
| | | return request(`/api/huacheng-sangeshenbian/systemPost/delete/${data.id}`, { |
| | | method: 'DELETE', |
| | | }); |
| | | } |
| | |
| | | import { Form, Input, Modal, Tree, Button, Spin, Row, Col, Select } from 'antd'; |
| | | import { Form, Input, Modal, Tree, Button, Spin, Row, Col, Select, Radio } from 'antd'; |
| | | import { forwardRef, useImperativeHandle, useState } from 'react'; |
| | | import { useEffect } from 'react'; |
| | | import { getTree, getAddTree } from '../service'; |
| | | import { getDepartmentList } from '../service'; |
| | | import { Color } from 'antd/es/color-picker'; |
| | | const formItemLayout = { |
| | | labelCol: { span: 8 }, |
| | |
| | | //所属角色 |
| | | const [roleList, setRoleList] = useState([]) |
| | | //账号层级 |
| | | const [levelList, setLevelList] = useState([]) |
| | | const [levelList, setLevelList] = useState([{ name: '市级账号', value: 1 }, { name: '区县账号', value: 2 }, { name: '街道账号', value: 3 }, { name: '社区账号', value: 4 }, { name: '党员账号', value: 5 }]) |
| | | //所属区县 |
| | | const [countyList, setCountyList] = useState([]) |
| | | //所属街道 |
| | |
| | | |
| | | |
| | | useEffect(() => { |
| | | // 获取权限树 |
| | | getAddTree().then(res => { |
| | | setTreeData(res.data) |
| | | // 获取单位 |
| | | getDepartmentList(1).then(res => { |
| | | setOneCompanyList(() => res.data) |
| | | }) |
| | | getDepartmentList(2).then(res => { |
| | | setTwoCompanyList(() => res.data) |
| | | }) |
| | | getDepartmentList(3).then(res => { |
| | | setThreeCompanyList(() => res.data) |
| | | }) |
| | | getDepartmentList(4).then(res => { |
| | | setThreeCompanyList(() => res.data) |
| | | }) |
| | | }, []) |
| | | |
| | |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="oneDepartmentId" |
| | | label="所属一级单位" |
| | | rules={[{ required: true, message: '请选择所属一级单位' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={oneCompanyList} |
| | | options={oneCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="twoDepartmentId" |
| | | label="所属二级单位" |
| | | rules={[{ required: true, message: '请选择所属二级单位' }]} |
| | | > |
| | | <Select |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={twoCompanyList} |
| | | options={twoCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="threeDepartmentId" |
| | | label="所属三级单位" |
| | | rules={[{ required: true, message: '请选择所属三级单位' }]} |
| | | > |
| | | <Select |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={threeCompanyList} |
| | | options={threeCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="fourDepartmentId" |
| | | label="所属四级单位" |
| | | rules={[{ required: true, message: '请选择所属四级单位' }]} |
| | | > |
| | | <Select |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={fourCompanyList} |
| | | options={fourCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="systemPostId" |
| | | label="所属职位" |
| | | rules={[{ required: true, message: '请选择所属职位' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={positionList} |
| | | options={positionList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="systemRoleId" |
| | | label="所属角色" |
| | | rules={[{ required: true, message: '请选择所属角色' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={roleList} |
| | | options={roleList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="accountLevel" |
| | | label="账号层级" |
| | | rules={[{ required: true, message: '请选择账号层级' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={levelList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | options={levelList} |
| | | fieldNames={{ label: 'name', value: 'value' }} |
| | | // filterOption={false} |
| | | > |
| | | </Select > |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={16}> |
| | | {/* <div style={{ display: "flex",flex:1 }}> */} |
| | | <Form.Item |
| | | label="是否管理员" |
| | | labelCol={{ span: 4 }} |
| | | wrapperCol={{ span: 20 }} |
| | | style={{marginBottom:0}} |
| | | style={{ marginBottom: 0 }} |
| | | > |
| | | <div style={{ display: "flex", flex: 1 }}> |
| | | <Form.Item |
| | | name="name" |
| | | rules={[{ required: true, message: '请选择账号层级' }]} |
| | | name="isAdmin" |
| | | rules={[{ required: true, message: '是否管理员' }]} |
| | | > |
| | | <Select |
| | | key="searchSelect" |
| | | allowClear |
| | | style={{width:'280px'}} |
| | | placeholder="请选择" |
| | | dataSource={levelList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | | </Select > |
| | | <Radio.Group |
| | | // style={style} |
| | | // onChange={onChange} |
| | | // value={value} |
| | | options={[{ value: 1, label: '否', }, { value: 2, label: '是', }, |
| | | |
| | | ]} |
| | | /> |
| | | </Form.Item> |
| | | <div style={{fontSize:'12px',Color:"rgba(0,0,0,0.5)"}}>管理员主要用于接收实现临期提醒,以及上级端登录</div> |
| | | <div style={{ fontSize: '12px', color: "rgba(0,0,0,0.5)", marginLeft: "10px" }}>管理员主要用于接收实现临期提醒,以及上级端登录</div> |
| | | </div> |
| | | |
| | | |
| | | </Form.Item> |
| | | |
| | | {/* <div>管理员主要用于接收实现临期提醒,以及上级端登录</div> |
| | | </div> */} |
| | | </Col> |
| | | </Row> |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="districts" |
| | | label="所属区县" |
| | | rules={[{ required: true, message: '请选择所属区县' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={oneCompanyList} |
| | | options={oneCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="street" |
| | | label="所属街道" |
| | | rules={[{ required: true, message: '请选择所属街道' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={twoCompanyList} |
| | | options={twoCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | name="name" |
| | | name="community" |
| | | label="所属社区" |
| | | rules={[{ required: true, message: '请选择所属社区' }]} |
| | | > |
| | |
| | | key="searchSelect" |
| | | allowClear |
| | | placeholder="请选择" |
| | | dataSource={threeCompanyList} |
| | | options={threeCompanyList} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | filterOption={false} |
| | | > |
| | |
| | | </Row> |
| | | <Row> |
| | | <Col span={16}> |
| | | <div style={{ display: 'flex' }}> |
| | | |
| | | </div> |
| | | <Form.Item |
| | | label="联系方式" |
| | | labelCol={{ span: 4 }} |
| | | wrapperCol={{ span: 20 }} |
| | | style={{ marginBottom: 0 }} |
| | | > |
| | | <div style={{ display: "flex", flex: 1 }}> |
| | | <Form.Item |
| | | name="phone" |
| | | rules={[{ |
| | | validator: (rule, value) => { |
| | | return new Promise((resolve, reject) => { |
| | | if (!value) { |
| | | reject('请输入联系方式'); |
| | | } |
| | | const phoneRegex = /^((\+86)?(13|14|15|16|17|18|19)[0-9]{9})|((\+86)?(0[0-9]{2,3})?([2-9][0-9]{6,7}))$/; |
| | | if (!phoneRegex.test(value)) { |
| | | reject('请输入正确的电话号码'); |
| | | } |
| | | resolve(''); |
| | | }); |
| | | }, |
| | | }]} |
| | | > |
| | | <Input disabled={detailType} placeholder='请输入联系方式' /> |
| | | </Form.Item> |
| | | <div style={{ fontSize: '12px', color: "rgba(0,0,0,0.5)", marginLeft: "10px" }}>联系方式将作为登录账号使用</div> |
| | | </div> |
| | | </Form.Item> |
| | | </Col> |
| | | |
| | | </Row> |
| | | <Row> |
| | | <Col span={8}> |
| | | <Form.Item |
| | | required |
| | | name="password" |
| | | label="登录密码" |
| | | rules={[{ |
| | | validator: (rule, value) => { |
| | | return new Promise((resolve, reject) => { |
| | | if (!value) { |
| | | reject('请输入新密码'); |
| | | } |
| | | const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/; |
| | | if (!passwordRegex.test(value)) { |
| | | reject('密码需要包含大小写字母,数字和特殊符号,且长度为8位以上'); |
| | | } |
| | | resolve(''); |
| | | }); |
| | | }, |
| | | }]} |
| | | > |
| | | <Input.Password disabled={detailType} placeholder='请输入' /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Col span={16}> |
| | | <Form.Item |
| | | label="确认密码" |
| | | required |
| | | labelCol={{ span: 4 }} |
| | | wrapperCol={{ span: 20 }} |
| | | style={{ marginBottom: 0 }} |
| | | > |
| | | <div style={{ display: "flex", flex: 1 }}> |
| | | <Form.Item |
| | | name="surePassword" |
| | | rules={[{ |
| | | validator: (rule, value) => { |
| | | return new Promise((resolve, reject) => { |
| | | if (!value) { |
| | | reject('请再次输入新密码'); |
| | | } |
| | | if (value != form.getFieldValue('password')) { |
| | | reject('两次密码请保持一致'); |
| | | } |
| | | resolve(''); |
| | | }); |
| | | }, |
| | | },]} |
| | | > |
| | | <Input.Password disabled={detailType} placeholder='请输入' /> |
| | | </Form.Item> |
| | | <div style={{ fontSize: '12px', color: "rgba(0,0,0,0.5)", marginLeft: "10px" }}>密码需要包含大小写字母,数字和特殊符号,且长度为8位以上</div> |
| | | </div> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | // 根据单位层级查询单位数据 |
| | | export const getDepartmentList = async (tier) => { |
| | | return request(`/api/huacheng-sangeshenbian/department/getDepartmentList/${tier}`, { |
| | | method: 'GET', |
| | | }); |
| | | } |
| | | // 获取职位列表数据 |
| | | export const systemPostList = async (tier) => { |
| | | return request(`/api/huacheng-sangeshenbian/systemPost/list`, { |
| | | method: 'GET', |
| | | }); |
| | | } |
| | | |
| | | // 获取角色列表数据 |
| | | export const systemRoleList = async (tier) => { |
| | | return request(`/api/huacheng-sangeshenbian/systemRole/list`, { |
| | | method: 'GET', |
| | | }); |
| | | } |
| | |
| | | |
| | | |
| | | // import AddAndEdit from './components/addAndEdit'; |
| | | // import { getConfig, saveConfig } from './service'; |
| | | import { getSetting, addSetting } from './service'; |
| | | // const TabPane = Tabs.TabPane; |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | |
| | | const addViewRef1 = useRef(); |
| | | const [form] = Form.useForm(); |
| | | const [tab, setTab] = useState('1'); |
| | | const [modalVisible, handleModalVisible] = useState(false); |
| | | const [selectedRowKeys, setSelectedRowKeys] = useState([]); |
| | | const changeStatusRef = useRef(); |
| | | const [addWarnVisible, handleAddWarnVisible] = useState(false); |
| | | const [dataSource, setDataSource] = useState([]); |
| | | const [data, setData] = useState([]); |
| | | const access = useAccess(); |
| | | |
| | | useEffect(() => { |
| | | getSetting().then(res => { |
| | | if (res.code === 200) { |
| | | setData(res.data); |
| | | form.setFieldsValue(res.data); |
| | | } |
| | | }) |
| | | }, []) |
| | | |
| | | const save = () => { |
| | | form.validateFields().then(async (values) => { |
| | | |
| | | values.id = 1 |
| | | sendRequest(addSetting, values).then(res => { |
| | | if (res.code === 200) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | }; |
| | | |
| | |
| | | </span><span style={{ marginLeft: 8, color: '#a5a5a5' }}>超过时间未处理诉求,系统自动对该事件承办者发送短信提醒,并知会至上一级管理层进行督办。 |
| | | </span></div> |
| | | <Space style={{ marginTop: 20, display: 'flex', flexWrap: 'wrap' }}> |
| | | <Form.Item label="市级账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="市级账号" name="cityHandlingTime" rules={ |
| | | [{ required: true, message: '请输入市级账号' }] |
| | | }> |
| | | <InputNumber controls={false} precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="区县账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="区县账号" name="districtHandlingTime" rules={ |
| | | [{ required: true, message: '请输入区县账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="街道账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="街道账号" name="streetHandlingTime" rules={ |
| | | [{ required: true, message: '请输入街道账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="社区账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="社区账号" name="communityHandlingTime" rules={ |
| | | [{ required: true, message: '请输入社区账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="党员账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="党员账号" name="partyMemberHandlingTime" rules={ |
| | | [{ required: true, message: '请输入党员账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | |
| | | </span></div> |
| | | <Space style={{ marginTop: 20, display: 'flex', flexWrap: 'wrap' }}> |
| | | |
| | | <Form.Item label="市级账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="市级账号" name="cityDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入市级账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="区县账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="区县账号" name="districtDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入区县账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="街道账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="街道账号" name="streetDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入街道账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="社区账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="社区账号" name="communityDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入社区账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="党员账号" name="isAuctioneer" rules={ |
| | | <Form.Item label="党员账号" name="partyMemberDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入党员账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | |
| | | <div style={{ marginBottom: 20 }}><span style={{ fontSize: '14px', fontWeight: 600 }}>*诉求处理时间: |
| | | </span><span style={{ marginLeft: 8, color: '#a5a5a5' }}>超过时间未处理诉求,系统自动对该事件承办者发送短信提醒,并知会至上一级管理层进行督办。 |
| | | </span></div> |
| | | <Form.Item label="添加后处理时间" name="isAuctioneer" rules={ |
| | | <Form.Item label="添加后处理时间" name="demandProcessingTime" rules={ |
| | | [{ required: true, message: '请输入添加后处理时间' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | |
| | | </Card> |
| | | <Access accessible={access['/work_order_transaction_management/work_order_item_configuration/save'] || false}> |
| | | <div style={{ marginTop: 20, display: 'flex', justifyContent: 'center' }}> |
| | | <Button type="primary" htmlType="submit" style={{ marginRight: 20 }}> |
| | | <Button type="primary" htmlType="submit" style={{ marginRight: 20 }} onClick={() => {save()}} > |
| | | 保存 |
| | | </Button> |
| | | </div> |
New file |
| | |
| | | import { request } from '@umijs/max'; |
| | | |
| | | // 获取工单事项配置 |
| | | export const getSetting = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/workOrderItemConfig/getWorkOrderItemConfigInfo`, { |
| | | method: 'GET', |
| | | params:data |
| | | }); |
| | | } |
| | | |
| | | // 配置工单事项配置 |
| | | export const addSetting = async (data) => { |
| | | return request(`/api/huacheng-sangeshenbian/workOrderItemConfig/addWorkOrderItemConfig`, { |
| | | method: 'POST', |
| | | data |
| | | }); |
| | | } |
| | |
| | | import { PageContainer, } from '@ant-design/pro-components'; |
| | | import { Button, Select, Row, Col, Input, Card, Space, Form, Upload, Spin, message, InputNumber } from 'antd'; |
| | | import { useState, useEffect } from 'react'; |
| | | import { addAndEdit, getDetail } from '../service'; |
| | | import { add,Edit, getDetail } from '../service'; |
| | | import { history, useLocation } from 'umi'; |
| | | import { customRequest } from '@/utils/utils'; |
| | | const AddOrEditOrDetail = () => { |
| | | |
| | | const [form] = Form.useForm(); |
| | | const [fileList, setFileList] = useState([])//banner图片 |
| | | const [loading, setLoading] = useState(false); |
| | | const { search } = useLocation(); |
| | | const searchParams = new URLSearchParams(search); |
| | | |
| | | const config = { |
| | | name: 'file', |
| | | action: BASE_URL + '/file/obs/upload', |
| | | headers: { |
| | | authorization: localStorage.getItem('token'), |
| | | }, |
| | | }; |
| | | const formItemLayout = { |
| | | labelCol: { span: 6 }, |
| | | wrapperCol: { span: 20 }, |
| | | }; |
| | | const uploadButton = (text) => { |
| | | return <div> |
| | | <PlusOutlined /> |
| | | <div |
| | | style={{ |
| | | marginTop: 8, |
| | | }} |
| | | > |
| | | </div> |
| | | </div> |
| | | }; |
| | | useEffect(() => { |
| | | if (searchParams.get('id')) { |
| | | getDetail( searchParams.get('id') ).then(res => { |
| | | if (res.data.picUrl) { |
| | | let obj = [{ |
| | | uid: 1, |
| | | name: 'banner', |
| | | url: res.data.picUrl |
| | | }] |
| | | setFileList(obj) |
| | | } |
| | | form.setFieldsValue(res.data) |
| | | }) |
| | | } |
| | | }, []) |
| | | |
| | | // 上传banner前 |
| | | const beforeUpload = (file) => { |
| | | return new Promise(async (resolve, reject) => { |
| | | if (file.name.includes(',')) { |
| | | message.warning('上传文件不能包含英文逗号(,)') |
| | | return Upload.LIST_IGNORE |
| | | } |
| | | setLoading(true) |
| | | resolve(file) |
| | | }); |
| | | }; |
| | | // 上传banner |
| | | const handleChange = ({ file: file, fileList: newFileList }) => { |
| | | if (file.status == 'error') { |
| | | setLoading(false) |
| | | setFileList([]) |
| | | message.error('上传失败') |
| | | return |
| | | } |
| | | if (file.status == 'done') { |
| | | setLoading(false) |
| | | message.success('上传成功') |
| | | } |
| | | newFileList.map((item) => { |
| | | if (!item.url && item.status == 'done') { |
| | | item.url = item.response.data; |
| | | } |
| | | }); |
| | | setFileList(newFileList); |
| | | }; |
| | | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | |
| | | values.picUrl = fileList[0].url |
| | | delete values.image |
| | | if (searchParams.get('id')) { |
| | | values.id = searchParams.get('id') |
| | | let state = await sendRequest(addAndEdit, values) |
| | | if (state) { |
| | | history.back() |
| | | } |
| | | return |
| | | } |
| | | let state = await sendRequest(addAndEdit, values) |
| | | if (state) { |
| | | history.back() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | return ( |
| | | <PageContainer title={searchParams.get('detail') ? '查看详情' : searchParams.get('id') ? '编辑banner' : '添加banner'}> |
| | | <Spin spinning={loading}> |
| | |
| | | <Row> |
| | | <Col span={12}> |
| | | <Form.Item |
| | | name="bannerName" |
| | | name="name" |
| | | label='banner名称' rules={[ |
| | | { |
| | | required: true, |
New file |
| | |
| | | import { Form, Input, Modal, Select, Upload, Space, Button, message } from 'antd'; |
| | | import { sendRequest } from '@/utils/antdUtils'; |
| | | import { LoadingOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'; |
| | | import { customRequest } from '@/utils/utils'; |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { span: 7 }, |
| | | wrapperCol: { span: 12 }, |
| | | }; |
| | | |
| | | const AddEditView = ({ visible, onSave, onUpdate, onCancel, }, ref) => { |
| | | const [form] = Form.useForm(); |
| | | const [fileList, setFileList] = useState([])//banner图片 |
| | | const [loading, setLoading] = useState(false); |
| | | const [editData, setEditData] = useState({}) |
| | | |
| | | const config = { |
| | | name: 'file', |
| | | action: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | headers: { |
| | | authorization: localStorage.getItem('token'), |
| | | }, |
| | | }; |
| | | const formItemLayout = { |
| | | labelCol: { span: 6 }, |
| | | wrapperCol: { span: 20 }, |
| | | }; |
| | | const uploadButton = (text) => { |
| | | return <div> |
| | | <PlusOutlined /> |
| | | <div |
| | | style={{ |
| | | marginTop: 8, |
| | | }} |
| | | > |
| | | </div> |
| | | </div> |
| | | }; |
| | | |
| | | useImperativeHandle(ref, () => { |
| | | return { |
| | | refreshData: (data) => { |
| | | form.resetFields(); |
| | | form.setFieldsValue(data); |
| | | setEditData(data); |
| | | if (data.id) { |
| | | getDetail(data.id).then(res => { |
| | | if (res.data.url) { |
| | | let obj = [{ |
| | | uid: 1, |
| | | name: 'banner', |
| | | url: res.data.url |
| | | }] |
| | | setFileList(obj) |
| | | } |
| | | form.setFieldsValue(res.data) |
| | | }) |
| | | } |
| | | }, |
| | | clean: () => { |
| | | form.resetFields(); |
| | | }, |
| | | }; |
| | | }); |
| | | |
| | | // 上传banner前 |
| | | const beforeUpload = (file) => { |
| | | return new Promise(async (resolve, reject) => { |
| | | if (file.name.includes(',')) { |
| | | message.warning('上传文件不能包含英文逗号(,)') |
| | | return Upload.LIST_IGNORE |
| | | } |
| | | setLoading(true) |
| | | resolve(file) |
| | | }); |
| | | }; |
| | | // 上传banner |
| | | const handleChange = ({ file: file, fileList: newFileList }) => { |
| | | console.log('11111111111111', file) |
| | | if (file.status == 'error' || (file.status == 'done' && file.response.code != 200)) { |
| | | setLoading(false) |
| | | setFileList([]) |
| | | message.error('上传失败') |
| | | return |
| | | } |
| | | if (file.status == 'done') { |
| | | setLoading(false) |
| | | message.success('上传成功') |
| | | } |
| | | newFileList.map((item) => { |
| | | if (!item.url && item.status == 'done' && item.response.code == 200) { |
| | | item.url = item.response.data; |
| | | } |
| | | }); |
| | | setFileList(newFileList); |
| | | }; |
| | | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | |
| | | values.url = fileList[0].url |
| | | delete values.image |
| | | if (editData.id) { |
| | | values.id = editData.id |
| | | let state = await sendRequest(add, values) |
| | | if (state) { |
| | | history.back() |
| | | } |
| | | return |
| | | } |
| | | let state = await sendRequest(Edit, values) |
| | | if (state) { |
| | | history.back() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | return ( |
| | | <Modal |
| | | getContainer={false} |
| | | width="25%" |
| | | destroyOnClose |
| | | title={editData.id ? '编辑banner' : '添加banner'} |
| | | open={visible} |
| | | onCancel={() => onCancel(false)} |
| | | onOk={submit} |
| | | > |
| | | <Form scrollToFirstError layout="horizontal" {...formItemLayout} form={form}> |
| | | |
| | | <Form.Item |
| | | name="name" |
| | | label='banner名称' rules={[ |
| | | { |
| | | required: true, |
| | | message: '请输入banner名称', |
| | | }, |
| | | ]} |
| | | > |
| | | <Input disabled={editData.type == 'detail'} placeholder='请输入banner名称'></Input> |
| | | </Form.Item> |
| | | |
| | | <Form.Item |
| | | name="image" |
| | | label="banner图片" |
| | | extra={ |
| | | <div> |
| | | <div>推荐尺寸732px * 320px</div> |
| | | </div> |
| | | } |
| | | rules={[ |
| | | { |
| | | required: fileList.length == 0 ? true : false, |
| | | message: '请上传banner图片', |
| | | }, |
| | | ]} |
| | | > |
| | | <Upload |
| | | {...config} |
| | | listType="picture-card" |
| | | maxCount={1} |
| | | beforeUpload={beforeUpload} |
| | | onChange={handleChange} |
| | | showUploadList={{ |
| | | showPreviewIcon: false, |
| | | }} |
| | | // customRequest={customRequest} |
| | | // accept="image/png, image/jpeg, image/jpg" |
| | | fileList={fileList} |
| | | disabled={editData.type == 'detail'} |
| | | > |
| | | {fileList?.length == 1 || editData.type == 'detail' ? null : uploadButton()} |
| | | </Upload> |
| | | </Form.Item> |
| | | </Form> |
| | | </Modal> |
| | | ); |
| | | }; |
| | | |
| | | export default forwardRef(AddEditView); |
| | |
| | | import { Button, message, Space } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { Access, history, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/index'; |
| | | import { getList, updateStatus, deleteBanner } from './service' |
| | | const Banner = () => { |
| | | |
| | | const actionRef = useRef(); |
| | | const access = useAccess(); |
| | | const addViewRef = useRef(); |
| | | const [modalVisible, handleModalVisible] = useState(false); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: 'banner名称', |
| | | dataIndex: 'bannerName' |
| | | dataIndex: 'name' |
| | | }, |
| | | // { |
| | | // title: '添加时间', |
| | | // dataIndex: 'createTime', |
| | | // hideInSearch: true, |
| | | // }, |
| | | // { |
| | | // title: '排序', |
| | | // dataIndex: 'sortNum', |
| | | // hideInSearch: true, |
| | | // }, |
| | | // { |
| | | // title: '状态', |
| | | // dataIndex: 'listingStatus', |
| | | // valueEnum: { |
| | | // '上架中': { text: '上架中' }, |
| | | // '已下架' : { text: '已下架' }, |
| | | // } |
| | | // }, |
| | | { |
| | | title: '操作', |
| | | hideInSearch: true, |
| | |
| | | 删除 |
| | | </Button> |
| | | </Access> |
| | | {/* <Button |
| | | type="link" |
| | | onClick={() => { |
| | | history.push( `/marketing/banner/add?id=${record.id}&detail=true`); |
| | | }} |
| | | > |
| | | 查看详情 |
| | | </Button> |
| | | { |
| | | record.listingStatus == '已下架' && |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | | let status = await sendRequest(updateStatus, { id: record.id, listingStatus: '上架中' }) |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | | } |
| | | }, '确认上架所选信息吗?'); |
| | | }} |
| | | > |
| | | 上架 |
| | | </Button> |
| | | } |
| | | { |
| | | record.listingStatus == '上架中' && |
| | | <Button |
| | | type="link" |
| | | onClick={async () => { |
| | | showDelConfirm(async () => { |
| | | let status = await sendRequest(updateStatus, { id: record.id, listingStatus: '已下架' }) |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | | } |
| | | }, '确认下架所选信息吗?'); |
| | | }} |
| | | > |
| | | 下架 |
| | | </Button> |
| | | } */} |
| | | </Space > |
| | | ); |
| | | }, |
| | |
| | | defaultPageSize: 10, |
| | | }} |
| | | request={(params) => { |
| | | params.bannerType = Number(params.bannerType) |
| | | return buildProTableDataSource(getList, params) |
| | | }} |
| | | toolBarRender={(action, selectRows) => [ |
| | |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | | history.push({ |
| | | pathname: `/marketing/banner/add`, |
| | | }); |
| | | addViewRef.current.refreshData({}); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 添加 |
| | |
| | | </Space> |
| | | ]} |
| | | /> |
| | | <AddAndEdit |
| | | ref={addViewRef} |
| | | visible={modalVisible} |
| | | onCancel={() => handleModalVisible(false)} |
| | | onSave={async (fileds) => { |
| | | const success = await sendRequest(add, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | const success = await sendRequest(Edit, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | /> |
| | | </PageContainer> |
| | | </div>; |
| | | }; |
| | |
| | | |
| | | // 列表 |
| | | export const getList = async (data) => { |
| | | return request(`/promotion/mgt/promotion-banner/page`, { |
| | | method: 'POST', |
| | | data |
| | | return request(`/api/huacheng-sangeshenbian/banner/list`, { |
| | | method: 'GET', |
| | | params:data |
| | | }); |
| | | } |
| | | // 详情 |
| | | export const getDetail = async (id) => { |
| | | return request(`/promotion/mgt/promotion-banner/detail/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/banner/getBannerInfo/${id}`, { |
| | | method: 'GET', |
| | | // data |
| | | }); |
| | | } |
| | | // 详情列表 |
| | | export const getDetailList = async (data) => { |
| | | return request(`/goods/mgt/goods-sku/page`, { |
| | | method: 'POST', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 删除 |
| | | export const deleteBanner = async (id) => { |
| | | return request(`/promotion/mgt/promotion-banner/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/banner/delete/${id}`, { |
| | | method: 'delete', |
| | | // params |
| | | }); |
| | | } |
| | | |
| | | // 添加 编辑 |
| | | export const addAndEdit = async (data) => { |
| | | return request('/promotion/mgt/promotion-banner/save', { |
| | | export const add = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/banner/add', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | // 上下架 |
| | | export const updateStatus = async (data) => { |
| | | return request(`/promotion/mgt/promotion-banner/upd-status`, { |
| | | // 添加 编辑 |
| | | export const Edit = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/banner/edit', { |
| | | method: 'POST', |
| | | data |
| | | data, |
| | | }); |
| | | } |
| | | |
| | |
| | | > |
| | | <Form layout="horizontal" {...formItemLayout} form={form}> |
| | | <Form.Item |
| | | name="categoryName" |
| | | name="name" |
| | | label="问题名称" |
| | | rules={[{ required: true, message: '请输入' }]} |
| | | > |
| | |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm1 } from '@/utils/antdUtils'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Space } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { useAccess, Access } from 'umi'; |
| | | import AddAndEdit from './components/addAndEdit'; |
| | | import { addAndEdit, del, getList } from './service'; |
| | | import { add,Edit, del, getList } from './service'; |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | |
| | | const columns = [ |
| | | { |
| | | title: '问题类型名称', |
| | | dataIndex: 'categoryName', |
| | | dataIndex: 'name', |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | | showDelConfirm1(async () => { |
| | | let status = await sendRequest(del, record.id); |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | |
| | | visible={modalVisible} |
| | | onCancel={() => handleModalVisible(false)} |
| | | onSave={async (fileds) => { |
| | | const success = await sendRequest(addAndEdit, fileds); |
| | | const success = await sendRequest(add, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | const success = await sendRequest(addAndEdit, fileds); |
| | | const success = await sendRequest(Edit, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | actionRef.current.reload(); |
| | |
| | | |
| | | // 列表 |
| | | export const getList = async (data) => { |
| | | return request(`/goods/mgt/goods-category/page`, { |
| | | method: 'POST', |
| | | data |
| | | return request(`/api/huacheng-sangeshenbian/problemType/list`, { |
| | | method: 'GET', |
| | | params:data |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 添加dept |
| | | export const addAndEdit = async (data) => { |
| | | return request('/goods/mgt/goods-category/save', { |
| | | export const add = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/problemType/add', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 添加dept |
| | | export const Edit = async (data) => { |
| | | return request('/api/huacheng-sangeshenbian/problemType/edit', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 批量删除dept |
| | | export const del = async (id) => { |
| | | return request(`/goods/mgt/goods-category/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/problemType/delete/${id}`, { |
| | | method: 'DELETE', |
| | | // data |
| | | }); |
| | |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | export function showDelConfirm1(okHandler, content, confirmText, cancelText, title) { |
| | | confirm({ |
| | | title: title || '提示', |
| | | content: content || '确认删除所选信息吗?', |
| | | okText: confirmText || '确认', |
| | | cancelText: cancelText || '关闭', |
| | | onOk() { |
| | | okHandler(); |
| | | }, |
| | | onCancel() { |
| | | |
| | | }, |
| | | }); |
| | | } |
| | | // 转换成ProFormSelect可用的数据 |
| | | export async function buildProFormSelectDataSourceTwo(fun, params) { |
| | | const response = await fun(params); |
| | |
| | | } |
| | | |
| | | export async function buildProTableDataSource(fun, params) { |
| | | params.pageNum = params.current; |
| | | params.pageNum = params.current || 1; |
| | | params.pageSize = params.pageSize || 10 |
| | | delete params.current |
| | | const response = await fun(params); |
| | | const data = Promise.resolve({ |