修改数据中心问题
This commit is contained in:
@@ -3,22 +3,14 @@
|
||||
<template v-slot:select>
|
||||
<el-form-item label='监督类型'>
|
||||
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择流程状态'>
|
||||
<el-option
|
||||
v-for='item in supvTypeOptionList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
></el-option>
|
||||
<el-option v-for='item in supvTypeOptionList' :key='item.id' :label='item.name'
|
||||
:value='item.id'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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>
|
||||
</template>
|
||||
@@ -247,13 +239,25 @@ const deleteEven = () => {
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
const exportFn = () => {
|
||||
@@ -267,7 +271,7 @@ const exportFn = () => {
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function(column: any) {
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,23 +6,13 @@
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option
|
||||
v-for='item in areaOptionList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.name'
|
||||
></el-option>
|
||||
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<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>
|
||||
</template>
|
||||
@@ -33,39 +23,38 @@
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig'/>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||
<!-- 新增 -->
|
||||
<Add ref='addRef' @onSubmit='tableStore.index()'/>
|
||||
<Add ref='addRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 上传 -->
|
||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()'/>
|
||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import {ref, onMounted, provide, watch, reactive} from 'vue'
|
||||
import { ref, onMounted, provide, watch, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Add from './add.vue'
|
||||
import Audit from './audit.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import {getLoadTypeUserList} from '@/api/process-boot/interference'
|
||||
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {ElMessageBox} from 'element-plus/es'
|
||||
import {useAdminInfo} from '@/stores/adminInfo'
|
||||
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const {push, options, currentRoute} = useRouter()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const addRef = ref()
|
||||
const AuditRef = ref()
|
||||
@@ -82,7 +71,7 @@ const tableStore = new TableStore({
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{title: '序号', type: 'seq', width: 80},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'city',
|
||||
@@ -101,7 +90,7 @@ const tableStore = new TableStore({
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{field: 'projectName', title: '项目名称', minWidth: 170},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
@@ -111,7 +100,7 @@ const tableStore = new TableStore({
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
@@ -150,7 +139,7 @@ const tableStore = new TableStore({
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{field: 'createTime', title: '开始时间', minWidth: 170},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
@@ -251,10 +240,10 @@ const addList = () => {
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({row}) => {
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
@@ -264,13 +253,26 @@ const deleteEven = () => {
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +307,7 @@ const exportEvent = () => {
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
@@ -328,16 +330,16 @@ onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
@@ -378,7 +380,7 @@ const getUserTypeName = (userType: any) => {
|
||||
}
|
||||
|
||||
|
||||
const props = defineProps({id: {type: String, default: 'null'}})
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
@@ -393,7 +395,7 @@ watch(() => props.id, async (newValue, oldValue) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}, {immediate: true})
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -5,21 +5,13 @@
|
||||
<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
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
@@ -42,7 +34,7 @@ import { useRouter } from 'vue-router'
|
||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import {cancelQuitRunningDevice, getRunningDeviceById} from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
@@ -62,7 +54,7 @@ const tableStore = new TableStore({
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
@@ -89,7 +81,7 @@ const tableStore = new TableStore({
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
@@ -111,7 +103,7 @@ const tableStore = new TableStore({
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
@@ -119,7 +111,7 @@ const tableStore = new TableStore({
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null:'/'
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -250,20 +242,20 @@ const deleteEven = () => {
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
@@ -316,17 +308,17 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({id: {type: String, default: 'null'}})
|
||||
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})
|
||||
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>
|
||||
|
||||
@@ -3,20 +3,13 @@
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、终端、监测点名称"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<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>
|
||||
</template>
|
||||
@@ -26,7 +19,7 @@
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 申请联调弹框 -->
|
||||
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
||||
</template>
|
||||
@@ -40,8 +33,8 @@ import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import {
|
||||
getMointorPointTempLinedebugDetail,
|
||||
setTempLinedebugLedgerSync
|
||||
getMointorPointTempLinedebugDetail,
|
||||
setTempLinedebugLedgerSync
|
||||
} from '@/api/supervision-boot/jointDebugList/index'
|
||||
import debug from './debug.vue'
|
||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
||||
@@ -61,7 +54,7 @@ const tableStore = new TableStore({
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
@@ -267,21 +260,21 @@ const deleteEven = () => {
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
@@ -340,19 +333,19 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({id: {type: String, default: 'null'}})
|
||||
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 getMointorPointTempLinedebugDetail({id:fullId}).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
debugForms.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, {immediate: true})
|
||||
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 getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
debugForms.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user