取消地图高亮、文件名称显示

lijinlong
吕天方 1 year ago
parent 35b190d392
commit b933a2915f

@ -2,7 +2,7 @@
# @Author: 张涛
# @Date: 2023-11-09 18:29:41
# @LastEditors: JC9527
# @LastEditTime: 2024-01-04 15:50:30
# @LastEditTime: 2024-01-06 10:41:10
# @FilePath: \JiangningUrbanManagePc\.env.development
###
# 页面标题
@ -13,10 +13,10 @@ ENV = 'development'
# 若依管理系统/开发环境
# /dev-api
# VUE_APP_BASE_API = 'http://39.101.188.84:9037'
VUE_APP_BASE_API = 'http://39.101.188.84:9037'
VUE_APP_BASE_API1 = 'https://t-kd-process-server.jsszkd.com'
VUE_APP_BASE_API2 = 'https://t-jn-development-manager-server.jsszkd.com/api/webapp'
VUE_APP_BASE_API = 'http://192.168.0.108:9037'
# VUE_APP_BASE_API = 'http://192.168.0.108:9037'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -1836,6 +1836,61 @@ export default {
//
divClick(lightedPolygonId){
// console.log(lightedPolygonId,"");
//
this.quyuData.forEach((element) => {
element.myPolygon.setOptions({
strokeOpacity: 0,
strokeColor: '#FF0000',
fillColor: '#FF0000',
fillOpacity:0.38,
editable:false,
visible:true,
});
element.text.setStyle({
'color': '#F44444',
});
})
//
this.luduanData.forEach((element) => {
element.myPolyline.setOptions({
strokeOpacity: 1,
strokeColor: '#46FF77',
editable:false,
visible:true,
});
element.text.setStyle({
'color': '#46FF77',
});
})
//
this.weilanData.forEach((element) => {
element.myPolygon.setOptions({
strokeOpacity: 0.9,
strokeColor: "#62E1FA",
fillColor: "#62E1FA",
fillOpacity: 0.3,
editable:false,
visible:true,
});
element.text.setStyle({
'color': '#62E1FA',
});
})
//
gridding.features.forEach((element)=>{
element.myPolygon.setOptions({
strokeColor: '#FFBF7A',
fillColor: '#DC8419',
strokeOpacity: 1,
fillOpacity: 0.3,
editable:false,
visible:true,
});
element.text.setStyle({
'color': '#FFDBB7',
'text-shadow': '0px 1px 0px rgba(0,0,0,0.3)',
});
})
this.isClickLingtedPolygonId = true;
this.highlightedPolygonId = lightedPolygonId.id;
if(lightedPolygonId.id == 1) {

@ -22,7 +22,7 @@
<div class="item-updata">
<div class="file">
<!-- <i class="el-icon-document"></i> -->
<span class="omit">{{ item.name }}</span>
<span class="omit">{{ item.name.substring(item.name.lastIndexOf("/") + 1) }}</span>
</div>
<div class="delete">
<el-link @click.stop="handleDelete(item)" :underline="false" type="danger">删除</el-link>

@ -136,21 +136,6 @@
<span>事件音频</span>
</div>
</template>
<!-- <div class="component-upload-image">
<el-upload
id="audioUpload"
v-model="formInline.reportEventObj.audioUrl"
class="upload-demo-audio"
action=""
:http-request="httpRequestHandler"
:file-list="file_list"
:limit="1"
:before-upload="beforeAvatarUpload"
:show-file-list="false"
>
<i class="el-icon-plus"></i>
</el-upload>
</div> -->
<my-upload v-model="formInline.reportEventObj.audioUrl" :limit="1" :fileType="['mp3','flac']" :fileSize="20" />
</el-form-item>
</el-col>
@ -272,8 +257,6 @@ export default {
label: '选项1'
},
],
file_list: [],
httpRequestParams: {},
}
},
methods:{
@ -312,56 +295,6 @@ export default {
// })
},
beforeAvatarUpload(file) {
console.log('file', file)
//
console.log('file', file.name.substring(file.name.length - 3))
// const isAudio = file.type === 'audio/mp3' || file.type === 'audio/mpeg'
const isAudio = file.name.substring(file.name.length - 3) === 'mp3'
console.log(isAudio, 'isAudio')
// 5M
const isLt2M = file.size / 1024 / 1024 < 5
//
this.getTimes(file)
const isTime60S = this.audioDuration >= 300 ? true : ''
console.log(isTime60S)
if (!isAudio) {
this.$message.error('上传文件只能是Mp3格式!')
this.fileList = []
} else {
if (!isLt2M) {
this.$message.error('上传文件大小不能超过 5MB!')
this.fileList = []
} else {
if (isTime60S) {
this.$message.error('上传文件时长不能超过300秒!')
this.fileList = []
}
}
}
return isAudio && isLt2M && isTime60S
},
getTimes(file) {
var content = file
//
var url = URL.createObjectURL(content) //
console.log(url)
this.music_path = url
// audio
this.audioElement = new Audio(url)
this.audioElement.addEventListener('loadedmetadata', (_event) => {
console.log(12312321)
this.audioDuration = parseInt(this.audioElement.duration)
console.log(this.audioDuration)
})
},
httpRequestHandler(res) {
console.log('res', res)
const fd = new FormData()
fd.append('file', res.file)
this.httpRequestParams = fd
},
},
}
</script>

Loading…
Cancel
Save