景点分类添加删除后页面不刷新。继续改

master
Tuzki 2 years ago
parent e194da0435
commit 3943e4c4e0
  1. 6
      api/word/scenicAreaManagementEdit.js
  2. 15
      components/audio-unpload/audioUpload.vue
  3. 14
      components/dark-calendar/dark-calendar.vue
  4. 6
      components/file-img-upload/w-upload.vue
  5. 4
      components/htz-image-upload/htz-image-upload.vue
  6. 22
      pages/work/index.vue
  7. 1
      subPackDeatil/resourceStatistics/index.vue
  8. 5
      subPackWork/classifiedManagement/classifiedManagement.vue
  9. 2
      subPackWork/commandDispatch/commandDispatch.vue
  10. 4
      subPackWork/commandDispatch/commandDispatchDetail.vue
  11. 36
      subPackWork/electronicPatrol/electronicPatrol.vue
  12. 70
      subPackWork/equipmentManagement/equipmentDetails.vue
  13. 4
      subPackWork/equipmentManagement/equipmentEdit.vue
  14. 67
      subPackWork/scenicAreaManagement/scenicAreaManagementEdit.vue
  15. 20
      subPackWork/scenicSpot/attractionsEditor.vue
  16. 7
      uni_modules/q-previewImage/components/q-previewImage/q-previewImage.vue

@ -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
})
}

@ -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: '上传中...'
});

@ -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++) {
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)
}
}

@ -11,7 +11,7 @@
<image class="w-img" :src="baseUrl+k" mode="" @click="wpriven(baseUrl+k,'local')"></image>
<text class="cancel" @click="wdelete(index2, imgList, 2)">x</text>
</view>
<view class="addItem" @click="upLoadImg(1)">+</view>
<view class="addItem" v-if="showAdd" @click="upLoadImg(1)">+</view>
</view>
<view class="w-drawer" v-if="!imgShow || !fileShow">
<view class="w-setbox" :class="{ wShow: isshow }">
@ -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: ''

