From f4c324b44aadc4d8a44d4c67c588d2f76261ccaa Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 30 十一月 2022 16:07:39 +0800
Subject: [PATCH] fix:消息分页 视频查询 图片查询
---
src/views/operate/car/myIndex/index.vue | 75 +++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 29 deletions(-)
diff --git a/src/views/operate/car/myIndex/index.vue b/src/views/operate/car/myIndex/index.vue
index c3de32e..df8191b 100644
--- a/src/views/operate/car/myIndex/index.vue
+++ b/src/views/operate/car/myIndex/index.vue
@@ -5,11 +5,15 @@
<div class="search">
<span>杞﹁締鎼滅储:</span>
<div class="option">
- <el-input @input="handleSearch" v-model="context" placeholder="璇疯緭鍏ヨ溅鐗屽彿"></el-input>
+ <el-input v-model="context" placeholder="璇疯緭鍏ヨ溅鐗屽彿"></el-input>
+ </div>
+
+ <div class="findBtn">
+ <el-button type="primary" @click="handleSearch">鏌ヨ</el-button>
</div>
</div>
<div class="addCar">
- <el-button type="primary" class="addBtn" @click="handleAddCar">娣诲姞杞﹁締</el-button>
+ <el-button type="primary" class="addBtn button-addition" @click="handleAddCar">娣诲姞杞﹁締</el-button>
</div>
</div>
</header>
@@ -30,22 +34,24 @@
</el-table-column>
<el-table-column prop="carModel" label="杞﹀瀷" min-width="10" v-if="mystatus===2">
</el-table-column>
- <el-table-column prop="ownerName" label="杞︿富濮撳悕" min-width="10">
+ <el-table-column :prop="mystatus ===1 ? 'ownerName':'carOwner'" label="杞︿富濮撳悕" min-width="10">
</el-table-column>
- <el-table-column prop="vehicleUser" label="杞﹁締浣跨敤浜哄憳" min-width="10">
+ <el-table-column v-if="mystatus ===2" :prop="mystatus ===1 ? 'vehicleUser' : 'carUser'" label="杞﹁締浣跨敤浜哄憳" min-width="10">
</el-table-column>
- <el-table-column prop="contact" label="鑱旂郴鏂瑰紡" min-width="10">
+ <el-table-column :prop="mystatus ===1 ? 'contact' : 'phone' " label="鑱旂郴鏂瑰紡" min-width="10">
</el-table-column>
- <el-table-column :prop="mystatus===1 ? 'belong' : 'geographicPosition'" :label="mystatus === 1 ? '鎵�灞為儴闂�':'鏂藉伐鍦板潃'" min-width="10">
+ <el-table-column :prop="mystatus===1 ? 'pdepartName' : 'geographicPosition'" :label="mystatus === 1 ? '鎵�灞為儴闂�':'鏂藉伐鍦板潃'" min-width="10">
</el-table-column>
- <el-table-column :prop="mystatus===1 ? 'depart' : 'constructionOrg'" :label="mystatus === 1 ? '鎵�灞炲ぇ闃�' : '鏂藉伐鍗曚綅'" min-width="10">
+ <el-table-column :prop="mystatus===1 ? 'departName' : 'constructionOrg'" :label="mystatus === 1 ? '鎵�灞炲ぇ闃�' : '鏂藉伐鍗曚綅'" min-width="10">
</el-table-column>
<el-table-column prop="operation" label="鎿嶄綔" min-width="20">
<template slot-scope="scope">
<div class="btn">
- <span @click="handleView(scope.row)">鏌ョ湅</span>
+ <!-- <span @click="handleView(scope.row)">鏌ョ湅</span>
+ <span class="line">|</span> -->
+ <span @click="handleEdit(scope.row)">缂栬緫</span>
<span class="line">|</span>
- <span>鍒犻櫎</span>
+ <span @click="handleDelete(scope.row)">鍒犻櫎</span>
</div>
</template>
</el-table-column>
@@ -61,6 +67,12 @@
v-if="dialogView" :before-close="handleNoClose">
<MyViewLaw v-if="mystatus === 1" :info="info"></MyViewLaw>
<MyViewSoil v-else :info="info"></MyViewSoil>
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog :visible.sync="dialogEdit" width="60%" title="缂栬緫杞﹁締淇℃伅"
+ v-if="dialogEdit" :before-close="handleClose">
+ <MyEditLaw v-if="mystatus === 1" @closeDialog="closeDialog" :info="info"></MyEditLaw>
+ <MyEditSoil v-else @closeDialog="closeDialog" :info="info"></MyEditSoil>
</el-dialog>
<!-- tools -->
<div class="tools">
@@ -95,10 +107,12 @@
import MySoil from './create/soil'
import MyViewLaw from './update/law'
import MyViewSoil from './update/soil'
+import MyEditLaw from './edit/law'
+import MyEditSoil from './edit/soil'
export default {
components: {
Mycreate,MySoil,MyViewLaw,
- MyViewSoil
+ MyViewSoil,MyEditLaw,MyEditSoil
},
data() {
return {
@@ -106,6 +120,7 @@
context: "",
dialogAdd:false,
dialogView:false,
+ dialogEdit:false,
info: '',
totalNum: null,
pageSize: 10,
@@ -113,7 +128,6 @@
all: false,
unsame: false,
myIdx: 0,
- preMyIdx:0,
options: [
{
value: 0,
@@ -152,16 +166,21 @@
}
},
created() {
- this.getUserList();
+ this.getCarList();
},
methods: {
+ // 缂栬緫杞﹁締
+ handleEdit(data){
+ this.dialogEdit = true
+ this.info = data;
+ },
// 鎼滅储杞﹁締
handleSearch(val){
if(this.timer){
clearTimeout(this.timer);
}
this.timer = setTimeout(()=>{
- this.getUserList();
+ this.getCarList();
},1000);
},
// 娣诲姞杞﹁締
@@ -191,29 +210,28 @@
})
},
// 鍒犻櫎鍗曟潯鏁版嵁
- handleDelete({ number }) {
- console.log(number);
+ handleDelete({id}) {
this.$confirm('纭鍒犻櫎锛�')
.then(_ => {
- console.log(1);
+ const {mystatus} = this
+ let myurl = mystatus === 1 ? 'deletion_enforce':'deletion_slag'
this.$axios({
method: 'delete',
- url: `sccg/violations/delete?id=${number}`,
+ url: `/sccg/car_Manage/${myurl}?id=${id}`,
})
.then(res => {
- console.log(res);
this.$message({
type: res.code === 200 ? 'success' : 'warning',
message: res.message
})
- this.getUserList();
+ this.getCarList();
})
})
- .catch(_ => { console.log(2) });
+ .catch(_ => { });
},
- // 鑾峰彇鐢ㄦ埛鍒楄〃
- async getUserList() {
+ // 鑾峰彇杞﹁締鍒楄〃
+ async getCarList() {
const { currentPage, pageSize, context, mystatus } = this;
let arr =[];
if(mystatus===1){
@@ -221,7 +239,6 @@
}else{
arr = await this.getSoilCarList(currentPage, pageSize, context)
}
- console.log(arr);
this.tableData = arr.records;
this.totalNum = arr.total;
},
@@ -233,7 +250,6 @@
url:`sccg/car_Manage/query_enforce?current=${currentPage}&size=${pageSize}&carNum=${carNum}`,
})
.then(res=>{
- console.log(res);
arr = res.data;
})
return arr;
@@ -260,7 +276,7 @@
}
})
this.mystatus = idx + 1;
- this.getUserList();
+ this.getCarList();
},
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
@@ -274,17 +290,17 @@
// 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
changeCurrentPage(page) {
this.currentPage = page;
- this.getUserList();
+ this.getCarList();
},
// 涓婁竴椤电偣鍑讳簨浠�
handlePrev(page) {
this.currentPage = page;
- this.getUserList();
+ this.getCarList();
},
// 涓嬩竴椤电偣鍑讳簨浠�
handleNext(page) {
this.currentPage = page;
- this.getUserList();
+ this.getCarList();
},
handleClose(done) {
this.$confirm('纭鍏抽棴锛�')
@@ -306,8 +322,9 @@
// 鍏抽棴鐣岄潰
closeDialog({flag,index}){
this.dialogAdd = flag;
+ this.dialogEdit = flag
if(index===1){
- this.getUserList();
+ this.getCarList();
}
},
handleView(data){
--
Gitblit v1.8.0