|
@@ -8,10 +8,15 @@
|
|
|
<el-date-picker v-model="formModel.startDate" type="date" class="block" value-format="YYYY-MM-DD" :clearable="false" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="isDatas && reportDatas.length > 0" label="申请内容">
|
|
|
- <div class="task-tag-data-box">
|
|
|
+ <!-- <div class="task-tag-data-box">
|
|
|
<template v-for="(item, index) in reportDatas" :key="item.id">
|
|
|
<el-tag type="info" size="default" closable @close="taskTagClose(index)">{{ item.name }}</el-tag>
|
|
|
</template>
|
|
|
+ </div> -->
|
|
|
+ <div v-infinite-scroll="load" class="task-tag-data-box" style="overflow: auto">
|
|
|
+ <template v-for="(item, index) in tableData" :key="index">
|
|
|
+ <el-tag type="info" size="default" closable @close="taskTagClose(index)">{{ item.name }}</el-tag>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="上传附件">
|
|
@@ -168,6 +173,14 @@ watch(() => [
|
|
|
...addition,
|
|
|
}
|
|
|
reportDatas.value = datas
|
|
|
+ //判断数据长度有没有9个,有就先添加9个,没有直接获取所有数据
|
|
|
+ if (reportDatas.value.length > 9) {
|
|
|
+ for (let i = 0;i < needle.value ;i++) {
|
|
|
+ tableData.value[i] = reportDatas.value[i]
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ tableData.value = reportDatas.value
|
|
|
+ }
|
|
|
if (val) {
|
|
|
getProcessDatasApi()
|
|
|
}
|
|
@@ -290,6 +303,27 @@ const HcUploadFileSuccess = (res) => {
|
|
|
formModel.value.attachmentPdfUrl = res.resData.link
|
|
|
formModel.value.attachmentPdfUrlName = res.resData.originalName
|
|
|
}
|
|
|
+const tableData = ref([])
|
|
|
+const needle = ref(10)
|
|
|
+const load = async () => {
|
|
|
+ const res = await queryData()
|
|
|
+ if (res) {
|
|
|
+ tableData.value = res
|
|
|
+ }
|
|
|
+}
|
|
|
+const queryData = async ()=>{
|
|
|
+ console.log('查询数据')
|
|
|
+ let ortab = tableData.value
|
|
|
+ if (needle.value < reportDatas.value.length) {
|
|
|
+ let pusharr = reportDatas.value.slice(needle.value, needle.value + 10)
|
|
|
+ pusharr.forEach((ele)=>{
|
|
|
+ ortab.push(ele)
|
|
|
+ })
|
|
|
+ needle.value = needle.value + 10
|
|
|
+ return ortab
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|