diff --git a/src/renderer/src/components/file-image/index.vue b/src/renderer/src/components/file-image/index.vue new file mode 100644 index 0000000..575e957 --- /dev/null +++ b/src/renderer/src/components/file-image/index.vue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/upload-dialog/index.vue b/src/renderer/src/components/upload-dialog/index.vue index 9d99604..96dd952 100644 --- a/src/renderer/src/components/upload-dialog/index.vue +++ b/src/renderer/src/components/upload-dialog/index.vue @@ -16,9 +16,7 @@
标题: - + {{ item.name }}
@@ -47,6 +45,7 @@ @@ -82,6 +97,7 @@ const handleCurrentChange = () => { } justify-content: center; font-size: 12px; cursor: pointer; + .iconfont { margin-right: 5px; color: #a2a2a2; @@ -97,6 +113,7 @@ const handleCurrentChange = () => { } .resource-list { .list-item { + flex: 1; padding: 10px 20px; border-bottom: solid #f1f1f1 1px; display: flex; diff --git a/src/renderer/src/views/resource/container/resoure-search.vue b/src/renderer/src/views/resource/container/resoure-search.vue index 686a050..bdf8c5c 100644 --- a/src/renderer/src/views/resource/container/resoure-search.vue +++ b/src/renderer/src/views/resource/container/resoure-search.vue @@ -3,7 +3,7 @@ {{ item.text + :type="sourceStore.query.fileSource == item.value ? 'primary' : ''" @click="sourceStore.changeTab(item.value)">{{ item.text }} @@ -12,14 +12,14 @@ -
{{ + :type="sourceStore.query.fileFlag == item.value ? 'primary' : ''" round @click="sourceStore.changeType(item.value)">{{ item.text }}
@@ -48,9 +48,26 @@ const openDialog = ()=>{ isDialogOpen.value = true } -const submitFile = (fileList)=>{ - // console.log(toRaw(fileList)) - // uploaderState().pushFile(toRaw(fileList)) +const submitFile = (data)=>{ + let fileList = toRaw(data) + const { textBookId, levelFirstId, levelSecondId, fileSource, fileRoot} = sourceStore.query + console.log(textBookId) + let fileData = { textBookId, levelFirstId, levelSecondId, fileSource, fileRoot } + fileList.forEach(item => { + fileData.fileFlag = item.fileData.fileFlag + item.fileData = fileData + item.callback = fileCallBack + }) + console.log(fileList) + uploaderState().pushFile(fileList) +} + + +const fileCallBack = (res)=>{ + console.log(res) + if(res.code == 200){ + sourceStore.handleQuery() + } }