From fe7821cbd84082db1fcd7adc995d3bbe8588cc03 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 17 Oct 2023 15:22:17 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=A0=B8=E5=BF=83=E6=A8=A1=E5=9D=97-?= =?UTF-8?q?=E5=8E=82=E5=8A=A1-=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 5 +---- src/api/base/equipment.js | 14 +++++++------- src/api/base/equipmentType.js | 12 ++++++------ src/components/DialogForm/index.vue | 2 ++ src/router/index.js | 18 +++++++++--------- src/views/base/equipmentBindGroup/index.vue | 4 ++-- .../base/equipmentBindSection/dialogForm.vue | 2 +- src/views/base/equipmentBindSection/index.vue | 2 +- src/views/base/equipmentGroup/index.vue | 2 +- src/views/base/equipmentPlcConnect/index.vue | 6 +++--- .../equipment/components/EquipmentInfoForm.vue | 2 +- src/views/core/base/equipment/index.vue | 13 +++++-------- src/views/core/base/equipmentType/index.vue | 4 ++-- .../equipment/timing-diagram/output/index.vue | 2 +- .../equipment/timing-diagram/status/index.vue | 2 +- .../equipmentStatusAndParams/index.vue | 2 +- 16 files changed, 44 insertions(+), 48 deletions(-) diff --git a/.env.dev b/.env.dev index 2f15db72..86c7a2f5 100644 --- a/.env.dev +++ b/.env.dev @@ -12,10 +12,7 @@ ENV = 'development' VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/开发环境 -# VUE_APP_BASE_API = 'http://192.168.1.49:48080' -# 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_APP_BASE_API = 'http://192.168.0.33:48082' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/base/equipment.js b/src/api/base/equipment.js index 8c1b4246..6fb31456 100644 --- a/src/api/base/equipment.js +++ b/src/api/base/equipment.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 创建设备 export function createEquipment(data) { return request({ - url: '/base/equipment/create', + url: '/base/core-equipment/create', method: 'post', data: data }) @@ -12,7 +12,7 @@ export function createEquipment(data) { // 更新设备 export function updateEquipment(data) { return request({ - url: '/base/equipment/update', + url: '/base/core-equipment/update', method: 'put', data: data }) @@ -21,7 +21,7 @@ export function updateEquipment(data) { // 删除设备 export function deleteEquipment(id) { return request({ - url: '/base/equipment/delete?id=' + id, + url: '/base/core-equipment/delete?id=' + id, method: 'delete' }) } @@ -29,7 +29,7 @@ export function deleteEquipment(id) { // 获得设备 export function getEquipment(id) { return request({ - url: '/base/equipment/get?id=' + id, + url: '/base/core-equipment/get?id=' + id, method: 'get' }) } @@ -37,7 +37,7 @@ export function getEquipment(id) { // 获得设备分页 export function getEquipmentPage(query) { return request({ - url: '/base/equipment/page', + url: '/base/core-equipment/page', method: 'get', params: query }) @@ -46,7 +46,7 @@ export function getEquipmentPage(query) { // 导出设备 Excel export function exportEquipmentExcel(query) { return request({ - url: '/base/equipment/export-excel', + url: '/base/core-equipment/export-excel', method: 'get', params: query, responseType: 'blob' @@ -55,7 +55,7 @@ export function exportEquipmentExcel(query) { // 获得所有设备列表 export function getEquipmentAll() { return request({ - url: '/base/equipment/listAll', + url: '/base/core-equipment/listAll', method: 'get' }) } diff --git a/src/api/base/equipmentType.js b/src/api/base/equipmentType.js index 57e7746a..3783fbdb 100644 --- a/src/api/base/equipmentType.js +++ b/src/api/base/equipmentType.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 创建设备类型 export function createEquipmentType(data) { return request({ - url: '/base/equipment-type/create', + url: '/base/core-equipment-type/create', method: 'post', data: data }) @@ -12,7 +12,7 @@ export function createEquipmentType(data) { // 更新设备类型 export function updateEquipmentType(data) { return request({ - url: '/base/equipment-type/update', + url: '/base/core-equipment-type/update', method: 'put', data: data }) @@ -21,7 +21,7 @@ export function updateEquipmentType(data) { // 删除设备类型 export function deleteEquipmentType(id) { return request({ - url: '/base/equipment-type/delete?id=' + id, + url: '/base/core-equipment-type/delete?id=' + id, method: 'delete' }) } @@ -29,7 +29,7 @@ export function deleteEquipmentType(id) { // 获得设备类型 export function getEquipmentType(id) { return request({ - url: '/base/equipment-type/get?id=' + id, + url: '/base/core-equipment-type/get?id=' + id, method: 'get' }) } @@ -37,7 +37,7 @@ export function getEquipmentType(id) { // 获得设备类型分页 export function getEquipmentTypePage(query) { return request({ - url: '/base/equipment-type/page', + url: '/base/core-equipment-type/page', method: 'get', params: query }) @@ -46,7 +46,7 @@ export function getEquipmentTypePage(query) { // 导出设备类型 Excel export function exportEquipmentTypeExcel(query) { return request({ - url: '/base/equipment-type/export-excel', + url: '/base/core-equipment-type/export-excel', method: 'get', params: query, responseType: 'blob' diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 72d7e166..b691dc18 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -94,6 +94,7 @@ class="file" v-for="file in form[col.prop] || []" :file="file" + :key="file.fileUrl" @delete="handleDeleteFile(file)" /> @@ -230,6 +231,7 @@ export default { dataForm: { handler(val) { this.form = JSON.parse(JSON.stringify(val)); + this.form.files = this.form.files ?? []; }, deep: true, immediate: true, diff --git a/src/router/index.js b/src/router/index.js index fc08e221..4c2bc159 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -72,15 +72,15 @@ export const constantRoutes = [ { path: '/', component: Layout, - redirect: 'core/base/factory', - // children: [{ - // path: 'index', - // redirect: 'core/base/factory', - // component: (resolve) => require(['@/views/index'], resolve), - // name: '首页', - // meta: { title: '首页', icon: 'dashboard', affix: true } - // } - // ] + // redirect: 'core/base/factory', + children: [{ + path: 'index', + // redirect: 'core/base/factory', + component: (resolve) => require(['@/views/index'], resolve), + name: '首页', + meta: { title: '首页', icon: 'dashboard', affix: true } + } + ] }, { path: '/user', diff --git a/src/views/base/equipmentBindGroup/index.vue b/src/views/base/equipmentBindGroup/index.vue index e504c804..9da7b61d 100644 --- a/src/views/base/equipmentBindGroup/index.vue +++ b/src/views/base/equipmentBindGroup/index.vue @@ -219,7 +219,7 @@ export default { { select: true, label: '设备', - url: '/base/equipment/page?pageNo=1&pageSize=100', + url: '/base/core-equipment/page?pageNo=1&pageSize=100', prop: 'equipmentId', bind: { filterable: true, @@ -278,7 +278,7 @@ export default { input: true, label: '设备分组编码', prop: 'code', - // url: '/base/equipment/getCode', + // url: '/base/core-equipment/getCode', }, ], ], diff --git a/src/views/base/equipmentBindSection/dialogForm.vue b/src/views/base/equipmentBindSection/dialogForm.vue index ce6ff70c..3ef2de3e 100644 --- a/src/views/base/equipmentBindSection/dialogForm.vue +++ b/src/views/base/equipmentBindSection/dialogForm.vue @@ -191,7 +191,7 @@ export default { // 获取设备列表 async getEquipmentList() { 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) => ({ label: item.name, diff --git a/src/views/base/equipmentBindSection/index.vue b/src/views/base/equipmentBindSection/index.vue index f0c2238f..47afbdb2 100644 --- a/src/views/base/equipmentBindSection/index.vue +++ b/src/views/base/equipmentBindSection/index.vue @@ -192,7 +192,7 @@ export default { { select: true, label: '设备', - url: '/base/equipment/page?pageNo=1&pageSize=100', + url: '/base/core-equipment/page?pageNo=1&pageSize=100', prop: 'equipmentId', rules: [{ required: true, message: '不能为空', trigger: 'blur' }], }, diff --git a/src/views/base/equipmentGroup/index.vue b/src/views/base/equipmentGroup/index.vue index f3509adc..06e75f78 100644 --- a/src/views/base/equipmentGroup/index.vue +++ b/src/views/base/equipmentGroup/index.vue @@ -192,7 +192,7 @@ export default { input: true, label: '设备分组编码', prop: 'code', - // url: '/base/equipment/getCode', + // url: '/base/core-equipment/getCode', } ] ], diff --git a/src/views/base/equipmentPlcConnect/index.vue b/src/views/base/equipmentPlcConnect/index.vue index f64f05cc..bb7c2df3 100644 --- a/src/views/base/equipmentPlcConnect/index.vue +++ b/src/views/base/equipmentPlcConnect/index.vue @@ -247,7 +247,7 @@ export default { select: true, label: '设备', 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' }], bind: { filterable: true, @@ -283,7 +283,7 @@ export default { input: true, label: '关联表名', prop: 'plcTableName', - // url: '/base/equipment/getCode', + // url: '/base/core-equipment/getCode', }, ], ], @@ -320,7 +320,7 @@ export default { methods: { async getEquipmentOptions() { const res = await this.$axios({ - url: '/base/equipment/listAll', + url: '/base/core-equipment/listAll', method: 'get', }); return res.data; diff --git a/src/views/core/base/equipment/components/EquipmentInfoForm.vue b/src/views/core/base/equipment/components/EquipmentInfoForm.vue index 35fea7ae..e13d82ae 100644 --- a/src/views/core/base/equipment/components/EquipmentInfoForm.vue +++ b/src/views/core/base/equipment/components/EquipmentInfoForm.vue @@ -283,7 +283,7 @@ export default { async getEqTypeList() { this.formLoading = true; const { code, data } = await this.$axios( - '/base/equipment-type/page?pageNo=1&pageSize=100' + '/base/core-equipment-type/page?pageNo=1&pageSize=100' ); // debugger; if (code == 0) { diff --git a/src/views/core/base/equipment/index.vue b/src/views/core/base/equipment/index.vue index 16c881d8..cfae90a4 100644 --- a/src/views/core/base/equipment/index.vue +++ b/src/views/core/base/equipment/index.vue @@ -60,9 +60,9 @@ name: '基本信息', key: 'base', rows: computedRows, - url: '/base/equipment/get', - urlUpdate: '/base/equipment/update', - urlCreate: '/base/equipment/create', + url: '/base/core-equipment/get', + urlUpdate: '/base/core-equipment/update', + urlCreate: '/base/core-equipment/create', queryParams: { id: form.id }, }, { @@ -105,9 +105,6 @@