forked from mt-fe-group/mt-yd-ui
Compare commits
14 Commits
1e78bbf6ee
...
a438bcad2f
Author | SHA1 | Date | |
---|---|---|---|
a438bcad2f | |||
5b37798a20 | |||
70303f3f06 | |||
666059af6e | |||
90a93e4f8b | |||
803248ca22 | |||
cfa1cca44a | |||
2df5897f3d | |||
3668f92731 | |||
1b17b760ae | |||
6e06159250 | |||
3fe0d26d8f | |||
c0900dba9c | |||
974079296b |
@ -4,7 +4,7 @@
|
||||
"bracketSameLine": true,
|
||||
"jsxBracketSameLine": true,
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"printWidth": 80,
|
||||
"printWidth": 180,
|
||||
"quoteProps": "consistent",
|
||||
"trailingComma": "none",
|
||||
"semi": false,
|
||||
|
7
TODO.md
Normal file
7
TODO.md
Normal file
@ -0,0 +1,7 @@
|
||||
# TODO List
|
||||
|
||||
1. 按钮加权限
|
||||
2. 国际化
|
||||
3. 表格高度 √
|
||||
4. 表格时间格式修改 √
|
||||
5. icon列表 √
|
@ -94,7 +94,7 @@ import { pick } from 'lodash/object'
|
||||
// 标题 for i18n
|
||||
const title = {
|
||||
detail: '详情',
|
||||
add: '新增',
|
||||
add: i18n.t('add'),
|
||||
edit: '编辑'
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ const btnName = {
|
||||
save: '保存',
|
||||
update: '更新',
|
||||
reset: '重置',
|
||||
cancel: '取消'
|
||||
cancel: i18n.t('cancel')
|
||||
// add more...
|
||||
}
|
||||
|
||||
@ -140,10 +140,10 @@ export default {
|
||||
if (!name) return null
|
||||
// for i18n
|
||||
const defaultNames = {
|
||||
name: '名称',
|
||||
code: '编码',
|
||||
remark: '备注',
|
||||
description: '描述',
|
||||
name: i18n.t('name'),
|
||||
code: i18n.t('code'),
|
||||
remark: i18n.t('remark'),
|
||||
description: i18n.t('desc'),
|
||||
specifications: '规格'
|
||||
// add more...
|
||||
}
|
||||
@ -164,10 +164,10 @@ export default {
|
||||
btnName,
|
||||
btnType,
|
||||
defaultNames: {
|
||||
name: '名称',
|
||||
code: '编码',
|
||||
remark: '备注',
|
||||
description: '描述',
|
||||
name: i18n.t('name'),
|
||||
code: i18n.t('code'),
|
||||
remark: i18n.t('remark'),
|
||||
description: i18n.t('desc'),
|
||||
specifications: '规格'
|
||||
// add more...
|
||||
},
|
||||
@ -320,11 +320,11 @@ export default {
|
||||
: this.defaultPlaceholders[opt.name]
|
||||
? this.defaultPlaceholders[opt.name]
|
||||
: opt.label
|
||||
? (opt.type === 'select' ? '请选择' : '请输入') + opt.label
|
||||
? (opt.type === 'select' ? i18n.t('choose') : '请输入') + opt.label
|
||||
: null
|
||||
|
||||
// : opt.type === 'select'
|
||||
// ? '请选择'
|
||||
// ? i18n.t('choose')
|
||||
// : '请输入'
|
||||
}
|
||||
},
|
||||
|
@ -7,7 +7,7 @@
|
||||
:is="require('../../base-table/index.vue').default"
|
||||
:table-head-configs="filterTableConfigs()"
|
||||
:data="dataList"
|
||||
:max-height="500"
|
||||
:max-height="calcMaxHeight(8)"
|
||||
@operate-event="handleOperations"
|
||||
/>
|
||||
<el-pagination
|
||||
@ -48,6 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import { pick } from 'lodash/object'
|
||||
|
||||
@ -200,9 +201,9 @@ export default {
|
||||
deleteHandle(id) {
|
||||
var ids = id ? [id] : []
|
||||
|
||||
this.$confirm(`确定对id=${ids.join(',')}进行${id ? '删除' : '批量删除'}操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对id=${ids.join(',')}进行${id ? i18n.t('delete') : i18n.t('deleteBatch')}操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
@ -281,4 +282,4 @@ export default {
|
||||
.attr-form >>> .el-form .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -105,11 +105,11 @@
|
||||
<script>
|
||||
import AttrForm from '../AttrForm'
|
||||
import { pick } from 'lodash/object'
|
||||
|
||||
import i18n from '@/i18n'
|
||||
// 标题 for i18n
|
||||
const title = {
|
||||
detail: '详情',
|
||||
add: '新增',
|
||||
add: i18n.t('add'),
|
||||
edit: '编辑'
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ const btnName = {
|
||||
save: '保存',
|
||||
update: '更新',
|
||||
reset: '重置',
|
||||
cancel: '取消'
|
||||
cancel: i18n.t('cancel')
|
||||
// add more...
|
||||
}
|
||||
|
||||
@ -155,10 +155,10 @@ export default {
|
||||
if (!name) return null
|
||||
// for i18n
|
||||
const defaultNames = {
|
||||
name: '名称',
|
||||
code: '编码',
|
||||
remark: '备注',
|
||||
description: '描述',
|
||||
name: i18n.t('name'),
|
||||
code: i18n.t('code'),
|
||||
remark: i18n.t('remark'),
|
||||
description: i18n.t('desc'),
|
||||
specifications: '规格'
|
||||
// add more...
|
||||
}
|
||||
@ -179,10 +179,10 @@ export default {
|
||||
btnName,
|
||||
btnType,
|
||||
defaultNames: {
|
||||
name: '名称',
|
||||
code: '编码',
|
||||
remark: '备注',
|
||||
description: '描述',
|
||||
name: i18n.t('name'),
|
||||
code: i18n.t('code'),
|
||||
remark: i18n.t('remark'),
|
||||
description: i18n.t('desc'),
|
||||
specifications: '规格'
|
||||
// add more...
|
||||
},
|
||||
@ -335,11 +335,11 @@ export default {
|
||||
: this.defaultPlaceholders[opt.name]
|
||||
? this.defaultPlaceholders[opt.name]
|
||||
: opt.label
|
||||
? (opt.type === 'select' ? '请选择' : '请输入') + opt.label
|
||||
? (opt.type === 'select' ? i18n.t('choose') : '请输入') + opt.label
|
||||
: null
|
||||
|
||||
// : opt.type === 'select'
|
||||
// ? '请选择'
|
||||
// ? i18n.t('choose')
|
||||
// : '请输入'
|
||||
}
|
||||
},
|
||||
|
91
src/i18n/en.js
Normal file
91
src/i18n/en.js
Normal file
@ -0,0 +1,91 @@
|
||||
const t = {}
|
||||
|
||||
t.loading = 'Loading...'
|
||||
t.createTime = 'Create Time'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = 'Monitoring System'
|
||||
t.brand.mini = 'PMS'
|
||||
|
||||
t.add = 'Add'
|
||||
t.delete = 'Delete'
|
||||
t.deleteBatch = 'Delete Batch'
|
||||
t.update = 'Update'
|
||||
t.query = 'Search'
|
||||
t.export = 'Export'
|
||||
t.handle = 'Operations'
|
||||
t.confirm = 'Confirm'
|
||||
t.cancel = 'Cancel'
|
||||
t.clear = 'Clear'
|
||||
t.logout = 'Logout'
|
||||
t.manage = 'Handle'
|
||||
t.createDate = 'Create Date'
|
||||
t.keyword = 'Keyword(s): '
|
||||
t.choose = 'Please Choose '
|
||||
t.remark = 'Remark'
|
||||
t.delMark = 'Delete Mark '
|
||||
t.isvalid = 'is valid'
|
||||
t.available = 'available'
|
||||
t.unavailable = 'unavailable'
|
||||
t.alert = 'alert'
|
||||
t.creator = 'Creator'
|
||||
t.creatorName = 'Creator\'s name'
|
||||
t.updator = 'Updator'
|
||||
t.updatorName = 'Updator\'s name'
|
||||
t.updateTime = 'Update Time'
|
||||
t.version = 'Version'
|
||||
t.search = 'Search'
|
||||
t.countPerPage = '每页数' // ?
|
||||
t.currentPage = '当前页' // ?
|
||||
t.fetchList = '获取数据列表' // ?
|
||||
t.multi = '多选' // ?
|
||||
t.do = '进行' // ?
|
||||
t.submit = '表单提交' // ?
|
||||
t.desc = 'Description'
|
||||
t.disable = 'Disable'
|
||||
t.equipment = 'Equipment'
|
||||
t.enabled = 'Enabled'
|
||||
t.cannotempty = 'can\'t be empty'
|
||||
t.parameter = 'Parameters'
|
||||
t.enable = 'Enable'
|
||||
t.index = 'Index'
|
||||
t.relation = '关联'
|
||||
t.fetchInfo = 'Fetch Info'
|
||||
t.name = 'Name'
|
||||
t.code = 'Code'
|
||||
t.attrName = 'Attribute name'
|
||||
t.attrValue = 'Attribute value'
|
||||
t.unit = 'Unit'
|
||||
t.table = 'Table'
|
||||
t.table2 = 'Table'
|
||||
t.downloadurl = 'Download Url'
|
||||
t.recordTime = 'Record Time'
|
||||
t.notCollect = 'No'
|
||||
t.collect = 'Yes'
|
||||
t.required = 'Required'
|
||||
t.paramUrl = 'Parameter url'
|
||||
t.enname = 'English Name'
|
||||
t.collectOrNot = 'Collect or not'
|
||||
t.min = 'Min Value'
|
||||
t.max = 'Max Value'
|
||||
t.status = 'Status',
|
||||
t.normal = 'Normal'
|
||||
t.addr = 'Address'
|
||||
t.planStop = 'Plan to stop'
|
||||
t.startTime = 'Start Time'
|
||||
t.endTime = 'End Time'
|
||||
t.today = 'Today'
|
||||
|
||||
|
||||
|
||||
t.login = {}
|
||||
t.login.title = 'Login'
|
||||
t.login.username = 'Username'
|
||||
t.login.password = 'Password'
|
||||
t.login.captcha = 'Validation Code'
|
||||
t.login.demo = 'Demo'
|
||||
t.login.copyright = 'CNBM'
|
||||
|
||||
|
||||
|
||||
export default t
|
@ -2,8 +2,9 @@ import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import Cookies from 'js-cookie'
|
||||
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||
import enLocale from 'element-ui/lib/locale/lang/en'
|
||||
import zhCN from './zh-CN'
|
||||
|
||||
import en from './en'
|
||||
Vue.use(VueI18n)
|
||||
|
||||
export const messages = {
|
||||
@ -11,11 +12,33 @@ export const messages = {
|
||||
'_lang': '简体中文',
|
||||
...zhCN,
|
||||
...zhCNLocale
|
||||
},
|
||||
'en': {
|
||||
'_lang': 'English',
|
||||
...en,
|
||||
...enLocale
|
||||
}
|
||||
}
|
||||
|
||||
export function getLanguage() {
|
||||
const chooseLanguage = Cookies.get('language')
|
||||
if (chooseLanguage) return chooseLanguage
|
||||
|
||||
// if has not choose language
|
||||
const language = (navigator.language || navigator.browserLanguage).toLowerCase()
|
||||
const locales = Object.keys(messages)
|
||||
for (const locale of locales) {
|
||||
if (language.indexOf(locale) > -1) {
|
||||
Cookies.set('language', locale)
|
||||
return locale
|
||||
}
|
||||
}
|
||||
Cookies.set('language', 'zh-CN')
|
||||
return 'zh-CN'
|
||||
}
|
||||
|
||||
export default new VueI18n({
|
||||
// locale: Cookies.get('language') || 'zh-CN',
|
||||
locale: 'zh-CN', // 先默认中文
|
||||
locale: getLanguage(), // 先默认中文
|
||||
messages
|
||||
})
|
||||
|
@ -1,26 +1,187 @@
|
||||
const t = {}
|
||||
|
||||
t.loading = '加载中...'
|
||||
t.createTime = '添加时间'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = '生产监控系统'
|
||||
t.brand.mini = '监控'
|
||||
|
||||
t.add = '新增'
|
||||
t.delete = '删除'
|
||||
t.deleteBatch = '删除'
|
||||
t.update = '修改'
|
||||
t.query = '查询'
|
||||
t.export = '导出'
|
||||
t.handle = '操作'
|
||||
t.confirm = '确定'
|
||||
t.cancel = '取消'
|
||||
t.clear = '清除'
|
||||
t.logout = '退出'
|
||||
t.manage = '处理'
|
||||
t.createDate = '创建时间'
|
||||
t.keyword = '关键字:'
|
||||
t.choose = '请选择'
|
||||
// 1 代表 '' 号的替换完成
|
||||
// 2 代表 "" 号的替换完成
|
||||
// 3 代表不带引号,或 {{ }} 的替换,这三种替换需按顺序执行
|
||||
// ? 代表需要单独review
|
||||
// 基本上完成了template模板里的替换工作
|
||||
|
||||
// 对比 v2, v3 的结果,补充此文件和 en.js 文件
|
||||
// 然后替换vue文件的内容
|
||||
|
||||
t.add = '新增' // 1
|
||||
t.delete = '删除' // 1
|
||||
t.deleteBatch = '批量删除' // 1
|
||||
t.update = '修改' // 1
|
||||
t.query = '查询' // 1
|
||||
t.export = '导出' // 1
|
||||
t.handle = '操作' // 1
|
||||
t.confirm = '确定' // 1
|
||||
t.cancel = '取消' // 1
|
||||
t.clear = '清除' // 1
|
||||
t.logout = '退出' // 1
|
||||
t.manage = '处理' // 1
|
||||
t.createDate = '创建时间' // 1
|
||||
t.keyword = '关键字:' // 1
|
||||
t.choose = '请选择' // 1
|
||||
t.remark = '备注' // 1
|
||||
t.delMark = '删除标志' // 0
|
||||
t.isvalid = '是否有效' // 0
|
||||
t.available = '可用' // 0
|
||||
t.unavailable = '不可用' // 0
|
||||
t.alert = '弹窗' // 0
|
||||
t.creator = '创建人' // 1
|
||||
t.creatorName = '创建人姓名' // 1
|
||||
t.updator = '更新人' // 1
|
||||
t.updatorName = '更新人姓名' // 1
|
||||
t.updateTime = '更新时间'
|
||||
t.version = '版本号' // 1
|
||||
t.search = '查询' // 1
|
||||
t.countPerPage = '每页数' // ?
|
||||
t.currentPage = '当前页' // ?
|
||||
t.fetchList = '获取数据列表' // ?
|
||||
t.multi = '多选' // ?
|
||||
t.do = '进行' // ?
|
||||
t.submit = '表单提交' // ?
|
||||
t.desc = '描述' // 1
|
||||
t.disable = '停用' // 1
|
||||
t.equipment = '设备' // 1
|
||||
t.enabled = '启用状态' // ?
|
||||
t.cannotempty = '不能为空' // ?
|
||||
t.parameter = '参数名' // 1
|
||||
t.enable = '启用' // 1
|
||||
t.index = '序号' // 1
|
||||
t.relation = '关联' // ?
|
||||
t.fetchInfo = '获取信息' // ?
|
||||
t.name = '名称' // 1
|
||||
t.code = '编码' // 1
|
||||
t.attrName = '属性名称' // 1
|
||||
t.attrValue = '属性值' // 1
|
||||
t.unit = '单位' // 1
|
||||
t.table = '表' // 1
|
||||
t.table2 = '表格' // 1
|
||||
t.downloadurl = '下载地址' // 1
|
||||
t.recordTime = '记录时间' // 1
|
||||
t.notCollect = '不采集' // 1
|
||||
t.collect = '采集' // 1
|
||||
t.required = '必填' // 1
|
||||
t.paramUrl = '参数地址' // 1
|
||||
t.enname = '英文名称' // 1
|
||||
t.collectOrNot = '是否采集' // 1
|
||||
t.min = '最小值' // 1
|
||||
t.max = '最大值' // 1
|
||||
t.status = '状态' // 1
|
||||
t.normal = '正常' // ?
|
||||
t.addr = '地址' // 1
|
||||
t.planStop = '计划停机' // ?
|
||||
t.startTime = '开始时间' // 1
|
||||
t.endTime = '结束时间' // 1
|
||||
t.to = '至' // 1
|
||||
t.today = '今天' // 1
|
||||
|
||||
t.graph = '图形'
|
||||
t.category = '分类'
|
||||
t.categoryName = '分类名称'
|
||||
t.categoryCode = '分类编码'
|
||||
t.rate = '比例'
|
||||
t.link = '链接地址'
|
||||
t.refresh = '刷新'
|
||||
t.abbr = '缩写'
|
||||
t.detail = '详情'
|
||||
t.edit = '编辑'
|
||||
t.source = '来源'
|
||||
t.auto = '自动'
|
||||
t.manual = '手动'
|
||||
t.loaddone = '加载完成'
|
||||
t.produceTime = '生产日期'
|
||||
t.enterTime = '进厂日期'
|
||||
t.manufacturer = '制造商'
|
||||
|
||||
t.factory = {}
|
||||
t.factory.title = '工厂'
|
||||
t.factory.name = '工厂名称'
|
||||
t.factory.code = '工厂编码'
|
||||
|
||||
t.prod = {}
|
||||
t.prod.name = '产品名称'
|
||||
t.prod.code = '产品编码'
|
||||
|
||||
t.alarm = {}
|
||||
t.alarm.info = '报警信息'
|
||||
t.alarm.eq = '报警设备'
|
||||
t.alarm.type = '报警类型'
|
||||
t.alarm.code = '报警编码'
|
||||
t.alarm.level = '报警级别'
|
||||
t.alarm.content = '报警内容'
|
||||
t.alarm.source = '报警来源'
|
||||
t.alarm.det = '报警详细内容'
|
||||
|
||||
t.report = {}
|
||||
t.report.name = '报表名称'
|
||||
t.report.det = '报表内容'
|
||||
|
||||
t.inspect = {}
|
||||
t.inspect.type = '检测类型'
|
||||
t.inspect.det = '检测内容'
|
||||
t.inspect.people = '检测人员'
|
||||
t.inspect.time = '检测时间'
|
||||
t.inspect.typetotal = '检测类型总数'
|
||||
t.inspect.typename = '检测类型名称'
|
||||
t.inspect.typecode = '检测类型编码'
|
||||
t.inspect.ioTotal = '上下片及检测总数统计'
|
||||
t.inspect.plTotal = '各产线检测类型统计'
|
||||
|
||||
|
||||
t.realtime = {}
|
||||
t.realtime.eq = '设备生产实时数据'
|
||||
t.realtime.pl = '产线生产实时数据'
|
||||
t.realtime.inspect = '质量检查实时数据'
|
||||
t.realtime.in = '进数据'
|
||||
t.realtime.out = '出数据'
|
||||
t.realtime.rate = '报废比例'
|
||||
|
||||
|
||||
t.ws = {}
|
||||
t.ws.title = '工段'
|
||||
t.ws.name = '工段名称'
|
||||
t.ws.code = '工段编码'
|
||||
t.ws.binded = '已绑定的设备'
|
||||
t.ws.unbind = '选择一个设备进行绑定'
|
||||
t.ws.sort = '排序'
|
||||
t.ws.setorder = '请输入工段中设备的顺序'
|
||||
t.ws.bind = '绑定'
|
||||
|
||||
t.file = {}
|
||||
t.file.title = '文件'
|
||||
t.file.name = '文件名称'
|
||||
t.file.code = '文件编号'
|
||||
t.file.typeName = '文件类型名称'
|
||||
t.file.typeCode = '文件类型编号'
|
||||
|
||||
t.eq = {}
|
||||
t.eq.title = '设备'
|
||||
t.eq.name = '设备名称'
|
||||
t.eq.code = '设备编码'
|
||||
t.eq.type = '设备类型'
|
||||
t.eq.grade = '设备规格'
|
||||
t.eq.group = '设备分组'
|
||||
t.eq.groupname = '分组名称'
|
||||
t.eq.groupcode = '分组编码'
|
||||
t.eq.excode = '设备外部代码'
|
||||
t.eq.input = '上片数据设备'
|
||||
t.eq.output = '下片数据设备'
|
||||
|
||||
t.pl = {}
|
||||
t.pl.title = '产线'
|
||||
t.pl.name = '产线名称'
|
||||
t.pl.belong = '所属产线'
|
||||
|
||||
t.prompt = {}
|
||||
t.prompt.title = '提示'
|
||||
@ -224,6 +385,8 @@ t.menu.resourceMethod = '请求方式'
|
||||
t.menu.resourceAddItem = '添加一项'
|
||||
|
||||
t.params = {}
|
||||
t.params.name = '参数名称'
|
||||
t.params.code = '参数编码'
|
||||
t.params.paramCode = '编码'
|
||||
t.params.paramValue = '值'
|
||||
t.params.remark = '备注'
|
||||
|
@ -1,7 +1,12 @@
|
||||
/** filters */
|
||||
import moment from 'moment'
|
||||
|
||||
export const dictFilter = dictTypeId => {
|
||||
return val => {
|
||||
return JSON.parse(localStorage.getItem('dictList'))[dictTypeId].find(item => item.dictValue === val)?.dictLabel || '-'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const timeFilter = (val) => {
|
||||
return moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import store from '@/store'
|
||||
* 权限
|
||||
* @param {*} key
|
||||
*/
|
||||
export function hasPermission (key) {
|
||||
export function hasPermission(key) {
|
||||
return window.SITE_CONFIG['permissions'].indexOf(key) !== -1 || false
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ export function hasPermission (key) {
|
||||
* 获取字典数据列表
|
||||
* @param dictType 字典类型
|
||||
*/
|
||||
export function getDictDataList (dictType) {
|
||||
export function getDictDataList(dictType) {
|
||||
const type = window.SITE_CONFIG['dictList'].find((element) => (element.dictType === dictType))
|
||||
if (type) {
|
||||
return type.dataList
|
||||
@ -27,7 +27,7 @@ export function getDictDataList (dictType) {
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
*/
|
||||
export function getDictLabel (dictType, dictValue) {
|
||||
export function getDictLabel(dictType, dictValue) {
|
||||
const type = window.SITE_CONFIG['dictList'].find((element) => (element.dictType === dictType))
|
||||
if (type) {
|
||||
const val = type.dataList.find((element) => (element.dictValue === dictValue + ''))
|
||||
@ -44,7 +44,7 @@ export function getDictLabel (dictType, dictValue) {
|
||||
/**
|
||||
* 清除登录信息
|
||||
*/
|
||||
export function clearLoginInfo () {
|
||||
export function clearLoginInfo() {
|
||||
store.commit('resetStore')
|
||||
Cookies.remove('token')
|
||||
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false
|
||||
@ -54,7 +54,7 @@ export function clearLoginInfo () {
|
||||
/**
|
||||
* 获取uuid
|
||||
*/
|
||||
export function getUUID () {
|
||||
export function getUUID() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
||||
return (c === 'x' ? (Math.random() * 16 | 0) : ('r&0x3' | '0x8')).toString(16)
|
||||
})
|
||||
@ -63,7 +63,7 @@ export function getUUID () {
|
||||
/**
|
||||
* 获取svg图标(id)列表
|
||||
*/
|
||||
export function getIconList () {
|
||||
export function getIconList() {
|
||||
var res = []
|
||||
var list = document.querySelectorAll('svg symbol')
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
@ -79,7 +79,7 @@ export function getIconList () {
|
||||
* @param {*} id
|
||||
* @param {*} pid
|
||||
*/
|
||||
export function treeDataTranslate (data, id = 'id', pid = 'pid') {
|
||||
export function treeDataTranslate(data, id = 'id', pid = 'pid') {
|
||||
var res = []
|
||||
var temp = {}
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
@ -98,3 +98,19 @@ export function treeDataTranslate (data, id = 'id', pid = 'pid') {
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/** 计算表格的最大高 */
|
||||
export function calcMaxHeight(num) {
|
||||
const FIXED_HEIGHT = 220
|
||||
let clientHeight = 0
|
||||
const bodyHeight = document.body.clientHeight || null
|
||||
const documentHeight = document.documentElement.clientHeight || null
|
||||
if (bodyHeight && documentHeight) {
|
||||
clientHeight = Math.max(bodyHeight, documentHeight)
|
||||
} else {
|
||||
clientHeight = documentHeight ? documentHeight : bodyHeight
|
||||
}
|
||||
|
||||
const finalHeight = clientHeight - num - FIXED_HEIGHT
|
||||
return finalHeight > 0 ? finalHeight : -finalHeight
|
||||
}
|
@ -1,18 +1,38 @@
|
||||
<template>
|
||||
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
||||
<nav
|
||||
class="aui-navbar"
|
||||
:class="`aui-navbar--${$store.state.navbarLayoutType}`"
|
||||
>
|
||||
<div class="aui-navbar__header">
|
||||
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{
|
||||
$t('brand.lg')
|
||||
}}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{
|
||||
$t('brand.mini')
|
||||
}}</a>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="aui-navbar__body">
|
||||
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
||||
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"><use xlink:href="#icon-outdent"></use></svg>
|
||||
<el-menu-item
|
||||
index="1"
|
||||
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
|
||||
>
|
||||
<svg
|
||||
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use xlink:href="#icon-outdent"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" @click="refresh()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg>
|
||||
<svg
|
||||
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use xlink:href="#icon-sync"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
<el-menu class="aui-navbar__menu" mode="horizontal">
|
||||
@ -26,8 +46,32 @@
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg>
|
||||
</a>
|
||||
</el-menu-item> -->
|
||||
<el-menu-item index="3">
|
||||
<el-dropdown
|
||||
placement="bottom"
|
||||
:show-timeout="0"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
<use xlink:href="#icon-earth"></use>
|
||||
</svg>
|
||||
<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN"
|
||||
>中文</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item :disabled="getLang() === 'en'" command="toEN"
|
||||
>En</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="4" @click="fullscreenHandle()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg>
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
<use xlink:href="#icon-fullscreen"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5" class="aui-navbar__avatar">
|
||||
<el-dropdown placement="bottom" :show-timeout="0">
|
||||
@ -37,18 +81,26 @@
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">{{
|
||||
$t('updatePassword.title')
|
||||
}}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">{{
|
||||
$t('logout')
|
||||
}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
<!-- 弹窗, 修改密码 -->
|
||||
<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password>
|
||||
<update-password
|
||||
v-if="updatePasswordVisible"
|
||||
ref="updatePassword"
|
||||
></update-password>
|
||||
</nav>
|
||||
</template>
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import screenfull from 'screenfull'
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
@ -64,6 +116,24 @@ export default {
|
||||
UpdatePassword
|
||||
},
|
||||
methods: {
|
||||
// 获取当前语言环境
|
||||
getLang() {
|
||||
return Cookies.get('language')
|
||||
},
|
||||
// 切换语言环境
|
||||
handleCommand(command) {
|
||||
// 切换语言选项时,可能需要手动刷新页面
|
||||
switch (command) {
|
||||
case 'toCN':
|
||||
this.$root.$i18n.locale = 'zh-CN'
|
||||
break
|
||||
case 'toEN':
|
||||
console.log('root', this.$root.$i18n.locale)
|
||||
this.$root.$i18n.locale = 'en'
|
||||
location.reload()
|
||||
break
|
||||
}
|
||||
},
|
||||
// 全屏
|
||||
fullscreenHandle() {
|
||||
if (!screenfull.enabled) {
|
||||
@ -84,11 +154,15 @@ export default {
|
||||
},
|
||||
// 退出
|
||||
logoutHandle() {
|
||||
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
})
|
||||
this.$confirm(
|
||||
this.$t('prompt.info', { handle: this.$t('logout') }),
|
||||
this.$t('prompt.title'),
|
||||
{
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.post(this.$http.adornUrl('/logout'))
|
||||
|
@ -46,7 +46,7 @@ export default {
|
||||
}
|
||||
list.push(newRouteItem)
|
||||
} else {
|
||||
console.log(menu.name, '是应该被隐藏的路由')
|
||||
// console.log(menu.name, '是应该被隐藏的路由')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ export default {
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put('/sys/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
this.$http.put(this.$http.adornUrl('/sys/schedule/pause'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put('/sys/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
this.$http.put(this.$http.adornUrl('/sys/schedule/resume'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
@ -169,7 +169,7 @@ export default {
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put('/sys/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
this.$http.put(this.$http.adornUrl('/sys/schedule/run'), id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
|
@ -2,16 +2,16 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="设备名称/设备编码" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipment:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="exportHandle()">导出</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('search') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,33 +27,51 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/i18n'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './equipment-add-or-update'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
import moment from 'moment'
|
||||
import CKEditor from 'ckeditor4-vue'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
|
||||
const tableConfigs = [
|
||||
{
|
||||
type: 'index',
|
||||
name: '序号'
|
||||
name: i18n.t('index')
|
||||
// more: {
|
||||
// index: function(index) {
|
||||
// return (index + 1) * 2
|
||||
// }
|
||||
// }
|
||||
},
|
||||
{ prop: 'createTime', name: '添加时间', filter: val => moment(val).format('YYYY-MM-DD HH:mm:ss') },
|
||||
{
|
||||
prop: 'createTime',
|
||||
name: i18n.t('createTime'),
|
||||
filter: timeFilter
|
||||
},
|
||||
{ prop: 'name', name: '设备名称' },
|
||||
{ prop: 'code', name: '设备编码' },
|
||||
{ prop: 'equipmentTypeName', name: '设备类型' },
|
||||
{ prop: 'groupName', name: '设备分组' },
|
||||
{ prop: 'enName', name: '英文名称' },
|
||||
{ prop: 'enName', name: i18n.t('enname') },
|
||||
{ prop: 'abbr', name: '缩写' },
|
||||
{ prop: 'details', name: '详情', subcomponent: TableTextComponent, actionName: 'view-detail' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{
|
||||
prop: 'details',
|
||||
name: '详情',
|
||||
subcomponent: TableTextComponent,
|
||||
actionName: 'view-detail'
|
||||
},
|
||||
{
|
||||
prop: 'operations',
|
||||
name: i18n.t('handle'),
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
subcomponent: TableOperateComponent,
|
||||
options: ['edit', 'delete']
|
||||
}
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -62,10 +80,22 @@ const addOrUpdateConfigs = {
|
||||
fields: [
|
||||
{ name: 'name', label: '设备名称', required: true },
|
||||
{ name: 'code', label: '设备编码' },
|
||||
{ name: 'enName', label: '英文名称' },
|
||||
{ name: 'enName', label: i18n.t('enname') },
|
||||
{ name: 'abbr', label: '缩写' },
|
||||
{ name: 'equipmentTypeId', label: '设备类型', required: true, type: 'select', options: [] },
|
||||
{ name: 'groupId', label: '设备分组', required: true, type: 'select', options: [] },
|
||||
{
|
||||
name: 'equipmentTypeId',
|
||||
label: '设备类型',
|
||||
required: true,
|
||||
type: 'select',
|
||||
options: []
|
||||
},
|
||||
{
|
||||
name: 'groupId',
|
||||
label: '设备分组',
|
||||
required: true,
|
||||
type: 'select',
|
||||
options: []
|
||||
},
|
||||
{
|
||||
name: 'productionTime',
|
||||
label: '生产日期',
|
||||
@ -92,8 +122,31 @@ const addOrUpdateConfigs = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'tvalue', label: '设备TT值', required: true, rules: [{ type: 'number', message: '请输入正确的浮点值', trigger: 'blur', transform: val => Number(val) }] },
|
||||
{ name: 'processingTime', label: '单件产品加工时间(秒)', rules: [{ type: 'number', message: '请输入正确的数值', trigger: 'blur', transform: val => Number(val) }] },
|
||||
{
|
||||
name: 'tvalue',
|
||||
label: '设备TT值',
|
||||
required: true,
|
||||
rules: [
|
||||
{
|
||||
type: 'number',
|
||||
message: '请输入正确的浮点值',
|
||||
trigger: 'blur',
|
||||
transform: val => Number(val)
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'processingTime',
|
||||
label: '单件产品加工时间(秒)',
|
||||
rules: [
|
||||
{
|
||||
type: 'number',
|
||||
message: '请输入正确的数值',
|
||||
trigger: 'blur',
|
||||
transform: val => Number(val)
|
||||
}
|
||||
]
|
||||
},
|
||||
{ name: 'manufacturer', label: '制造商' },
|
||||
{ name: 'spec', label: '设备规格' },
|
||||
{
|
||||
@ -109,9 +162,6 @@ const addOrUpdateConfigs = {
|
||||
},
|
||||
{ name: 'remark', label: '备注 ' }
|
||||
],
|
||||
// TODO: 富文本 √
|
||||
// TODO: 设备资料上传 √
|
||||
// TODO: 设备图片上传 √
|
||||
extraComponents: [
|
||||
{
|
||||
name: 'description',
|
||||
@ -159,23 +209,41 @@ const addOrUpdateConfigs = {
|
||||
url: '/monitoring/equipmentAttr',
|
||||
relatedField: 'equipmentId',
|
||||
tableConfigs: [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ prop: 'createTime', name: '创建时间' },
|
||||
{ prop: 'attrName', name: '属性名称', formField: true },
|
||||
{ prop: 'attrValue', name: '属性值', formField: true },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'attrName', name: i18n.t('attrName'), formField: true },
|
||||
{ prop: 'attrValue', name: i18n.t('attrValue'), formField: true },
|
||||
{
|
||||
prop: 'operations',
|
||||
name: i18n.t('handle'),
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
subcomponent: TableOperateComponent,
|
||||
options: ['edit', 'delete']
|
||||
}
|
||||
]
|
||||
},
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipment', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipment', permission: '', showOnEdit: true }
|
||||
{
|
||||
name: 'save',
|
||||
url: '/monitoring/equipment',
|
||||
permission: 'monitoring:equipment:save',
|
||||
showOnEdit: false
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
url: '/monitoring/equipment',
|
||||
permission: 'monitoring:equipment:update',
|
||||
showOnEdit: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
addOrUpdateConfigs,
|
||||
dataForm: {
|
||||
@ -213,7 +281,11 @@ export default {
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
const eqTypeConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'equipmentTypeId')
|
||||
eqTypeConfig.options = data.data?.list?.map(item => ({ value: item.id, label: item.name })) || []
|
||||
eqTypeConfig.options =
|
||||
data.data?.list?.map(item => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
})) || []
|
||||
})
|
||||
},
|
||||
// 获取设备分组列表
|
||||
@ -228,7 +300,11 @@ export default {
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
const groupConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'groupId')
|
||||
groupConfig.options = data.data?.list?.map(item => ({ value: item.id, label: item.name })) || []
|
||||
groupConfig.options =
|
||||
data.data?.list?.map(item => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
})) || []
|
||||
})
|
||||
},
|
||||
// 获取数据列表
|
||||
@ -245,6 +321,8 @@ export default {
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.data.list
|
||||
// this.dataList = new Array(20).fill('1')
|
||||
// console.log('data list', this.dataList)
|
||||
this.totalPage = data.data.total
|
||||
} else {
|
||||
this.dataList = []
|
||||
@ -289,13 +367,17 @@ export default {
|
||||
},
|
||||
exportHandle() {
|
||||
// this.$http.get(this.$http.adornUrl('/monitoring/equipment/export')).then(({ data: res }) => {
|
||||
this.$http({ url: this.$http.adornUrl('/monitoring/equipment/export'), method: 'get', responseType: 'blob' }).then(res => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/equipment/export'),
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
}).then(res => {
|
||||
let fileName = 'equipment-list.xls'
|
||||
if (res.headers['content-disposition']) {
|
||||
const contentDisposition = res.headers['content-disposition']
|
||||
fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9)
|
||||
}
|
||||
|
||||
|
||||
fileName = decodeURIComponent(fileName)
|
||||
|
||||
const blob = new Blob([res.data])
|
||||
@ -335,9 +417,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="报警信息ID,关联T_equipment_group_alarm表" prop="alarmId">
|
||||
<el-input v-model="dataForm.alarmId" placeholder="报警信息ID,关联T_equipment_group_alarm表"></el-input>
|
||||
@ -19,26 +19,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -2,38 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="alarmId" header-align="center" align="center" label="报警信息ID,关联T_equipment_group_alarm表"> </el-table-column>
|
||||
<el-table-column prop="alarmSource" header-align="center" align="center" label="报警来源"> </el-table-column>
|
||||
<el-table-column prop="alarmContent" header-align="center" align="center" label="报警详细内容"> </el-table-column>
|
||||
<el-table-column prop="alarmEquipmentId" header-align="center" align="center" label="报警设备id 关联equipment表"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -51,30 +28,35 @@
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './equipmentAlarmLog-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const tableConfigs = [
|
||||
{ prop: 'id', name: 'ID' },
|
||||
{ prop: 'alarmId', name: '报警信息ID,关联T_equipment_group_alarm表' },
|
||||
{ prop: 'alarmSource', name: '报警来源' },
|
||||
{ prop: 'alarmContent', name: '报警详细内容' },
|
||||
{ prop: 'alarmEquipmentId', name: '报警设备id 关联equipment表' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: '创建时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间' },
|
||||
{ prop: 'version', name: '版本号' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {tableConfigs,
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -88,7 +70,8 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,BaseTable
|
||||
AddOrUpdate,
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@ -145,9 +128,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="设备ID" prop="equipmentId">
|
||||
<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
|
||||
@ -16,26 +16,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="设备ID" prop="equipmentId">
|
||||
<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
|
||||
@ -7,8 +7,8 @@
|
||||
<el-form-item label="文件ID" prop="fileId">
|
||||
<el-input v-model="dataForm.fileId" placeholder="文件ID"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
<el-form-item label=$t('desc') prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
@ -19,26 +19,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件类型编号" prop="typeCode">
|
||||
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
||||
|
@ -2,41 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenfile:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenfile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label=""> </el-table-column>
|
||||
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备ID"> </el-table-column>
|
||||
<el-table-column prop="fileId" header-align="center" align="center" label="文件ID"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编号"> </el-table-column>
|
||||
<el-table-column prop="fileName" header-align="center" align="center" label="文件名字"> </el-table-column>
|
||||
<el-table-column prop="fileUrl" header-align="center" align="center" label="下载地址"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -54,35 +28,38 @@
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './equipmentFile-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const tableConfigs = [
|
||||
{ prop: 'id', name: '' },
|
||||
{ prop: 'equipmentId', name: '设备ID' },
|
||||
{ prop: 'fileId', name: '文件ID' },
|
||||
{ prop: 'description', name: '描述' },
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'enabled', name: '启用状态:0 、停用,1、启用' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间' },
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'typeCode', name: '文件类型编号' },
|
||||
{ prop: 'fileName', name: '文件名字' },
|
||||
{ prop: 'fileUrl', name: '下载地址' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'fileUrl', name: i18n.t('downloadurl') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -154,9 +131,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="分组编码/分组名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.groupname')+' / '+$t('eq.groupcode')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,19 +27,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './equipmentGroup-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '分组名称' },
|
||||
{ prop: 'code', name: '分组编码' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'alarm', name: '报警', buttonContent: '查看报警', subcomponent: TableTextComponent, actionName: 'view-alarm' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -48,8 +51,8 @@ const addOrUpdateConfigs = {
|
||||
fields: [{ name: 'name', label: '分组名称' }, { name: 'code', label: '分组编码' }, 'remark'],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipmentGroup', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentGroup', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
@ -57,6 +60,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -149,9 +153,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,54 +1,27 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item label="设备分组名称">
|
||||
<el-form-item :label="$t('eq.groupname')">
|
||||
<strong>{{ $route.params.groupName }}</strong></el-form-item
|
||||
>
|
||||
|
||||
<el-form-item label="设备分组编码">
|
||||
<el-form-item :label="$t('eq.groupcode')">
|
||||
<strong>{{ $route.params.groupCode }}</strong>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
<br />
|
||||
<el-form-item>
|
||||
<!-- <el-button @click="getDataList()">查询</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<!-- <el-button @click="getDataList()">{{ $t('query') }}</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
|
||||
批量删除
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||
<el-table-column prop="equipmentGroupId" header-align="center" align="center" label="设备分组ID,关联t_equipment_group"></el-table-column>
|
||||
<el-table-column prop="code" header-align="center" align="center" label="编码"></el-table-column>
|
||||
<el-table-column prop="typeDictValue" header-align="center" align="center" label="报警类型 字典表关联label_value"></el-table-column>
|
||||
<el-table-column prop="gradeDictValue" header-align="center" align="center" label="报警级别 字典表关联label_value"></el-table-column>
|
||||
<el-table-column prop="alarmContent" header-align="center" align="center" label="报警内容"></el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"></el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"></el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"></el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"></el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"></el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"></el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"></el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"></el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"></el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"></el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"></el-table-column>
|
||||
<el-table-column prop="alarmNotify" header-align="center" align="center" label="推送方式 0邮箱 1微信"></el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -64,8 +37,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './equipmentGroupAlarm-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import dictListMixin from '@/mixins/dictlist-module'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
@ -79,29 +55,12 @@ const dictEntries = {
|
||||
}
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'code', name: '报警编码' },
|
||||
{ prop: 'typeDictValue', name: '报警类型' },
|
||||
{ prop: 'gradeDictValue', name: '报警级别' },
|
||||
{ prop: 'alarmContent', name: '报警内容' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
// { prop: 'typeDictValue', name: '报警类型 字典表关联label_value' },
|
||||
// { prop: 'gradeDictValue', name: '报警级别 字典表关联label_value' },
|
||||
// { "prop": "id", "name": "ID" },
|
||||
// { "prop": "equipmentGroupId", "name": "设备分组ID,关联t_equipment_group" },
|
||||
// { "prop": "description", "name": "描述" },
|
||||
// { "prop": "externalCode", "name": "外部编码,用于对照外部系统的编码" },
|
||||
// { "prop": "enabled", "name": "启用状态:0 、停用,1、启用" },
|
||||
// { "prop": "remark", "name": "备注" },
|
||||
// { "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
// { "prop": "creatorId", "name": "创建人" },
|
||||
// { "prop": "creatorName", "name": "创建人姓名" },
|
||||
// { "prop": "updaterId", "name": "更新人" },
|
||||
// { "prop": "updaterName", "name": "更新人姓名" },
|
||||
// { "prop": "updateTime", "name": "更新时间" },
|
||||
// { "prop": "version", "name": "版本号" },
|
||||
// { prop: 'alarmNotify', name: '推送方式 0邮箱 1微信' },
|
||||
// { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -115,8 +74,8 @@ const addOrUpdateConfigs = {
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipmentGroupAlarm', extraFields: { equipmentGroupId: null }, permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentGroupAlarm', extraFields: { equipmentGroupId: null }, permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/equipmentGroupAlarm', extraFields: { equipmentGroupId: null }, permission: 'monitoring:equipmentgroupalarm:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentGroupAlarm', extraFields: { equipmentGroupId: null }, permission: 'monitoring:equipmentgroupalarm:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
@ -125,6 +84,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -203,7 +163,7 @@ export default {
|
||||
switch (type) {
|
||||
case 'edit':
|
||||
return this.addOrUpdateHandle(id)
|
||||
case 'delete':
|
||||
case 'delete':
|
||||
return this.deleteHandle(id)
|
||||
}
|
||||
},
|
||||
@ -226,9 +186,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="名称/编码" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('name') + ' / ' + $t('code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentplc:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentplc:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,24 +27,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './equipmentPlc-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ prop: 'code', name: '编码' },
|
||||
{ prop: 'name', name: '名称' },
|
||||
{ prop: 'enName', name: '英文名称' },
|
||||
{ prop: 'description', name: '描述' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'code', name: i18n.t('code') },
|
||||
{ prop: 'name', name: i18n.t('name') },
|
||||
{ prop: 'enName', name: i18n.t('enname') },
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'barcode', name: 'plc条码' },
|
||||
{ prop: 'collection', name: '是否采集', filter: val => ({ 0: '不采集', 1: '采集' }[val]) },
|
||||
{ prop: 'collection', name: i18n.t('collectOrNot'), filter: val => ({ 0: i18n.t('notCollect'), 1: i18n.t('collect') }[val]) },
|
||||
{ prop: 'ip', name: 'IP' },
|
||||
{ prop: 'port', name: '端口号' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -53,15 +56,15 @@ const addOrUpdateConfigs = {
|
||||
fields: [
|
||||
{ name: 'name', required: true },
|
||||
{ name: 'code', required: true },
|
||||
{ name: 'enName', label: '英文名称' },
|
||||
{ name: 'enName', label: i18n.t('enname') },
|
||||
{
|
||||
name: 'collection',
|
||||
label: '是否采集',
|
||||
label: i18n.t('collectOrNot'),
|
||||
required: true,
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '采集', value: 1 },
|
||||
{ label: '不采集', value: 0 }
|
||||
{ label: i18n.t('collect'), value: 1 },
|
||||
{ label: i18n.t('notCollect'), value: 0 }
|
||||
]
|
||||
},
|
||||
{ name: 'ip', label: 'IP', required: true, placeholder: '0.0.0.0' },
|
||||
@ -72,28 +75,16 @@ const addOrUpdateConfigs = {
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipmentPlc', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentPlc', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/equipmentPlc', permission: 'monitoring:equipmentplc:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentPlc', permission: 'monitoring:equipmentplc:update', showOnEdit: true }
|
||||
]
|
||||
// subtable: {
|
||||
// // for i18n
|
||||
// title: '动态属性',
|
||||
// url: '/monitoring/productArrt',
|
||||
// relatedField: 'productId',
|
||||
// tableConfigs: [
|
||||
// { type: 'index', name: '序号' },
|
||||
// { prop: 'createTime', name: '添加时间', filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
|
||||
// { prop: 'name', name: '属性名', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] },
|
||||
// { prop: 'code', name: '属性值', formField: true },
|
||||
// { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
// ]
|
||||
// }
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -118,7 +109,7 @@ export default {
|
||||
//handleOperations
|
||||
handleOperations({ type, data: id }) {
|
||||
switch (type) {
|
||||
case 'edit':
|
||||
case 'edit':
|
||||
return this.addOrUpdateHandle(id)
|
||||
case 'delete':
|
||||
return this.deleteHandle(id)
|
||||
@ -175,9 +166,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="设备名称/设备编码" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentplcconnect:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentplcconnect:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@ -28,8 +28,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './equipmentPlcConnect-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
@ -37,15 +40,15 @@ import { dictFilter } from '@/utils/filters'
|
||||
// import axios from '@/utils/request.js'
|
||||
|
||||
const tableConfigs = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'lineName', name: '产线' },
|
||||
{ prop: 'sectionName', name: '工段' },
|
||||
{ prop: 'equName', name: '设备' },
|
||||
{ prop: 'equName', name: i18n.t('equipment') },
|
||||
{ prop: 'equCode', name: '设备编码' },
|
||||
{ prop: 'plcCode', name: 'PLC编码' },
|
||||
{ prop: 'plcName', name: 'PLC名称' },
|
||||
{ prop: 'plcIp', name: 'PLC IP' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const UnitDictTypeId = '1557173812109242370'
|
||||
@ -57,61 +60,57 @@ const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/equipmentPlcConnect',
|
||||
fields: [
|
||||
{ name: 'equipmentId', label: '设备', required: true, type: 'select', options: [] },
|
||||
{ name: 'equipmentId', label: i18n.t('equipment'), required: true, type: 'select', options: [] },
|
||||
{ name: 'plcId', label: 'PLC名称', required: true, type: 'select', options: [] }
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipmentPlcConnect', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentPlcConnect', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/equipmentPlcConnect', permission: 'monitoring:equipmentplcconnect:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentPlcConnect', permission: 'monitoring:equipmentplcconnect:update', showOnEdit: true }
|
||||
],
|
||||
subtable: {
|
||||
title: 'PLC采集参数',
|
||||
url: '/monitoring/equipmentPlcParam',
|
||||
relatedField: 'plcConId',
|
||||
tableConfigs: [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
// { prop: 'plcConId', name: 'plc连接表ID' },
|
||||
{ prop: 'paramCode', name: '参数编码', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] },
|
||||
{ prop: 'paramName', name: '参数名称', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] },
|
||||
{ prop: 'paramAddress', name: '参数地址', formField: true },
|
||||
{ prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId), formField: true, formType: 'select', formOptions: getUnitList() },
|
||||
{ prop: 'minValue', name: '最小值', formField: true },
|
||||
{ prop: 'maxValue', name: '最大值', formField: true },
|
||||
{ prop: 'paramCode', name: '参数编码', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
|
||||
{ prop: 'paramName', name: '参数名称', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
|
||||
{ prop: 'paramAddress', name: i18n.t('paramUrl'), formField: true },
|
||||
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId), formField: true, formType: 'select', formOptions: getUnitList() },
|
||||
{ prop: 'minValue', name: i18n.t('min'), formField: true },
|
||||
{ prop: 'maxValue', name: i18n.t('max'), formField: true },
|
||||
{ prop: 'defaultValue', name: '参数设定标准值', formField: true },
|
||||
{ prop: 'description', name: '描述', formField: true },
|
||||
{ prop: 'description', name: i18n.t('desc'), formField: true },
|
||||
{
|
||||
prop: 'enabled',
|
||||
name: '启用状态',
|
||||
filter: val => ['停用', '启用'][+val],
|
||||
// filter: val => ({0:'停用', 1:'启用'}[+val]),
|
||||
rules: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||
name: i18n.t('enabled'),
|
||||
filter: val => [i18n.t('disable'), i18n.t('enable')][+val],
|
||||
// filter: val => ({0:i18n.t('disable'), 1:i18n.t('enable')}[+val]),
|
||||
rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }],
|
||||
formField: true,
|
||||
formType: 'select',
|
||||
formOptions: [
|
||||
{ value: 0, label: '停用' },
|
||||
{ value: 1, label: '启用' }
|
||||
{ value: 0, label: i18n.t('disable') },
|
||||
{ value: 1, label: i18n.t('enable') }
|
||||
]
|
||||
},
|
||||
{ prop: 'remark', name: '备注', formField: true },
|
||||
// { prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'remark', name: i18n.t('remark'), formField: true },
|
||||
// { prop: 'createTime', name: i18n.t('createTime') },
|
||||
{
|
||||
prop: 'collection',
|
||||
name: '是否采集',
|
||||
filter: val => ['不采集', '采集'][+val],
|
||||
rules: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||
name: i18n.t('collectOrNot'),
|
||||
filter: val => [i18n.t('notCollect'), i18n.t('collect')][+val],
|
||||
rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }],
|
||||
formField: true,
|
||||
formType: 'select',
|
||||
formOptions: [
|
||||
{ value: 0, label: '不采集' },
|
||||
{ value: 1, label: '采集' }
|
||||
{ value: 0, label: i18n.t('notCollect') },
|
||||
{ value: 1, label: i18n.t('collect') }
|
||||
]
|
||||
},
|
||||
// { prop: 'collectionCycle', name: '采集周期(s) 暂不使用' },
|
||||
// { prop: 'reportingCycle', name: '上报周期(s) 暂不使用' },
|
||||
// { prop: 'reportingMethod', name: '上报方式 暂不使用' },
|
||||
// { prop: 'reportingCode', name: '上报编码 暂不使用' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -120,6 +119,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -232,9 +232,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="plc连接表ID" prop="plcConId">
|
||||
<el-input v-model="dataForm.plcConId" placeholder="plc连接表ID"></el-input>
|
||||
@ -31,8 +31,8 @@
|
||||
<el-form-item label="参数设定标准值" prop="defaultValue">
|
||||
<el-input v-model="dataForm.defaultValue" placeholder="参数设定标准值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
<el-form-item label=$t('desc') prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
@ -43,26 +43,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="0 代表不采集, 1 代表采集" prop="collection">
|
||||
<el-input v-model="dataForm.collection" placeholder="0 代表不采集, 1 代表采集"></el-input>
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenplcparam:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenplcparam:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,7 +27,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './equipmentPlcParam-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
// import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
@ -36,32 +39,26 @@ import { dictFilter } from '@/utils/filters'
|
||||
const UnitDictTypeId = '1557173812109242370'
|
||||
|
||||
const tableConfigs = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'plcConId', name: 'plc连接表ID' },
|
||||
{ prop: 'paramCode', name: '参数编码' },
|
||||
{ prop: 'paramName', name: '参数名称' },
|
||||
{ prop: 'paramAddress', name: '参数地址' },
|
||||
{ prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId) },
|
||||
{ prop: 'minValue', name: '最小值' },
|
||||
{ prop: 'maxValue', name: '最大值' },
|
||||
{ prop: 'paramAddress', name: i18n.t('paramUrl') },
|
||||
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
|
||||
{ prop: 'minValue', name: i18n.t('min') },
|
||||
{ prop: 'maxValue', name: i18n.t('max') },
|
||||
{ prop: 'defaultValue', name: '参数设定标准值' },
|
||||
{ prop: 'description', name: '描述' },
|
||||
{ prop: 'enabled', name: '启用状态', filter: val => ['停用', '启用'][+val] },
|
||||
// { prop: 'enabled', name: '启用状态:0 、停用,1、启用' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
// { prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'collection', name: '是否采集', filter: val => ['不采集', '采集'][+val] }
|
||||
// { prop: 'collectionCycle', name: '采集周期(s) 暂不使用' },
|
||||
// { prop: 'reportingCycle', name: '上报周期(s) 暂不使用' },
|
||||
// { prop: 'reportingMethod', name: '上报方式 暂不使用' },
|
||||
// { prop: 'reportingCode', name: '上报编码 暂不使用' },
|
||||
// { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'enabled', name: i18n.t('enabled'), filter: val => [i18n.t('disable'), i18n.t('enable')][+val] },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'collection', name: i18n.t('collectOrNot'), filter: val => [i18n.t('notCollect'), i18n.t('collect')][+val] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -133,9 +130,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="设备外部编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="设备外部编码"></el-input>
|
||||
@ -28,26 +28,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产数量的记录时间" prop="recordTime">
|
||||
<el-input v-model="dataForm.recordTime" placeholder="生产数量的记录时间"></el-input>
|
||||
@ -90,9 +90,9 @@ export default {
|
||||
equipmentName: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
|
||||
inQuantity: [{ required: true, message: '进入设备的数量不能为空', trigger: 'blur' }],
|
||||
outQuantity: [{ required: true, message: '离开设备的数量,若plc只记录一个生产数量,也写入该字段不能为空', trigger: 'blur' }],
|
||||
okQuantity: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||
okQuantity: [{ required: true, message: i18n.t('cannotempty'), trigger: 'blur' }],
|
||||
nokQuantity: [{ required: true, message: '设备上报的报废数量不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: i18n.t('cannotempty'), trigger: 'blur' }],
|
||||
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||
|
@ -2,42 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenquantity:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenquantity:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="设备外部编码"> </el-table-column>
|
||||
<el-table-column prop="equipmentName" header-align="center" align="center" label="设备名称"> </el-table-column>
|
||||
<el-table-column prop="inQuantity" header-align="center" align="center" label="进入设备的数量"> </el-table-column>
|
||||
<el-table-column prop="outQuantity" header-align="center" align="center" label="离开设备的数量,若plc只记录一个生产数量,也写入该字段"> </el-table-column>
|
||||
<el-table-column prop="okQuantity" header-align="center" align="center" label=""> </el-table-column>
|
||||
<el-table-column prop="nokQuantity" header-align="center" align="center" label="设备上报的报废数量"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label=""> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column prop="recordTime" header-align="center" align="center" label="生产数量的记录时间"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -54,39 +27,44 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './equipmentQuantity-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ "prop": "id", "name": "id" },
|
||||
{ "prop": "externalCode", "name": "设备外部编码" },
|
||||
{ "prop": "equipmentName", "name": "设备名称" },
|
||||
{ "prop": "inQuantity", "name": "进入设备的数量" },
|
||||
{
|
||||
"prop": "outQuantity",
|
||||
"name": "离开设备的数量,若plc只记录一个生产数量,也写入该字段"
|
||||
},
|
||||
{ "prop": "okQuantity", "name": "" },
|
||||
{ "prop": "nokQuantity", "name": "设备上报的报废数量" },
|
||||
{ "prop": "description", "name": "" },
|
||||
{ "prop": "remark", "name": "备注" },
|
||||
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
{ "prop": "creatorId", "name": "创建人" },
|
||||
{ "prop": "creatorName", "name": "创建人姓名" },
|
||||
{ "prop": "createTime", "name": "添加时间" },
|
||||
{ "prop": "updaterId", "name": "更新人" },
|
||||
{ "prop": "updaterName", "name": "更新人姓名" },
|
||||
{ "prop": "updateTime", "name": "更新时间" },
|
||||
{ "prop": "version", "name": "版本号" },
|
||||
{ "prop": "recordTime", "name": "生产数量的记录时间" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'id', name: 'id' },
|
||||
{ prop: 'externalCode', name: '设备外部编码' },
|
||||
{ prop: 'equipmentName', name: '设备名称' },
|
||||
{ prop: 'inQuantity', name: '进入设备的数量' },
|
||||
{
|
||||
prop: 'outQuantity',
|
||||
name: '离开设备的数量,若plc只记录一个生产数量,也写入该字段'
|
||||
},
|
||||
{ prop: 'okQuantity', name: '' },
|
||||
{ prop: 'nokQuantity', name: '设备上报的报废数量' },
|
||||
{ prop: 'description', name: '' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'recordTime', name: '生产数量的记录时间' },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {tableConfigs,
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -100,7 +78,8 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,BaseTable
|
||||
AddOrUpdate,
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@ -157,9 +136,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="设备外部代码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="设备外部代码"></el-input>
|
||||
@ -28,26 +28,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -2,40 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="设备外部代码"> </el-table-column>
|
||||
<el-table-column prop="plcId" header-align="center" align="center" label="plc id"> </el-table-column>
|
||||
<el-table-column prop="plc" header-align="center" align="center" label="plc"> </el-table-column>
|
||||
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备id"> </el-table-column>
|
||||
<el-table-column prop="equipmentName" header-align="center" align="center" label="设备名称"> </el-table-column>
|
||||
<el-table-column prop="status" header-align="center" align="center" label="状态,0正常 1计划停机 2故障"> </el-table-column>
|
||||
<el-table-column prop="logTime" header-align="center" align="center" label="记录时间"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -52,35 +27,40 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './equipmentStatusLog-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ "prop": "id", "name": "id" },
|
||||
{ "prop": "externalCode", "name": "设备外部代码" },
|
||||
{ "prop": "plcId", "name": "plc id" },
|
||||
{ "prop": "plc", "name": "plc" },
|
||||
{ "prop": "equipmentId", "name": "设备id" },
|
||||
{ "prop": "equipmentName", "name": "设备名称" },
|
||||
{ "prop": "status", "name": "状态,0正常 1计划停机 2故障" },
|
||||
{ "prop": "logTime", "name": "记录时间" },
|
||||
{ "prop": "remark", "name": "备注" },
|
||||
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
{ "prop": "creatorId", "name": "创建人" },
|
||||
{ "prop": "creatorName", "name": "创建人姓名" },
|
||||
{ "prop": "createTime", "name": "添加时间" },
|
||||
{ "prop": "updaterId", "name": "更新人" },
|
||||
{ "prop": "updaterName", "name": "更新人姓名" },
|
||||
{ "prop": "updateTime", "name": "更新时间" },
|
||||
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'id', name: 'id' },
|
||||
{ prop: 'externalCode', name: '设备外部代码' },
|
||||
{ prop: 'plcId', name: 'plc id' },
|
||||
{ prop: 'plc', name: 'plc' },
|
||||
{ prop: 'equipmentId', name: '设备id' },
|
||||
{ prop: 'equipmentName', name: '设备名称' },
|
||||
{ prop: 'status', name: '状态,0正常 1计划停机 2故障' },
|
||||
{ prop: 'logTime', name: i18n.t('recordTime') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {tableConfigs,
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -94,7 +74,8 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,BaseTable
|
||||
AddOrUpdate,
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@ -151,9 +132,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="设备类型" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('eq.type')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenttype:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenttype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,18 +27,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './equipmentType-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '类型名称' },
|
||||
{ prop: 'code', name: '类型编码' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -52,8 +55,8 @@ const addOrUpdateConfigs = {
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/equipmentType', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentType', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/equipmentType', permission: 'monitoring:equipmenttype:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/equipmentType', permission: 'monitoring:equipmenttype:update', showOnEdit: true }
|
||||
],
|
||||
extraComponents: [
|
||||
{
|
||||
@ -76,6 +79,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateConfigs,
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -173,9 +177,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="设备类型ID" prop="equipmentTypeId">
|
||||
<el-input v-model="dataForm.equipmentTypeId" placeholder="设备类型ID"></el-input>
|
||||
@ -16,8 +16,8 @@
|
||||
<el-form-item label="下载地址" prop="fileUrl">
|
||||
<el-input v-model="dataForm.fileUrl" placeholder="下载地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
<el-form-item label=$t('desc') prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
@ -28,26 +28,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -2,41 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentypefile:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmentypefile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="equipmentTypeId" header-align="center" align="center" label="设备类型ID"> </el-table-column>
|
||||
<el-table-column prop="fileId" header-align="center" align="center" label="文件ID"> </el-table-column>
|
||||
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编码"> </el-table-column>
|
||||
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"> </el-table-column>
|
||||
<el-table-column prop="fileUrl" header-align="center" align="center" label="下载地址"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -53,35 +27,40 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './equipmentTypeFile-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ "prop": "id", "name": "ID" },
|
||||
{ "prop": "equipmentTypeId", "name": "设备类型ID" },
|
||||
{ "prop": "fileId", "name": "文件ID" },
|
||||
{ "prop": "typeCode", "name": "文件类型编码" },
|
||||
{ "prop": "fileName", "name": "文件名称" },
|
||||
{ "prop": "fileUrl", "name": "下载地址" },
|
||||
{ "prop": "description", "name": "描述" },
|
||||
{ "prop": "enabled", "name": "启用状态:0 、停用,1、启用" },
|
||||
{ "prop": "remark", "name": "备注" },
|
||||
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
{ "prop": "creatorId", "name": "创建人" },
|
||||
{ "prop": "creatorName", "name": "创建人姓名" },
|
||||
{ "prop": "createTime", "name": "添加时间" },
|
||||
{ "prop": "updaterId", "name": "更新人" },
|
||||
{ "prop": "updaterName", "name": "更新人姓名" },
|
||||
{ "prop": "updateTime", "name": "更新时间" },
|
||||
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'id', name: 'ID' },
|
||||
{ prop: 'equipmentTypeId', name: '设备类型ID' },
|
||||
{ prop: 'fileId', name: '文件ID' },
|
||||
{ prop: 'typeCode', name: '文件类型编码' },
|
||||
{ prop: 'fileName', name: '文件名称' },
|
||||
{ prop: 'fileUrl', name: i18n.t('downloadurl') },
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'enabled', name: '启用状态:0 、停用,1、启用' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {tableConfigs,
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -95,7 +74,8 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,BaseTable
|
||||
AddOrUpdate,
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@ -152,9 +132,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,37 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenattr:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:equipmenattr:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备ID"> </el-table-column>
|
||||
<el-table-column prop="attrName" header-align="center" align="center" label="属性名称"> </el-table-column>
|
||||
<el-table-column prop="attrValue" header-align="center" align="center" label="属性值"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -49,32 +27,34 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './equipmentAttr-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'equipmentId', name: '设备ID' },
|
||||
{ prop: 'attrName', name: '属性名' },
|
||||
{ prop: 'attrValue', name: '属性值' },
|
||||
// { "prop": "id", "name": "ID" },
|
||||
// { "prop": "remark", "name": "备注" },
|
||||
// { "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
// { "prop": "creatorId", "name": "创建人" },
|
||||
// { "prop": "creatorName", "name": "创建人姓名" },
|
||||
// { "prop": "updaterId", "name": "更新人" },
|
||||
// { "prop": "updaterName", "name": "更新人姓名" },
|
||||
// { "prop": "updateTime", "name": "更新时间" },
|
||||
// { prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'attrName', name: '属性名称' },
|
||||
{ prop: 'attrValue', name: i18n.t('attrValue') },
|
||||
{
|
||||
prop: 'operations',
|
||||
name: i18n.t('handle'),
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
subcomponent: TableOperateComponent,
|
||||
options: ['edit', 'delete']
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfigs,
|
||||
calcMaxHeight,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -146,9 +126,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,39 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="工厂编码/工厂名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('factory.name') + ' / ' + $t('factory.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:factory:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:factory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||
<el-table-column prop="code" header-align="center" align="center" label="工厂编码"> </el-table-column>
|
||||
<el-table-column prop="name" header-align="center" align="center" label="工厂名称"> </el-table-column>
|
||||
<el-table-column prop="address" header-align="center" align="center" label="地址"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="外部系统编码"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -51,19 +27,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './factory-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '工厂名称' },
|
||||
{ prop: 'code', name: '工厂编码' },
|
||||
{ prop: 'address', name: '地址' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'address', name: i18n.t('addr') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -77,7 +56,7 @@ const addOrUpdateConfigs = {
|
||||
},
|
||||
{
|
||||
name: 'address',
|
||||
label: '地址',
|
||||
label: i18n.t('addr'),
|
||||
placeholder: '请输入地址'
|
||||
},
|
||||
'remark'
|
||||
@ -85,14 +64,15 @@ const addOrUpdateConfigs = {
|
||||
operations: [
|
||||
{ name: 'reset', url: true, showAlways: true },
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/factory', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/factory', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/factory', permission: 'monitoring:factory:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/factory', permission: 'monitoring:factory:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -175,9 +155,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
594
src/views/modules/monitoring/icons-dialog.vue
Normal file
594
src/views/modules/monitoring/icons-dialog.vue
Normal file
@ -0,0 +1,594 @@
|
||||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="'Icons'">
|
||||
<div style="background: #efefef; max-height: 500px; overflow: hidden scroll;">
|
||||
<el-row :gutter="10">
|
||||
<el-col v-for="icon in icons" :key="icon" :span="3" class="col-hover" style="padding: 8px; text-align: center; cursor: pointer;" @click.native="handleCopy(icon)">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" style="height: 24px; width: 24px;" aria-hidden="true">
|
||||
<use v-bind:xlink:href="`#${icon}`"></use>
|
||||
</svg>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div slot="footer">
|
||||
<el-button @click="close()">Close</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'IconsDialog',
|
||||
data() {
|
||||
return {
|
||||
icons: [],
|
||||
visible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loadIcons()
|
||||
this.visible = true
|
||||
},
|
||||
loadIcons() {
|
||||
this.icons = [
|
||||
'icon-check-circle',
|
||||
'icon-CI',
|
||||
'icon-Dollar',
|
||||
'icon-compass',
|
||||
'icon-close-circle',
|
||||
'icon-frown',
|
||||
'icon-info-circle',
|
||||
'icon-left-circle',
|
||||
'icon-down-circle',
|
||||
'icon-EURO',
|
||||
'icon-copyright',
|
||||
'icon-minus-circle',
|
||||
'icon-meh',
|
||||
'icon-plus-circle',
|
||||
'icon-play-circle',
|
||||
'icon-question-circle',
|
||||
'icon-Pound',
|
||||
'icon-right-circle',
|
||||
'icon-smile',
|
||||
'icon-trademark',
|
||||
'icon-time-circle',
|
||||
'icon-timeout',
|
||||
'icon-earth',
|
||||
'icon-YUAN',
|
||||
'icon-up-circle',
|
||||
'icon-warning-circle',
|
||||
'icon-sync',
|
||||
'icon-transaction',
|
||||
'icon-undo',
|
||||
'icon-redo',
|
||||
'icon-reload',
|
||||
'icon-reloadtime',
|
||||
'icon-message',
|
||||
'icon-dashboard',
|
||||
'icon-issuesclose',
|
||||
'icon-poweroff',
|
||||
'icon-logout',
|
||||
'icon-login',
|
||||
'icon-piechart',
|
||||
'icon-setting',
|
||||
'icon-eye',
|
||||
'icon-location',
|
||||
'icon-edit-square',
|
||||
'icon-export',
|
||||
'icon-save',
|
||||
'icon-Import',
|
||||
'icon-appstore',
|
||||
'icon-close-square',
|
||||
'icon-down-square',
|
||||
'icon-layout',
|
||||
'icon-left-square',
|
||||
'icon-play-square',
|
||||
'icon-control',
|
||||
'icon-codelibrary',
|
||||
'icon-detail',
|
||||
'icon-minus-square',
|
||||
'icon-plus-square',
|
||||
'icon-right-square',
|
||||
'icon-project',
|
||||
'icon-wallet',
|
||||
'icon-up-square',
|
||||
'icon-calculator',
|
||||
'icon-interation',
|
||||
'icon-check-square',
|
||||
'icon-border',
|
||||
'icon-border-outer',
|
||||
'icon-border-top',
|
||||
'icon-border-bottom',
|
||||
'icon-border-left',
|
||||
'icon-border-right',
|
||||
'icon-border-inner',
|
||||
'icon-border-verticle',
|
||||
'icon-border-horizontal',
|
||||
'icon-radius-bottomleft',
|
||||
'icon-radius-bottomright',
|
||||
'icon-radius-upleft',
|
||||
'icon-radius-upright',
|
||||
'icon-radius-setting',
|
||||
'icon-adduser',
|
||||
'icon-deleteteam',
|
||||
'icon-deleteuser',
|
||||
'icon-addteam',
|
||||
'icon-user',
|
||||
'icon-team',
|
||||
'icon-areachart',
|
||||
'icon-linechart',
|
||||
'icon-barchart',
|
||||
'icon-pointmap',
|
||||
'icon-container',
|
||||
'icon-database',
|
||||
'icon-sever',
|
||||
'icon-mobile',
|
||||
'icon-tablet',
|
||||
'icon-redenvelope',
|
||||
'icon-book',
|
||||
'icon-filedone',
|
||||
'icon-reconciliation',
|
||||
'icon-file-exception',
|
||||
'icon-filesync',
|
||||
'icon-filesearch',
|
||||
'icon-solution',
|
||||
'icon-fileprotect',
|
||||
'icon-file-add',
|
||||
'icon-file-excel',
|
||||
'icon-file-exclamation',
|
||||
'icon-file-pdf',
|
||||
'icon-file-image',
|
||||
'icon-file-markdown',
|
||||
'icon-file-unknown',
|
||||
'icon-file-ppt',
|
||||
'icon-file-word',
|
||||
'icon-file',
|
||||
'icon-file-zip',
|
||||
'icon-file-text',
|
||||
'icon-file-copy',
|
||||
'icon-snippets',
|
||||
'icon-audit',
|
||||
'icon-diff',
|
||||
'icon-Batchfolding',
|
||||
'icon-securityscan',
|
||||
'icon-propertysafety',
|
||||
'icon-safetycertificate',
|
||||
'icon-insurance',
|
||||
'icon-alert',
|
||||
'icon-delete',
|
||||
'icon-hourglass',
|
||||
'icon-bulb',
|
||||
'icon-experiment',
|
||||
'icon-bell',
|
||||
'icon-trophy',
|
||||
'icon-rest',
|
||||
'icon-USB',
|
||||
'icon-skin',
|
||||
'icon-home',
|
||||
'icon-bank',
|
||||
'icon-filter',
|
||||
'icon-funnelplot',
|
||||
'icon-like',
|
||||
'icon-unlike',
|
||||
'icon-unlock',
|
||||
'icon-lock',
|
||||
'icon-customerservice',
|
||||
'icon-flag',
|
||||
'icon-moneycollect',
|
||||
'icon-medicinebox',
|
||||
'icon-shop',
|
||||
'icon-rocket',
|
||||
'icon-shopping',
|
||||
'icon-folder',
|
||||
'icon-folder-open',
|
||||
'icon-folder-add',
|
||||
'icon-deploymentunit',
|
||||
'icon-accountbook',
|
||||
'icon-contacts',
|
||||
'icon-carryout',
|
||||
'icon-calendar-check',
|
||||
'icon-calendar',
|
||||
'icon-scan',
|
||||
'icon-select',
|
||||
'icon-boxplot',
|
||||
'icon-build',
|
||||
'icon-sliders',
|
||||
'icon-laptop',
|
||||
'icon-barcode',
|
||||
'icon-camera',
|
||||
'icon-cluster',
|
||||
'icon-gateway',
|
||||
'icon-car',
|
||||
'icon-printer',
|
||||
'icon-read',
|
||||
'icon-cloud-server',
|
||||
'icon-cloud-upload',
|
||||
'icon-cloud',
|
||||
'icon-cloud-download',
|
||||
'icon-cloud-sync',
|
||||
'icon-video',
|
||||
'icon-notification',
|
||||
'icon-sound',
|
||||
'icon-radarchart',
|
||||
'icon-qrcode',
|
||||
'icon-fund',
|
||||
'icon-image',
|
||||
'icon-mail',
|
||||
'icon-table',
|
||||
'icon-idcard',
|
||||
'icon-creditcard',
|
||||
'icon-heart',
|
||||
'icon-block',
|
||||
'icon-error',
|
||||
'icon-star',
|
||||
'icon-gold',
|
||||
'icon-heatmap',
|
||||
'icon-wifi',
|
||||
'icon-attachment',
|
||||
'icon-edit',
|
||||
'icon-key',
|
||||
'icon-api',
|
||||
'icon-disconnect',
|
||||
'icon-highlight',
|
||||
'icon-monitor',
|
||||
'icon-link',
|
||||
'icon-man',
|
||||
'icon-percentage',
|
||||
'icon-search',
|
||||
'icon-pushpin',
|
||||
'icon-phone',
|
||||
'icon-shake',
|
||||
'icon-tag',
|
||||
'icon-wrench',
|
||||
'icon-woman',
|
||||
'icon-tags',
|
||||
'icon-scissor',
|
||||
'icon-mr',
|
||||
'icon-share',
|
||||
'icon-branches',
|
||||
'icon-fork',
|
||||
'icon-shrink',
|
||||
'icon-arrawsalt',
|
||||
'icon-verticalright',
|
||||
'icon-verticalleft',
|
||||
'icon-right',
|
||||
'icon-left',
|
||||
'icon-up',
|
||||
'icon-down',
|
||||
'icon-fullscreen',
|
||||
'icon-fullscreen-exit',
|
||||
'icon-doubleleft',
|
||||
'icon-doubleright',
|
||||
'icon-arrowright',
|
||||
'icon-arrowup',
|
||||
'icon-arrowleft',
|
||||
'icon-arrowdown',
|
||||
'icon-upload',
|
||||
'icon-colum-height',
|
||||
'icon-vertical-align-botto',
|
||||
'icon-vertical-align-middl',
|
||||
'icon-totop',
|
||||
'icon-vertical-align-top',
|
||||
'icon-download',
|
||||
'icon-sort-descending',
|
||||
'icon-sort-ascending',
|
||||
'icon-fall',
|
||||
'icon-swap',
|
||||
'icon-stock',
|
||||
'icon-rise',
|
||||
'icon-indent',
|
||||
'icon-outdent',
|
||||
'icon-menu',
|
||||
'icon-unorderedlist',
|
||||
'icon-orderedlist',
|
||||
'icon-align-right',
|
||||
'icon-align-center',
|
||||
'icon-align-left',
|
||||
'icon-pic-center',
|
||||
'icon-pic-right',
|
||||
'icon-pic-left',
|
||||
'icon-bold',
|
||||
'icon-font-colors',
|
||||
'icon-exclaimination',
|
||||
'icon-font-size',
|
||||
'icon-infomation',
|
||||
'icon-line-height',
|
||||
'icon-strikethrough',
|
||||
'icon-underline',
|
||||
'icon-number',
|
||||
'icon-italic',
|
||||
'icon-code',
|
||||
'icon-column-width',
|
||||
'icon-check',
|
||||
'icon-ellipsis',
|
||||
'icon-dash',
|
||||
'icon-close',
|
||||
'icon-enter',
|
||||
'icon-line',
|
||||
'icon-minus',
|
||||
'icon-question',
|
||||
'icon-plus',
|
||||
'icon-rollback',
|
||||
'icon-small-dash',
|
||||
'icon-pause',
|
||||
'icon-bg-colors',
|
||||
'icon-crown',
|
||||
'icon-drag',
|
||||
'icon-desktop',
|
||||
'icon-gift',
|
||||
'icon-stop',
|
||||
'icon-fire',
|
||||
'icon-thunderbolt',
|
||||
'icon-check-circle-fill',
|
||||
'icon-left-circle-fill',
|
||||
'icon-down-circle-fill',
|
||||
'icon-minus-circle-fill',
|
||||
'icon-close-circle-fill',
|
||||
'icon-info-circle-fill',
|
||||
'icon-up-circle-fill',
|
||||
'icon-right-circle-fill',
|
||||
'icon-plus-circle-fill',
|
||||
'icon-question-circle-fill',
|
||||
'icon-EURO-circle-fill',
|
||||
'icon-frown-fill',
|
||||
'icon-copyright-circle-fil',
|
||||
'icon-CI-circle-fill',
|
||||
'icon-compass-fill',
|
||||
'icon-Dollar-circle-fill',
|
||||
'icon-poweroff-circle-fill',
|
||||
'icon-meh-fill',
|
||||
'icon-play-circle-fill',
|
||||
'icon-Pound-circle-fill',
|
||||
'icon-smile-fill',
|
||||
'icon-stop-fill',
|
||||
'icon-warning-circle-fill',
|
||||
'icon-time-circle-fill',
|
||||
'icon-trademark-circle-fil',
|
||||
'icon-YUAN-circle-fill',
|
||||
'icon-heart-fill',
|
||||
'icon-piechart-circle-fil',
|
||||
'icon-dashboard-fill',
|
||||
'icon-message-fill',
|
||||
'icon-check-square-fill',
|
||||
'icon-down-square-fill',
|
||||
'icon-minus-square-fill',
|
||||
'icon-close-square-fill',
|
||||
'icon-codelibrary-fill',
|
||||
'icon-left-square-fill',
|
||||
'icon-play-square-fill',
|
||||
'icon-up-square-fill',
|
||||
'icon-right-square-fill',
|
||||
'icon-plus-square-fill',
|
||||
'icon-accountbook-fill',
|
||||
'icon-carryout-fill',
|
||||
'icon-calendar-fill',
|
||||
'icon-calculator-fill',
|
||||
'icon-interation-fill',
|
||||
'icon-project-fill',
|
||||
'icon-detail-fill',
|
||||
'icon-save-fill',
|
||||
'icon-wallet-fill',
|
||||
'icon-control-fill',
|
||||
'icon-layout-fill',
|
||||
'icon-appstore-fill',
|
||||
'icon-mobile-fill',
|
||||
'icon-tablet-fill',
|
||||
'icon-book-fill',
|
||||
'icon-redenvelope-fill',
|
||||
'icon-safetycertificate-f',
|
||||
'icon-propertysafety-fill',
|
||||
'icon-insurance-fill',
|
||||
'icon-securityscan-fill',
|
||||
'icon-file-exclamation-fil',
|
||||
'icon-file-add-fill',
|
||||
'icon-file-fill',
|
||||
'icon-file-excel-fill',
|
||||
'icon-file-markdown-fill',
|
||||
'icon-file-text-fill',
|
||||
'icon-file-ppt-fill',
|
||||
'icon-file-unknown-fill',
|
||||
'icon-file-word-fill',
|
||||
'icon-file-zip-fill',
|
||||
'icon-file-pdf-fill',
|
||||
'icon-file-image-fill',
|
||||
'icon-diff-fill',
|
||||
'icon-file-copy-fill',
|
||||
'icon-snippets-fill',
|
||||
'icon-batchfolding-fill',
|
||||
'icon-reconciliation-fill',
|
||||
'icon-folder-add-fill',
|
||||
'icon-folder-fill',
|
||||
'icon-folder-open-fill',
|
||||
'icon-database-fill',
|
||||
'icon-container-fill',
|
||||
'icon-sever-fill',
|
||||
'icon-calendar-check-fill',
|
||||
'icon-image-fill',
|
||||
'icon-idcard-fill',
|
||||
'icon-creditcard-fill',
|
||||
'icon-fund-fill',
|
||||
'icon-read-fill',
|
||||
'icon-contacts-fill',
|
||||
'icon-delete-fill',
|
||||
'icon-notification-fill',
|
||||
'icon-flag-fill',
|
||||
'icon-moneycollect-fill',
|
||||
'icon-medicinebox-fill',
|
||||
'icon-rest-fill',
|
||||
'icon-shopping-fill',
|
||||
'icon-skin-fill',
|
||||
'icon-video-fill',
|
||||
'icon-sound-fill',
|
||||
'icon-bulb-fill',
|
||||
'icon-bell-fill',
|
||||
'icon-filter-fill',
|
||||
'icon-fire-fill',
|
||||
'icon-funnelplot-fill',
|
||||
'icon-gift-fill',
|
||||
'icon-hourglass-fill',
|
||||
'icon-home-fill',
|
||||
'icon-trophy-fill',
|
||||
'icon-location-fill',
|
||||
'icon-cloud-fill',
|
||||
'icon-customerservice-fill',
|
||||
'icon-experiment-fill',
|
||||
'icon-eye-fill',
|
||||
'icon-like-fill',
|
||||
'icon-lock-fill',
|
||||
'icon-unlike-fill',
|
||||
'icon-star-fill',
|
||||
'icon-unlock-fill',
|
||||
'icon-alert-fill',
|
||||
'icon-api-fill',
|
||||
'icon-highlight-fill',
|
||||
'icon-phone-fill',
|
||||
'icon-edit-fill',
|
||||
'icon-pushpin-fill',
|
||||
'icon-rocket-fill',
|
||||
'icon-thunderbolt-fill',
|
||||
'icon-tag-fill',
|
||||
'icon-wrench-fill',
|
||||
'icon-tags-fill',
|
||||
'icon-bank-fill',
|
||||
'icon-camera-fill',
|
||||
'icon-error-fill',
|
||||
'icon-crown-fill',
|
||||
'icon-mail-fill',
|
||||
'icon-car-fill',
|
||||
'icon-printer-fill',
|
||||
'icon-shop-fill',
|
||||
'icon-setting-fill',
|
||||
'icon-USB-fill',
|
||||
'icon-golden-fill',
|
||||
'icon-build-fill',
|
||||
'icon-boxplot-fill',
|
||||
'icon-sliders-fill',
|
||||
'icon-alibaba',
|
||||
'icon-alibabacloud',
|
||||
'icon-antdesign',
|
||||
'icon-ant-cloud',
|
||||
'icon-behance',
|
||||
'icon-googleplus',
|
||||
'icon-medium',
|
||||
'icon-google',
|
||||
'icon-IE',
|
||||
'icon-amazon',
|
||||
'icon-slack',
|
||||
'icon-alipay',
|
||||
'icon-taobao',
|
||||
'icon-zhihu',
|
||||
'icon-HTML',
|
||||
'icon-linkedin',
|
||||
'icon-yahoo',
|
||||
'icon-facebook',
|
||||
'icon-skype',
|
||||
'icon-CodeSandbox',
|
||||
'icon-chrome',
|
||||
'icon-codepen',
|
||||
'icon-aliwangwang',
|
||||
'icon-apple',
|
||||
'icon-android',
|
||||
'icon-sketch',
|
||||
'icon-Gitlab',
|
||||
'icon-dribbble',
|
||||
'icon-instagram',
|
||||
'icon-reddit',
|
||||
'icon-windows',
|
||||
'icon-yuque',
|
||||
'icon-Youtube',
|
||||
'icon-Gitlab-fill',
|
||||
'icon-dropbox',
|
||||
'icon-dingtalk',
|
||||
'icon-android-fill',
|
||||
'icon-apple-fill',
|
||||
'icon-HTML-fill',
|
||||
'icon-windows-fill',
|
||||
'icon-QQ',
|
||||
'icon-twitter',
|
||||
'icon-skype-fill',
|
||||
'icon-weibo',
|
||||
'icon-yuque-fill',
|
||||
'icon-Youtube-fill',
|
||||
'icon-yahoo-fill',
|
||||
'icon-wechat-fill',
|
||||
'icon-chrome-fill',
|
||||
'icon-alipay-circle-fill',
|
||||
'icon-aliwangwang-fill',
|
||||
'icon-behance-circle-fill',
|
||||
'icon-amazon-circle-fill',
|
||||
'icon-codepen-circle-fill',
|
||||
'icon-CodeSandbox-circle-f',
|
||||
'icon-dropbox-circle-fill',
|
||||
'icon-github-fill',
|
||||
'icon-dribbble-circle-fill',
|
||||
'icon-googleplus-circle-f',
|
||||
'icon-medium-circle-fill',
|
||||
'icon-QQ-circle-fill',
|
||||
'icon-IE-circle-fill',
|
||||
'icon-google-circle-fill',
|
||||
'icon-dingtalk-circle-fill',
|
||||
'icon-sketch-circle-fill',
|
||||
'icon-slack-circle-fill',
|
||||
'icon-twitter-circle-fill',
|
||||
'icon-taobao-circle-fill',
|
||||
'icon-weibo-circle-fill',
|
||||
'icon-zhihu-circle-fill',
|
||||
'icon-reddit-circle-fill',
|
||||
'icon-alipay-square-fill',
|
||||
'icon-dingtalk-square-fill',
|
||||
'icon-CodeSandbox-square-f',
|
||||
'icon-behance-square-fill',
|
||||
'icon-amazon-square-fill',
|
||||
'icon-codepen-square-fill',
|
||||
'icon-dribbble-square-fill',
|
||||
'icon-dropbox-square-fill',
|
||||
'icon-facebook-fill',
|
||||
'icon-googleplus-square-f',
|
||||
'icon-google-square-fill',
|
||||
'icon-instagram-fill',
|
||||
'icon-IE-square-fill',
|
||||
'icon-medium-square-fill',
|
||||
'icon-linkedin-fill',
|
||||
'icon-QQ-square-fill',
|
||||
'icon-reddit-square-fill',
|
||||
'icon-twitter-square-fill',
|
||||
'icon-sketch-square-fill',
|
||||
'icon-slack-square-fill',
|
||||
'icon-taobao-square-fill',
|
||||
'icon-weibo-square-fill',
|
||||
'icon-zhihu-square-fill',
|
||||
'icon-zoomout',
|
||||
'icon-apartment',
|
||||
'icon-audio',
|
||||
'icon-audio-fill',
|
||||
'icon-robot',
|
||||
'icon-zoomin'
|
||||
]
|
||||
},
|
||||
handleCopy(v) {
|
||||
if (navigator.clipboard) {
|
||||
/** 如果支持剪切板api */
|
||||
navigator.clipboard
|
||||
.writeText(`<svg class="icon-svg aui-navbar__icon-menu" style="height: 24px; width: 24px;" aria-hidden="true"><use xlink:href="#${v}"></use></svg>`)
|
||||
.then(() => {
|
||||
this.$message.success('已复制')
|
||||
})
|
||||
} else {
|
||||
this.$message.info('请打开 Console 手动复制.')
|
||||
console.log(`<svg class="icon-svg aui-navbar__icon-menu" style="height: 24px; width: 24px;" aria-hidden="true"><use xlink:href="#${v}"></use></svg>`)
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
this.$emit('destory-me')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.col-hover:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
</style>
|
@ -2,46 +2,17 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="产品编号/产品名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('prod.name') + ' / ' + $t('prod.code')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button @click="addOrEdit()">测试</el-button> -->
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrEdit()">新增</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrEdit()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||
<el-table-column prop="code" header-align="center" align="center" label="编码"></el-table-column>
|
||||
<el-table-column prop="name" header-align="center" align="center" label="名称"></el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"></el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"></el-table-column>
|
||||
<el-table-column prop="specifications" header-align="center" align="center" label="规格"></el-table-column>
|
||||
<el-table-column prop="unitDictValue" header-align="center" align="center" label="单位value,对应到数据字典label_value"></el-table-column>
|
||||
<el-table-column prop="area" header-align="center" align="center" label="一单位的面积(平方米)"></el-table-column>
|
||||
<el-table-column prop="processTime" header-align="center" align="center" label="加工一单位产品需要的时间"></el-table-column>
|
||||
<el-table-column prop="typeDictValue" header-align="center" align="center" label="产品类型value,对应到数据字典label_value"></el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"></el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"></el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"></el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"></el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"></el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"></el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"></el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"></el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"></el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@ -60,7 +31,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './product-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
@ -72,13 +46,13 @@ import { dictFilter } from '@/utils/filters'
|
||||
const UnitDictTypeId = '1557173812109242370'
|
||||
const ProductTypeDictTypeId = '1557179530308616193'
|
||||
const tableConfigs = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ prop: 'createTime', name: '添加时间', filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '产品名称' },
|
||||
{ prop: 'code', name: '产品编码' },
|
||||
{ prop: 'specifications', name: '规格' },
|
||||
{ prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId) },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] }
|
||||
{ prop: 'unitDictValue', name: i18n.t('unit'), filter: dictFilter(UnitDictTypeId) },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -115,7 +89,7 @@ const addOrUpdateConfigs = {
|
||||
},
|
||||
{
|
||||
name: 'unitDictValue',
|
||||
label: '单位',
|
||||
label: i18n.t('unit'),
|
||||
type: 'select',
|
||||
// placeholder: '请选择单位',
|
||||
options: [
|
||||
@ -133,8 +107,8 @@ const addOrUpdateConfigs = {
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/product', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/product', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/product', permission: 'monitoring:product:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/product', permission: 'monitoring:product:update', showOnEdit: true }
|
||||
],
|
||||
subtable: {
|
||||
// for i18n
|
||||
@ -142,11 +116,11 @@ const addOrUpdateConfigs = {
|
||||
url: '/monitoring/productArrt',
|
||||
relatedField: 'productId',
|
||||
tableConfigs: [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ prop: 'createTime', name: '添加时间', filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
|
||||
{ prop: 'name', name: '属性名', formField: true, rules: [{ required: true, message: '必填', trigger: 'blur' }] },
|
||||
{ prop: 'code', name: '属性值', formField: true },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') },
|
||||
{ prop: 'name', name: '属性名称', formField: true, rules: [{ required: true, message: i18n.t('required'), trigger: 'blur' }] },
|
||||
{ prop: 'code', name: i18n.t('attrValue'), formField: true },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -155,6 +129,7 @@ export default {
|
||||
mixins: [dictListMixin],
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -262,9 +237,9 @@ export default {
|
||||
this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,40 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productarrt:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productarrt:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||
<el-table-column prop="productId" header-align="center" align="center" label="产品id,关联产品表"> </el-table-column>
|
||||
<el-table-column prop="value" header-align="center" align="center" label="属性值"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"> </el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -52,20 +27,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './productArrt-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'name', name: '属性名称' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: i18n.t('attrName') },
|
||||
{ prop: 'code', name: '属性编码' },
|
||||
{ prop: 'productId', name: '产品id' },
|
||||
{ prop: 'value', name: '属性值' },
|
||||
{ prop: 'description', name: '描述' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'value', name: i18n.t('attrValue') },
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -74,7 +52,7 @@ const addOrUpdateConfigs = {
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
label: '属性名称',
|
||||
label: i18n.t('attrName'),
|
||||
placeholder: '请输入属性名称'
|
||||
},
|
||||
{
|
||||
@ -90,25 +68,26 @@ const addOrUpdateConfigs = {
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
label: '属性值',
|
||||
label: i18n.t('attrValue'),
|
||||
placeholder: '请输入属性值'
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
label: i18n.t('desc'),
|
||||
placeholder: '请输入描述'
|
||||
}
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/productArrt', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/productArrt', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/productArrt', permission: 'monitoring:productarrt:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/productArrt', permission: 'monitoring:productarrt:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -213,9 +192,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="产线名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('pl.name')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productionline:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productionline:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,20 +27,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'factoryName', name: '工厂' },
|
||||
{ prop: 'name', name: '产线名称' },
|
||||
{ prop: 'code', name: '产线编码' },
|
||||
{ prop: 'status', name: '产线状态' },
|
||||
{ prop: 'description', name: '描述' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -69,14 +72,15 @@ const addOrUpdateConfigs = {
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/productionLine', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/productionLine', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/productionLine', permission: 'monitoring:productionline:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/productionLine', permission: 'monitoring:productionline:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -177,9 +181,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,31 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="productionLineId" header-align="center" align="center" label="产线id"> </el-table-column>
|
||||
<el-table-column prop="inputNum" header-align="center" align="center" label="上一次记录时间至该条记录时间端内上片数量"> </el-table-column>
|
||||
<el-table-column prop="outputNum" header-align="center" align="center" label="上一次记录时间至该条记录时间端内下片数量"> </el-table-column>
|
||||
<el-table-column prop="recordTime" header-align="center" align="center" label="记录时间"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="sumInputNum" header-align="center" align="center" label="该记录时间点的累计上片数量"> </el-table-column>
|
||||
<el-table-column prop="sumOutputNum" header-align="center" align="center" label="该记录时间点的累计下片数量"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -43,7 +27,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './productionLineRecSch-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
@ -53,16 +40,17 @@ const tableConfigs = [
|
||||
{ prop: 'productionLineId', name: '产线id' },
|
||||
{ prop: 'inputNum', name: '上一次记录时间至该条记录时间端内上片数量' },
|
||||
{ prop: 'outputNum', name: '上一次记录时间至该条记录时间端内下片数量' },
|
||||
{ prop: 'recordTime', name: '记录时间' },
|
||||
{ prop: 'recordTime', name: i18n.t('recordTime') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'sumInputNum', name: '该记录时间点的累计上片数量' },
|
||||
{ prop: 'sumOutputNum', name: '该记录时间点的累计下片数量' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -135,9 +123,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="产线id" prop="productionLineId">
|
||||
<el-input v-model="dataForm.productionLineId" placeholder="产线id"></el-input>
|
||||
|
@ -7,24 +7,24 @@
|
||||
type="daterange"
|
||||
v-model="datetime"
|
||||
value-format="yyyy-MM-ddTHH:mm:ss"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
range-separator="至"
|
||||
:start-placeholder="$t('startTime')"
|
||||
:end-placeholder="$t('endTime')"
|
||||
:range-separator="$t('to')"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
:picker-options="quickOptions"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> -->
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="quality-inspection-current base-container">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<small-title :size="'md'">上下片及检测总数统计</small-title>
|
||||
<small-title :size="'md'">{{ $t('inspect.ioTotal') }}</small-title>
|
||||
<el-row style="margin-top: 12px;">
|
||||
<base-table :data="dataListStatic" :table-head-configs="tableConfigStatic" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
</el-row>
|
||||
@ -34,12 +34,12 @@
|
||||
<el-row style="margin-top: 28px;">
|
||||
<el-col>
|
||||
<el-row>
|
||||
<small-title :size="'md'">各产线检测类型统计</small-title>
|
||||
<small-title :size="'md'">{{ $t('inspect.plTotal') }}</small-title>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 8px;">
|
||||
<el-radio-group v-model="dataType" size="medium" @change="handleDataTypeChange">
|
||||
<el-radio-button label="表格"></el-radio-button>
|
||||
<el-radio-button label="图形"></el-radio-button>
|
||||
<el-radio-button :label="$t('table2')"></el-radio-button>
|
||||
<el-radio-button :label="$t('graph')"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 12px;">
|
||||
@ -60,20 +60,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import moment from 'moment'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import SmallTitle from '@/components/small-title'
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
const tableConfigStatic = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ name: '上片总数', prop: 'sumUp' },
|
||||
{ name: '下片总数', prop: 'sumDown' },
|
||||
{ name: '检测总数', prop: 'sumCheck' },
|
||||
{ name: '比例', prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
|
||||
]
|
||||
const tableConfigDynamic = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ name: '检测类型', prop: 'inspectionContent' },
|
||||
/** dynamic */
|
||||
{ name: '检测类型总数', prop: '' },
|
||||
@ -98,6 +101,7 @@ const FakeChart = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
chart: null,
|
||||
defaultOpts: {
|
||||
title: {
|
||||
@ -188,7 +192,7 @@ const FakeChart = {
|
||||
}
|
||||
}
|
||||
|
||||
const dict = ['表格', '图形']
|
||||
const dict = [i18n.t('table2'), i18n.t('graph')]
|
||||
export default {
|
||||
name: 'QualityInspectionCurrent',
|
||||
components: { BaseTable, SmallTitle, FakeChart },
|
||||
@ -205,7 +209,7 @@ export default {
|
||||
quickOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: '今天',
|
||||
text: i18n.t('today'),
|
||||
onClick(picker) {
|
||||
const baseTime = moment().set({ hour: 0, minute: 0, second: 0, millisecond: 0 })
|
||||
const startTime = baseTime.format('yyyy-MM-DDTHH:mm:ss')
|
||||
@ -229,7 +233,7 @@ export default {
|
||||
},
|
||||
getDataList() {
|
||||
this.showGraph = false
|
||||
this.dataType = '表格'
|
||||
this.dataType = i18n.t('table2')
|
||||
this.echartCategories = null
|
||||
this.echartCheckTypes.splice(0)
|
||||
/** 设置默认日期 */
|
||||
@ -276,7 +280,7 @@ export default {
|
||||
}
|
||||
|
||||
this.tableConfigDynamic = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ name: '检测类型', prop: 'inspectionContent' },
|
||||
...subProps,
|
||||
{ name: '检测类型总数', prop: 'sumInput' },
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="检测内容" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,19 +27,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './qualityInspectionDet-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'typeName', name: '检测类型' },
|
||||
{ prop: 'content', name: '检测内容' },
|
||||
{ prop: 'code', name: '检测编码' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -53,14 +56,15 @@ const addOrUpdateConfigs = {
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionDet', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/qualityInspectionDet', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionDet', permission: 'monitoring:qualityinspectiondet:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/qualityInspectionDet', permission: 'monitoring:qualityinspectiondet:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -165,9 +169,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<!-- <el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@ -36,29 +36,29 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './qualityInspectionRecord-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{
|
||||
prop: 'inspectionDetContent',
|
||||
name: '检测内容'
|
||||
// "name": "检测内容(设备推送消息时,可能无对应id,只填这个字段)"
|
||||
},
|
||||
{ prop: 'checkTime', name: '检测时间' },
|
||||
{ prop: 'checkTime', name: '检测时间', filter: timeFilter },
|
||||
{ prop: 'productionId', name: '产线id' },
|
||||
{ prop: 'sectionId', name: '工段id' },
|
||||
{ prop: 'checkPerson', name: '检测人员' },
|
||||
// { prop: 'checkPerson', name: '检测人员,可以多个' },
|
||||
{ prop: 'source', name: '来源', filter: val => ({ 1: '手动', 2: '自动' }[val]) },
|
||||
// { prop: 'source', name: '来源 1,手动(默认) 2,自动' },
|
||||
{ prop: 'explainText', name: '描述' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'explainText', name: i18n.t('desc') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -79,19 +79,20 @@ const addOrUpdateConfigs = {
|
||||
},
|
||||
{ name: 'inspectionDetId', label: '检测内容', type: 'select', options: [] },
|
||||
{ name: 'checkPerson', label: '检测人员' },
|
||||
{ name: 'explainText', label: '描述' },
|
||||
{ name: 'explainText', label: i18n.t('desc') },
|
||||
'remark'
|
||||
],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionRecord', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/qualityInspectionRecord', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionRecord', permission: 'monitoring:qualityinspectionrecord:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/qualityInspectionRecord', permission: 'monitoring:qualityinspectionrecord:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -246,9 +247,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="检测类型名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('inspect.typename')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -29,16 +29,18 @@
|
||||
<script>
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './qualityInspectionType-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '检测类型名称' },
|
||||
{ prop: 'code', name: '检测类型编码' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -47,14 +49,15 @@ const addOrUpdateConfigs = {
|
||||
fields: [{ name: 'name', label: '检测类型' }, { name: 'code', label: '检测类型编码', api: '/monitoring/qualityInspectionType/getCode' }, 'remark'],
|
||||
operations: [
|
||||
{ name: 'cancel', showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionType', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/qualityInspectionType', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -137,9 +140,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -8,22 +8,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<small-title :size="'md'">设备生产实时数据</small-title>
|
||||
<small-title :size="'md'">{{ $t('realtime.eq') }}</small-title>
|
||||
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []" :span-method="spanMethod" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import SmallTitle from '@/components/small-title'
|
||||
import moment from 'moment'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
export default {
|
||||
name: 'RealtimeDataOfEquipment',
|
||||
components: { BaseTable, SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
loadTable: false,
|
||||
tableProps: [{ label: 'default', prop: 'default' }],
|
||||
stepOneArray: [],
|
||||
@ -172,7 +175,7 @@ export default {
|
||||
// Step1: 设置静态的 table props
|
||||
const staticTableProps = [
|
||||
{ prop: 'lineName', label: '产线', fixed: true },
|
||||
{ prop: 'equName', label: '设备', fixed: true },
|
||||
{ prop: 'equName', label: i18n.t('equipment'), fixed: true },
|
||||
{ prop: 'totalProduction', label: '总产量', fixed: true }
|
||||
]
|
||||
this.tableProps = staticTableProps
|
||||
|
@ -8,22 +8,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<small-title :size="'md'">产线生产实时数据</small-title>
|
||||
<small-title :size="'md'">{{ $t('realtime.pl') }}</small-title>
|
||||
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import SmallTitle from '@/components/small-title'
|
||||
import moment from 'moment'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
export default {
|
||||
name: 'RealtimeDataOfLine',
|
||||
components: { BaseTable, SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
loadTable: false,
|
||||
dynamicPropSet: false,
|
||||
tableProps: [{ label: 'default', prop: 'default' }],
|
||||
|
@ -1,29 +1,29 @@
|
||||
<!--
|
||||
* @Author: lb
|
||||
* @Date: 2022-06-22 14:00:17
|
||||
* @LastEditors: lb
|
||||
* @LastEditTime: 2022-06-22 14:00:17
|
||||
* @Description: 质量检查实时数据
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<small-title :size="'md'">质量检查实时数据</small-title>
|
||||
<small-title :size="'md'">{{ $t('realtime.inspect') }}</small-title>
|
||||
<base-table v-if="loadTable" :table-head-configs="tableProps" :data="tableData.length ? tableData : []" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ts-nocheck
|
||||
/* eslint-disable */
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import SmallTitle from '@/components/small-title'
|
||||
import moment from 'moment'
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
|
||||
// tslint: disable
|
||||
export default {
|
||||
name: 'RealtimeDataOfTeam',
|
||||
components: { BaseTable, SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
loadTable: false,
|
||||
// dynamicPropSet: false,
|
||||
tableProps: [{ label: 'default', prop: 'default' }],
|
||||
@ -43,11 +43,11 @@ export default {
|
||||
})
|
||||
|
||||
this.intervalId = setInterval(() => {
|
||||
this.clearData()
|
||||
this.fetchList().then(res => {
|
||||
this.testData = res
|
||||
this.handleData()
|
||||
})
|
||||
this.clearData()
|
||||
this.fetchList().then(res => {
|
||||
this.testData = res
|
||||
this.handleData()
|
||||
})
|
||||
}, 1000 * 60 * 5)
|
||||
},
|
||||
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" placeholder="分类名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('categoryName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reportsheetcategory:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reportsheetcategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@ -30,38 +30,33 @@
|
||||
<script>
|
||||
// import AddOrUpdate from './reportSheetCategory-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '分类名称' },
|
||||
// { prop: 'code', name: '分类编码' },
|
||||
// 'description',
|
||||
// 'remark',
|
||||
{ prop: 'operations', name: '操作', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
type: 'dialog',
|
||||
infoUrl: '/monitoring/reportSheetCategory',
|
||||
fields: [
|
||||
{ name: 'name', label: '分类名称', required: true, span: 24 },
|
||||
// { name: 'code', label: '分类编码', required: true },
|
||||
// { name: 'description', label: '描述' },
|
||||
// { name: 'remark', label: '备注' }
|
||||
],
|
||||
fields: [{ name: 'name', label: '分类名称', required: true, span: 24 }],
|
||||
operations: [
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/reportSheetCategory', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/reportSheetCategory', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/reportSheetCategory', permission: 'monitoring:reportsheetcategory:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/reportSheetCategory', permission: 'monitoring:reportsheetcategory:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
addOrUpdateConfigs,
|
||||
dataForm: {
|
||||
@ -143,9 +138,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -22,9 +22,7 @@ export default {
|
||||
this.url += name ? '?_u=db:' + this.$route.query.name : ''
|
||||
const ifream = document.getElementById('zgboke')
|
||||
|
||||
console.log('url: ', this.url)
|
||||
ifream.onload = function() {
|
||||
console.log('加载完成')
|
||||
vm.loading = false
|
||||
}
|
||||
},
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" placeholder="报表名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('report.name')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<!-- <el-button v-if="$hasPermission('')" type="primary" @click="addOrUpdateHandle()">新增(跳到设计)</el-button> -->
|
||||
<el-button type="primary" @click="handleAdd()">新增</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reportsheet:save')" type="primary" @click="handleAdd()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -29,8 +29,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from './equipmentPlcConnect-add-or-update'
|
||||
import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import axios from '@/utils/request'
|
||||
@ -45,9 +48,7 @@ const CategoryList = {
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickedId: null
|
||||
}
|
||||
return { calcMaxHeight, pickedId: null }
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.injectData)
|
||||
@ -78,8 +79,8 @@ const addOrUpdateConfigs = {
|
||||
fields: [{ name: 'fileName', label: '报表名称', required: true, span: 24 }],
|
||||
operations: [
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/reportSheet', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/reportSheet', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/reportSheet', permission: 'monitoring:reportsheet:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/reportSheet', permission: 'monitoring:reportsheet:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
@ -116,13 +117,13 @@ export default {
|
||||
if (res.data && res.data.list) {
|
||||
const categories = res.data.list.map(item => ({ label: item.name, value: item.id }))
|
||||
this.tableConfigs = [
|
||||
{ type: 'index', name: '序号' },
|
||||
{ prop: 'createTime', name: '创建时间', width: 200 },
|
||||
{ type: 'index', width: 100, name: i18n.t('index') },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter, width: 200 },
|
||||
{ prop: 'fileName', name: '报表名称' },
|
||||
{ prop: 'category', name: '报表分类', subcomponent: CategoryList, options: categories },
|
||||
{
|
||||
prop: 'operations',
|
||||
name: '操作',
|
||||
name: i18n.t('handle'),
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
subcomponent: TableOperateComponent,
|
||||
@ -234,9 +235,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -25,13 +25,7 @@
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
allNum: 0
|
||||
}
|
||||
return { dataList: [], pageIndex: 1, pageSize: 10, totalPage: 0, allNum: 0 }
|
||||
},
|
||||
created() {
|
||||
this.getDataList()
|
||||
|
@ -7,7 +7,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div v-loading="loading" :class="$style.container">
|
||||
<small-title :size="'md'" style="margin-bottom: 10px">报表名称:{{ $route.query.name }}</small-title>
|
||||
<small-title :size="'md'" style="margin-bottom: 10px">{{ $t('report.name') + ': ' + $route.query.name }}</small-title>
|
||||
|
||||
<iframe id="reportView" :class="$style.mainIframe" name="mainIframe" :src="url" frameborder="0" scrolling="auto" />
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="分类:关联report_sheet_category" prop="category">
|
||||
<el-input v-model="dataForm.category" placeholder="分类:关联report_sheet_category"></el-input>
|
||||
@ -16,8 +16,8 @@
|
||||
<el-form-item label="链接地址" prop="url">
|
||||
<el-input v-model="dataForm.url" placeholder="链接地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
<el-form-item label=$t('desc') prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
@ -28,26 +28,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报表内容" prop="content">
|
||||
<el-input v-model="dataForm.content" placeholder="报表内容"></el-input>
|
||||
|
@ -2,42 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reporsheet:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reporsheet:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="category" header-align="center" align="center" label="分类:关联report_sheet_category"> </el-table-column>
|
||||
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"> </el-table-column>
|
||||
<el-table-column prop="url" header-align="center" align="center" label="链接地址"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column prop="content" header-align="center" align="center" label="报表内容"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -54,37 +27,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './reportSheet-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '创建时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '报表名称' },
|
||||
{ prop: 'code', name: '报表编码' },
|
||||
{ prop: 'category', name: '报表分类' },
|
||||
// { prop: 'id', name: 'ID' },
|
||||
// { prop: 'category', name: '分类:关联report_sheet_category' },
|
||||
{ prop: 'fileName', name: '文件名称' },
|
||||
{ prop: 'url', name: '链接地址' },
|
||||
{ prop: 'description', name: '描述' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'description', name: i18n.t('desc') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'content', name: '报表内容' },
|
||||
// { prop: 'enabled', name: '启用状态:0 、停用,1、启用' },
|
||||
// { prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
// { prop: 'creatorId', name: '创建人' },
|
||||
// { prop: 'creatorName', name: '创建人姓名' },
|
||||
// { prop: 'updaterId', name: '更新人' },
|
||||
// { prop: 'updaterName', name: '更新人姓名' },
|
||||
// { prop: 'updateTime', name: '更新时间' },
|
||||
// { prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -157,9 +124,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
@ -7,8 +7,8 @@
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
<el-form-item label=$t('desc') prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder=$t('desc')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编码,用于对照外部系统的编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部编码,用于对照外部系统的编码"></el-input>
|
||||
@ -22,26 +22,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -2,38 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reporsheecategory:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:reporsheecategory:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"> </el-table-column>
|
||||
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -50,33 +27,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './reportSheetCategory-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'name', name: '分类名称' },
|
||||
{ prop: 'code', name: '分类编码' },
|
||||
// { "prop": "id", "name": "ID" },
|
||||
// { "prop": "description", "name": "描述" },
|
||||
// { "prop": "externalCode", "name": "外部编码,用于对照外部系统的编码" },
|
||||
// { "prop": "enabled", "name": "启用状态:0 、停用,1、启用" },
|
||||
// { "prop": "remark", "name": "备注" },
|
||||
// { "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
// { "prop": "creatorId", "name": "创建人" },
|
||||
// { "prop": "creatorName", "name": "创建人姓名" },
|
||||
// { "prop": "updaterId", "name": "更新人" },
|
||||
// { "prop": "updaterName", "name": "更新人姓名" },
|
||||
// { "prop": "updateTime", "name": "更新时间" },
|
||||
// { prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: i18n.t('categoryName') },
|
||||
{ prop: 'code', name: i18n.t('categoryCode') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -149,9 +118,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="文件类型编号" prop="typeCode">
|
||||
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
||||
@ -19,26 +19,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -2,38 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:sysfile:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:sysfile:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="主键,自增"> </el-table-column>
|
||||
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编号"> </el-table-column>
|
||||
<el-table-column prop="fileCode" header-align="center" align="center" label="文件编号"> </el-table-column>
|
||||
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"> </el-table-column>
|
||||
<el-table-column prop="fileUrl" header-align="center" align="center" label="文件路径URL"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -50,31 +27,37 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import AddOrUpdate from './sysFile-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ "prop": "id", "name": "主键,自增" },
|
||||
{ "prop": "typeCode", "name": "文件类型编号" },
|
||||
{ "prop": "fileCode", "name": "文件编号" },
|
||||
{ "prop": "fileName", "name": "文件名称" },
|
||||
{ "prop": "fileUrl", "name": "文件路径URL" },
|
||||
{ "prop": "remark", "name": "备注" },
|
||||
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
{ "prop": "creatorId", "name": "创建人" },
|
||||
{ "prop": "creatorName", "name": "创建人姓名" },
|
||||
{ "prop": "createTime", "name": "添加时间" },
|
||||
{ "prop": "updaterId", "name": "更新人" },
|
||||
{ "prop": "updaterName", "name": "更新人姓名" },
|
||||
{ "prop": "updateTime", "name": "更新时间" },
|
||||
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'id', name: '主键,自增' },
|
||||
{ prop: 'typeCode', name: '文件类型编号' },
|
||||
{ prop: 'fileCode', name: '文件编号' },
|
||||
{ prop: 'fileName', name: '文件名称' },
|
||||
{ prop: 'fileUrl', name: '文件路径URL' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {tableConfigs,
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -88,7 +71,8 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,BaseTable
|
||||
AddOrUpdate,
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@ -145,14 +129,14 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/sysFile'),
|
||||
|
||||
|
||||
data: this.$http.adornData(ids, false)
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
|
@ -2,36 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:sysfiletype:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:sysfiletype:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="主键,自增"> </el-table-column>
|
||||
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编号"> </el-table-column>
|
||||
<el-table-column prop="typeName" header-align="center" align="center" label="文件类型名称"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -49,29 +28,33 @@
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './sysFileType-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const tableConfigs = [
|
||||
{ "prop": "id", "name": "主键,自增" },
|
||||
{ "prop": "typeCode", "name": "文件类型编号" },
|
||||
{ "prop": "typeName", "name": "文件类型名称" },
|
||||
{ "prop": "remark", "name": "备注" },
|
||||
{ "prop": "valid", "name": "删除标志,是否有效:1 可用 0不可用" },
|
||||
{ "prop": "creatorId", "name": "创建人" },
|
||||
{ "prop": "creatorName", "name": "创建人姓名" },
|
||||
{ "prop": "createTime", "name": "添加时间" },
|
||||
{ "prop": "updaterId", "name": "更新人" },
|
||||
{ "prop": "updaterName", "name": "更新人姓名" },
|
||||
{ "prop": "updateTime", "name": "更新时间" },
|
||||
{ "prop": "version", "name": "版本号" }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'id', name: '主键,自增' },
|
||||
{ prop: 'typeCode', name: '文件类型编号' },
|
||||
{ prop: 'typeName', name: '文件类型名称' },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
{ prop: 'creatorId', name: '创建人' },
|
||||
{ prop: 'creatorName', name: '创建人姓名' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'updaterId', name: '更新人' },
|
||||
{ prop: 'updaterName', name: '更新人姓名' },
|
||||
{ prop: 'updateTime', name: '更新时间', filter: timeFilter },
|
||||
{ prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {tableConfigs,
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
@ -85,7 +68,8 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,BaseTable
|
||||
AddOrUpdate,
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getDataList()
|
||||
@ -142,9 +126,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="文件类型编号" prop="typeCode">
|
||||
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
||||
@ -13,26 +13,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -5,6 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
|
||||
export default {
|
||||
@ -14,9 +15,9 @@ export default {
|
||||
return {
|
||||
configs: [
|
||||
{ prop: 'createTime', name: '创建日期' },
|
||||
{ prop: 'name', name: '名称' },
|
||||
{ prop: 'name', name: i18n.t('name') },
|
||||
{
|
||||
label: '地址',
|
||||
label: i18n.t('addr'),
|
||||
children: [
|
||||
{ prop: 'province', name: '省' },
|
||||
{
|
||||
@ -29,7 +30,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
{ prop: 'status', name: '状态', filter: val => ['激活', '注销'][val] }
|
||||
{ prop: 'status', name: i18n.t('status'), filter: val => ['激活', '注销'][val] }
|
||||
],
|
||||
dataList: [
|
||||
{ createTime: '2022-01-01', name: '奥特曼', province: '北京', city: '昌平', county: '怀宁', downtown: '石牌', status: 0 },
|
||||
|
@ -2,15 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="工段名称" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('ws.name')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:workshopsection:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:workshopsection:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -27,20 +27,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
// import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
import AddOrUpdate from './workshopSectionDialog.vue'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: '工段名称' },
|
||||
{ prop: 'code', name: '工段编码' },
|
||||
// { prop: 'productionLineId', name: '产线ID' },
|
||||
{ prop: 'productionLineName', name: '产线' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
const addOrUpdateConfigs = {
|
||||
@ -56,14 +58,15 @@ const addOrUpdateConfigs = {
|
||||
operations: [
|
||||
{ name: 'reset', url: true, showAlways: true },
|
||||
{ name: 'cancel', url: true, showAlways: true },
|
||||
{ name: 'save', url: '/monitoring/workshopSection', permission: '', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/workshopSection', permission: '', showOnEdit: true }
|
||||
{ name: 'save', url: '/monitoring/workshopSection', permission: 'monitoring:workshopsection:save', showOnEdit: false },
|
||||
{ name: 'update', url: '/monitoring/workshopSection', permission: 'monitoring:workshopsection:update', showOnEdit: true }
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
addOrUpdateConfigs,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
@ -163,9 +166,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -2,36 +2,15 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <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 prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||
<el-table-column prop="workshopSectionId" header-align="center" align="center" label="工段ID"> </el-table-column>
|
||||
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备ID"> </el-table-column>
|
||||
<el-table-column prop="sort" header-align="center" align="center" label="排序"> </el-table-column>
|
||||
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="500" />
|
||||
|
||||
<base-table :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -49,30 +28,25 @@
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './workshopSectionEquipment-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
import { calcMaxHeight } from '@/utils'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
const tableConfigs = [
|
||||
{ prop: 'createTime', name: '添加时间' },
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'workshopSectionId', name: '工段ID' },
|
||||
{ prop: 'equipmentId', name: '设备ID' },
|
||||
{ prop: 'sort', name: '排序' },
|
||||
{ prop: 'remark', name: '备注' },
|
||||
// { prop: 'id', name: 'ID' },
|
||||
// { prop: 'valid', name: '删除标志,是否有效:1 可用 0不可用' },
|
||||
// { prop: 'creatorId', name: '创建人' },
|
||||
// { prop: 'creatorName', name: '创建人姓名' },
|
||||
// { prop: 'updaterId', name: '更新人' },
|
||||
// { prop: 'updaterName', name: '更新人姓名' },
|
||||
// { prop: 'updateTime', name: '更新时间' },
|
||||
// { prop: 'version', name: '版本号' },
|
||||
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
@ -145,9 +119,9 @@ export default {
|
||||
: this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? i18n.t('delete') : i18n.t('deleteBatch')}]操作?`, '提示', {
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -1,59 +1,31 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="super-flexible-dialog"
|
||||
:title="isDetail ? '详情' : !dataForm.id ? '新增' : '编辑'"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-dialog class="super-flexible-dialog" :title="isDetail ? $t('ws.detail') : !dataForm.id ? $t('add') : $t('ws.edit')" :visible.sync="visible">
|
||||
<div style="max-height: 60vh; overflow-y: scroll; overflow-x: hidden;">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12"
|
||||
><el-form-item label="工段名称" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
placeholder="请输入工段名称"
|
||||
/> </el-form-item
|
||||
><el-form-item :label="$t('ws.name')" prop="name"> <el-input v-model="dataForm.name" :placeholder="$t('ws.name')" /> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="12"
|
||||
><el-form-item label="工段编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
placeholder="请输入工段编码"
|
||||
/> </el-form-item
|
||||
><el-form-item :label="$t('ws.code')" prop="code"> <el-input v-model="dataForm.code" :placeholder="$t('ws.code')" /> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12"
|
||||
><el-form-item label="所属产线" prop="productionLineId">
|
||||
<el-select
|
||||
v-model="dataForm.productionLineId"
|
||||
placeholder="请输入所属产线"
|
||||
>
|
||||
<el-option
|
||||
v-for="line in lineList"
|
||||
:key="line.id"
|
||||
:value="line.id"
|
||||
:label="line.name"
|
||||
/>
|
||||
<el-select v-model="dataForm.productionLineId" placeholder="请输入所属产线">
|
||||
<el-option v-for="line in lineList" :key="line.id" :value="line.id" :label="line.name" />
|
||||
</el-select> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="12"
|
||||
><el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
placeholder="请输入描述"
|
||||
/> </el-form-item
|
||||
><el-form-item :label="$t('desc')" prop="description"> <el-input v-model="dataForm.description" placeholder="请输入描述" /> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12"
|
||||
><el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="dataForm.remark"
|
||||
placeholder="请输入备注"
|
||||
/> </el-form-item
|
||||
><el-form-item label="备注" prop="remark"> <el-input v-model="dataForm.remark" placeholder="请输入备注" /> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@ -61,18 +33,10 @@
|
||||
<section class="attr-form-section" v-if="dataForm.id">
|
||||
<h3>
|
||||
设备绑定
|
||||
<el-button type="text" v-if="!showAttrForm" @click="addEq"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button>
|
||||
</h3>
|
||||
<div class="table" v-if="!showAttrForm">
|
||||
<base-table
|
||||
:data="eqList"
|
||||
:table-head-configs="tableProps"
|
||||
:max-height="500"
|
||||
@operate-event="handleOperations"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
<base-table :data="eqList" :table-head-configs="tableProps" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
@ -83,31 +47,19 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
</div>
|
||||
<attr-form
|
||||
v-else
|
||||
ref="AttrFrom"
|
||||
:workshop-section-id="dataForm.id"
|
||||
@close-attr-form="showAttrForm = false"
|
||||
@refresh-list="handleRefreshList"
|
||||
/>
|
||||
<attr-form v-else ref="AttrFrom" :workshop-section-id="dataForm.id" @close-attr-form="showAttrForm = false" @refresh-list="handleRefreshList" />
|
||||
</section>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClick({ name: 'cancel' })">返回</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="dataForm.id"
|
||||
@click="handleClick({ name: 'update' })"
|
||||
>更新</el-button
|
||||
>
|
||||
<el-button type="success" v-else @click="handleClick({ name: 'save' })"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button type="primary" v-if="dataForm.id" @click="handleClick({ name: 'update' })">更新</el-button>
|
||||
<el-button type="success" v-else @click="handleClick({ name: 'save' })">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import SmallTitle from '@/components/small-title'
|
||||
import { pick } from 'lodash/object'
|
||||
@ -118,7 +70,7 @@ const tableProps = [
|
||||
{ name: '设备名', prop: 'equipmentName' },
|
||||
{ name: '排序', prop: 'sort' },
|
||||
{
|
||||
name: '操作',
|
||||
name: i18n.t('handle'),
|
||||
prop: 'operations',
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
@ -178,19 +130,11 @@ export default {
|
||||
if (id) {
|
||||
// 编辑
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(
|
||||
'/monitoring/workshopSection/' + this.dataForm.id
|
||||
),
|
||||
url: this.$http.adornUrl('/monitoring/workshopSection/' + this.dataForm.id),
|
||||
method: 'get'
|
||||
}).then(({ data: res }) => {
|
||||
if (res.data) {
|
||||
const {
|
||||
name,
|
||||
code,
|
||||
productionLineId,
|
||||
description,
|
||||
remark
|
||||
} = res.data
|
||||
const { name, code, productionLineId, description, remark } = res.data
|
||||
this.dataForm.name = name
|
||||
this.dataForm.code = code
|
||||
this.dataForm.productionLineId = productionLineId
|
||||
@ -276,8 +220,8 @@ export default {
|
||||
handleDeleteEq(id) {
|
||||
this.$confirm(`确定删除这条记录吗?`, '提示', {
|
||||
// this.$confirm(`确定删除 ${id} 吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: i18n.t('confirm'),
|
||||
cancelButtonText: i18n.t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
|
@ -4,40 +4,21 @@
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataFormRules">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="edit ? '已绑定的设备' : '选择一个设备进行绑定'"
|
||||
prop="equipmentId"
|
||||
>
|
||||
<el-form-item :label="edit ? $t('ws.binded') : $t('ws.unbind')" prop="equipmentId">
|
||||
<el-select v-if="!edit" clearable v-model="dataForm.equipmentId">
|
||||
<el-option
|
||||
v-for="eq in eqList"
|
||||
:key="eq.id"
|
||||
:label="eq.name"
|
||||
:value="eq.id"
|
||||
/>
|
||||
<el-option v-for="eq in eqList" :key="eq.id" :label="eq.name" :value="eq.id" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-else
|
||||
disabled
|
||||
v-model="bindedEquipmentName"
|
||||
/> </el-form-item
|
||||
<el-input v-else disabled v-model="bindedEquipmentName" /> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
v-model="dataForm.sort"
|
||||
placeholder="请输入工段中设备的顺序"
|
||||
clearable
|
||||
/> </el-form-item
|
||||
<el-form-item :label="$t('ws.sort')" prop="sort"> <el-input v-model="dataForm.sort" :placeholder="$t('ws.setorder')" clearable /> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row style="text-align: right">
|
||||
<el-button size="small" @click="handleCancel">取消</el-button>
|
||||
<el-button size="small" type="success" @click="handleSave">{{
|
||||
edit ? '修改' : '绑定'
|
||||
}}</el-button>
|
||||
<el-button size="small" @click="handleCancel">{{ $t('cancel') }}</el-button>
|
||||
<el-button size="small" type="success" @click="handleSave">{{ edit ? $t('update') : $t('ws.bind') }}</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@ -127,15 +108,15 @@ export default {
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
if (res.data) {
|
||||
this.$message.success({
|
||||
message: '操作成功',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.$emit('refresh-list')
|
||||
this.handleCancel()
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$message.success({
|
||||
message: '操作成功',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.$emit('refresh-list')
|
||||
this.handleCancel()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-dialog :title="!dataForm.id ? i18n.t('add') : i18n.t('update')" :close-on-click-modal="false" :visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="工段ID" prop="workshopSectionId">
|
||||
<el-input v-model="dataForm.workshopSectionId" placeholder="工段ID"></el-input>
|
||||
@ -16,26 +16,26 @@
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
<el-form-item label=$t('creator') prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder=$t('creator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
<el-form-item label=$t('creatorName') prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder=$t('creatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
<el-form-item label=$t('updator') prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder=$t('updator')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
<el-form-item label=$t('updatorName') prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder=$t('updatorName')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
<el-form-item label=$t('updateTime') prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder=$t('updateTime')></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
<el-form-item label=$t('version') prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder=$t('version')></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -17,6 +17,9 @@
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="showIcons()">所有图标</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
@ -48,6 +51,8 @@
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
<!-- icons -->
|
||||
<icons-dialog ref="iconRef" v-if="displayIcon" @destory-me="handleDestory" />
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -56,6 +61,7 @@
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import AddOrUpdate from './dict-type-add-or-update'
|
||||
import { addDynamicRoute } from '@/router'
|
||||
import IconsDialog from '@/views/modules/monitoring/icons-dialog.vue'
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
@ -66,6 +72,7 @@ export default {
|
||||
deleteURL: '/sys/dict/type',
|
||||
deleteIsBatch: true
|
||||
},
|
||||
displayIcon: false,
|
||||
dataForm: {
|
||||
id: '0',
|
||||
dictName: '',
|
||||
@ -74,9 +81,20 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
IconsDialog
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
showIcons() {
|
||||
this.displayIcon = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.iconRef.init()
|
||||
})
|
||||
},
|
||||
handleDestory() {
|
||||
this.displayIcon = false
|
||||
},
|
||||
// 子级
|
||||
childHandle(row) {
|
||||
// 路由参数
|
||||
|
Loading…
Reference in New Issue
Block a user