|
|
@@ -15,6 +15,11 @@
|
|
|
<uni-card v-if="repeatingTable.elementItem.length > 0">
|
|
|
<button @click="handleRepeatingTable" type="primary">查看重复表</button>
|
|
|
</uni-card >
|
|
|
+ <uni-card v-if="fileList.length > 0" v-for="(item, index) in fileList" :key="index">
|
|
|
+ <view>
|
|
|
+ <attachment-list :attachments="item.files" ></attachment-list>
|
|
|
+ </view>
|
|
|
+ </uni-card>
|
|
|
<uni-popup ref="repeatingTablePopup">
|
|
|
<uni-card margin="0px" spacing="0px" padding="0px">
|
|
|
<view class="repeating_table_container">
|
|
|
@@ -32,25 +37,13 @@
|
|
|
</view>
|
|
|
</uni-card>
|
|
|
</uni-popup>
|
|
|
- <!-- <uni-card>
|
|
|
- <uni-list-item>
|
|
|
- <template v-slot:header>
|
|
|
- 上传附件
|
|
|
- </template>
|
|
|
- </uni-list-item>
|
|
|
- <uni-list-item>
|
|
|
- <template v-slot:body>
|
|
|
- <uni-file-picker v-model="fileList" :autoUpload="false" mode="list" limit="5" file-mediatype="all"
|
|
|
- title="选择文件" @select="handleSelect" @progress="handleProgress" @delete="handleDelete"></uni-file-picker>
|
|
|
- </template>
|
|
|
- </uni-list-item>
|
|
|
- </uni-card> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { onMounted, reactive, ref } from 'vue'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
+ import attachmentList from '@/components/ygoa/attachmentList.vue'
|
|
|
import { getProcessInfo } from '@/api/process.js'
|
|
|
import { useUserStore } from '@/store/user.js'
|
|
|
const userStore = useUserStore()
|
|
|
@@ -78,10 +71,13 @@
|
|
|
elements: [],
|
|
|
elementItem: [],
|
|
|
})
|
|
|
+ const fileList = ref([])
|
|
|
function initProcessInfo() {
|
|
|
getProcessInfo(userStore.user.useId, processInfo.insId).then(({ returnParams }) => {
|
|
|
formElements.value = returnParams.formElements
|
|
|
repeatingTable.value = returnParams.repeatingTable
|
|
|
+ fileList.value = returnParams.fileList
|
|
|
+ console.log('fileList', fileList.value);
|
|
|
})
|
|
|
}
|
|
|
const repeatingTablePopup = ref(null)
|
|
|
@@ -89,23 +85,6 @@
|
|
|
console.log('handleRepeatingTable', repeatingTable);
|
|
|
repeatingTablePopup.value.open()
|
|
|
}
|
|
|
-
|
|
|
- let fileList = reactive([])
|
|
|
- function handleSelect(e) {
|
|
|
- console.log('handleSelect', e)
|
|
|
- for (const file of e.tempFiles) {
|
|
|
- fileList.push(file)
|
|
|
- }
|
|
|
- console.log('fileList', fileList)
|
|
|
- }
|
|
|
- function handleProgress(e) {
|
|
|
- console.log('handleProgress', e)
|
|
|
- }
|
|
|
- function handleDelete(e) {
|
|
|
- console.log('handleDelete', e)
|
|
|
- fileList.splice(fileList.indexOf(e.tempFiles), 1)
|
|
|
- console.log('fileList', fileList)
|
|
|
- }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|