From 439a1295897c229ba6dc335a3a05e032c14b0544 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Fri, 3 Jan 2025 16:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=B0=E5=9C=BA=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +- src/api/system-boot/dic.ts | 6 +-- src/api/system-boot/dictTree.ts | 6 +-- src/components/table/index.vue | 4 +- src/views/auth/menu/api.vue | 1 + src/views/auth/menu/menu.vue | 1 + src/views/govern/alarm/Abnormal.vue | 1 + src/views/govern/alarm/Steady.vue | 1 + src/views/govern/alarm/Transient.vue | 1 + src/views/govern/device/control/index.vue | 7 ++- .../device/planData/components/popup.vue | 4 +- .../govern/manage/basic/popupVersion.vue | 45 ++++++++++++------ src/views/govern/manage/basic/version.vue | 46 +++++++++++++++---- .../govern/setting/statisticalType/add.vue | 4 +- 14 files changed, 92 insertions(+), 39 deletions(-) diff --git a/src/App.vue b/src/App.vue index cf557a3..4f604e9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,8 +10,8 @@ import useSetTheme from '@/utils/setTheme' import { provide, onMounted, ref } from 'vue' //线上mqtt -let buildUrl = 'wss://pqmcn.com:8087/mqtt'//102 -// let buildUrl = 'ws://pqmcn.com:8073/mqtt'//27 +// let buildUrl = 'wss://pqmcn.com:8087/mqtt'//102 +let buildUrl = 'ws://pqmcn.com:8073/mqtt'//27 // 从 Nginx 获取 MQTT URL diff --git a/src/api/system-boot/dic.ts b/src/api/system-boot/dic.ts index df0a1f1..447b43a 100644 --- a/src/api/system-boot/dic.ts +++ b/src/api/system-boot/dic.ts @@ -15,7 +15,7 @@ export const dicDelete = (id: string) => { export function dicAdd(data: any) { return createAxios({ - url: '/system-boot/dictTree//add', + url: '/system-boot/dictTree/add', method: 'post', data: data }) @@ -23,8 +23,8 @@ export function dicAdd(data: any) { export function dicUpdate(data: any) { return createAxios({ - url: '/system-boot/dictTree//update', + url: '/system-boot/dictTree/update', method: 'put', data: data }) -} \ No newline at end of file +} diff --git a/src/api/system-boot/dictTree.ts b/src/api/system-boot/dictTree.ts index e887d8b..2967fc2 100644 --- a/src/api/system-boot/dictTree.ts +++ b/src/api/system-boot/dictTree.ts @@ -50,7 +50,7 @@ export const getDictTreeById = (id: any) => { return createAxios({ url: '/system-boot/dictTree/queryById', method: 'POST', - data:form + data: form }) } @@ -80,7 +80,7 @@ export const addDictTree = (data: any) => { // 编辑统计指标配置项 export const updateStatistical = (data: any) => { return createAxios({ - url: '/system-boot/dictTree//update', + url: '/system-boot/dictTree/update', method: 'PUT', data: data }) @@ -88,7 +88,7 @@ export const updateStatistical = (data: any) => { // 单位绑定 export function codeDicTree(data: any) { return createAxios({ - url: '/system-boot/dictTree//codeDicTree', + url: '/system-boot/dictTree/codeDicTree', method: 'get', params: data }) diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 7c08a5c..85e3548 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -98,10 +98,10 @@ watch( () => tableStore.table.allFlag, newVal => { if (tableStore.table.allFlag) { - console.log("🚀 ~ tableStore.table:", tableStore.table) + console.log("🚀 ~ tableStore.table:", tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '') tableRef.value?.exportData({ - filename: tableStore.table.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字 + filename: tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字 sheetName: 'Sheet1', type: 'xlsx', //导出文件类型 xlsx 和 csv useStyle: true, diff --git a/src/views/auth/menu/api.vue b/src/views/auth/menu/api.vue index fe544e1..52316da 100644 --- a/src/views/auth/menu/api.vue +++ b/src/views/auth/menu/api.vue @@ -36,6 +36,7 @@ const apiList = ref([]) const tableStore = new TableStore({ showPage: false, url: '/user-boot/function/getButtonById', + publicHeight: 60, column: [ { title: '普通接口/接口名称', field: 'name' }, { diff --git a/src/views/auth/menu/menu.vue b/src/views/auth/menu/menu.vue index 0d7b77b..0a8ff61 100644 --- a/src/views/auth/menu/menu.vue +++ b/src/views/auth/menu/menu.vue @@ -39,6 +39,7 @@ const popupRef = ref() const tableStore = new TableStore({ showPage: false, url: '/user-boot/function/functionTree', + publicHeight: 60, column: [ { title: '菜单名称', field: 'title', align: 'left', treeNode: true }, { diff --git a/src/views/govern/alarm/Abnormal.vue b/src/views/govern/alarm/Abnormal.vue index a422743..0988df2 100644 --- a/src/views/govern/alarm/Abnormal.vue +++ b/src/views/govern/alarm/Abnormal.vue @@ -77,6 +77,7 @@ const rankOptions = ref([ const tableStore = new TableStore({ url: '/zl-event-boot/csDevErrEvt/list', method: 'POST', + exportName: '异常事件', publicHeight: 65, column: [ { title: '设备名称', field: 'ndid', align: 'center' }, diff --git a/src/views/govern/alarm/Steady.vue b/src/views/govern/alarm/Steady.vue index 843731d..87f7921 100644 --- a/src/views/govern/alarm/Steady.vue +++ b/src/views/govern/alarm/Steady.vue @@ -66,6 +66,7 @@ const rankOptions = ref([ const tableStore = new TableStore({ url: '/cs-harmonic-boot/eventUser/queryEventpageWeb', method: 'POST', + exportName: '稳态越限告警', publicHeight: 65, column: [ { title: '设备名称', field: 'equipmentName', align: 'center' }, diff --git a/src/views/govern/alarm/Transient.vue b/src/views/govern/alarm/Transient.vue index 25f2ff7..438deb9 100644 --- a/src/views/govern/alarm/Transient.vue +++ b/src/views/govern/alarm/Transient.vue @@ -108,6 +108,7 @@ const tableStore = new TableStore({ url: '/cs-harmonic-boot/eventUser/queryEventpageWeb', method: 'POST', publicHeight: 65, + exportName: '暂态事件', column: [ { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' }, diff --git a/src/views/govern/device/control/index.vue b/src/views/govern/device/control/index.vue index 21321ec..525799f 100644 --- a/src/views/govern/device/control/index.vue +++ b/src/views/govern/device/control/index.vue @@ -115,7 +115,7 @@ :value="item.id" /> - + - + @@ -17,22 +17,22 @@ --> - + + placeholder="请输入版本号"> - + + placeholder="请输入版本协议"> + placeholder="请输入CRC校验"> + placeholder="请输入描述"> - 点击上传 @@ -80,7 +80,7 @@ const DevTypeOptions = ref() const devTypeOptions: any = ref([]) const devModelOptions: any = ref([]) -const fileList = ref() +const fileList:any = ref([]) const tableStore = inject('tableStore') as TableStore const formRef = ref() const form = reactive({ @@ -94,7 +94,7 @@ const form = reactive({ versionDate: null, type: null, id: null, - file: null + file: [] }) const rules = { type: [{ required: true, message: '装置类型不能为空', trigger: 'blur' }], @@ -117,10 +117,11 @@ const typeChange = () => { } const devTypeChange = (e: any) => { // console.log(e) - form.devTypeName = DevTypeOptions.value.filter((item: any) => item.value == e)[0].label + form.devTypeName = formDevModelOptionsFilter.value.filter((item: any) => item.value == e)[0].label } queryByCode('Device_Type').then(res => { - queryCsDictTree(res.data.id).then(res => { + const id = res.data.id + queryCsDictTree(id).then(res => { devTypeOptions.value = res.data.map((item: any) => { return { value: item.id, @@ -129,7 +130,12 @@ queryByCode('Device_Type').then(res => { } }) }) - queryByid(res.data.id).then(res => { + queryByid(id).then(res => { + res.data.map((item: any, index: any) => { + if (item.pid == id) { + res.data.splice(index, 1) + } + }) devModelOptions.value = res.data.map((item: any) => { return { value: item.id, @@ -138,7 +144,7 @@ queryByCode('Device_Type').then(res => { } }) }) - tableStore.index() + // tableStore.index() }) const formDevModelOptionsFilter = computed(() => { return devModelOptions.value.filter((item: any) => { @@ -157,11 +163,14 @@ const fileExceed = (e: any) => { ElMessage.error('只能上传一个文件') } +const fileRemove = (e: any) => { + form.file = null +} const formDevTypeChange = (e: any) => { if (!e) { return } - form.devModel = '' + // form.devModel = '' } const dialogVisible = ref(false) const title = ref('新增版本') @@ -193,6 +202,12 @@ const open = (text: string, data?: anyObj) => { }) } const submit = () => { + + + if(form?.file == null){ + ElMessage.warning('请上传升级文件') + return + } // console.log(formRef) formRef.value.validate(async (valid: boolean) => { // console.log(valid) diff --git a/src/views/govern/manage/basic/version.vue b/src/views/govern/manage/basic/version.vue index f47e0e7..ecf77b2 100644 --- a/src/views/govern/manage/basic/version.vue +++ b/src/views/govern/manage/basic/version.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/govern/setting/statisticalType/add.vue b/src/views/govern/setting/statisticalType/add.vue index fca44f3..4620c50 100644 --- a/src/views/govern/setting/statisticalType/add.vue +++ b/src/views/govern/setting/statisticalType/add.vue @@ -8,11 +8,11 @@ - +