Browse Source

修改巡视计划的样式风格,修改公共的打包路径

master
douyage 1 month ago
parent
commit
df8f79ba27
15 changed files with 475 additions and 41 deletions
  1. +9
    -0
      .env.htjc6
  2. +2
    -0
      .gitignore
  3. +1
    -0
      package.json
  4. +0
    -1
      public/index.html
  5. +149
    -0
      src/assets/styles/date-picker.scss
  6. +12
    -0
      src/assets/styles/sidebar.scss
  7. +2
    -2
      src/assets/styles/variables.scss
  8. +20
    -2
      src/layout/components/Sidebar/index.vue
  9. +1
    -0
      src/main.js
  10. +5
    -6
      src/permission.js
  11. +9
    -8
      src/router/index.js
  12. +109
    -0
      src/views/cards/tasksShow/dailyDisplay.vue
  13. +129
    -0
      src/views/cards/tasksShow/monthlyDisplay.vue
  14. +23
    -20
      src/views/cards/tasksShow/yearDisplay.vue
  15. +4
    -2
      vue.config.js

+ 9
- 0
.env.htjc6 View File

@ -0,0 +1,9 @@
NODE_ENV = 'production'
ENV = 'production'
VUE_APP_TITLE = 智能巡视
VUE_APP_BASE_API = '/prod-api'
VUE_APP_NVR_API = 'http://192.168.1.86:28081'
VUE_APP_PUBLIC_PATH = '/app/htjc6/'
VUE_APP_OUTPUT_DIR = 'dist/app/htjc6'

+ 2
- 0
.gitignore View File

@ -1,6 +1,8 @@
.DS_Store
node_modules/
dist/
dist-htjc6/
release/
npm-debug.log*
yarn-debug.log*
yarn-error.log*


+ 1
- 0
package.json View File

@ -7,6 +7,7 @@
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:htjc6": "vue-cli-service build --mode htjc6",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"


+ 0
- 1
public/index.html View File

@ -11,7 +11,6 @@
<script src="<%= BASE_URL %>js/liveplayer-lib.min.js"></script>
<script src="<%= BASE_URL %>plugins/zlmclient/ZLMRTCClient.js"></script>
<script src="<%= BASE_URL %>plugins/jessibucaPlayer/index.js"></script>
<script src="<%= BASE_URL %>font/player/iconfont.js"></script>
<style>
html,
body,


+ 149
- 0
src/assets/styles/date-picker.scss View File

