| 对比新文件 |
| | |
| | | /* |
| | | * @Date: 2024-04-04 23:26:03 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-04 23:33:51 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/api/model/calender.js |
| | | */ |
| | | import config from "@/config" |
| | | import http from "@/utils/request" |
| | | |
| | | export default { |
| | | getList: { |
| | | url: `${config.API_URL}/blade-cps/calendar/page`, |
| | | name: "鑾峰彇鏃ュ巻鍒楄〃", |
| | | post: async function(data,params){ |
| | | return await http.post(this.url, data, {params}); |
| | | }, |
| | | }, |
| | | } |
| 对比新文件 |
| | |
| | | <!-- |
| | | * @Date: 2024-04-04 22:45:43 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-05 00:10:43 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/base/CalenderTab.vue |
| | | --> |
| | | <template> |
| | | <el-container> |
| | | <el-aside width="220px"> |
| | | <el-button type="primary" icon="el-icon-plus">鏂板缓鏃ュ巻</el-button> |
| | | <div v-infinite-scroll="load"> |
| | | <el-card shadow="never" class="card" v-for="item in caleList" :key="item.id"> |
| | | <h3>{{item.code}}</h3> |
| | | <p>鏃ュ巻鍚嶇О: {{item.name}}</p> |
| | | <p>搴旂敤骞翠唤: {{item.year}}</p> |
| | | </el-card> |
| | | </div> |
| | | |
| | | </el-aside> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | current: 0, |
| | | total: 1, |
| | | caleList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.load() |
| | | }, |
| | | methods: { |
| | | load() { |
| | | if (this.current * 15 >= this.total) { |
| | | return |
| | | } |
| | | this.current += 1 |
| | | this.$API.calender.getList.post({ statusList: [1] }, { current: this.current, size: 15 }).then(res => { |
| | | this.total = res?.data?.total |
| | | if (res?.data?.records) { |
| | | if (this.current === 1) { |
| | | this.caleList = res?.data?.records || [] |
| | | } else { |
| | | this.caleList.push( |
| | | ...res?.data?.records || [] |
| | | ) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .card { |
| | | margin: 12px 12px 12px 0; |
| | | } |
| | | </style> |
| 对比新文件 |
| | |
| | | <!-- |
| | | * @Date: 2024-04-04 21:51:24 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-05 00:15:20 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/base/shift-calendar.vue |
| | | --> |
| | | <template> |
| | | <el-main style="height: 100%;background-color: #fff;"> |
| | | <el-tabs tab-position="top" class="custom-tabs" v-model="activeName"> |
| | | <el-tab-pane label="鐢熶骇鏃ュ巻" name="1"> |
| | | <CalenderTab></CalenderTab> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="鐝埗" name="2"></el-tab-pane> |
| | | </el-tabs> |
| | | </el-main> |
| | | </template> |
| | | <script> |
| | | import CalenderTab from './CalenderTab.vue'; |
| | | export default { |
| | | components: { |
| | | CalenderTab |
| | | }, |
| | | data () { |
| | | return { |
| | | activeName: '1' |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .el-tabs--card { |
| | | height: calc(100vh - 110px - 56px); |
| | | /* overflow-y: auto; */ |
| | | } |
| | | .el-tab-pane { |
| | | height: calc(100vh - 110px - 56px); |
| | | overflow-y: auto; |
| | | } |
| | | // .custom-tabs { |
| | | // height: 500px; |
| | | // overflow: scroll; |
| | | // } |
| | | </style> |