工程信息管理添加删除功能

This commit is contained in:
GGJ
2024-11-01 16:17:10 +08:00
parent 59969df8f0
commit c0011a5d5b
6 changed files with 75 additions and 29 deletions

View File

@@ -22,3 +22,11 @@ export const auditEdData = (data) => {
data: data,
})
}
export const auditEngineering = (data) => {
return request({
url: '/cs-device-boot/engineering/auditEngineering',
method: 'post',
data: data,
})
}

View File

@@ -209,6 +209,8 @@ export default {
this.boxoList.evtParamTm +
"s";
} else if (this.boxoList.systemType == 'WX') {
this.titles =
' 监测点名称:' +
@@ -216,7 +218,7 @@ export default {
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude ? this.boxoList.featureAmplitude.toFixed(2) : '-') +
(this.boxoList.featureAmplitude ) +
'% 持续时间:' +
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
's'

View File

@@ -173,7 +173,7 @@ export default {
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude ? this.boxoList.featureAmplitude.toFixed(2) : '-') +
(this.boxoList.featureAmplitude) +
'% 持续时间:' +
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
's'
@@ -738,7 +738,7 @@ export default {
itemStyle: {
color: '#FFCC00'
},
progressive:1000,
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
@@ -754,7 +754,7 @@ export default {
itemStyle: {
color: '#009900'
},
progressive:1000,
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
@@ -770,7 +770,7 @@ export default {
itemStyle: {
color: '#CC0000'
},
progressive:1000,
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
@@ -1104,7 +1104,7 @@ export default {
color: '#FFCC00'
},
large: true,
progressive:1000,
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
data: adata
@@ -1118,7 +1118,7 @@ export default {
itemStyle: {
color: '#009900'
},
progressive:1000,
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
@@ -1133,7 +1133,7 @@ export default {
itemStyle: {
color: '#CC0000'
},
progressive:1000,
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,

View File

@@ -24,7 +24,7 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {
nextFlag: false,
theCurrentTime: false
theCurrentTime: true
})
const interval = ref(3)

View File

@@ -53,7 +53,7 @@ export const getCurrentRoutePath = () => {
* @param domain 指定域名
*/
export const fullUrl = (relativeUrl: string, domain = '') => {
return domain + '/api/system-boot/image/toStream?bgImage=' + relativeUrl
return domain + '/api/system-boot/file/download?filePath=' + relativeUrl
}
/**

View File

@@ -1,15 +1,8 @@
<template>
<div class="default-main" :style="{ height: pageHeight.height }">
<vxe-table
v-loading="tableStore.table.loading"
height="auto"
auto-resize
ref="tableRef"
v-bind="defaultAttribute"
:data="tableStore.table.data"
:column-config="{ resizable: true }"
:tree-config="{expandAll: true }"
>
<vxe-table v-loading="tableStore.table.loading" height="auto" auto-resize ref="tableRef"
v-bind="defaultAttribute" :data="tableStore.table.data" :column-config="{ resizable: true }"
:tree-config="{ expandAll: true }">
<vxe-column field="name" align="left" title="名称" tree-node></vxe-column>
<vxe-column field="area" title="区域">
<template #default="{ row }">
@@ -21,6 +14,15 @@
{{ row.remark || '/' }}
</template>
</vxe-column>
<vxe-column field="remark" title="操作" width="100px">
<template #default="{ row }">
<el-popconfirm title="确定删除吗?" confirm-button-type='danger' @confirm="deletes(row)" v-if="!row.path">
<template #reference>
<el-button type="danger" link>删除</el-button>
</template>
</el-popconfirm>
</template>
</vxe-column>
</vxe-table>
</div>
</template>
@@ -29,6 +31,9 @@ import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout'
import { ElMessageBox, ElMessage } from 'element-plus'
import { auditEngineering } from '@/api/cs-device-boot/edData';
import { activateUser, deluser, passwordConfirm } from '@/api/user-boot/user'
defineOptions({
name: 'govern/manage/engineering'
})
@@ -40,17 +45,48 @@ const tableStore = new TableStore({
method: 'POST',
column: [],
loadCallback: () => {}
loadCallback: () => {
setTimeout(() => {
tableRef.value.setAllTreeExpand(true)
}, 500)
}
})
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
setTimeout(() => {
tableRef.value.setAllTreeExpand(true)
}, 500)
// setTimeout(() => {
// tableRef.value.setAllTreeExpand(true)
// }, 500)
})
const deletes = (row: any) => {
ElMessageBox.prompt('二次校验密码确认', '', {
confirmButtonText: '确认',
cancelButtonText: '取消',
customClass: 'customInput',
inputType: 'text'
}).then(({ value }) => {
passwordConfirm(value).then(res => {
auditEngineering({
id: row.id,
status: 0
}).then((res: any) => {
ElMessage.success('删除成功')
tableStore.index()
})
})
})
const addMenu = () => {}
}
const addMenu = () => { }
</script>
<style lang="scss">
.customInput {
.el-input__inner {
-webkit-text-security: disc !important;
}
}
</style>