Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | export function contingencyApi(){ |
| | | return{ |
| | | //应急队伍一览 |
| | | getTeamManagementList: (params: object) => { |
| | | return request({ |
| | | url: `/emergencyTeam/page/list`, |
| | |
| | | data: params |
| | | }); |
| | | }, |
| | | // 应急预案管理审批流程 |
| | | // 应急预案管理审批查看 |
| | | approvalProcessEmergencyPlan: (params: number) => { |
| | | return request({ |
| | | url: `/emergencyWorkApprove/info/${params}`, |
| | |
| | | data: params |
| | | }); |
| | | }, |
| | | // 审批一览 |
| | | processEmergencyPlan: (params: object) => { |
| | | return request({ |
| | | url: `/emergencyWorkApprove/page/list`, |
| | | method: 'post', |
| | | data: params |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | |
| | | <el-col :span="24"> |
| | | <el-form ref="ruleFormRef" :inline="true" status-icon> |
| | | <el-form-item> |
| | | <el-input size="default" v-model="listQuery.searchParams.id" placeholder="id" style="max-width: 215px;"/> |
| | | <el-input size="default" v-model="listQuery.searchParams.authorUid" placeholder="id" style="max-width: 215px;"/> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input size="default" v-model="listQuery.searchParams.teamName" placeholder="队伍名称" style="max-width: 215px;padding: 0 12px;"/> |
| | |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-button size="default" :icon="Delete" style="margin-top: 15px;">清除选择</el-button> |
| | | <el-button size="default" :icon="Delete" style="margin-top: 15px;" @click="submitReset">清除选择</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | :data="tableData" |
| | | ref="multipleTableRef" |
| | | style="width: 100%;margin-top:20px" |
| | | @cell-click="radio" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column width="55"> |
| | | <template #default="scope"> |
| | | <el-radio-group v-model="radio1"> |
| | | <el-radio :label="scope.row" size="large">{{ null }}</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="date" label="id" /> |
| | | <el-table-column align="center" prop="name" label="队伍名称"/> |
| | | </el-table> |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6" style="padding-left: 15px"> |
| | | <el-tag v-for="tag in dynamicTags" :key="tag" class="mx-1" style="margin:5px" closable :disable-transitions="false" @close="handleClose(tag)"> |
| | | {{ tag }} |
| | | </el-tag> |
| | | <div v-if="dynamicTags[0] == '' ? false : true"> |
| | | <el-tag |
| | | v-for="tag in dynamicTags" |
| | | :key="tag" |
| | | class="mx-1" |
| | | style="margin: 5px" |
| | | closable |
| | | :disable-transitions="false" |
| | | @close="handleClose(tag)" |
| | | > |
| | | {{ tag.name }} |
| | | </el-tag> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false" size="default">关闭</el-button> |
| | | <el-button type="primary" @click="dialogVisible = false" size="default">确定</el-button> |
| | | <el-button type="primary" @click="submitForm" size="default">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | defineComponent, |
| | | reactive, |
| | | ref, |
| | | onMounted, |
| | | } from 'vue'; |
| | | import { |
| | | Delete, |
| | |
| | | import {contingencyApi} from "/@/api/contingency"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | setup(props, { emit }) { |
| | | const dialogVisible = ref<boolean>(false); |
| | | const openDailog = () => { |
| | | dialogVisible.value = true; |
| | | onSubmit(); |
| | | }; |
| | | // 搜索条件 |
| | | const listQuery = reactive({ |
| | |
| | | }) |
| | | } |
| | | } |
| | | const submitForm = () => { |
| | | let obj = JSON.parse(JSON.stringify(dynamicTags.value)); |
| | | emit('SearchUser', obj[0]); |
| | | dialogVisible.value = false; |
| | | }; |
| | | // 重置 |
| | | const submitReset = () => { |
| | | listQuery.searchParams.teamName = ''; |
| | | listQuery.searchParams.teamType = ''; |
| | | radio1.value="" |
| | | dynamicTags.value[0]="" |
| | | onSubmit(); |
| | | }; |
| | | // 表格 |
| | |
| | | onSubmit(); |
| | | } |
| | | // 右方点击添加后显示标签 |
| | | const dynamicTags = ref(['应急救援组', '工艺抢险组', '后勤保障组']); |
| | | const dynamicTags = ref(['']); |
| | | const handleClose = (tag: string) => { |
| | | dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1); |
| | | radio1.value = ''; |
| | | }; |
| | | const radio1 = ref(''); |
| | | const radio = (event: any) => { |
| | | dynamicTags.value[0] = event; |
| | | }; |
| | | onMounted(() => { |
| | | onSubmit(); |
| | | }); |
| | | //全屏 |
| | | const full = ref(false); |
| | | const toggleFullscreen = () => { |
| | |
| | | onSubmit, |
| | | listQuery, |
| | | submitReset, |
| | | total |
| | | total, |
| | | radio, |
| | | radio1, |
| | | submitForm, |
| | | |
| | | }; |
| | | }, |
| | | }); |
| | |
| | | <el-form ref="ruleFormRef" :model="ruleForm" size="default" label-width="120px" :disabled="disabled"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="审批名称" prop="name"> |
| | | <el-form-item label="审批名称" prop="workName"> |
| | | <el-input v-model="ruleForm.workName" placeholder="请填写队伍名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col v-if="ruleForm.complete" :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="审批名称" prop="workName"> |
| | | <el-input v-model="ruleForm.workName" placeholder="请填写队伍名称"></el-input> |
| | | <el-input v-model="ruleForm.twoWorkName" placeholder="请填写队伍名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="ruleForm.complete" :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="审批标题" prop="title"> |
| | | <el-input v-model="ruleForm.title" placeholder="请填写审批名称"></el-input> |
| | | <el-input v-model="ruleForm.twoTitle" placeholder="请填写审批名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="ruleForm.complete" :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="审批人" prop="authorUid"> |
| | | <el-input v-model="ruleForm.approvePersonName" placeholder="请选择" class="input-with-select"> |
| | | <el-input v-model="ruleForm.twoApprovePersonName" placeholder="请选择" class="input-with-select"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openUser" /> |
| | | </template> |
| | |
| | | title: '', //审批标题 |
| | | approvePersonId: '', // |
| | | approvePersonName: '', // 审批人 |
| | | approveStatus: 2, |
| | | relateType: 1, |
| | | approveResult: false, |
| | | approveMemo: '', |
| | | approveStatus: 2, //审批状态 |
| | | relateType: 1, //业务类型 |
| | | approveResult: false, //审批结果 |
| | | approveMemo: '', //审批意见 |
| | | relateId: '', |
| | | twoWorkName:'', |
| | | twoTitle:'', |
| | | twoApprovePersonId:'', |
| | | twoApprovePersonName:'' |
| | | }); |
| | | const titles = ref(); |
| | | const disabled = ref(); |
| | | |
| | | const uid = ref(); |
| | | // 打开弹窗 |
| | | const openDialog = (title: string, id: number, type: boolean) => { |
| | | isShowDialog.value = true; |
| | | titles.value = title; |
| | | disabled.value = type; |
| | | emergencyPlanApi() |
| | | .approvalProcessEmergencyPlan(id) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ruleForm.value = res.data.data; |
| | | } |
| | | }); |
| | | ruleForm.value.relateId = id; |
| | | uid.value = id; |
| | | if(title == '查看审批' || title == '修改审批') { |
| | | emergencyPlanApi() |
| | | .approvalProcessEmergencyPlan(id) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ruleForm.value = res.data.data; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | const submitForm = async () => { |
| | | ruleForm.value.workName = ruleForm.value.twoWorkName |
| | | ruleForm.value.title = ruleForm.value.twoTitle |
| | | ruleForm.value.approvePersonId = ruleForm.value.twoApprovePersonId |
| | | ruleForm.value.approvePersonName = ruleForm.value.twoApprovePersonName |
| | | isShowDialog.value = false; |
| | | emergencyPlanApi() |
| | | .editApprovalEmergencyPlan(ruleForm.value) |
| | |
| | | }; |
| | | //回显 |
| | | const onUser = (e: any) => { |
| | | ruleForm.value.approvePersonId = e[0].uid; |
| | | ruleForm.value.approvePersonName = e[0].realName; |
| | | ruleForm.value.twoApprovePersonId = e[0].uid; |
| | | ruleForm.value.twoApprovePersonName = e[0].realName; |
| | | }; |
| | | const typeChang = () => { |
| | | console.log('tag', ruleForm); |
| | |
| | | resetForm, |
| | | onUser, |
| | | typeChang, |
| | | uid, |
| | | }; |
| | | }, |
| | | }); |
| | |
| | | :model="formInline" |
| | | :header-cell-style="{ background: '#f6f7fa', color: '#909399' }" |
| | | > |
| | | <el-table-column prop="name" label="审批人" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="type" label="审批标题" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="authorUid" label="编写人" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="releaseDate" label="发布实施日期" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="workName" label="审批人" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="title" label="审批标题" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="approvePersonName" label="编写人" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="approveMemo" label="审批意见" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onReduction(scope.row.id)">还原</el-button> |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | searchParams: { |
| | | abolishStatus: true, |
| | | relateType: 1, |
| | | relateId: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | }, |
| | | }); |
| | | // 定义表格数据 |
| | | const tableData = ref([]); |
| | | |
| | | // 列表数据请求 |
| | | const openDialog = async (id: number) => { |
| | | const openDialog = async () => { |
| | | isShowDialog.value = true; |
| | | let res = await emergencyPlanApi().approvalProcessEmergencyPlan(id); |
| | | let res = await emergencyPlanApi().processEmergencyPlan(listQuery); |
| | | if (res.data.code === '200') { |
| | | tableData.value = res.data.data; |
| | | pageIndex.value = res.data.pageIndex; |
| | |
| | | const onCancel = () => { |
| | | closeDialog(); |
| | | }; |
| | | const onReduction = async (id) => { |
| | | const onReduction = async () => { |
| | | isShowDialog.value = false; |
| | | // emergencyPlanApi() |
| | | // .approvalProcessEmergencyPlan(id) |
| | | // .then((res) => { |
| | | // if (res.data.code == 200) { |
| | | // ElMessage({ |
| | | // showClose: true, |
| | | // message: res.data.msg, |
| | | // type: 'success', |
| | | // }); |
| | | // emit('myAdd', true); |
| | | // } else { |
| | | // ElMessage({ |
| | | // showClose: true, |
| | | // message: res.data.msg, |
| | | // type: 'error', |
| | | // }); |
| | | // emit('myAdd', true); |
| | | // openDialog(); |
| | | // } |
| | | // }) |
| | | // .catch(() => {}); |
| | | }; |
| | | // 分页 |
| | | const pageIndex = ref(); |
| | |
| | | text |
| | | type="primary" |
| | | v-if="scope.row.approveStatus === 2 && scope.row.checkApprove === true" |
| | | @click="onApproval('修改',scope.row.id)" |
| | | @click="onApproval('修改',scope.row.approveId)" |
| | | > |
| | | 审批 |
| | | </el-button> |