Commit ab5377b9 authored by 赵啸非's avatar 赵啸非

修改设备新增

parent facdeac3
......@@ -144,6 +144,19 @@ export default {
return content ? <el-tag type={'info'} size='mini'>{content}</el-tag> : val
},
formatterYES(row, column, val) {
const content = formatter(this.tableData, column, val);
if (content) {
if (val == '0') {
return <el-tag type={'danger'} size='mini'>{content}</el-tag>
} else if (val == '1') {
return <el-tag type={'success'} size='mini'>{content}</el-tag>
}
} else {
return val
}
},
formatterDictLink(row, column, val) {
const content = formatter(this.tableData, column, val);
......
......@@ -143,6 +143,7 @@ export default {
methods: {
// 根据url的query参数判断是否展示查询条件
isShowSearch(query) {
return true;
if (!this.config.showSearch) {
return false
}
......
......@@ -76,7 +76,13 @@ export default {
{
name: 'deviceNum',
type: 'text',
label: '设备编号',
label: '设备编码',
},
{
name: 'deviceType',
type: 'select',
label: '设备类型',
},
{
name: 'deviceOnlineStatus',
......@@ -96,7 +102,7 @@ export default {
{
label: "在线状态 ",
prop: "deviceOnlineStatus",
formatter: this.formatter,
formatter: this.formatterYES,
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment