| | |
| | | // 目标检查上报 分页查询数据 |
| | | getworkApproveList: (params: object) => { |
| | | return request({ |
| | | url: "/targetDutyWorkApprove/page/list", |
| | | url: "/targetMng/checkAndSubimt/list", |
| | | method: "post", |
| | | data: params |
| | | }) |
| | |
| | | // 目标检查上报 新增数据 |
| | | getworkApproveAdd: (params: object) => { |
| | | return request({ |
| | | url: "/targetDutySummary/addOrUpdate", |
| | | url: "/targetDutyWorkApprove/add", |
| | | method: "post", |
| | | data: params |
| | | }) |
| | | }, |
| | | // 目标检查上报 新增数据 |
| | | getworkApproveUpdata: (params: object) => { |
| | | return request({ |
| | | url: "/targetDutyWorkApprove/update", |
| | | method: "post", |
| | | data: params |
| | | }) |
| | |
| | | <div class="button_Line"> |
| | | <div class="button_Left"> |
| | | <el-button size="default" type="primary" @click="onOpenAdd"> |
| | | <el-icon> |
| | | <Plus /> </el-icon |
| | | >新建 |
| | | <el-icon> <Plus /> </el-icon>新建 |
| | | </el-button> |
| | | <el-button size="default" type="warning" plain :disabled="warning"> |
| | | <el-icon> |
| | | <Edit /> </el-icon |
| | | >修改 |
| | | <el-icon> <Edit /> </el-icon>修改 |
| | | </el-button> |
| | | <el-button size="default" type="danger" plain :disabled="danger" @click="onDeleteAll"> |
| | | <el-icon> |
| | | <Delete /> </el-icon |
| | | >删除 |
| | | <el-icon> <Delete /> </el-icon>删除 |
| | | </el-button> |
| | | <el-button size="default" type="primary" @click="onabolishLibrary"> 废止库 </el-button> |
| | | </div> |
| | |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="name" label="预案名称" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="type" label="预案类型" show-overflow-tooltip sortable> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.type == 1">综合应急预案</span> |
| | | <span v-if="scope.row.type == 2">现场处置方案</span> |
| | | <span v-if="scope.row.type == 3">专项应急预案</span> |
| | | <span v-if="scope.row.type == 4">其他预案</span> |
| | | </template> |
| | | </el-table-column> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.type == 1">综合应急预案</span> |
| | | <span v-if="scope.row.type == 2">现场处置方案</span> |
| | | <span v-if="scope.row.type == 3">专项应急预案</span> |
| | | <span v-if="scope.row.type == 4">其他预案</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="level" label="预案级别" show-overflow-tooltip sortable> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.level == 1">综合应急预案</span> |
| | | <span v-if="scope.row.level == 2">现场处置方案</span> |
| | | <span v-if="scope.row.level == 3">专项应急预案</span> |
| | | </template> |
| | | </el-table-column> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.level == 1">综合应急预案</span> |
| | | <span v-if="scope.row.level == 2">现场处置方案</span> |
| | | <span v-if="scope.row.level == 3">专项应急预案</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="releaseDate" label="发布实施日期" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column label="操作" width="260" align="center" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="isDialogFormVisible(scope.row.id)"> |
| | | <el-icon style="margin-right: 5px"> |
| | | <VideoPlay /> </el-icon |
| | | >启动 |
| | | <el-icon style="margin-right: 5px"> <VideoPlay /> </el-icon>启动 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="abolish(scope.row.id)"> |
| | | <el-icon style="margin-right: 5px"> |
| | | <VideoPause /> </el-icon |
| | | >废止 |
| | | <el-icon style="margin-right: 5px"> <VideoPause /> </el-icon>废止 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="onEdit('修改', scope.row.id)"> |
| | | <el-icon style="margin-right: 5px"> |
| | | <EditPen /> </el-icon |
| | | >修改 |
| | | <el-icon style="margin-right: 5px"> <EditPen /> </el-icon>修改 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | |
| | | text |
| | | type="primary" |
| | | v-if="scope.row.approveStatus === 2 && scope.row.checkApprove === true" |
| | | @click="onApproval('修改',scope.row.approveId,scope.row.id)" |
| | | @click="onApproval('修改', scope.row.approveId, scope.row.id)" |
| | | > |
| | | 审批 |
| | | </el-button> |
| | |
| | | text |
| | | type="primary" |
| | | v-if="scope.row.approveStatus === 2 && scope.row.checkApprove === false" |
| | | @click="onApproval('详情',scope.row.approveId,scope.row.id)" |
| | | @click="onApproval('详情', scope.row.approveId, scope.row.id)" |
| | | > |
| | | 查看审批 |
| | | 查看审批 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" v-if="scope.row.approveStatus === 3" @click="onApprovalProcess(scope.row.id)"> |
| | | 查看审批流程 |
| | |
| | | <!-- 发起审批--> |
| | | <!-- </el-button>--> |
| | | <el-button size="small" text type="primary" @click="onRowDel(scope.row.id)"> |
| | | <el-icon> |
| | | <Delete /> </el-icon |
| | | >删除 |
| | | <el-icon> <Delete /> </el-icon>删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <AbolishLibrary ref="abolishRef" @myAdd="onMyAdd" /> |
| | | <InitiateApproval ref="initiateApprovalRef" @myAdd="onMyAdd" /> |
| | | <Approval ref="approvalRef" @myAdd="onMyAdd" /> |
| | | <ApprovalProcess ref="processRef" @myAdd="onMyAdd" /> |
| | | <ApprovalProcess ref="processRef" @myAdd="onMyAdd" /> |
| | | <!-- <StartUp ref="startRef" @myAdd="startUp"/>--> |
| | | <el-dialog v-model="dialogFormVisible" width="30%" title="启动" :fullscreen="full"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | |
| | | Refresh, |
| | | VideoPause, |
| | | VideoPlay, |
| | | ApprovalProcess, |
| | | ApprovalProcess, |
| | | // UpData, |
| | | emergencyPlanApi, |
| | | }, |
| | |
| | | // 发起审批弹窗 |
| | | const initiateApprovalRef = ref(); |
| | | const initiateApproval = (row: object) => { |
| | | initiateApprovalRef.value.openDialog('发起审批',row, true); |
| | | initiateApprovalRef.value.openDialog('发起审批', row, true); |
| | | }; |
| | | // 审批 |
| | | const approvalRef = ref(); |
| | | const onApproval = (val: string,row: object,id) => { |
| | | if(val=='详情'){ |
| | | approvalRef.value.openDialog('查看审批', row, true); |
| | | } else { |
| | | approvalRef.value.openDialog('审批', row, false,id); |
| | | } |
| | | const onApproval = (val: string, row: object, id) => { |
| | | if (val == '详情') { |
| | | approvalRef.value.openDialog('查看审批', row, true); |
| | | } else { |
| | | approvalRef.value.openDialog('审批', row, false, id); |
| | | } |
| | | }; |
| | | // 审批流程 |
| | | const processRef = ref(); |
| | | const onApprovalProcess = (row:object,id) => { |
| | | processRef.value.openDialog(row,id); |
| | | }; |
| | | // 审批流程 |
| | | const processRef = ref(); |
| | | const onApprovalProcess = (row: object, id) => { |
| | | processRef.value.openDialog(row, id); |
| | | }; |
| | | |
| | | //全屏 |
| | | const full = ref(false); |
| | |
| | | initiateApprovalRef, |
| | | onApproval, |
| | | approvalRef, |
| | | onApprovalProcess, |
| | | processRef, |
| | | onApprovalProcess, |
| | | processRef, |
| | | }; |
| | | }, |
| | | }); |
| | |
| | | if (res.data.code == 200) { |
| | | form.value = res.data.data; |
| | | formUp.targetDivideDetailList = form.value.targetDivideDetailList; |
| | | for(let i=0;i<formUp.targetDivideDetailList.length;i++){ |
| | | formUp.targetDivideDetailList[i].makeDate=timeC(formUp.targetDivideDetailList[i].makeDate) |
| | | } |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | const timeC = (timestamp: any) => { |
| | | let a = new Date(timestamp).getTime(); |
| | | const date = new Date(a); |
| | | const Y = date.getFullYear() + '-'; |
| | | const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | const D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '; |
| | | const h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'; |
| | | const m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); |
| | | const s = date.getSeconds(); // 秒 |
| | | const dateString = Y + M + D + h + m +`:${s}`; |
| | | // console.log('dateString', dateString); // > dateString 2021-07-06 14:23 |
| | | return dateString; |
| | | }; |
| | | const onNumber = (val: object) => { |
| | | form.value = val; |
| | |
| | | // return result; |
| | | // }; |
| | | return { |
| | | timeC, |
| | | index, |
| | | timeDate, |
| | | arr, |
| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" :fullscreen="full" title="记录" width="50%" draggable> |
| | | <el-dialog v-model="dialogVisible" :fullscreen="full" title="查看审批流程" width="50%" draggable> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-table-column align="center" label="序号" type="index" width="80" /> |
| | | <el-table-column align="center" prop="dutyDepartmentId" label="责任部门" /> |
| | | <el-table-column align="center" prop="value" label="考核指标" /> |
| | | <el-table-column align="center" prop="makerDepartmentId" label="制定部门" /> |
| | | <el-table-column align="center" prop="makeDate" label="制定日期" /> |
| | | <el-table-column align="center" prop="value" label="检查值" /> |
| | | <el-table-column align="center" prop="commitPersonId" label="检查人" /> |
| | | <el-table-column align="center" prop="makeDate" label="检查时间" /> |
| | | <el-table-column property="workName" label="审批人" sortable></el-table-column> |
| | | <el-table-column property="title" label="审批标题" sortable></el-table-column> |
| | | <el-table-column property="approvePersonName" label="编写人" sortable></el-table-column> |
| | | <el-table-column property="approveMemo" label="审批意见" sortable></el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | <script lang="ts"> |
| | | import { defineComponent, reactive, ref } from 'vue'; |
| | | import { FullScreen } from '@element-plus/icons-vue'; |
| | | import { goalManagementApi } from '/@/api/goalManagement'; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const dialogVisible = ref(false); |
| | | const form = ref({ |
| | | pageSize: 10, |
| | | pageIndex: 1, |
| | | searchParams: { |
| | | relateId: '', ////检查记录ID |
| | | relateType:"", |
| | | }, |
| | | }); |
| | | const tableData = ref(); |
| | | const openDailog = (data: any) => { |
| | | const openDailog = (data: any,type:number) => { |
| | | dialogVisible.value = true; |
| | | // console.log(data) |
| | | tableData.value = data; |
| | | form.value.searchParams.relateId=data |
| | | form.value.searchParams.relateType=type |
| | | goalManagementApi().getworkApproveListCheckData(form.value).then(res=>{ |
| | | if(res.data.code==200){ |
| | | tableData.value=res.data.data |
| | | } |
| | | }) |
| | | }; |
| | | //全屏 |
| | | const full = ref(false); |
| | |
| | | openDailog, |
| | | full, |
| | | toggleFullscreen, |
| | | form, |
| | | FullScreen, |
| | | }; |
| | | }, |
对比新文件 |
| | |
| | | <template> |
| | | <el-dialog :title="titleName" v-model="dialogVisible" @click="resetForm" width="50%" draggable :fullscreen="full" :close-on-click-modal="false"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form ref="ruleFormRef" :model="form" size="default" :disabled="disabled" label-width="120px"> |
| | | <div v-if="titleName=='发起审批'"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="审批名称" prop="workName" size="default"> |
| | | <el-input v-model="form.workName" :disabled="disabledT" placeholder="请填写名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="审批标题" prop="title" size="default"> |
| | | <el-input v-model="form.title" :disabled="disabledT" placeholder="请填写标题"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="审批人" prop="approvePersonId" size="default"> |
| | | <el-input v-model="form.approvePersonName" :disabled="disabledT" placeholder="请选择" class="input-with-select"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openUser" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"></el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-if="titleName!='发起审批'"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="审批名称" prop="workName" size="default"> |
| | | <el-input v-model="formUp.workName" :disabled="disabledT" placeholder="请填写名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="审批标题" prop="title" size="default"> |
| | | <el-input v-model="formUp.title" :disabled="disabledT" placeholder="请填写标题"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="审批人" prop="approvePersonId" size="default"> |
| | | <el-input v-model="formUp.approvePersonName" :disabled="disabledT" placeholder="请选择" class="input-with-select"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openUser" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"></el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-if="typeScope"> |
| | | <el-row> |
| | | <el-col> |
| | | <el-form-item label="审批结果" prop="authorUid"> |
| | | <el-radio-group v-model="form.approveResult"> |
| | | <el-radio :label="0">不通过</el-radio> |
| | | <el-radio :label="1">通过</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="审批意见" prop="approveMemo"> |
| | | <el-input v-model="form.approveMemo" type="textarea" placeholder="请填写审批意见"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="是否完成" prop="complete"> |
| | | <el-radio-group v-model="form.approveStatus"> |
| | | <el-radio :label="3">是</el-radio> |
| | | <el-radio :label="2">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div v-if="form.approveStatus==2"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="审批名称" prop="workName" size="default"> |
| | | <el-input v-model="form.workName" placeholder="请填写名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="审批标题" prop="title" size="default"> |
| | | <el-input v-model="form.title" placeholder="请填写标题"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="审批人" prop="approvePersonId" size="default"> |
| | | <el-input v-model="form.approvePersonName" placeholder="请选择" class="input-with-select"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openUser" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"></el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="resetForm" size="default">关闭</el-button> |
| | | <el-button size="default" type="primary" @click="submitForm">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <DailogSearchUserManger ref="userRef" @SearchUser="onUser" /> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { ref, defineComponent } from 'vue'; |
| | | import DailogSearchUserManger from '/@/components/DailogSearchUserManger/index.vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { goalManagementApi } from '/@/api/goalManagement'; |
| | | import { Search, FullScreen } from '@element-plus/icons-vue'; |
| | | export default defineComponent({ |
| | | components: { DailogSearchUserManger }, |
| | | setup(props, { emit }) { |
| | | const dialogVisible = ref(false); |
| | | const form = ref({ |
| | | workName: '', // 审批名称 |
| | | title: '', //审批标题 |
| | | approvePersonId: '', |
| | | approvePersonName: '', |
| | | approveStatus: 2, |
| | | approveResult: '', |
| | | relateType: 1, |
| | | relateId: '', |
| | | }); |
| | | // 提交 |
| | | const submitForm = () => { |
| | | if (titleName.value == '发起审批') { |
| | | goalManagementApi() |
| | | .getworkApproveAdd(form.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | emit('onType'); |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | } else if (titleName.value == '审批') { |
| | | goalManagementApi() |
| | | .getworkApproveUpdata(form.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | emit('onType'); |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | } |
| | | dialogVisible.value = false; |
| | | disabled.value = false; |
| | | disabledT.value = false; |
| | | form.value={} |
| | | formUp.value={} |
| | | }; |
| | | // 关闭 |
| | | const resetForm = () => { |
| | | dialogVisible.value = false; |
| | | disabled.value = false; |
| | | disabledT.value = false; |
| | | form.value={} |
| | | formUp.value={} |
| | | }; |
| | | const titleName = ref(); |
| | | const typeScope = ref(); |
| | | const disabledT = ref(false); |
| | | const disabled = ref(false); |
| | | const formUp=ref({ |
| | | workName:"", |
| | | title:"", |
| | | approvePersonName:"" |
| | | }) |
| | | // 打开弹窗 |
| | | const openDialog = (title: string, name: string, id: number,type:number) => { |
| | | dialogVisible.value = true; |
| | | titleName.value = title; |
| | | form.value.relateType=type |
| | | if (title == '发起审批') { |
| | | form.value.relateId = id; |
| | | typeScope.value = false; |
| | | } else if (title == '审批'||title == '查看审批') { |
| | | goalManagementApi() |
| | | .getworkApproveDetail(id) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | form.value = res.data.data; |
| | | form.value.approveStatus="" |
| | | formUp.value.workName=form.value.workName |
| | | formUp.value.title=form.value.title |
| | | formUp.value.approvePersonName=form.value.approvePersonName |
| | | if (form.value.approvePersonName === form.value.submitPersonName) { |
| | | disabled.value = false; |
| | | } else { |
| | | disabled.value = true; |
| | | } |
| | | } |
| | | }); |
| | | typeScope.value = true; |
| | | disabledT.value = true; |
| | | } |
| | | }; |
| | | // 打开用户选择弹窗 |
| | | const userRef = ref(); |
| | | const openUser = () => { |
| | | userRef.value.openDailog(); |
| | | }; |
| | | const onUser = (val: any) => { |
| | | form.value.approvePersonId = val[0].uid; |
| | | form.value.approvePersonName = val[0].realName; |
| | | }; |
| | | //全屏 |
| | | const full = ref(false); |
| | | const toggleFullscreen = () => { |
| | | if (full.value == false) { |
| | | full.value = true; |
| | | } else { |
| | | full.value = false; |
| | | } |
| | | }; |
| | | return { |
| | | formUp, |
| | | onUser, |
| | | dialogVisible, |
| | | form, |
| | | disabledT, |
| | | submitForm, |
| | | resetForm, |
| | | titleName, |
| | | typeScope, |
| | | disabled, |
| | | openDialog, |
| | | userRef, |
| | | openUser, |
| | | full, |
| | | toggleFullscreen, |
| | | Search, |
| | | FullScreen, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | <style> |
| | | .el-row { |
| | | padding-bottom: 20px; |
| | | } |
| | | </style> |
| | |
| | | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| | | <el-tab-pane label="检查" name="1"> </el-tab-pane> |
| | | <el-tab-pane label="上报" name="2"></el-tab-pane> |
| | | <el-tab-pane label="审核" name="3"></el-tab-pane> |
| | | </el-tabs> |
| | | <el-table ref="multipleTableRef" :data="tableData" style="width: 100%"> |
| | | <el-table-column label="安全目标指标" align="center" property="qName" sortable /> |
| | |
| | | <el-table-column property="value" label="指标值" align="center" sortable show-overflow-tooltip /> |
| | | <el-table-column v-if="activeName == 1" label="操作" align="center" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="default" :icon="EditPen" @click="jumpFrom(0)">检查</el-button> |
| | | <el-button link type="primary" size="default" :icon="View" @click="openDai(scope.row.targetDivideDetailList)">记录</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==null" @click="TypeDailog('发起审批','检查',scope.row.id,1)">发起审批</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==true" @click="TypeDailog('审批','检查',scope.row.approveId,1)">审批</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==false" @click="TypeDailog('查看审批','检查',scope.row.approveId,1)">查看审批</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==3" @click="openDai(scope.row.id,1)" >查看审批流程</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="activeName == 2" label="操作" align="center" show-overflow-tooltip> |
| | | <template #default> |
| | | <el-button link type="primary" size="default" :icon="EditPen" @click="jumpFrom(1)">上报</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="activeName == 3" label="操作" align="center" show-overflow-tooltip> |
| | | <template #default> |
| | | <el-button link type="primary" size="default" :icon="EditPen" @click="jumpFrom">待审批</el-button> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==null" @click="TypeDailog('发起审批','检查',scope.row.id,2)">发起审批</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==true" @click="TypeDailog('审批','检查',scope.row.approveId,2)">审批</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==false" @click="TypeDailog('查看审批','检查',scope.row.approveId,2)">查看审批</el-button> |
| | | <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==3" @click="openDai(scope.row.id,2)" >查看审批流程</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | </div> |
| | | <Dailog ref="Show"></Dailog> |
| | | <TypeDailog ref="TypeD" @onType="typeAlign" /> |
| | | </div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import Dailog from './component/Dailog.vue'; |
| | | import TypeDailog from './component/TypeDailog.vue'; |
| | | import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus'; |
| | | import { Plus, Delete, Upload, Download, Refresh, View, EditPen } from '@element-plus/icons-vue'; |
| | | import { useRouter } from 'vue-router'; |
| | | import { goalManagementApi } from '/@/api/goalManagement'; |
| | | export default defineComponent({ |
| | | components: { ElButton, ElInput, Dailog }, |
| | | components: { ElButton, ElInput, Dailog,TypeDailog }, |
| | | setup() { |
| | | // 搜索条件 |
| | | const ruleForm = reactive({ |
| | |
| | | searchParams: { |
| | | qName: '', ////安全目标指标 |
| | | indexNum: '', ////目标指标编号 |
| | | targetType: '1', ////指标类型 1:年指标 2:月指标 |
| | | divideStatus: '', ////分解状态 1:已分解 2:未分解 |
| | | targetType: 1, ////指标类型 1:年指标 2:月指标 |
| | | divideStatus: 1, ////分解状态 1:已分解 2:未分解 |
| | | relateType: 1, ////关联业务类型 1:目标检查 2:目标上报 |
| | | }, |
| | | }); |
| | | // 重置 |
| | |
| | | }; |
| | | const listApi = () => { |
| | | goalManagementApi() |
| | | .getTargetMngList(ruleForm) |
| | | .getworkApproveList(ruleForm) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | tableData.value = res.data.data; |
| | |
| | | // |
| | | const handleClick = (val: any) => { |
| | | // let targetType = JSON.parse(JSON.stringify(val)); |
| | | ruleForm.searchParams.targetType = val.paneName; |
| | | ruleForm.searchParams.relateType = val.paneName; |
| | | listApi(); |
| | | }; |
| | | onMounted(() => { |
| | |
| | | const activeName = ref<any>('1'); |
| | | // 记录弹窗 |
| | | const Show = ref(); |
| | | const openDai = (data: any) => { |
| | | Show.value.openDailog(data); |
| | | const openDai = (data: any,num:number) => { |
| | | Show.value.openDailog(data,num); |
| | | }; |
| | | // 流程表单 |
| | | const router = useRouter(); |
| | | const jumpFrom = (data: any) => { |
| | | router.push({ |
| | | path: '/processForms', |
| | | query: { |
| | | type: data, |
| | | }, |
| | | }); |
| | | // 发起审批弹窗 |
| | | const TypeD = ref(); |
| | | const TypeDailog = (title:string,name:string,id:number,type:number) => { |
| | | TypeD.value.openDialog(title,name,id,type); |
| | | }; |
| | | const typeAlign=()=>{ |
| | | listApi(); |
| | | } |
| | | return { |
| | | TypeD, |
| | | typeAlign, |
| | | TypeDailog, |
| | | activeName, |
| | | total, |
| | | handleClick, |
| | |
| | | handleCurrentChange, |
| | | Show, |
| | | openDai, |
| | | router, |
| | | jumpFrom, |
| | | Plus, |
| | | Delete, |
| | | Upload, |