Przeglądaj źródła

Merge branch 'master' into dev

xch1523480 5 miesięcy temu
rodzic
commit
34bfa06786

+ 1 - 0
src/components/MobileXForm/Formcanvas.vue

@@ -420,6 +420,7 @@ export default {
     setData(components) {
       this.components = JSON.parse(JSON.stringify(components)).map(
         (item, index) => {
+          item.inputTips = item.inputTips || "";
           if (item.formType === "checkbox") {
             item.defaultValue = item.defaultValue.split(",");
           }

+ 2 - 4
src/components/MobileXForm/Setting.vue

@@ -6,14 +6,13 @@
         <div class="wf-field wf-setting-label">
           <div class="fieldname">
             <span>标题</span>
-            <span class="fieldinfo">最多20个字</span>
+            <span class="fieldinfo"></span>
           </div>
           <div class="fieldblock">
-            <input
+            <el-input
               v-model="component.cnName"
               :disabled="!fieldAuth.nameEdit"
               type="text"
-              maxlength="20"
               @input="changeComponent"
             />
           </div>
@@ -50,7 +49,6 @@
         <div class="fieldblock">
           <input
             v-model="component.inputTips"
-            :disabled="!fieldAuth.nameEdit"
             type="text"
             @input="changeComponent"
           />

+ 2 - 2
src/components/MobileXForm/settings/expectBeginTimeSelectSetting.vue

@@ -35,7 +35,7 @@
           @change="onStartDateChange"
         >
           <el-option
-            v-for="item in 15 - endDate + 1"
+            v-for="item in 60"
             :key="item"
             :label="item === 1 ? '今天' : item === 2 ? '明天' : `第${item}天`"
             :value="item"
@@ -50,7 +50,7 @@
           @change="onEndDateChange"
         >
           <el-option
-            v-for="item in 15 - startDate + 1"
+            v-for="item in 60 - startDate + 1"
             :key="item + startDate - 1"
             :label="
               item + startDate - 1 === 1

+ 1 - 1
src/views/demand/Detail.vue

@@ -386,7 +386,7 @@ export default {
           name: "DemandWorks",
         },
         {
-          label: `设备登记`,
+          label: `信息登记`,
           name: "DeviceRecord",
         },
         // {

+ 1 - 1
src/views/demand/WorkDetail.vue

@@ -362,7 +362,7 @@ export default {
           name: "WorkBaseInfo",
         },
         {
-          label: `设备`,
+          label: `信息登记`,
           name: "ImplementationRequirements",
         },
         {

+ 19 - 0
src/views/demand/component/DeviceRecord.vue

@@ -1,6 +1,22 @@
 <!--  -->
 <template>
   <div class="b-cont">
+    <div class="section">
+      <div class="section-header">
+        <div class="section-mark" />
+        <div class="section-title">环节反馈</div>
+        <div class="flex_space"></div>
+      </div>
+      <div>
+        <TableProcessView
+          :tickets="
+            demandDetail.orders.map((item) => {
+              return { ticketId: item.id, ticketNo: item.ticketNo };
+            })
+          "
+        />
+      </div>
+    </div>
     <div class="section">
       <div class="section-header">
         <div class="section-mark" />
@@ -98,6 +114,7 @@
         </div>
       </div>
     </div>
+
     <EditEquipmentRecordDialog
       ref="EditEquipmentRecordDialog"
       @success="getRecordList"
@@ -113,12 +130,14 @@ import {
 } from "@/api/demand";
 import { mapGetters } from "vuex";
 import { deleteRecordAPI } from "@/api/serviceProviderOrder";
+import TableProcessView from "./TableProcessView.vue";
 
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {
     EditEquipmentRecordDialog: () =>
       import("@/views/serviceProviderOrder/dialog/EditEquipmentRecordDialog"),
+    TableProcessView,
   },
   props: {
     dataPermission: {

+ 20 - 0
src/views/demand/component/ImplementationRequirements.vue

@@ -1,6 +1,23 @@
 <!--  -->
 <template>
   <div class="b-cont">
+    <div class="section">
+      <div class="section-header">
+        <div class="section-mark" />
+        <div class="section-title">环节反馈</div>
+        <div class="flex_space"></div>
+      </div>
+      <div>
+        <TableProcessView
+          :tickets="[
+            {
+              ticketId: ticketId,
+              ticketNo: orderDetail.ticketNo,
+            },
+          ]"
+        />
+      </div>
+    </div>
     <div class="section">
       <div class="section-header">
         <div class="section-mark" />
@@ -99,6 +116,7 @@
         </div>
       </div>
     </div>
+
     <EditEquipmentRecordDialog
       ref="EditEquipmentRecordDialog"
       @success="getRecordList"
@@ -114,11 +132,13 @@ import {
 } from "@/api/demand";
 import { deleteRecordAPI } from "@/api/serviceProviderOrder";
 import { mapGetters } from "vuex";
+import TableProcessView from "./TableProcessView.vue";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {
     EditEquipmentRecordDialog: () =>
       import("@/views/serviceProviderOrder/dialog/EditEquipmentRecordDialog"),
+    TableProcessView,
   },
   props: {
     orderDetail: {

+ 15 - 1
src/views/demand/component/StatusRecordsItem/table.vue

@@ -180,6 +180,9 @@ export default {
      * 通过回调控制class
      */
     cellClassName({ row, column, rowIndex, columnIndex }) {
+      if (column.property === "ticketNo") {
+        return "can-visit--underline";
+      }
       return "";
     },
     /**
@@ -190,7 +193,18 @@ export default {
         ? "--"
         : row[column.property].value;
     },
-    handleRowClick(row, column, event) {},
+    handleRowClick(row, column, event) {
+      if (column.property === "ticketNo") {
+        this.$router.push({
+          path: "/demand/workDetail",
+          query: {
+            ticketId: row.ticketId,
+            title: row.ticketNo,
+          },
+        });
+        return;
+      }
+    },
     onDownLoad(item) {
       downloadFile({
         path: item.url,

+ 159 - 0
src/views/demand/component/TableProcessView.vue

@@ -0,0 +1,159 @@
+<template>
+  <div v-loading="loading" class="v1">
+    <div v-for="(item, index) in ticketList" :key="index">
+      <div class="flex_row">
+        <el-link
+          :underline="false"
+          type="primary"
+          @click="toWorkDetail(item)"
+          >{{ item.ticketNo }}</el-link
+        >
+      </div>
+      <div v-for="(item1, index1) in item.implementList" :key="index1">
+        <!-- <div class="flex_row">
+          <span>{{ item1.name }}</span>
+        </div> -->
+        <template v-for="(item2, index2) in item1.formFields[0]">
+          <div
+            v-if="item2.formType === 'table'"
+            :key="index2"
+            :column="2"
+            title=""
+            class="field-wrap"
+            style="width: 800px"
+          >
+            <div>{{ item1.name }}->{{ item2.cnName }}</div>
+            <Table
+              :ticketId="item.ticketId"
+              :values="item2.value"
+              :component="item2"
+              :tableExtendList="item2.tableExtendList"
+            />
+          </div>
+        </template>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { implementProcessAPI } from "@/api/demand";
+import Table from "./StatusRecordsItem/table.vue";
+export default {
+  components: { Table },
+  props: {
+    tickets: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      ticketList: [],
+      loading: false,
+    };
+  },
+  computed: {},
+  watch: {
+    tickets: {
+      immediate: true,
+      handler(val) {
+        if (val && val.length) {
+          this.getImplementList();
+        }
+      },
+    },
+  },
+  created() {},
+  mounted() {},
+  methods: {
+    getImplementList() {
+      if (!this.tickets.length) {
+        return;
+      }
+      const requestList = [];
+      for (let i = 0; i < this.tickets.length; i++) {
+        const ticketId = this.tickets[i].ticketId;
+        requestList.push(
+          implementProcessAPI({
+            ticketId,
+          })
+        );
+      }
+      this.loading = true;
+      Promise.all(requestList)
+        .then((res) => {
+          this.loading = false;
+          for (let i = 0; i < res.length; i++) {
+            const element = this.tickets[i];
+            const item = res[i];
+            if (!item) {
+              continue;
+            }
+            if (item.code !== 0) {
+              this.$alert(item.msg, "提示", {
+                confirmButtonText: "确定",
+              });
+              continue;
+            }
+            const implementList = (item.data || [])
+              .filter((item1) => item1.isEnable === 1)
+              .map((item1) => {
+                return Object.assign(
+                  {
+                    name: item1.name,
+                    processCode: item1.code,
+                    isCanRectifyEdit: item1.isCanRectifyEdit,
+                  },
+                  item1.lastProcess || {
+                    operatorName: item1.finishUserName,
+                    createDate: item1.finishDate,
+                    isFinish: item1.isFinish,
+                  }
+                );
+              })
+              .filter((item1) => {
+                if (!item1.formFields) {
+                  return false;
+                }
+                const formFields = item1.formFields.map((item2) => item2[0]);
+                const tabField = formFields.find(
+                  (item2) => item2.formType === "table"
+                );
+                return Boolean(tabField);
+              });
+            if (implementList.length) {
+              this.ticketList.push({
+                ticketId: element.ticketId,
+                ticketNo: element.ticketNo,
+                implementList,
+              });
+            }
+          }
+          console.log(this.ticketList);
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    toWorkDetail(row) {
+      this.$router.push({
+        path: "/demand/workDetail",
+        query: {
+          ticketId: row.ticketId,
+          title: row.ticketNo,
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.v1 {
+  padding: 10px 30px;
+  min-height: 100px;
+}
+</style>

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

@@ -170,6 +170,10 @@ export default {
           label: "设备登记图片",
           value: "DEMAND_DEVICE_PIC",
         },
+        {
+          label: "自定义组件数据导出",
+          value: "CUSTOM_FORM_FIELD",
+        },
       ],
     };
   },