update 更新设备模块

This commit is contained in:
lb 2022-08-08 14:05:39 +08:00
parent f415f30f9e
commit 1e118a6d5d
7 changed files with 132 additions and 110 deletions

View File

@ -43,7 +43,7 @@ export default {
let btns = [] let btns = []
for (const optionStr of this.injectData.head?.options) { for (const optionStr of this.injectData.head?.options) {
// btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr)) // btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr))
btns.push(h('el-button', { props: { type: 'text' }, style: { color: this.colors[optionStr] || '#0b58ff' } }, this.text[optionStr])) btns.push(h('el-button', { props: { type: 'text' }, style: { color: this.colors[optionStr] || '#409EFF' } }, this.text[optionStr]))
} }
return h('span', null, btns) return h('span', null, btns)
} }

View File

@ -59,28 +59,30 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent' import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [ const tableConfigs = [
{ "prop": "id", "name": "" }, { prop: 'id', name: '' },
{ "prop": "equipmentId", "name": "设备ID" }, { prop: 'equipmentId', name: '设备ID' },
{ "prop": "fileId", "name": "文件ID" }, { prop: 'fileId', name: '文件ID' },
{ "prop": "description", "name": "描述" }, { prop: 'description', name: '描述' },
{ "prop": "enabled", "name": "启用状态:0 、停用1、启用" }, { prop: 'enabled', name: '启用状态:0 、停用1、启用' },
{ "prop": "remark", "name": "备注" }, { prop: 'remark', name: '备注' },
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, { prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
{ "prop": "creatorId", "name": "创建人" }, { prop: 'creatorId', name: '创建人' },
{ "prop": "creatorName", "name": "创建人姓名" }, { prop: 'creatorName', name: '创建人姓名' },
{ "prop": "createTime", "name": "添加时间" }, { prop: 'createTime', name: '添加时间' },
{ "prop": "updaterId", "name": "更新人" }, { prop: 'updaterId', name: '更新人' },
{ "prop": "updaterName", "name": "更新人姓名" }, { prop: 'updaterName', name: '更新人姓名' },
{ "prop": "updateTime", "name": "更新时间" }, { prop: 'updateTime', name: '更新时间' },
{ "prop": "version", "name": "版本号" }, { prop: 'version', name: '版本号' },
{ "prop": "typeCode", "name": "文件类型编号" }, { prop: 'typeCode', name: '文件类型编号' },
{ "prop": "fileName", "name": "文件名字" }, { prop: 'fileName', name: '文件名字' },
{ "prop": "fileUrl", "name": "下载地址" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } { prop: 'fileUrl', name: '下载地址' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]
export default { export default {
data() { data() {
return {tableConfigs, return {
tableConfigs,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -94,7 +96,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate,BaseTable AddOrUpdate,
BaseTable
}, },
activated() { activated() {
this.getDataList() this.getDataList()

View File

@ -56,26 +56,28 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent' import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [ const tableConfigs = [
{ "prop": "id", "name": "ID" }, { prop: 'createTime', name: '添加时间' },
{ "prop": "code", "name": "分组编码" }, { prop: 'name', name: '分组名称' },
{ "prop": "name", "name": "分组名字" }, { prop: 'code', name: '分组编码' },
{ "prop": "typeId", "name": "设备类型id" }, { prop: 'remark', name: '备注' },
{ "prop": "description", "name": "描述" }, { prop: 'alarm', name: '报警', buttonContent: '查看报警', subcomponent: TableTextComponent },
{ "prop": "remark", "name": "备注" }, // { "prop": "typeId", "name": "id" },
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, // { "prop": "id", "name": "ID" },
{ "prop": "creatorId", "name": "创建人" }, // { "prop": "description", "name": "" },
{ "prop": "creatorName", "name": "创建人姓名" }, // { "prop": "valid", "name": ":1 0" },
{ "prop": "createTime", "name": "添加时间" }, // { "prop": "creatorId", "name": "" },
{ "prop": "updaterId", "name": "更新人" }, // { "prop": "creatorName", "name": "" },
{ "prop": "updaterName", "name": "更新人姓名" }, // { "prop": "updaterId", "name": "" },
{ "prop": "updateTime", "name": "更新时间" }, // { "prop": "updaterName", "name": "" },
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } // { "prop": "updateTime", "name": "" },
// { prop: 'version', name: '' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]
export default { export default {
data() { data() {
return {tableConfigs, return {
tableConfigs,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -89,7 +91,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate,BaseTable AddOrUpdate,
BaseTable
}, },
activated() { activated() {
this.getDataList() this.getDataList()

View File

@ -1,7 +1,14 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item label="设备分组名称">
<el-label><strong>111</strong></el-label>
</el-form-item>
<el-form-item label="设备分组编码">
<el-label><strong>111</strong></el-label>
</el-form-item>
<!-- <el-form-item>
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input> <el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -10,7 +17,7 @@
<el-button v-if="$hasPermission('monitoring:equipmengroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"> <el-button v-if="$hasPermission('monitoring:equipmengroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
批量删除 批量删除
</el-button> </el-button>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;"> <!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
@ -63,31 +70,34 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent' import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [ const tableConfigs = [
{ "prop": "id", "name": "ID" }, { prop: 'createTime', name: '添加时间' },
{ "prop": "equipmentGroupId", "name": "设备分组ID关联t_equipment_group" }, { prop: 'code', name: '报警编码' },
{ "prop": "code", "name": "编码" }, { prop: 'typeDictValue', name: '报警类型' },
{ "prop": "typeDictValue", "name": "报警类型 字典表关联label_value" }, { prop: 'gradeDictValue', name: '报警级别' },
{ "prop": "gradeDictValue", "name": "报警级别 字典表关联label_value" }, { prop: 'alarmContent', name: '报警内容' }
{ "prop": "alarmContent", "name": "报警内容" }, // { prop: 'typeDictValue', name: ' label_value' },
{ "prop": "description", "name": "描述" }, // { prop: 'gradeDictValue', name: ' label_value' },
{ "prop": "externalCode", "name": "外部编码,用于对照外部系统的编码" }, // { "prop": "id", "name": "ID" },
{ "prop": "enabled", "name": "启用状态:0 、停用1、启用" }, // { "prop": "equipmentGroupId", "name": "IDt_equipment_group" },
{ "prop": "remark", "name": "备注" }, // { "prop": "description", "name": "" },
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, // { "prop": "externalCode", "name": "" },
{ "prop": "creatorId", "name": "创建人" }, // { "prop": "enabled", "name": ":0 1" },
{ "prop": "creatorName", "name": "创建人姓名" }, // { "prop": "remark", "name": "" },
{ "prop": "createTime", "name": "添加时间" }, // { "prop": "valid", "name": ":1 0" },
{ "prop": "updaterId", "name": "更新人" }, // { "prop": "creatorId", "name": "" },
{ "prop": "updaterName", "name": "更新人姓名" }, // { "prop": "creatorName", "name": "" },
{ "prop": "updateTime", "name": "更新时间" }, // { "prop": "updaterId", "name": "" },
{ "prop": "version", "name": "版本号" }, // { "prop": "updaterName", "name": "" },
{ "prop": "alarmNotify", "name": "推送方式 0邮箱 1微信" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } // { "prop": "updateTime", "name": "" },
// { "prop": "version", "name": "" },
// { prop: 'alarmNotify', name: ' 0 1' },
// { prop: 'operations', name: '', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]
export default { export default {
data() { data() {
return {tableConfigs, return {
tableConfigs,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -101,7 +111,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate,BaseTable AddOrUpdate,
BaseTable
}, },
activated() { activated() {
this.getDataList() this.getDataList()

View File

@ -57,29 +57,30 @@ import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent' import TableOperateComponent from '@/components/base-table/components/operationComponent'
import TableTextComponent from '@/components/base-table/components/detailComponent' import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs =[ const tableConfigs = [
{ "prop": "id", "name": "ID" }, { prop: 'createTime', name: '添加时间' },
{ "prop": "code", "name": "编码" }, { prop: 'name', name: '类型名称' },
{ "prop": "name", "name": "名称" }, { prop: 'code', name: '类型编码' },
{ "prop": "parentId", "name": "父类ID" }, { prop: 'remark', name: '备注' },
{ "prop": "parentName", "name": "父类名称" }, // { "prop": "id", "name": "ID" },
{ "prop": "description", "name": "描述" }, // { "prop": "parentId", "name": "ID" },
{ "prop": "enabled", "name": "启用状态:0 、停用1、启用" }, // { "prop": "parentName", "name": "" },
{ "prop": "remark", "name": "备注" }, // { "prop": "description", "name": "" },
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, // { "prop": "enabled", "name": ":0 1" },
{ "prop": "creatorId", "name": "创建人" }, // { "prop": "valid", "name": ":1 0" },
{ "prop": "creatorName", "name": "创建人姓名" }, // { "prop": "creatorId", "name": "" },
{ "prop": "createTime", "name": "添加时间" }, // { "prop": "creatorName", "name": "" },
{ "prop": "updaterId", "name": "更新人" }, // { "prop": "updaterId", "name": "" },
{ "prop": "updaterName", "name": "更新人姓名" }, // { "prop": "updaterName", "name": "" },
{ "prop": "updateTime", "name": "更新时间" }, // { "prop": "updateTime", "name": "" },
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } // { prop: 'version', name: '' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]
export default { export default {
data() { data() {
return {tableConfigs, return {
tableConfigs,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -93,7 +94,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate,BaseTable AddOrUpdate,
BaseTable
}, },
activated() { activated() {
this.getDataList() this.getDataList()

View File

@ -55,24 +55,26 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent' import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [ const tableConfigs = [
{ "prop": "id", "name": "ID" }, { prop: 'createTime', name: '添加时间' },
{ "prop": "equipmentId", "name": "设备ID" }, { prop: 'equipmentId', name: '设备ID' },
{ "prop": "attrName", "name": "属性名称" }, { prop: 'attrName', name: '属性名' },
{ "prop": "attrValue", "name": "属性值" }, { prop: 'attrValue', name: '属性值' },
{ "prop": "remark", "name": "备注" }, // { "prop": "id", "name": "ID" },
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" }, // { "prop": "remark", "name": "" },
{ "prop": "creatorId", "name": "创建人" }, // { "prop": "valid", "name": ":1 0" },
{ "prop": "creatorName", "name": "创建人姓名" }, // { "prop": "creatorId", "name": "" },
{ "prop": "createTime", "name": "添加时间" }, // { "prop": "creatorName", "name": "" },
{ "prop": "updaterId", "name": "更新人" }, // { "prop": "updaterId", "name": "" },
{ "prop": "updaterName", "name": "更新人姓名" }, // { "prop": "updaterName", "name": "" },
{ "prop": "updateTime", "name": "更新时间" }, // { "prop": "updateTime", "name": "" },
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } // { prop: 'version', name: '' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]
export default { export default {
data() { data() {
return {tableConfigs, return {
tableConfigs,
dataForm: { dataForm: {
key: '' key: ''
}, },
@ -86,7 +88,8 @@ export default {
} }
}, },
components: { components: {
AddOrUpdate,BaseTable AddOrUpdate,
BaseTable
}, },
activated() { activated() {
this.getDataList() this.getDataList()

View File

@ -57,19 +57,19 @@ import TableOperateComponent from '@/components/base-table/components/operationC
import TableTextComponent from '@/components/base-table/components/detailComponent' import TableTextComponent from '@/components/base-table/components/detailComponent'
const tableConfigs = [ const tableConfigs = [
{ prop: 'id', name: 'ID' }, { prop: 'createTime', name: '添加时间' },
{ prop: 'workshopSectionId', name: '工段ID' }, { prop: 'workshopSectionId', name: '工段ID' },
{ prop: 'equipmentId', name: '设备ID' }, { prop: 'equipmentId', name: '设备ID' },
{ prop: 'sort', name: '排序' }, { prop: 'sort', name: '排序' },
{ prop: 'remark', name: '备注' }, { prop: 'remark', name: '备注' },
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' }, // { prop: 'id', name: 'ID' },
{ prop: 'creatorId', name: '创建人' }, // { prop: 'valid', name: ':1 0' },
{ prop: 'creatorName', name: '创建人姓名' }, // { prop: 'creatorId', name: '' },
{ prop: 'createTime', name: '创建时间' }, // { prop: 'creatorName', name: '' },
{ prop: 'updaterId', name: '更新人' }, // { prop: 'updaterId', name: '' },
{ prop: 'updaterName', name: '更新人姓名' }, // { prop: 'updaterName', name: '' },
{ prop: 'updateTime', name: '更新时间' }, // { prop: 'updateTime', name: '' },
{ prop: 'version', name: '版本号' }, // { prop: 'version', name: '' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
] ]