冀北项目添加表格导出功能 技术监督添加下载模版上传功能
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime>
|
||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入关键字"
|
||||
clearable maxlength="32" show-word-limit></el-input>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、监测点"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -54,13 +61,14 @@ const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'监测点状态管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
@@ -220,6 +228,49 @@ const tableStore = new TableStore({
|
||||
|
||||
// }
|
||||
tableStore.table.params.deviceType = 2
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.devOriginalStatus =
|
||||
item.devOriginalStatus == 0
|
||||
? '运行'
|
||||
: item.devOriginalStatus == 1
|
||||
? '检修'
|
||||
: item.devOriginalStatus == 2
|
||||
? '停运'
|
||||
: item.devOriginalStatus == 3
|
||||
? '调试'
|
||||
: item.devOriginalStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.devStatus =
|
||||
item.devStatus == 0
|
||||
? '运行'
|
||||
: item.devStatus == 1
|
||||
? '检修'
|
||||
: item.devStatus == 2
|
||||
? '停运'
|
||||
: item.devStatus == 3
|
||||
? '调试'
|
||||
: item.devStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: item.status == 4
|
||||
? '已取消'
|
||||
: item.status == 5
|
||||
? '新增'
|
||||
: '/'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
@@ -250,19 +301,15 @@ const deleteEven = () => {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
}).then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
@@ -316,16 +363,20 @@ watch(
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime>
|
||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入关键字" clearable maxlength="32" show-word-limit></el-input>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、终端"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -53,6 +61,7 @@ const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'终端状态管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
@@ -216,6 +225,49 @@ const tableStore = new TableStore({
|
||||
// }
|
||||
// }
|
||||
tableStore.table.params.deviceType = 1
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.devOriginalStatus =
|
||||
item.devOriginalStatus == 0
|
||||
? '运行'
|
||||
: item.devOriginalStatus == 1
|
||||
? '检修'
|
||||
: item.devOriginalStatus == 2
|
||||
? '停运'
|
||||
: item.devOriginalStatus == 3
|
||||
? '调试'
|
||||
: item.devOriginalStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.devStatus =
|
||||
item.devStatus == 0
|
||||
? '运行'
|
||||
: item.devStatus == 1
|
||||
? '检修'
|
||||
: item.devStatus == 2
|
||||
? '停运'
|
||||
: item.devStatus == 3
|
||||
? '调试'
|
||||
: item.devStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: item.status == 4
|
||||
? '已取消'
|
||||
: item.status == 5
|
||||
? '新增'
|
||||
: '/'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
@@ -245,17 +297,15 @@ const deleteEven = () => {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
}).then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
@@ -309,16 +359,20 @@ watch(
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user