Commit b1a5cdd9 by 郑艺斌

fix: 修改设备台账新增

parent 597e97d6
{ {
"name": "jeeplus-ui", "name": "jianlin-tms-view",
"version": "1.0.0", "version": "1.0.0",
"description": "jeeplus快速开发平台", "description": "建霖TMS调度系统",
"author": "www.jeeplus.org",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
...@@ -9,6 +9,14 @@ export default class EquipmentAccount { ...@@ -9,6 +9,14 @@ export default class EquipmentAccount {
data, data,
}); });
} }
// 设备台账下拉列表
getEquipmentList(data) {
return request({
url: `/facility/equipment/getList`,
method: "post",
data,
});
}
// 设备台账新增 // 设备台账新增
getEquipmentAdd(data) { getEquipmentAdd(data) {
return request({ return request({
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-form :model="formData" label-width="100px" :disabled="dialogConfig.disabled" ref="ruleForm" :rules="rules"> <el-form :model="formData" label-width="100px" :disabled="dialogConfig.disabled" ref="ruleForm" :rules="rules">
<el-form-item label="设备类型:" prop="equipmentType"> <el-form-item label="设备类型:" prop="equipmentType">
<el-select v-model="formData.equipmentType" placeholder="请选择设备类型"> <el-select v-model="formData.equipmentType" placeholder="请选择设备类型">
<el-option v-for="item in $dictUtils.getDictList('tms_point_equipment_type')" :key="item.value" <el-option v-for="item in $dictUtils.getDictList('tms_facility_type').splice(1)" :key="item.value"
:label="item.label" :value="item.value"> :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<vxe-table border="full" ref="xTable" show-overflow auto-resize resizable height="auto" :loading="loading" <vxe-table border="full" ref="xTable" show-overflow auto-resize resizable height="auto" :loading="loading"
:scroll-y="{ enabled: false }" :span-method="mergeRowMethod" :data="tableData" header-align="center" :scroll-y="{ enabled: false }" :span-method="mergeRowMethod" :data="tableData" header-align="center"
:seq-config="{ seqMethod: seqMethod }"> :seq-config="{ seqMethod: seqMethod }">
<vxe-column type="seq" width="60" title="序号" align="center"></vxe-column> <!-- <vxe-column type="seq" width="60" title="序号" align="center"></vxe-column> -->
<vxe-column field="company_dictText" title="公司" align="center" width="130px"></vxe-column> <vxe-column field="company_dictText" title="公司" align="center" width="130px"></vxe-column>
<vxe-column field="factoryId_dictText" title="厂区" align="center" width="130px"></vxe-column> <vxe-column field="factoryId_dictText" title="厂区" align="center" width="130px"></vxe-column>
<vxe-column field="floorNum" title="楼层" align="center" width="130px"></vxe-column> <vxe-column field="floorNum" title="楼层" align="center" width="130px"></vxe-column>
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
<vxe-column field="command" title="指令标识" align="center" width="130px"></vxe-column> <vxe-column field="command" title="指令标识" align="center" width="130px"></vxe-column>
<vxe-column field="tempId_dictText" title="站点配置模板" align="center" width="130px"></vxe-column> <vxe-column field="tempId_dictText" title="站点配置模板" align="center" width="130px"></vxe-column>
<vxe-column field="pointName" title="关联点位" align="center" width="130px"></vxe-column> <vxe-column field="pointName" title="关联点位" align="center" width="130px"></vxe-column>
<vxe-column field="pointAlias" title="点位别名" align="center" width="130px"></vxe-column>
<vxe-column field="pointTypeName" title="任务类型" align="center" width="130px"></vxe-column> <vxe-column field="pointTypeName" title="任务类型" align="center" width="130px"></vxe-column>
<vxe-column field="pointStatus" title="空闲状态" align="center" width="130px"> <vxe-column field="pointStatus" title="空闲状态" align="center" width="130px">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -159,7 +160,7 @@ export default { ...@@ -159,7 +160,7 @@ export default {
methods: { methods: {
// 合并表格 // 合并表格
mergeRowMethod ({ row, _rowIndex, column, visibleData }) { mergeRowMethod ({ row, _rowIndex, column, visibleData }) {
const fields = ['createDate', 'company_dictText', 'factoryId_dictText', 'floorNum', 'command', 'tempId_dictText', 'remark', 'status', 'updateDate'] const fields = ['createDate', 'company_dictText', 'siteType_dictText', 'factoryId_dictText', 'floorNum', 'command', 'tempId_dictText', 'remark', 'status', 'updateDate']
const cellValue = row[column.property] const cellValue = row[column.property]
if (cellValue && fields.includes(column.property)) { if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1] // 获取列表上一条数据 const prevRow = visibleData[_rowIndex - 1] // 获取列表上一条数据
......
...@@ -80,10 +80,12 @@ ...@@ -80,10 +80,12 @@
<script> <script>
import SiteTaskType from '@/api/siteAdmin/SiteTaskType' import SiteTaskType from '@/api/siteAdmin/SiteTaskType'
import SiteConfigTemplate from '@/api/siteAdmin/SiteConfigTemplate' import SiteConfigTemplate from '@/api/siteAdmin/SiteConfigTemplate'
import EquipmentAccount from '@/api/equipmentAdmin/EquipmentAccount'
export default { export default {
SiteTaskType: null, SiteTaskType: null,
SiteConfigTemplate: null, SiteConfigTemplate: null,
EquipmentAccount: null,
name: '', name: '',
components: {}, components: {},
props: { props: {
...@@ -195,9 +197,15 @@ export default { ...@@ -195,9 +197,15 @@ export default {
}, },
// 关联任务下拉 // 关联任务下拉
getTaskDeviceType (value, row) { getTaskDeviceType (value, row) {
if (value == '3') {
this.EquipmentAccount.getEquipmentList({ equipmentType: row.deviceType }).then(({ data }) => {
this.$set(row, 'options', data)
})
} else {
this.SiteConfigTemplate.getConfigTempListType(row.deviceType).then(({ data }) => { this.SiteConfigTemplate.getConfigTempListType(row.deviceType).then(({ data }) => {
this.$set(row, 'options', data) this.$set(row, 'options', data)
}) })
}
this.formData.typeEntities.map(item => { this.formData.typeEntities.map(item => {
if (item.id == row.id) { if (item.id == row.id) {
item.deviceType = value item.deviceType = value
...@@ -350,6 +358,7 @@ export default { ...@@ -350,6 +358,7 @@ export default {
created () { created () {
this.SiteTaskType = new SiteTaskType() this.SiteTaskType = new SiteTaskType()
this.SiteConfigTemplate = new SiteConfigTemplate() this.SiteConfigTemplate = new SiteConfigTemplate()
this.EquipmentAccount = new EquipmentAccount()
}, },
mounted () { mounted () {
this.getTaskTypeList() this.getTaskTypeList()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment