123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <template>
- <view class="pageContainer">
- <scroll-view scroll-y="true" class="scroll-Y">
- <view class="list" v-for="(item,index) in list" @click="viewHandle(item)">
- <view class="name">{{item.name}}</view>
- <image class="arrowIcon" src="../../static/list-open.png" ></image>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
-
- import { networkType } from '../../utils/requestUrl.js';
- export default {
- data() {
- return {
- list: [{
- name: '报表一',
- url: ''
- },
- {
- name: '报表一',
- url: ''
- }
- ]
- };
- },
- onLoad() {
- this.getList(`${networkType}`);
- },
- methods:{
- /**
- * @param {
- url:string;
- name:string;
- } reportDetail
- */
- viewHandle(reportDetail){
- uni.navigateTo({
- url: '/pages/reportPage/reportPage?url='+reportDetail.url
- });
- },
- /**
- * @param {string} networkType 网络环境(0. 内网,1.外网)
- */
- getList(networkType){
- this.$store.dispatch({
- type: 'reports/commActions',
- payload: {
- key: 'getReportList',
- data:{
- networkType:networkType
- }
- }
- }).then(res=>{
- this.list = res.map(t=>({
- name:t.name,
- url:t.url
- }))
- })
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .pageContainer {
- display: flex;
- width: 100%;
- height: 100vh;
- .scroll-Y {
- .list {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content:space-between;
- width: 100%;
- height: 100rpx;
- padding: 30rpx 30rpx;
- border-bottom: 1rpx solid #CCCCCC;
- background-color: #FFFFFF;
- .name {
- font-size:27rpx;
- }
- .arrowIcon {
- display:none;
- width:25rpx;
- height: 18rpx;
- transform:rotate(-90deg);
- }
-
- &:last-child {
- border-bottom: 0;
- }
-
- }
- }
- }
- </style>
|