From 9c64bb40c4fc66ed105bb441b39affe91b930331 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期四, 27 六月 2024 15:14:01 +0800
Subject: [PATCH] feat:批量审核

---
 src/views/system/work-order/index.vue |  637 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 528 insertions(+), 109 deletions(-)

diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index ecb0621..b7f4051 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -1,19 +1,36 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="宸ュ崟鍙�" prop="workOrderNo">
         <el-input
           v-model="queryParams.workOrderNo"
           placeholder="璇疯緭鍏ュ伐鍗曞彿"
           clearable
+          @clear="handleQuery"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="鏁呴殰绫诲瀷" prop="workOrderNo">
+        <el-select v-model="queryParams.errorType" placeholder="鏁呴殰绫诲瀷" clearable @clear="handleQuery">
+          <el-option label="甯傛斂鏂藉伐" value="甯傛斂鏂藉伐"></el-option>
+          <el-option label="璁惧閬楀け" value="璁惧閬楀け"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="瀹℃牳鐘舵��" prop="status">
+        <el-select v-model="queryParams.status" placeholder="瀹℃牳鐘舵��" @change="handleQuery">
+          <el-option label="宸蹭笅鍙�" value="DISTRIBUTED"></el-option>
+          <el-option label="杩愮淮宸插鐞�" value="YW_HANDLE"></el-option>
+          <el-option label="瀹℃牳閫氳繃" value="AUDITING_SUCCESS"></el-option>
+          <el-option label="瀹℃牳涓嶉�氳繃" value="AUDITING_FAIL"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="杩愮淮澶勭悊鏃堕棿">
         <el-date-picker
+          clearable
+          @clear="handleQuery"
           v-model="daterangeYwHandleTime"
           style="width: 240px"
-          value-format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd HH:mm:ss"
           type="daterange"
           range-separator="-"
           start-placeholder="寮�濮嬫棩鏈�"
@@ -31,84 +48,61 @@
         <el-button
           type="primary"
           plain
-          icon="el-icon-plus"
           size="mini"
-          @click="handleAdd"
-          v-hasPermi="['x:work-order:add']"
-        >鏂板</el-button>
+          @click="batchAuditingVisible = true"
+          v-hasPermi="['work:order:audit']"
+        >鎵归噺瀹℃牳</el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['x:work-order:edit']"
-        >淇敼</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['x:work-order:remove']"
-        >鍒犻櫎</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['x:work-order:export']"
-        >瀵煎嚭</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
-    <el-table v-loading="loading" :data="workOrderList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="宸ュ崟鍙�" align="center" prop="workOrderNo" />
-      <el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitId" />
-      <el-table-column label="杩愮淮浜哄憳" align="center" prop="ywPeopleId" />
-      <el-table-column label="杩愮淮澶勭悊鏃堕棿" align="center" prop="ywHandleTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.ywHandleTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="杩愮淮缁撴灉" align="center" prop="ywResult" />
-      <el-table-column label="杩愮淮鎯呭喌" align="center" prop="ywCondition" />
-      <el-table-column label="杩愮淮妫�娴嬬粨鏋�" align="center" prop="ywCheckResult" />
-      <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['x:work-order:edit']"
-          >淇敼</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['x:work-order:remove']"
-          >鍒犻櫎</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
+    
+    <el-row :gutter="20">
+      <el-col :xl="6" :lg="8" :md="12" :sm="24"  v-for="item in workOrderList" :key="item.id" style="margin-bottom: 20px;">
+        <el-card :body-style="{ padding: '0px',display: 'flex' }">
+          <el-image :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']" fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357" class="image"/>
+          <div style="padding-right: 10px;padding-top: 10px;">
+            <el-row>
+              <el-col :span="24" class="time">鏁呴殰绫诲瀷锛�<el-tag size="small" type="danger">{{ item.errorType }}</el-tag></el-col>
+            </el-row>
+            <el-row class="work-order-item">
+              <el-col class="time" :span="24">杩愮淮浜哄憳锛歿{ item.ywPeopleName }}</el-col>
+            </el-row>
+            <el-row class="work-order-item">
+              <el-col class="time" :span="24">杩愮淮鍗曚綅锛歿{ item.unitName }}</el-col>
+            </el-row>
+            <el-row class="work-order-item">
+              <el-col :span="24" class="time">宸ュ崟缂栧彿锛歿{ item.workOrderNo }}</el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="24" class="time">澶勭悊鏃堕棿锛歿{ item.ywHandleTime }}</el-col>
+            </el-row>
+            <el-row>
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleAuditing(item)"
+                v-hasPermi="['work:order:audit']"
+              >瀹℃牳</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleYwCondition(item)"
+              >杩愮淮鎯呭喌</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleFlow(item)"
+              >杩囩▼鍥�</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleReport(item)"
+                v-hasPermi="['system:report:add']"
+              >浜嬪悗鎶ュ</el-button>
+            </el-row>
+          </div>
+        </el-card>
+      </el-col>
+    </el-row>
 
     <pagination
       v-show="total>0"
