|
@@ -479,6 +479,9 @@
|
|
|
ref="PreviewAttachment"
|
|
|
:attachment-id="curAttachmentId"
|
|
|
></preview-attachment>
|
|
|
+
|
|
|
+ <!-- PreviewFile -->
|
|
|
+ <preview-file ref="PreviewFile" :data="curFile"></preview-file>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -502,6 +505,7 @@ import pickerOptions from "@/constants/datePickerOptions";
|
|
|
import { parseTimeRangeDateAndTime } from "@/plugins/utils";
|
|
|
import PreviewPrintTaskTemplate from "../components/PreviewPrintTaskTemplate";
|
|
|
import PreviewAttachment from "@/components/PreviewAttachment.vue";
|
|
|
+import PreviewFile from "@/components/PreviewFile.vue";
|
|
|
|
|
|
const defaultTotalInfo = {
|
|
|
totalSubjects: 0,
|
|
@@ -517,7 +521,7 @@ const defaultTotalInfo = {
|
|
|
|
|
|
export default {
|
|
|
name: "print-task-manage",
|
|
|
- components: { PreviewPrintTaskTemplate, PreviewAttachment },
|
|
|
+ components: { PreviewPrintTaskTemplate, PreviewAttachment, PreviewFile },
|
|
|
data() {
|
|
|
return {
|
|
|
filter: {
|
|
@@ -563,6 +567,11 @@ export default {
|
|
|
createTime: [],
|
|
|
printTime: [],
|
|
|
pickerOptions,
|
|
|
+ // preview file
|
|
|
+ curFile: {
|
|
|
+ url: "",
|
|
|
+ type: "",
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -659,7 +668,12 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
if (this.wholePdfInfo.url && this.wholePdfInfo.status === "FINISH") {
|
|
|
- window.open(this.wholePdfInfo.url);
|
|
|
+ this.curFile = {
|
|
|
+ url: this.wholePdfInfo.url,
|
|
|
+ type: "application/pdf",
|
|
|
+ };
|
|
|
+ this.$refs.PreviewFile.open();
|
|
|
+ // window.open(this.wholePdfInfo.url);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -800,8 +814,12 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
viewPdf(item) {
|
|
|
- // TODO:
|
|
|
- window.open(item.url);
|
|
|
+ this.curFile = {
|
|
|
+ url: item.url,
|
|
|
+ type: "application/pdf",
|
|
|
+ };
|
|
|
+ this.$refs.PreviewFile.open();
|
|
|
+ // window.open(item.url);
|
|
|
// this.padViewDialogVisible = false;
|
|
|
},
|
|
|
async toExport() {
|