diff --git a/WebSite/src/views/portal/components/side_table.vue b/WebSite/src/views/portal/components/side_table.vue index 2a90030feed2298b15e4a6ebf73dfb2eaa0f006f..7afea85a525da0f053036c7abb5638a123b083e4 100644 --- a/WebSite/src/views/portal/components/side_table.vue +++ b/WebSite/src/views/portal/components/side_table.vue @@ -11,12 +11,14 @@ :default-sort="{ prop: 'implementRate' }" style="width: 100%" :header-cell-style="{ - color: '#fff' + color: '#fff', }" @row-click="handleRow" + :row-style="rowStyle" + :row-class-name="rowClass" > <el-table-column type="index" label="搴忓彿" /> - <el-table-column label="鍗曚綅鍚嶇О" prop="companyName" width="150" /> + <el-table-column label="鍗曚綅鍚嶇О" prop="companyName" width="250" /> <el-table-column label="鎵ц鐜�" prop="implementRate" @@ -41,7 +43,8 @@ export default { }, setup(props, context) { const data = reactive({ - tableData: [] + tableData: [], + //rowClass:'class1' }); onMounted(() => { if (props.states == '1') { @@ -69,9 +72,9 @@ export default { let obj = { companyName: '', fundType: '', - requestType: '1' + requestType: '1', }; - newTableApi.getCompanyFundBudget(obj).then(res => { + newTableApi.getCompanyFundBudget(obj).then((res) => { data.tableData = res.data[0].companyList; }); }; @@ -88,8 +91,9 @@ export default { const clickAll = () => { context.emit('clickAll'); }; - const handleRow = v => { - context.emit('handleRow', v); + const handleRow = (row) => { + console.log(row); + context.emit('handleRow', row); }; const sortMethod = (a, b) => { if ( @@ -99,6 +103,12 @@ export default { return -1; } }; + const rowStyle = (row) => { + row.row.index = row.rowIndex; + }; + const rowClass = () => { + return 'class1'; + }; return { ...toRefs(data), getOfficialBusinessBudget, @@ -106,26 +116,35 @@ export default { getTaskListBudget, clickAll, handleRow, - sortMethod + sortMethod, + rowStyle, + rowClass, }; - } + }, }; </script> <style lang="scss" scoped> .Table-container { + height: calc(100vh - 195px); .buttonBox { width: 100%; - background-image: linear-gradient(to right, #035788, #011333); + background-image: linear-gradient( + to right, + rgb(3, 87, 135), + rgb(3, 19, 50) + ); .button1 { color: #56ccff; border: none; + font-size: 16px; background-image: linear-gradient(to right, #035788, #02416d); } .button2 { color: #56ccff; margin-left: 0; border: none; - background-image: linear-gradient(to right, #02416d, #023c66); + font-size: 16px; + background-image: linear-gradient(to right, #02416d, #033e67); } } .box { @@ -139,16 +158,18 @@ export default { } .box1 { padding: 4px 2px; - height: 90%; + height: 98%; } .bottom { - height: 10%; font-size: 10px; color: #fff; text-align: center; - // position: relative; + // position: relative; } } +::v-depp .el-table .class1 { + background-color: red; +} ::v-depp .el-tabs__nav-wrap { margin-bottom: 5px !important; } @@ -167,4 +188,8 @@ export default { ::v-deep .el-table__body tr:hover > td { background-color: #fff !important; } +::v-deep .el-table__body tr:active > td { + //color: #28A458; + //background: rgb(255, 199, 197) !important; +} </style> diff --git a/WebSite/src/views/portal/components/task_list.vue b/WebSite/src/views/portal/components/task_list.vue index e8688c604d5f1e391ff21956debd3eb49225c37f..de45b070c3431c4055f288c3209961907cd1002f 100644 --- a/WebSite/src/views/portal/components/task_list.vue +++ b/WebSite/src/views/portal/components/task_list.vue @@ -2,7 +2,7 @@ <div class="home-container"> <div class="header"> <div class="title"> - {{ title }}浠诲姟娓呭崟鎵ц鎯呭喌 + {{ title }}浠诲姟娓呭崟鎵ц鎯呭喌璇︽儏 <div class="right" @click="toBack" style="cursor: pointer"> <i class="fa fa-arrow-left" aria-hidden="true"></i> <span>杩斿洖</span> @@ -157,7 +157,9 @@ import newTableApi from '@/api/newTableApi.js'; export default { name: 'Task', components: { Pagination }, - props: {}, // 鐢ㄦ潵鎺ユ敹鐖剁粍浠朵紶缁欏瓙缁勪欢鐨勬暟鎹� + props: { + states:Object + }, // 鐢ㄦ潵鎺ユ敹鐖剁粍浠朵紶缁欏瓙缁勪欢鐨勬暟鎹� setup(props, context) { const data = reactive({ title: '<鍗曚綅鍚�>',