diff --git a/.env.development b/.env.development index 8a8802d..22b5236 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ # @Author: 张涛 # @Date: 2023-11-09 18:29:41 # @LastEditors: JC9527 - # @LastEditTime: 2023-12-28 19:43:38 + # @LastEditTime: 2024-01-04 15:50:30 # @FilePath: \JiangningUrbanManagePc\.env.development ### # 页面标题 @@ -13,9 +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_API = 'http://192.168.1.142:9037' +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_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/bigScreenApi/eventApi.js b/src/api/bigScreenApi/eventApi.js index aae2516..6cbe8b2 100644 --- a/src/api/bigScreenApi/eventApi.js +++ b/src/api/bigScreenApi/eventApi.js @@ -1,8 +1,9 @@ import request from "@/utils/request2" -// 事件来源 -export function getDeviceList(params) { +// 事件来源按日/月纬度统计 +export function getTrend(params) { return request({ + baseURL: process.env.VUE_APP_BASE_API2, url: "/event/source/trend", method:'get', params @@ -10,19 +11,21 @@ export function getDeviceList(params) { } // 事件列表查询 -export function getQueryViewListPage(data) { +export function getQueryViewListPage(params,data) { return request({ url: "/api/eform/engine/viewEngine/queryViewListPage", method:'post', + params, data }) } // 自动提交事件---保存事件数据 -export function eventSaveData(data) { +export function eventSaveData(params,data) { return request({ url: "/api/eform/engine/formEngine/saveData", method:'post', + params, data }) } \ No newline at end of file diff --git a/src/api/bigScreenApi/index.js b/src/api/bigScreenApi/index.js index e612d66..e77887c 100644 --- a/src/api/bigScreenApi/index.js +++ b/src/api/bigScreenApi/index.js @@ -96,4 +96,17 @@ export function getCarManageList(params) { method:'get', params }) +} + +/** + * 沿街商铺 + */ + +// 查询沿街店铺列表 streetShop +export function getStreetShopList(params) { + return request({ + url: '/jn/shop/list', + method: 'get', + params + }) } \ No newline at end of file diff --git a/src/assets/styles/leaflet.scss b/src/assets/styles/leaflet.scss index 1adae21..cb80d92 100644 --- a/src/assets/styles/leaflet.scss +++ b/src/assets/styles/leaflet.scss @@ -129,7 +129,8 @@ display: flex; align-items: center; justify-content: center; - width: 194px; + // width: 194px; + width: 404px; height: 30px; background: linear-gradient(270deg, rgba(9, 32, 53, 0) 0%, rgba(8, 37, 64, 0.98) 51%, rgba(9, 34, 56, 0) 100%); border-radius: 0px 0px 0px 0px; @@ -304,8 +305,9 @@ // 监控视频 .monitoring-popup { - width: 242px; - height: 230px; + width: 282px; + // height: 230px; + // height: 220px; background-image: url("../images/popup/bg4.png"); background-size: 100% 100%; z-index: 600; @@ -325,7 +327,8 @@ display: flex; align-items: center; justify-content: center; - width: 194px; + // width: 194px; + width: 234px; height: 30px; background: linear-gradient(270deg, rgba(9, 32, 53, 0) 0%, rgba(8, 37, 64, 0.98) 51%, rgba(9, 34, 56, 0) 100%); border-radius: 0px 0px 0px 0px; @@ -342,21 +345,49 @@ } .monitoring { - padding: 11px 25px 24px 25px; + padding: 11px 0 0 0; - .bg { - background-image: url("../images/popup/screenshot20230817.png"); - background-size: 100% 100%; - width: 192px; - height: 108px; - padding: 2px; - display: flex; - align-items: center; - justify-content: center; + .monitoring-list { + padding: 12px 32px 10px 30px; - img { - width: 92px; - cursor: pointer; + .person-info { + display: flex; + // align-items: center; + margin-bottom: 10px; + .info-left { + display: flex; + // align-items: center; + width: 45%; + .dot { + width: 4px; + height: 4px; + background: #DAEBFF; + box-shadow: 0px 0px 10px 5px rgba(0, 119, 255, 0.25), 0px 0px 5px 0px rgba(229, 241, 255, 0.25); + border-radius: 20px 20px 20px 20px; + margin-right: 10px; + margin-top: 7px; + } + + .name { + text-align: right; + flex: 1; + font-size: 12px; + font-family: Source Han Sans CN-Medium, Source Han Sans CN; + font-weight: 500; + color: #E9F4FF; + line-height: 14px; + } + } + + .position { + font-size: 12px; + font-family: Source Han Sans CN-Medium, Source Han Sans CN; + font-weight: 500; + color: #E9F4FF; + line-height: 14px; + margin-right: 9px; + flex: 1; + } } } @@ -364,7 +395,8 @@ display: flex; align-items: center; justify-content: space-between; - margin-top: 16px; + // margin-top: 16px; + padding: 0 25px 15px 25px; .btn { background-image: url("../images/popup/icon2btn.png"); diff --git a/src/utils/auth.js b/src/utils/auth.js index a7e3642..4133a95 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -4,7 +4,7 @@ const TokenKey = 'Admin-Token' const AccessToken = 'X-Access-Token' -Cookies.set(AccessToken, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MDM1MjkyMzAsInVzZXJuYW1lIjoi6LW15YWtIn0.iV5P9-g1X309RxfTiWLb42yk7QBGazSUwKLHSEPeLuA') +Cookies.set(AccessToken, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MDQzNTgzOTIsInVzZXJuYW1lIjoi6LW15YWtIn0.7aDgV90lBTw7kjK0yNU9UioPPBZzv_rk6iL6cnaAXNk') export function getAccessToken() { return Cookies.get(AccessToken) diff --git a/src/utils/mapJson/point.json b/src/utils/mapJson/point.json index 64a1355..0c7f407 100644 --- a/src/utils/mapJson/point.json +++ b/src/utils/mapJson/point.json @@ -122,7 +122,7 @@ }, { "type": "Feature", - "properties": {"name":"监控视频"}, + "properties": {"name":"监控视频","status":1}, "geometry": { "coordinates": [ 118.79202271621062, @@ -133,7 +133,7 @@ }, { "type": "Feature", - "properties": {"name":"监控视频"}, + "properties": {"name":"监控视频","status":1}, "geometry": { "coordinates": [ 118.78822314147698, @@ -144,7 +144,7 @@ }, { "type": "Feature", - "properties": {"name":"监控视频"}, + "properties": {"name":"监控视频","status":0}, "geometry": { "coordinates": [ 118.82115278916302, diff --git a/src/utils/request2.js b/src/utils/request2.js index f56d200..3d3c0c2 100644 --- a/src/utils/request2.js +++ b/src/utils/request2.js @@ -20,7 +20,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 - baseURL: process.env.NODE_ENV === "production" ? location.origin : process.env.VUE_APP_BASE_API1, + // baseURL: process.env.NODE_ENV === "production" ? location.origin : process.env.VUE_APP_BASE_API1, + baseURL: process.env.VUE_APP_BASE_API1, // 超时 timeout: 10000 }) @@ -32,6 +33,7 @@ service.interceptors.request.use(config => { // 是否需要防止数据重复提交 const isRepeatSubmit = (config.headers || {}).repeatSubmit === false if (getAccessToken() && !isToken) { + // config.headers['Authorization'] = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改 config.headers['X-Access-Token'] = getAccessToken() // 让每个请求携带自定义token 请根据实际情况自行修改 } // get请求映射params参数 diff --git a/src/views/bigScreen/components/mapLeftContent.vue b/src/views/bigScreen/components/mapLeftContent.vue index cae5a42..52167c2 100644 --- a/src/views/bigScreen/components/mapLeftContent.vue +++ b/src/views/bigScreen/components/mapLeftContent.vue @@ -4,7 +4,7 @@ * @Author: JC9527 * @Date: 2023-08-15 09:44:13 * @LastEditors: JC9527 - * @LastEditTime: 2023-12-28 23:51:19 + * @LastEditTime: 2024-01-04 15:23:57 --> @@ -53,7 +87,7 @@ export default { }, // 大小限制(MB) fileSize: { - type: Number, + type: Number, default: 5, }, // 文件类型, 例如['png', 'jpg', 'jpeg'] @@ -76,7 +110,9 @@ export default { hideUpload: false, baseUrl: process.env.VUE_APP_BASE_API, uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址 - fileList: [] + fileList: [], + fileFormat:"", + dialogTitle:'图片预览' }; }, watch: { @@ -89,9 +125,9 @@ export default { this.fileList = list.map(item => { if (typeof item === "string") { if (item.indexOf(this.baseUrl) === -1) { - item = { name: this.baseUrl + item, url: this.baseUrl + item }; + item = { name: this.baseUrl + item, url: this.baseUrl + item }; } else { - item = { name: item, url: item }; + item = { name: item, url: item }; } } return item; @@ -115,8 +151,8 @@ export default { // 上传前loading加载 handleBeforeUpload(file) { let isImg = false; + let fileExtension = ""; if (this.fileType.length) { - let fileExtension = ""; if (file.name.lastIndexOf(".") > -1) { fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1); } @@ -128,19 +164,19 @@ export default { } else { isImg = file.type.indexOf("image") > -1; } - + // console.log(fileExtension,'fileExtension'); if (!isImg) { - this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`); + this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}${this.fileType.includes('mp4') ? '视频' : this.fileType.includes('mp3') || this.fileType.includes('flac') ? '音频' : '图片'}格式文件!`); return false; } if (this.fileSize) { const isLt = file.size / 1024 / 1024 < this.fileSize; if (!isLt) { - this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`); + this.$modal.msgError(`上传${fileExtension == 'mp4' ? '视频' : fileExtension == 'mp3' || fileExtension == 'flac' ? '音频' : '图片'}大小不能超过 ${this.fileSize} MB!`); return false; } } - this.$modal.loading("正在上传图片,请稍候..."); + this.$modal.loading(`正在上传${fileExtension == 'mp4' ? '视频' : fileExtension == 'mp3' || fileExtension == 'flac' ? '音频' : '图片'},请稍候...`); this.number++; }, // 文件个数超出 @@ -159,6 +195,7 @@ export default { this.$refs.imageUpload.handleRemove(file); this.uploadedSuccessfully(); } + this.$refs.imageUpload.clearFiles(); }, // 删除图片 handleDelete(file) { @@ -170,7 +207,7 @@ export default { }, // 上传失败 handleUploadError() { - this.$modal.msgError("上传图片失败,请重试"); + this.$modal.msgError("上传失败,请重试"); this.$modal.closeLoading(); }, // 上传结束处理 @@ -190,6 +227,14 @@ export default { }, // 预览 handlePictureCardPreview(file) { + this.fileFormat = file.name.slice(file.name.lastIndexOf(".") + 1) + if(this.fileFormat == 'mp4') { + this.dialogTitle = "视频预览" + } else if(this.fileFormat == "mp3") { + this.dialogTitle = "音频预览" + } else { + this.dialogTitle = "照片预览" + } this.dialogImageUrl = file.url; this.dialogVisible = true; }, @@ -203,6 +248,14 @@ export default { } } return strs != '' ? strs.substr(0, strs.length - 1) : ''; + }, + // 弹框关闭事件 + close(){ + if(this.fileFormat == 'mp4') { + this.$refs.myVideo.pause(); + } else if(this.fileFormat == "mp3") { + this.$refs.myAudio.pause(); + } } } }; @@ -210,17 +263,48 @@ export default { diff --git a/src/views/components/newEvent/index.vue b/src/views/components/newEvent/index.vue index 0a30ab5..196d13b 100644 --- a/src/views/components/newEvent/index.vue +++ b/src/views/components/newEvent/index.vue @@ -1,20 +1,20 @@ diff --git a/vue.config.js b/vue.config.js index ebeb024..80202a5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -55,6 +55,13 @@ module.exports = { ["^" + process.env.VUE_APP_BASE_API1]: "", }, }, + [process.env.VUE_APP_BASE_API2]: { + target: `http://localhost:9029`, + changeOrigin: true, + pathRewrite: { + ["^" + process.env.VUE_APP_BASE_API2]: "", + }, + }, }, disableHostCheck: true, },