Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
| | |
| | | // 清空录音片段 |
| | | this.recordSegments = [] |
| | | this.currentSegment = null |
| | | // 重置计时器 |
| | | // 停止计时器 |
| | | this.stopTimer() |
| | | // 重置录音状态 |
| | | this.isRecording = false |
| | | this.isPaused = false |
| | | this.seconds = 0 |
| | | this.minutes = 0 |
| | | this.hours = 0 |
| | |
| | | { |
| | | "name": "“三个身边”群众工作机制", |
| | | "appid": "__UNI__DB035F5", |
| | | "appid": "__UNI__5DC32B0", |
| | | "description": "", |
| | | "versionName": "1.0.0", |
| | | "versionCode": "100", |
| | |
| | | <view v-for="item, index in videoContent" :key="index"> |
| | | <view class="pl-19 pr-19 pb-17 pt-17 flex j-between a-center br-8 pink"> |
| | | <view class="flex1"> |
| | | <text class="fs-27 font-bold">语音文件{{ index + 1 }}</text> |
| | | <text class="fs-27 font-bold">语音文件{{ (index + 1) | numToWords }}</text> |
| | | </view> |
| | | <view class="flex j-between a-center"> |
| | | <image src="/static/Appeal/delete.png" class="w-27 h-27 mr-38" mode="" |
| | |
| | | descriptionTitle: '', |
| | | descriptionContent: '', |
| | | videoContent: [], |
| | | latitude: '30.5061493', |
| | | longitude: '105.574542', |
| | | location: '测试地址', |
| | | latitude: '', |
| | | longitude: '', |
| | | location: '', |
| | | images: [], |
| | | videos: [], |
| | | voiceFile: '', //语音文件多个逗号拼接 |
| | |
| | | computed: { |
| | | ...mapState(["playFlag"]), |
| | | }, |
| | | filters: { |
| | | formatTime(val) { |
| | | if (!val) return '' |
| | | return dayjs(val).format('YYYY-MM-DD HH:mm:ss') |
| | | }, |
| | | numToWords(val) { |
| | | const words = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十'] |
| | | // 处理 0-10 |
| | | if (val >= 0 && val <= 10) return words[val]; |
| | | // 处理 11-99 |
| | | if (val > 10 && val < 100) { |
| | | const ten = Math.floor(val / 10); |
| | | const unit = val % 10; |
| | | return `${ten > 1 ? words[ten] : ''}十${unit > 0 ? words[unit] : ''}`; |
| | | } |
| | | return val; // 超过99返回原数字 |
| | | } |
| | | }, |
| | | onReady() { |
| | | uni.setNavigationBarTitle({ |
| | | title: '诉求录入' |
| | |
| | | </view> |
| | | </view> |
| | | <view class="person-item flex1">{{detail.name}}</view> |
| | | <view class="flex a-center"> |
| | | <view class="phone-item flex1">{{detail.contactNumber}}</view> |
| | | <image @click.stop="callPhone(detail.contactNumber)" src="../../static/tell.png" |
| | | class="w-58 h-58 shrink0 " /> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | callPhone(phoneNumber) { |
| | | uni.makePhoneCall({ |
| | | phoneNumber |
| | | }); |
| | | }, |
| | | close() { |
| | | this.showPop = false |
| | | }, |
| | |
| | | navigator.geolocation.getCurrentPosition(success, error, options);
|
| | |
|
| | | function success(position) {
|
| | | geoconv({coords:`${position.coords.longitude},${position.coords.latitude}`}).then(res=>{
|
| | | console.log('position', position)
|
| | | geoconv({
|
| | | coords: `${position.coords.longitude},${position.coords.latitude}`
|
| | | }).then(res => {
|
| | | console.log('res', res)
|
| | | const latitude = res.data.result[0].y;
|
| | | const longitude = res.data.result[0].x;
|
| | | var point = new BMapGL.Point(longitude, latitude); // 创建点坐标
|
| | |
| | | }
|
| | |
|
| | | function error(err) {
|
| | | console.log('err', err)
|
| | | switch (err.code) {
|
| | | case err.PERMISSION_DENIED:
|
| | | console.error("用户拒绝了位置请求。");
|
| | |
| | | |
| | | // 如果第一层是街道 |
| | | if (this.regionTree[this.regionTree.length - 1]?.tier === 3) { |
| | | const streets = this.regionTree.slice(1).map(item => ({ |
| | | name: item.name, |
| | | id: item.id, |
| | | tier: item.tier, |
| | | children: item.children || [] |
| | | })); |
| | | return [{ name: "全部", id: "all", tier: 3, children: [] }, ...streets]; |
| | | } |
| | | // 如果第一层是社区 |
| | | else if (this.regionTree[this.regionTree.length - 1]?.tier === 4) { |
| | | return this.regionTree.slice(1).map(item => ({ |
| | | name: item.name, |
| | | id: item.id, |
| | |
| | | children: item.children || [] |
| | | })); |
| | | } |
| | | |
| | | // 如果当前选中的是区县 |
| | | if (county.tier === 2) { |
| | | else if (county.tier === 2) { |
| | | const streets = county.children.filter((c) => c && c.tier === 3); |
| | | return streets.length |
| | | ? [{ name: "全部", id: "all", tier: 3, children: [] }, ...streets] |
| | |
| | | const communities = street.children?.filter(c => c && c.tier === 4) || []; |
| | | return communities.length ? [{ name: "全部", id: "all", tier: 4 }, ...communities] : []; |
| | | } |
| | | |
| | | // 如果第一层是社区 |
| | | else if (this.regionTree[this.regionTree.length - 1]?.tier === 4) { |
| | | return this.regionTree.slice(1).map(item => ({ |
| | | name: item.name, |
| | | id: item.id, |
| | | tier: item.tier, |
| | | children: item.children || [] |
| | | })); |
| | | } |
| | | // 如果当前选中的是区县 |
| | | if (county.tier === 2) { |
| | | else if (county.tier === 2) { |
| | | // 区县下直接有社区 |
| | | const communities = county.children.filter((c) => c && c.tier === 4); |
| | | if (communities.length) |
| | |
| | | <image @tap="uploadImg(2)" src="@/static/Appeal/add.png" class="w-140 h-140 shrink0" /> |
| | | </view> |
| | | </view> |
| | | <view @click.stop="submit" class="mt-38 fs-35 lh-96 br-48 txt-center font-bold bgcolor6 color4 fixed" |
| | | <view @click.stop="submit" class="mt-38 fs-35 lh-96 br-48 txt-center font-bold bgcolor6 color4 fixed zIndex1000" |
| | | style="width: calc(100% - 62rpx);bottom: calc(env(safe-area-inset-bottom) + 10rpx);">确认</view> |
| | | <view class="btn-box"></view> |
| | | <view class="safe-box"></view> |
| | |
| | | <view class="allContent"> |
| | | <view class="topStatus"> |
| | | <view class="status"> |
| | | {{ ['正在办理', '延期办理', '超时办理', '已办结 ', '群众撤销', '上报待审核', '上级驳回', '延期待审核', '已办结'][orderInfo.status] || '' }} |
| | | {{ ['正在办理', '延期办理', '超时办理', '已办结 ', '群众撤销', '上报待审核', '上级驳回', '延期待审核', '已办结'][orderInfo.status] || '' |
| | | }} |
| | | </view> |
| | | <view class="flex a-center j-between mb-17"> |
| | | <view class="tit">当前状态</view> |
| | |
| | | <!-- 问题描述 --> |
| | | <view class="problem"> |
| | | <view class="title">问题描述</view> |
| | | <view v-for="(item,index) in getVoiceFile(orderInfo.voiceFile)" :key="index" |
| | | <view v-for="(item, index) in videoContent" :key="index" |
| | | class="flex a-center j-between py-17 px-19 br-8 bgcolor1 mb-19"> |
| | | <view class="fs-27 lh-38">语音文件{{(index + 1) | numToWords}}</view> |
| | | <image v-if="!playFlag" @click.stop="playRecording(item)" src="../../static/24gf-playCircle@2x.png" |
| | | class="w-27 h-27 shrink0" /> |
| | | <image v-else @click.stop="pausePlaying" src="../../static/pausePlaying.png" |
| | | <image v-if="!playFlag" @click.stop="onPlayRecording(index)" |
| | | src="../../static/24gf-playCircle@2x.png" class="w-27 h-27 shrink0" /> |
| | | <image v-else @click.stop="onPausePlaying(index)" src="../../static/pausePlaying.png" |
| | | class="w-27 h-27 shrink0" /> |
| | | </view> |
| | | <view class="desc"> |
| | |
| | | |
| | | userInfo: uni.getStorageSync('userInfo'), //个人信息 |
| | | isParty: false, //true 党员 false 管理员 |
| | | |
| | | videoContent: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | ...mapActions(["playRecording", "pausePlaying"]), |
| | | getVoiceFile(voiceFile) { |
| | | if (!voiceFile || voiceFile.length == 0) return [] |
| | | return voiceFile.split(',') |
| | | this.videoContent = voiceFile.split(',').map(item => { |
| | | return { |
| | | url: item, |
| | | playing: false |
| | | } |
| | | }) |
| | | }, |
| | | onPlayRecording(index) { |
| | | // 先处理本地播放状态 |
| | | this.videoContent.forEach((item, i) => { |
| | | item.playing = i === index; |
| | | }); |
| | | // 调用store的播放方法,传url |
| | | this.playRecording(this.videoContent[index].url); |
| | | }, |
| | | onPausePlaying(index) { |
| | | this.videoContent[index].playing = false; |
| | | this.pausePlaying(this.videoContent[index].url); |
| | | }, |
| | | callPhone(phoneNumber) { |
| | | uni.makePhoneCall({ |
| | |
| | | this.orderInfo = { |
| | | ...res.data |
| | | } |
| | | this.getVoiceFile(this.orderInfo.voiceFile) |
| | | |
| | | }) |
| | | }, |
| | |
| | | |
| | | .pop-textArea { |
| | | padding: 34rpx 44rpx 0 44rpx; |
| | | margin: 2rpx; |
| | | |
| | | ::v-deep .u-textarea {} |
| | | |
| | |
| | | } |
| | | state.innerAudioContext = uni.createInnerAudioContext(); |
| | | state.innerAudioContext.autoplay = true; |
| | | // state.innerAudioContext.src = |
| | | // 'https://haitunyingyu.obs.cn-southwest-2.myhuaweicloud.com/admin/6660c5497ff34ee5b2bddaed01dd3880.wav'; |
| | | state.innerAudioContext.src = url |
| | | // 设置音频格式为MPEG |
| | | state.innerAudioContext.format = 'mpeg'; |
| | | state.innerAudioContext.src = url; |
| | | |
| | | // 显示音频信息 |
| | | // uni.showToast({ |
| | | // title: '音频链接:' + url, |
| | | // icon: 'none', |
| | | // duration: 3000 |
| | | // }); |
| | | |
| | | // 添加加载事件处理 |
| | | state.innerAudioContext.onCanplay(() => { |
| | | console.log('音频可以播放了'); |
| | | uni.showToast({ |
| | | title: '音频已准备就绪', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | }); |
| | | |
| | | state.innerAudioContext.onPlay(() => { |
| | | state.playFlag = true; |
| | | uni.showToast({ |
| | | title: '开始播放', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | }); |
| | | |
| | | state.innerAudioContext.onError((res) => { |
| | | // console.log('播放错误', res); |
| | | console.log('播放错误', res); |
| | | uni.showToast({ |
| | | title: '播放错误'+`${res}`, |
| | | icon: 'none', |
| | | duration: 3000 |
| | | }); |
| | | // 显示具体的错误信息 |
| | | // let errorMsg = '音频播放失败'; |
| | | // if (res.errMsg) { |
| | | // errorMsg += ':' + res.errMsg; |
| | | // } |
| | | // uni.showToast({ |
| | | // title: errorMsg, |
| | | // icon: 'none', |
| | | // duration: 3000 |
| | | // }); |
| | | dispatch('stopPlaying') |
| | | }); |
| | | |
| | | state.innerAudioContext.onEnded((res) => { |
| | | // console.log('播放自然结束', res); |
| | | console.log('播放自然结束', res); |
| | | uni.showToast({ |
| | | title: '播放结束', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | dispatch('stopPlaying') |
| | | }); |
| | | }, |
| | |
| | | this.chunks.push(e.data) |
| | | }, |
| | | saveRecordingData() { |
| | | const blob = new Blob(this.chunks, { 'type': 'audio/mpeg' }), |
| | | const blob = new Blob(this.chunks, { 'type': 'audio/mp3' }), |
| | | localUrl = URL.createObjectURL(blob) |
| | | |
| | | const endTime = new Date().getTime() |
| | |
| | | |
| | | return new Promise(function(resolve, reject) { |
| | | let token = uni.getStorageSync('token') |
| | | token = |
| | | 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0MjE4MjgwODU4Mzc4MjYsInR5cGUiOjEsImV4cCI6MTc0OTAxMjMwMSwiY3JlYXRlZCI6MTc0NzcxNjMwMTM0OH0.8C2x0xHFW45XbehroA1uWziKsUdVHFck8VpIOVkS_s0KvAeTbFG7nIeEQEjGq0a8bn6kHIF3q58mJi4H34Q0Cg' |
| | | uni.setStorageSync('token', token) |
| | | // token = |
| | | // 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0MjE4MjgwODU4Mzc4MjYsInR5cGUiOjEsImV4cCI6MTc0OTAxMjMwMSwiY3JlYXRlZCI6MTc0NzcxNjMwMTM0OH0.8C2x0xHFW45XbehroA1uWziKsUdVHFck8VpIOVkS_s0KvAeTbFG7nIeEQEjGq0a8bn6kHIF3q58mJi4H34Q0Cg' |
| | | // uni.setStorageSync('token', token) |
| | | let header = { |
| | | 'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json', |
| | | 'Authorization': token, |
| | |
| | | const [modalVisible1, handleModalVisibles1] = useState(false); |
| | | const [roleList, setRoleList] = useState([]); |
| | | const [unitId, setUnitId] = useState(''); |
| | | const [tier, setTier] = useState(0); |
| | | const [openKeys, setOpenKeys] = useState([]); |
| | | const access = useAccess(); |
| | | const [items, setItems] = useState([]); |
| | |
| | | if (e && e.domEvent) { |
| | | e.domEvent.stopPropagation(); |
| | | } |
| | | console.log('item', item); |
| | | setUnitId(item.id); |
| | | setTier(item.tier); |
| | | const values = form.getFieldsValue(); |
| | | actionRef.current.reload(values); |
| | | }} |
| | |
| | | if (e && e.domEvent) { |
| | | e.domEvent.stopPropagation(); |
| | | } |
| | | console.log('item////////////', item); |
| | | setTier(item.tier); |
| | | setUnitId(item.id); |
| | | const values = form.getFieldsValue(); |
| | | actionRef.current.reload(values); |
| | |
| | | 2: '区县', |
| | | 3: '街道', |
| | | 4: '社区', |
| | | 5: '党员', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | initialValues={{ type: 1 }} |
| | | onReset={() => { |
| | | setUnitId(''); |
| | | setTier(''); |
| | | setOpenKeys([]); |
| | | actionRef.current.reload(); |
| | | }} |
| | |
| | | rowKey="id" |
| | | onReset={() => { |
| | | setUnitId(''); |
| | | setTier(''); |
| | | setOpenKeys([]); |
| | | actionRef.current.reset(); |
| | | }} |
| | |
| | | request={(params) => { |
| | | let obj = { ...params }; |
| | | if (unitId) { |
| | | obj.departmentId = unitId; |
| | | obj.code = unitId; |
| | | } |
| | | if (params.departmentId) { |
| | | obj.departmentId = params.departmentId[params.departmentId.length - 1]; |
| | | // if (params.departmentId) { |
| | | // obj.departmentId = params.departmentId[params.departmentId.length - 1]; |
| | | // } |
| | | if (tier && !params.accountLevel) { |
| | | obj.accountLevel = tier; |
| | | } |
| | | if (form.getFieldValue('type')) { |
| | | obj.type = form.getFieldValue('type'); |
| | |
| | | const handleSearch = async (values) => { |
| | | setLoading(true); |
| | | let time = ''; |
| | | if (dateRange && dateRange.length === 2) { |
| | | time = `${dateRange[0].format('YYYY-MM-DD')} - ${dateRange[1].format('YYYY-MM-DD')}`; |
| | | let range = dateRange; |
| | | if (!range || range.length !== 2) { |
| | | // 没选时间时默认近7天 |
| | | const end = moment().endOf('day'); |
| | | const start = moment().subtract(6, 'days').startOf('day'); |
| | | range = [start, end]; |
| | | setDateRange(range); |
| | | form.setFieldsValue({ time: range }); |
| | | } |
| | | if (range && range.length === 2) { |
| | | time = `${range[0].format('YYYY-MM-DD')} - ${range[1].format('YYYY-MM-DD')}`; |
| | | } |
| | | const params = { |
| | | cityCode: values.cityCode, |
| | |
| | | }); |
| | | }, [adminLevel]); |
| | | |
| | | useEffect(() => { |
| | | // 页面初始默认近7天 |
| | | const end = moment().endOf('day'); |
| | | const start = moment().subtract(6, 'days').startOf('day'); |
| | | const dates = [start, end]; |
| | | setDateRange(dates); |
| | | form.setFieldsValue({ time: dates }); |
| | | form.submit(); |
| | | // eslint-disable-next-line |
| | | }, []); |
| | | |
| | | // 处理区县选择 |
| | | const handleDistrictChange = async (value) => { |
| | | if (!value) { |
| | |
| | | options={communityOptions} |
| | | placeholder="请选择社区" |
| | | fieldNames={{ label: 'name', value: 'communityId' }} |
| | | disabled={adminLevel <= 1 && !form.getFieldValue('districtId')} |
| | | disabled={adminLevel <= 2 && !form.getFieldValue('streetId')} |
| | | />, |
| | | }, |
| | | ]; |
| | |
| | | form.resetFields(); |
| | | setStreetOptions([]); |
| | | setCommunityOptions([]); |
| | | const end = moment().endOf('day'); |
| | | const start = moment().subtract(6, 'days').startOf('day'); |
| | | const dates = [start, end]; |
| | | setDateRange(dates); |
| | | form.setFieldsValue({ time: dates }); |
| | | form.submit(); |
| | | }}> |
| | | 重置 |
| | | </Button> |
| | |
| | | }} |
| | | /> |
| | | <Button onClick={() => { |
| | | const end = moment(); |
| | | const start = moment().subtract(7, 'days'); |
| | | const end = moment().endOf('day'); |
| | | const start = moment().subtract(6, 'days').startOf('day'); |
| | | const dates = [start, end]; |
| | | setDateRange(dates); |
| | | form.setFieldsValue({ time: dates }); |
| | | form.submit(); |
| | | }}>近7天</Button> |
| | | <Button onClick={() => { |
| | | const end = moment(); |
| | | const start = moment().subtract(30, 'days'); |
| | | const end = moment().endOf('day'); |
| | | const start = moment().subtract(29, 'days').startOf('day'); |
| | | const dates = [start, end]; |
| | | setDateRange(dates); |
| | | form.setFieldsValue({ time: dates }); |