| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <template>
- <view class="blacklog-container">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" @clickLeft="close">
- </uni-nav-bar>
- <!-- <div style="height: 88rpx;width: 100%;"></div> -->
- <fileMain ref="fileMainRef" @getFiles="getFiles" @close="close"></fileMain>
- </view>
- </template>
- <script>
- import Vue from "vue";
- import fileMain from '@/pages/doc/docList.vue';
-
- export default {
- components: {
- fileMain
- },
- data() {
- return {
- isShow: false,
- title: '申请',
- fileIds: []
- }
- },
- methods: {
- getFiles(val = []) {
- console.log(val, '选择的文件ID')
- // 通过事件传递选中的文件ID
- uni.$emit('selectFilesResult', {
- files: val
- })
- },
- close() {
- uni.navigateBack()
- }
- },
- mounted() {
-
- },
- async onLoad(option = {}) {
- console.log(option, 'filesChoose onLoad')
- if (option.files) {
- try {
- this.fileIds = JSON.parse(decodeURIComponent(option.files)) || []
- } catch (e) {
- this.fileIds = []
- }
- }
- console.log(this.fileIds, 'fileIds')
- this.$nextTick(() => {
- if (this.$refs.fileMainRef) {
- this.$refs.fileMainRef.open(this.fileIds, option.isEdit)
- }
- })
- },
- }
- </script>
- <style>
- </style>
|