update 核心模块-厂务-设备
This commit is contained in:
parent
9be57ad750
commit
fe7821cbd8
5
.env.dev
5
.env.dev
@ -12,10 +12,7 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 产线监控系统
|
VUE_APP_TITLE = 产线监控系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48080'
|
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.188:48080'
|
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 创建设备
|
// 创建设备
|
||||||
export function createEquipment(data) {
|
export function createEquipment(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/create',
|
url: '/base/core-equipment/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -12,7 +12,7 @@ export function createEquipment(data) {
|
|||||||
// 更新设备
|
// 更新设备
|
||||||
export function updateEquipment(data) {
|
export function updateEquipment(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/update',
|
url: '/base/core-equipment/update',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -21,7 +21,7 @@ export function updateEquipment(data) {
|
|||||||
// 删除设备
|
// 删除设备
|
||||||
export function deleteEquipment(id) {
|
export function deleteEquipment(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/delete?id=' + id,
|
url: '/base/core-equipment/delete?id=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ export function deleteEquipment(id) {
|
|||||||
// 获得设备
|
// 获得设备
|
||||||
export function getEquipment(id) {
|
export function getEquipment(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/get?id=' + id,
|
url: '/base/core-equipment/get?id=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ export function getEquipment(id) {
|
|||||||
// 获得设备分页
|
// 获得设备分页
|
||||||
export function getEquipmentPage(query) {
|
export function getEquipmentPage(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/page',
|
url: '/base/core-equipment/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@ -46,7 +46,7 @@ export function getEquipmentPage(query) {
|
|||||||
// 导出设备 Excel
|
// 导出设备 Excel
|
||||||
export function exportEquipmentExcel(query) {
|
export function exportEquipmentExcel(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/export-excel',
|
url: '/base/core-equipment/export-excel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
@ -55,7 +55,7 @@ export function exportEquipmentExcel(query) {
|
|||||||
// 获得所有设备列表
|
// 获得所有设备列表
|
||||||
export function getEquipmentAll() {
|
export function getEquipmentAll() {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 创建设备类型
|
// 创建设备类型
|
||||||
export function createEquipmentType(data) {
|
export function createEquipmentType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/create',
|
url: '/base/core-equipment-type/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -12,7 +12,7 @@ export function createEquipmentType(data) {
|
|||||||
// 更新设备类型
|
// 更新设备类型
|
||||||
export function updateEquipmentType(data) {
|
export function updateEquipmentType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/update',
|
url: '/base/core-equipment-type/update',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -21,7 +21,7 @@ export function updateEquipmentType(data) {
|
|||||||
// 删除设备类型
|
// 删除设备类型
|
||||||
export function deleteEquipmentType(id) {
|
export function deleteEquipmentType(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/delete?id=' + id,
|
url: '/base/core-equipment-type/delete?id=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ export function deleteEquipmentType(id) {
|
|||||||
// 获得设备类型
|
// 获得设备类型
|
||||||
export function getEquipmentType(id) {
|
export function getEquipmentType(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/get?id=' + id,
|
url: '/base/core-equipment-type/get?id=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ export function getEquipmentType(id) {
|
|||||||
// 获得设备类型分页
|
// 获得设备类型分页
|
||||||
export function getEquipmentTypePage(query) {
|
export function getEquipmentTypePage(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/page',
|
url: '/base/core-equipment-type/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@ -46,7 +46,7 @@ export function getEquipmentTypePage(query) {
|
|||||||
// 导出设备类型 Excel
|
// 导出设备类型 Excel
|
||||||
export function exportEquipmentTypeExcel(query) {
|
export function exportEquipmentTypeExcel(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-type/export-excel',
|
url: '/base/core-equipment-type/export-excel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
@ -94,6 +94,7 @@
|
|||||||
class="file"
|
class="file"
|
||||||
v-for="file in form[col.prop] || []"
|
v-for="file in form[col.prop] || []"
|
||||||
:file="file"
|
:file="file"
|
||||||
|
:key="file.fileUrl"
|
||||||
@delete="handleDeleteFile(file)" />
|
@delete="handleDeleteFile(file)" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -230,6 +231,7 @@ export default {
|
|||||||
dataForm: {
|
dataForm: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.form = JSON.parse(JSON.stringify(val));
|
this.form = JSON.parse(JSON.stringify(val));
|
||||||
|
this.form.files = this.form.files ?? [];
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
@ -72,15 +72,15 @@ export const constantRoutes = [
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'core/base/factory',
|
|
||||||
// children: [{
|
|
||||||
// path: 'index',
|
|
||||||
// redirect: 'core/base/factory',
|
// redirect: 'core/base/factory',
|
||||||
// component: (resolve) => require(['@/views/index'], resolve),
|
children: [{
|
||||||
// name: '首页',
|
path: 'index',
|
||||||
// meta: { title: '首页', icon: 'dashboard', affix: true }
|
// redirect: 'core/base/factory',
|
||||||
// }
|
component: (resolve) => require(['@/views/index'], resolve),
|
||||||
// ]
|
name: '首页',
|
||||||
|
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
|
@ -219,7 +219,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@ -278,7 +278,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备分组编码',
|
label: '设备分组编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
// url: '/base/equipment/getCode',
|
// url: '/base/core-equipment/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -191,7 +191,7 @@ export default {
|
|||||||
// 获取设备列表
|
// 获取设备列表
|
||||||
async getEquipmentList() {
|
async getEquipmentList() {
|
||||||
const response = await this.$axios(
|
const response = await this.$axios(
|
||||||
'/base/equipment/page?pageNo=1&pageSize=100'
|
'/base/core-equipment/page?pageNo=1&pageSize=100'
|
||||||
);
|
);
|
||||||
this.equipmentList = response.data.list.map((item) => ({
|
this.equipmentList = response.data.list.map((item) => ({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
|
@ -192,7 +192,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
|
@ -192,7 +192,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备分组编码',
|
label: '设备分组编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
// url: '/base/equipment/getCode',
|
// url: '/base/core-equipment/getCode',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -247,7 +247,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
url: '/base/equipment/page?pageNo=1&pageSize=99',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=99',
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@ -283,7 +283,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '关联表名',
|
label: '关联表名',
|
||||||
prop: 'plcTableName',
|
prop: 'plcTableName',
|
||||||
// url: '/base/equipment/getCode',
|
// url: '/base/core-equipment/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -320,7 +320,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async getEquipmentOptions() {
|
async getEquipmentOptions() {
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
|
@ -283,7 +283,7 @@ export default {
|
|||||||
async getEqTypeList() {
|
async getEqTypeList() {
|
||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
const { code, data } = await this.$axios(
|
const { code, data } = await this.$axios(
|
||||||
'/base/equipment-type/page?pageNo=1&pageSize=100'
|
'/base/core-equipment-type/page?pageNo=1&pageSize=100'
|
||||||
);
|
);
|
||||||
// debugger;
|
// debugger;
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
@ -60,9 +60,9 @@
|
|||||||
name: '基本信息',
|
name: '基本信息',
|
||||||
key: 'base',
|
key: 'base',
|
||||||
rows: computedRows,
|
rows: computedRows,
|
||||||
url: '/base/equipment/get',
|
url: '/base/core-equipment/get',
|
||||||
urlUpdate: '/base/equipment/update',
|
urlUpdate: '/base/core-equipment/update',
|
||||||
urlCreate: '/base/equipment/create',
|
urlCreate: '/base/core-equipment/create',
|
||||||
queryParams: { id: form.id },
|
queryParams: { id: form.id },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,9 +105,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import { getAccessToken } from '@/utils/auth';
|
|
||||||
import EquipmentPics from './components/EquipmentPics';
|
|
||||||
import EquipmentAssets from './components/EquipmentAssets';
|
|
||||||
import EquipmentDrawer from './components/EquipmentDrawer';
|
import EquipmentDrawer from './components/EquipmentDrawer';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -242,7 +239,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备编码',
|
label: '设备编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
url: '/base/equipment/getCode',
|
url: '/base/core-equipment/getCode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
@ -269,7 +266,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '设备类型',
|
label: '设备类型',
|
||||||
prop: 'equipmentTypeId',
|
prop: 'equipmentTypeId',
|
||||||
url: '/base/equipment-type/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
|
@ -139,7 +139,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '设备类型编码',
|
label: '设备类型编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
url: '/base/equipment-type/getCode',
|
url: '/base/core-equipment-type/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@ -147,7 +147,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '父类',
|
label: '父类',
|
||||||
prop: 'parentId',
|
prop: 'parentId',
|
||||||
url: '/base/equipment-type/page?pageNo=1&pageSize=100',
|
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
],
|
],
|
||||||
|
@ -416,7 +416,7 @@ export default {
|
|||||||
/** 准备设备数据 */
|
/** 准备设备数据 */
|
||||||
async initEquipment() {
|
async initEquipment() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
@ -223,7 +223,7 @@ export default {
|
|||||||
/** 准备设备数据 */
|
/** 准备设备数据 */
|
||||||
async initEquipment() {
|
async initEquipment() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/base/equipment/listAll',
|
url: '/base/core-equipment/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
@ -215,7 +215,7 @@ export default {
|
|||||||
/** 根据产线获取设备 */
|
/** 根据产线获取设备 */
|
||||||
async getEquipmentList(id) {
|
async getEquipmentList(id) {
|
||||||
const { data } = await this.$axios({
|
const { data } = await this.$axios({
|
||||||
url: '/base/equipment/listByLine',
|
url: '/base/core-equipment/listByLine',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { id },
|
params: { id },
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user