|
@@ -1,5 +1,16 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <div class="flex_row">
|
|
|
+ <div class="flex_space"></div>
|
|
|
+ <el-button
|
|
|
+ v-if="ticketId && component"
|
|
|
+ :loading="exportLoading"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="onExport"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
:data="data"
|
|
|
:cell-class-name="cellClassName"
|
|
@@ -33,9 +44,9 @@
|
|
|
class="flex_row"
|
|
|
>
|
|
|
<el-tooltip
|
|
|
+ :content="item1.fileName"
|
|
|
class="item"
|
|
|
effect="dark"
|
|
|
- :content="item1.fileName"
|
|
|
placement="top-start"
|
|
|
>
|
|
|
<div class="flex_space clamp1">
|
|
@@ -73,17 +84,12 @@
|
|
|
|
|
|
<script>
|
|
|
import { downloadFile } from "@/utils";
|
|
|
+import { fieldExportAPI } from "@/api/serviceProviderOrder";
|
|
|
import Clipboard from "clipboard";
|
|
|
let clipboard = null;
|
|
|
export default {
|
|
|
components: {},
|
|
|
props: {
|
|
|
- dataPermission: {
|
|
|
- type: Object,
|
|
|
- default: () => {
|
|
|
- return {};
|
|
|
- },
|
|
|
- },
|
|
|
ticketId: {
|
|
|
type: String,
|
|
|
},
|
|
@@ -93,6 +99,12 @@ export default {
|
|
|
return [];
|
|
|
},
|
|
|
},
|
|
|
+ component: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ },
|
|
|
tableExtendList: {
|
|
|
type: Array,
|
|
|
default: () => {
|
|
@@ -101,7 +113,9 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ exportLoading: false,
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
fieldList() {
|
|
@@ -125,7 +139,9 @@ export default {
|
|
|
["pic", "file"].includes(item1[element.name].formType) &&
|
|
|
item1[element.name].value
|
|
|
) {
|
|
|
- item1[element.name].value = JSON.parse(item1[element.name].value);
|
|
|
+ if (typeof item1[element.name].value === "string") {
|
|
|
+ item1[element.name].value = JSON.parse(item1[element.name].value);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
return item1;
|
|
@@ -136,7 +152,7 @@ export default {
|
|
|
values: {
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
- handler() {
|
|
|
+ handler(val) {
|
|
|
this.$nextTick(() => {
|
|
|
document.querySelector(".el-table__body-wrapper").scrollTop = 1;
|
|
|
if (clipboard) {
|
|
@@ -249,6 +265,25 @@ export default {
|
|
|
});
|
|
|
return values;
|
|
|
},
|
|
|
+ onExport() {
|
|
|
+ this.exportLoading = true;
|
|
|
+ fieldExportAPI({
|
|
|
+ fieldId: this.component.id,
|
|
|
+ ticketId: this.ticketId,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/utils/downLoad/list",
|
|
|
+ query: {
|
|
|
+ bizType: "CUSTOM_FORM_FIELD",
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.exportLoading = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.exportLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|