This commit is contained in:
jjLv 2024-08-29 17:43:46 +08:00
commit e03e09da4b
10 changed files with 24 additions and 16 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

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

@ -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'],
@ -596,4 +596,4 @@ export default {
max-height: 70vh;
overflow-y: auto;
}
</style>
</style>

View File

@ -70,12 +70,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,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://127.0.0.1:18080/ljzhgd/`,
target: `http://192.168.0.14:21900/ljzhgd/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''