@ -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 => {

@ -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: {

@ -448,6 +448,7 @@ export default {
justify-content: flex-start;
font-size: 24rpx;
z-index: 996;
overflow-x: scroll;
}
.searchInput999 {

@ -49,6 +49,7 @@
confirmText: '确定',
showCancel: true,
success(res) {
if (res.confirm) {
del(item.id).then((res) => {
if (res.code == 200) {
uni.showToast({
@ -59,6 +60,10 @@
}, 500)
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},

@ -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) {

@ -3,8 +3,8 @@
<view class="v-page-bg" style="height: 300rpx;"></view>
<view class="v-card contain" style="padding-bottom: 130rpx;">
<view class="v-step-box">
<view class="align-right v-m-t8 v-m-b8">
<view @click="goList" class="v-btn v-btn-primary-b ">处理记录</view>
<view class="status-top align-right">
<button class="v-btn v-btn-primary-b" size="mini" @click="goList">处理记录</button>
</view>
<view class="status-bottom">
<evan-steps :active="datas.status-1" direction="horizontal">

@ -2,7 +2,7 @@
<view class="v-page">
<view class="g-body">
<view class="body-item">
<calendar :signeddates="signeddates" @on-click="showData" :open="true"></calendar>
<calendar @change-mon="getMontn" :signeddates="signeddates" @on-click="showData" :open="true"></calendar>
</view>
<view class="v-card contain">
<view class="v-card-item" v-for="item in jobList">
@ -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)
}
}
};

@ -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: '<p>资源描述信息</p>',
resourceName: '乡村游停车场入口',
lon: '112.955507',
sort: 2,
type: 'broadcast',
devBrand: '2',
devModelName: '环境监测仪',
resourceCode: '762957833498001408',
inResources: 'rural',
id: 13,
lat: '34.514724',
introduction: '<p>资源简介</p>',
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() {
// TabBarNavigationBarvideo
uni.hideTabBar();
uni.setNavigationBarColor({
frontColor: '#000000', //
backgroundColor: '#000000' //
});
this.videoShow = false;
},
close() {
// TabBarNavigationBarvideo
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;
}
}
</style>

@ -46,7 +46,7 @@
<view class="v-card-item">
<view class="v-card-box">
<common-title :title="'图片'"></common-title>
<w-upload ref="wUpload" :token="token" :imgShow="imgShow" :requestUrl="requestUrl"
<w-upload :show-add="imgList.length<1" ref="wUpload" :token="token" :imgShow="imgShow" :requestUrl="requestUrl"
:imgType="imgType" @updateImgList="updateImgList" :imgList="imgList"
@imgSuccess="imgSuccess"></w-upload>
</view>
@ -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(',')
}

@ -109,7 +109,7 @@
<view class="v-card-item">
<view class="v-card-box">
<common-title :title="'宣传视频'"></common-title>
<htz-image-upload v-model="ceshiData" mediaType="video" :sourceType="['album','camera']"
<htz-image-upload :data-type="1" v-model="ceshiData" mediaType="video" :sourceType="['album']"
:compress="false" :remove="true" :headers="{'Authorization':token}"
@uploadSuccess="ceshiUploadSuccess1" @imgDelete="ceshiImgDelete"
@uploadFail="ceshiUploadFail" :action="requestUrl"></htz-image-upload>
@ -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.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({

@ -15,8 +15,7 @@
<evan-form-item label="景点排序:">
<uni-number-box class="v-m-t10" v-model="vModelValue" @blur="blur" @focus="focus" @change="changeValue" />
</evan-form-item>
<evan-form-item label="开放时间:">
<!-- <uni-datetime-picker v-model="info.openTime" type="timerange" rangeSeparator="至" /> -->
<!-- <evan-form-item label="开放时间:">
<picker class="time-picker" mode="time" :value="startTime" start="00:00" end="23:59"
@change="bindTimeChange">
<view class="uni-input">{{ startTime }}</view>
@ -26,7 +25,13 @@
@change="bindTimeChange1">
<view class="uni-input">{{ endTime }}</view>
</picker>
</evan-form-item>
</evan-form-item> -->
</view>
</view>
<view class="v-card-item">
<view class="v-card-box">
<common-title :title="'开放时间'"></common-title>
<textarea class="area-text" v-model="info.openTime" auto-height />
</view>
</view>
<view class="v-card-item">
@ -250,7 +255,7 @@ export default {
save() {
let this_ = this;
this_.info.openTime = this_.startTime + "-" + this_.endTime
// this_.info.openTime = this_.startTime + "-" + this_.endTime
this_.info.imageUrl = this_.imgList.join(",");
this_.info.sort = this_.vModelValue;
this.$refs.form.validate((res) => {
@ -272,16 +277,17 @@ export default {
scenicSpotById(val).then(res => {
console.log(res)
this.info = res.data
this.startTime = res.data.openTime.split('-')[0]
this.endTime = res.data.openTime.split('-')[1]
// this.startTime = res.data.openTime.split('-')[0]
// this.endTime = res.data.openTime.split('-')[1]
this.info.ifRecommend = Number(res.data.ifRecommend)
this.vModelValue = res.data.sort
this.imgList = this.info.imageUrl.split(",");
})
},
fileSuccess(val) {
let this_ = this
if (val) {
console.log(val);
this_.info.mp3Url = val
}
}
}

@ -8,7 +8,7 @@
<movable-area class="movable-area" scale-area>
<movable-view class="movable-view" direction="all" :inertia="true" damping="100" scale="true" scale-min="1" scale-max="4" :scale-value="scale">
<scroll-view scroll-y="true" class="uni-scroll-view">
<view class="scroll-view"><image :key="index" class="image" :src="requestUrl+item" mode="widthFix" @longpress="onLongpress(item)" /></view>
<view class="scroll-view"><image :key="index" class="image" :src="item" mode="widthFix" @longpress="onLongpress(item)" /></view>
</scroll-view>
</movable-view>
</movable-area>
@ -42,8 +42,9 @@ export default {
methods: {
//
open(current) {
console.log(current)
this.current =this.urls.findIndex(item => item === current);
console.log(current,this.urls)
this.current =this.urls.findIndex(item => item == current);
console.log(this.current)
this.show = true;
this.$emit('open');
},

Loading…
Cancel
Save