This commit is contained in:
zzyuan 2024-08-29 19:40:56 +08:00
commit 3c005552f8
15 changed files with 137 additions and 41 deletions

View File

@ -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'

View File

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

View File

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

View File

@ -102,7 +102,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
location.href = '/zhgd-ht/';
})
}).catch(() => {});
}

View File

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

View File

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

View File

@ -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;

View File

@ -149,7 +149,7 @@
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" >
<el-form-item label="设备类型" prop="devcieType" >
<el-select v-if="flag == true" v-model="form.deviceTypeName" placeholder="请选择设备类型" clearable style="width: 100%;" disabled>
<el-select v-if="flag == true" v-model="form.deviceType" placeholder="请选择设备类型" clearable style="width: 100%;" disabled>
<el-option
v-for="dict in dict.type.sys_device_type"
v-if = "dict.value != 'shx'"
@ -158,7 +158,7 @@
:value="dict.value"
/>
</el-select>
<el-select v-else v-model="form.deviceTypeName" placeholder="请选择设备类型" clearable style="width: 100%;">
<el-select v-else v-model="form.deviceType" placeholder="请选择设备类型" clearable style="width: 100%;">
<el-option
v-for="dict in dict.type.sys_device_type"
v-if = "dict.value != 'shx'"
@ -860,6 +860,7 @@
this.getList();
});
} else {
console.log(this.form)
addDevice(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;

View File

@ -132,7 +132,7 @@
/>
<!-- 杆塔弹窗 -->
<el-dialog :title="title" :visible.sync="showGt" width="1000px" height="1000px" append-to-body>
<el-dialog :title="title" :visible.sync="showGt" width="1000px" height="1000px" append-to-body @close="cancelGt">
<el-form :model="queryGt" ref="queryFormGt" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item prop="gtCode">
<el-input
@ -516,15 +516,29 @@
if (value === '' || value === null) {
return callback(new Error('请必须输入-180 ~ 180内的数据且小数点后最多保留六位'));
}
if(/[\u4e00-\u9fff]/.test(value)){
const regex = /^[+-]?(0|[1-9]\d*)(\.\d+)?$/;
if(!regex.test(value)){
return callback(new Error('请勿输入非数字'));
}
const longitude = parseFloat(value);
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.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() {

View File

@ -101,7 +101,7 @@
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目名称" prop="projectDepartName">
<el-form-item label="项目名称" prop="projectDepartName">
<el-input v-model="form.projectDepartName" maxlength="20" placeholder="请输入项目名称" />
</el-form-item>
<el-form-item label="负责人" prop="projectHeadName">
@ -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();

View File

@ -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 = [];

View File

@ -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 }, '*');
},
/* 加载吊装预警设备列表 */

View File

@ -76,12 +76,19 @@
</div>
<!-- 违章识别 -->
<div class="vio-box">
<el-carousel height="200px" indicator-position="outside" :interval="10000" @change="loadVioInfos"
<el-carousel height="200px" indicator-position="outside" :interval="100000" @change="loadVioInfos"
v-if="vioArr.length > 0">
<el-carousel-item v-for="(itemArr, arrIndex) in vioArr" :key="arrIndex">
<div class="vio-box-info layout">
<div class="vio-detail layout" v-for="(item, index) in itemArr" :key="index">
<div class="vio-img">
<div class="vio-img" v-if="!item.base64Url || item.base64Url.length < 32">
<el-image>
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
</div>
<div class="vio-img" v-if="item.base64Url && item.base64Url.length > 32">
<img :src="item.base64Url" alt="违章照片">
</div>
<div class="vio-content layout">

View File

@ -36,7 +36,7 @@
<li>Axios</li>
<li>Echarts</li>
<li>Quill</li>
<li>...</li>
</ul>
</el-col>
</el-row>
@ -54,8 +54,7 @@
<i class="el-icon-s-promotion"></i> 官网<el-link
href="http://www.ahbonus.cn"
target="_blank"
>http://www.ahbonus.cn</el-link
>
>http://www.ahbonus.cn</el-link>
</p>

View File

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