diff --git a/src/components/echarts/rmsboxi.vue b/src/components/echarts/rmsboxi.vue index 29301e7..3ec0a7b 100644 --- a/src/components/echarts/rmsboxi.vue +++ b/src/components/echarts/rmsboxi.vue @@ -9,7 +9,7 @@ style="position: absolute; right: 10px; top: 0px; z-index: 20000" type="primary" link - icon="el-icon-download" + icon="el-icon-Download" title="生成图片" @click="download" > @@ -92,9 +92,9 @@ export default { }, created() { if (this.flag == 1) { - this.vh = mainHeight(175).height + this.vh = mainHeight(165).height } else { - this.vh = mainHeight(175,2).height + this.vh = mainHeight(165,2).height } this.vw = '100%' }, diff --git a/src/components/echarts/shushiboxi.vue b/src/components/echarts/shushiboxi.vue index d45a47b..60b1ecb 100644 --- a/src/components/echarts/shushiboxi.vue +++ b/src/components/echarts/shushiboxi.vue @@ -9,7 +9,7 @@ style="position: absolute; right: 10px; top: 0px; z-index: 20000" type="primary" link - icon="download" + icon="el-icon-Download" title="生成图片" @click="download" > @@ -78,9 +78,9 @@ export default { created() { if (this.flag == 1) { - this.vh = mainHeight(175).height + this.vh = mainHeight(165).height } else { - this.vh = mainHeight(175,2).height + this.vh = mainHeight(165,2).height } this.vw = '100%' }, @@ -1151,5 +1151,3 @@ export default { } } - - diff --git a/src/components/table/fieldRender/index.vue b/src/components/table/fieldRender/index.vue index 773f7ae..95f446f 100644 --- a/src/components/table/fieldRender/index.vue +++ b/src/components/table/fieldRender/index.vue @@ -67,10 +67,11 @@ :class="btn.class" class="table-operate" :type="btn.type" + :loading="props.row.loading || false" :disabled="btn.disabled && btn.disabled(row, field)" v-bind="btn.attr" > - +
{{ btn.text }}
diff --git a/src/views/govern/alarm/Transient.vue b/src/views/govern/alarm/Transient.vue index 4a2ad06..7c0e3a3 100644 --- a/src/views/govern/alarm/Transient.vue +++ b/src/views/govern/alarm/Transient.vue @@ -26,26 +26,7 @@ - - - > -
+
@@ -66,6 +47,7 @@ @click="backbxlb" type="primary" class="el-icon-refresh-right" + icon="el-icon-CloseBold" style="float: right" > 返回 @@ -76,7 +58,7 @@ - + { + return !row.wavePath && row.evtParamTm < 20 + }, + click: async row => { + row.loading = true + boxoList.value = row + await analyseWave(row.id) + .then(res => { + row.loading = false + if (res != undefined) { + wp.value = res.data + view.value = false + view2.value = true + } + }) + .catch(() => { + row.loading = false + }) + } + } + ] + } ], loadCallback: () => { tableStore.table.data.forEach((item: any) => { + item.loading = false item.evtParamTm = item.evtParamTm.split('s')[0] }) } @@ -177,21 +198,22 @@ tableStore.table.params.eventIds = [] tableStore.table.params.status = '' tableStore.table.params.target = [] tableStore.table.params.userId = '' -import { analyseWave } from '@/api/common' + const sourceChange = (e: any) => { tableStore.table.params.engineeringid = e[0] || '' tableStore.table.params.projectId = e[1] || '' tableStore.table.params.deviceId = e[2] || '' } const getboxin = async (row: any) => { - boxoList.value = row - await analyseWave(row.id).then(res => { - if (res != undefined) { - wp.value = res.data - view.value = false - view2.value = true - } - }) + console.log('🚀 ~ getboxin ~ row:', row) + // boxoList.value = row + // await analyseWave(row.id).then(res => { + // if (res != undefined) { + // wp.value = res.data + // view.value = false + // view2.value = true + // } + // }) } const changeView = () => { showBoxi.value = false @@ -211,13 +233,13 @@ const backbxlb = () => { view.value = true view2.value = false setTimeout(() => { - tableStore.table.height = mainHeight(190).height as any -}, 0) + tableStore.table.height = mainHeight(180).height as any + }, 0) } onMounted(() => { tableStore.index() }) -const bxecharts = mainHeight(175).height as any +const bxecharts = mainHeight(155).height as any setTimeout(() => { tableStore.table.height = mainHeight(180).height as any }, 0) diff --git a/src/views/govern/alarm/cope.vue b/src/views/govern/alarm/cope.vue deleted file mode 100644 index 71a2442..0000000 --- a/src/views/govern/alarm/cope.vue +++ /dev/null @@ -1,135 +0,0 @@ - - - diff --git a/src/views/govern/analyze/DVR/index.vue b/src/views/govern/analyze/DVR/index.vue index 5496e15..7ff8eb4 100644 --- a/src/views/govern/analyze/DVR/index.vue +++ b/src/views/govern/analyze/DVR/index.vue @@ -1,8 +1,67 @@ @@ -13,12 +72,32 @@ import { mainHeight } from '@/utils/layout' import DeviceTree from '@/components/tree/govern/deviceTree.vue' import TableStore from '@/utils/tableStore' import Table from '@/components/table/index.vue' - +import { analyseWave } from '@/api/common' +import shushiboxi from '@/components/echarts/shushiboxi.vue' +import rmsboxi from '@/components/echarts/rmsboxi.vue' defineOptions({ name: 'govern/analyze/DVR' }) const pageHeight = mainHeight(20) const loading = ref(false) +const view = ref(true) +const view2 = ref(false) +const showBoxi = ref(true) + +const bxactiveName = ref('ssbx') +const boxoList = ref({}) +const wp = ref({}) +const value = ref(1) +const options = ref([ + { + value: 1, + label: '一次值' + }, + { + value: 2, + label: '二次值' + } +]) const tableStore = new TableStore({ url: '/cs-harmonic-boot/eventUser/queryEventpage', method: 'POST', @@ -35,16 +114,40 @@ const tableStore = new TableStore({ buttons: [ { name: 'edit', - title: '波形分析', + text: '波形分析', type: 'primary', icon: 'el-icon-DataLine', - render: 'tipButton', - click: row => { + render: 'basicButton', + disabled: row => { + return !row.wavePath && row.evtParamTm < 20 + }, + + click: async row => { + row.loading = true + boxoList.value = row + await analyseWave(row.id) + .then(res => { + row.loading = false + if (res != undefined) { + wp.value = res.data + view.value = false + view2.value = true + } + }) + .catch(() => { + row.loading = false + }) } - }, + } ] } - ] + ], + loadCallback: () => { + tableStore.table.data.forEach((item: any) => { + item.loading = false + item.evtParamTm = item.evtParamTm.split('s')[0] + }) + } }) tableStore.table.params.type = 0 provide('tableStore', tableStore) @@ -55,6 +158,26 @@ const nodeClick = async (e: anyObj) => { tableStore.index() } } + +const changeView = () => { + showBoxi.value = false + setTimeout(() => { + showBoxi.value = true + }, 0) +} +const bxhandleClick = (tab: any) => { + if (tab.name == 'ssbx') { + bxactiveName.value = 'ssbx' + } else if (tab.name == 'rmsbx') { + bxactiveName.value = 'rmsbx' + } + // console.log(tab, event); +} +const backbxlb = () => { + view.value = true + view2.value = false +} +const bxecharts = mainHeight(95).height as any