format
This commit is contained in:
parent
ffad1a2643
commit
b79efe0a19
@ -2,7 +2,6 @@
|
|||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"bracketSameLine": true,
|
"bracketSameLine": true,
|
||||||
"htmlWhitespaceSensitivity": "ignore",
|
|
||||||
"embeddedLanguageFormatting": "auto",
|
"embeddedLanguageFormatting": "auto",
|
||||||
"printWidth": 180,
|
"printWidth": 180,
|
||||||
"quoteProps": "consistent",
|
"quoteProps": "consistent",
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :visible.sync="visible" :title="$t('updatePassword.title')" :close-on-click-modal="false" :close-on-press-escape="false" :append-to-body="true">
|
||||||
:visible.sync="visible"
|
|
||||||
:title="$t('updatePassword.title')"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:close-on-press-escape="false"
|
|
||||||
:append-to-body="true">
|
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||||
<el-form-item :label="$t('updatePassword.username')">
|
<el-form-item :label="$t('updatePassword.username')">
|
||||||
<span>{{ $store.state.user.name }}</span>
|
<span>{{ $store.state.user.name }}</span>
|
||||||
@ -49,12 +44,8 @@ export default {
|
|||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
password: [
|
password: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
newPassword: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
],
|
|
||||||
newPassword: [
|
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
||||||
],
|
|
||||||
confirmPassword: [
|
confirmPassword: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
||||||
{ validator: validateConfirmPassword, trigger: 'blur' }
|
{ validator: validateConfirmPassword, trigger: 'blur' }
|
||||||
@ -70,12 +61,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(function () {
|
dataFormSubmitHandle: debounce(
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
function() {
|
||||||
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.$http.put('/sys/user/password', this.dataForm).then(({ data: res }) => {
|
this.$http
|
||||||
|
.put('/sys/user/password', this.dataForm)
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -89,9 +83,13 @@ export default {
|
|||||||
this.$router.replace({ name: 'login' })
|
this.$router.replace({ name: 'login' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
|
||||||
})
|
})
|
||||||
}, 1000, { 'leading': true, 'trailing': false })
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
1000,
|
||||||
|
{ leading: true, trailing: false }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<el-menu-item index="5" class="aui-navbar__avatar">
|
<el-menu-item index="5" class="aui-navbar__avatar">
|
||||||
<el-dropdown placement="bottom" :show-timeout="0">
|
<el-dropdown placement="bottom" :show-timeout="0">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<img src="~@/assets/img/avatar.png">
|
<img src="~@/assets/img/avatar.png" />
|
||||||
<span>{{ $store.state.user.name }}</span>
|
<span>{{ $store.state.user.name }}</span>
|
||||||
<i class="el-icon-arrow-down"></i>
|
<i class="el-icon-arrow-down"></i>
|
||||||
</span>
|
</span>
|
||||||
@ -84,19 +84,24 @@ export default {
|
|||||||
},
|
},
|
||||||
// 退出
|
// 退出
|
||||||
logoutHandle() {
|
logoutHandle() {
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {
|
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
|
||||||
confirmButtonText: this.$t('confirm'),
|
confirmButtonText: this.$t('confirm'),
|
||||||
cancelButtonText: this.$t('cancel'),
|
cancelButtonText: this.$t('cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
})
|
||||||
this.$http.post(this.$http.adornUrl('/doLogout')).then(({ data: res }) => {
|
.then(() => {
|
||||||
|
this.$http
|
||||||
|
.post(this.$http.adornUrl('/doLogout'))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 200) {
|
if (res.code !== 200) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
clearLoginInfo()
|
clearLoginInfo()
|
||||||
this.$router.push({ name: "Login" })
|
this.$router.push({ name: 'Login' })
|
||||||
}).catch(() => {})
|
})
|
||||||
}).catch(() => {})
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
<div class="mod-home">
|
<div class="mod-home">
|
||||||
<h3>项目介绍</h3>
|
<h3>项目介绍</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>renren-ui基于vue、element-ui构建开发,实现<a href="https://gitee.com/renrenio/renren-ui" target="_blank">renren-security</a>后台管理前端功能,提供一套更优的前端解决方案</li>
|
<li>
|
||||||
|
renren-ui基于vue、element-ui构建开发,实现<a href="https://gitee.com/renrenio/renren-ui" target="_blank">renren-security</a>后台管理前端功能,提供一套更优的前端解决方案
|
||||||
|
</li>
|
||||||
<li>前后端分离,通过token进行数据交互,可独立部署</li>
|
<li>前后端分离,通过token进行数据交互,可独立部署</li>
|
||||||
<li>动态菜单,通过菜单管理统一管理访问路由</li>
|
<li>动态菜单,通过菜单管理统一管理访问路由</li>
|
||||||
<li>演示地址:<a href="http://demo.open.renren.io/renren-security" target="_blank">http://demo.open.renren.io/renren-security</a> (账号密码:admin/admin)</li>
|
<li>演示地址:<a href="http://demo.open.renren.io/renren-security" target="_blank">http://demo.open.renren.io/renren-security</a> (账号密码:admin/admin)</li>
|
||||||
|
@ -10,126 +10,26 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmenfile:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenfile:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label=""> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="fileId" header-align="center" align="center" label="文件ID"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
label="">
|
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编号"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="fileName" header-align="center" align="center" label="文件名字"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="fileUrl" header-align="center" align="center" label="下载地址"> </el-table-column>
|
||||||
prop="equipmentId"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -143,7 +43,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -181,9 +82,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenfile/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenfile/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -220,7 +121,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,108 +10,23 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmengroup:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmengroup:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="code" header-align="center" align="center" label="分组编码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="name" header-align="center" align="center" label="分组名字"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="typeId" header-align="center" align="center" label="设备类型id"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
</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="typeId"
|
|
||||||
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="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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -125,7 +40,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -163,9 +79,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmengroup/page'),
|
url: this.$http.adornUrl('/monitoring/equipmengroup/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -202,7 +118,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :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-form-item label="报警信息ID,关联T_equipment_group_alarm表" prop="alarmId">
|
||||||
<el-input v-model="dataForm.alarmId" placeholder="报警信息ID,关联T_equipment_group_alarm表"></el-input>
|
<el-input v-model="dataForm.alarmId" placeholder="报警信息ID,关联T_equipment_group_alarm表"></el-input>
|
||||||
@ -73,45 +70,19 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
alarmId: [
|
alarmId: [{ required: true, message: '报警信息ID,关联T_equipment_group_alarm表不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警信息ID,关联T_equipment_group_alarm表不能为空', trigger: 'blur' }
|
alarmSource: [{ required: true, message: '报警来源不能为空', trigger: 'blur' }],
|
||||||
],
|
alarmContent: [{ required: true, message: '报警详细内容不能为空', trigger: 'blur' }],
|
||||||
alarmSource: [
|
alarmEquipmentId: [{ required: true, message: '报警设备id 关联equipment表不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警来源不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
alarmContent: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警详细内容不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
alarmEquipmentId: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警设备id 关联equipment表不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -148,26 +119,26 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmenalarmlog/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmenalarmlog/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'alarmId': this.dataForm.alarmId,
|
alarmId: this.dataForm.alarmId,
|
||||||
'alarmSource': this.dataForm.alarmSource,
|
alarmSource: this.dataForm.alarmSource,
|
||||||
'alarmContent': this.dataForm.alarmContent,
|
alarmContent: this.dataForm.alarmContent,
|
||||||
'alarmEquipmentId': this.dataForm.alarmEquipmentId,
|
alarmEquipmentId: this.dataForm.alarmEquipmentId,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="设备ID" prop="equipmentId">
|
<el-form-item label="设备ID" prop="equipmentId">
|
||||||
<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
|
<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
|
||||||
@ -69,42 +66,18 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
equipmentId: [
|
equipmentId: [{ required: true, message: '设备ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备ID不能为空', trigger: 'blur' }
|
attrName: [{ required: true, message: '属性名称不能为空', trigger: 'blur' }],
|
||||||
],
|
attrValue: [{ required: true, message: '属性值不能为空', trigger: 'blur' }],
|
||||||
attrName: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '属性名称不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
attrValue: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '属性值不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -140,25 +113,25 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmenattr/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmenattr/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'equipmentId': this.dataForm.equipmentId,
|
equipmentId: this.dataForm.equipmentId,
|
||||||
'attrName': this.dataForm.attrName,
|
attrName: this.dataForm.attrName,
|
||||||
'attrValue': this.dataForm.attrValue,
|
attrValue: this.dataForm.attrValue,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,102 +10,22 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmenattr:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenattr:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="attrName" header-align="center" align="center" label="属性名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="attrValue" header-align="center" align="center" label="属性值"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -119,7 +39,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -157,9 +78,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenattr/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenattr/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -196,7 +117,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="设备ID" prop="equipmentId">
|
<el-form-item label="设备ID" prop="equipmentId">
|
||||||
<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
|
<el-input v-model="dataForm.equipmentId" placeholder="设备ID"></el-input>
|
||||||
@ -85,54 +82,22 @@
|
|||||||
fileUrl: ''
|
fileUrl: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
equipmentId: [
|
equipmentId: [{ required: true, message: '设备ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备ID不能为空', trigger: 'blur' }
|
fileId: [{ required: true, message: '文件ID不能为空', trigger: 'blur' }],
|
||||||
],
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
fileId: [
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件ID不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
description: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
enabled: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
typeCode: [{ required: true, message: '文件类型编号不能为空', trigger: 'blur' }],
|
||||||
],
|
fileName: [{ required: true, message: '文件名字不能为空', trigger: 'blur' }],
|
||||||
valid: [
|
fileUrl: [{ required: true, message: '下载地址不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
typeCode: [
|
|
||||||
{ required: true, message: '文件类型编号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
fileName: [
|
|
||||||
{ required: true, message: '文件名字不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
fileUrl: [
|
|
||||||
{ required: true, message: '下载地址不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -172,29 +137,29 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmenfile/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmenfile/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'equipmentId': this.dataForm.equipmentId,
|
equipmentId: this.dataForm.equipmentId,
|
||||||
'fileId': this.dataForm.fileId,
|
fileId: this.dataForm.fileId,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'typeCode': this.dataForm.typeCode,
|
typeCode: this.dataForm.typeCode,
|
||||||
'fileName': this.dataForm.fileName,
|
fileName: this.dataForm.fileName,
|
||||||
'fileUrl': this.dataForm.fileUrl
|
fileUrl: this.dataForm.fileUrl
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="分组编码" prop="code">
|
<el-form-item label="分组编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="分组编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="分组编码"></el-input>
|
||||||
@ -73,45 +70,19 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '分组编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '分组编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '分组名字不能为空', trigger: 'blur' }],
|
||||||
],
|
typeId: [{ required: true, message: '设备类型id不能为空', trigger: 'blur' }],
|
||||||
name: [
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '分组名字不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
typeId: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备类型id不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
description: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -148,26 +119,26 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmengroup/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmengroup/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'typeId': this.dataForm.typeId,
|
typeId: this.dataForm.typeId,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="设备分组ID,关联t_equipment_group" prop="equipmentGroupId">
|
<el-form-item label="设备分组ID,关联t_equipment_group" prop="equipmentGroupId">
|
||||||
<el-input v-model="dataForm.equipmentGroupId" placeholder="设备分组ID,关联t_equipment_group"></el-input>
|
<el-input v-model="dataForm.equipmentGroupId" placeholder="设备分组ID,关联t_equipment_group"></el-input>
|
||||||
@ -93,60 +90,24 @@
|
|||||||
alarmNotify: ''
|
alarmNotify: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
equipmentGroupId: [
|
equipmentGroupId: [{ required: true, message: '设备分组ID,关联t_equipment_group不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备分组ID,关联t_equipment_group不能为空', trigger: 'blur' }
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
],
|
typeDictValue: [{ required: true, message: '报警类型 字典表关联label_value不能为空', trigger: 'blur' }],
|
||||||
code: [
|
gradeDictValue: [{ required: true, message: '报警级别 字典表关联label_value不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
alarmContent: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
|
||||||
],
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
typeDictValue: [
|
externalCode: [{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警类型 字典表关联label_value不能为空', trigger: 'blur' }
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
gradeDictValue: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警级别 字典表关联label_value不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
alarmContent: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '报警内容不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
description: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
],
|
alarmNotify: [{ required: true, message: '推送方式 0邮箱 1微信不能为空', trigger: 'blur' }]
|
||||||
externalCode: [
|
|
||||||
{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
alarmNotify: [
|
|
||||||
{ required: true, message: '推送方式 0邮箱 1微信不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -188,31 +149,31 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmengroupalarm/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmengroupalarm/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'equipmentGroupId': this.dataForm.equipmentGroupId,
|
equipmentGroupId: this.dataForm.equipmentGroupId,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'typeDictValue': this.dataForm.typeDictValue,
|
typeDictValue: this.dataForm.typeDictValue,
|
||||||
'gradeDictValue': this.dataForm.gradeDictValue,
|
gradeDictValue: this.dataForm.gradeDictValue,
|
||||||
'alarmContent': this.dataForm.alarmContent,
|
alarmContent: this.dataForm.alarmContent,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'alarmNotify': this.dataForm.alarmNotify
|
alarmNotify: this.dataForm.alarmNotify
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="plc类型" prop="plcType">
|
<el-form-item label="plc类型" prop="plcType">
|
||||||
<el-input v-model="dataForm.plcType" placeholder="plc类型"></el-input>
|
<el-input v-model="dataForm.plcType" placeholder="plc类型"></el-input>
|
||||||
@ -105,69 +102,27 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
plcType: [
|
plcType: [{ required: true, message: 'plc类型不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: 'plc类型不能为空', trigger: 'blur' }
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
],
|
name: [{ required: true, message: 'plc名称(ip+名称对应实时数据库表名)不能为空', trigger: 'blur' }],
|
||||||
code: [
|
enName: [{ required: true, message: '英文名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
],
|
barcode: [{ required: true, message: 'plc条码不能为空', trigger: 'blur' }],
|
||||||
name: [
|
controlType: [{ required: true, message: '链接方式,0 tcp,1 udp等不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: 'plc名称(ip+名称对应实时数据库表名)不能为空', trigger: 'blur' }
|
monitor: [{ required: true, message: '是否监控 0 代表不监控, 1 代表监控不能为空', trigger: 'blur' }],
|
||||||
],
|
collection: [{ required: true, message: '是否采集 0 代表不采集, 1 代表采集不能为空', trigger: 'blur' }],
|
||||||
enName: [
|
ip: [{ required: true, message: 'IP不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '英文名称不能为空', trigger: 'blur' }
|
port: [{ required: true, message: '端口号不能为空', trigger: 'blur' }],
|
||||||
],
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
description: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
barcode: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: 'plc条码不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
controlType: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '链接方式,0 tcp,1 udp等不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
monitor: [
|
|
||||||
{ required: true, message: '是否监控 0 代表不监控, 1 代表监控不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
collection: [
|
|
||||||
{ required: true, message: '是否采集 0 代表不采集, 1 代表采集不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
ip: [
|
|
||||||
{ required: true, message: 'IP不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
port: [
|
|
||||||
{ required: true, message: '端口号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -212,34 +167,34 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmenplc/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmenplc/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'plcType': this.dataForm.plcType,
|
plcType: this.dataForm.plcType,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'enName': this.dataForm.enName,
|
enName: this.dataForm.enName,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'barcode': this.dataForm.barcode,
|
barcode: this.dataForm.barcode,
|
||||||
'controlType': this.dataForm.controlType,
|
controlType: this.dataForm.controlType,
|
||||||
'monitor': this.dataForm.monitor,
|
monitor: this.dataForm.monitor,
|
||||||
'collection': this.dataForm.collection,
|
collection: this.dataForm.collection,
|
||||||
'ip': this.dataForm.ip,
|
ip: this.dataForm.ip,
|
||||||
'port': this.dataForm.port,
|
port: this.dataForm.port,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="plc连接表ID" prop="plcConId">
|
<el-form-item label="plc连接表ID" prop="plcConId">
|
||||||
<el-input v-model="dataForm.plcConId" placeholder="plc连接表ID"></el-input>
|
<el-input v-model="dataForm.plcConId" placeholder="plc连接表ID"></el-input>
|
||||||
@ -125,84 +122,32 @@
|
|||||||
reportingCode: ''
|
reportingCode: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
plcConId: [
|
plcConId: [{ required: true, message: 'plc连接表ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: 'plc连接表ID不能为空', trigger: 'blur' }
|
type: [{ required: true, message: '类型:status、data、constant不能为空', trigger: 'blur' }],
|
||||||
],
|
paramCode: [{ required: true, message: '参数编码不能为空', trigger: 'blur' }],
|
||||||
type: [
|
paramName: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '类型:status、data、constant不能为空', trigger: 'blur' }
|
paramAddress: [{ required: true, message: '参数地址,对应实时数据库表的列名不能为空', trigger: 'blur' }],
|
||||||
],
|
valueType: [{ required: true, message: '参数值类型:int、long、boolean、string、list 暂不使用不能为空', trigger: 'blur' }],
|
||||||
paramCode: [
|
unitDictValue: [{ required: true, message: '单位 关联数据字典表label_value不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '参数编码不能为空', trigger: 'blur' }
|
minValue: [{ required: true, message: '最小值不能为空', trigger: 'blur' }],
|
||||||
],
|
maxValue: [{ required: true, message: '最大值不能为空', trigger: 'blur' }],
|
||||||
paramName: [
|
defaultValue: [{ required: true, message: '参数设定标准值不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '参数名称不能为空', trigger: 'blur' }
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
],
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
paramAddress: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '参数地址,对应实时数据库表的列名不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
valueType: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '参数值类型:int、long、boolean、string、list 暂不使用不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
unitDictValue: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '单位 关联数据字典表label_value不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
minValue: [
|
collection: [{ required: true, message: '0 代表不采集, 1 代表采集不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '最小值不能为空', trigger: 'blur' }
|
collectionCycle: [{ required: true, message: '采集周期(s) 暂不使用不能为空', trigger: 'blur' }],
|
||||||
],
|
reportingCycle: [{ required: true, message: '上报周期(s) 暂不使用不能为空', trigger: 'blur' }],
|
||||||
maxValue: [
|
reportingMethod: [{ required: true, message: '上报方式 暂不使用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '最大值不能为空', trigger: 'blur' }
|
reportingCode: [{ required: true, message: '上报编码 暂不使用不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
defaultValue: [
|
|
||||||
{ required: true, message: '参数设定标准值不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
description: [
|
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
collection: [
|
|
||||||
{ required: true, message: '0 代表不采集, 1 代表采集不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
collectionCycle: [
|
|
||||||
{ required: true, message: '采集周期(s) 暂不使用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
reportingCycle: [
|
|
||||||
{ required: true, message: '上报周期(s) 暂不使用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
reportingMethod: [
|
|
||||||
{ required: true, message: '上报方式 暂不使用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
reportingCode: [
|
|
||||||
{ required: true, message: '上报编码 暂不使用不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -252,39 +197,39 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmenplcparam/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmenplcparam/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'plcConId': this.dataForm.plcConId,
|
plcConId: this.dataForm.plcConId,
|
||||||
'type': this.dataForm.type,
|
type: this.dataForm.type,
|
||||||
'paramCode': this.dataForm.paramCode,
|
paramCode: this.dataForm.paramCode,
|
||||||
'paramName': this.dataForm.paramName,
|
paramName: this.dataForm.paramName,
|
||||||
'paramAddress': this.dataForm.paramAddress,
|
paramAddress: this.dataForm.paramAddress,
|
||||||
'valueType': this.dataForm.valueType,
|
valueType: this.dataForm.valueType,
|
||||||
'unitDictValue': this.dataForm.unitDictValue,
|
unitDictValue: this.dataForm.unitDictValue,
|
||||||
'minValue': this.dataForm.minValue,
|
minValue: this.dataForm.minValue,
|
||||||
'maxValue': this.dataForm.maxValue,
|
maxValue: this.dataForm.maxValue,
|
||||||
'defaultValue': this.dataForm.defaultValue,
|
defaultValue: this.dataForm.defaultValue,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'collection': this.dataForm.collection,
|
collection: this.dataForm.collection,
|
||||||
'collectionCycle': this.dataForm.collectionCycle,
|
collectionCycle: this.dataForm.collectionCycle,
|
||||||
'reportingCycle': this.dataForm.reportingCycle,
|
reportingCycle: this.dataForm.reportingCycle,
|
||||||
'reportingMethod': this.dataForm.reportingMethod,
|
reportingMethod: this.dataForm.reportingMethod,
|
||||||
'reportingCode': this.dataForm.reportingCode
|
reportingCode: this.dataForm.reportingCode
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="设备外部编码" prop="externalCode">
|
<el-form-item label="设备外部编码" prop="externalCode">
|
||||||
<el-input v-model="dataForm.externalCode" placeholder="设备外部编码"></el-input>
|
<el-input v-model="dataForm.externalCode" placeholder="设备外部编码"></el-input>
|
||||||
@ -89,57 +86,23 @@
|
|||||||
recordTime: ''
|
recordTime: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
externalCode: [
|
externalCode: [{ required: true, message: '设备外部编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备外部编码不能为空', trigger: 'blur' }
|
equipmentName: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
|
||||||
],
|
inQuantity: [{ required: true, message: '进入设备的数量不能为空', trigger: 'blur' }],
|
||||||
equipmentName: [
|
outQuantity: [{ required: true, message: '离开设备的数量,若plc只记录一个生产数量,也写入该字段不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备名称不能为空', trigger: 'blur' }
|
okQuantity: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
],
|
nokQuantity: [{ required: true, message: '设备上报的报废数量不能为空', trigger: 'blur' }],
|
||||||
inQuantity: [
|
description: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '进入设备的数量不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
outQuantity: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '离开设备的数量,若plc只记录一个生产数量,也写入该字段不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
okQuantity: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
nokQuantity: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备上报的报废数量不能为空', trigger: 'blur' }
|
recordTime: [{ required: true, message: '生产数量的记录时间不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
description: [
|
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
recordTime: [
|
|
||||||
{ required: true, message: '生产数量的记录时间不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -180,30 +143,30 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmenquantity/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmenquantity/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'equipmentName': this.dataForm.equipmentName,
|
equipmentName: this.dataForm.equipmentName,
|
||||||
'inQuantity': this.dataForm.inQuantity,
|
inQuantity: this.dataForm.inQuantity,
|
||||||
'outQuantity': this.dataForm.outQuantity,
|
outQuantity: this.dataForm.outQuantity,
|
||||||
'okQuantity': this.dataForm.okQuantity,
|
okQuantity: this.dataForm.okQuantity,
|
||||||
'nokQuantity': this.dataForm.nokQuantity,
|
nokQuantity: this.dataForm.nokQuantity,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'recordTime': this.dataForm.recordTime
|
recordTime: this.dataForm.recordTime
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||||
@ -125,84 +122,32 @@
|
|||||||
externalCodeStatis: ''
|
externalCodeStatis: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
|
||||||
],
|
enName: [{ required: true, message: '英文名称不能为空', trigger: 'blur' }],
|
||||||
name: [
|
abbr: [{ required: true, message: '缩写不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备名称不能为空', trigger: 'blur' }
|
enterTime: [{ required: true, message: '进厂日期不能为空', trigger: 'blur' }],
|
||||||
],
|
productionTime: [{ required: true, message: '生产日期不能为空', trigger: 'blur' }],
|
||||||
enName: [
|
equipmentTypeId: [{ required: true, message: '设备类型,关联设备类型表不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '英文名称不能为空', trigger: 'blur' }
|
groupId: [{ required: true, message: '分组id (关联 T_EQUIPMENT_GROUP)不能为空', trigger: 'blur' }],
|
||||||
],
|
dataType: [{ required: true, message: '0:无类别,1:上片数据设备,2:下片数据设备不能为空', trigger: 'blur' }],
|
||||||
abbr: [
|
tvalue: [{ required: true, message: '每小时生产数量不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '缩写不能为空', trigger: 'blur' }
|
processingTime: [{ required: true, message: '单件加工时间 s/件不能为空', trigger: 'blur' }],
|
||||||
],
|
manufacturer: [{ required: true, message: '制造商不能为空', trigger: 'blur' }],
|
||||||
enterTime: [
|
spec: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '进厂日期不能为空', trigger: 'blur' }
|
description: [{ required: true, message: '功能描述不能为空', trigger: 'blur' }],
|
||||||
],
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
productionTime: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
equipmentTypeId: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备类型,关联设备类型表不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
groupId: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '分组id (关联 T_EQUIPMENT_GROUP)不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
dataType: [
|
externalCode: [{ required: true, message: '外部系统代码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '0:无类别,1:上片数据设备,2:下片数据设备不能为空', trigger: 'blur' }
|
externalCodeStatis: [{ required: true, message: '统一用的外部代码,代表用哪个设备的数据代替该设备,目前用于生产数量统计不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
tvalue: [
|
|
||||||
{ required: true, message: '每小时生产数量不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
processingTime: [
|
|
||||||
{ required: true, message: '单件加工时间 s/件不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
manufacturer: [
|
|
||||||
{ required: true, message: '制造商不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
spec: [
|
|
||||||
{ required: true, message: '规格不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
description: [
|
|
||||||
{ required: true, message: '功能描述不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
externalCode: [
|
|
||||||
{ required: true, message: '外部系统代码不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
externalCodeStatis: [
|
|
||||||
{ required: true, message: '统一用的外部代码,代表用哪个设备的数据代替该设备,目前用于生产数量统计不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -252,39 +197,39 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipment/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipment/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'enName': this.dataForm.enName,
|
enName: this.dataForm.enName,
|
||||||
'abbr': this.dataForm.abbr,
|
abbr: this.dataForm.abbr,
|
||||||
'enterTime': this.dataForm.enterTime,
|
enterTime: this.dataForm.enterTime,
|
||||||
'productionTime': this.dataForm.productionTime,
|
productionTime: this.dataForm.productionTime,
|
||||||
'equipmentTypeId': this.dataForm.equipmentTypeId,
|
equipmentTypeId: this.dataForm.equipmentTypeId,
|
||||||
'groupId': this.dataForm.groupId,
|
groupId: this.dataForm.groupId,
|
||||||
'dataType': this.dataForm.dataType,
|
dataType: this.dataForm.dataType,
|
||||||
'tvalue': this.dataForm.tvalue,
|
tvalue: this.dataForm.tvalue,
|
||||||
'processingTime': this.dataForm.processingTime,
|
processingTime: this.dataForm.processingTime,
|
||||||
'manufacturer': this.dataForm.manufacturer,
|
manufacturer: this.dataForm.manufacturer,
|
||||||
'spec': this.dataForm.spec,
|
spec: this.dataForm.spec,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'externalCodeStatis': this.dataForm.externalCodeStatis
|
externalCodeStatis: this.dataForm.externalCodeStatis
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,108 +10,23 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenalarmlog:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="alarmId" header-align="center" align="center" label="报警信息ID,关联T_equipment_group_alarm表"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="alarmSource" header-align="center" align="center" label="报警来源"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="alarmContent" header-align="center" align="center" label="报警详细内容"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="alarmEquipmentId" header-align="center" align="center" label="报警设备id 关联equipment表"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
</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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -125,7 +40,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -163,9 +79,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenalarmlog/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenalarmlog/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -202,7 +118,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,141 +7,33 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmengroupalarm:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmengroupalarm:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmengroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmengroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="equipmentGroupId" header-align="center" align="center" label="设备分组ID,关联t_equipment_group"></el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"></el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="typeDictValue" header-align="center" align="center" label="报警类型 字典表关联label_value"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="gradeDictValue" header-align="center" align="center" label="报警级别 字典表关联label_value"></el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="alarmContent" header-align="center" align="center" label="报警内容"></el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"></el-table-column>
|
||||||
align="center"
|
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"></el-table-column>
|
||||||
width="50">
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"></el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"></el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"></el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"></el-table-column>
|
||||||
align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"></el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"></el-table-column>
|
||||||
prop="equipmentGroupId"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"></el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="alarmNotify" header-align="center" align="center" label="推送方式 0邮箱 1微信"></el-table-column>
|
||||||
align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -155,8 +47,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
</el-pagination>
|
></el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
</div>
|
</div>
|
||||||
@ -193,9 +85,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmengroupalarm/page'),
|
url: this.$http.adornUrl('/monitoring/equipmengroupalarm/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -232,7 +124,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,156 +10,31 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmenplc:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenplc:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="plcType" header-align="center" align="center" label="plc类型"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="name" header-align="center" align="center" label="plc名称(ip+名称对应实时数据库表名)"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="enName" header-align="center" align="center" label="英文名称"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="barcode" header-align="center" align="center" label="plc条码"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="controlType" header-align="center" align="center" label="链接方式,0 tcp,1 udp等"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="monitor" header-align="center" align="center" label="是否监控 0 代表不监控, 1 代表监控"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="collection" header-align="center" align="center" label="是否采集 0 代表不采集, 1 代表采集"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="ip" header-align="center" align="center" label="IP"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="port" header-align="center" align="center" label="端口号"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
label="id">
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
prop="plcType"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
label="plc类型">
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
prop="code"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="编码">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="plc名称(ip+名称对应实时数据库表名)">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="enName"
|
|
||||||
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="barcode"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="plc条码">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="controlType"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="链接方式,0 tcp,1 udp等">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="monitor"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="是否监控 0 代表不监控, 1 代表监控">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="collection"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="是否采集 0 代表不采集, 1 代表采集">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="ip"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="IP">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="port"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -173,7 +48,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -211,9 +87,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenplc/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenplc/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -250,7 +126,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,105 +7,27 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenplcconnect:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenplcconnect:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenplcconnect:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenplcconnect:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="plcId" header-align="center" align="center" label="plc表iD"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备表id"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
label="id">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="plcId"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="plc表iD">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="equipmentId"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="设备表id">
|
|
||||||
</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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -119,7 +41,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -157,9 +80,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenplcconnect/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenplcconnect/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -196,7 +119,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,186 +10,36 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmenplcparam:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenplcparam:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="plcConId" header-align="center" align="center" label="plc连接表ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="type" header-align="center" align="center" label="类型:status、data、constant"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="paramCode" header-align="center" align="center" label="参数编码"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="paramName" header-align="center" align="center" label="参数名称"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="paramAddress" header-align="center" align="center" label="参数地址,对应实时数据库表的列名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="valueType" header-align="center" align="center" label="参数值类型:int、long、boolean、string、list 暂不使用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="unitDictValue" header-align="center" align="center" label="单位 关联数据字典表label_value"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="minValue" header-align="center" align="center" label="最小值"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="maxValue" header-align="center" align="center" label="最大值"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="defaultValue" header-align="center" align="center" label="参数设定标准值"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
prop="plcConId"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
label="plc连接表ID">
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="collection" header-align="center" align="center" label="0 代表不采集, 1 代表采集"> </el-table-column>
|
||||||
prop="type"
|
<el-table-column prop="collectionCycle" header-align="center" align="center" label="采集周期(s) 暂不使用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="reportingCycle" header-align="center" align="center" label="上报周期(s) 暂不使用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="reportingMethod" header-align="center" align="center" label="上报方式 暂不使用"> </el-table-column>
|
||||||
label="类型:status、data、constant">
|
<el-table-column prop="reportingCode" header-align="center" align="center" label="上报编码 暂不使用"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
<el-table-column
|
|
||||||
prop="paramCode"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="参数编码">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="paramName"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="参数名称">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="paramAddress"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="参数地址,对应实时数据库表的列名">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="valueType"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="参数值类型:int、long、boolean、string、list 暂不使用">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="unitDictValue"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="单位 关联数据字典表label_value">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="minValue"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="最小值">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="maxValue"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="最大值">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="defaultValue"
|
|
||||||
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="collection"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="0 代表不采集, 1 代表采集">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="collectionCycle"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="采集周期(s) 暂不使用">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="reportingCycle"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="上报周期(s) 暂不使用">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="reportingMethod"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="上报方式 暂不使用">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="reportingCode"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -203,7 +53,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -241,9 +92,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenplcparam/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenplcparam/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -280,7 +131,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,132 +10,27 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmenquantity:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenquantity:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="externalCode" header-align="center" align="center" label="设备外部编码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="equipmentName" header-align="center" align="center" label="设备名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="inQuantity" header-align="center" align="center" label="进入设备的数量"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="outQuantity" header-align="center" align="center" label="离开设备的数量,若plc只记录一个生产数量,也写入该字段"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="okQuantity" header-align="center" align="center" label=""> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="nokQuantity" header-align="center" align="center" label="设备上报的报废数量"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="description" header-align="center" align="center" label=""> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
label="id">
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
prop="externalCode"
|
<el-table-column prop="recordTime" header-align="center" align="center" label="生产数量的记录时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -149,7 +44,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -187,9 +83,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenquantity/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenquantity/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -226,7 +122,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,129 +7,31 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmenstatuslog:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="externalCode" header-align="center" align="center" label="设备外部代码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="plcId" header-align="center" align="center" label="plc id"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="plc" header-align="center" align="center" label="plc"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备id"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="equipmentName" header-align="center" align="center" label="设备名称"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="status" header-align="center" align="center" label="状态,0正常 1计划停机 2故障"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="logTime" header-align="center" align="center" label="记录时间"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
label="id">
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
prop="externalCode"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -143,7 +45,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -181,9 +84,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmenstatuslog/page'),
|
url: this.$http.adornUrl('/monitoring/equipmenstatuslog/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -220,7 +123,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,120 +10,25 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmentype:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmentype:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="parentId" header-align="center" align="center" label="父类ID"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="parentName" header-align="center" align="center" label="父类名称"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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="parentId"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="父类ID">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="parentName"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -137,7 +42,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -175,9 +81,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmentype/page'),
|
url: this.$http.adornUrl('/monitoring/equipmentype/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -214,7 +120,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,126 +10,26 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:equipmentypefile:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:equipmentypefile:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="equipmentTypeId" header-align="center" align="center" label="设备类型ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="fileId" header-align="center" align="center" label="文件ID"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编码"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="fileUrl" header-align="center" align="center" label="下载地址"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
prop="equipmentTypeId"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -143,7 +43,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -181,9 +82,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/equipmentypefile/page'),
|
url: this.$http.adornUrl('/monitoring/equipmentypefile/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -220,7 +121,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||||
@ -81,51 +78,21 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
],
|
parentId: [{ required: true, message: '父类ID不能为空', trigger: 'blur' }],
|
||||||
name: [
|
parentName: [{ required: true, message: '父类名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
],
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
parentId: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '父类ID不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
parentName: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '父类名称不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
description: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -164,28 +131,28 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmentype/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmentype/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'parentId': this.dataForm.parentId,
|
parentId: this.dataForm.parentId,
|
||||||
'parentName': this.dataForm.parentName,
|
parentName: this.dataForm.parentName,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="设备类型ID" prop="equipmentTypeId">
|
<el-form-item label="设备类型ID" prop="equipmentTypeId">
|
||||||
<el-input v-model="dataForm.equipmentTypeId" placeholder="设备类型ID"></el-input>
|
<el-input v-model="dataForm.equipmentTypeId" placeholder="设备类型ID"></el-input>
|
||||||
@ -85,54 +82,22 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
equipmentTypeId: [
|
equipmentTypeId: [{ required: true, message: '设备类型ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备类型ID不能为空', trigger: 'blur' }
|
fileId: [{ required: true, message: '文件ID不能为空', trigger: 'blur' }],
|
||||||
],
|
typeCode: [{ required: true, message: '文件类型编码不能为空', trigger: 'blur' }],
|
||||||
fileId: [
|
fileName: [{ required: true, message: '文件名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件ID不能为空', trigger: 'blur' }
|
fileUrl: [{ required: true, message: '下载地址不能为空', trigger: 'blur' }],
|
||||||
],
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
typeCode: [
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件类型编码不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
fileName: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件名称不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
fileUrl: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '下载地址不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
description: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -172,29 +137,29 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/equipmentypefile/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/equipmentypefile/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'equipmentTypeId': this.dataForm.equipmentTypeId,
|
equipmentTypeId: this.dataForm.equipmentTypeId,
|
||||||
'fileId': this.dataForm.fileId,
|
fileId: this.dataForm.fileId,
|
||||||
'typeCode': this.dataForm.typeCode,
|
typeCode: this.dataForm.typeCode,
|
||||||
'fileName': this.dataForm.fileName,
|
fileName: this.dataForm.fileName,
|
||||||
'fileUrl': this.dataForm.fileUrl,
|
fileUrl: this.dataForm.fileUrl,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="工厂编码" prop="code">
|
<el-form-item label="工厂编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="工厂编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="工厂编码"></el-input>
|
||||||
@ -81,51 +78,21 @@
|
|||||||
externalCode: ''
|
externalCode: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '工厂编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '工厂编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '工厂名称不能为空', trigger: 'blur' }],
|
||||||
],
|
address: [{ required: true, message: '地址不能为空', trigger: 'blur' }],
|
||||||
name: [
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '工厂名称不能为空', trigger: 'blur' }
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
address: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '地址不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
description: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
enabled: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
],
|
externalCode: [{ required: true, message: '外部系统编码不能为空', trigger: 'blur' }]
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
externalCode: [
|
|
||||||
{ required: true, message: '外部系统编码不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -164,28 +131,28 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/factory/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/factory/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'address': this.dataForm.address,
|
address: this.dataForm.address,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'externalCode': this.dataForm.externalCode
|
externalCode: this.dataForm.externalCode
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,120 +10,25 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:factory:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:factory:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="code" header-align="center" align="center" label="工厂编码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="name" header-align="center" align="center" label="工厂名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="address" header-align="center" align="center" label="地址"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
label="id">
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="externalCode" header-align="center" align="center" label="外部系统编码"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -137,7 +42,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -175,9 +81,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/factory/page'),
|
url: this.$http.adornUrl('/monitoring/factory/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -214,7 +120,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,126 +10,26 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:producarrt:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:producarrt:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="productId" header-align="center" align="center" label="产品id,关联产品表"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="value" header-align="center" align="center" label="属性值"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
prop="code"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -143,7 +43,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -181,9 +82,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/producarrt/page'),
|
url: this.$http.adornUrl('/monitoring/producarrt/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -220,7 +121,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||||
@ -85,54 +82,22 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
],
|
productId: [{ required: true, message: '产品id,关联产品表不能为空', trigger: 'blur' }],
|
||||||
name: [
|
value: [{ required: true, message: '属性值不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
],
|
externalCode: [{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }],
|
||||||
productId: [
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '产品id,关联产品表不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
value: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '属性值不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
description: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
externalCode: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -172,29 +137,29 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/producarrt/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/producarrt/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'productId': this.dataForm.productId,
|
productId: this.dataForm.productId,
|
||||||
'value': this.dataForm.value,
|
value: this.dataForm.value,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||||
@ -97,63 +94,25 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
],
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
name: [
|
externalCode: [{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
specifications: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
|
||||||
],
|
unitDictValue: [{ required: true, message: '单位value,对应到数据字典label_value不能为空', trigger: 'blur' }],
|
||||||
description: [
|
area: [{ required: true, message: '一单位的面积(平方米)不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
processTime: [{ required: true, message: '加工一单位产品需要的时间不能为空', trigger: 'blur' }],
|
||||||
],
|
typeDictValue: [{ required: true, message: '产品类型value,对应到数据字典label_value不能为空', trigger: 'blur' }],
|
||||||
externalCode: [
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
specifications: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '规格不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
unitDictValue: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '单位value,对应到数据字典label_value不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
area: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '一单位的面积(平方米)不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
processTime: [
|
|
||||||
{ required: true, message: '加工一单位产品需要的时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
typeDictValue: [
|
|
||||||
{ required: true, message: '产品类型value,对应到数据字典label_value不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -196,32 +155,32 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'specifications': this.dataForm.specifications,
|
specifications: this.dataForm.specifications,
|
||||||
'unitDictValue': this.dataForm.unitDictValue,
|
unitDictValue: this.dataForm.unitDictValue,
|
||||||
'area': this.dataForm.area,
|
area: this.dataForm.area,
|
||||||
'processTime': this.dataForm.processTime,
|
processTime: this.dataForm.processTime,
|
||||||
'typeDictValue': this.dataForm.typeDictValue,
|
typeDictValue: this.dataForm.typeDictValue,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,132 +10,27 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:productionline:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:productionline:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="factoryId" header-align="center" align="center" label="工厂表ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="status" header-align="center" align="center" label="产线状态"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="tvalue" header-align="center" align="center" label="每小时下片数量"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="externalCode" header-align="center" align="center" label="外部系统编码"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
label="id">
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
prop="factoryId"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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="status"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="产线状态">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="tvalue"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -149,7 +44,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -187,9 +83,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/productionline/page'),
|
url: this.$http.adornUrl('/monitoring/productionline/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -226,7 +122,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,75 +7,22 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:productionlinerecsch:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="productionLineId" header-align="center" align="center" label="产线id"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="inputNum" header-align="center" align="center" label="上一次记录时间至该条记录时间端内上片数量"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="outputNum" header-align="center" align="center" label="上一次记录时间至该条记录时间端内下片数量"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="recordTime" header-align="center" align="center" label="记录时间"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="sumInputNum" header-align="center" align="center" label="该记录时间点的累计上片数量"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="sumOutputNum" header-align="center" align="center" label="该记录时间点的累计下片数量"> </el-table-column>
|
||||||
width="50">
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
</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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -89,7 +36,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -127,9 +75,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/productionlinerecsch/page'),
|
url: this.$http.adornUrl('/monitoring/productionlinerecsch/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -166,7 +114,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="工厂表ID" prop="factoryId">
|
<el-form-item label="工厂表ID" prop="factoryId">
|
||||||
<el-input v-model="dataForm.factoryId" placeholder="工厂表ID"></el-input>
|
<el-input v-model="dataForm.factoryId" placeholder="工厂表ID"></el-input>
|
||||||
@ -89,57 +86,23 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
factoryId: [
|
factoryId: [{ required: true, message: '工厂表ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '工厂表ID不能为空', trigger: 'blur' }
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
],
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
code: [
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
status: [{ required: true, message: '产线状态不能为空', trigger: 'blur' }],
|
||||||
],
|
tvalue: [{ required: true, message: '每小时下片数量不能为空', trigger: 'blur' }],
|
||||||
name: [
|
externalCode: [{ required: true, message: '外部系统编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
description: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
status: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '产线状态不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
tvalue: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '每小时下片数量不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
externalCode: [
|
|
||||||
{ required: true, message: '外部系统编码不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -180,30 +143,30 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/productionline/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/productionline/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'factoryId': this.dataForm.factoryId,
|
factoryId: this.dataForm.factoryId,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'status': this.dataForm.status,
|
status: this.dataForm.status,
|
||||||
'tvalue': this.dataForm.tvalue,
|
tvalue: this.dataForm.tvalue,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="产线id" prop="productionLineId">
|
<el-form-item label="产线id" prop="productionLineId">
|
||||||
<el-input v-model="dataForm.productionLineId" placeholder="产线id"></el-input>
|
<el-input v-model="dataForm.productionLineId" placeholder="产线id"></el-input>
|
||||||
@ -49,27 +46,13 @@
|
|||||||
sumOutputNum: ''
|
sumOutputNum: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
productionLineId: [
|
productionLineId: [{ required: true, message: '产线id不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '产线id不能为空', trigger: 'blur' }
|
inputNum: [{ required: true, message: '上一次记录时间至该条记录时间端内上片数量不能为空', trigger: 'blur' }],
|
||||||
],
|
outputNum: [{ required: true, message: '上一次记录时间至该条记录时间端内下片数量不能为空', trigger: 'blur' }],
|
||||||
inputNum: [
|
recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '上一次记录时间至该条记录时间端内上片数量不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
sumInputNum: [{ required: true, message: '该记录时间点的累计上片数量不能为空', trigger: 'blur' }],
|
||||||
outputNum: [
|
sumOutputNum: [{ required: true, message: '该记录时间点的累计下片数量不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '上一次记录时间至该条记录时间端内下片数量不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
recordTime: [
|
|
||||||
{ required: true, message: '记录时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
sumInputNum: [
|
|
||||||
{ required: true, message: '该记录时间点的累计上片数量不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
sumOutputNum: [
|
|
||||||
{ required: true, message: '该记录时间点的累计下片数量不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -100,20 +83,20 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/productionlinerecsch/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/productionlinerecsch/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'productionLineId': this.dataForm.productionLineId,
|
productionLineId: this.dataForm.productionLineId,
|
||||||
'inputNum': this.dataForm.inputNum,
|
inputNum: this.dataForm.inputNum,
|
||||||
'outputNum': this.dataForm.outputNum,
|
outputNum: this.dataForm.outputNum,
|
||||||
'recordTime': this.dataForm.recordTime,
|
recordTime: this.dataForm.recordTime,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'sumInputNum': this.dataForm.sumInputNum,
|
sumInputNum: this.dataForm.sumInputNum,
|
||||||
'sumOutputNum': this.dataForm.sumOutputNum
|
sumOutputNum: this.dataForm.sumOutputNum
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -7,105 +7,27 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectiondet:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="typeId" header-align="center" align="center" label="检测类型id"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="content" header-align="center" align="center" label="检测内容"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="code" header-align="center" align="center" label="检测编码"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
label="ID">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="typeId"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="检测类型id">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="content"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="检测内容">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="code"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -119,7 +41,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -157,9 +80,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/qualityinspectiondet/page'),
|
url: this.$http.adornUrl('/monitoring/qualityinspectiondet/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -196,7 +119,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,135 +7,32 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="inspectionDetId" header-align="center" align="center" label="检测内容id"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="inspectionDetContent" header-align="center" align="center" label="检测内容(设备推送消息时,可能无对应id,只填这个字段)"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="productionId" header-align="center" align="center" label="产线id"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="sectionId" header-align="center" align="center" label="工段id"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="checkPerson" header-align="center" align="center" label="检测人员,可以多个"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="checkTime" header-align="center" align="center" label="检测时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="source" header-align="center" align="center" label="来源 1,手动(默认) 2,自动"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="explainText" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
prop="inspectionDetId"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
align="center"
|
|
||||||
label="检测内容id">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="inspectionDetContent"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="检测内容(设备推送消息时,可能无对应id,只填这个字段)">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="productionId"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="产线id">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="sectionId"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="工段id">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="checkPerson"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="检测人员,可以多个">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="checkTime"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="检测时间">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="source"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="来源 1,手动(默认) 2,自动">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="explainText"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -149,7 +46,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -187,9 +85,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/qualityinspectionrecord/page'),
|
url: this.$http.adornUrl('/monitoring/qualityinspectionrecord/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -226,7 +124,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,99 +7,26 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:qualityinspectiontype:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="name" header-align="center" align="center" label="检测类型名称"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="code" header-align="center" align="center" label="检测类型编码"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
align="center"
|
|
||||||
label="ID">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="检测类型名称">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="code"
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -113,7 +40,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -151,9 +79,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/qualityinspectiontype/page'),
|
url: this.$http.adornUrl('/monitoring/qualityinspectiontype/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -190,7 +118,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="检测类型id" prop="typeId">
|
<el-form-item label="检测类型id" prop="typeId">
|
||||||
<el-input v-model="dataForm.typeId" placeholder="检测类型id"></el-input>
|
<el-input v-model="dataForm.typeId" placeholder="检测类型id"></el-input>
|
||||||
@ -69,42 +66,18 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
typeId: [
|
typeId: [{ required: true, message: '检测类型id不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测类型id不能为空', trigger: 'blur' }
|
content: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
|
||||||
],
|
code: [{ required: true, message: '检测编码不能为空', trigger: 'blur' }],
|
||||||
content: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测内容不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
code: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测编码不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -140,25 +113,25 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/qualityinspectiondet/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/qualityinspectiondet/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'typeId': this.dataForm.typeId,
|
typeId: this.dataForm.typeId,
|
||||||
'content': this.dataForm.content,
|
content: this.dataForm.content,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="检测内容id" prop="inspectionDetId">
|
<el-form-item label="检测内容id" prop="inspectionDetId">
|
||||||
<el-input v-model="dataForm.inspectionDetId" placeholder="检测内容id"></el-input>
|
<el-input v-model="dataForm.inspectionDetId" placeholder="检测内容id"></el-input>
|
||||||
@ -89,57 +86,23 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
inspectionDetId: [
|
inspectionDetId: [{ required: true, message: '检测内容id不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测内容id不能为空', trigger: 'blur' }
|
inspectionDetContent: [{ required: true, message: '检测内容(设备推送消息时,可能无对应id,只填这个字段)不能为空', trigger: 'blur' }],
|
||||||
],
|
productionId: [{ required: true, message: '产线id不能为空', trigger: 'blur' }],
|
||||||
inspectionDetContent: [
|
sectionId: [{ required: true, message: '工段id不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测内容(设备推送消息时,可能无对应id,只填这个字段)不能为空', trigger: 'blur' }
|
checkPerson: [{ required: true, message: '检测人员,可以多个不能为空', trigger: 'blur' }],
|
||||||
],
|
checkTime: [{ required: true, message: '检测时间不能为空', trigger: 'blur' }],
|
||||||
productionId: [
|
source: [{ required: true, message: '来源 1,手动(默认) 2,自动不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '产线id不能为空', trigger: 'blur' }
|
explainText: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
sectionId: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '工段id不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
checkPerson: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测人员,可以多个不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
checkTime: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测时间不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
source: [
|
|
||||||
{ required: true, message: '来源 1,手动(默认) 2,自动不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
explainText: [
|
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -180,30 +143,30 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/qualityinspectionrecord/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/qualityinspectionrecord/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'inspectionDetId': this.dataForm.inspectionDetId,
|
inspectionDetId: this.dataForm.inspectionDetId,
|
||||||
'inspectionDetContent': this.dataForm.inspectionDetContent,
|
inspectionDetContent: this.dataForm.inspectionDetContent,
|
||||||
'productionId': this.dataForm.productionId,
|
productionId: this.dataForm.productionId,
|
||||||
'sectionId': this.dataForm.sectionId,
|
sectionId: this.dataForm.sectionId,
|
||||||
'checkPerson': this.dataForm.checkPerson,
|
checkPerson: this.dataForm.checkPerson,
|
||||||
'checkTime': this.dataForm.checkTime,
|
checkTime: this.dataForm.checkTime,
|
||||||
'source': this.dataForm.source,
|
source: this.dataForm.source,
|
||||||
'explainText': this.dataForm.explainText,
|
explainText: this.dataForm.explainText,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="检测类型名称" prop="name">
|
<el-form-item label="检测类型名称" prop="name">
|
||||||
<el-input v-model="dataForm.name" placeholder="检测类型名称"></el-input>
|
<el-input v-model="dataForm.name" placeholder="检测类型名称"></el-input>
|
||||||
@ -65,39 +62,17 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
name: [
|
name: [{ required: true, message: '检测类型名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测类型名称不能为空', trigger: 'blur' }
|
code: [{ required: true, message: '检测类型编码不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
code: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '检测类型编码不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
valid: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -132,24 +107,24 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/qualityinspectiontype/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/qualityinspectiontype/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||||
@ -77,48 +74,20 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
],
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
name: [
|
externalCode: [{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
description: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
externalCode: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
enabled: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -156,27 +125,27 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/reporsheecategory/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/reporsheecategory/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'externalCode': this.dataForm.externalCode,
|
externalCode: this.dataForm.externalCode,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="分类:关联report_sheet_category" prop="category">
|
<el-form-item label="分类:关联report_sheet_category" prop="category">
|
||||||
<el-input v-model="dataForm.category" placeholder="分类:关联report_sheet_category"></el-input>
|
<el-input v-model="dataForm.category" placeholder="分类:关联report_sheet_category"></el-input>
|
||||||
@ -89,57 +86,23 @@
|
|||||||
content: ''
|
content: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
category: [
|
category: [{ required: true, message: '分类:关联report_sheet_category不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '分类:关联report_sheet_category不能为空', trigger: 'blur' }
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
],
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
code: [
|
fileName: [{ required: true, message: '文件名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
url: [{ required: true, message: '链接地址不能为空', trigger: 'blur' }],
|
||||||
],
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
name: [
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
fileName: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件名称不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
url: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '链接地址不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
description: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
content: [{ required: true, message: '报表内容不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
enabled: [
|
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
content: [
|
|
||||||
{ required: true, message: '报表内容不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -180,30 +143,30 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/reporsheet/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/reporsheet/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'category': this.dataForm.category,
|
category: this.dataForm.category,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'fileName': this.dataForm.fileName,
|
fileName: this.dataForm.fileName,
|
||||||
'url': this.dataForm.url,
|
url: this.dataForm.url,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'content': this.dataForm.content
|
content: this.dataForm.content
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,132 +10,27 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:reporsheet:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:reporsheet:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="category" header-align="center" align="center" label="分类:关联report_sheet_category"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="url" header-align="center" align="center" label="链接地址"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
prop="category"
|
<el-table-column prop="content" header-align="center" align="center" label="报表内容"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -149,7 +44,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -187,9 +83,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/reporsheet/page'),
|
url: this.$http.adornUrl('/monitoring/reporsheet/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -226,7 +122,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,117 +7,29 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:reporsheecategory:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:reporsheecategory:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:reporsheecategory:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:reporsheecategory:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="externalCode" header-align="center" align="center" label="外部编码,用于对照外部系统的编码"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
label="ID">
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
<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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -131,7 +43,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -169,9 +82,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/reporsheecategory/page'),
|
url: this.$http.adornUrl('/monitoring/reporsheecategory/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -208,7 +121,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="文件类型编号" prop="typeCode">
|
<el-form-item label="文件类型编号" prop="typeCode">
|
||||||
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
||||||
@ -73,45 +70,19 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
typeCode: [
|
typeCode: [{ required: true, message: '文件类型编号不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件类型编号不能为空', trigger: 'blur' }
|
fileCode: [{ required: true, message: '文件编号不能为空', trigger: 'blur' }],
|
||||||
],
|
fileName: [{ required: true, message: '文件名称不能为空', trigger: 'blur' }],
|
||||||
fileCode: [
|
fileUrl: [{ required: true, message: '文件路径URL不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件编号不能为空', trigger: 'blur' }
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
],
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
fileName: [
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件名称不能为空', trigger: 'blur' }
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
fileUrl: [
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件路径URL不能为空', trigger: 'blur' }
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
],
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -148,26 +119,26 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/sysfile/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/sysfile/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'typeCode': this.dataForm.typeCode,
|
typeCode: this.dataForm.typeCode,
|
||||||
'fileCode': this.dataForm.fileCode,
|
fileCode: this.dataForm.fileCode,
|
||||||
'fileName': this.dataForm.fileName,
|
fileName: this.dataForm.fileName,
|
||||||
'fileUrl': this.dataForm.fileUrl,
|
fileUrl: this.dataForm.fileUrl,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,108 +10,23 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:sysfile:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:sysfile:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="主键,自增"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编号"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="fileCode" header-align="center" align="center" label="文件编号"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="fileName" header-align="center" align="center" label="文件名称"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="fileUrl" header-align="center" align="center" label="文件路径URL"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
label="主键,自增">
|
<el-table-column fixed="right" header-align="center" align="center" width="150" 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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -125,7 +40,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -163,9 +79,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/sysfile/page'),
|
url: this.$http.adornUrl('/monitoring/sysfile/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -202,7 +118,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -10,96 +10,21 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:sysfiletype:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:sysfiletype:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="主键,自增"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="typeCode" header-align="center" align="center" label="文件类型编号"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="typeName" header-align="center" align="center" label="文件类型名称"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -113,7 +38,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -151,9 +77,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/sysfiletype/page'),
|
url: this.$http.adornUrl('/monitoring/sysfiletype/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -190,7 +116,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="文件类型编号" prop="typeCode">
|
<el-form-item label="文件类型编号" prop="typeCode">
|
||||||
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
<el-input v-model="dataForm.typeCode" placeholder="文件类型编号"></el-input>
|
||||||
@ -65,39 +62,17 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
typeCode: [
|
typeCode: [{ required: true, message: '文件类型编号不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件类型编号不能为空', trigger: 'blur' }
|
typeName: [{ required: true, message: '文件类型名称不能为空', trigger: 'blur' }],
|
||||||
],
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
typeName: [
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '文件类型名称不能为空', trigger: 'blur' }
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
valid: [
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -132,24 +107,24 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/sysfiletype/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/sysfiletype/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'typeCode': this.dataForm.typeCode,
|
typeCode: this.dataForm.typeCode,
|
||||||
'typeName': this.dataForm.typeName,
|
typeName: this.dataForm.typeName,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -10,126 +10,26 @@
|
|||||||
<el-button v-if="$hasPermission('monitoring:workshopsection:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:workshopsection:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="id"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="productionLineId" header-align="center" align="center" label="产线ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="code" header-align="center" align="center" label="编码"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="name" header-align="center" align="center" label="名称"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="description" header-align="center" align="center" label="描述"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="enabled" header-align="center" align="center" label="启用状态:0 、停用,1、启用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="sort" header-align="center" align="center" label="排序"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
label="id">
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="externalCode" header-align="center" align="center" label="外部系统编码"> </el-table-column>
|
||||||
prop="productionLineId"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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="enabled"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="启用状态:0 、停用,1、启用">
|
|
||||||
</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
|
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -143,7 +43,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -181,9 +82,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/workshopsection/page'),
|
url: this.$http.adornUrl('/monitoring/workshopsection/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -220,7 +121,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -7,105 +7,27 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||||
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
<el-button v-if="$hasPermission('monitoring:workshopsectionequipment:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0"
|
||||||
|
>批量删除</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||||
:data="dataList"
|
<el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column>
|
||||||
border
|
<el-table-column prop="id" header-align="center" align="center" label="ID"> </el-table-column>
|
||||||
v-loading="dataListLoading"
|
<el-table-column prop="workshopSectionId" header-align="center" align="center" label="工段ID"> </el-table-column>
|
||||||
@selection-change="selectionChangeHandle"
|
<el-table-column prop="equipmentId" header-align="center" align="center" label="设备ID"> </el-table-column>
|
||||||
style="width: 100%;">
|
<el-table-column prop="sort" header-align="center" align="center" label="排序"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"> </el-table-column>
|
||||||
type="selection"
|
<el-table-column prop="valid" header-align="center" align="center" label="删除标志,是否有效:1 可用 0不可用"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="creatorId" header-align="center" align="center" label="创建人"> </el-table-column>
|
||||||
align="center"
|
<el-table-column prop="creatorName" header-align="center" align="center" label="创建人姓名"> </el-table-column>
|
||||||
width="50">
|
<el-table-column prop="createTime" header-align="center" align="center" label="创建时间"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="updaterId" header-align="center" align="center" label="更新人"> </el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="updaterName" header-align="center" align="center" label="更新人姓名"> </el-table-column>
|
||||||
prop="id"
|
<el-table-column prop="updateTime" header-align="center" align="center" label="更新时间"> </el-table-column>
|
||||||
header-align="center"
|
<el-table-column prop="version" header-align="center" align="center" label="版本号"> </el-table-column>
|
||||||
align="center"
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||||
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">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
<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>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
@ -119,7 +41,8 @@
|
|||||||
:page-sizes="[10, 20, 50, 100]"
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
@ -157,9 +80,9 @@
|
|||||||
url: this.$http.adornUrl('/monitoring/workshopsectionequipment/page'),
|
url: this.$http.adornUrl('/monitoring/workshopsectionequipment/page'),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
'page': this.pageIndex,
|
page: this.pageIndex,
|
||||||
'limit': this.pageSize,
|
limit: this.pageSize,
|
||||||
'key': this.dataForm.key
|
key: this.dataForm.key
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@ -196,7 +119,9 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id) {
|
deleteHandle(id) {
|
||||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
var ids = id
|
||||||
|
? [id]
|
||||||
|
: this.dataListSelections.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="产线ID" prop="productionLineId">
|
<el-form-item label="产线ID" prop="productionLineId">
|
||||||
<el-input v-model="dataForm.productionLineId" placeholder="产线ID"></el-input>
|
<el-input v-model="dataForm.productionLineId" placeholder="产线ID"></el-input>
|
||||||
@ -85,54 +82,22 @@
|
|||||||
externalCode: ''
|
externalCode: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
productionLineId: [
|
productionLineId: [{ required: true, message: '产线ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '产线ID不能为空', trigger: 'blur' }
|
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||||
],
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
code: [
|
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '编码不能为空', trigger: 'blur' }
|
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||||
],
|
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
|
||||||
name: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
description: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '描述不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
enabled: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
||||||
sort: [
|
externalCode: [{ required: true, message: '外部系统编码不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: '排序不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
externalCode: [
|
|
||||||
{ required: true, message: '外部系统编码不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -172,29 +137,29 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/workshopsection/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/workshopsection/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'productionLineId': this.dataForm.productionLineId,
|
productionLineId: this.dataForm.productionLineId,
|
||||||
'code': this.dataForm.code,
|
code: this.dataForm.code,
|
||||||
'name': this.dataForm.name,
|
name: this.dataForm.name,
|
||||||
'description': this.dataForm.description,
|
description: this.dataForm.description,
|
||||||
'enabled': this.dataForm.enabled,
|
enabled: this.dataForm.enabled,
|
||||||
'sort': this.dataForm.sort,
|
sort: this.dataForm.sort,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version,
|
version: this.dataForm.version,
|
||||||
'externalCode': this.dataForm.externalCode
|
externalCode: this.dataForm.externalCode
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
|
||||||
: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 :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||||
<el-form-item label="工段ID" prop="workshopSectionId">
|
<el-form-item label="工段ID" prop="workshopSectionId">
|
||||||
<el-input v-model="dataForm.workshopSectionId" placeholder="工段ID"></el-input>
|
<el-input v-model="dataForm.workshopSectionId" placeholder="工段ID"></el-input>
|
||||||
@ -69,42 +66,18 @@
|
|||||||
version: ''
|
version: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
workshopSectionId: [
|
workshopSectionId: [{ required: true, message: '工段ID不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '工段ID不能为空', trigger: 'blur' }
|
equipmentId: [{ required: true, message: '设备ID不能为空', trigger: 'blur' }],
|
||||||
],
|
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
|
||||||
equipmentId: [
|
remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '设备ID不能为空', trigger: 'blur' }
|
valid: [{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }],
|
||||||
],
|
creatorId: [{ required: true, message: '创建人不能为空', trigger: 'blur' }],
|
||||||
sort: [
|
creatorName: [{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '排序不能为空', trigger: 'blur' }
|
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||||
],
|
updaterId: [{ required: true, message: '更新人不能为空', trigger: 'blur' }],
|
||||||
remark: [
|
updaterName: [{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||||
],
|
version: [{ required: true, message: '版本号不能为空', trigger: 'blur' }]
|
||||||
valid: [
|
|
||||||
{ required: true, message: '删除标志,是否有效:1 可用 0不可用不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorId: [
|
|
||||||
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
creatorName: [
|
|
||||||
{ required: true, message: '创建人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterId: [
|
|
||||||
{ required: true, message: '更新人不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updaterName: [
|
|
||||||
{ required: true, message: '更新人姓名不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
updateTime: [
|
|
||||||
{ required: true, message: '更新时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
version: [
|
|
||||||
{ required: true, message: '版本号不能为空', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -140,25 +113,25 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/monitoring/workshopsectionequipment/${!this.dataForm.id ? 'save' : 'update'}`),
|
url: this.$http.adornUrl(`/monitoring/workshopsectionequipment/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
'id': this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'workshopSectionId': this.dataForm.workshopSectionId,
|
workshopSectionId: this.dataForm.workshopSectionId,
|
||||||
'equipmentId': this.dataForm.equipmentId,
|
equipmentId: this.dataForm.equipmentId,
|
||||||
'sort': this.dataForm.sort,
|
sort: this.dataForm.sort,
|
||||||
'remark': this.dataForm.remark,
|
remark: this.dataForm.remark,
|
||||||
'valid': this.dataForm.valid,
|
valid: this.dataForm.valid,
|
||||||
'creatorId': this.dataForm.creatorId,
|
creatorId: this.dataForm.creatorId,
|
||||||
'creatorName': this.dataForm.creatorName,
|
creatorName: this.dataForm.creatorName,
|
||||||
'createTime': this.dataForm.createTime,
|
createTime: this.dataForm.createTime,
|
||||||
'updaterId': this.dataForm.updaterId,
|
updaterId: this.dataForm.updaterId,
|
||||||
'updaterName': this.dataForm.updaterName,
|
updaterName: this.dataForm.updaterName,
|
||||||
'updateTime': this.dataForm.updateTime,
|
updateTime: this.dataForm.updateTime,
|
||||||
'version': this.dataForm.version
|
version: this.dataForm.version
|
||||||
})
|
})
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :title="$t('oss.upload')" :close-on-click-modal="false" :close-on-press-escape="false">
|
<el-dialog :visible.sync="visible" :title="$t('oss.upload')" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||||
<el-upload
|
<el-upload :action="url" :file-list="fileList" drag multiple :before-upload="beforeUploadHandle" :on-success="successHandle" class="text-center">
|
||||||
:action="url"
|
|
||||||
:file-list="fileList"
|
|
||||||
drag
|
|
||||||
multiple
|
|
||||||
:before-upload="beforeUploadHandle"
|
|
||||||
:on-success="successHandle"
|
|
||||||
class="text-center">
|
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload"></i>
|
||||||
<div class="el-upload__text" v-html="$t('upload.text')"></div>
|
<div class="el-upload__text" v-html="$t('upload.text')"></div>
|
||||||
<div class="el-upload__tip" slot="tip">{{ $t('upload.tip', { 'format': 'jpg、png、gif' }) }}</div>
|
<div class="el-upload__tip" slot="tip">{{ $t('upload.tip', { format: 'jpg、png、gif' }) }}</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -36,7 +29,7 @@ export default {
|
|||||||
// 上传之前
|
// 上传之前
|
||||||
beforeUploadHandle(file) {
|
beforeUploadHandle(file) {
|
||||||
if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {
|
if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {
|
||||||
this.$message.error(this.$t('upload.tip', { 'format': 'jpg、png、gif' }))
|
this.$message.error(this.$t('upload.tip', { format: 'jpg、png、gif' }))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.num++
|
this.num++
|
||||||
|
@ -12,13 +12,7 @@
|
|||||||
<el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
<el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||||
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>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="url" :label="$t('oss.url')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="url" :label="$t('oss.url')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="createDate" :label="$t('oss.createDate')" sortable="custom" header-align="center" align="center" width="180"></el-table-column>
|
<el-table-column prop="createDate" :label="$t('oss.createDate')" sortable="custom" header-align="center" align="center" width="180"></el-table-column>
|
||||||
@ -35,7 +29,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 云存储配置 -->
|
<!-- 弹窗, 云存储配置 -->
|
||||||
<config v-if="configVisible" ref="config"></config>
|
<config v-if="configVisible" ref="config"></config>
|
||||||
|
@ -18,13 +18,7 @@
|
|||||||
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||||
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>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="dictValue" :label="$t('dict.dictValue')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="dictValue" :label="$t('dict.dictValue')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="dictLabel" :label="$t('dict.dictLabel')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="dictLabel" :label="$t('dict.dictLabel')" header-align="center" align="center"></el-table-column>
|
||||||
@ -45,7 +39,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
@ -39,15 +39,9 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
dataRule() {
|
dataRule() {
|
||||||
return {
|
return {
|
||||||
dictName: [
|
dictName: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
dictType: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
],
|
sort: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||||
dictType: [
|
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
||||||
],
|
|
||||||
sort: [
|
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -63,7 +57,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取信息
|
// 获取信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.$http.get(this.$http.adornUrl(`/sys/dict/type/${this.dataForm.id}`)).then(({ data: res }) => {
|
this.$http
|
||||||
|
.get(this.$http.adornUrl(`/sys/dict/type/${this.dataForm.id}`))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -71,15 +67,18 @@ export default {
|
|||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
...res.data
|
...res.data
|
||||||
}
|
}
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(function () {
|
dataFormSubmitHandle: debounce(
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
function() {
|
||||||
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/dict/type', this.dataForm).then(({ data: res }) => {
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/dict/type', this.dataForm)
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -92,9 +91,13 @@ export default {
|
|||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
|
||||||
})
|
})
|
||||||
}, 1000, { 'leading': true, 'trailing': false })
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
1000,
|
||||||
|
{ leading: true, trailing: false }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -18,13 +18,7 @@
|
|||||||
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:dict:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||||
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>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
|
<el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
|
||||||
@ -49,7 +43,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
@ -9,7 +9,14 @@
|
|||||||
<el-table v-loading="dataListLoading" :data="dataList" border @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
<el-table v-loading="dataListLoading" :data="dataList" border @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||||
<el-table-column prop="requestUri" :label="$t('logError.requestUri')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="requestUri" :label="$t('logError.requestUri')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="requestMethod" :label="$t('logError.requestMethod')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="requestMethod" :label="$t('logError.requestMethod')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="requestParams" :label="$t('logError.requestParams')" header-align="center" align="center" width="150" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column
|
||||||
|
prop="requestParams"
|
||||||
|
:label="$t('logError.requestParams')"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column prop="ip" :label="$t('logError.ip')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="ip" :label="$t('logError.ip')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="userAgent" :label="$t('logError.userAgent')" header-align="center" align="center" width="150" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column prop="userAgent" :label="$t('logError.userAgent')" header-align="center" align="center" width="150" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column prop="createDate" :label="$t('logError.createDate')" sortable="custom" header-align="center" align="center" width="180"></el-table-column>
|
<el-table-column prop="createDate" :label="$t('logError.createDate')" sortable="custom" header-align="center" align="center" width="180"></el-table-column>
|
||||||
@ -26,7 +33,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -20,7 +20,14 @@
|
|||||||
<el-table-column prop="operation" :label="$t('logOperation.operation')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="operation" :label="$t('logOperation.operation')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="requestMethod" :label="$t('logOperation.requestMethod')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="requestMethod" :label="$t('logOperation.requestMethod')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="requestParams" :label="$t('logOperation.requestParams')" header-align="center" align="center" width="150" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column
|
||||||
|
prop="requestParams"
|
||||||
|
:label="$t('logOperation.requestParams')"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column prop="requestTime" :label="$t('logOperation.requestTime')" sortable="custom" header-align="center" align="center">
|
<el-table-column prop="requestTime" :label="$t('logOperation.requestTime')" sortable="custom" header-align="center" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ `${scope.row.requestTime}ms` }}
|
{{ `${scope.row.requestTime}ms` }}
|
||||||
@ -43,7 +50,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -35,12 +35,8 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
dataRule() {
|
dataRule() {
|
||||||
return {
|
return {
|
||||||
paramCode: [
|
paramCode: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
paramValue: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||||
],
|
|
||||||
paramValue: [
|
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -56,7 +52,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取信息
|
// 获取信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.$http.get(this.$http.adornUrl(`/sys/params/${this.dataForm.id}`)).then(({ data: res }) => {
|
this.$http
|
||||||
|
.get(this.$http.adornUrl(`/sys/params/${this.dataForm.id}`))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -64,15 +62,18 @@ export default {
|
|||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
...res.data
|
...res.data
|
||||||
}
|
}
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(function () {
|
dataFormSubmitHandle: debounce(
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
function() {
|
||||||
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/params', this.dataForm).then(({ data: res }) => {
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/params', this.dataForm)
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -85,9 +86,13 @@ export default {
|
|||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
|
||||||
})
|
})
|
||||||
}, 1000, { 'leading': true, 'trailing': false })
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
1000,
|
||||||
|
{ leading: true, trailing: false }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
@ -10,26 +10,12 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item size="mini" :label="$t('role.menuList')">
|
<el-form-item size="mini" :label="$t('role.menuList')">
|
||||||
<el-tree
|
<el-tree :data="menuList" :props="{ label: 'name', children: 'children' }" node-key="id" ref="menuListTree" accordion show-checkbox> </el-tree>
|
||||||
:data="menuList"
|
|
||||||
:props="{ label: 'name', children: 'children' }"
|
|
||||||
node-key="id"
|
|
||||||
ref="menuListTree"
|
|
||||||
accordion
|
|
||||||
show-checkbox>
|
|
||||||
</el-tree>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item size="mini" :label="$t('role.deptList')">
|
<el-form-item size="mini" :label="$t('role.deptList')">
|
||||||
<el-tree
|
<el-tree :data="deptList" :props="{ label: 'name', children: 'children' }" node-key="id" ref="deptListTree" accordion show-checkbox> </el-tree>
|
||||||
:data="deptList"
|
|
||||||
:props="{ label: 'name', children: 'children' }"
|
|
||||||
node-key="id"
|
|
||||||
ref="deptListTree"
|
|
||||||
accordion
|
|
||||||
show-checkbox>
|
|
||||||
</el-tree>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -61,9 +47,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
dataRule() {
|
dataRule() {
|
||||||
return {
|
return {
|
||||||
name: [
|
name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -74,10 +58,7 @@ export default {
|
|||||||
this.$refs['dataForm'].resetFields()
|
this.$refs['dataForm'].resetFields()
|
||||||
this.$refs.menuListTree.setCheckedKeys([])
|
this.$refs.menuListTree.setCheckedKeys([])
|
||||||
this.$refs.deptListTree.setCheckedKeys([])
|
this.$refs.deptListTree.setCheckedKeys([])
|
||||||
Promise.all([
|
Promise.all([this.getMenuList(), this.getDeptList()]).then(() => {
|
||||||
this.getMenuList(),
|
|
||||||
this.getDeptList()
|
|
||||||
]).then(() => {
|
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
}
|
||||||
@ -86,25 +67,33 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取菜单列表
|
// 获取菜单列表
|
||||||
getMenuList() {
|
getMenuList() {
|
||||||
return this.$http.get(this.$http.adornUrl('/sys/menu/select')).then(({ data: res }) => {
|
return this.$http
|
||||||
|
.get(this.$http.adornUrl('/sys/menu/select'))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
this.menuList = res.data
|
this.menuList = res.data
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 获取部门列表
|
// 获取部门列表
|
||||||
getDeptList() {
|
getDeptList() {
|
||||||
return this.$http.get(this.$http.adornUrl('/sys/dept/list')).then(({ data: res }) => {
|
return this.$http
|
||||||
|
.get(this.$http.adornUrl('/sys/dept/list'))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
this.deptList = res.data
|
this.deptList = res.data
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 获取信息
|
// 获取信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.$http.get(this.$http.adornUrl(`/sys/role/${this.dataForm.id}`)).then(({ data: res }) => {
|
this.$http
|
||||||
|
.get(this.$http.adornUrl(`/sys/role/${this.dataForm.id}`))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -114,20 +103,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.dataForm.menuIdList.forEach(item => this.$refs.menuListTree.setChecked(item, true))
|
this.dataForm.menuIdList.forEach(item => this.$refs.menuListTree.setChecked(item, true))
|
||||||
this.$refs.deptListTree.setCheckedKeys(this.dataForm.deptIdList)
|
this.$refs.deptListTree.setCheckedKeys(this.dataForm.deptIdList)
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(function () {
|
dataFormSubmitHandle: debounce(
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
function() {
|
||||||
|
this.$refs['dataForm'].validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.dataForm.menuIdList = [
|
this.dataForm.menuIdList = [...this.$refs.menuListTree.getHalfCheckedKeys(), ...this.$refs.menuListTree.getCheckedKeys()]
|
||||||
...this.$refs.menuListTree.getHalfCheckedKeys(),
|
|
||||||
...this.$refs.menuListTree.getCheckedKeys()
|
|
||||||
]
|
|
||||||
this.dataForm.deptIdList = this.$refs.deptListTree.getCheckedKeys()
|
this.dataForm.deptIdList = this.$refs.deptListTree.getCheckedKeys()
|
||||||
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm)
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
@ -140,9 +129,13 @@ export default {
|
|||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
|
||||||
})
|
})
|
||||||
}, 1000, { 'leading': true, 'trailing': false })
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
1000,
|
||||||
|
{ leading: true, trailing: false }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -15,13 +15,7 @@
|
|||||||
<el-button v-if="$hasPermission('sys:role:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
<el-button v-if="$hasPermission('sys:role:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||||
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>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="name" :label="$t('role.name')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="name" :label="$t('role.name')" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="remark" :label="$t('role.remark')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="remark" :label="$t('role.remark')" header-align="center" align="center"></el-table-column>
|
||||||
@ -40,7 +34,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
@ -24,13 +24,7 @@
|
|||||||
<el-button v-if="$hasPermission('sys:user:export')" type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
|
<el-button v-if="$hasPermission('sys:user:export')" type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
|
||||||
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>
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
|
||||||
@ -38,7 +32,7 @@
|
|||||||
<el-table-column prop="mobile" :label="$t('user.mobile')" sortable="custom" header-align="center" align="center"></el-table-column>
|
<el-table-column prop="mobile" :label="$t('user.mobile')" sortable="custom" header-align="center" align="center"></el-table-column>
|
||||||
<el-table-column prop="gender" :label="$t('user.gender')" sortable="custom" header-align="center" align="center">
|
<el-table-column prop="gender" :label="$t('user.gender')" sortable="custom" header-align="center" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $getDictLabel("gender", scope.row.gender) }}
|
{{ $getDictLabel('gender', scope.row.gender) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="status" :label="$t('user.status')" sortable="custom" header-align="center" align="center">
|
<el-table-column prop="status" :label="$t('user.status')" sortable="custom" header-align="center" align="center">
|
||||||
@ -62,7 +56,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
@size-change="pageSizeChangeHandle"
|
@size-change="pageSizeChangeHandle"
|
||||||
@current-change="pageCurrentChangeHandle">
|
@current-change="pageCurrentChangeHandle"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
@ -14,6 +14,5 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user