feat:应急预案

This commit is contained in:
lijianzhong 2024-01-26 15:50:58 +08:00
parent ff7dc7d58b
commit f147d124e8
3 changed files with 92 additions and 83 deletions

View File

@ -11,8 +11,8 @@ export default {
},
children: [
{
path: 'procession',
name: 'processionindex',
path: 'team',
name: 'team',
component: () => import('@/views/emergency/procession/index.vue'),
meta: {
icon: 'point',
@ -22,8 +22,8 @@ export default {
},
children: [
{
path: 'form_details',
name: 'form_details',
path: 'team_detail',
name: 'team_detail',
component: () => import('@/views/emergency/procession/form_details.vue'),
meta: {
auth: "emer.team.detail",
@ -36,8 +36,8 @@ export default {
]
},
{
path: 'matter',
name: 'matterindex',
path: 'resourse',
name: 'resourse',
component: () => import('@/views/emergency/matter/index.vue'),
meta: {
icon: 'point',
@ -52,7 +52,7 @@ export default {
component: () => import('@/views/emergency/shelter/index.vue'),
meta: {
icon: 'point',
auth: "emer.resourse",
auth: "emer.shelter",
title: '避难场所',
breadcrumb: true, //是否显示面包屑
}
@ -63,10 +63,21 @@ export default {
component: () => import('@/views/emergency/duty-people/index.vue'),
meta: {
icon: 'point',
auth: "emer.resourse",
auth: "emer.duty",
title: '应急值守',
breadcrumb: true, //是否显示面包屑
}
},
{
path: 'plan',
name: 'plan',
component: () => import('@/views/emergency/plan/index.vue'),
meta: {
icon: 'point',
auth: "emer.plan",
title: '应急预案',
breadcrumb: true, //是否显示面包屑
}
}
]
}

View File

@ -3,7 +3,7 @@
<BaseDialog
:dialogVisible="props.visible"
@close="onclone"
:titleName="props.form.opInstructionId ? '编辑应急物资' : '新增应急物资'"
:titleName="props.form?.opInstructionId ? '编辑应急预案' : '新增应急预案'"
width="50%"
@onSubmit="handleSubmit"
:footerclosed="true"
@ -22,7 +22,7 @@
<el-input
placeholder="请输入预案名称"
v-model="addPostFactorForm.planname"
:readonly='props.readonly'
:readonly="props.readonly"
>
</el-input>
</el-form-item>
@ -30,7 +30,7 @@
<el-select
placeholder="请选择任务类型"
v-model="addPostFactorForm.accidenttype"
:disabled='props.readonly'
:disabled="props.readonly"
>
<el-option
v-for="(item, index) in props.typeList"
@ -40,27 +40,13 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="部门:" prop="sysunitid">
<el-select
placeholder="请选择部门"
v-model="addPostFactorForm.sysunitid"
:disabled='props.readonly'
>
<el-option
v-for="(item, index) in unitList"
:value="item.sysunitid"
:label="item.unitname"
:key="index"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="预案简介:" style="width: 100%">
<el-input
type="textarea"
:rows="3"
placeholder="请输入预案简介"
v-model="addPostFactorForm.introduction"
:readonly='props.readonly'
:readonly="props.readonly"
>
</el-input>
</el-form-item>
@ -73,19 +59,7 @@
:baseUrl="baseUrl"
:max="9"
@onUpdate="updateFile"
:readonly='props.readonly'
></CustomUpload>
</el-form-item>
<el-form-item label="一图一表" style="width: 100%" class="inline-block">
<CustomUpload
:listPic="chartFileList"
:OTCType="FileType.EmergencyImg"
:uuid="addPostFactorForm.othplanid || uuid"
:userId="userId"
:baseUrl="baseUrl"
:max="9"
@onUpdate="chartupdateFile"
:readonly='props.readonly'
:readonly="props.readonly"
></CustomUpload>
</el-form-item>
</el-form>
@ -98,7 +72,6 @@ import useUserStore from "@/store/modules/user";
import { ElMessage, FormInstance, FormRules } from "element-plus";
import { getYears, getUUID, FileType } from "@/utils/common";
import { saveOthplan } from "@/api/Othteam";
import { getSysunitList } from "@/api/BookEntCheck";
import { uploadFile, getFile, delFile } from "@/api/file";
const formRef = ref<FormInstance>();
@ -188,19 +161,6 @@ const getFiles = (FileType) => {
);
};
//
const SysunitList = () => {
let params = {
basesafeclassid: null,
isTree: 0, //0 1
safeclassname: null,
userId: userId.value,
};
getSysunitList(params).then((res: any) => {
unitList.value = res.data;
});
};
//
const onclone = () => {
emits("close");

View File

@ -4,9 +4,12 @@
<div style="margin-bottom: 16px" class="h-layout space-between h-center">
<div>
<div class="h-layout">
<div class="tool-item" @click="(dialogVisible = true), (form = {}),(readonly=false)">
<div
class="tool-item"
@click="(dialogVisible = true), (form = {}), (readonly = false)"
>
<svg-icon name="add" class="icon" />
<span >新增</span>
<span>新增</span>
</div>
<div class="tool-item" @click="getCompanyList">
<svg-icon name="refurbish" class="icon" />
@ -22,7 +25,7 @@
<div>
<el-input
v-model="search"
@keydown.enter.native="getCompanyList"
@keydown.enter="getCompanyList"
placeholder="输入预案名称"
class="search-input"
>
@ -36,7 +39,7 @@
</div>
</div>
</div>
<div style="display:flex;margin-bottom: 10px;">
<div style="display: flex; margin-bottom: 10px">
<div class="label-select filter-tab">
<label>预案类型</label>
<el-select
@ -63,22 +66,51 @@
@selection-change="handleSelectionChange"
border
>
<el-table-column type="index" align="center" label="序列" width="60"></el-table-column>
<el-table-column prop="planname" :resizable="true" align="center" label="预案名称"></el-table-column>
<el-table-column prop="othtypename" :resizable="true" align="center" label="预案类型"></el-table-column>
<el-table-column prop="hasImg" :resizable="true" align="center" label="一图一表数量"></el-table-column>
<el-table-column :resizable="true" align="center" width="240" label="操作">
<template #default="scope">
<span class="operate" @click="(dialogVisible = true), (form = scope.row),(readonly=false)">
<svg-icon name="edit" class="icon"></svg-icon>
<span class="edit">编辑</span>
</span>
<span class="operate" @click=" (dialogVisible = true), (form = scope.row),(readonly=true)">
<svg-icon name="detail" class="icon"></svg-icon>
<span class="detail">详情</span>
</span>
</template>
</el-table-column>
<el-table-column
type="index"
align="center"
label="序列"
width="60"
></el-table-column>
<el-table-column
prop="planname"
:resizable="true"
align="center"
label="预案名称"
></el-table-column>
<el-table-column
prop="othtypename"
:resizable="true"
align="center"
label="预案类型"
></el-table-column>
<el-table-column
:resizable="true"
align="center"
width="240"
label="操作"
>
<template #default="scope">
<span
class="operate"
@click="
(dialogVisible = true), (form = scope.row), (readonly = false)
"
>
<svg-icon name="edit" class="icon"></svg-icon>
<span class="edit">编辑</span>
</span>
<span
class="operate"
@click="
(dialogVisible = true), (form = scope.row), (readonly = true)
"
>
<svg-icon name="detail" class="icon"></svg-icon>
<span class="detail">详情</span>
</span>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
@ -94,24 +126,30 @@
>
</el-pagination>
<!-- 新增 -->
<Adddetails :visible="dialogVisible" :typeList='option' :form="form" :readonly="readonly" @close="onclone" />
<Adddetails
:visible="dialogVisible"
:typeList="option"
:form="form"
:readonly="readonly"
@close="onclone"
/>
</div>
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref } from "vue";
import { getOthplanPage,getOthtypeList } from "@/api/Othteam";
import { getOthplanPage, getOthtypeList } from "@/api/Othteam";
import Adddetails from "./details.vue";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
const user = ref(JSON.parse(userStore.userInfo));
const userId = ref(user.value.userId)
const userId = ref(user.value.userId);
const search = ref([]);
const tableData = ref([]);
const currentPage = ref(1);
const pageSize = ref(10);
const total = ref(0);
const type = ref('');
const type = ref("");
const option = ref([]);
const dialogVisible = ref(false);
@ -129,18 +167,18 @@ const getCompanyList = () => {
limit: pageSize.value,
page: currentPage.value,
};
getOthplanPage(params).then((res:any) => {
getOthplanPage(params).then((res: any) => {
tableData.value = res.data.list;
total.value = res.data.total;
tableDataloading.value = false;
})
});
};
//
const OthtypeList = () => {
getOthtypeList().then((res:any) => {
getOthtypeList().then((res: any) => {
option.value = res.data;
})
}
});
};
//
const onclone = () => {
dialogVisible.value = false;
@ -150,7 +188,7 @@ const onclone = () => {
onMounted(() => {
getCompanyList();
OthtypeList();
})
});
</script>
<style lang="scss" scoped>
.content {