@@ -118,42 +112,242 @@
       @pagination="getList"
     />
 
-    <!-- 娣诲姞鎴栦慨鏀硅繍缁村伐鍗曞璇濇 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="宸ュ崟鍙�" prop="workOrderNo">
-          <el-input v-model="form.workOrderNo" placeholder="璇疯緭鍏ュ伐鍗曞彿" />
+    <!-- 浜嬪悗鎶ュ -->
+    <el-dialog title="浜嬪悗鎶ュ" :visible.sync="reportOpen" width="600px" append-to-body>
+      <el-form ref="reportForm" :model="reportForm" :rules="reportFormRules" label-width="80px">
+        <el-form-item label="鐐逛綅" prop="source">
+          <el-input v-model="reportForm.source" disabled />
         </el-form-item>
-        <el-form-item label="杩愮淮澶勭悊鏃堕棿" prop="ywHandleTime">
-          <el-date-picker clearable
-            v-model="form.ywHandleTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="璇烽�夋嫨杩愮淮澶勭悊鏃堕棿">
-          </el-date-picker>
+        <el-form-item label="鎶ュ绫诲瀷">
+          <el-input v-model="reportForm.reportType" disabled />
         </el-form-item>
-        <el-form-item label="杩愮淮鎯呭喌" prop="ywCondition">
-          <el-input v-model="form.ywCondition" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
+        <el-form-item label="鏁呴殰绫诲瀷" prop="errorType">
+          <el-select v-model="reportForm.errorType">
+            <el-option label="甯傛斂鏂藉伐" value="甯傛斂鏂藉伐"/>
+            <el-option label="璁惧鏁呴殰" value="璁惧鏁呴殰"/>
+            <el-option label="璁惧閬楀け" value="璁惧閬楀け"/>
+          </el-select>
         </el-form-item>
