From eef1ef0be935d4a3d8fc691b2666f41796b2d4a5 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期一, 04 十一月 2024 19:57:08 +0800 Subject: [PATCH] 增加列表显示 --- src/views/console/basic-data/tpmComp2.vue | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/views/console/basic-data/tpmComp2.vue b/src/views/console/basic-data/tpmComp2.vue index a28a3f1..e525b0b 100644 --- a/src/views/console/basic-data/tpmComp2.vue +++ b/src/views/console/basic-data/tpmComp2.vue @@ -228,8 +228,8 @@ keyWord: '', status: 1, }, - exportUrlTpl: '/api/blade-cps/device-types/export/template', - uploadUrl: '/api/blade-cps/device-types/excel/import', + exportUrlTpl: '/api/smis/device-types/export/template', + uploadUrl: '/api/smis/device-types/excel/import', visible: false, config: { labelWidth: 120, @@ -300,7 +300,7 @@ ...data, ...this.params } - return await this.$HTTP.get(`/api/blade-cps/device-types/page`, {}, { params }).then(res => { + return await this.$HTTP.get(`/api/smis/device-types/page`, {}, { params }).then(res => { res.data.records = res?.data?.records.map(v => { return { ...v, @@ -340,10 +340,10 @@ }, methods: { init() { - this.$HTTP.get(`/api/blade-cps/check-project/page?key=¤t=1&size=-1`).then(res => { + this.$HTTP.get(`/api/smis/check-project/page?key=¤t=1&size=-1`).then(res => { this.options = res.data.records }) - this.$HTTP.get(`/api/blade-cps/maintain-item/list?keyWord=`).then(res => { + this.$HTTP.get(`/api/smis/maintain-item/list?keyWord=`).then(res => { this.options1 = res.data }) }, @@ -358,7 +358,7 @@ this.visible = true }, exportData() { - this.$HTTP.post(`/api/blade-cps/device-types/excel/export`, {}, { params: this.params }).then(res => { + this.$HTTP.post(`/api/smis/device-types/excel/export`, {}, { params: this.params }).then(res => { if (res.success) { window.open(res.data.link) } @@ -368,7 +368,7 @@ this.$refs.table.reload() }, table_del(selection, type) { - this.$HTTP.delete(`/api/blade-cps/device-types?type=${type}`, {}, { + this.$HTTP.delete(`/api/smis/device-types?type=${type}`, {}, { data: { idList: selection.map(v => v.id), } @@ -389,14 +389,14 @@ }, submit() { if (!this.form.id) { - this.$HTTP.post(`/api/blade-cps/device-types`, this.form).then(res => { + this.$HTTP.post(`/api/smis/device-types`, this.form).then(res => { if (res.success) { this.visible = false this.search() } }) } else { - this.$HTTP.put(`/api/blade-cps/device-types`, this.form).then(res => { + this.$HTTP.put(`/api/smis/device-types`, this.form).then(res => { if (res.success) { this.visible = false this.search() @@ -415,7 +415,7 @@ }, getCheckList() { let row = this.selectRow - return this.$HTTP.get(`/api/blade-cps/device-type-check-projects/page?id=${row.id}`).then(res => { + return this.$HTTP.get(`/api/smis/device-type-check-projects/page?id=${row.id}`).then(res => { if (res.success) { this.tabledata = res.data this.getCheckListChild(this.tabledata[0]) @@ -426,7 +426,7 @@ }, getCheckListChild(row) { if (!row?.checkProjectId) return this.tableDataList = [] - this.$HTTP.get(`/api/blade-cps/check-item/list?projectId=${row.checkProjectId}`).then(res => { + this.$HTTP.get(`/api/smis/check-item/list?projectId=${row.checkProjectId}`).then(res => { if (res.success) { this.tableDataList = res.data } else { @@ -442,7 +442,7 @@ this.tabledata.splice(index, 1) }, delCheck(row) { - this.$HTTP.delete(`/api/blade-cps/device-type-check-projects`, {}, { + this.$HTTP.delete(`/api/smis/device-type-check-projects`, {}, { data: { ids: [row.id] } @@ -453,7 +453,7 @@ }) }, addCheck(row) { - this.$HTTP.post(`/api/blade-cps/device-type-check-projects`, { + this.$HTTP.post(`/api/smis/device-type-check-projects`, { deviceTypeId: this.selectRow.id, checkProjectId: [row.checkProjectId], intervalTime: row.intervalTime @@ -474,7 +474,7 @@ }) }, getMList() { - return this.$HTTP.get(`/api/blade-cps/maintain-project/list?deviceTypeId=${this.selectRow.id}`).then(res => { + return this.$HTTP.get(`/api/smis/maintain-project/list?deviceTypeId=${this.selectRow.id}`).then(res => { if (res.success) { this.talbeDataM = res.data this.getMlistChild(this.talbeDataM?.[0]) @@ -486,7 +486,7 @@ getMlistChild(row) { this.selectMRow = row if (!row?.id) return this.talbeDataMChild = [] - this.$HTTP.get(`/api/blade-cps/maintain-project-item/item-list?projectId=${row.id}`).then(res => { + this.$HTTP.get(`/api/smis/maintain-project-item/item-list?projectId=${row.id}`).then(res => { if (res) { this.talbeDataMChild = res } else { @@ -496,7 +496,7 @@ }, // addM(row) { - this.$HTTP.post(`/api/blade-cps/maintain-project/create-maintain-project`, { + this.$HTTP.post(`/api/smis/maintain-project/create-maintain-project`, { code: row.code, deviceTypeId: this.selectRow.id, deviceTypeName: row.deviceTypeName, @@ -513,7 +513,7 @@ }) }, delM(row) { - this.$HTTP.post(`/api/blade-cps/maintain-project/delete-maintain-project`, {}, { + this.$HTTP.post(`/api/smis/maintain-project/delete-maintain-project`, {}, { params: { id: row.id } @@ -525,7 +525,7 @@ }, delMChild(row) { - this.$HTTP.post(`/api/blade-cps/maintain-project-item/delete-maintain-project-item?id=${row.id}`).then(res => { + this.$HTTP.post(`/api/smis/maintain-project-item/delete-maintain-project-item?id=${row.id}`).then(res => { if (res.success) { this.getMlistChild(this.selectMRow) } else { @@ -538,7 +538,7 @@ this.visibleAdd = true }, saveAdd() { - this.$HTTP.post(`/api/blade-cps/maintain-project-item/create-maintain-project-item`, { + this.$HTTP.post(`/api/smis/maintain-project-item/create-maintain-project-item`, { itemId: this.itemId, projectId: this.selectMRow.id }).then(res => { -- Gitblit v1.9.3