From 3943e4c4e03b911dd6a28cedb91b7f27bcd04647 Mon Sep 17 00:00:00 2001 From: Tuzki <1720599558@qq.com> Date: Mon, 3 Jul 2023 18:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=AF=E7=82=B9=E5=88=86=E7=B1=BB=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=A0=E9=99=A4=E5=90=8E=E9=A1=B5=E9=9D=A2=E4=B8=8D?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E3=80=82=E7=BB=A7=E7=BB=AD=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/word/scenicAreaManagementEdit.js | 6 +- components/audio-unpload/audioUpload.vue | 15 +++- components/dark-calendar/dark-calendar.vue | 24 +++++-- components/file-img-upload/w-upload.vue | 6 +- .../htz-image-upload/htz-image-upload.vue | 8 +-- pages/work/index.vue | 22 ++++-- subPackDeatil/resourceStatistics/index.vue | 1 + .../classifiedManagement.vue | 25 ++++--- .../commandDispatch/commandDispatch.vue | 2 + .../commandDispatch/commandDispatchDetail.vue | 6 +- .../electronicPatrol/electronicPatrol.vue | 36 +++++++++- .../equipmentManagement/equipmentDetails.vue | 72 +++++++++++++------ .../equipmentManagement/equipmentEdit.vue | 4 +- .../scenicAreaManagementEdit.vue | 69 +++++++++++++----- subPackWork/scenicSpot/attractionsEditor.vue | 22 +++--- .../q-previewImage/q-previewImage.vue | 7 +- 16 files changed, 234 insertions(+), 91 deletions(-) diff --git a/api/word/scenicAreaManagementEdit.js b/api/word/scenicAreaManagementEdit.js index 605cc4f..d2a4976 100644 --- a/api/word/scenicAreaManagementEdit.js +++ b/api/word/scenicAreaManagementEdit.js @@ -9,10 +9,10 @@ export function scenicManageDetail(id){ }) } // 查询景点列表信息 -export function scenicManageUpdate(data){ +export function scenicManageUpdate(query){ return request({ - url: '/scenicManage/', + url: '/scenicManage', method: 'put', - params:data + data:query }) } \ No newline at end of file diff --git a/components/audio-unpload/audioUpload.vue b/components/audio-unpload/audioUpload.vue index e15d1f1..01fa2e3 100644 --- a/components/audio-unpload/audioUpload.vue +++ b/components/audio-unpload/audioUpload.vue @@ -51,7 +51,6 @@ export default { methods: { chooseAudio() { // #ifdef H5 - uni.chooseFile({ count: 1, //选取的文件个数限制 extension: ['.mp3'], //可定义允许哪些后缀的文件可被选择 @@ -86,12 +85,22 @@ export default { // #ifdef MP-WEIXIN let this_ = this; - uni.chooseMessageFile({ + wx.chooseMessageFile({ count: 1, //选取的文件个数限制 type: 'file', - extension: ['.mp3'], //可定义允许哪些后缀的文件可被选择 + // extension: ['.mp3'], //可定义允许哪些后缀的文件可被选择 success: (res) => { let tempFilePaths = res.tempFiles; + console.log(tempFilePaths[0].name.split('.')[1]) + let audioType = ['MP3','WAV','WMA','mp3'] + if(!audioType.includes(tempFilePaths[0].name.split('.')[1])){ + uni.showToast({ + icon:'error', + title:'请上传mp3格式文件' + + }) + return + } uni.showLoading({ title: '上传中...' }); diff --git a/components/dark-calendar/dark-calendar.vue b/components/dark-calendar/dark-calendar.vue index d2b5fa6..834ab3a 100644 --- a/components/dark-calendar/dark-calendar.vue +++ b/components/dark-calendar/dark-calendar.vue @@ -133,11 +133,19 @@ export default { let flag = false if(this.signeddates&&this.signeddates.length>0){ for (let i = 0; i < this.signeddates.length; i++) { - let dy = `${y}-${m}-${d}` - if (this.signeddates[i] == dy) { - flag = true - break - } + if(d>10){ + let dy = `${y}-${m}-${d}` + if (this.signeddates[i] == dy) { + flag = true + break + } + }else{ + let dy = `${y}-${m}-0${d}` + if (this.signeddates[i] == dy) { + flag = true + break + } + } } return flag } @@ -194,7 +202,11 @@ export default { this.m = this.m - 1 } } - + if(this.m<10){ + this.$emit('changeMon',this.y+'-0'+(this.m+1)) + }else{ + this.$emit('changeMon',this.y+'-'+(this.m+1)) + } this.dates = this.monthDay(this.y, this.m) } } diff --git a/components/file-img-upload/w-upload.vue b/components/file-img-upload/w-upload.vue index 355c78a..c1758ea 100644 --- a/components/file-img-upload/w-upload.vue +++ b/components/file-img-upload/w-upload.vue @@ -11,7 +11,7 @@ x - + + + @@ -31,6 +31,10 @@ import config from '@/config.js'; const baseUrls = config.baseUrl export default { props: { + showAdd:{ + type: Boolean, + default: true + }, token : { type: String, default: '' diff --git a/components/htz-image-upload/htz-image-upload.vue b/components/htz-image-upload/htz-image-upload.vue index 7b7c006..a57d82c 100644 --- a/components/htz-image-upload/htz-image-upload.vue +++ b/components/htz-image-upload/htz-image-upload.vue @@ -203,13 +203,12 @@ getFileUrl(item) { var url = item; if (this.dataType == 1) { - url = item.url + url = item } //console.log('url', url) return url }, previewVideo(src) { - debugger this.previewVideoSrc = src; // this.previewVideoSrc = // 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-fbd63a76-dc76-485c-b711-f79f2986daeb/ba804d82-860b-4d1a-a706-5a4c8ce137c3.mp4' @@ -244,7 +243,6 @@ }); }, imgPreview(index) { - var imgData = [] this.uploadLists.forEach(item => { @@ -621,14 +619,14 @@ }); }, getFileType(path, type) { //手机端默认图片为jpg 视频为mp4 - // #ifdef H5 + // #ifdef H5 var result = type == 0 ? 'jpg' : 'mp4'; // #endif // #ifndef H5 var result = path.split('.').pop().toLowerCase(); - // #ifdef MP + // #ifdef MP if (this.compress) { //微信小程序压缩完没有后缀 result = type == 0 ? 'jpg' : 'mp4'; } diff --git a/pages/work/index.vue b/pages/work/index.vue index 2a631c1..8f72f7f 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -375,9 +375,10 @@ show: false, }, xAxis: { + marginTop:5, labelCount:5, rotateLabel:true, - rotateAngle:45, + rotateAngle:15, disableGrid: true, boundaryGap: "justify", itemCount: 4, @@ -507,13 +508,24 @@ showAlarmtrendLineChart(data) { setTimeout(() => { this.chartData = JSON.parse(JSON.stringify(data)); - this.chartOpt = { + this.chartOpts = { rotate: false, rotateLock: false, - color: ["#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", + color: ["#1890FF", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc" ], - padding: [5, 5, 5, 5], + enableScroll: true, + xAxis: { + marginTop:5, + labelCount:5, + rotateLabel:false, + rotateAngle:15, + disableGrid: true, + boundaryGap: "justify", + itemCount: 6, + scrollShow: true + }, + padding: [5, 20, 5, 20], dataLabel: false, enableScroll: false, title: { @@ -524,7 +536,7 @@ }, legend: { show: true, - position: "right", + position: "top", lineHeight: 25 }, extra: { diff --git a/subPackDeatil/resourceStatistics/index.vue b/subPackDeatil/resourceStatistics/index.vue index 69ab17f..8a8d820 100644 --- a/subPackDeatil/resourceStatistics/index.vue +++ b/subPackDeatil/resourceStatistics/index.vue @@ -448,6 +448,7 @@ export default { justify-content: flex-start; font-size: 24rpx; z-index: 996; + overflow-x: scroll; } .searchInput999 { diff --git a/subPackWork/classifiedManagement/classifiedManagement.vue b/subPackWork/classifiedManagement/classifiedManagement.vue index 10b8211..abaf13d 100644 --- a/subPackWork/classifiedManagement/classifiedManagement.vue +++ b/subPackWork/classifiedManagement/classifiedManagement.vue @@ -49,16 +49,21 @@ confirmText: '确定', showCancel: true, success(res) { - del(item.id).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: '删除成功' - }); - setTimeout(() => { - _this.touristClassification(); - }, 500) - } - }); + if (res.confirm) { + del(item.id).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '删除成功' + }); + setTimeout(() => { + _this.touristClassification(); + }, 500) + } + }); + } else if (res.cancel) { + console.log('用户点击取消'); + } + } }) }, diff --git a/subPackWork/commandDispatch/commandDispatch.vue b/subPackWork/commandDispatch/commandDispatch.vue index 5c952d1..3776746 100644 --- a/subPackWork/commandDispatch/commandDispatch.vue +++ b/subPackWork/commandDispatch/commandDispatch.vue @@ -187,6 +187,7 @@ orderType: this.orderType, classificationDataCode: this.classificationDataCode, classificationEventCode: this.classificationEventCode, + }; getEventReportData(data).then((res) => { if (res.code === 200) { @@ -206,6 +207,7 @@ orderType: this.orderType, classificationDataCode: this.classificationDataCode, classificationEventCode: this.classificationEventCode, + type:"scheduling" }; getEventReportData(data).then((res) => { if (res.code === 200) { diff --git a/subPackWork/commandDispatch/commandDispatchDetail.vue b/subPackWork/commandDispatch/commandDispatchDetail.vue index 97ecaac..6eb7101 100644 --- a/subPackWork/commandDispatch/commandDispatchDetail.vue +++ b/subPackWork/commandDispatch/commandDispatchDetail.vue @@ -3,9 +3,9 @@ - - 处理记录 - + + + diff --git a/subPackWork/electronicPatrol/electronicPatrol.vue b/subPackWork/electronicPatrol/electronicPatrol.vue index dc6472b..1d43344 100644 --- a/subPackWork/electronicPatrol/electronicPatrol.vue +++ b/subPackWork/electronicPatrol/electronicPatrol.vue @@ -2,7 +2,7 @@ - + @@ -161,7 +161,9 @@ }) }, - getDateWithData() { + getDateWithData(val) { + if(!val){ + let this_ = this var date = new Date; var year = date.getFullYear(); @@ -180,12 +182,40 @@ dateData.push(time) }) this.$nextTick(() => { - this_.signeddates = dateData + this.signeddates = dateData + console.log(this.signeddates,'[[[[[]]]]]') }) this.$forceUpdate() } }) + }else{ + getDateWithData(val).then(res => { + if (res.code == 200) { + // this.signeddates = res.data + let dateData = []; + res.data.forEach(item => { + let year = item.substring(0, 4) + let month = item.substring(6, 7) + let day = item.substring(8, item.length) + let time = year + '-' + month + '-' + day + dateData.push(time) + }) + this.$nextTick(() => { + this.signeddates = dateData + console.log(this.signeddates,'[[[[[]]]]]') + }) + + this.$forceUpdate() + } + }) + } + }, + + //月份切换查询 + getMontn(val){ + console.log(val) + this.getDateWithData(val) } } }; diff --git a/subPackWork/equipmentManagement/equipmentDetails.vue b/subPackWork/equipmentManagement/equipmentDetails.vue index b12f004..2469cbd 100644 --- a/subPackWork/equipmentManagement/equipmentDetails.vue +++ b/subPackWork/equipmentManagement/equipmentDetails.vue @@ -62,23 +62,23 @@ data() { return { datas: { - devModel: '2', - coverImg: 'http://jqgk.hbcjy.com/profile/upload/2023/04/03/38210570-009F-4d63-91B3-842DF49E4911_20230403164143A001.png', - devBrandName: '迪士普', - buyTime: '2023-05-10', - resourceDescribe: '

