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

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

View File

@@ -173,7 +173,7 @@ export default {
' 发生时刻:' + ' 发生时刻:' +
this.boxoList.startTime + this.boxoList.startTime +
' 暂降(骤升)幅值:' + ' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude ? this.boxoList.featureAmplitude.toFixed(2) : '-') + (this.boxoList.featureAmplitude) +
'% 持续时间:' + '% 持续时间:' +
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') + (this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
's' 's'

View File

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

View File

@@ -53,7 +53,7 @@ export const getCurrentRoutePath = () => {
* @param domain 指定域名 * @param domain 指定域名
*/ */
export const fullUrl = (relativeUrl: string, 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> <template>
<div class="default-main" :style="{ height: pageHeight.height }"> <div class="default-main" :style="{ height: pageHeight.height }">
<vxe-table <vxe-table v-loading="tableStore.table.loading" height="auto" auto-resize ref="tableRef"
v-loading="tableStore.table.loading" v-bind="defaultAttribute" :data="tableStore.table.data" :column-config="{ resizable: true }"
height="auto" :tree-config="{ expandAll: true }">
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="name" align="left" title="名称" tree-node></vxe-column>
<vxe-column field="area" title="区域"> <vxe-column field="area" title="区域">
<template #default="{ row }"> <template #default="{ row }">
@@ -21,6 +14,15 @@
{{ row.remark || '/' }} {{ row.remark || '/' }}
</template> </template>
</vxe-column> </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> </vxe-table>
</div> </div>
</template> </template>
@@ -29,6 +31,9 @@ import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore' import TableStore from '@/utils/tableStore'
import { defaultAttribute } from '@/components/table/defaultAttribute' import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout' 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({ defineOptions({
name: 'govern/manage/engineering' name: 'govern/manage/engineering'
}) })
@@ -40,17 +45,48 @@ const tableStore = new TableStore({
method: 'POST', method: 'POST',
column: [], column: [],
loadCallback: () => {} loadCallback: () => {
setTimeout(() => {
tableRef.value.setAllTreeExpand(true)
}, 500)
}
}) })
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {
tableStore.index() tableStore.index()
setTimeout(() => { // setTimeout(() => {
tableRef.value.setAllTreeExpand(true) // tableRef.value.setAllTreeExpand(true)
}, 500) // }, 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> </script>
<style lang="scss">
.customInput {
.el-input__inner {
-webkit-text-security: disc !important;
}
}
</style>