|
@@ -20,7 +20,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {delFile} from "@/api/pssr/file";
|
|
|
+import {delFile, listFile} from "@/api/pssr/file";
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
export default {
|
|
@@ -41,12 +41,15 @@ export default {
|
|
|
methods: {
|
|
|
init(subId, forShort, itemId, fileList) {
|
|
|
this.open = true;
|
|
|
- this.fileList = fileList;
|
|
|
this.uploadKey = Date.now();
|
|
|
- this.fileList.forEach(item => {
|
|
|
- item.url = process.env.VUE_APP_BASE_API + item.fileUrl;
|
|
|
- item.name = item.fileName;
|
|
|
- });
|
|
|
+ this.fileList=[]
|
|
|
+ listFile({subId:subId,forShort:forShort,itemId:itemId}).then(res=>{
|
|
|
+ this.fileList=res.rows;
|
|
|
+ this.fileList.forEach(item => {
|
|
|
+ item.url = process.env.VUE_APP_BASE_API + item.fileUrl;
|
|
|
+ item.name = item.fileName;
|
|
|
+ });
|
|
|
+ })
|
|
|
this.action = process.env.VUE_APP_BASE_API + "/pssr/file/uploadFile?subId=" + subId + "&itemId=" + itemId
|
|
|
+ "&forShort=" + forShort
|
|
|
},
|