资源描述信息

', - resourceName: '乡村游停车场入口', - lon: '112.955507', - sort: 2, - type: 'broadcast', - devBrand: '2', - devModelName: '环境监测仪', - resourceCode: '762957833498001408', - inResources: 'rural', - id: 13, - lat: '34.514724', - introduction: '

资源简介

', - status: '0' + devModel: '', + coverImg: '', + devBrandName: '', + buyTime: '', + resourceDescribe: '', + resourceName: '', + lon: '', + sort: null, + type: '', + devBrand: '', + devModelName: '', + resourceCode: '', + inResources: '', + id: null, + lat: '', + introduction: '', + status: '' }, covers: [], imgs: [], @@ -106,11 +106,30 @@ }, methods: { + open() { + //监听组件显示 (隐藏TabBar和NavigationBar,隐藏video原生组件) + uni.hideTabBar(); + uni.setNavigationBarColor({ + frontColor: '#000000', // 设置前景色为黑色 + backgroundColor: '#000000' // 设置背景色为黑色 + }); + this.videoShow = false; + }, + close() { + //监听组件隐藏 (显示TabBar和NavigationBar,显示video原生组件) + uni.showTabBar(); + + uni.setNavigationBarColor({ + frontColor: '#000000', // 设置前景色为白色 + backgroundColor: '#ffffff' // 设置背景色为黑色 + }); + + this.videoShow = true; + }, preview(url) { - this.imgs = ['https://web-assets.dcloud.net.cn/unidoc/zh/multiport-20210812.png', - 'https://web-assets.dcloud.net.cn/unidoc/zh/uni-function-diagram.png' - ]; //设置图片数组 + this.$nextTick(() => { + console.log(url) this.$refs.previewImage.open(url); // 传入当前选中的图片地址 }); }, @@ -156,6 +175,8 @@ getEnquipmentDetail(id, type).then(res => { if (res.code === 200) { this.datas = res.data + this.datas.lon = Number(this.datas.lon).toFixed(2) + this.datas.lat = Number(this.datas.lat).toFixed(2) if (this.datas.coverImg) { this.datas.coverImg.split(',').forEach(item => { this.imgs.push(baseUrl + item) @@ -187,5 +208,14 @@ height: 400rpx; width: 100%; } - + .image-box{ + overflow: hidden; + + .iamges-list { + width: 120rpx; + height: 120rpx!important; + float: right; + } + } + \ No newline at end of file diff --git a/subPackWork/equipmentManagement/equipmentEdit.vue b/subPackWork/equipmentManagement/equipmentEdit.vue index 9332157..c4b2edf 100644 --- a/subPackWork/equipmentManagement/equipmentEdit.vue +++ b/subPackWork/equipmentManagement/equipmentEdit.vue @@ -46,7 +46,7 @@ - @@ -207,6 +207,8 @@ getEnquipmentDetail(id, type).then(res => { if (res.code === 200) { this.info = res.data + this.info.lon = Number(this.info.lon).toFixed(2) + this.info.lat = Number(this.info.lat).toFixed(2) if (this.info.coverImg) { this.imgList = this.info.coverImg.split(',') } diff --git a/subPackWork/scenicAreaManagement/scenicAreaManagementEdit.vue b/subPackWork/scenicAreaManagement/scenicAreaManagementEdit.vue index a7f69f4..9c5710d 100644 --- a/subPackWork/scenicAreaManagement/scenicAreaManagementEdit.vue +++ b/subPackWork/scenicAreaManagement/scenicAreaManagementEdit.vue @@ -109,7 +109,7 @@ - @@ -156,10 +156,12 @@ return { token: getToken(), imgShow: true, + baseUr:baseUrl, requestUrl: baseUrl + '/common/upload', imgType: 'jpg,png,gif', imgList: [], ceshiData: [], + ceshiData1: [], hideRequiredAsterisk: false, array: ['其他','A', 'AA', 'AAA', 'AAAA', 'AAAAA'], index: 0, @@ -245,15 +247,24 @@ this.$refs.form.setRules(this.rules); }, methods: { - // ceshiUploadSuccess1(res) { //上传成功 - // var _res = JSON.parse(res.data); - // //console.log('_res', _res) - // let this_ = this - // if (_res.code == 200) { - // this_.ceshiData.push(this_.requestUrl + _res.fileName); - // } - // console.log(this_.ceshiData) - // }, + fileSuccess(val) { + let this_ = this + if (val) { + this_.info.mp3Url = val + } + }, + ceshiUploadSuccess1(res) { //上传成功 + var _res = JSON.parse(res.data); + //console.log('_res', _res) + let this_ = this + if (_res.code == 200) { + this_.ceshiData.push(this_.baseUr + _res.fileName); + + console.log(this_.ceshiData,'上传视频后') + this_.ceshiData1.push(_res.fileName); + } + console.log(this_.ceshiData) + }, bindTimeChange(e) { let this_ = this console.log(this_.info) @@ -287,6 +298,9 @@ }, ceshiImgDelete(e) { console.log('ceshiImgDelete', e) + let this_ = this + this_.ceshiData1 = [] + console.log(this_.ceshiData1) }, bindPickerChange: function(e) { console.log('picker发送选择改变,携带值为', e.detail.value); @@ -313,18 +327,24 @@ console.log(e); }, scenicManageDetail(id) { + let this_ = this scenicManageDetail(id).then((res) => { if (res.code == 200) { console.log(res.data) this.info = res.data - - if(res.data.openTime!=null){ - this.startTime = res.data.openTime.split('-')[0] - this.endTime = res.data.openTime.split('-')[1] - }else{ - this.startTime = '' - this.endTime = '' + if(res.data.videoUrl&&res.data.videoUrl!=null){ + this_.ceshiData1 = res.data.videoUrl.split(",") + this_.ceshiData1.forEach(item=>{ + this.ceshiData.push(this_.baseUr+item) + }) } + // if(res.data.openTime!=null){ + // this.startTime = res.data.openTime.split('-')[0] + // this.endTime = res.data.openTime.split('-')[1] + // }else{ + // this.startTime = '' + // this.endTime = '' + // } this.selectMultiple.index = res.data.label.split(','); this.form.selectIndex = res.data.label.split(','); this.form.selectValue = res.data.labelValue; @@ -365,12 +385,23 @@ }, save() { let this_ = this; - this_.info.openTime = this_.startTime + "-" + this_.endTime - this_.info.imageUrl = this_.imgList.join(","); + // this_.info.openTime = this_.startTime + "-" + this_.endTime + if(this_.imgList&&this_.imgList.length>0){ + this_.info.imageUrl = this_.imgList.join(","); + } + + this.$refs.form.validate((res) => { if (res) { + + if(this_.ceshiData1&&this_.ceshiData1.length>0){ + this_.info.videoUrl = this.ceshiData1.join(",") + }else{ + this_.info.videoUrl = '' + } this.info.label = this.form.selectIndex.join(","); this.info.grade = this.index; + console.log(this_.info) scenicManageUpdate(this.info).then(res => { if (res.code == 200) { uni.showToast({ diff --git a/subPackWork/scenicSpot/attractionsEditor.vue b/subPackWork/scenicSpot/attractionsEditor.vue index c44bd52..049d61a 100644 --- a/subPackWork/scenicSpot/attractionsEditor.vue +++ b/subPackWork/scenicSpot/attractionsEditor.vue @@ -15,9 +15,8 @@ - - - + {{ startTime }} @@ -26,9 +25,15 @@ @change="bindTimeChange1"> {{ endTime }} - + --> + + + +