|
@@ -3,65 +3,85 @@
|
|
|
<!-- 停水公告 -->
|
|
|
<div class="content">
|
|
|
<div class="mian" v-if="ishowDetails">
|
|
|
- <Notice title="停水公告" @toDetail='toDetail'></Notice>
|
|
|
+ <Notice
|
|
|
+ :records="result.records"
|
|
|
+ title="停水公告"
|
|
|
+ @toDetail="toDetail"
|
|
|
+ ></Notice>
|
|
|
<Pagination />
|
|
|
</div>
|
|
|
- <div class="datails" v-else>
|
|
|
- <Datails @backFn='backFn'></Datails>
|
|
|
- </div>
|
|
|
+ <div class="datails" v-else>
|
|
|
+ <Datails :detailObj="detailObj" @backFn="backFn"></Datails>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Pagination from '@/components/Pagination/index.vue'
|
|
|
-import Notice from '@/components/notice/index.vue'
|
|
|
-import Datails from './dataile.vue'
|
|
|
+import Pagination from "@/components/Pagination/index.vue";
|
|
|
+import Notice from "@/components/notice/index.vue";
|
|
|
+import Datails from "./dataile.vue";
|
|
|
+import { getCurrentPage } from "@/api/currentpage";
|
|
|
export default {
|
|
|
- components:{
|
|
|
- Pagination,
|
|
|
- Notice,
|
|
|
- Datails
|
|
|
- },
|
|
|
+ components: {
|
|
|
+ Pagination,
|
|
|
+ Notice,
|
|
|
+ Datails,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- ishowDetails:true,
|
|
|
+ ishowDetails: true,
|
|
|
+ result: {},
|
|
|
+ detailObj: {},
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ getCurrentPage().then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.result = res.result;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
methods: {
|
|
|
- toDetail(){
|
|
|
- this.ishowDetails=false
|
|
|
+ toDetail(proId) {
|
|
|
+ this.ishowDetails = false;
|
|
|
+ this.result.records.forEach((item) => {
|
|
|
+ if (item.id === proId) {
|
|
|
+ this.detailObj = item;
|
|
|
+ console.log("111", this.detailObj);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- backFn(){
|
|
|
- this.ishowDetails=true
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
+ backFn() {
|
|
|
+ this.ishowDetails = true;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.t-container {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-ul{
|
|
|
- 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%;
|
|
|
- }
|
|
|
+ul {
|
|
|
+ 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>
|