@ -0,0 +1,149 @@
/* Unified date, month, year, range and time picker theme. */
.el-date-editor.el-input .el-input__inner,
.el-date-editor.el-input__inner,
.el-date-editor .el-range-input {
color: #dcecff !important;
background: #12356c !important;
border-color: #1b91bd !important;
}
.el-date-editor.el-input .el-input__inner:hover,
.el-date-editor.el-input .el-input__inner:focus,
.el-date-editor.el-input__inner:hover,
.el-date-editor.el-input__inner.is-active {
border-color: #20cbe5 !important;
}
.el-date-editor .el-input__icon,
.el-date-editor .el-range__icon,
.el-date-editor .el-range__close-icon,
.el-date-editor .el-range-separator {
color: #35c9e9 !important;
}
.el-date-editor .el-range-input::placeholder,
.el-date-editor.el-input .el-input__inner::placeholder {
color: #829bc5 !important;
}
.el-picker-panel,
.card-date-editor,
.el-time-panel,
.el-time-range-picker {
color: #c8d8f2 !important;
border-color: #183f78 !important;
background: #0d2d5f !important;
box-shadow: 0 8px 22px rgba(2, 10, 38, 0.45) !important;
}
.el-picker-panel__body,
.el-picker-panel__content,
.el-date-range-picker__content,
.el-picker-panel__sidebar,
.el-time-panel__content,
.el-time-spinner__wrapper,
.el-time-spinner__list {
color: #c8d8f2 !important;
background: #0d2d5f !important;
}
.el-picker-panel__sidebar,
.el-date-range-picker__content.is-left,
.el-date-picker__header--bordered,
.el-date-table th,
.el-time-panel__footer {
border-color: rgba(70, 116, 176, 0.42) !important;
}
.el-date-picker__header-label,
.el-date-range-picker__header,
.el-picker-panel__icon-btn,
.el-picker-panel__shortcut,
.el-date-table th,
.el-month-table td .cell,
.el-year-table td .cell,
.el-time-spinner__item {
color: #c8d8f2 !important;
}
.el-date-table td.available span,
.el-date-table td.available div,
.el-date-table td.next-month span,
.el-date-table td.prev-month span {
color: inherit;
}
.el-date-table td.prev-month,
.el-date-table td.next-month,
.el-date-table td.disabled div,
.el-month-table td.disabled .cell,
.el-year-table td.disabled .cell {
color: #506b96 !important;
background: transparent !important;
}
.el-date-table td.available:hover span,
.el-month-table td .cell:hover,
.el-year-table td .cell:hover,
.el-picker-panel__icon-btn:hover,
.el-picker-panel__shortcut:hover,
.el-time-spinner__item:hover:not(.disabled):not(.active) {
color: #54ffff !important;
background: rgba(39, 106, 168, 0.45) !important;
}
.el-date-table td.in-range div,
.el-date-table td.in-range div:hover {
background: #173f78 !important;
}
.el-date-table td.start-date div,
.el-date-table td.end-date div {
color: #ffffff !important;
background: #176b9e !important;
}
.el-date-table td.today span,
.el-month-table td.today .cell,
.el-year-table td.today .cell {
color: #54ffff !important;
font-weight: 700;
}
.el-date-table td.current:not(.disabled) span,
.el-month-table td.current:not(.disabled) .cell,
.el-year-table td.current:not(.disabled) .cell {
color: #ffffff !important;
background: #1489ae !important;
}
.el-date-table td.current:not(.disabled) span,
.el-date-table td.start-date span,
.el-date-table td.end-date span {
border-radius: 50%;
}
.el-time-spinner__item.active:not(.disabled) {
color: #ffffff !important;
background: #176b9e !important;
}
.el-time-panel__btn,
.el-picker-panel__link-btn.el-button--text {
color: #54ffff !important;
}
.el-picker-panel__footer {
border-color: rgba(70, 116, 176, 0.42) !important;
background: #0d2d5f !important;
}
.el-picker-panel[x-placement^="bottom"] .popper__arrow::after,
.el-time-panel[x-placement^="bottom"] .popper__arrow::after {
border-bottom-color: #0d2d5f !important;
}
.el-picker-panel[x-placement^="top"] .popper__arrow::after,
.el-time-panel[x-placement^="top"] .popper__arrow::after {
border-top-color: #0d2d5f !important;
}

+ 12
- 0
src/assets/styles/sidebar.scss View File

