提交
This commit is contained in:
parent
2c3c7e052a
commit
b361dc02b3
|
@ -42,3 +42,11 @@ export function delAbnormal(abnormalId) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 已读设备故障
|
||||
export function readAbnormal(abnormalId) {
|
||||
return request({
|
||||
url: '/ss/abnormal/read/' + abnormalId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -74,6 +74,19 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上报时间" align="center" prop="createTime" width="180"/>
|
||||
<el-table-column label="读取时间" align="center" prop="readTime" width="180"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-show="canRead(scope.row)"
|
||||
@click="handleRead(scope.row)"
|
||||
v-hasPermi="['ss:abnormal:read']"
|
||||
>已读</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -121,7 +134,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listAbnormal, getAbnormal, delAbnormal, addAbnormal, updateAbnormal } from "@/api/ss/abnormal";
|
||||
import { listAbnormal, getAbnormal, delAbnormal, addAbnormal, updateAbnormal, readAbnormal } from '@/api/ss/abnormal'
|
||||
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
|
||||
import UserLink from '@/components/Business/SmUser/UserLink.vue'
|
||||
|
||||
|
@ -129,6 +142,13 @@ export default {
|
|||
name: "Abnormal",
|
||||
components: { UserLink, DeviceLink },
|
||||
dicts: ['ss_abnormal_status'],
|
||||
computed: {
|
||||
canRead() {
|
||||
return (row) => {
|
||||
return row != null && row.status === '1';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -188,6 +208,14 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleRead(row) {
|
||||
readAbnormal(row.abnormalId).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("操作成功");
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 查询设备故障列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -27,17 +27,6 @@
|
|||
v-hasPermi="['system:article:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:article:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
|
@ -66,23 +55,7 @@
|
|||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="文章id" align="center" prop="articleId" width="100"/>
|
||||
<el-table-column label="分类" align="center" key="classifyName" prop="classify.classifyName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="分类" align="center" prop="classifyName">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.article_classify" :value="scope.row.classify"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="标题" align="center" prop="title" />
|
||||
<!-- <el-table-column label="logo" align="center" prop="logo" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.logo" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="主图地址" align="center" prop="masterPicture" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.masterPicture" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="标签" align="center" prop="tag" />-->
|
||||
<el-table-column label="简介" align="center" prop="introduction" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="作者" align="center" prop="author"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime"/>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:dept:add']"
|
||||
v-hasPermi="['system:articleClassify:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -80,14 +80,14 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:dept:edit']"
|
||||
v-hasPermi="['system:articleClassify:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd(scope.row)"
|
||||
v-hasPermi="['system:dept:add']"
|
||||
v-hasPermi="['system:articleClassify:add']"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.parentId != 0"
|
||||
|
@ -95,7 +95,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:dept:remove']"
|
||||
v-hasPermi="['system:articleClassify:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
Loading…
Reference in New Issue
Block a user