clear files & update title
This commit is contained in:
parent
38afe6cbb9
commit
96cea7cc0d
@ -3,8 +3,8 @@ const t = {}
|
||||
t.loading = '加载中...'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = '人人权限系统'
|
||||
t.brand.mini = '人人'
|
||||
t.brand.lg = '生产监控系统'
|
||||
t.brand.mini = '监控'
|
||||
|
||||
t.add = '新增'
|
||||
t.delete = '删除'
|
||||
|
@ -16,7 +16,7 @@
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
<el-menu class="aui-navbar__menu" mode="horizontal">
|
||||
<el-menu-item index="2">
|
||||
<!-- <el-menu-item index="2">
|
||||
<a href="https://www.renren.io/" target="_blank">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-earth"></use></svg>
|
||||
</a>
|
||||
@ -25,7 +25,7 @@
|
||||
<a href="https://gitee.com/renrenio/renren-security" target="_blank">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#gitee"></use></svg>
|
||||
</a>
|
||||
</el-menu-item>
|
||||
</el-menu-item> -->
|
||||
<el-menu-item index="4" @click="fullscreenHandle()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg>
|
||||
</el-menu-item>
|
||||
|
@ -1,254 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="设备名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文名称" prop="enName">
|
||||
<el-input v-model="dataForm.enName" placeholder="英文名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="缩写" prop="abbr">
|
||||
<el-input v-model="dataForm.abbr" placeholder="缩写"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="进厂日期" prop="enterTime">
|
||||
<el-input v-model="dataForm.enterTime" placeholder="进厂日期"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="productionTime">
|
||||
<el-input v-model="dataForm.productionTime" placeholder="生产日期"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型,关联设备类型表" prop="equipmentTypeId">
|
||||
<el-input v-model="dataForm.equipmentTypeId" placeholder="设备类型,关联设备类型表"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组id (关联 T_EQUIPMENT_GROUP)" prop="groupId">
|
||||
<el-input v-model="dataForm.groupId" placeholder="分组id (关联 T_EQUIPMENT_GROUP)"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="0:无类别,1:上片数据设备,2:下片数据设备" prop="dataType">
|
||||
<el-input v-model="dataForm.dataType" placeholder="0:无类别,1:上片数据设备,2:下片数据设备"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="每小时生产数量" prop="tvalue">
|
||||
<el-input v-model="dataForm.tvalue" placeholder="每小时生产数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单件加工时间 s/件" prop="processingTime">
|
||||
<el-input v-model="dataForm.processingTime" placeholder="单件加工时间 s/件"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="制造商" prop="manufacturer">
|
||||
<el-input v-model="dataForm.manufacturer" placeholder="制造商"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="spec">
|
||||
<el-input v-model="dataForm.spec" placeholder="规格"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="功能描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="功能描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部系统代码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部系统代码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="统一用的外部代码,代表用哪个设备的数据代替该设备,目前用于生产数量统计" prop="externalCodeStatis">
|
||||
<el-input v-model="dataForm.externalCodeStatis" placeholder="统一用的外部代码,代表用哪个设备的数据代替该设备,目前用于生产数量统计"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
enName: '',
|
||||
abbr: '',
|
||||
enterTime: '',
|
||||
productionTime: '',
|
||||
equipmentTypeId: '',
|
||||
groupId: '',
|
||||
dataType: '',
|
||||
tvalue: '',
|
||||
processingTime: '',
|
||||
manufacturer: '',
|
||||
spec: '',
|
||||
description: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: '',
|
||||
externalCode: '',
|
||||
externalCodeStatis: ''
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
|
||||
enName: [{ required: true, message: '英文名称不能为空', trigger: 'blur' }],
|
||||
abbr: [{ required: true, message: '缩写不能为空', trigger: 'blur' }],
|
||||
enterTime: [{ required: true, message: '进厂日期不能为空', trigger: 'blur' }],
|
||||
productionTime: [{ required: true, message: '生产日期不能为空', trigger: 'blur' }],
|
||||
equipmentTypeId: [{ required: true, message: '设备类型,关联设备类型表不能为空', trigger: 'blur' }],
|
||||
groupId: [{ required: true, message: '分组id (关联 T_EQUIPMENT_GROUP)不能为空', trigger: 'blur' }],
|
||||
dataType: [{ required: true, message: '0:无类别,1:上片数据设备,2:下片数据设备不能为空', 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipment/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.code = data.equipment.code
|
||||
this.dataForm.name = data.equipment.name
|
||||
this.dataForm.enName = data.equipment.enName
|
||||
this.dataForm.abbr = data.equipment.abbr
|
||||
this.dataForm.enterTime = data.equipment.enterTime
|
||||
this.dataForm.productionTime = data.equipment.productionTime
|
||||
this.dataForm.equipmentTypeId = data.equipment.equipmentTypeId
|
||||
this.dataForm.groupId = data.equipment.groupId
|
||||
this.dataForm.dataType = data.equipment.dataType
|
||||
this.dataForm.tvalue = data.equipment.tvalue
|
||||
this.dataForm.processingTime = data.equipment.processingTime
|
||||
this.dataForm.manufacturer = data.equipment.manufacturer
|
||||
this.dataForm.spec = data.equipment.spec
|
||||
this.dataForm.description = data.equipment.description
|
||||
this.dataForm.enabled = data.equipment.enabled
|
||||
this.dataForm.remark = data.equipment.remark
|
||||
this.dataForm.valid = data.equipment.valid
|
||||
this.dataForm.creatorId = data.equipment.creatorId
|
||||
this.dataForm.creatorName = data.equipment.creatorName
|
||||
this.dataForm.createTime = data.equipment.createTime
|
||||
this.dataForm.updaterId = data.equipment.updaterId
|
||||
this.dataForm.updaterName = data.equipment.updaterName
|
||||
this.dataForm.updateTime = data.equipment.updateTime
|
||||
this.dataForm.version = data.equipment.version
|
||||
this.dataForm.externalCode = data.equipment.externalCode
|
||||
this.dataForm.externalCodeStatis = data.equipment.externalCodeStatis
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipment/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
enName: this.dataForm.enName,
|
||||
abbr: this.dataForm.abbr,
|
||||
enterTime: this.dataForm.enterTime,
|
||||
productionTime: this.dataForm.productionTime,
|
||||
equipmentTypeId: this.dataForm.equipmentTypeId,
|
||||
groupId: this.dataForm.groupId,
|
||||
dataType: this.dataForm.dataType,
|
||||
tvalue: this.dataForm.tvalue,
|
||||
processingTime: this.dataForm.processingTime,
|
||||
manufacturer: this.dataForm.manufacturer,
|
||||
spec: this.dataForm.spec,
|
||||
description: this.dataForm.description,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version,
|
||||
externalCode: this.dataForm.externalCode,
|
||||
externalCodeStatis: this.dataForm.externalCodeStatis
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,32 +0,0 @@
|
||||
<template>
|
||||
<div class="equipment-add">
|
||||
<h2>{{ $route.params.isdetail ? '查看详情' : $route.params.equipmentId ? '编辑' : '新增' }}</h2>
|
||||
<p>id: {{ $route.params.equipmentId }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'EquipmentAdd',
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
watch: {
|
||||
'$route.params': function(val, oldVal) {}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.equipment-add {
|
||||
background: #fff;
|
||||
padding: 12px;
|
||||
min-height: 50vh;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 8px 0;
|
||||
}
|
||||
</style>
|
@ -1,163 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="分组编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="分组编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组名字" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="分组名字"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型id" prop="typeId">
|
||||
<el-input v-model="dataForm.typeId" placeholder="设备类型id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
typeId: '',
|
||||
description: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: '分组编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '分组名字不能为空', trigger: 'blur' }],
|
||||
typeId: [{ required: true, message: '设备类型id不能为空', 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentGroup/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.code = data.equipmengroup.code
|
||||
this.dataForm.name = data.equipmengroup.name
|
||||
this.dataForm.typeId = data.equipmengroup.typeId
|
||||
this.dataForm.description = data.equipmengroup.description
|
||||
this.dataForm.remark = data.equipmengroup.remark
|
||||
this.dataForm.valid = data.equipmengroup.valid
|
||||
this.dataForm.creatorId = data.equipmengroup.creatorId
|
||||
this.dataForm.creatorName = data.equipmengroup.creatorName
|
||||
this.dataForm.createTime = data.equipmengroup.createTime
|
||||
this.dataForm.updaterId = data.equipmengroup.updaterId
|
||||
this.dataForm.updaterName = data.equipmengroup.updaterName
|
||||
this.dataForm.updateTime = data.equipmengroup.updateTime
|
||||
this.dataForm.version = data.equipmengroup.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentGroup/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
typeId: this.dataForm.typeId,
|
||||
description: this.dataForm.description,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,198 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="设备分组ID,关联t_equipment_group" prop="equipmentGroupId">
|
||||
<el-input v-model="dataForm.equipmentGroupId" placeholder="设备分组ID,关联t_equipment_group"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警类型 字典表关联label_value" prop="typeDictValue">
|
||||
<el-input v-model="dataForm.typeDictValue" placeholder="报警类型 字典表关联label_value"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警级别 字典表关联label_value" prop="gradeDictValue">
|
||||
<el-input v-model="dataForm.gradeDictValue" placeholder="报警级别 字典表关联label_value"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警内容" prop="alarmContent">
|
||||
<el-input v-model="dataForm.alarmContent" placeholder="报警内容"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编码,用于对照外部系统的编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部编码,用于对照外部系统的编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="推送方式 0邮箱 1微信" prop="alarmNotify">
|
||||
<el-input v-model="dataForm.alarmNotify" placeholder="推送方式 0邮箱 1微信"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
equipmentGroupId: '',
|
||||
code: '',
|
||||
typeDictValue: '',
|
||||
gradeDictValue: '',
|
||||
alarmContent: '',
|
||||
description: '',
|
||||
externalCode: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: '',
|
||||
alarmNotify: ''
|
||||
},
|
||||
dataRule: {
|
||||
equipmentGroupId: [{ required: true, message: '设备分组ID,关联t_equipment_group不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
typeDictValue: [{ required: true, message: '报警类型 字典表关联label_value不能为空', trigger: 'blur' }],
|
||||
gradeDictValue: [{ required: true, message: '报警级别 字典表关联label_value不能为空', trigger: 'blur' }],
|
||||
alarmContent: [{ required: true, message: '报警内容不能为空', trigger: 'blur' }],
|
||||
description: [{ 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' }],
|
||||
alarmNotify: [{ required: true, message: '推送方式 0邮箱 1微信不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentGroupAlarm/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.equipmentGroupId = data.equipmengroupAlarm.equipmentGroupId
|
||||
this.dataForm.code = data.equipmengroupAlarm.code
|
||||
this.dataForm.typeDictValue = data.equipmengroupAlarm.typeDictValue
|
||||
this.dataForm.gradeDictValue = data.equipmengroupAlarm.gradeDictValue
|
||||
this.dataForm.alarmContent = data.equipmengroupAlarm.alarmContent
|
||||
this.dataForm.description = data.equipmengroupAlarm.description
|
||||
this.dataForm.externalCode = data.equipmengroupAlarm.externalCode
|
||||
this.dataForm.enabled = data.equipmengroupAlarm.enabled
|
||||
this.dataForm.remark = data.equipmengroupAlarm.remark
|
||||
this.dataForm.valid = data.equipmengroupAlarm.valid
|
||||
this.dataForm.creatorId = data.equipmengroupAlarm.creatorId
|
||||
this.dataForm.creatorName = data.equipmengroupAlarm.creatorName
|
||||
this.dataForm.createTime = data.equipmengroupAlarm.createTime
|
||||
this.dataForm.updaterId = data.equipmengroupAlarm.updaterId
|
||||
this.dataForm.updaterName = data.equipmengroupAlarm.updaterName
|
||||
this.dataForm.updateTime = data.equipmengroupAlarm.updateTime
|
||||
this.dataForm.version = data.equipmengroupAlarm.version
|
||||
this.dataForm.alarmNotify = data.equipmengroupAlarm.alarmNotify
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentGroupAlarm/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
equipmentGroupId: this.dataForm.equipmentGroupId,
|
||||
code: this.dataForm.code,
|
||||
typeDictValue: this.dataForm.typeDictValue,
|
||||
gradeDictValue: this.dataForm.gradeDictValue,
|
||||
alarmContent: this.dataForm.alarmContent,
|
||||
description: this.dataForm.description,
|
||||
externalCode: this.dataForm.externalCode,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version,
|
||||
alarmNotify: this.dataForm.alarmNotify
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,219 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="plc类型" prop="plcType">
|
||||
<el-input v-model="dataForm.plcType" placeholder="plc类型"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="plc名称(ip+名称对应实时数据库表名)" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="plc名称(ip+名称对应实时数据库表名)"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文名称" prop="enName">
|
||||
<el-input v-model="dataForm.enName" placeholder="英文名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="plc条码" prop="barcode">
|
||||
<el-input v-model="dataForm.barcode" placeholder="plc条码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="链接方式,0 tcp,1 udp等" prop="controlType">
|
||||
<el-input v-model="dataForm.controlType" placeholder="链接方式,0 tcp,1 udp等"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否监控 0 代表不监控, 1 代表监控" prop="monitor">
|
||||
<el-input v-model="dataForm.monitor" placeholder="是否监控 0 代表不监控, 1 代表监控"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否采集 0 代表不采集, 1 代表采集" prop="collection">
|
||||
<el-input v-model="dataForm.collection" placeholder="是否采集 0 代表不采集, 1 代表采集"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="IP" prop="ip">
|
||||
<el-input v-model="dataForm.ip" placeholder="IP"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口号" prop="port">
|
||||
<el-input v-model="dataForm.port" placeholder="端口号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
plcType: '',
|
||||
code: '',
|
||||
name: '',
|
||||
enName: '',
|
||||
description: '',
|
||||
barcode: '',
|
||||
controlType: '',
|
||||
monitor: '',
|
||||
collection: '',
|
||||
ip: '',
|
||||
port: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
plcType: [{ required: true, message: 'plc类型不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: 'plc名称(ip+名称对应实时数据库表名)不能为空', trigger: 'blur' }],
|
||||
enName: [{ required: true, message: '英文名称不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||
barcode: [{ required: true, message: 'plc条码不能为空', trigger: 'blur' }],
|
||||
controlType: [{ required: true, message: '链接方式,0 tcp,1 udp等不能为空', 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentPlc/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.plcType = data.equipmenplc.plcType
|
||||
this.dataForm.code = data.equipmenplc.code
|
||||
this.dataForm.name = data.equipmenplc.name
|
||||
this.dataForm.enName = data.equipmenplc.enName
|
||||
this.dataForm.description = data.equipmenplc.description
|
||||
this.dataForm.barcode = data.equipmenplc.barcode
|
||||
this.dataForm.controlType = data.equipmenplc.controlType
|
||||
this.dataForm.monitor = data.equipmenplc.monitor
|
||||
this.dataForm.collection = data.equipmenplc.collection
|
||||
this.dataForm.ip = data.equipmenplc.ip
|
||||
this.dataForm.port = data.equipmenplc.port
|
||||
this.dataForm.enabled = data.equipmenplc.enabled
|
||||
this.dataForm.remark = data.equipmenplc.remark
|
||||
this.dataForm.valid = data.equipmenplc.valid
|
||||
this.dataForm.creatorId = data.equipmenplc.creatorId
|
||||
this.dataForm.creatorName = data.equipmenplc.creatorName
|
||||
this.dataForm.createTime = data.equipmenplc.createTime
|
||||
this.dataForm.updaterId = data.equipmenplc.updaterId
|
||||
this.dataForm.updaterName = data.equipmenplc.updaterName
|
||||
this.dataForm.updateTime = data.equipmenplc.updateTime
|
||||
this.dataForm.version = data.equipmenplc.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentPlc/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
plcType: this.dataForm.plcType,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
enName: this.dataForm.enName,
|
||||
description: this.dataForm.description,
|
||||
barcode: this.dataForm.barcode,
|
||||
controlType: this.dataForm.controlType,
|
||||
monitor: this.dataForm.monitor,
|
||||
collection: this.dataForm.collection,
|
||||
ip: this.dataForm.ip,
|
||||
port: this.dataForm.port,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,156 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="plc表iD" prop="plcId">
|
||||
<el-input v-model="dataForm.plcId" placeholder="plc表iD"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备表id" prop="equipmentId">
|
||||
<el-input v-model="dataForm.equipmentId" placeholder="设备表id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
plcId: '',
|
||||
equipmentId: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
plcId: [{ required: true, message: 'plc表iD不能为空', trigger: 'blur' }],
|
||||
equipmentId: [{ required: true, message: '设备表id不能为空', 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentPlcConnect/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.plcId = data.equipmenplcConnect.plcId
|
||||
this.dataForm.equipmentId = data.equipmenplcConnect.equipmentId
|
||||
this.dataForm.enabled = data.equipmenplcConnect.enabled
|
||||
this.dataForm.remark = data.equipmenplcConnect.remark
|
||||
this.dataForm.valid = data.equipmenplcConnect.valid
|
||||
this.dataForm.creatorId = data.equipmenplcConnect.creatorId
|
||||
this.dataForm.creatorName = data.equipmenplcConnect.creatorName
|
||||
this.dataForm.createTime = data.equipmenplcConnect.createTime
|
||||
this.dataForm.updaterId = data.equipmenplcConnect.updaterId
|
||||
this.dataForm.updaterName = data.equipmenplcConnect.updaterName
|
||||
this.dataForm.updateTime = data.equipmenplcConnect.updateTime
|
||||
this.dataForm.version = data.equipmenplcConnect.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentPlcConnect/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
plcId: this.dataForm.plcId,
|
||||
equipmentId: this.dataForm.equipmentId,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,177 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="父类ID" prop="parentId">
|
||||
<el-input v-model="dataForm.parentId" placeholder="父类ID"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="父类名称" prop="parentName">
|
||||
<el-input v-model="dataForm.parentName" placeholder="父类名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
parentId: '',
|
||||
parentName: '',
|
||||
description: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
parentId: [{ required: true, message: '父类ID不能为空', trigger: 'blur' }],
|
||||
parentName: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentType/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.code = data.equipmentype.code
|
||||
this.dataForm.name = data.equipmentype.name
|
||||
this.dataForm.parentId = data.equipmentype.parentId
|
||||
this.dataForm.parentName = data.equipmentype.parentName
|
||||
this.dataForm.description = data.equipmentype.description
|
||||
this.dataForm.enabled = data.equipmentype.enabled
|
||||
this.dataForm.remark = data.equipmentype.remark
|
||||
this.dataForm.valid = data.equipmentype.valid
|
||||
this.dataForm.creatorId = data.equipmentype.creatorId
|
||||
this.dataForm.creatorName = data.equipmentype.creatorName
|
||||
this.dataForm.createTime = data.equipmentype.createTime
|
||||
this.dataForm.updaterId = data.equipmentype.updaterId
|
||||
this.dataForm.updaterName = data.equipmentype.updaterName
|
||||
this.dataForm.updateTime = data.equipmentype.updateTime
|
||||
this.dataForm.version = data.equipmentype.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/equipmentType/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
parentId: this.dataForm.parentId,
|
||||
parentName: this.dataForm.parentName,
|
||||
description: this.dataForm.description,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,177 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="工厂编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="工厂编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="工厂名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="dataForm.address" placeholder="地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部系统编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部系统编码"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
address: '',
|
||||
description: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: '',
|
||||
externalCode: ''
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: '工厂编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '工厂名称不能为空', trigger: 'blur' }],
|
||||
address: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/factory/{this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.code = data.factory.code
|
||||
this.dataForm.name = data.factory.name
|
||||
this.dataForm.address = data.factory.address
|
||||
this.dataForm.description = data.factory.description
|
||||
this.dataForm.enabled = data.factory.enabled
|
||||
this.dataForm.remark = data.factory.remark
|
||||
this.dataForm.valid = data.factory.valid
|
||||
this.dataForm.creatorId = data.factory.creatorId
|
||||
this.dataForm.creatorName = data.factory.creatorName
|
||||
this.dataForm.createTime = data.factory.createTime
|
||||
this.dataForm.updaterId = data.factory.updaterId
|
||||
this.dataForm.updaterName = data.factory.updaterName
|
||||
this.dataForm.updateTime = data.factory.updateTime
|
||||
this.dataForm.version = data.factory.version
|
||||
this.dataForm.externalCode = data.factory.externalCode
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/factory/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
address: this.dataForm.address,
|
||||
description: this.dataForm.description,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version,
|
||||
externalCode: this.dataForm.externalCode
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,205 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编码,用于对照外部系统的编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部编码,用于对照外部系统的编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="specifications">
|
||||
<el-input v-model="dataForm.specifications" placeholder="规格"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位value,对应到数据字典label_value" prop="unitDictValue">
|
||||
<el-input v-model="dataForm.unitDictValue" placeholder="单位value,对应到数据字典label_value"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="一单位的面积(平方米)" prop="area">
|
||||
<el-input v-model="dataForm.area" placeholder="一单位的面积(平方米)"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="加工一单位产品需要的时间" prop="processTime">
|
||||
<el-input v-model="dataForm.processTime" placeholder="加工一单位产品需要的时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品类型value,对应到数据字典label_value" prop="typeDictValue">
|
||||
<el-input v-model="dataForm.typeDictValue" placeholder="产品类型value,对应到数据字典label_value"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
description: '',
|
||||
externalCode: '',
|
||||
specifications: '',
|
||||
unitDictValue: '',
|
||||
area: '',
|
||||
processTime: '',
|
||||
typeDictValue: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||
externalCode: [{ required: true, message: '外部编码,用于对照外部系统的编码不能为空', trigger: 'blur' }],
|
||||
specifications: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
|
||||
unitDictValue: [{ required: true, message: '单位value,对应到数据字典label_value不能为空', trigger: 'blur' }],
|
||||
area: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/product/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.code = data.data.code
|
||||
this.dataForm.name = data.data.name
|
||||
this.dataForm.description = data.data.description
|
||||
this.dataForm.externalCode = data.data.externalCode
|
||||
this.dataForm.specifications = data.data.specifications
|
||||
this.dataForm.unitDictValue = data.data.unitDictValue
|
||||
this.dataForm.area = data.data.area
|
||||
this.dataForm.processTime = data.data.processTime
|
||||
this.dataForm.typeDictValue = data.data.typeDictValue
|
||||
this.dataForm.enabled = data.data.enabled
|
||||
this.dataForm.remark = data.data.remark
|
||||
this.dataForm.valid = data.data.valid
|
||||
this.dataForm.creatorId = data.data.creatorId
|
||||
this.dataForm.creatorName = data.data.creatorName
|
||||
this.dataForm.createTime = data.data.createTime
|
||||
this.dataForm.updaterId = data.data.updaterId
|
||||
this.dataForm.updaterName = data.data.updaterName
|
||||
this.dataForm.updateTime = data.data.updateTime
|
||||
this.dataForm.version = data.data.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/product/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
description: this.dataForm.description,
|
||||
externalCode: this.dataForm.externalCode,
|
||||
specifications: this.dataForm.specifications,
|
||||
unitDictValue: this.dataForm.unitDictValue,
|
||||
area: this.dataForm.area,
|
||||
processTime: this.dataForm.processTime,
|
||||
typeDictValue: this.dataForm.typeDictValue,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,184 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品id,关联产品表" prop="productId">
|
||||
<el-input v-model="dataForm.productId" placeholder="产品id,关联产品表"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="属性值" prop="value">
|
||||
<el-input v-model="dataForm.value" placeholder="属性值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编码,用于对照外部系统的编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部编码,用于对照外部系统的编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
productId: '',
|
||||
value: '',
|
||||
description: '',
|
||||
externalCode: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
productId: [{ required: true, message: '产品id,关联产品表不能为空', trigger: 'blur' }],
|
||||
value: [{ required: true, message: '属性值不能为空', trigger: 'blur' }],
|
||||
description: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/productArrt/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.code = data.producarrt.code
|
||||
this.dataForm.name = data.producarrt.name
|
||||
this.dataForm.productId = data.producarrt.productId
|
||||
this.dataForm.value = data.producarrt.value
|
||||
this.dataForm.description = data.producarrt.description
|
||||
this.dataForm.externalCode = data.producarrt.externalCode
|
||||
this.dataForm.enabled = data.producarrt.enabled
|
||||
this.dataForm.remark = data.producarrt.remark
|
||||
this.dataForm.valid = data.producarrt.valid
|
||||
this.dataForm.creatorId = data.producarrt.creatorId
|
||||
this.dataForm.creatorName = data.producarrt.creatorName
|
||||
this.dataForm.createTime = data.producarrt.createTime
|
||||
this.dataForm.updaterId = data.producarrt.updaterId
|
||||
this.dataForm.updaterName = data.producarrt.updaterName
|
||||
this.dataForm.updateTime = data.producarrt.updateTime
|
||||
this.dataForm.version = data.producarrt.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/productArrt/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
productId: this.dataForm.productId,
|
||||
value: this.dataForm.value,
|
||||
description: this.dataForm.description,
|
||||
externalCode: this.dataForm.externalCode,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="工厂表ID" prop="factoryId">
|
||||
<el-input v-model="dataForm.factoryId" placeholder="工厂表ID"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产线状态" prop="status">
|
||||
<el-input v-model="dataForm.status" placeholder="产线状态"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="每小时下片数量" prop="tvalue">
|
||||
<el-input v-model="dataForm.tvalue" placeholder="每小时下片数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部系统编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部系统编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
factoryId: '',
|
||||
code: '',
|
||||
name: '',
|
||||
description: '',
|
||||
status: '',
|
||||
tvalue: '',
|
||||
externalCode: '',
|
||||
enabled: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
factoryId: [{ required: true, message: '工厂表ID不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '产线状态不能为空', trigger: 'blur' }],
|
||||
tvalue: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/productionLine/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.factoryId = data.productionLine.factoryId
|
||||
this.dataForm.code = data.productionLine.code
|
||||
this.dataForm.name = data.productionLine.name
|
||||
this.dataForm.description = data.productionLine.description
|
||||
this.dataForm.status = data.productionLine.status
|
||||
this.dataForm.tvalue = data.productionLine.tvalue
|
||||
this.dataForm.externalCode = data.productionLine.externalCode
|
||||
this.dataForm.enabled = data.productionLine.enabled
|
||||
this.dataForm.remark = data.productionLine.remark
|
||||
this.dataForm.valid = data.productionLine.valid
|
||||
this.dataForm.creatorId = data.productionLine.creatorId
|
||||
this.dataForm.creatorName = data.productionLine.creatorName
|
||||
this.dataForm.createTime = data.productionLine.createTime
|
||||
this.dataForm.updaterId = data.productionLine.updaterId
|
||||
this.dataForm.updaterName = data.productionLine.updaterName
|
||||
this.dataForm.updateTime = data.productionLine.updateTime
|
||||
this.dataForm.version = data.productionLine.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/productionLine/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
factoryId: this.dataForm.factoryId,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
description: this.dataForm.description,
|
||||
status: this.dataForm.status,
|
||||
tvalue: this.dataForm.tvalue,
|
||||
externalCode: this.dataForm.externalCode,
|
||||
enabled: this.dataForm.enabled,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,157 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="检测类型id" prop="typeId">
|
||||
<el-input v-model="dataForm.typeId" placeholder="检测类型id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测内容" prop="content">
|
||||
<el-input v-model="dataForm.content" placeholder="检测内容"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="检测编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
typeId: '',
|
||||
content: '',
|
||||
code: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
typeId: [{ required: true, message: '检测类型id不能为空', trigger: 'blur' }],
|
||||
content: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
|
||||
code: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/qualityInspectionDet/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.typeId = data.qualityInspectionDet.typeId
|
||||
this.dataForm.content = data.qualityInspectionDet.content
|
||||
this.dataForm.code = data.qualityInspectionDet.code
|
||||
this.dataForm.remark = data.qualityInspectionDet.remark
|
||||
this.dataForm.valid = data.qualityInspectionDet.valid
|
||||
this.dataForm.creatorId = data.qualityInspectionDet.creatorId
|
||||
this.dataForm.creatorName = data.qualityInspectionDet.creatorName
|
||||
this.dataForm.createTime = data.qualityInspectionDet.createTime
|
||||
this.dataForm.updaterId = data.qualityInspectionDet.updaterId
|
||||
this.dataForm.updaterName = data.qualityInspectionDet.updaterName
|
||||
this.dataForm.updateTime = data.qualityInspectionDet.updateTime
|
||||
this.dataForm.version = data.qualityInspectionDet.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/qualityInspectionDet/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
typeId: this.dataForm.typeId,
|
||||
content: this.dataForm.content,
|
||||
code: this.dataForm.code,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="检测内容id" prop="inspectionDetId">
|
||||
<el-input v-model="dataForm.inspectionDetId" placeholder="检测内容id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测内容(设备推送消息时,可能无对应id,只填这个字段)" prop="inspectionDetContent">
|
||||
<el-input v-model="dataForm.inspectionDetContent" placeholder="检测内容(设备推送消息时,可能无对应id,只填这个字段)"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产线id" prop="productionId">
|
||||
<el-input v-model="dataForm.productionId" placeholder="产线id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工段id" prop="sectionId">
|
||||
<el-input v-model="dataForm.sectionId" placeholder="工段id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测人员,可以多个" prop="checkPerson">
|
||||
<el-input v-model="dataForm.checkPerson" placeholder="检测人员,可以多个"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间" prop="checkTime">
|
||||
<el-input v-model="dataForm.checkTime" placeholder="检测时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源 1,手动(默认) 2,自动" prop="source">
|
||||
<el-input v-model="dataForm.source" placeholder="来源 1,手动(默认) 2,自动"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="explainText">
|
||||
<el-input v-model="dataForm.explainText" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
inspectionDetId: '',
|
||||
inspectionDetContent: '',
|
||||
productionId: '',
|
||||
sectionId: '',
|
||||
checkPerson: '',
|
||||
checkTime: '',
|
||||
source: '',
|
||||
explainText: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
inspectionDetId: [{ required: true, message: '检测内容id不能为空', trigger: 'blur' }],
|
||||
inspectionDetContent: [{ required: true, message: '检测内容(设备推送消息时,可能无对应id,只填这个字段)不能为空', trigger: 'blur' }],
|
||||
productionId: [{ required: true, message: '产线id不能为空', trigger: 'blur' }],
|
||||
sectionId: [{ required: true, message: '工段id不能为空', trigger: 'blur' }],
|
||||
checkPerson: [{ required: true, message: '检测人员,可以多个不能为空', trigger: 'blur' }],
|
||||
checkTime: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/qualityInspectionRecord/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.inspectionDetId = data.qualityInspectionRecord.inspectionDetId
|
||||
this.dataForm.inspectionDetContent = data.qualityInspectionRecord.inspectionDetContent
|
||||
this.dataForm.productionId = data.qualityInspectionRecord.productionId
|
||||
this.dataForm.sectionId = data.qualityInspectionRecord.sectionId
|
||||
this.dataForm.checkPerson = data.qualityInspectionRecord.checkPerson
|
||||
this.dataForm.checkTime = data.qualityInspectionRecord.checkTime
|
||||
this.dataForm.source = data.qualityInspectionRecord.source
|
||||
this.dataForm.explainText = data.qualityInspectionRecord.explainText
|
||||
this.dataForm.remark = data.qualityInspectionRecord.remark
|
||||
this.dataForm.valid = data.qualityInspectionRecord.valid
|
||||
this.dataForm.creatorId = data.qualityInspectionRecord.creatorId
|
||||
this.dataForm.creatorName = data.qualityInspectionRecord.creatorName
|
||||
this.dataForm.createTime = data.qualityInspectionRecord.createTime
|
||||
this.dataForm.updaterId = data.qualityInspectionRecord.updaterId
|
||||
this.dataForm.updaterName = data.qualityInspectionRecord.updaterName
|
||||
this.dataForm.updateTime = data.qualityInspectionRecord.updateTime
|
||||
this.dataForm.version = data.qualityInspectionRecord.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/qualityInspectionRecord/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
inspectionDetId: this.dataForm.inspectionDetId,
|
||||
inspectionDetContent: this.dataForm.inspectionDetContent,
|
||||
productionId: this.dataForm.productionId,
|
||||
sectionId: this.dataForm.sectionId,
|
||||
checkPerson: this.dataForm.checkPerson,
|
||||
checkTime: this.dataForm.checkTime,
|
||||
source: this.dataForm.source,
|
||||
explainText: this.dataForm.explainText,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,149 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="检测类型名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="检测类型名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测类型编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="检测类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
name: '',
|
||||
code: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: ''
|
||||
},
|
||||
dataRule: {
|
||||
name: [{ required: true, message: '检测类型名称不能为空', trigger: 'blur' }],
|
||||
code: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/qualityInspectionType/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.name = data.qualityInspectionType.name
|
||||
this.dataForm.code = data.qualityInspectionType.code
|
||||
this.dataForm.remark = data.qualityInspectionType.remark
|
||||
this.dataForm.valid = data.qualityInspectionType.valid
|
||||
this.dataForm.creatorId = data.qualityInspectionType.creatorId
|
||||
this.dataForm.creatorName = data.qualityInspectionType.creatorName
|
||||
this.dataForm.createTime = data.qualityInspectionType.createTime
|
||||
this.dataForm.updaterId = data.qualityInspectionType.updaterId
|
||||
this.dataForm.updaterName = data.qualityInspectionType.updaterName
|
||||
this.dataForm.updateTime = data.qualityInspectionType.updateTime
|
||||
this.dataForm.version = data.qualityInspectionType.version
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/qualityInspectionType/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
name: this.dataForm.name,
|
||||
code: this.dataForm.code,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,184 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :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-item label="产线ID" prop="productionLineId">
|
||||
<el-input v-model="dataForm.productionLineId" placeholder="产线ID"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态:0 、停用,1、启用" prop="enabled">
|
||||
<el-input v-model="dataForm.enabled" placeholder="启用状态:0 、停用,1、启用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="dataForm.sort" placeholder="排序"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志,是否有效:1 可用 0不可用" prop="valid">
|
||||
<el-input v-model="dataForm.valid" placeholder="删除标志,是否有效:1 可用 0不可用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="creatorId">
|
||||
<el-input v-model="dataForm.creatorId" placeholder="创建人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人姓名" prop="creatorName">
|
||||
<el-input v-model="dataForm.creatorName" placeholder="创建人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updaterId">
|
||||
<el-input v-model="dataForm.updaterId" placeholder="更新人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人姓名" prop="updaterName">
|
||||
<el-input v-model="dataForm.updaterName" placeholder="更新人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-input v-model="dataForm.updateTime" placeholder="更新时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="dataForm.version" placeholder="版本号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部系统编码" prop="externalCode">
|
||||
<el-input v-model="dataForm.externalCode" placeholder="外部系统编码"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
productionLineId: '',
|
||||
code: '',
|
||||
name: '',
|
||||
description: '',
|
||||
enabled: '',
|
||||
sort: '',
|
||||
remark: '',
|
||||
valid: '',
|
||||
creatorId: '',
|
||||
creatorName: '',
|
||||
createTime: '',
|
||||
updaterId: '',
|
||||
updaterName: '',
|
||||
updateTime: '',
|
||||
version: '',
|
||||
externalCode: ''
|
||||
},
|
||||
dataRule: {
|
||||
productionLineId: [{ required: true, message: '产线ID不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '编码不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||
enabled: [{ required: true, message: '启用状态:0 、停用,1、启用不能为空', trigger: 'blur' }],
|
||||
sort: [{ 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' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/workshopSection/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.productionLineId = data.workshopSection.productionLineId
|
||||
this.dataForm.code = data.workshopSection.code
|
||||
this.dataForm.name = data.workshopSection.name
|
||||
this.dataForm.description = data.workshopSection.description
|
||||
this.dataForm.enabled = data.workshopSection.enabled
|
||||
this.dataForm.sort = data.workshopSection.sort
|
||||
this.dataForm.remark = data.workshopSection.remark
|
||||
this.dataForm.valid = data.workshopSection.valid
|
||||
this.dataForm.creatorId = data.workshopSection.creatorId
|
||||
this.dataForm.creatorName = data.workshopSection.creatorName
|
||||
this.dataForm.createTime = data.workshopSection.createTime
|
||||
this.dataForm.updaterId = data.workshopSection.updaterId
|
||||
this.dataForm.updaterName = data.workshopSection.updaterName
|
||||
this.dataForm.updateTime = data.workshopSection.updateTime
|
||||
this.dataForm.version = data.workshopSection.version
|
||||
this.dataForm.externalCode = data.workshopSection.externalCode
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/monitoring/workshopSection/${!this.dataForm.id ? '' : this.dataForm.id}`),
|
||||
method: this.dataForm.id ? 'put' : 'post',
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
productionLineId: this.dataForm.productionLineId,
|
||||
code: this.dataForm.code,
|
||||
name: this.dataForm.name,
|
||||
description: this.dataForm.description,
|
||||
enabled: this.dataForm.enabled,
|
||||
sort: this.dataForm.sort,
|
||||
remark: this.dataForm.remark,
|
||||
valid: this.dataForm.valid,
|
||||
creatorId: this.dataForm.creatorId,
|
||||
creatorName: this.dataForm.creatorName,
|
||||
createTime: this.dataForm.createTime,
|
||||
updaterId: this.dataForm.updaterId,
|
||||
updaterName: this.dataForm.updaterName,
|
||||
updateTime: this.dataForm.updateTime,
|
||||
version: this.dataForm.version,
|
||||
externalCode: this.dataForm.externalCode
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user