From 702eec26f73ced524cba807aad2b20a58734113e Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期五, 30 十二月 2022 16:14:20 +0800
Subject: [PATCH] 开关修改
---
src/views/operate/management/myIndex/index.vue | 196 ++++++++++++++++++++++++------------------------
1 files changed, 97 insertions(+), 99 deletions(-)
diff --git a/src/views/operate/management/myIndex/index.vue b/src/views/operate/management/myIndex/index.vue
index c1b5985..b0f4b18 100644
--- a/src/views/operate/management/myIndex/index.vue
+++ b/src/views/operate/management/myIndex/index.vue
@@ -19,69 +19,85 @@
</header>
<main>
<div class="mainContent">
- <div class="type-nav">
- <div @click="changeTypeChecked(index)" v-for="(item,index) in typeList" :key="item.name"
- :class="[item.checked ? 'is-active':'','type-item']">{{item.name}}</div>
- </div>
<!-- 鏁版嵁灞曠ず -->
<el-table ref="multipleTable"
- :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
+ :header-cell-style="{'font-weight':'650','line-height':'45px'}"
:data="tableData" style="width: 100%" :row-class-name="tableRowClassName"
@selection-change="tableChange">
<el-table-column type="selection" min-width="5">
</el-table-column>
- <el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="10">
+ <el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="18">
<template slot-scope="scope">
<el-link @click="JumpView(scope.row)">{{scope.row.code}}</el-link>
</template>
</el-table-column>
- <el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="10">
+ <el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="8">
+ <template slot-scope="scope">
+ <span>{{scope.row.eventSource === 2 ? '浜哄伐涓婃姤' : '瑙嗛宸℃煡'}}</span>
+ </template>
</el-table-column>
- <el-table-column prop="category" label="澶х被鍚嶇О" min-width="10">
+ <el-table-column :prop="myproblem === 1 ? 'category' :'category'" :label="myproblem===1 ? '澶х被鍚嶇О' : '杩濆缓绫诲埆'" :min-width="myproblem===1?'10':'20'">
</el-table-column>
- <el-table-column prop="type" label="灏忕被鍚嶇О" min-width="10">
+ <el-table-column :prop="myproblem === 1 ? 'type' :'site'" :label="myproblem===1 ? '灏忕被鍚嶇О' : '杩濆缓鍦扮偣'" min-width="10">
</el-table-column>
- <el-table-column prop="actionCause" label="妗堢敱" min-width="10">
+ <el-table-column :prop="myproblem === 1 ? 'actionCause' :'communityId'" :label="myproblem===1 ? '妗堢敱' : '鎵�灞炵ぞ鍖�'" min-width="10">
</el-table-column>
- <el-table-column prop="site" label="鎶ヨ鐐逛綅" min-width="10">
+ <el-table-column :prop="myproblem === 1 ? 'site' :''" :label="myproblem===1 ? '鎶ヨ鐐逛綅' : '杩濇硶寤虹瓚闀裤�佸銆侀珮'" :min-width="myproblem===1?'10' :'20' ">
+ <template slot-scope="scope">
+ <div v-if="myproblem ===2"><span>{{scope.row.buildingLength+'绫�'+'銆�'+ scope.row.buildingWidth+'绫�'+'銆�'+scope.row.buildingHigh+'绫�'}}</span></div>
+ <div v-else>{{scope.row.site}}</div>
+ </template>
</el-table-column>
- <el-table-column prop="streetId" label="鎵�灞炲尯鍩�" min-width="10">
+ <el-table-column :prop="myproblem === 1 ? 'street' :'buildingArea'" :label="myproblem===1 ? '鎵�灞炲尯鍩�' : '杩濇硶寤虹瓚闈㈢Н'" min-width="10">
</el-table-column>
- <el-table-column prop="alarmTime" label="鎶ヨ鏃堕棿" min-width="10">
+ <el-table-column prop="alarmTime" label="鎶ヨ鏃堕棿" min-width="15" v-if="myproblem===1">
+ <template slot-scope="scope">
+ <span>{{filterTime(scope.row.alarmTime)}}</span>
+ </template>
</el-table-column>
- <el-table-column prop="continueTime" label="鎸佺画鏃堕棿" min-width="10">
+ <el-table-column :prop="myproblem === 1 ? 'continueTime' :'materials'" :label="myproblem===1 ? '鎸佺画鏃堕棿' : '杩濇硶寤虹瓚鏉愭枡'" min-width="15">
</el-table-column>
- <el-table-column prop="operation" label="鎿嶄綔" min-width="20">
+ <el-table-column prop="operation" label="鎿嶄綔" min-width="15">
<template slot-scope="scope">
<div class="btn">
- <span @click="handleExamine(scope.row)" v-if="instatus===7 ? true : false">瀹℃牳</span>
- <span class="line" v-if="instatus===7 ? true : false">|</span>
- <span @click="handleClosure(scope.row)">缁撴</span>
+ <!-- v-if="instatus===7 ? true : false" -->
+ <span @click="handleExamine(scope.row)" v-if="instatus===7">瀹℃牳</span>
+ <span @click="handleClosure(scope.row)" v-if="instatus===8">缁撴</span>
+ <span class="line" v-if="instatus !==9">|</span>
+ <span @click="JumpView(scope.row)">鏌ョ湅</span>
</div>
</template>
</el-table-column>
</el-table>
<!-- 瀹℃牳椤甸潰 -->
- <el-dialog :visible.sync="dialogExamine" width="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogExamine"
+ <el-dialog :visible.sync="dialogExamine" width="60%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogExamine"
:before-close="handleClose">
- <MyExamine :info="info" @closeDialog="closeDialog"></MyExamine>
+ <MyExamine :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyExamine>
+ <MyIllExamine :info="info" v-else @closeDialog="closeDialog"></MyIllExamine>
</el-dialog>
<!-- 缁撴椤甸潰 -->
- <el-dialog :visible.sync="dialogClosure" width="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogClosure"
+ <el-dialog :visible.sync="dialogClosure" width="60%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogClosure"
:before-close="handleClose">
- <MyClosure :info="info" @closeDialog="closeDialog"></MyClosure>
+ <MyClosure :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyClosure>
+ <MyIllClosure :info="info" v-else @closeDialog="closeDialog"></MyIllClosure>
+ </el-dialog>
+ <!-- 璇︽儏椤甸潰 -->
+ <el-dialog :visible.sync="dialogView" width="60%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogView"
+ :before-close="handleNoClose">
+ <MyDetail :info=info v-if="myproblem === 1" :mycode = 'code'></MyDetail>
+ <MyIllDetail :info=info v-else :mycode="code"></MyIllDetail>
</el-dialog>
<!-- tools -->
- <div class="tools">
+ <!-- <div class="tools">
<div class="funs">
- <div class="funsItem">
+ <div class="funsItem funs-sp">
<el-checkbox v-model="all" @change="selectAll()">鍏ㄩ��</el-checkbox>
</div>
- <div class="funsItem">
+ <div class="funsItem funs-sp">
<el-checkbox v-model="unsame" @change="disSame(tableData)">鍙嶉��</el-checkbox>
</div>
<div class="funsItem">
- <el-select v-model="myIdx" placeholder="鎵归噺鎿嶄綔" @change="selectChange">
+ <el-select v-model="myIdx" placeholder="鎵归噺鎿嶄綔" @change="selectChange" disabled>
<el-option v-for="item in options" :key="item.value" :label="item.label"
:value="item.value" :disabled="item.disabled">
</el-option>
@@ -94,7 +110,7 @@
@prev-click="handlePrev" @next-click="handleNext">
</el-pagination>
</div>
- </div>
+ </div> -->
</div>
</main>
</div>
@@ -102,15 +118,21 @@
<script>
import MyExamine from './components/examine'
import MyClosure from './components/closure'
+import MyIllExamine from './components/illExamine'
+import MyIllClosure from './components/illclosure'
+import MyDetail from '@/components/detail'
+import MyIllDetail from '@/components/illdetail'
+import helper from '@/utils/mydate'
export default {
components: {
- MyExamine,MyClosure
+ MyExamine,MyClosure,MyDetail,MyIllDetail,MyIllExamine,MyIllClosure
},
data() {
return {
tableData: [],
dialogExamine:false,
dialogClosure:false,
+ dialogView:false,
info: {},
totalNum: null,
pageSize: 10,
@@ -154,6 +176,7 @@
caseId: '',
myproblem: 1,
instatus: 7,
+ code:''
}
},
created() {
@@ -162,7 +185,6 @@
methods: {
// 鎵归噺鍒犻櫎
mulDelete(idArr) {
- console.log(idArr);
this.$axios({
method: 'delete',
url: 'sccg/violations/batch_delete?ids=' + idArr,
@@ -176,7 +198,6 @@
},
// 鎵ц涓嬫媺妗嗘搷浣�
selectChange(list) {
- console.log(this.tempList);
if (this.tempList.length !== 0) {
if (list === 3) {
this.preMyIdx = list;
@@ -196,11 +217,7 @@
list.forEach(item => {
this.tempList.push(item.code);
})
- if (list.length === this.tableData.length) {
- this.all = true;
- } else {
- this.all = false
- }
+ this.all = list.length === this.tableData.length;
},
// 鍏ㄩ��
selectAll() {
@@ -214,16 +231,13 @@
},
// 鍒犻櫎鍗曟潯鏁版嵁
handleDelete({ number }) {
- console.log(number);
this.$confirm('纭鍒犻櫎锛�')
.then(_ => {
- console.log(1);
this.$axios({
method: 'delete',
url: `sccg/violations/delete?id=${number}`,
})
.then(res => {
- console.log(res);
this.$message({
type: res.code === 200 ? 'success' : 'warning',
message: res.message
@@ -232,39 +246,26 @@
this.getUserList();
})
})
- .catch(_ => { console.log(2) });
+ .catch(_ => { });
},
// 鑾峰彇鐢ㄦ埛鍒楄〃
getUserList() {
const { currentPage, pageSize, instatus, myproblem } = this;
this.$axios({
method: 'get',
- url: `sccg/base_case/query?state=${instatus}¤t=${currentPage}&size=${pageSize}&resource=2&type=${myproblem}`
+ url: `sccg/base_case/query?state=${instatus}¤t=${currentPage}&size=${pageSize}&type=${myproblem}`
}).then(res => {
this.totalNum = res.data.total;
this.tableData = res.data.records;
})
},
- // 鏇存敼杩濊/杩濆缓
- changeTypeChecked(idx) {
- this.typeList.forEach((item, index) => {
- if (index === idx) {
- item.checked = true;
- } else {
- item.checked = false;
- }
- });
- this.myproblem = idx+1;
- this.getUserList();
- },
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 == 0) {
+ if ((rowIndex + 1) % 2 === 0) {
return 'warning-row';
} else {
return 'success-row';
}
- return '';
},
// 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
changeCurrentPage(page) {
@@ -289,8 +290,11 @@
})
.catch(_ => { });
},
+ handleNoClose(done) {
+ done();
+ },
async JumpView(data) {
- console.log(data);
+ this.code = data.code
await this.getEventInfo(data.code);
},
// 鑾峰彇妗堜欢淇℃伅
@@ -300,7 +304,17 @@
url: `sccg/base_case/baseCaseDetail/${code}`
})
.then(res => {
- console.log(res);
+ this.info = res.data;
+ this.dialogView = true;
+ })
+ },
+ // 鑾峰彇妗堜欢淇℃伅
+ getEventInfo3(code) {
+ this.$axios({
+ method: 'get',
+ url: `sccg/base_case/baseCaseDetail/${code}`
+ })
+ .then(res => {
this.info = res.data;
this.dialogExamine = true;
})
@@ -312,14 +326,13 @@
url: `sccg/base_case/baseCaseDetail/${code}`
})
.then(res => {
- console.log(res);
this.info = res.data;
this.dialogClosure = true;
})
},
// 鍘诲鏍�
handleExamine({code}) {
- this.getEventInfo(code);
+ this.getEventInfo3(code);
},
// 鍘荤粨妗�
handleClosure({code}){
@@ -338,6 +351,9 @@
// 瀹℃牳鐘舵��
changeInStatus(val){
this.getUserList();
+ },
+ filterTime(time){
+ return helper(time);
}
}
}
@@ -349,7 +365,7 @@
color: #4b9bb7;
header {
- background-color: #09152f;
+ // background-color: #09152f;
padding: 10px 20px;
.problem,
@@ -366,39 +382,17 @@
}
&::v-deep .el-input__inner {
- background-color: #09152f;
+ // background-color: #09152f;
border: 1px solid #17324c;
}
main {
- background-color: #09152f;
+ // background-color: #09152f;
margin-top: 20px;
padding-bottom: 50px;
- border: 1pox solid #fff;
-
- .type-nav {
- display: flex;
- line-height: 40px;
- margin-left: 30px;
- padding-top: 10px;
- margin-bottom: 10px;
-
- .type-item {
- width: 80px;
- text-align: center;
-
- &:hover {
- cursor: pointer;
- }
- }
-
- .is-active {
- background-color: #070f22;
- border-radius: 4px;
- color: #fff;
- }
+ .btn span:hover{
+ cursor: pointer;
}
-
.tools {
display: flex;
justify-content: space-between;
@@ -407,12 +401,13 @@
.funs {
display: flex;
-
+ .funs-sp{
+ border: 1px solid #17324c;
+ }
.funsItem {
line-height: 28px;
display: flex;
align-items: center;
- border: 1px solid #17324c;
border-radius: 4px;
font-size: 12px;
margin-left: 10px;
@@ -428,7 +423,7 @@
&::v-deep .el-input__inner {
border: none;
- background-color: #09152f;
+ // background-color: #09152f;
}
&:hover {
@@ -466,18 +461,21 @@
}
.el-table {
- color: #4b9bb7;
- font-size: 10px;
+ // color: #4b9bb7;
+ // font-size: 10px;
&::v-deep .cell {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
+ .el-checkbox {
+ display: none;
+ }
}
- &::v-deep .el-table__empty-block {
- background-color: #09152f;
- }
+ // &::v-deep .el-table__empty-block {
+ // background-color: #09152f;
+ // }
&::v-deep .el-table__empty-block {
color: #4b9bb7;
@@ -496,9 +494,9 @@
}
}
- .el-table::v-deep .warning-row {
- background: #06122c;
- }
+ // .el-table::v-deep .warning-row {
+ // background: #06122c;
+ // }
.el-table::v-deep .success-row {
background: #071f39;
@@ -539,9 +537,9 @@
}
&::v-deep .el-dialog__header,
- &::v-deep .el-dialog__body {
- background-color: #06122c;
- }
+ // &::v-deep .el-dialog__body {
+ // background-color: #06122c;
+ // }
&::v-deep .el-dialog__header {
display: flex;
--
Gitblit v1.8.0