feat:应急调整
This commit is contained in:
parent
d07542d480
commit
b04052377d
|
|
@ -19,4 +19,3 @@ VITE_PROXY = [ ["/dev-api", "http://192.168.110.186:8017" ],["/dev-img-api", "ht
|
|||
VITE_GLOB_UPLOAD_URL=/dev-api
|
||||
VITE_UPLOAD_IMG_URL=/dev-img-api
|
||||
VITE_UPLOAD_URL = http://192.168.110.186
|
||||
VITE_IFRAMEURL=http://192.168.110.39:8010
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ export default {
|
|||
},
|
||||
children: [
|
||||
{
|
||||
path: 'team_detail',
|
||||
name: 'team_detail',
|
||||
component: () => import('@/views/emergency/procession/form_details.vue'),
|
||||
path: 'team-detail',
|
||||
name: 'team-detail',
|
||||
component: () => import('@/views/emergency/procession/team-details.vue'),
|
||||
meta: {
|
||||
auth: "emer.team.detail",
|
||||
title: '队伍详情',
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="getCompanyList">
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
|
|
@ -22,12 +22,12 @@
|
|||
<div>
|
||||
<el-input
|
||||
v-model="search"
|
||||
@keydown.enter.native="getCompanyList"
|
||||
@keydown.enter.native="getList"
|
||||
placeholder="请输入关键字"
|
||||
class="search-input"
|
||||
>
|
||||
<template #append>
|
||||
<span @click="getCompanyList" class="search-bottom">
|
||||
<span @click="getList" class="search-bottom">
|
||||
<svg-icon name="search" class="icon_class" />
|
||||
<span>搜索</span>
|
||||
</span>
|
||||
|
|
@ -110,8 +110,8 @@
|
|||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="getCompanyList"
|
||||
@current-change="getCompanyList"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
v-model:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size.sync="pageSize"
|
||||
|
|
@ -137,20 +137,7 @@ const user = ref(JSON.parse(userStore.userInfo));
|
|||
const userId = ref(user.value.userId);
|
||||
|
||||
const search = ref([]);
|
||||
const tableData = ref([
|
||||
{
|
||||
name: "张三",
|
||||
phone: "18628725626",
|
||||
time: "2023-12-15",
|
||||
address: "xxxxxx地址",
|
||||
},
|
||||
{
|
||||
name: "王五",
|
||||
phone: "18628725626",
|
||||
time: "2023-12-15",
|
||||
address: "xxxxxx地址",
|
||||
},
|
||||
]);
|
||||
const tableData = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
|
|
@ -162,7 +149,7 @@ const readonly = ref(false);
|
|||
const handleSelectionChange = () => {};
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const getCompanyList = () => {
|
||||
const getList = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
equname: search.value,
|
||||
|
|
@ -196,7 +183,7 @@ const deletelist = (id) => {
|
|||
type: "error",
|
||||
});
|
||||
}
|
||||
getCompanyList();
|
||||
getList();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -205,7 +192,9 @@ const onclone = () => {
|
|||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
};
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
328
src/views/emergency/matter/add-edit-dialog.vue
Normal file
328
src/views/emergency/matter/add-edit-dialog.vue
Normal file
|
|
@ -0,0 +1,328 @@
|
|||
|
||||
<template>
|
||||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="
|
||||
props.readonly
|
||||
? '物资详情'
|
||||
: props.form.othequipmentid
|
||||
? '编辑应急物资'
|
||||
: '新增应急物资'
|
||||
"
|
||||
width="50%"
|
||||
@onSubmit="handleSubmit"
|
||||
:footerclosed="true"
|
||||
:diafooter="true"
|
||||
:footerkeepnaem="props.readonly ? false : true"
|
||||
>
|
||||
<div class="detailForm-content">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
label-position="right"
|
||||
label-width="150px"
|
||||
:rules="ruleForm"
|
||||
:model="addPostFactorForm"
|
||||
>
|
||||
<el-form-item label="仓库名称:" prop="houseName">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入仓库名称"
|
||||
v-model="addPostFactorForm.houseName"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="装备名称:" prop="equname">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入装备名称"
|
||||
v-model="addPostFactorForm.equname"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="装备数量:" prop="equnum">
|
||||
<el-input-number
|
||||
:readonly="props.readonly"
|
||||
:min="0"
|
||||
:step="1"
|
||||
step-strictly
|
||||
v-model="addPostFactorForm.equnum"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="存放场所:" prop="storageplace">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入存放场所"
|
||||
v-model="addPostFactorForm.storageplace"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式:" prop="equphone">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入联系电话"
|
||||
v-model="addPostFactorForm.equphone"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位:" prop="possession">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入所属单位"
|
||||
v-model="addPostFactorForm.possession"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="行业领域:" prop="industry">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入行业领域"
|
||||
v-model="addPostFactorForm.industry"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="equtype">
|
||||
<el-select
|
||||
:disabled="props.readonly"
|
||||
placeholder="请选择类型"
|
||||
v-model="addPostFactorForm.equtype"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in equtypes"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="index"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要功能:" prop="equfunction" style="width: 100%">
|
||||
<el-input
|
||||
:readonly="props.readonly"
|
||||
placeholder="请输入主要功能"
|
||||
v-model="addPostFactorForm.equfunction"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="装备照片:">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
ref="upload"
|
||||
action="#"
|
||||
accept="image/jpeg"
|
||||
list-type="picture-card"
|
||||
:show-file-list="false"
|
||||
:on-change="beforeAvatarUpload"
|
||||
:auto-upload="false"
|
||||
:http-request="handleUpload"
|
||||
:disabled="props.readonly"
|
||||
>
|
||||
<img
|
||||
v-if="addPostFactorForm.equipPhoto"
|
||||
:src="baseImgUrl + addPostFactorForm.equipPhoto"
|
||||
style="width: 100%; height: 100%"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</BaseDialog>
|
||||
</template>
|
||||
<script setup lang="ts" >
|
||||
import { reactive, ref, onMounted, watch } from "vue";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||
import { getYears, getUUID, FileType } from "@/utils/common";
|
||||
import { saveOthequipment, getOtheWareHouseList } from "@/api/Othteam";
|
||||
import { uploadFile, getFile, delFile } from "@/api/file";
|
||||
|
||||
const baseImgUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||
|
||||
const formRef = ref<FormInstance>();
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
const uuid = ref("");
|
||||
const equtypes = ref([
|
||||
{
|
||||
value: "个人防护装备",
|
||||
label: "个人防护装备",
|
||||
},
|
||||
{
|
||||
value: "消防装备",
|
||||
label: "消防装备",
|
||||
},
|
||||
{
|
||||
value: "通信装备",
|
||||
label: "通信装备",
|
||||
},
|
||||
{
|
||||
value: "报警装备",
|
||||
label: "报警装备",
|
||||
},
|
||||
{
|
||||
value: "特殊专业性应急装备",
|
||||
label: "特殊专业性应急装备",
|
||||
},
|
||||
{
|
||||
value: "医疗救护装备",
|
||||
label: "医疗救护装备",
|
||||
},
|
||||
]);
|
||||
const ruleForm = reactive<FormRules>({
|
||||
houseId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择仓库名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
equname: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入装备名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
equnum: [
|
||||
{
|
||||
required: true,
|
||||
message: "请装备数量",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
storageplace: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入存放场所",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
equphone: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入联系电话",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
equtype: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
});
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
form: Object,
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id: String,
|
||||
});
|
||||
const listperformid = ref(props.id);
|
||||
const addPostFactorForm = ref(<any>{});
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
//保存并退出
|
||||
const handleSubmit = () => {
|
||||
formRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
addPostFactorForm.value.othequipmentid =
|
||||
addPostFactorForm.value.othequipmentid || uuid.value;
|
||||
addPostFactorForm.value.userId = userId.value;
|
||||
saveOthequipment(addPostFactorForm.value).then((res: any) => {
|
||||
if (res.code == 1) {
|
||||
ElMessage.success({
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
onclone();
|
||||
} else {
|
||||
ElMessage.error({
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
// 上传附件前
|
||||
const upload = ref();
|
||||
const beforeAvatarUpload = () => {
|
||||
upload.value.submit();
|
||||
return true;
|
||||
};
|
||||
//图片上传
|
||||
const handleUpload = (res) => {
|
||||
let file = res.file;
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
let uuids = addPostFactorForm.value.othequipmentid || uuid.value;
|
||||
uploadFile(userId.value, uuids, FileType.equipment, formData).then(
|
||||
(res: any) => {
|
||||
if (res) {
|
||||
ElMessage.success({
|
||||
message: "上传成功!",
|
||||
type: "success",
|
||||
});
|
||||
getFiles();
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
//图片查询
|
||||
const getFiles = () => {
|
||||
getFile(
|
||||
addPostFactorForm.value.othequipmentid || uuid.value,
|
||||
FileType.equipment
|
||||
).then((res: any) => {
|
||||
if (res.data.length > 0) {
|
||||
const path = res.data[res.data.length - 1];
|
||||
addPostFactorForm.value.equipPhoto =
|
||||
import.meta.env.VITE_UPLOAD_URL + path.filepath;
|
||||
}
|
||||
});
|
||||
};
|
||||
//关闭弹窗
|
||||
const onclone = () => {
|
||||
emits("close");
|
||||
};
|
||||
|
||||
onMounted(() => {});
|
||||
|
||||
watch(
|
||||
() => props.form,
|
||||
(val) => {
|
||||
uuid.value = getUUID();
|
||||
if (val) {
|
||||
if (!props.visible) return;
|
||||
addPostFactorForm.value = val;
|
||||
getFiles();
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detailForm-content {
|
||||
margin-right: 30px;
|
||||
}
|
||||
:deep(.el-form) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
// justify-content: space-around;
|
||||
justify-content: space-between;
|
||||
}
|
||||
:deep(.el-form-item) {
|
||||
width: 47%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
|
||||
<template>
|
||||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="props.form.opInstructionId ? '编辑应急装备' : '新增应急装备'"
|
||||
width="50%"
|
||||
@onSubmit="handleSubmit"
|
||||
:footerclosed="true"
|
||||
:diafooter="true"
|
||||
:footerkeepnaem='props.readonly?false:true'
|
||||
>
|
||||
<div class="detailForm-content">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
label-position="right"
|
||||
label-width="150px"
|
||||
:rules="ruleForm"
|
||||
:model="addPostFactorForm"
|
||||
>
|
||||
<el-form-item label="物资名称:" prop="othresourcename">
|
||||
<el-input
|
||||
:readonly="isRead"
|
||||
placeholder="请输入物资名称"
|
||||
v-model="taskForm.othresourcename"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资类型:" prop="othresourcetype">
|
||||
<el-input
|
||||
:readonly="isRead"
|
||||
placeholder="请输入物资类型"
|
||||
v-model="taskForm.othresourcetype"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号:" prop="othmodel">
|
||||
<el-input
|
||||
:readonly="isRead"
|
||||
placeholder="请输入规格型号"
|
||||
v-model="taskForm.othmodel"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格数量:" prop="othnuum">
|
||||
<el-input-number
|
||||
:disabled="isRead"
|
||||
v-model="taskForm.othnuum"
|
||||
:min="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人:" prop="othperson">
|
||||
<el-input
|
||||
:readonly="isRead"
|
||||
placeholder="请输入负责人"
|
||||
v-model="taskForm.othperson"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</BaseDialog>
|
||||
</template>
|
||||
<script setup lang="ts" >
|
||||
import { reactive, ref, onMounted, watch } from "vue";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||
import { getYears, getUUID } from "@/utils/common";
|
||||
import { areaTree } from "@/api/account";
|
||||
import { saveOthteam } from "@/api/Othteam";
|
||||
|
||||
const formRef = ref<FormInstance>();
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
const planId = ref("");
|
||||
const indexClassify = ref([]);
|
||||
const fileList = ref<any>([]);
|
||||
const levelList = ref([
|
||||
{ value: "区级" },
|
||||
{ value: "镇级" },
|
||||
{ value: "园区" },
|
||||
{ value: "企业" },
|
||||
]);
|
||||
const ruleForm = reactive<FormRules>({
|
||||
teamname: [{ required: true, message: "请输入队伍名称", trigger: "change" }],
|
||||
orgcode: [{ required: true, message: "请选择所属区域", trigger: "blur" }],
|
||||
personnum: [{ required: true, message: "请输入人数", trigger: "change" }],
|
||||
});
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
form: Object,
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id: String,
|
||||
});
|
||||
const listperformid = ref(props.id);
|
||||
const addPostFactorForm = ref(<any>{});
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
//保存并退出
|
||||
const handleSubmit = () => {
|
||||
formRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
addPostFactorForm.value.orgcode = addPostFactorForm.value.orgcode[addPostFactorForm.value.orgcode.length - 1];
|
||||
addPostFactorForm.value.othteamid = getUUID();
|
||||
addPostFactorForm.value.userId = userId.value;
|
||||
saveOthteam(addPostFactorForm.value).then((res: any) => {
|
||||
if (res.code == 1) {
|
||||
ElMessage.success({
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
onclone();
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
//关闭弹窗
|
||||
const onclone = () => {
|
||||
emits("close");
|
||||
};
|
||||
//获取地区
|
||||
const orgList = ref([]);
|
||||
const getareaTree = () => {
|
||||
areaTree(userId.value).then((res: any) => {
|
||||
orgList.value = res.data;
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getareaTree();
|
||||
});
|
||||
watch(
|
||||
() => props.form,
|
||||
(val) => {
|
||||
console.log(333, props);
|
||||
if (val) {
|
||||
if (!props.visible) return;
|
||||
addPostFactorForm.value = val;
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detailForm-content {
|
||||
margin-right: 30px;
|
||||
}
|
||||
:deep(.el-form) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
// justify-content: space-around;
|
||||
justify-content: space-between;
|
||||
}
|
||||
:deep(.el-form-item) {
|
||||
width: 47%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -11,26 +11,22 @@
|
|||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="getCompanyList">
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
<!-- <div class="tool-item" @click="exportCompanys">
|
||||
<svg-icon name="delete" class="icon" />
|
||||
<span>删除</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 30%">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="search"
|
||||
@keydown.enter.native="getCompanyList"
|
||||
@keydown.enter.native="getList"
|
||||
placeholder="请输入关键字"
|
||||
class="search-input"
|
||||
>
|
||||
<template #append>
|
||||
<span @click="getCompanyList" class="search-bottom">
|
||||
<span @click="getList" class="search-bottom">
|
||||
<svg-icon name="search" class="icon_class" />
|
||||
<span>搜索</span>
|
||||
</span>
|
||||
|
|
@ -125,8 +121,8 @@
|
|||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="getCompanyList"
|
||||
@current-change="getCompanyList"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
v-model:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size.sync="pageSize"
|
||||
|
|
@ -149,23 +145,14 @@
|
|||
import { onMounted, reactive, ref } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { getOthequipmentPage, delOthequipment } from "@/api/Othteam";
|
||||
import AddWarehouse from "../equip/inventory/AddWarehouse.vue";
|
||||
import AddWarehouse from "./add-edit-dialog.vue";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
|
||||
const search = ref([]);
|
||||
const tableData = ref([
|
||||
{
|
||||
houseName: "鲜水镇",
|
||||
equname: "消防车",
|
||||
equnum: "3辆",
|
||||
equtype: "消防器材",
|
||||
industry: "消防",
|
||||
storageplace: "-",
|
||||
},
|
||||
]);
|
||||
const tableData = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
|
|
@ -177,7 +164,7 @@ const readonly = ref(false);
|
|||
const handleSelectionChange = () => {};
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const getCompanyList = () => {
|
||||
const getList = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
equname: search.value,
|
||||
|
|
@ -211,7 +198,7 @@ const deletelist = (id) => {
|
|||
type: "error",
|
||||
});
|
||||
}
|
||||
getCompanyList();
|
||||
getList();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -220,7 +207,9 @@ const onclone = () => {
|
|||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
};
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="props.form.opInstructionId ? '编辑应急队伍' : '新增应急队伍'"
|
||||
:titleName="props.form.othpersonid ? '编辑应急成员' : '新增应急成员'"
|
||||
width="50%"
|
||||
@onSubmit="handleSubmit"
|
||||
:footerclosed="true"
|
||||
|
|
@ -78,17 +78,18 @@ const props = defineProps({
|
|||
},
|
||||
id: String,
|
||||
});
|
||||
const othteamid = ref(props.id);
|
||||
const othteamid = ref();
|
||||
const addPostFactorForm = ref(<any>{});
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
//保存并退出
|
||||
const handleSubmit = () => {
|
||||
formRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
let str = addPostFactorForm.value.othpersonid?'编辑成功':'新增成功'
|
||||
if(addPostFactorForm.value.othpersonid)addPostFactorForm.value.othpersonid = addPostFactorForm.value.othpersonid || getUUID();
|
||||
addPostFactorForm.value.othteamid = othteamid.value;
|
||||
addPostFactorForm.value.userId = userId.value;
|
||||
let str = addPostFactorForm.value.othpersonid ? "编辑成功" : "新增成功";
|
||||
addPostFactorForm.value.othpersonid =
|
||||
addPostFactorForm.value.othpersonid || getUUID();
|
||||
addPostFactorForm.value.othteamid = othteamid.value;
|
||||
addPostFactorForm.value.userId = userId.value;
|
||||
saveOthperson(addPostFactorForm.value).then((res: any) => {
|
||||
if (res.code == 1) {
|
||||
ElMessage.success({
|
||||
|
|
@ -113,6 +114,7 @@ watch(
|
|||
if (val) {
|
||||
if (!props.visible) return;
|
||||
addPostFactorForm.value = val;
|
||||
othteamid.value = props.id;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -8,30 +8,22 @@
|
|||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="getCompanyList">
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="tableCheckBoxs.length > 0"
|
||||
class="tool-item"
|
||||
@click="deleteCheckItems"
|
||||
>
|
||||
<svg-icon name="delete" class="icon" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 30%">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="search"
|
||||
@keydown.enter.native="getCompanyList"
|
||||
@keydown.enter.native="getList"
|
||||
placeholder="请输入队伍名称"
|
||||
class="search-input"
|
||||
>
|
||||
<template #append>
|
||||
<span @click="getCompanyList" class="search-bottom">
|
||||
<span @click="getList" class="search-bottom">
|
||||
<svg-icon name="search" class="icon_class" />
|
||||
<span>搜索</span>
|
||||
</span>
|
||||
|
|
@ -45,10 +37,8 @@
|
|||
v-loading="tableDataloading"
|
||||
:data="tableData"
|
||||
header-row-class-name="el-one-header"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" align="center" width="55" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序列"
|
||||
|
|
@ -93,7 +83,7 @@
|
|||
详情
|
||||
</span>
|
||||
</span>
|
||||
<span class="operate" @click="del()">
|
||||
<span class="operate" @click="del(scope.row.othteamid)">
|
||||
<svg-icon name="delete" class="icon"></svg-icon>
|
||||
<span class="func">删除</span>
|
||||
</span>
|
||||
|
|
@ -103,8 +93,8 @@
|
|||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="getCompanyList"
|
||||
@current-change="getCompanyList"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
v-model:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size.sync="pageSize"
|
||||
|
|
@ -123,7 +113,7 @@ import { onMounted, reactive, ref } from "vue";
|
|||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getOthteamPage, delOthteam } from "@/api/Othteam";
|
||||
import Adddetails from "./details.vue";
|
||||
import Adddetails from "./add-team-dialog.vue";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
|
|
@ -137,28 +127,10 @@ const form = ref({});
|
|||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
const tableCheckBoxs = ref([]);
|
||||
const tableData = ref([
|
||||
{
|
||||
teamname: "队伍名称",
|
||||
orgcode: "道孚县",
|
||||
personnum: "20",
|
||||
principal: "张三",
|
||||
},
|
||||
]);
|
||||
const tableData = ref([]);
|
||||
|
||||
/**
|
||||
*选中
|
||||
*/
|
||||
const handleSelectionChange = (val: any) => {
|
||||
tableCheckBoxs.value = [];
|
||||
for (let index = 0; index < val.length; index++) {
|
||||
const element = val[index];
|
||||
tableCheckBoxs.value.push(element.othteamid);
|
||||
}
|
||||
};
|
||||
//获取应急队伍列表
|
||||
const getCompanyList = () => {
|
||||
const getList = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
limit: pageSize.value,
|
||||
|
|
@ -173,14 +145,14 @@ const getCompanyList = () => {
|
|||
});
|
||||
};
|
||||
//删除
|
||||
const del = () => {
|
||||
const del = (id) => {
|
||||
ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||
confirmButtonText: "是",
|
||||
cancelButtonText: "否",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
let params = {
|
||||
othteamid: tableCheckBoxs.value.join(","),
|
||||
othteamid: id,
|
||||
userId: userId.value,
|
||||
};
|
||||
delOthteam(params).then((res: any) => {
|
||||
|
|
@ -195,14 +167,14 @@ const del = () => {
|
|||
type: "error",
|
||||
});
|
||||
}
|
||||
getCompanyList();
|
||||
getList();
|
||||
});
|
||||
});
|
||||
};
|
||||
//详情
|
||||
const todetail = (id) => {
|
||||
router.push({
|
||||
name: "form_details",
|
||||
name: "team-detail",
|
||||
query: { id: id },
|
||||
});
|
||||
};
|
||||
|
|
@ -212,7 +184,9 @@ const onclone = () => {
|
|||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
};
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="percentage-content">
|
||||
<div class="content">
|
||||
<div>
|
||||
<TitleC titleName="检查记录">
|
||||
<TitleC titleName="队伍信息">
|
||||
<template v-slot:option>
|
||||
<div class="h-layout option">
|
||||
<div class="h-layout h-titlec" @click="Chkbilldetail">
|
||||
|
|
@ -272,7 +272,7 @@
|
|||
<addMemberDialog
|
||||
:visible="dialogVisible"
|
||||
:form="form"
|
||||
:id="route.query.id"
|
||||
:id="teamId"
|
||||
@close="onclone"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -282,7 +282,7 @@
|
|||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||
import addMemberDialog from "./addMemberDialog.vue";
|
||||
import addMemberDialog from "./add-member-dialog.vue";
|
||||
|
||||
import {
|
||||
getOthteam,
|
||||
|
|
@ -314,7 +314,9 @@ const levelList = ref([
|
|||
{ value: "企业" },
|
||||
]);
|
||||
const tableDataloading = ref(false);
|
||||
const tableData = ref([{ othname: "张三", othsex: "男" }]);
|
||||
const tableData = ref([]);
|
||||
|
||||
const teamId = ref();
|
||||
const form = ref({});
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
|
|
@ -367,17 +369,17 @@ const getareaTree = () => {
|
|||
};
|
||||
//应急成员分页
|
||||
const OthpersonPage = () => {
|
||||
// tableDataloading.value = true;
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
limit: pageSize.value,
|
||||
page: currentPage.value,
|
||||
othteamid: route.query.id,
|
||||
};
|
||||
// getOthpersonPage(params).then((res: any) => {
|
||||
// tableData.value = res.data.list;
|
||||
// total.value = res.data.total;
|
||||
// tableDataloading.value = false;
|
||||
// });
|
||||
getOthpersonPage(params).then((res: any) => {
|
||||
tableData.value = res.data.list;
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
/**
|
||||
*选中
|
||||
|
|
@ -433,6 +435,8 @@ const editMember = (val) => {
|
|||
form.value = val;
|
||||
};
|
||||
onMounted(() => {
|
||||
teamId.value = route.query.id || "";
|
||||
|
||||
refurbish();
|
||||
getareaTree();
|
||||
OthpersonPage();
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<!-- 应急值守 -->
|
||||
<!-- 应急避难场所 -->
|
||||
<template>
|
||||
<div class="percentage-content">
|
||||
<div class="content">
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="getCompanyList">
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
|
|
@ -26,12 +26,12 @@
|
|||
<div>
|
||||
<el-input
|
||||
v-model="search"
|
||||
@keydown.enter.native="getCompanyList"
|
||||
@keydown.enter.native="getList"
|
||||
placeholder="请输入关键字"
|
||||
class="search-input"
|
||||
>
|
||||
<template #append>
|
||||
<span @click="getCompanyList" class="search-bottom">
|
||||
<span @click="getList" class="search-bottom">
|
||||
<svg-icon name="search" class="icon_class" />
|
||||
<span>搜索</span>
|
||||
</span>
|
||||
|
|
@ -114,8 +114,8 @@
|
|||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="getCompanyList"
|
||||
@current-change="getCompanyList"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
v-model:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size.sync="pageSize"
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
import { onMounted, reactive, ref } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { getOthequipmentPage, delOthequipment } from "@/api/Othteam";
|
||||
import AddEdit from "./dialog/add-edit.vue";
|
||||
import AddEdit from "./dialog/add-edit-dialog.vue";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const userStore = useUserStore();
|
||||
|
|
@ -141,14 +141,7 @@ const user = ref(JSON.parse(userStore.userInfo));
|
|||
const userId = ref(user.value.userId);
|
||||
|
||||
const search = ref([]);
|
||||
const tableData = ref([
|
||||
{
|
||||
name: "鲜水镇",
|
||||
area: "3000㎡",
|
||||
number: "20000",
|
||||
address: "xxxxxx地址",
|
||||
},
|
||||
]);
|
||||
const tableData = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
|
|
@ -160,7 +153,7 @@ const readonly = ref(false);
|
|||
const handleSelectionChange = () => {};
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const getCompanyList = () => {
|
||||
const getList = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
equname: search.value,
|
||||
|
|
@ -194,7 +187,7 @@ const deletelist = (id) => {
|
|||
type: "error",
|
||||
});
|
||||
}
|
||||
getCompanyList();
|
||||
getList();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -203,7 +196,9 @@ const onclone = () => {
|
|||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
};
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user