Commit a6ad0dd29ab25bf8df075b9d0ef205c25dfd9302

Authored by guzijian
1 parent 39e2ecc8

feat:修改样式,修改路由方式

src/components/ConstElPopover/index.vue
@@ -75,7 +75,6 @@ const tableData = ref( @@ -75,7 +75,6 @@ const tableData = ref(
75 75
76 /** 处理信息 */ 76 /** 处理信息 */
77 const handleInfo = (val) => { 77 const handleInfo = (val) => {
78 - console.log(val);  
79 loading.value = true 78 loading.value = true
80 setTimeout(() => { 79 setTimeout(() => {
81 loading.value = false; 80 loading.value = false;
src/components/FleetContentBox/index.vue
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <div v-for="(childItem, childIndex) in item.fleetInfos" :key="childItem.lineName" class="fleet-line-info-container"> 5 <div v-for="(childItem, childIndex) in item.fleetInfos" :key="childItem.lineName" class="fleet-line-info-container">
6 <!-- <div class="line-box" style="height: 1px; margin: 5px; background-color: #0761ba;"></div> --> 6 <!-- <div class="line-box" style="height: 1px; margin: 5px; background-color: #0761ba;"></div> -->
7 7
8 - <div class="fleet-line-title"> 8 + <div :id="childItem.lineName" class="fleet-line-title">
9 {{ childItem.lineName }} 9 {{ childItem.lineName }}
10 </div> 10 </div>
11 <div class="line-box" style="height: 2px; margin: 10px 0; background: #d9e0e2;"></div> 11 <div class="line-box" style="height: 2px; margin: 10px 0; background: #d9e0e2;"></div>
@@ -172,6 +172,7 @@ onMounted(() =&gt; { @@ -172,6 +172,7 @@ onMounted(() =&gt; {
172 <style lang="scss" scoped> 172 <style lang="scss" scoped>
173 .fleet-content-box { 173 .fleet-content-box {
174 height: calc(100% - clamp(0.8rem, -0.907rem + 5.71vw, 1.3rem)); 174 height: calc(100% - clamp(0.8rem, -0.907rem + 5.71vw, 1.3rem));
  175 + // height: auto;
175 width: auto; 176 width: auto;
176 // overflow-y: hidden; 177 // overflow-y: hidden;
177 // overflow-x: hidden; 178 // overflow-x: hidden;
src/router/index.js
1 -import { createRouter, createWebHashHistory } from 'vue-router'; 1 +import { createRouter, createWebHistory } from 'vue-router';
2 /* Layout */ 2 /* Layout */
3 import Layout from '@/layout'; 3 import Layout from '@/layout';
4 4
@@ -166,7 +166,7 @@ export const dynamicRoutes = [ @@ -166,7 +166,7 @@ export const dynamicRoutes = [
166 ] 166 ]
167 167
168 const router = createRouter({ 168 const router = createRouter({
169 - history: createWebHashHistory(), 169 + history: createWebHistory(),
170 routes: constantRoutes, 170 routes: constantRoutes,
171 scrollBehavior(to, from, savedPosition) { 171 scrollBehavior(to, from, savedPosition) {
172 if (savedPosition) { 172 if (savedPosition) {
src/views/email/email/index.vue
@@ -121,7 +121,6 @@ const data = reactive({ @@ -121,7 +121,6 @@ const data = reactive({
121 }); 121 });
122 122
123 const changeSelect = (data) => { 123 const changeSelect = (data) => {
124 - console.log(data);  
125 } 124 }
126 125
127 const { queryParams, form, rules } = toRefs(data); 126 const { queryParams, form, rules } = toRefs(data);
@@ -135,7 +134,6 @@ function getList() { @@ -135,7 +134,6 @@ function getList() {
135 if (emailList.value.type == 0 && emailList.value.parentId != null) { 134 if (emailList.value.type == 0 && emailList.value.parentId != null) {
136 emailList.value.parentId = emailList.value.parentId.split(',') 135 emailList.value.parentId = emailList.value.parentId.split(',')
137 } 136 }
138 - console.log(emailList.value);  
139 total.value = response.total; 137 total.value = response.total;
140 loading.value = false; 138 loading.value = false;
141 }); 139 });
@@ -201,7 +199,6 @@ function handleUpdate(row) { @@ -201,7 +199,6 @@ function handleUpdate(row) {
201 }); 199 });
202 getEmail(_id).then(response => { 200 getEmail(_id).then(response => {
203 form.value = response.data; 201 form.value = response.data;
204 - console.log(form.value.parentId);  
205 if (form.value.type == 0 && form.value.parentId) { 202 if (form.value.type == 0 && form.value.parentId) {
206 form.value.parentId = form.value.parentId.split(',').map(item => Number(item)); 203 form.value.parentId = form.value.parentId.split(',').map(item => Number(item));
207 } 204 }
src/views/home/index.vue
@@ -57,10 +57,21 @@ @@ -57,10 +57,21 @@
57 <div class="big-view-container-main-content common-style"> 57 <div class="big-view-container-main-content common-style">
58 <!-- 车队信息 --> 58 <!-- 车队信息 -->
59 <div v-for="(item, index) in fleetInfoList" :key="item.title" class="fleet-common-style"> 59 <div v-for="(item, index) in fleetInfoList" :key="item.title" class="fleet-common-style">
60 - <!-- 车队title -->  
61 - <div class="fleet-top-container">  
62 - <div class="fleet-top-box"></div>  
63 - <div class="fleet-top-title">{{ item.title }}</div> 60 + <div class="fleet-global-content-container">
  61 + <div class="fleet-top-container">
  62 + <div class="fleet-top-box"></div>
  63 + <!-- 车队title -->
  64 + <div class="fleet-top-title">{{ item.title }}</div>
  65 + </div>
  66 + <div class="fleet-line-info-container">
  67 + <el-tooltip v-for="todo in item.fleetStates " effect="dark" class="fleet-lineName-tip"
  68 + :content="todo.lineName" placement="top">
  69 + <el-link :underline="false" :href="'#' + todo.lineName" type="primary">
  70 + <div class="fleet-line-info-box" :style="signStyleColor[todo.state]"></div>
  71 + </el-link>
  72 + </el-tooltip>
  73 +
  74 + </div>
64 </div> 75 </div>
65 <!-- 内容盒子 --> 76 <!-- 内容盒子 -->
66 <FleetContentBox :handleLoadSuccess="handleLoadSuccess" :signStyleColor="signStyleColor" 77 <FleetContentBox :handleLoadSuccess="handleLoadSuccess" :signStyleColor="signStyleColor"
@@ -220,7 +231,7 @@ const startUpdateDataTaskScheduler = () =&gt; { @@ -220,7 +231,7 @@ const startUpdateDataTaskScheduler = () =&gt; {
220 return setInterval(() => { 231 return setInterval(() => {
221 currentDate = moment(); 232 currentDate = moment();
222 if (timeTaskObject.updateDateSchedulerObject <= "0:00") { 233 if (timeTaskObject.updateDateSchedulerObject <= "0:00") {
223 - const updateMinutes = 5 234 + const updateMinutes = 1
224 timeTaskObject.updateDateSchedulerObject = `${updateMinutes}:00`; 235 timeTaskObject.updateDateSchedulerObject = `${updateMinutes}:00`;
225 targetDate = moment().add(updateMinutes, 'minutes'); 236 targetDate = moment().add(updateMinutes, 'minutes');
226 timeTaskObject.updateDateObject = currentDate.format("yyyy-MM-DD HH:mm:ss"); 237 timeTaskObject.updateDateObject = currentDate.format("yyyy-MM-DD HH:mm:ss");
@@ -240,7 +251,7 @@ const startUpdateDataTaskScheduler = () =&gt; { @@ -240,7 +251,7 @@ const startUpdateDataTaskScheduler = () =&gt; {
240 251
241 252
242 /** 监听数据更新日期 */ 253 /** 监听数据更新日期 */
243 -watch(timeTaskObject.updateDateObject, (val1, val2) => { 254 +watch(() => timeTaskObject.updateDateObject, (val1, val2) => {
244 // 发送请求更新数据 255 // 发送请求更新数据
245 const currentTime = moment().format('HH:mm'); 256 const currentTime = moment().format('HH:mm');
246 let dateKey; 257 let dateKey;
@@ -249,7 +260,6 @@ watch(timeTaskObject.updateDateObject, (val1, val2) =&gt; { @@ -249,7 +260,6 @@ watch(timeTaskObject.updateDateObject, (val1, val2) =&gt; {
249 } else { 260 } else {
250 dateKey = moment().format("YYYY-MM-DD"); 261 dateKey = moment().format("YYYY-MM-DD");
251 } 262 }
252 - console.log();  
253 currentDateKey.value = dateKey; 263 currentDateKey.value = dateKey;
254 handleUpdateDataRequest(currentDateKey.value); 264 handleUpdateDataRequest(currentDateKey.value);
255 }) 265 })
@@ -510,7 +520,7 @@ const handleGlobalInfo = (data, num) =&gt; { @@ -510,7 +520,7 @@ const handleGlobalInfo = (data, num) =&gt; {
510 width: 100%; 520 width: 100%;
511 height: calc(85% - clamp(0.7rem, 0.489rem + 1.05vw, 1.2rem) * 3); 521 height: calc(85% - clamp(0.7rem, 0.489rem + 1.05vw, 1.2rem) * 3);
512 display: flex; 522 display: flex;
513 - font-size: clamp(0.7rem, -0.907rem + 5.71vw, 1.1rem); 523 + font-size: 1.2vw;
514 524
515 // 通用样式 525 // 通用样式
516 .fleet-common-style { 526 .fleet-common-style {
@@ -524,26 +534,52 @@ const handleGlobalInfo = (data, num) =&gt; { @@ -524,26 +534,52 @@ const handleGlobalInfo = (data, num) =&gt; {
524 padding: clamp(0.6rem, 0.489rem + 1.05vw, 1rem); 534 padding: clamp(0.6rem, 0.489rem + 1.05vw, 1rem);
525 background-color: white; 535 background-color: white;
526 536
527 - .fleet-top-container { 537 + .fleet-global-content-container {
528 display: flex; 538 display: flex;
529 box-sizing: border-box; 539 box-sizing: border-box;
530 align-items: center; 540 align-items: center;
531 541
532 - .fleet-top-box {  
533 - height: clamp(0.5rem, -0.907rem + 5.71vw, 0.8rem);  
534 - width: clamp(0.5rem, -0.907rem + 5.71vw, 0.8rem); 542 + .fleet-top-container {
  543 + width: 40%;
535 display: flex; 544 display: flex;
536 - justify-content: center; 545 + box-sizing: border-box;
537 align-items: center; 546 align-items: center;
538 - background-color: green;  
539 - margin-right: clamp(0.4rem, 0.489rem + 1.05vw, 0.7rem); 547 + flex-wrap: nowrap;
  548 +
  549 + .fleet-top-box {
  550 + height: 1vw;
  551 + width: 1vw;
  552 + display: flex;
  553 + justify-content: center;
  554 + align-items: center;
  555 + background-color: orange;
  556 + margin-right: clamp(0.4rem, 0.489rem + 1.05vw, 0.7rem);
  557 + }
  558 +
  559 + .fleet-top-title {
  560 + display: flex;
  561 + justify-content: center;
  562 + align-items: center;
  563 + font-size: 1.4vw;
  564 + }
540 } 565 }
541 566
542 - .fleet-top-title { 567 + .fleet-line-info-container {
  568 + width: 60%;
  569 + height: 1.4vw;
543 display: flex; 570 display: flex;
544 - justify-content: center;  
545 - align-items: center;  
546 - font-size: clamp(0.8rem, -0.907rem + 5.71vw, 1.3rem); 571 + // justify-content: center;
  572 + box-sizing: border-box;
  573 + flex-wrap: wrap;
  574 +
  575 + .fleet-line-info-box {
  576 + height: 0.8vw;
  577 + width: 0.8vw;
  578 + box-sizing: border-box;
  579 + margin-right: 2px;
  580 + margin-top: 2px;
  581 + border: 1px solid #d9e0e2;
  582 + }
547 } 583 }
548 } 584 }
549 } 585 }