From 2bd38f3c07fa4ec63c5b5fd99bca19d2b1b4ee2d Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期二, 19 三月 2024 14:54:50 +0800
Subject: [PATCH] refactor
---
src/views/system/work-order/index.vue | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 220 insertions(+), 8 deletions(-)
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index 993fa72..f27f236 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -59,7 +59,6 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
- v-hasPermi="['x:work-order:remove']"
>鍒犻櫎</el-button>
</el-col>
<el-col :span="1.5">
@@ -83,9 +82,11 @@
<el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitName" width="150"/>
<el-table-column label="杩愮淮浜哄憳" align="center" prop="ywPeopleName" />
<el-table-column label="杩愮淮澶勭悊鏃堕棿" align="center" prop="ywHandleTime" width="180"/>
+ <el-table-column label="澶勭悊缁撴潫鏃堕棿" align="center" prop="ywHandleTime" width="180"/>
<el-table-column label="杩愮淮缁撴灉" align="center" prop="ywResult" />
<el-table-column label="杩愮淮鎯呭喌" align="center" prop="ywCondition" width="150"/>
- <el-table-column label="杩愮淮妫�娴嬬粨鏋�" align="center" prop="ywCheckResult" width="230"/>
+ <el-table-column label="杩愮淮妫�娴嬬粨鏋�" align="center" prop="ywCheckResult" width="200"/>
+ <el-table-column label="瀹℃牳閫氳繃鏃堕棿" align="center" prop="ywHandleTime" width="200"/>
<el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"/>
<el-table-column label="鎿嶄綔" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
@@ -101,26 +102,28 @@
size="mini"
type="text"
@click="handleAuditing(scope.row)"
- v-hasPermi="['x:work-order:remove']"
+ v-hasPermi="['work:order:audit']"
>瀹℃牳</el-button>
<el-button
size="mini"
type="text"
@click="handleYwCondition(scope.row)"
- v-hasPermi="['x:work-order:remove']"
>杩愮淮鎯呭喌</el-button>
<el-button
size="mini"
type="text"
@click="handleYwResult(scope.row)"
- v-hasPermi="['x:work-order:remove']"
>杩愮淮缁撴灉</el-button>
<el-button
size="mini"
type="text"
@click="handleCheckResult(scope.row)"
- v-hasPermi="['x:work-order:remove']"
>妫�娴嬬粨鏋�</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleFlow(scope.row)"
+ >杩囩▼鍥�</el-button>
</template>
</el-table-column>
</el-table>
@@ -168,6 +171,34 @@
</el-form-item>
<el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName">
<el-input v-model="ywConditionForm.ywPeopleName" disabled />
+ </el-form-item>
+ <el-form-item label="鐜板満鍥剧墖" prop="picture">
+ <el-upload
+ class="avatar-uploader"
+ action="/dev-api/common/upload"
+ name="file"
+ :headers="{'Authorization': 'Bearer ' + getToken()}"
+ :on-success="pictureUploadSuccess"
+ :on-remove="pictureRemove"
+ :file-list="pictureList"
+ list-type="picture">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div slot="tip" class="el-upload__tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
+ </el-upload>
+ </el-form-item>
+ <el-form-item label="浣愯瘉鏉愭枡" prop="certificates">
+ <el-upload
+ class="avatar-uploader"
+ action="/dev-api/common/upload"
+ name="file"
+ :headers="{'Authorization': 'Bearer ' + getToken()}"
+ :on-success="certificateUploadSuccess"
+ :on-remove="certificateRemove"
+ :file-list="certificateList"
+ list-type="picture">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div slot="tip" class="el-upload__tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
+ </el-upload>
</el-form-item>
<el-form-item label="杩愮淮鎯呭喌" prop="ywCondition">
<el-input v-model="ywConditionForm.ywCondition" type="textarea" maxlength="150" show-word-limit/>
@@ -248,16 +279,152 @@
<el-button @click="cancel">鍙� 娑�</el-button>
</div>
</el-dialog>
+
+
+ <!-- 杩囩▼鍥� -->
+ <el-dialog title="杩囩▼鍥�" :visible.sync="flowOpen" width="1200px" :close-on-click-modal="false" append-to-body>
+ <div>
+ <el-steps :active="2" :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">
+ 澶勭悊鏈熼檺锛�<el-tag type="danger" size="small">12灏忔椂</el-tag>
+ </div>
+ </div>
+ </template>
+ </el-step>
+ <el-step title="杩愮淮澶勭悊">
+ <template slot="description">
+ <div class="y-item">
+ <div class="y-item-1">
+ <div class="flow-item-x">
+ 杩愮淮鐘舵�侊細<el-tag type="danger" size="small">缁撴灉涓婃姤</el-tag>
+ </div>
+ <div class="flow-item-x">
+ 杩愮淮浜哄憳锛�<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag>
+ </div>
+ </div>
+ <div class="y-item-2">
+ <div >
+ {{flowForm.ywHandleTime}}
+ </div>
+ <div >
+ 绗嚑娆★細1
+ </div>
+ </div>
+ </div>
+ <div class="y-item">
+ <div class="y-item-1">
+ <div class="flow-item-x">
+ 杩愮淮鐘舵�侊細<el-tag type="danger" size="small">缁撴灉涓婃姤</el-tag>
+ </div>
+ <div class="flow-item-x">
+ 杩愮淮浜哄憳锛�<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag>
+ </div>
+ </div>
+ <div class="y-item-2">
+ <div >
+ {{flowForm.ywHandleTime}}
+ </div>
+ <div >
+ 绗嚑娆★細2
+ </div>
+ </div>
+ </div>
+
+ </template>
+ </el-step>
+ <el-step title="缁撴灉瀹℃牳">
+ <template slot="description">
+ <div class="y-item">
+ <div class="y-item-1">
+ <div class="flow-item-x">
+ 瀹℃牳缁撴灉锛�<el-tag type="danger" size="small">椹冲洖</el-tag>
+ </div>
+ <div class="flow-item-x">
+ 瀹℃牳璇存槑锛�<el-tag type="danger" size="small">鏈垚鍔熷鐞�</el-tag>
+ </div>
+ </div>
+ <div class="y-item-2">
+ <div >
+ {{flowForm.ywHandleTime}}
+ </div>
+ <div >
+ 绗嚑娆★細1
+ </div>
+ </div>
+ </div>
+ <div class="y-item">
+ <div class="y-item-1">
+ <div class="flow-item-x">
+ 瀹℃牳鐘舵�侊細<el-tag type="info" size="small">瀹℃牳涓�</el-tag>
+ </div>
+ <div class="flow-item-x">
+ 瀹℃牳璇存槑锛�
+ </div>
+ </div>
+ <div class="y-item-2">
+ <div >
+ {{flowForm.ywHandleTime}}
+ </div>
+ <div >
+ 绗嚑娆★細2
+ </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,auditing, ywCondition } from "@/api/platform/work-order";
-
export default {
name: "Work-order",
+ components: {
+ },
data() {
return {
+ // 杩囩▼鍥�
+ flowOpen: false,
+ flowForm: {},
+ certificateList:[],
+ pictureList: [],
// 閬僵灞�
loading: true,
// 閫変腑鏁扮粍
@@ -357,6 +524,11 @@
this.checkResultForm = row;
this.checkResultOpen = true;
},
+ // 杩囩▼鍥炬煡鐪�
+ handleFlow(row) {
+ this.flowOpen = true;
+ this.flowForm = row;
+ },
// 鎻愪氦瀹℃牳
submitAuditing() {
this.$refs["auditingForm"].validate(valid => {
@@ -372,6 +544,32 @@
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() {
@@ -471,6 +669,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
+ }
+ })
});
},
/** 鎻愪氦鎸夐挳 */
--
Gitblit v1.8.0