123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <div class="t-container">
-
- <div class="content">
- <div class="mian" v-if="ishowDetails">
- <Notice
- :records="result.records"
- title="停水公告"
- @toDetail="toDetail"
- ></Notice>
- <Pagination />
- </div>
- <div class="datails" v-else>
- <Details :detailObj="detailObj" @backFn="backFn"></Details>
- </div>
- </div>
- </div>
- </template>
- <script>
- import Pagination from "@/components/Pagination/index.vue";
- import Notice from "@/components/notice/index.vue";
- import Details from "./detail.vue";
- import { getCurrentPage } from "@/api/currentpage";
- export default {
- components: {
- Pagination,
- Notice,
- Details,
- },
- data() {
- return {
-
- ishowDetails: true,
-
- result: {},
-
- detailObj: {},
-
- moduleType: 0,
- moduleFunction: 0,
- };
- },
- mounted() {
-
- this.getCurrentPage();
- },
- methods: {
-
- getCurrentPage() {
- let data = { moduleType: this.moduleType, moduleFunction: this.moduleFunction };
- getCurrentPage(data).then((res) => {
- console.log("lz", res);
- if (res.code === 1) {
- this.result = res.result;
- }
- });
- },
-
- toDetail(proId) {
- this.ishowDetails = false;
- this.result.records.forEach((item) => {
- if (item.id === proId) {
- this.detailObj = item;
- }
- });
-
- },
- backFn() {
- this.ishowDetails = true;
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .t-container {
- width: 100%;
- }
- ul {
- min-height: 50vh;
- li {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 20px;
- position: relative;
- margin: 20px 0 20px 10px;
- .l::before {
- content: "";
- position: absolute;
- left: -8px;
- top: 8px;
- width: 4px;
- height: 4px;
- background: #000;
- border-radius: 50%;
- }
- }
- }
- </style>
|