工程信息管理添加删除功能
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -24,7 +24,7 @@ interface Props {
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
nextFlag: false,
|
||||
theCurrentTime: false
|
||||
theCurrentTime: true
|
||||
})
|
||||
|
||||
const interval = ref(3)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 = () => { }
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.customInput {
|
||||
.el-input__inner {
|
||||
-webkit-text-security: disc !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user