From ea4e6ecc901cb22337712d51ee5a4fb208bf64ad Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期二, 22 八月 2023 10:13:23 +0800 Subject: [PATCH] 修改部分全局样式 --- src/views/experiment/planAssignments/plan.vue | 46 +++++++++++++++++++---- src/styles/element-ui.scss | 5 -- src/styles/sidebar.scss | 28 +++++++------- 3 files changed, 53 insertions(+), 26 deletions(-) diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index a831e80..e788c56 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -13,7 +13,7 @@ .el-upload__input { display: none; - + } @@ -103,9 +103,6 @@ // .el-menu-popup{ // min-width: 100px !important; // } -.el-menu--vertical{ - max-width: 100px !important; -} .el-menu--collapse .el-menu .el-submenu, .el-menu--popup { min-width: 100px !important; diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss index 5d56d60..42ae7b0 100644 --- a/src/styles/sidebar.scss +++ b/src/styles/sidebar.scss @@ -69,18 +69,18 @@ } // menu hover - + .el-submenu__title,.el-tooltip{ border-radius: 8px; overflow: hidden; &:hover { - background-color: $menuHover !important; + background-color: $menuHover !important; color: $menuActiveText !important; } } .submenu-title-noDropdown{ &:hover { - background-color:transparent !important; + background-color:transparent !important; // background-color: $menuBg !important; // border-radius: 8px; // overflow: hidden; @@ -103,22 +103,21 @@ } - + & .nest-menu .el-submenu>.el-submenu__title, & .el-submenu .el-menu-item { - min-width: $sideBarWidth !important; background-color: $subMenuBg !important; &:hover { - + background-color: $subMenuHover !important; } } // .is-active.el-submenu{ // color: $subMenuActiveText !important; - + // } .is-active.el-menu-item { // color: $subMenuActiveText !important; @@ -179,7 +178,7 @@ .el-submenu { overflow: hidden; - + &>.el-submenu__title{ // width: auto; // height: auto; @@ -234,7 +233,7 @@ margin: 0 auto; } } - + } } @@ -301,12 +300,11 @@ } .nest-menu .el-submenu>.el-submenu__title, .el-menu-item { - width: 100px; - height: 30px !important; - min-width: 100px !important; - line-height: 30px; - text-align: left !important; + height: 40px !important; + line-height: 40px; + padding-left: 20px !important; font-size: 10px; + width: 100% !important; justify-content: start !important; background-color: $subMenuBg !important; color: $subMenuHover !important; @@ -330,6 +328,8 @@ max-height: 100vh; overflow-y: auto; background-color: #fff; + width: 150px !important; + padding: 0 !important; &::-webkit-scrollbar-track-piece { background: #d3dce6; } diff --git a/src/views/experiment/planAssignments/plan.vue b/src/views/experiment/planAssignments/plan.vue index 0d931cc..ee84390 100644 --- a/src/views/experiment/planAssignments/plan.vue +++ b/src/views/experiment/planAssignments/plan.vue @@ -18,6 +18,15 @@ padding: 15px; background-color: white; height: calc(100vh - 15vh); + overflow-y: auto; + } + + .order_num{ + border-radius: 1rem; + width: 35px; + height: 25px; + text-align: center; + margin-right: 8px; } </style> <style> @@ -28,6 +37,7 @@ .plan .cell { color: #333; + display: flex; } </style> @@ -51,6 +61,14 @@ <el-table-column type="index" width="50" label="搴忓彿"> </el-table-column> <el-table-column prop="date" label="鐢宠鍗曞彿"> + <template slot-scope="scope"> + <div style="display: flex;"> + <div v-if="scope.row.code=='01'" style="color: #3caaff;background-color: #eff5ff;" class="order_num">01</div> + <div v-else-if="scope.row.code=='02'" style="color: #57c981;background-color: #f1fbf4;" class="order_num">02</div> + <div v-else-if="scope.row.code=='03'" style="color: #dfa8fb;background-color: #faf2ff;" class="order_num">03</div> + <div>{{scope.row.date}}</div> + </div> + </template> </el-table-column> <el-table-column prop="name" label="妫�楠岀粨鏋�"> </el-table-column> @@ -60,9 +78,9 @@ <template slot-scope="scope"> <el-button size="mini" type="primary" v-if="isIfReport(scope.row)">涓婃姤</el-button> <el-button size="mini" type="warning" @click="openUpDia(scope.row)" - v-else-if="scope.row.insId==undefined&&scope.row.address==null">鍒嗛厤</el-button> + v-else-if="scope.row.code=='03'&&scope.row.insId==undefined&&scope.row.address==null">鍒嗛厤</el-button> <el-button size="mini" type="success" @click="openUpInsDia(scope.row)" - v-else-if="scope.row.insId==undefined&&scope.row.name==null">妫�楠�</el-button> + v-else-if="scope.row.code=='03'&&scope.row.insId==undefined&&scope.row.name==null">妫�楠�</el-button> </template> </el-table-column> </el-table> @@ -159,8 +177,15 @@ id: 34, date: '2016-05-01', name: null, - res: '[{"number": 1,"res": "涓嶅悎鏍�"},{"number": 2}]', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�' + res: '[{"number": 1,"res": "涓嶅悎鏍�"},{"number": 3,"res": "涓嶅悎鏍�"}]', + address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�', + children: [{ + id: 35, + date: 'hhh', + name: null, + res: '[{"number": 1},{"number": 2}]', + address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�' + }] }] }, { id: 2, @@ -200,11 +225,16 @@ methods: { selectDataList() { this.tableData.forEach(a => { - a.code = '[1]' + a.code = '01' if (a.children != undefined) { a.children.forEach(b => { - b.code = '[2]' - b.res = JSON.parse(b.res) + b.code = '02' + if (b.children != undefined) { + b.children.forEach(c => { + c.code = '03' + c.res = JSON.parse(c.res) + }) + } }) } }) @@ -252,4 +282,4 @@ } } } -</script> \ No newline at end of file +</script> -- Gitblit v1.9.3