|
@@ -27,16 +27,16 @@
|
|
|
<tr v-for="(list) in data">
|
|
|
<td v-for="(item) in list">
|
|
|
<el-button type="text" @click="handleClick,openDialog(item.id,item.status,item.lockCode)"
|
|
|
- style="color: #fff;padding: 5px;height: 100%;font-weight: bold"
|
|
|
- :class="item.lockCode==null?'fff':( item.status===2? 'grey' : (item.status===1 ? 'red':'green'))">
|
|
|
- <svg-icon icon-class="key" style="font-size: 300%" v-if="item.status!==2"/>
|
|
|
+ style="padding: 5px;height: 100%;font-weight: bold"
|
|
|
+ :class="getCss(item)">
|
|
|
+ <svg-icon icon-class="key" style="font-size: 300%;" v-if="item.status!==2"/>
|
|
|
<i class="el-icon-circle-close" style="font-size: 300%" v-if="item.status===2"/>
|
|
|
<br/>
|
|
|
<br/>
|
|
|
- <div v-if="item.lockCode!=null">
|
|
|
- <span>{{ item.lockCode.substring(0, item.lockCode.indexOf('-')) }}</span>
|
|
|
+ <div v-if="item.lockCode!=null">
|
|
|
+ <span style="color: #fff;">{{ item.lockCode.substring(0, item.lockCode.indexOf('-')) }}</span>
|
|
|
<br><br>
|
|
|
- <span>{{ item.lockCode.substring(item.lockCode.indexOf('-'), item.lockCode.length) }}</span></div>
|
|
|
+ <span style="color: #fff;">{{ item.lockCode.substring(item.lockCode.indexOf('-'), item.lockCode.length) }}</span></div>
|
|
|
</el-button>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -245,7 +245,7 @@ import OfflinevalveDetail from "@/views/approve/approveDetail/offlinevalve-detai
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
|
- pageNumber: {default:1}
|
|
|
+ pageNumber: {default: 1}
|
|
|
},
|
|
|
components: {OfflinevalveDetail, VueDraggableResizable},
|
|
|
name: "lock-eu",
|
|
@@ -349,6 +349,27 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ getCss(item) {
|
|
|
+ if (item.valveStatus == 'LC') {//红背景
|
|
|
+ if (item.status == 0) {//白字
|
|
|
+ return 'fwAndbr'
|
|
|
+ } else if (item.status == 1) {//绿字
|
|
|
+ return 'fgAndbr'
|
|
|
+ } else {
|
|
|
+ return 'grey'
|
|
|
+ }
|
|
|
+ } else if (item.valveStatus == 'LO') {//绿背景
|
|
|
+ if (item.status == 0) {//白字
|
|
|
+ return 'fwAndbg'
|
|
|
+ } else if (item.status == 1) {//红字
|
|
|
+ return 'frAndbg'
|
|
|
+ } else {
|
|
|
+ return 'grey'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return 'default'
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 查询破锁管理列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -403,11 +424,11 @@ export default {
|
|
|
getInfoByLock(lockCode).then(res => {
|
|
|
if (res.data.type == 1) {
|
|
|
// this.detail.open1 = true
|
|
|
- this.$router.push({ path: '/process/offlinevalve', query: { lockNo: lockCode }});
|
|
|
+ this.$router.push({path: '/process/offlinevalve', query: {lockNo: lockCode}});
|
|
|
}
|
|
|
if (res.data.type == 2) {
|
|
|
// this.detail.open2 = true
|
|
|
- this.$router.push({ path: '/process/safetychange', query: { lockNo: lockCode }});
|
|
|
+ this.$router.push({path: '/process/safetychange', query: {lockNo: lockCode}});
|
|
|
}
|
|
|
if (res.data.type == 3) {
|
|
|
this.detail.open3 = true
|
|
@@ -483,6 +504,26 @@ el-button {
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
+.fwAndbg {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #67C23A;
|
|
|
+}
|
|
|
+
|
|
|
+.fwAndbr {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #F56C6C;
|
|
|
+}
|
|
|
+
|
|
|
+.fgAndbr {
|
|
|
+ color: #67C23A;
|
|
|
+ background-color: #F56C6C;
|
|
|
+}
|
|
|
+
|
|
|
+.frAndbg {
|
|
|
+ color: #F56C6C;
|
|
|
+ background-color: #67C23A;
|
|
|
+}
|
|
|
+
|
|
|
.green {
|
|
|
background-color: #67C23A;
|
|
|
}
|
|
@@ -496,6 +537,7 @@ el-button {
|
|
|
}
|
|
|
|
|
|
.grey {
|
|
|
+ color: #fff;
|
|
|
background-color: #909399;
|
|
|
}
|
|
|
</style>
|