-        <el-form-item label="杩愮淮妫�娴嬬粨鏋�" prop="ywCheckResult">
-          <el-input v-model="form.ywCheckResult" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
+        <el-form-item label="鎶ュ鍐呭" prop="reportContent">
+          <editor v-model="reportForm.reportContent" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="涓婃姤鏉愭枡" prop="reportMaterials">
+          <file-upload v-model="reportForm.reportMaterials"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
-        <el-button @click="cancel">鍙� 娑�</el-button>
+        <el-button type="primary" @click="submitReportForm">鎻� 浜�</el-button>
+        <el-button @click="reportOpen = false">鍙� 娑�</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="宸ュ崟瀹℃牳" :visible.sync="auditingOpen" width="500px" append-to-body>
+      <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="80px">
+        <el-form-item label="宸ュ崟鍙�" prop="workOrderNo">
+          <el-input v-model="auditingForm.workOrderNo" disabled  />
+        </el-form-item>
+        <el-form-item label="杩愮淮鍗曚綅" prop="unitName">
+          <el-input v-model="auditingForm.unitName" disabled  />
+        </el-form-item>
+        <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName">
+          <el-input v-model="auditingForm.ywPeopleName" disabled />
+        </el-form-item>
+        <div v-for="obj, index in ywConditions" :key="index">
+          <el-form-item :label="'鐜板満鎯呭喌' + (index + 1)" v-if="obj.ywCondition">
+            <span v-html="obj.ywCondition"></span>
+          </el-form-item>
+          <el-form-item label="浣愯瘉鏉愭枡" v-if="obj.ywProofMaterials">
+            <el-link v-for="item in obj.ywProofMaterials != null ? obj.ywProofMaterials.split(',') : obj.ywProofMaterials" :underline="false" :key="item.id" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) }}</el-link>
+          </el-form-item>
+        </div>
+        <el-form-item label="瀹℃牳缁撴灉" prop="auditingResult">
+          <el-radio v-model="auditingForm.auditingResult" label="AUDITING_SUCCESS">閫氳繃</el-radio>
+          <el-radio v-model="auditingForm.auditingResult" label="AUDITING_FAIL">椹冲洖</el-radio>
+        </el-form-item>
+        <el-form-item label="瀹℃牳澶囨敞" prop="auditingRemark">
+          <el-input v-model="auditingForm.auditingRemark" type="textarea" maxlength="30" show-word-limit/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitAuditing">纭� 瀹�</el-button>
+        <el-button @click="cancelAuditing">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="杩愮淮鎯呭喌璁板綍" :visible.sync="ywConditionOpen" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="ywConditionRules" label-width="80px">
+        <el-form-item label="宸ュ崟鍙�" prop="workOrderNo">
+          <el-input v-model="ywConditionForm.workOrderNo" disabled  />
+        </el-form-item>
+        <el-form-item label="杩愮淮鍗曚綅" prop="unitName">
+          <el-input v-model="ywConditionForm.unitName" disabled  />
+        </el-form-item>
+        <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName">
+          <el-input v-model="ywConditionForm.ywPeopleName" disabled />
+        </el-form-item>
+        <el-form-item label="鐜板満鎯呭喌" prop="ywCondition">
+          <editor v-model="form.ywCondition" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="浣愯瘉鏉愭枡" prop="ywProofMaterials">
+          <file-upload v-model="form.ywProofMaterials"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitYwCondition">纭� 瀹�</el-button>
+        <el-button @click="cancelYwCondition">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="杩愮淮鎵归噺瀹℃牳" :visible.sync="batchAuditingVisible" width="500px" append-to-body>
+      <el-form ref="batchAuditingWorkOrder" :model="batchAuditingWorkOrder" label-width="80px" :rules="batchAuditingRules">
+        <el-form-item label="宸ュ崟缂栧彿" prop="ids">
+          <el-select v-model="batchAuditingWorkOrder.ids" placeholder="璇烽�夋嫨宸ュ崟" multiple clearable>
+            <el-option v-for="item in workOrderList" :key="item.id" :label="item.workOrderNo" :value="item.id" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="瀹℃牳璇存槑" prop="auditingRemark">
+          <el-input v-model="batchAuditingWorkOrder.auditingRemark" type="textarea" maxlength="30" show-word-limit />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="batchAuditing('AUDITING_SUCCESS')">瀹� 鏍�</el-button>
+        <el-button type="danger" @click="batchAuditing('AUDITING_FAIL')">椹� 鍥�</el-button>
+      </div>
+    </el-dialog>
+
+
+    <!-- 杩囩▼鍥� -->
+    <el-dialog title="杩囩▼鍥�" :visible.sync="flowOpen" width="1200px" append-to-body>
+      <div>
+        <el-steps :active="ywAuditingList.length != 0 ? 3 : ywHandleList.length != 0 ? 2 : 1" :space="500">
+          <el-step title="浜х敓宸ュ崟">
+            <template slot="description">
+              <div>
+                <div class="flow-item-x">
+                  宸ュ崟鏉ユ簮锛�<el-tag type="danger" size="small">{{flowForm.source}}</el-tag>
+                </div>
+                <div class="flow-item-x">
+                  鏁呴殰绫诲瀷锛歿{flowForm.errorType}}
+                </div>
+                <div class="flow-item-x">
+                  杩愮淮鍗曚綅锛歿{flowForm.unitName}}
+                </div>
+                <div class="flow-item-x">
+                  鍒涘缓鏃堕棿锛歿{flowForm.createTime}}
+                </div>
+                <div class="flow-item-x" v-if="flowForm.processingPeriod">
+                  澶勭悊鏈熼檺锛�<el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag>
+                </div>
+              </div>
+            </template>
+          </el-step>
+          <el-step title="杩愮淮澶勭悊">
+            <template slot="description">
+              <div class="y-item" v-for="(item, index) in ywHandleList" :key="index">
+                <div class="y-item-1">
+                  <div class="flow-item-x">
+                    鐜板満鎯呭喌锛�
+                    <el-tooltip class="item" effect="dark" :content="item.ywCondition" placement="top">
+                      <el-tag size="small" class="line-limit-length">{{ item.ywCondition }}</el-tag>
+                    </el-tooltip>
+                  </div>
+                  <!-- <div class="flow-item-x">
+                    <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag>
+                  </div> -->
+                </div>
+                <div class="y-item-2">
+                  <div >
+                    {{ parseTime(item.createTime) }}
+                  </div>
+                  <div >
+                    绗嚑娆★細{{ index + 1 }}
+                  </div>
+                </div>
+              </div>
+            </template>
+          </el-step>
+          <el-step title="缁撴灉瀹℃牳">
+            <template slot="description">
+              <div class="y-item" v-for="(item, index) in ywAuditingList" :key="index">
+                <div class="y-item-1">
+                  <div class="flow-item-x">
+                    瀹℃牳缁撴灉锛�<el-tag :type="item.result == '瀹℃牳閫氳繃' ? 'success' : 'danger'" size="small">{{ item.result }}</el-tag>
+                  </div>
+                  <div class="flow-item-x">
+                    瀹℃牳璇存槑锛�<el-tag size="small" v-if="item.remark">{{ item.remark }}</el-tag>
+                  </div>
+                </div>
+                <div class="y-item-2">
+                  <div >
+                    {{ parseTime(item.createTime) }}
+                  </div>
+                  <div >
+                    绗嚑娆★細{{ index + 1 }}
+                  </div>
+                </div>
+              </div>
+            </template>
+          </el-step>
+        </el-steps>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
-
+<style scoped>
+.flow-item-x {
+  margin: 5px 0;
+}
+.y-item {
+  margin-bottom: 8px;
+  padding: 0 3px;
+  background-color: #d9d9d9;
+  display: flex;
+  flex-direction: row;
+  align-items: center
+}
+.y-item-2 {
+  flex: 1;
+}
+.y-item-1 {
+  flex: 2;
+}
+</style>
 <script>
