xch1523480 5 months ago
parent
commit
93ca57b185

+ 11 - 0
src/api/serviceProviderOrder.js

@@ -149,4 +149,15 @@ export function deleteRecordAPI(data) {
         params: data
     })
 }
+/**
+ *  删除设备
+ * @param {*} data
+ */
+export function fieldExportAPI(data) {
+    return request({
+        url: `/customForm/demand/fieldExport`,
+        method: 'get',
+        params: data
+    })
+}
 

+ 1 - 1
src/components/VideoPlayer.vue

@@ -1,10 +1,10 @@
 <template>
   <el-dialog :visible.sync="visible" width="1000px">
     <video-player
-      class="video-player-box play"
       ref="videoPlayer"
       :options="playerOptions"
       :playsinline="true"
+      class="video-player-box play"
     >
     </video-player>
     <div class="flex_row">

+ 4 - 1
src/views/demand/component/StatusRecordsItem/index.vue

@@ -35,11 +35,12 @@
           <Table
             :ticketId="ticketId"
             :values="item.value"
+            :component="item"
             :tableExtendList="item.tableExtendList"
           />
         </el-descriptions-item>
       </el-descriptions>
-      <template v-if="isSysComponent(item.formType)">
+      <template v-else-if="isSysComponent(item.formType)">
         <component
           :is="item.formType"
           :key="index"
@@ -91,6 +92,7 @@ import end_implement_finish_evidence from "./end_implement_finish_evidence";
 import end_implement_working_hours from "./end_implement_working_hours";
 import orderStatusMixin from "../../mixins/index";
 import FieldInfoItem from "@/components/NewCom/WkForm/FieldInfoItem";
+import Table from "./table.vue";
 export default {
   //import引入的组件需要注入到对象中才能使用
 
@@ -107,6 +109,7 @@ export default {
     end_implement_working_hours,
     device,
     FieldInfoItem,
+    Table,
   },
   mixins: [orderStatusMixin],
   props: {

+ 45 - 10
src/views/demand/component/StatusRecordsItem/table.vue

@@ -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>

+ 6 - 15
src/views/demand/component/WorkFlowLogs.vue

@@ -145,22 +145,13 @@ export default {
                       {
                         name: item.name,
                         processCode: item.code,
+                        isCanRectifyEdit: item.isCanRectifyEdit,
                       },
-                      item.lastProcess
-                        ? {
-                            ...item.lastProcess,
-                            operatorName:
-                              (item.lastProcess.operatorName || "") +
-                              " " +
-                              (item.finishUserPhone || ""),
-                          }
-                        : {
-                            createDate: item.finishDate || "",
-                            operatorName:
-                              (item.finishUserName || "") +
-                              " " +
-                              (item.finishUserPhone || ""),
-                          }
+                      item.lastProcess || {
+                        operatorName: item.finishUserName,
+                        createDate: item.finishDate,
+                        isFinish: item.isFinish,
+                      }
                     );
                     return item;
                   });

+ 1 - 0
src/views/utils/downLoad/List.vue

@@ -220,6 +220,7 @@ export default {
   },
   beforeRouteEnter(to, from, next) {
     next((vm) => {
+      vm.bizType = to.query.bizType;
       vm.getList();
     });
   },