From e2ffe9683ef007a45afbcdd897985d64cdcc7391 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期四, 24 十一月 2022 11:26:31 +0800
Subject: [PATCH] 修改
---
src/views/operate/myWait/index.vue | 59 ++++++++++++++++++++++++-----------------------------------
1 files changed, 24 insertions(+), 35 deletions(-)
diff --git a/src/views/operate/myWait/index.vue b/src/views/operate/myWait/index.vue
index 0a64ce7..5a99668 100644
--- a/src/views/operate/myWait/index.vue
+++ b/src/views/operate/myWait/index.vue
@@ -6,8 +6,8 @@
<header>
<div class="headerContent">
<div class="search">
- <span>绛涢�夋潯浠�:</span>
- <el-input placeholder="璇疯緭鍏ュ唴瀹�" v-model="context"></el-input>
+ <span>浜嬩欢缂栧彿:</span>
+ <el-input placeholder="璇疯緭鍏ヤ簨浠剁紪鍙�" v-model="context"></el-input>
<div class="findBtn">
<el-button type="primary" @click="getTableData">鏌ヨ</el-button>
</div>
@@ -26,24 +26,18 @@
<el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="10">
</el-table-column>
<el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="10">
- <template slot-scope="scope">
- <span>{{scope.row}}</span>
+ <template slot-scope="scope" v-if="scope.row">
+ <span>{{ getEventSource(scope.row.eventSource)?.label }}</span>
</template>
</el-table-column>
<el-table-column prop="category" label="闂绫诲埆" min-width="10">
- <template slot-scope="scope">
- <span>{{scope.row}}</span>
+ <template slot-scope="scope" v-if="scope.row">
+ <span>{{ getCategory(scope.row.category)?.label }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="10">
- <template slot-scope="scope">
- <span>{{changeTime(scope.row)}}</span>
- </template>
</el-table-column>
- <el-table-column prop="type" label="鍓╀綑鏃堕棿" min-width="10">
- <template slot-scope="scope">
- <span>{{getRestTime(scope.row)}}</span>
- </template>
+ <el-table-column prop="limitTime" label="鍓╀綑鏃堕棿" min-width="10">
</el-table-column>
<el-table-column prop="stepName" label="闂鐘舵��" min-width="10">
</el-table-column>
@@ -52,8 +46,8 @@
</el-table>
<!-- 鏌ョ湅淇敼椤甸潰 -->
<el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '鏉冮檺璁剧疆' :'鏌ョ湅瑙掕壊淇℃伅'"
- v-if="dialogUpdate" :before-close="handleClose">
- <updateUser :updateFlag="updateFlag" :userInfo=userInfo
+ :destroy-on-close="true" :key="updateFlag" :before-close="handleClose">
+ <updateUser v-if="dialogUpdate" :updateFlag="updateFlag" :userInfo=userInfo
:getTableData=" context ? getTableData : getTableData" @changeDialog="changeDialog" />
</el-dialog>
<!-- tools -->
@@ -75,8 +69,7 @@
</div>
<div class="pagination">
<el-pagination background :current-page="currentPage" layout="prev, pager, next"
- :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"
- @prev-click="handlePrev" @next-click="handleNext">
+ :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage">
</el-pagination>
</div>
</div>
@@ -90,6 +83,7 @@
import {computeTime} from '@/utils/helper'
import filterTime from '@/utils/mydate'
import myWait from "@/api/operate/myWait";
+import { CATEGOTY, RESOURCE_TYPE } from "@/utils/helper";
export default {
components: {
@@ -98,7 +92,7 @@
data() {
return {
tableData: [],
- context: "",
+ context: null,
dialogCreate: false,
dialogUpdate: false,
updateFlag: false,
@@ -139,6 +133,7 @@
myWait.getMybackLog({ num: this.context })
.then(res => {
this.tableData = res;
+ this.tableData = this.tableData.filter(item => !!item);
})
.catch(err => this.$message({ type: 'error', message: err }))
},
@@ -183,7 +178,7 @@
},
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 == 0) {
+ if ((rowIndex + 1) % 2 === 0) {
return 'warning-row';
} else {
return 'success-row';
@@ -200,28 +195,17 @@
this.currentPage = page;
this.getTableData();
},
- // 涓婁竴椤电偣鍑讳簨浠�
- handlePrev(page) {
- this.currentPage = page;
- this.getTableData();
- },
- // 涓嬩竴椤电偣鍑讳簨浠�
- handleNext(page) {
- this.currentPage = page;
- this.getTableData();
- },
changeDialog(val) {
this.dialogUpdate = val.dialogUpdate;
- console.log(val);
},
handleClose(done) {
this.$confirm('纭鍏抽棴锛�')
- .then(_ => {
+ .then(() => {
this.dialogCreate = false;
this.dialogUpdate = false;
done();
})
- .catch(_ => { });
+ .catch(() => { });
},
// 璁$畻鏃堕棿
getRestTime(time2){
@@ -232,7 +216,14 @@
if(time){
return filterTime(time);
}
- }
+ },
+ getCategory(code) {
+ return CATEGOTY.find(item => item.value === code);
+ },
+
+ getEventSource(code) {
+ return RESOURCE_TYPE.find(item => item.value === code);
+ }
}
}
</script>
@@ -248,7 +239,6 @@
header {
background-color: #09152f;
- border: 1pox solid #fff;
.headerContent {
padding: 0 40px;
@@ -303,7 +293,6 @@
background-color: #09152f;
margin-top: 20px;
padding-bottom: 50px;
- border: 1pox solid #fff;
.mainTitle {
line-height: 60px;
--
Gitblit v1.8.0