-import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder } from "@/api/platform/work-order";
-
+import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder, auditing, batchAuditing, ywCondition, getYwCondition, getYwConditionList, getYwAuditingList } from "@/api/platform/work-order";
+import { addReport } from "@/api/platform/report";
 export default {
   name: "Work-order",
+  components: {
+  },
   data() {
     return {
+      ywConditions: [],
+      batchAuditingVisible: false,
+      batchAuditingWorkOrder: {},
+      ywHandleList: [],
+      ywAuditingList: [],
+      reportFormRules: {
+        reportContent: [
+          { required: true, message: "鎶ュ鍐呭涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        reportMaterials: [
+          { required: true, message: "涓婃姤鏉愭枡涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+      },
+      reportOpen: false,
+      reportForm: {
+        reportType: "浜嬪悗鎶ュ",
+        pointId: "",
+        errorType: "",
+        reportContent: "",
+        reportMaterials: ""
+      },
+      // 杩囩▼鍥�
+      flowOpen: false,
+      flowForm: {},
+      certificateList:[],
+      pictureList: [],
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
@@ -184,16 +378,54 @@
         ywHandleTime: null,
         ywResult: null,
         ywCondition: null,
+        status: ''
       },
       // 琛ㄥ崟鍙傛暟
       form: {},
-      // 琛ㄥ崟鏍¢獙
-      rules: {
-        workOrderNo: [
-          { required: true, message: "宸ュ崟鍙蜂笉鑳戒负绌�", trigger: "blur" }
+      // 瀹℃牳琛ㄥ崟
+      auditingForm: {},
+      auditingOpen: false,
+      // 杩愮淮鎯呭喌琛ㄥ崟
+      ywConditionForm: {},
+      ywConditionOpen: false,
+      // 杩愮淮缁撴灉琛ㄥ崟
+      ywResultForm: {
+
+      },
+      ywResultOpen: false,
+      // 杩愮淮妫�娴嬬粨鏋�
+      checkResultForm: {
+
+      },
+      checkResultOpen: false,
+      // 瀹℃牳琛ㄥ崟鏍¢獙
+      auditingRules: {
+        auditingResult: [
+          { required: true, message: "瀹℃牳缁撴灉涓嶈兘涓虹┖", trigger: "blur" }
         ],
-        unitId: [
-          { required: true, message: "杩愮淮鍗曚綅涓嶈兘涓虹┖", trigger: "change" }
+      },
+      // 杩愮淮鎯呭喌鏍¢獙
+      ywConditionRules: {
+        ywCondition: [
+          { required: true, message: "杩愮淮鎯呭喌涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+      },
+      // 杩愮淮缁撴灉鏍¢獙
+      ywResultRules: {
+        ywResult: [
+          { required: true, message: "杩愮淮缁撴灉涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+      },
+      // 杩愮淮妫�娴嬬粨鏋滄牎楠�
+      checkResultRules: {
+        ywCheckResult: [
+          { required: true, message: "杩愮淮妫�娴嬬粨鏋滀笉鑳戒负绌�", trigger: "blur" }
+        ],
+      },
+      // 鎵归噺瀹℃牳鏍¢獙
+      batchAuditingRules: {
+        ids: [
+          { required: true, message: "璇烽�夋嫨瑕佸鏍哥殑宸ュ崟", trigger: "blur" }
         ],
       }
     };
@@ -202,16 +434,166 @@
     this.getList();
   },
   methods: {
+    // 鎵归噺瀹℃牳
+    batchAuditing(result) {
+      this.batchAuditingWorkOrder.auditingResult = result;
+      this.$refs["batchAuditingWorkOrder"].validate(valid => {
+        if (valid) {
+          batchAuditing(this.batchAuditingWorkOrder).then(res => {
+            this.batchAuditingWorkOrder = {};
+            this.batchAuditingVisible = false;
+            this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+            this.getList();
+          })
+        }
+      })
+    },
+    /** 涓嬭浇鎸夐挳鎿嶄綔 */
+    handleDownload (data) {
+      this.$download.resource(data);
+    },
+    // 鎶ュ
+    submitReportForm() {
+      this.$refs["reportForm"].validate(valid => {
+        if (valid) {
+          addReport(this.reportForm).then(response => {
+            this.$modal.msgSuccess("鎴愬姛鎻愪氦鎶ュ");
+            this.reportOpen = false;
+            this.getList();
+          });
+        }
+      });
+    },
+    // 浜嬪悗鎶ュ鎸夐挳
+    handleReport(row) {
+      this.reportForm.pointId = row.pointId;
+      this.reportForm.source = row.source;
+      this.reportOpen = true;
+    },
+    // 瀹℃牳鎸夐挳
+    handleAuditing(row) {
+      this.auditingForm = row;
+      getYwCondition(row.id).then(response => {
+        this.ywConditions = response.data;
+        this.auditingOpen = true;
+      });
+    },
+    // 杩愮淮鎯呭喌鎸夐挳
+    handleYwCondition(row) {
+      this.form = {};
+      this.ywConditionForm = row;
+      this.ywConditionOpen = true;
+      this.form.id = row.id;
+    },
+    // 杩愮淮缁撴灉鎸夐挳
+    handleYwResult(row) {
+      this.ywResultForm = row;
+      this.ywResultOpen = true;
+    },
+    // 杩愮淮妫�娴嬬粨鏋滄寜閽�
+    handleCheckResult(row) {
+      this.checkResultForm = row;
+      this.checkResultOpen = true;
+    },
+    // 杩囩▼鍥炬煡鐪�
+    handleFlow(row) {
+      this.flowForm = row;
+      getYwAuditingList(row.id).then(response => {
+        if (response.data) {
+          this.ywAuditingList = response.data;
+        }
+      });
+      getYwConditionList(row.id).then(response => {
+        if (response.data) {
+          this.ywHandleList = response.data;
+        }
+        this.flowOpen = true;
+      });
+    },
+    // 鎻愪氦瀹℃牳
+    submitAuditing() {
+      this.$refs["auditingForm"].validate(valid => {
+        if (valid) {
+          auditing(this.auditingForm).then(res => {
+            this.auditingOpen = false;
+            this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+            this.getList();
+          })
+        }
+      })
+    },
+    // 鍙栨秷瀹℃牳
+    cancelAuditing() {
+      this.auditingForm = {};
+      this.auditingOpen = false;
+    },
+    pictureRemove(file, fileList) {
+      this.form.picture = null,
+
+        this.pictureList = this.pictureList.filter(item => item.name !== file.name)
+    },
+    certificateRemove(file, fileList) {
+      this.form.certificate = null,
+
+        this.certificateList = this.certificateList.filter(item => item.name !== file.name)
+    },
+    pictureUploadSuccess(response, file, fileList) {
+      this.form.picture = response.fileName,
+        this.pictureList.push({
+          name: response.originalFilename,
+          url: response.url,
+          fileName: response.fileName
+        })
+    },
+    certificateUploadSuccess(response, file, fileList) {
+      this.form.certificate = response.fileName,
+        this.certificateList.push({
+          name: response.originalFilename,
+          url: response.url,
+          fileName: response.fileName
+        })
+    },
+    // 鎻愪氦杩愮淮鎯呭喌
+    submitYwCondition() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          ywCondition(this.form).then(res => {
+            this.ywConditionOpen = false;
+            this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+            this.getList();
+          })
+        }
+      })
+    },
+    cancelYwCondition() {
+      this.ywConditionForm = {};
+      this.ywConditionOpen = false;
+    },
+    // 鎻愪氦杩愮淮缁撴灉
+    submitYwResult() {
+      // todo
+    },
+    cancelYwResult() {
+      this.ywResultForm = {};
+      this.ywResultOpen = false;
+    },
+    // 鎻愪氦妫�娴嬬粨鏋�
+    submitCheckResult() {
+      // todo
+    },
+    cancelCheckResult() {
+      this.checkResultForm = {};
+      this.checkResultOpen = false;
+    },
     /** 鏌ヨ杩愮淮宸ュ崟鍒楄〃 */
     getList() {
       this.loading = true;
       this.queryParams.params = {};
-      if (null != this.daterangeYwHandleTime && '' != this.daterangeYwHandleTime) {
-        this.queryParams.params["beginYwHandleTime"] = this.daterangeYwHandleTime[0];
-        this.queryParams.params["endYwHandleTime"] = this.daterangeYwHandleTime[1];
-      }
+      this.queryParams["start"] = this.daterangeYwHandleTime ? this.daterangeYwHandleTime[0] : null;
+      this.queryParams["end"] = this.daterangeYwHandleTime ? this.daterangeYwHandleTime[1] : null;
+      if (this.queryParams["status"] == "") { this.queryParams["status"] = "DISTRIBUTED"; }
       listWorkOrder(this.queryParams).then(response => {
-        this.workOrderList = response.rows;
+        this.workOrderList = response.data;
         this.total = response.total;
         this.loading = false;
       });
@@ -269,6 +651,20 @@
         this.form = response.data;
         this.open = true;
         this.title = "淇敼杩愮淮宸ュ崟";
+        this.pictureList = JSON.parse(response.data.picture).map(item => {
+          return {
+            name: item,
+            url: process.env.VUE_APP_FILE_API + '/' + item,
+            fileName: item
+          }
+        })
+        this.certificateList = JSON.parse(row.certificate).map(item => {
+          return {
+            name: item,
+            url: process.env.VUE_APP_FILE_API + '/' + item,
+            fileName: item
+          }
+        })
       });
     },
     /** 鎻愪氦鎸夐挳 */
@@ -310,3 +706,26 @@
   }
 };
 </script>
+
+<style scoped>
+.work-order-item {
+  margin-bottom: 5px;
+}
+.time {
+  font-size: 13px;
+  color: #999;
+}
+
+.image {
+  width: 165px;
+  height: 150px;
+  padding: 10px;
+}
+
+.line-limit-length {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width: 200px;
+}
+</style>

--
Gitblit v1.8.0