@ -74,6 +74,18 @@
margin-right: 16px;
vertical-align: -3px;
object-fit: contain;
filter: grayscale(1) brightness(0) invert(1);
transition: filter 0.2s ease;
}
.el-menu-item.is-active .menu-icon-img,
.el-submenu.is-active > .el-submenu__title .menu-icon-img {
filter: none;
}
.el-menu-item.is-active,
.el-submenu.is-active > .el-submenu__title {
color: $base-menu-color-active !important;
}
.menu-icon-placeholder {


+ 2
- 2
src/assets/styles/variables.scss View File

@ -13,12 +13,12 @@ $base-panel-border:#0B2567;
$base-navbar-background:#0F124A;
// 默认菜单主题风格
$base-menu-color:#54FFFF;
$base-menu-color:#FFFFFF;
$base-menu-color-active:#54FFFF;
$base-menu-background:#0F124A;
$base-logo-title-color: #ffffff;
$base-menu-light-color:#54FFFF;
$base-menu-light-color:#FFFFFF;
$base-menu-light-background:#0F124A;
$base-logo-light-title-color: #001529;


+ 20
- 2
src/layout/components/Sidebar/index.vue View File

@ -36,8 +36,26 @@ export default {
...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]),
displayedRoutes() {
const filterHiddenNavigation = (routes = []) => routes.reduce((result, route) => {
const title = String(route.meta && route.meta.title || "").split("|")[0];
const isTaskManagement = title === "巡视任务管理";
const isImplementationPoints = title === "点位管理" &&
route.path !== "/site-management" &&
route.path !== "/inspection-workspace/points";
if (isTaskManagement || isImplementationPoints) return result;
result.push({
...route,
children: route.children
? filterHiddenNavigation(route.children)
: route.children,
});
return result;
}, []);
const visibleRoutes = filterHiddenNavigation(this.sidebarRouters);
if (!this.$route.meta.patrolWorkspace) {
return this.sidebarRouters;
return visibleRoutes;
}
const workspacePaths = {
"/task-summary": "/inspection-workspace/task",
@ -49,7 +67,7 @@ export default {
"/video-preview": "/inspection-workspace/video-preview",
"/video-playback": "/inspection-workspace/video-playback",
};
return this.sidebarRouters
return visibleRoutes
.filter((route) => workspacePaths[route.path])
.map((route) => {
const workspacePath = workspacePaths[route.path];


+ 1
- 0
src/main.js View File

@ -8,6 +8,7 @@ import './assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import './views/cards/assets/styles/index.scss'
import './assets/styles/date-picker.scss'
import App from './App'
import store from './store'
import router from './router'


+ 5
- 6
src/permission.js View File

@ -38,12 +38,11 @@ router.beforeEach(async (to, from, next) => {
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
});
})
.catch((err) => {
// store.dispatch("LogOut").then(() => {
// Message.error(err);
// next({ path: "" });
// });
.catch(async (err) => {
isRelogin.show = false;
await store.dispatch("FedLogOut");
Message.error((err && err.message) || "登录状态已失效,请重新登录");
next({ path: "/login", query: { redirect: to.fullPath }, replace: true });
});
} else {
next();


+ 9
- 8
src/router/index.js View File

@ -161,7 +161,7 @@ export const constantRoutes = [
path: 'inspectionTask',
component: () => import('@/views/cards/taskSummary/inspectionTask'),
name: 'InspectionTaskSummary',
meta: { title: '巡视任务', activeMenu: '/task-summary' }
meta: { title: '巡视任务', activeMenu: '/task-summary/inspectionTask' }
}
]
},
@ -175,7 +175,7 @@ export const constantRoutes = [
path: 'notstart',
component: () => import('@/views/cards/patrolPlan/notstart'),
name: 'PatrolPlan',
meta: { title: '巡视方案', icon: 'task', activeMenu: '/patrol-plan' }
meta: { title: '巡视方案', icon: 'task', activeMenu: '/patrol-plan/notstart' }
}
]
},
@ -206,14 +206,14 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/cards/patrolReport/InspectionReporter'),
name: 'PatrolReport',
meta: { title: '巡视报告', activeMenu: '/patrol-report' }
meta: { title: '巡视报告', activeMenu: '/patrol-report/index' }
},
{
path: 'detail',
component: () => import('@/views/cards/patrolReport/patrolReportDetail'),
name: 'patrolReportDetail',
hidden: true,
meta: { title: '巡视报告详情', activeMenu: '/patrol-report' }
meta: { title: '巡视报告详情', activeMenu: '/patrol-report/index' }
}
]
},
@ -227,7 +227,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/cards/tasksShow/index'),
name: 'PatrolSchedule',
meta: { title: '巡视计划', activeMenu: '/patrol-schedule' }
meta: { title: '巡视计划', activeMenu: '/patrol-schedule/index' }
}
]
},
@ -241,7 +241,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/cards/defectRecord/index'),
name: 'DefectRecord',
meta: { title: '缺陷记录', activeMenu: '/defect-record' }
meta: { title: '缺陷记录', activeMenu: '/defect-record/index' }
}
]
},
@ -255,7 +255,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/video/LivePreview'),
name: 'VideoLivePreview',
meta: { title: '视频预览', activeMenu: '/video-preview' }
meta: { title: '视频预览', activeMenu: '/video-preview/index' }
}
]
},
@ -269,7 +269,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/video/HistoryPlayback'),
name: 'VideoHistoryPlayback',
meta: { title: '历史回放', activeMenu: '/video-playback' }
meta: { title: '历史回放', activeMenu: '/video-playback/index' }
}
]
}
@ -363,6 +363,7 @@ Router.prototype.replace = function push(location) {
export default new Router({
mode: 'history', // 去掉url中的#
base: process.env.VUE_APP_PUBLIC_PATH || '/',
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})

+ 109
- 0
src/views/cards/tasksShow/dailyDisplay.vue View File

@ -707,4 +707,113 @@ export default {
:deep(.el-date-table td.today:not(.current) > div) {
color: #247382;
}
/* Blue dashboard theme */
.day-view-container {
border-radius: 0;
color: #dceaff;
background: #0b1248;
}
.day-view-header {
padding: 10px 20px;
border-bottom: 1px solid rgba(76, 109, 169, 0.55);
background: #0b174f;
}
.current-date {
color: #ffffff;
}
.time-week-info,
.time-label {
color: #809ed8;
}
.time-axis {
border-right: 1px solid rgba(76, 109, 169, 0.55);
background: #0b174f;
}
.time-label {
border-right: 1px solid rgba(76, 109, 169, 0.55);
}
.hour-label {
border-bottom: 1px dashed rgba(83, 105, 157, 0.42);
}
.half-hour-label {
border-bottom: 1px solid rgba(76, 109, 169, 0.55);
}
.tasks-container {
background: #101e63;
}
.grid-line {
border-bottom: 1px dashed rgba(83, 105, 157, 0.42);
background: #13266f;
}
.grid-line:nth-child(odd) {
border-bottom: 1px solid rgba(76, 109, 169, 0.55);
background: #101e63;
}
.task-item {
border: 1px solid rgba(135, 206, 255, 0.5);
border-radius: 2px;
}
.task-status-running {
background-color: rgba(20, 127, 193, 0.94) !important;
}
.task-status-completed {
background-color: rgba(23, 138, 112, 0.94) !important;
}
.task-status-pending {
background-color: rgba(83, 108, 159, 0.94) !important;
}
.loading-overlay {
background: rgba(8, 18, 65, 0.86);
}
.loading-spinner {
border-color: #294c91;
border-top-color: #54ffff;
}
.loading-text,
.no-data {
color: #809ed8;
}
:deep(.el-input__inner) {
border: 1px solid #438fe5;
border-radius: 0;
color: #dceaff;
background: #0b1d58;
}
:deep(.el-input__prefix),
:deep(.el-input__suffix) {
color: #64baff;
}
:deep(.card-date-editor) {
border-color: #438fe5;
background-color: #0b1d58;
}
:deep(.el-date-table td.current:not(.disabled) > div) {
background-color: #147fc1;
}
:deep(.el-date-table td.today:not(.current) > div) {
color: #54ffff;
}
</style>

+ 129
- 0
src/views/cards/tasksShow/monthlyDisplay.vue View File

@ -788,4 +788,133 @@ export default {
.card-date-editor {
background-color: #101d29;
}
/* Blue dashboard theme */
.month-view {
background: #0b1248;
color: #dceaff;
}
.month-header {
margin-bottom: 14px;
padding: 10px 0;
border-radius: 0;
background: transparent;
}
.month-header h2 {
color: #b9d6ff !important;
}
.nav-btn {
width: 36px;
border: 1px solid #438fe5;
border-radius: 0;
color: #9dcbff;
background: #0b1d58;
}
.nav-btn:hover {
border-color: #55baff;
color: #ffffff;
background: #123b82;
}
.calendar-grid {
border: 1px solid #2787ed;
border-radius: 0;
background: #0b174f;
}
.weekday-header {
padding: 0;
border-bottom: 1px solid #2787ed;
background: #0b174f;
}
.weekday {
padding: 12px 5px;
border-right: 1px solid #2787ed;
color: #35bcff;
}
.days-grid,
.days-grid > .day-cell {
background: #101e63 !important;
}
.days-grid > .day-cell:nth-child(14n + 8),
.days-grid > .day-cell:nth-child(14n + 9),
.days-grid > .day-cell:nth-child(14n + 10),
.days-grid > .day-cell:nth-child(14n + 11),
.days-grid > .day-cell:nth-child(14n + 12),
.days-grid > .day-cell:nth-child(14n + 13),
.days-grid > .day-cell:nth-child(14n + 14) {
background: #13266f !important;
}
.day-cell {
border-right: 1px solid #2787ed;
border-bottom: 1px solid #2787ed;
}
.day-cell.empty {
border-right: 1px solid #2787ed;
border-bottom: 1px solid #2787ed;
background: #091442 !important;
}
.day-number {
color: #8096ce;
}
.day-cell.today {
z-index: 2;
background: linear-gradient(135deg, rgba(13, 99, 173, 0.72), rgba(13, 65, 139, 0.72)) !important;
border: 2px solid #54ffff !important;
box-shadow: inset 0 0 20px rgba(84, 255, 255, 0.18), 0 0 8px rgba(84, 255, 255, 0.42);
}
.day-cell.today .day-number {
display: inline-flex;
align-items: center;
gap: 7px;
color: #ffffff;
text-shadow: 0 0 6px rgba(84, 255, 255, 0.75);
}
.day-cell.today .day-number::after {
content: "今";
display: inline-grid;
place-items: center;
width: 20px;
height: 20px;
border-radius: 50%;
color: #062653;
background: #54ffff;
font-size: 11px;
line-height: 1;
text-shadow: none;
}
.status-executing { background-color: #147fc1; }
.status-completed { background-color: #178a70; }
.status-not-executed { background-color: #536c9f; }
.task-tooltip {
border: 1px solid #438fe5;
border-radius: 2px;
background: #0b1d58;
}
:deep(.el-date-editor--month),
:deep(.el-input__inner) {
border-radius: 0;
background-color: #0b1d58;
}
:deep(.el-input__inner) {
border: 1px solid #438fe5;
color: #dceaff;
}
</style>

+ 23
- 20
src/views/cards/tasksShow/yearDisplay.vue View File

@ -186,6 +186,8 @@ export default {
<style scoped>
.year-view {
width: 100%;
min-height: 100%;
color: #e8f2ff;
}
.year-header {
display: flex;
@ -197,7 +199,7 @@ export default {
.year-header h2 {
margin: 0;
font-size: 20px;
color: #a1aad3;
color: #b9d6ff;
}
.year-controls {
@ -213,23 +215,24 @@ export default {
}
.month-card {
background-color: #172533;
background: linear-gradient(135deg, rgba(18, 37, 105, 0.96), rgba(15, 31, 92, 0.96));
padding: 50px 15px;
border-radius: 8px;
border: 2px solid #40486a;
transition: transform 0.3s ease;
border-radius: 0;
border: 1px solid #2787ed;
box-shadow: inset 0 0 18px rgba(23, 91, 196, 0.12);
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.month-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(64, 72, 106, 0.3);
border-color: #4fb5ff;
box-shadow: inset 0 0 22px rgba(31, 116, 229, 0.2), 0 0 8px rgba(39, 135, 237, 0.25);
}
.month-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 15px;
color: #a1aad3;
color: #35bcff;
text-align: center;
}
@ -246,7 +249,7 @@ export default {
.stat-item {
font-size: 14px;
color: #6b7491;
color: #dceaff;
}
.status-executing {
@ -266,27 +269,27 @@ export default {
/* 覆盖Element UI的默认样式 */
:deep(.el-date-editor--year) {
background-color: #172533;
border: 2px solid #40486a;
border-radius: 4px;
background-color: #0b1d58;
border: 1px solid #438fe5;
border-radius: 0;
}
:deep(.el-input__inner) {
background-color: #172533;
color: #a1aad3;
border: 2px solid #40486a;
background-color: #0b1d58;
color: #dceaff;
border: 1px solid #438fe5;
}
:deep(.el-input__inner::placeholder) {
color: #6b7491;
color: #7da8d8;
}
:deep(.el-date-picker__header-label) {
color: #a1aad3;
color: #dceaff;
}
:deep(.el-date-picker__year-btn) {
color: #a1aad3;
color: #dceaff;
}
:deep(.el-date-picker__year-btn:hover) {
@ -294,7 +297,7 @@ export default {
}
:deep(.el-picker-panel) {
background-color: #172533;
border: 2px solid #40486a;
background-color: #0b1d58;
border: 1px solid #438fe5;
}
</style>

+ 4
- 2
vue.config.js View File

@ -11,6 +11,8 @@ const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口
const CopyWebpackPlugin = require("copy-webpack-plugin");
const appBasePath = process.env.VUE_APP_PUBLIC_PATH || "/";
const buildOutputDir = process.env.VUE_APP_OUTPUT_DIR || "dist";
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@ -19,9 +21,9 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
publicPath: appBasePath,
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist',
outputDir: buildOutputDir,
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: 'static',
// 是否开启eslint保存检测,有效值:ture | false | 'error'


Loading…
Cancel
Save