<template> <div class="water-analysis-page"> <el-table :data="tableDataList" v-loading="tableLoading" stripe max-height="500" > <el-table-column type="index" width="55" label="序号" align="center" /> <el-table-column :label="i.label" align="center" :prop="i.props" show-overflow-tooltip v-for="i in engineeringApprovalCloum" > <template #default="{ row }" v-if="i.props == 'projectName'"> <span class="projectName"> {{ row.projectName }}</span> </template> <template #default="{ row }" v-if="i.props == 'id'"> <span @click="onCheck(row, 4, '详情')" class="projectName"> {{ row.id }}</span > </template> <template #default="{ row }" v-if="i.props == 'compilationTime'"> {{ row.compilationTime.substring(0, 10) }} </template> <template #default="{ row }" v-if="i.props == 'status'"> <span style="color: red" v-if="row.fromStatus">驳回</span> <dict-tag v-else :options="dangerous_status" :value="row.status" /> </template> </el-table-column> <el-table-column fixed="right" label="操作" width="230" align="center"> <template #default="{ row }"> <el-button link type="primary" icon="View" @click="onCheck(row, 4, '详情')" >详情</el-button > <el-button v-if="row.status == 'examine' && todoList.queryScope == 'todo'" icon="Edit" link type="success" @click="onCheck(row, 6, '处理')" >处理</el-button > <!-- <el-button icon="Edit" v-if="row.status == 'start' && todoList.queryScope == 'main'" link type="warning" @click="onCheck(row, 5, '编辑')" >编辑</el-button > --> <el-button icon="EditPen" v-if=" (row.status == 'submit' || row.status == 'start') && todoList.queryScope != 'done'&& userName == row.createBy " link type="success" @click="onCheck(row, 3, '提交')" >提交</el-button > <!-- <div v-else-if="todoList.queryScope=='done'"> --> <el-button icon="Delete" v-if="row.status == 'start' && todoList.queryScope == 'main' && userName == row.createBy" link type="danger" @click="onCheck(row, 8)" >删除</el-button > </template> </el-table-column> </el-table> <!-- <pagination v-show="todoList.total > 0" :total="todoList.total" v-model:page="todoList.pageNum" v-model:limit="todoList.pageSize" @pagination=" getInfoList({ pageNum: todoList.pageNum, pageSize: todoList.pageSize, queryScope: todoList.queryScope, }) " /> --> <slot name="pagination"></slot> <el-dialog v-model="visible" :title="'危大工程审批' + tittle" :modal-append-to-body="false" :close-on-click-modal="false" width="68%" > <tableDalgo ref="tableDalgoRef" v-if="visible" @onModalClose="onModalClose" :typeList="typeList" ></tableDalgo> <template #footer> <div class="dialog-footer"> <el-button v-if="typeList.type != 4 && typeList.type != 6" @click="open2" type="primary" >{{ tittle }}</el-button > <el-button v-show="typeList.type == 6" type="primary" @click="open2(1)" >通过</el-button > <el-button v-show="typeList.type == 6" type="danger" @click="open2(2)" >驳回</el-button > <el-button @click="closed">关闭</el-button> </div> </template> </el-dialog> </div> </template> <script setup> import { defineExpose } from "vue"; import { getInfo, projectInfoDelete, projectInfoGet, getInfoMamin, } from "@/api/engineeringApproval"; import { FileSystemList } from "@/api/project/tenderReview"; import tableDalgo from "./tableDalgo.vue"; const { proxy } = getCurrentInstance(); const { dangerous_status } = proxy.useDict("dangerous_status"); import emgBox from "@/utils/ElMessageBox"; import { engineeringApprovalCloum } from "@/utils/cloums"; const visible = ref(false); const userName = sessionStorage.getItem('userName') const tableDataList = ref([]); const tableLoading = ref(false); const typeList = ref({}); const tableDalgoRef = ref(); const tittle = ref(""); const { todoList, getInfoList, tableData } = defineProps([ "todoList", "getInfoList", "tableData", ]); const onCheck = (row, v, t) => { tittle.value = t; if (v == 8) { emgBox(row.id, projectInfoDeleteM, "您确定删除吗?"); } else { projectInfoGet(row.id).then(({ code, data }) => { if (code == 200) { typeList.value = { ...data, type: v }; FileSystemList({ refId: row.id, refType: "proDangerousProjectApprove", }).then(({ data }) => { typeList.value.fileList1 = data; console.log(typeList.value, " typeList.value typeList.value"); visible.value = true; }); } }); } }; //删除 const projectInfoDeleteM = async (id) => { let { code } = await projectInfoDelete(id); getInfoList(tableData); }; function onModalClose() { getInfoList(tableData); visible.value = false; } function closed() { tableDalgoRef.value.closed(); } function open2(v) { tableDalgoRef.value.submit(v); } onMounted(() => { tableDataList.value = todoList; }); </script> <style lang="scss" scoped> .water-analysis-page { height: 90vh; ::v-deep .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active { font-size: 18px; color: rgb(255, 255, 255); background-color: rgb(22, 132, 252); border-left: 1px solid rgb(22, 132, 252); } } :deep(.el-dialog__body) { background-color: #eef1fb; height: 700px; overflow: auto; } </style>