diff --git a/.env.production b/.env.production index aa22a93..78968a8 100644 --- a/.env.production +++ b/.env.production @@ -1,8 +1,9 @@ # 页面标题 -VUE_APP_TITLE = 博诺思管理系统 +VUE_APP_TITLE = 庐江智慧工地 # 生产环境配置 ENV = 'production' +BASE_URL=/zhgd-ht/ # 博诺思管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = '/ljzhgd-api' diff --git a/public/dz_video.html b/public/dz_video.html index dcf56e7..2f476e0 100644 --- a/public/dz_video.html +++ b/public/dz_video.html @@ -49,6 +49,7 @@ video = v; // 设置播放窗口为 2 * 2 video.regrid(2, 2); + toolbar(false); } //初始化================================================================================================ @@ -61,7 +62,7 @@ var pwd = videoParam.pwd; var row = videoParam.row; var col = videoParam.col; - video.init({ ip: videoIp, port: videoPort, user: user, pwd: pwd, timeout: timeout, row: row, col: col, toolbar: 'top'/*top|bottom|false*/, onServerOpen: onServerOpen, onServerClose: onServerClose, onVideoClose: onVideoClose }); + video.init({ ip: videoIp, port: videoPort, user: user, pwd: pwd, timeout: timeout, row: row, col: col, toolbar: false, onServerOpen: onServerOpen, onServerClose: onServerClose, onVideoClose: onVideoClose }); setTimeout(() => { loopPlayVideo(); }, 1500); diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 1696f54..5b59f83 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -35,7 +35,7 @@ export default { const first = matched[0] if (!this.isDashboard(first)) { - matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) + matched = [{ path: '/zhgd-ht/index', meta: { title: '首页' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 6ca10a7..3b7a717 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ export default { type: 'warning' }).then(() => { this.$store.dispatch('LogOut').then(() => { - location.href = '/index'; + location.href = '/zhgd-ht/'; }) }).catch(() => {}); } diff --git a/src/permission.js b/src/permission.js index c568979..4aaf40e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -34,7 +34,7 @@ router.beforeEach((to, from, next) => { }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) - next({ path: '/' }) + next({ path: '/zhgd-ht' }) }) }) } else { diff --git a/src/router/index.js b/src/router/index.js index 71907b6..54f375a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -177,6 +177,7 @@ Router.prototype.replace = function push(location) { } export default new Router({ + base: process.env.BASE_URL, // 添加环境变量作为基础路径 mode: 'history', // 去掉url中的# scrollBehavior: () => ({ y: 0 }), routes: constantRoutes diff --git a/src/utils/request.js b/src/utils/request.js index 2250d20..851149b 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -136,7 +136,7 @@ service.interceptors.response.use(res => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { - location.href = '/index'; + location.href = '/zhgd-ht'; }) }).catch(() => { isRelogin.show = false; diff --git a/src/views/base/device/index.vue b/src/views/base/device/index.vue index 23aa98f..48a6703 100644 --- a/src/views/base/device/index.vue +++ b/src/views/base/device/index.vue @@ -149,7 +149,7 @@ - + - + { this.$modal.msgSuccess("新增成功"); this.open = false; diff --git a/src/views/base/engineering/index.vue b/src/views/base/engineering/index.vue index 09cd981..b64a5cd 100644 --- a/src/views/base/engineering/index.vue +++ b/src/views/base/engineering/index.vue @@ -132,7 +132,7 @@ /> - + 180 ||longitude.toString().split(".")[1].length>6) { + if(longitude.toString().includes('.')==true){ + if (longitude <-180 || longitude > 180 ||longitude.toString().split(".")[1].length>6) { callback(new Error('请必须输入-180 ~ 180内的数据且小数点后最多保留六位')); } else { callback(); } + }else{ + if (longitude <-180 || longitude > 180) { + callback(new Error('请必须输入-180 ~ 180内的数据且小数点后最多保留六位')); + } else { + callback(); + } + } + // if (longitude <-180 || longitude > 180 ||longitude.toString().split(".")[1].length>6) { + // callback(new Error('请必须输入-180 ~ 180内的数据且小数点后最多保留六位')); + // } else { + // callback(); + // } }, trigger: 'blur' } @@ -536,15 +550,29 @@ if (value === '' || value === null) { return callback(new Error('请必须输入-90 ~ 90内的数据且小数点后最多保留六位')); } - if(/[\u4e00-\u9fff]/.test(value)){ + const regexTwo = /^[+-]?(\d+(\.\d*)?|\.\d*[1-9]\d*)$/; + if(!regexTwo.test(value)){ return callback(new Error('请勿输入非数字')); } const latitude = parseFloat(value); - if (latitude <-90 || latitude > 90 ||latitude.toString().split(".")[1].length>6) { + if(latitude.toString().includes('.')==true){ + if (latitude <-90 || latitude > 90 ||latitude.toString().split(".")[1].length>6) { callback(new Error('请必须输入-90 ~ 90内的数据且小数点后最多保留六位')); } else { callback(); } + }else{ + if (latitude <-90 || latitude > 90) { + callback(new Error('请必须输入-90 ~ 90内的数据且小数点后最多保留六位')); + } else { + callback(); + } + } + // if (latitude <-90 || latitude > 90 ||latitude.toString().split(".")[1].length>6) { + // callback(new Error('请必须输入-90 ~ 90内的数据且小数点后最多保留六位')); + // } else { + // callback(); + // } }, trigger: 'blur' } @@ -768,6 +796,10 @@ }); }, + cancelGt() { + this.showGt = false; + this.resetQueryGt(); + }, // 杆塔取消按钮 cancel() { diff --git a/src/views/base/project/index.vue b/src/views/base/project/index.vue index b1541d7..62d9a8c 100644 --- a/src/views/base/project/index.vue +++ b/src/views/base/project/index.vue @@ -101,7 +101,7 @@ - + @@ -216,14 +216,14 @@ export default { projectDepartName: [ { required: true, message: "项目名称不能为空", trigger: "blur" } ], - projectHeadName: [ - { required: true, message: "负责人名称不能为空", trigger: "blur" } - ], + // projectHeadName: [ + // { required: true, message: "负责人名称不能为空", trigger: "blur" } + // ], // appnum: [ // { required: true, message: "APP轮播图数量不能为空", trigger: "blur" } // ], contactInformation: [ - { required: true, message: "手机号码不能为空", trigger: "blur" }, + // { required: true, message: "手机号码不能为空", trigger: "blur" }, { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", @@ -243,6 +243,18 @@ export default { }, }, methods: { + beforeUpload(file) { + const isJPG = file.raw.type === 'image/jpeg' || file.raw.type === 'image/png' || file.raw.type === 'image/jpg' + const isLt2M = file.size / 1024 / 1024 < 5 + // console.log(isJPG) + if (!isJPG) { + this.$message.error('上传图片只能是 JPG ,JPEG或 PNG 格式!') + } + if (!isLt2M) { + this.$message.error('上传图片大小不能超过 5MB!') + } + return isJPG && isLt2M + }, //单选操作-跨页 handlerSelect(val, row) { this.currentSelection.indexOf(row.projectId) === -1 @@ -370,8 +382,14 @@ export default { // 图片上传 handleChange(file, fileList) { console.log(file) + console.log(fileList) + if(this.beforeUpload(file)==false){ + fileList.splice(fileList.length-1,1) + } // this.$refs["form"].clearValidate() this.fileList = fileList; + + }, handleRemove(file, fileList) { let sum = 0 @@ -384,6 +402,7 @@ export default { console.log(this.delFileIdList) this.fileList.splice(sum, 1) }, + //上传组件-图片查看 picturePreview(file) { console.log(file) @@ -393,6 +412,13 @@ export default { //多图片查看 picturesPreview(row) { this.dialogImageUrls = []; + if(row.appnum==0){ + this.$alert('该项目部暂无APP轮播图', '提示', { + type: 'warning', + confirmButtonText: '确定', + }); + return; + } getProject(row.projectId).then(response => { response.data.fileList.forEach(item => { this.dialogImageUrls.push({ @@ -454,6 +480,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const projectId = row.projectId || this.ids; + const projectDepartName = row.projectDepartName; if(row.pronum>0){ this.$alert('该项目部存在工程,无法删除', '提示', { type: 'warning', @@ -461,14 +488,14 @@ export default { }); return; } - if(row.appnum>0){ - this.$alert('该项目部存在APP轮播图,无法删除', '提示', { - type: 'warning', - confirmButtonText: '确定', - }); - return; - } - this.$modal.confirm('是否确认删除项目名称为"' + projectId + '"的数据项?').then(function() { + // if(row.appnum>0){ + // this.$alert('该项目部存在APP轮播图,无法删除', '提示', { + // type: 'warning', + // confirmButtonText: '确定', + // }); + // return; + // } + this.$modal.confirm('是否确认删除项目部名称为"' + projectDepartName + '"的数据项?').then(function() { return delProject(projectId); }).then(() => { this.getList(); diff --git a/src/views/base/staff/index.vue b/src/views/base/staff/index.vue index 13331ac..9beab4a 100644 --- a/src/views/base/staff/index.vue +++ b/src/views/base/staff/index.vue @@ -630,6 +630,12 @@ const fileListTemp = fileList.filter(item => { return item.uid != file.uid }); + if(!(file.name.split('.')[1] === 'doc'||file.name.split('.')[1] === 'docx'||file.name.split('.')[1] === 'pdf' || file.name.split('.')[1] === 'png' || file.name.split('.')[1] === 'jpg' || file.name.split('.')[1] === 'jpeg')){ + this.$message.warning('文件格式不正确') + fileList = fileList.filter(item => { + return item.uid != file.uid + }) + } if(file.size > 1024 * 1024 * 10){ this.$message.warning('文件大小不能超过10Mb') fileList = fileList.filter(item => { @@ -660,6 +666,12 @@ const fileListTemp = fileList.filter(item => { return item.uid != file.uid }); + if(!(file.name.split('.')[1] === 'doc'||file.name.split('.')[1] === 'docx'||file.name.split('.')[1] === 'pdf' || file.name.split('.')[1] === 'png' || file.name.split('.')[1] === 'jpg' || file.name.split('.')[1] === 'jpeg')){ + this.$message.warning('文件格式不正确') + fileList = fileList.filter(item => { + return item.uid != file.uid + }) + } if(file.size > 1024 * 1024 * 10){ this.$message.warning('文件大小不能超过10Mb') fileList = fileList.filter(item => { @@ -690,6 +702,12 @@ const fileListTemp = fileList.filter(item => { return item.uid != file.uid }); + if(!(file.name.split('.')[1] === 'doc'||file.name.split('.')[1] === 'docx'||file.name.split('.')[1] === 'pdf' || file.name.split('.')[1] === 'png' || file.name.split('.')[1] === 'jpg' || file.name.split('.')[1] === 'jpeg')){ + this.$message.warning('文件格式不正确') + fileList = fileList.filter(item => { + return item.uid != file.uid + }) + } if(file.size > 1024 * 1024 * 10){ this.$message.warning('文件大小不能超过10Mb') fileList = fileList.filter(item => { @@ -949,6 +967,7 @@ }, //打开证书上传 openCertificate(row){ + this.title = "证书上传"; this.memberId = row.id; this.highImgList = []; this.electricianImgList = []; diff --git a/src/views/construction/manage/hoistManage/hoistManage.vue b/src/views/construction/manage/hoistManage/hoistManage.vue index 5dbb35d..3b1e304 100644 --- a/src/views/construction/manage/hoistManage/hoistManage.vue +++ b/src/views/construction/manage/hoistManage/hoistManage.vue @@ -156,7 +156,7 @@ export default { }, // 表单校验 rules: {}, - htmlContent: '/dz_video.html', + htmlContent: '/zhgd-ht/dz_video.html', nocheckStyle: ['dev-info-box', 'layout', 'nocheck'], checkStyle: ['dev-info-box', 'layout', 'check'], warnStyle: ['dev-info-box', 'layout', 'warn'], @@ -175,17 +175,22 @@ export default { methods: { /* 吊装设备点击赋值 */ getStyle(item) { - if (!item.status) { + if (item.status === "check") { + return this.checkStyle; + } else if (item.status === "warn") { + return this.warnStyle; + } else { return this.nocheckStyle; - } else if (item.status === 'check') { - return this.checkStyle - } else if (item.status === 'warn') { - return this.warnStyle } }, /* 向吊装视频传递参数 */ sendParams(devCode, index) { + this.devArr.forEach(item => { + item.status = 'nocheck' + }) this.devArr[index].status = 'check' + // 刷新dom + this.$forceUpdate(); this.$refs.iframePage.contentWindow.postMessage({ devCode: devCode }, '*'); }, /* 加载吊装预警设备列表 */ @@ -591,4 +596,4 @@ export default { max-height: 70vh; overflow-y: auto; } - \ No newline at end of file + diff --git a/src/views/construction/manage/realTimeManage/realTimeManage.vue b/src/views/construction/manage/realTimeManage/realTimeManage.vue index 04b45b2..e67511f 100644 --- a/src/views/construction/manage/realTimeManage/realTimeManage.vue +++ b/src/views/construction/manage/realTimeManage/realTimeManage.vue @@ -76,12 +76,19 @@
-
-
+
+ +
+ +
+
+
+
违章照片
diff --git a/src/views/index.vue b/src/views/index.vue index aadaf73..f29b8a1 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -36,7 +36,7 @@
  • Axios
  • Echarts
  • Quill
  • -
  • ...
  • + @@ -54,8 +54,7 @@ 官网:http://www.ahbonus.cn + >http://www.ahbonus.cn

    diff --git a/vue.config.js b/vue.config.js index 41190fe..5b647a0 100644 --- a/vue.config.js +++ b/vue.config.js @@ -18,9 +18,9 @@ module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === "production" ? "/" : "/", + publicPath: process.env.NODE_ENV === "production" ? "/zhgd-ht/" : "/zhgd-ht/", // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) - outputDir: 'dist', + outputDir: 'zhgd-ht', // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) assetsDir: 'static', // 是否开启eslint保存检测,有效值:ture | false | 'error' @@ -35,7 +35,10 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { +<<<<<<< HEAD // target: `http://127.0.0.1:18080/ljzhgd/`, +======= +>>>>>>> 54d250bd762b286805ca4150c632ab2973b49202 target: `http://192.168.0.14:21900/ljzhgd/`, changeOrigin: true, pathRewrite: {