技术监督 页面联调
This commit is contained in:
@@ -2,57 +2,59 @@
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.searchState1" placeholder="请选择问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in uploadData"
|
||||
v-for="item in problemData"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.searchState2" placeholder="请选择填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in uploadData"
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态">
|
||||
<el-select v-model="tableStore.table.params.searchState3" placeholder="请选择审核状态">
|
||||
<el-select v-model="tableStore.table.params.reportProcessStatus" placeholder="请选择审核状态">
|
||||
<el-option
|
||||
v-for="item in uploadData"
|
||||
v-for="item in auditStatus"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题名称">
|
||||
<el-select v-model="tableStore.table.params.searchState4" placeholder="请输入问题名称">
|
||||
<el-option
|
||||
v-for="item in uploadData"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请填写问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-EditPen" type="primary">填报</el-button>
|
||||
<!-- <el-button icon="el-icon-EditPen" type="primary" @click="filling">填报</el-button> -->
|
||||
<el-button icon="el-icon-Delete" type="primary">删除</el-button>
|
||||
<el-button icon="el-icon-SuccessFilled" type="primary">归档</el-button>
|
||||
<el-button icon="el-icon-PieChart" type="primary">历史审核记录</el-button>
|
||||
<!-- <el-button icon="el-icon-SuccessFilled" type="primary">归档</el-button>
|
||||
<el-button icon="el-icon-PieChart" type="primary">历史审核记录</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="onSubmit" />
|
||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="onSubmit" />
|
||||
<!-- 填报 -->
|
||||
<Filling ref="FillingRef" />
|
||||
<!-- 详情 -->
|
||||
<Detail ref="detailRef" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
@@ -60,28 +62,23 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { deleteIssues } from '@/api/process-boot/electricitymanagement'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import NewlyAdd from './NewlyAdd.vue'
|
||||
import Filling from './filling.vue'
|
||||
import Detail from './detail.vue'
|
||||
const dictData = useDictData()
|
||||
const uploadData = [
|
||||
{
|
||||
id: 0,
|
||||
|
||||
label: '未上传'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
|
||||
label: '已上传'
|
||||
}
|
||||
]
|
||||
const FillingRef = ref()
|
||||
|
||||
const showNewlyAdded = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
const tableStore:any = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
const detailRef = ref()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
@@ -102,8 +99,20 @@ const tableStore:any = new TableStore({
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
{ field: 'dataDate', title: '问题新建时间' },
|
||||
{ field: 'reportProcess', title: '填报进度' },
|
||||
{ field: 'reportProcessStatus', title: '审核状态' },
|
||||
// {
|
||||
// field: 'reportProcess',
|
||||
// title: '填报进度',
|
||||
// formatter: (row: any) => {
|
||||
// return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// field: 'reportProcessStatus',
|
||||
// title: '审核状态',
|
||||
// formatter: (row: any) => {
|
||||
// return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title: '详情',
|
||||
width: '120',
|
||||
@@ -113,41 +122,115 @@ const tableStore:any = new TableStore({
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcess != 'Not_Reported' && row.reportProcess != 'Archived'
|
||||
},
|
||||
// disabled: row => {
|
||||
// return row.reportProcess != 'Not_Reported' && row.reportProcess != 'Archived'
|
||||
// },
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
click: async row => {
|
||||
detailRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
click: row => {
|
||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
status: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState1 = ''
|
||||
tableStore.table.params.searchState2 = ''
|
||||
tableStore.table.params.searchState3 = ''
|
||||
tableStore.table.params.searchState4 = ''
|
||||
|
||||
tableStore.table.params.orgNo = dictData.state.area[0].id
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.reportProcessStatus = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
TableHeaderRef.value.setDatePicker([
|
||||
{ label: '年', value: 1 },
|
||||
{ label: '季', value: 2 },
|
||||
{ label: '月', value: 3 }
|
||||
])
|
||||
|
||||
setTimeout(() => {
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
tableStore.table.params.dataDate = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||
tableStore.index()
|
||||
}, 100)
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
showNewlyAdded.value = true
|
||||
}
|
||||
const onSubmit = () => {
|
||||
console.log(123)
|
||||
tableStore.index()
|
||||
}
|
||||
// 填报
|
||||
const filling = () => {
|
||||
if (tableStore.table.selection.length == 1) {
|
||||
FillingRef.value.open(tableStore.table.selection[0])
|
||||
if (tableStore.table.selection[0].reportProcess == 'Not_Reported') {
|
||||
// 原因分析
|
||||
// this.showCauseAnalysisJP = true
|
||||
// setTimeout(() => {
|
||||
// this.$refs.CauseAnalysisJP.causeAnalysis = true
|
||||
// }, 0)
|
||||
} else if (
|
||||
tableStore.table.selection[0].reportProcess == 'Cause_Analysis' &&
|
||||
tableStore.table.selection[0].reportProcessStatus == 'Success'
|
||||
) {
|
||||
// 计划整改措施
|
||||
// this.showPlannedRectification = true
|
||||
// setTimeout(() => {
|
||||
// this.$refs.PlannedRectification.rectificationMeasures = true
|
||||
// }, 0)
|
||||
} else if (
|
||||
tableStore.table.selection[0].reportProcess == 'Plan_Measures' &&
|
||||
tableStore.table.selection[0].reportProcessStatus == 'Success'
|
||||
) {
|
||||
// 实际采取措施
|
||||
// this.showActualMeasures = true
|
||||
// setTimeout(() => {
|
||||
// this.$refs.ActualMeasures.rectificationMeasures = true
|
||||
// }, 0)
|
||||
} else if (
|
||||
tableStore.table.selection[0].reportProcess == 'Actual_Measures' &&
|
||||
tableStore.table.selection[0].reportProcessStatus == 'Success'
|
||||
) {
|
||||
// 成效分析
|
||||
// this.showEffectiveness = true
|
||||
// setTimeout(() => {
|
||||
// this.$refs.Effectiveness.effectivenessAnalysis = true
|
||||
// }, 0)
|
||||
} else if (
|
||||
tableStore.table.selection[0].reportProcess == 'Insights' &&
|
||||
tableStore.table.selection[0].reportProcessStatus == 'Success'
|
||||
) {
|
||||
ElMessage.warning('填报已结束,无需填报!')
|
||||
} else {
|
||||
ElMessage.warning('审核未通过,不能进行填报!')
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('请选择1条数据,进行填报!')
|
||||
}
|
||||
}
|
||||
// 关闭弹框
|
||||
const handleClose = () => {
|
||||
|
||||
Reference in New Issue
Block a user