123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <template>
- <view class="">
- <view class="navbar">
- <view class="back">
- <text class="iconfont icon-fanhui " @click="backLast()"></text>
- </view>
- <text>查看申报</text>
- </view>
- <view class="tabbar" v-if="msg.extra && msg.extra.total_time">
- <view @click="tabbar(0)" :class="index==0 ? 'active' : ''">
- <text>附件</text>
- </view>
- <view @click="tabbar(1)" :class="index==1 ? 'active' : ''">
- <text>证明材料</text>
- </view>
- </view>
- <div v-if=" msg.extra && msg.extra.total_time" class="nav">
- <iframe :src="uploadPdf" frameborder="0" class="iframe"></iframe>
- </div>
- <div v-else class="nav1">
- <iframe :src="uploadPdf" frameborder="0" class="iframe"></iframe>
- </div>
- </view>
- </view>
- </template>
- <script>
- var app = getApp()
- import navBar from '../../components/navBar/navbar.vue';
- import configData from '../../config.js'
- export default {
- data() {
- return {
- msg: '',
- uploadPdf: '',
- index: 0
- }
- },
- components: {
- navBar
- },
- onLoad(options) {
- console.log(options)
- if (options.id) {
- app.request('/examine/examine-detail', {
- examine_question_id: options.id
- }, 'post').then(res => {
- console.log(res,'res')
- var msg = res.data.data
- if (msg instanceof Array) {
- this.msg = res.data.data[0]
- } else {
- this.msg = res.data.data
- }
- console.log(this.msg)
- var obj = this.msg.resources
- var arr = Object.values(obj);
- this.uploadPdf = arr[0]
- console.log(this.uploadPdf)
- })
- }
- if(options.url){
- this.uploadPdf = options.url
- }
- },
- methods: {
- backLast() {
- uni.navigateBack()
- },
- tabbar(index) {
- this.index = index
- console.log(index)
- if (index == 0) {
- var obj = this.msg.resources
- var arr = Object.values(obj);
- this.uploadPdf = arr[0]
- } else {
- this.uploadPdf = this.msg.extra.prove_files
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .nav {
- width: 100%;
- height: 100%;
- position: fixed;
- z-index: 222;
- top: 200upx;
- left: 0;
- iframe {
- width: 100%;
- height: 100%;
- }
- }
- .nav1 {
- width: 100%;
- height: 100%;
- position: fixed;
- z-index: 222;
- top: 100upx;
- left: 0;
- iframe {
- width: 100%;
- height: 100%;
- }
- }
- .tabbar {
- width: 100%;
- height: 100upx;
- position: fixed;
- z-index: 222;
- top: 100upx;
- left: 0;
- display: flex;
- align-items: center;
- border: 1upx solid #EFF1F6;
- view {
- width: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- color: black;
- }
- .active {
- color: blue;
- }
- }
- .navbar {
- font-size: 32upx;
- height: 100upx;
- line-height: 100upx;
- color: #888888;
- position: relative;
- position: fixed;
- top: 0;
- z-index: 9999999;
- width: 100%;
- background-color: #FFFFFF;
- text-align: center;
- border-bottom: solid 2upx #EFF1F6;
- .back {
- height: 100upx;
- width: 100upx;
- text-align: center;
- // background-color: #007AFF;
- position: absolute;
- float: left;
- left: 0upx;
- font-size: 32upx;
- }
- }
- </style>
|