|
|
@@ -1,374 +1,414 @@
|
|
|
<template>
|
|
|
- <div class="safety-platform-container">
|
|
|
- <header class="safety-platform-container__header">
|
|
|
- <div class="breadcrumb-title">{{ $route.meta.title }}</div>
|
|
|
- <el-tabs v-model="activeTab" @tab-change="handleTabChange">
|
|
|
- <el-tab-pane label="公共区域" :name="1" />
|
|
|
- <el-tab-pane label="非公共区域" :name="2" />
|
|
|
- </el-tabs>
|
|
|
- </header>
|
|
|
- <main class="safety-platform-container__main">
|
|
|
- <div style="margin-bottom: 20px">
|
|
|
- <el-button type="primary" @click="
|
|
|
- $router.push({
|
|
|
- name: 'addResponsibilities:nonPublic',
|
|
|
- })
|
|
|
- ">添加
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div class="search-form">
|
|
|
- <el-form :inline="true">
|
|
|
- <el-form-item label="区域名称">
|
|
|
- <el-input v-model="queryParams.queryParam.nameFunction" placeholder="搜索功能名称"
|
|
|
- style="width: 170px" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="状态">
|
|
|
- <el-select v-model="queryParams.queryParam.status" clearable placeholder="状态"
|
|
|
- style="width: 170px">
|
|
|
- <el-option :value="1" label="正常" />
|
|
|
- <el-option :value="2" label="待确认" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <div class="safety-platform-container">
|
|
|
+ <header class="safety-platform-container__header">
|
|
|
+ <div class="breadcrumb-title">{{ $route.meta.title }}</div>
|
|
|
+ <el-tabs v-model="activeTab" @tab-change="handleTabChange">
|
|
|
+ <el-tab-pane label="公共区域" :name="1" />
|
|
|
+ <el-tab-pane label="非公共区域" :name="2" />
|
|
|
+ </el-tabs>
|
|
|
+ </header>
|
|
|
+ <main class="safety-platform-container__main">
|
|
|
+ <div style="margin-bottom: 20px">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="
|
|
|
+ $router.push({
|
|
|
+ name: 'addResponsibilities:nonPublic',
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >添加
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="search-form">
|
|
|
+ <el-form :inline="true">
|
|
|
+ <el-form-item label="区域名称">
|
|
|
+ <el-input v-model="queryParams.queryParam.nameFunction" placeholder="搜索功能名称" style="width: 170px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态">
|
|
|
+ <el-select v-model="queryParams.queryParam.status" clearable placeholder="状态" style="width: 170px">
|
|
|
+ <el-option :value="1" label="正常" />
|
|
|
+ <el-option :value="2" label="待确认" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item label="安全责任部门">
|
|
|
- <el-cascader v-model="queryParams.queryParam.safetyResponsibleDepartmentId" style="width: 170px"
|
|
|
- ref="cascaderRef" :options="firstLevelDepts" :props="cascaderProp" :show-all-levels="false"
|
|
|
- placeholder="部门名称" filterable @change="handleChangeDept" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="安全具体责任人" prop="safetyResponsibleBuilding">
|
|
|
- <el-select v-model="queryParams.queryParam.safetySpecificPerson" placeholder="请选择"
|
|
|
- style="width: 170px" filterable>
|
|
|
- <el-option v-for="item in userOptions" :key="item.value" :label="item.label"
|
|
|
- :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-form-item label="安全责任部门">
|
|
|
+ <el-cascader
|
|
|
+ v-model="queryParams.queryParam.safetyResponsibleDepartmentId"
|
|
|
+ style="width: 170px"
|
|
|
+ ref="cascaderRef"
|
|
|
+ :options="firstLevelDepts"
|
|
|
+ :props="cascaderProp"
|
|
|
+ :show-all-levels="false"
|
|
|
+ placeholder="部门名称"
|
|
|
+ filterable
|
|
|
+ @change="handleChangeDept"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="安全具体责任人" prop="safetyResponsibleBuilding">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.queryParam.safetySpecificPerson"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 170px"
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in userOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
|
|
|
- <div>
|
|
|
- <!-- <el-button @click="batchImportVisible = true">导入</el-button>
|
|
|
+ <div>
|
|
|
+ <!-- <el-button @click="batchImportVisible = true">导入</el-button>
|
|
|
<el-button type="primary" @click="handleDownload">导出</el-button> -->
|
|
|
|
|
|
- <el-button type="primary" @click="queryTableList">查询</el-button>
|
|
|
- <el-button @click="handleRestParams">重置</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-button type="primary" @click="queryTableList">查询</el-button>
|
|
|
+ <el-button @click="handleRestParams">重置</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="table-content">
|
|
|
- <el-table :data="tableData.data">
|
|
|
- <el-table-column type="index" label="序号" width="80" />
|
|
|
- <el-table-column label="楼号" prop="buildingNo" width="80" />
|
|
|
- <el-table-column label="楼层" prop="buildingArea" width="100" />
|
|
|
- <el-table-column label="房间/区域" prop="floorRoomNo" width="180" />
|
|
|
- <el-table-column label="功能名称" prop="nameFunction" width="120" />
|
|
|
- <el-table-column label="安全责任所/中心" prop="safetyResponsibleCenter" width="200" />
|
|
|
- <el-table-column label="安全责任所/中心负责人" prop="safetyCenterManagerName" width="200" />
|
|
|
- <el-table-column label="安全责任部门" prop="safetyResponsibleDepartment" width="180" />
|
|
|
- <el-table-column label="安全责任部门负责人" prop="safetyDepartmentManagerName" width="180" />
|
|
|
- <el-table-column label="安全具体责任人" prop="safetySpecificPersonName" width="180" />
|
|
|
- <el-table-column label="安全具体责任人联系方式" prop="safetyPersonContact" width="230" />
|
|
|
- <el-table-column label="变更原因" prop="changeReason" width="170" />
|
|
|
- <el-table-column label="状态" prop="statusName" width="100" />
|
|
|
- <el-table-column fixed="right" min-width="240" label="操作">
|
|
|
- <template #default="scope">
|
|
|
- <template v-if="scope.row.status === 1">
|
|
|
- <el-button type="primary" link @click="
|
|
|
- $router.push({
|
|
|
- name: 'editResponsibilities:nonPublic',
|
|
|
- query: {
|
|
|
- id: scope.row.id,
|
|
|
- },
|
|
|
- })
|
|
|
- ">编辑
|
|
|
- </el-button>
|
|
|
- <el-popconfirm title="确定要删除吗?" @confirm="handleConfirmDeleteRow(scope)">
|
|
|
- <template #reference>
|
|
|
- <el-button type="primary" link>删除</el-button>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
+ <div class="table-content">
|
|
|
+ <el-table :data="tableData.data">
|
|
|
+ <el-table-column type="index" label="序号" width="80" />
|
|
|
+ <el-table-column label="楼号" prop="buildingNo" width="80" />
|
|
|
+ <el-table-column label="楼层" prop="buildingArea" width="100" />
|
|
|
+ <el-table-column label="房间/区域" prop="floorRoomNo" width="180" />
|
|
|
+ <el-table-column label="功能名称" prop="nameFunction" width="120" />
|
|
|
+ <el-table-column label="安全责任所/中心" prop="safetyResponsibleCenter" width="200" />
|
|
|
+ <el-table-column label="安全责任所/中心负责人" prop="safetyCenterManagerName" width="200" />
|
|
|
+ <el-table-column label="安全责任部门" prop="safetyResponsibleDepartment" width="180" />
|
|
|
+ <el-table-column label="安全责任部门负责人" prop="safetyDepartmentManagerName" width="180" />
|
|
|
+ <el-table-column label="安全具体责任人" prop="safetySpecificPersonName" width="180" />
|
|
|
+ <el-table-column label="安全具体责任人联系方式" prop="safetyPersonContact" width="230" />
|
|
|
+ <el-table-column label="变更原因" prop="changeReason" width="170" />
|
|
|
+ <el-table-column label="状态" prop="statusName" width="100" />
|
|
|
+ <el-table-column fixed="right" min-width="240" label="操作">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="scope.row.status === 1">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ @click="
|
|
|
+ $router.push({
|
|
|
+ name: 'editResponsibilities:nonPublic',
|
|
|
+ query: {
|
|
|
+ id: scope.row.id,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
+ <el-popconfirm title="确定要删除吗?" @confirm="handleConfirmDeleteRow(scope)">
|
|
|
+ <template #reference>
|
|
|
+ <el-button type="primary" link>删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
|
|
|
- <el-button type="primary" link @click="
|
|
|
- $router.push({
|
|
|
- name: 'changeResponsibilities:nonPublic',
|
|
|
- query: {
|
|
|
- id: scope.row.id,
|
|
|
- },
|
|
|
- })
|
|
|
- ">变更</el-button>
|
|
|
- </template>
|
|
|
- <template v-if="scope.row.canChange === true">
|
|
|
- <el-button type="primary" link
|
|
|
- @click="handleAreaCheckListApprove(scope, 1)">确认</el-button>
|
|
|
- <el-button type="primary" link
|
|
|
- @click="handleAreaCheckListApprove(scope, 0)">拒绝</el-button>
|
|
|
- </template>
|
|
|
- <!-- <template v-if="scope.row.status === 3">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ @click="
|
|
|
+ $router.push({
|
|
|
+ name: 'changeResponsibilities:nonPublic',
|
|
|
+ query: {
|
|
|
+ id: scope.row.id,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >变更</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-if="scope.row.canChange === true">
|
|
|
+ <el-button type="primary" link @click="handleAreaCheckListApprove(scope, 1)">确认</el-button>
|
|
|
+ <el-button type="primary" link @click="handleAreaCheckListApprove(scope, 0)">拒绝</el-button>
|
|
|
+ </template>
|
|
|
+ <!-- <template v-if="scope.row.status === 3">
|
|
|
<el-button type="primary" link>变更</el-button>
|
|
|
</template> -->
|
|
|
- <el-button type="primary" link @click="
|
|
|
- $router.push({
|
|
|
- name: 'viewResponsibilities:nonPublic',
|
|
|
- query: {
|
|
|
- id: scope.row.id,
|
|
|
- },
|
|
|
- })
|
|
|
- ">查看</el-button>
|
|
|
- <el-button link type="primary" v-if="scope.row.creatBy === id && scope.row.status === 2"
|
|
|
- @click="handleAreaCheckListApprove(scope, 0)">
|
|
|
- 撤回
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <div class="pagination-container" v-if="tableData.total > 0">
|
|
|
- <el-pagination background layout="prev, pager, next, jumper,sizes, total"
|
|
|
- :current-page="queryParams.pageNumber" :page-size="queryParams.pageSize" :total="tableData.total"
|
|
|
- :page-sizes="[10, 20, 50, 100]" @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange" />
|
|
|
- </div>
|
|
|
- </main>
|
|
|
- </div>
|
|
|
- <BatchImport :visible="batchImportVisible" :importApiUrl="importApiUrl" :templateUrl="templateUrl"
|
|
|
- :templateName="'责任清单-批量导入模版'" @close="() => (batchImportVisible = false)" @update="handleUpdate" />
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ @click="
|
|
|
+ $router.push({
|
|
|
+ name: 'viewResponsibilities:nonPublic',
|
|
|
+ query: {
|
|
|
+ id: scope.row.id,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ v-if="scope.row.creatBy === id && scope.row.status === 2"
|
|
|
+ @click="handleAreaCheckListApprove(scope, 0)"
|
|
|
+ >
|
|
|
+ 撤回
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="pagination-container" v-if="tableData.total > 0">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next, jumper,sizes, total"
|
|
|
+ :current-page="queryParams.pageNumber"
|
|
|
+ :page-size="queryParams.pageSize"
|
|
|
+ :total="tableData.total"
|
|
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </main>
|
|
|
+ </div>
|
|
|
+ <BatchImport
|
|
|
+ :visible="batchImportVisible"
|
|
|
+ :importApiUrl="importApiUrl"
|
|
|
+ :templateUrl="templateUrl"
|
|
|
+ :templateName="'责任清单-批量导入模版'"
|
|
|
+ @close="() => (batchImportVisible = false)"
|
|
|
+ @update="handleUpdate"
|
|
|
+ />
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
-import { onMounted, ref, reactive } from 'vue';
|
|
|
-import { ElMessage } from 'element-plus';
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
-import {
|
|
|
+ import { onMounted, ref, reactive } from 'vue';
|
|
|
+ import { ElMessage } from 'element-plus';
|
|
|
+ import { useRouter } from 'vue-router';
|
|
|
+ import {
|
|
|
areaCheckListQueryPage,
|
|
|
areaCheckListApprove,
|
|
|
areaCheckListDelete,
|
|
|
areaCheckListExportArea,
|
|
|
queryAvailableUserList,
|
|
|
-} from '@/api/production-safety/responsibility-implementation';
|
|
|
-import urlJoin from 'url-join';
|
|
|
-import { BatchImport } from '@/components/batch-import';
|
|
|
+ } from '@/api/production-safety/responsibility-implementation';
|
|
|
+ import urlJoin from 'url-join';
|
|
|
+ import { BatchImport } from '@/components/batch-import';
|
|
|
|
|
|
-import { unformatAttachment } from '@/components/UploadFiles/utils';
|
|
|
-import { downloadFile } from '@/views/disaster/utils';
|
|
|
-import { useGlobSetting } from '@/hooks/setting';
|
|
|
-import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
|
-import { getAllDepartments } from '@/api/auth/dept';
|
|
|
-import { useUserInfoHook } from '@/views/disaster/hooks';
|
|
|
+ import { unformatAttachment } from '@/components/UploadFiles/utils';
|
|
|
+ import { downloadFile } from '@/views/disaster/utils';
|
|
|
+ import { useGlobSetting } from '@/hooks/setting';
|
|
|
+ import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
|
+ import { getAllDepartments } from '@/api/auth/dept';
|
|
|
+ import { useUserInfoHook } from '@/views/disaster/hooks';
|
|
|
|
|
|
-const { id } = useUserInfoHook();
|
|
|
-const router = useRouter();
|
|
|
-const activeTab = ref(2);
|
|
|
-const queryParams = reactive<any>({
|
|
|
+ const { id } = useUserInfoHook();
|
|
|
+ const router = useRouter();
|
|
|
+ const activeTab = ref(2);
|
|
|
+ const queryParams = reactive<any>({
|
|
|
pageNumber: 1,
|
|
|
pageSize: 10,
|
|
|
queryParam: {
|
|
|
- type: 2,
|
|
|
- nameFunction: '',
|
|
|
- status: '',
|
|
|
- safetyResponsibleDepartmentId: [],
|
|
|
- safetySpecificPerson: '',
|
|
|
+ type: 2,
|
|
|
+ nameFunction: '',
|
|
|
+ status: '',
|
|
|
+ safetyResponsibleDepartmentId: [],
|
|
|
+ safetySpecificPerson: '',
|
|
|
},
|
|
|
-});
|
|
|
-const cascaderRef = ref<any>(null);
|
|
|
-const firstLevelDepts = ref<any[]>([]);
|
|
|
-const cascaderProp = {
|
|
|
+ });
|
|
|
+ const cascaderRef = ref<any>(null);
|
|
|
+ const firstLevelDepts = ref<any[]>([]);
|
|
|
+ const cascaderProp = {
|
|
|
expandTrigger: 'click',
|
|
|
checkStrictly: true,
|
|
|
// emitPath: false,
|
|
|
value: 'id',
|
|
|
label: 'deptName',
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-// 批量导入
|
|
|
-const batchImportVisible = ref(false);
|
|
|
-const { urlPrefix } = useGlobSetting();
|
|
|
-const importApiUrl = ref(urlJoin(urlPrefix, '/areaCheckList/importArea?type=2'));
|
|
|
-const templateUrl = ref('');
|
|
|
+ // 批量导入
|
|
|
+ const batchImportVisible = ref(false);
|
|
|
+ const { urlPrefix } = useGlobSetting();
|
|
|
+ const importApiUrl = ref(urlJoin(urlPrefix, '/areaCheckList/importArea?type=2'));
|
|
|
+ const templateUrl = ref('');
|
|
|
|
|
|
-const handleUpdate = () => {
|
|
|
+ const handleUpdate = () => {
|
|
|
batchImportVisible.value = false;
|
|
|
queryTableList();
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-const tableData = reactive({
|
|
|
+ const tableData = reactive({
|
|
|
data: [],
|
|
|
total: 0,
|
|
|
-});
|
|
|
-const userOptions = ref<any[]>([]);
|
|
|
+ });
|
|
|
+ const userOptions = ref<any[]>([]);
|
|
|
|
|
|
-const handleChangeDept = () => {
|
|
|
+ const handleChangeDept = () => {
|
|
|
const deptInfo = cascaderRef.value?.getCheckedNodes();
|
|
|
if (deptInfo?.[0]) {
|
|
|
- // queryParams.queryParam.department = deptInfo[0].label;
|
|
|
- queryParams.queryParam.safetyResponsibleDepartmentId = deptInfo[0].pathValues;
|
|
|
+ // queryParams.queryParam.department = deptInfo[0].label;
|
|
|
+ queryParams.queryParam.safetyResponsibleDepartmentId = deptInfo[0].pathValues;
|
|
|
}
|
|
|
-};
|
|
|
-const handleTabChange = (tab) => {
|
|
|
+ };
|
|
|
+ const handleTabChange = (tab) => {
|
|
|
if (tab === 1) {
|
|
|
- router.push({
|
|
|
- name: 'listResponsibilities:public',
|
|
|
- });
|
|
|
+ router.push({
|
|
|
+ name: 'listResponsibilities:public',
|
|
|
+ });
|
|
|
} else if (tab === 2) {
|
|
|
- router.push({
|
|
|
- name: 'listResponsibilities:nonPublic',
|
|
|
- });
|
|
|
+ router.push({
|
|
|
+ name: 'listResponsibilities:nonPublic',
|
|
|
+ });
|
|
|
}
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-const getDeptData = () => {
|
|
|
+ const getDeptData = () => {
|
|
|
getAllDepartments().then((res) => {
|
|
|
- firstLevelDepts.value = formatDeptTree(res);
|
|
|
+ firstLevelDepts.value = formatDeptTree(res);
|
|
|
});
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-async function handleDownload() {
|
|
|
+ async function handleDownload() {
|
|
|
// getQuery();
|
|
|
try {
|
|
|
- const res = await areaCheckListExportArea(queryParams.queryParam);
|
|
|
- if (res.size === 0) return;
|
|
|
- const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
|
|
- const url = window.URL.createObjectURL(blob);
|
|
|
- downloadFile(url, '责任清单.xlsx');
|
|
|
+ const res = await areaCheckListExportArea(queryParams.queryParam);
|
|
|
+ if (res.size === 0) return;
|
|
|
+ const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
|
|
+ const url = window.URL.createObjectURL(blob);
|
|
|
+ downloadFile(url, '责任清单.xlsx');
|
|
|
} catch (e) {
|
|
|
- ElMessage.error('下载失败');
|
|
|
- console.log(e);
|
|
|
+ ElMessage.error('下载失败');
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-const handleAreaCheckListApprove = (scope, approveType) => {
|
|
|
+ const handleAreaCheckListApprove = (scope, approveType) => {
|
|
|
areaCheckListApprove({
|
|
|
- id: scope.row.id,
|
|
|
- approveType,
|
|
|
- refuseReason: null,
|
|
|
+ id: scope.row.id,
|
|
|
+ approveType,
|
|
|
+ refuseReason: null,
|
|
|
}).then(() => {
|
|
|
- if (approveType === 1) {
|
|
|
- ElMessage.success('请尽快修改该责任清单的安全责任所/中心、安全责任部门及相关负责人信息');
|
|
|
- } else {
|
|
|
- ElMessage.success('操作成功!');
|
|
|
- }
|
|
|
- queryTableList();
|
|
|
+ if (approveType === 1) {
|
|
|
+ ElMessage.success('请尽快修改该责任清单的安全责任所/中心、安全责任部门及相关负责人信息');
|
|
|
+ } else {
|
|
|
+ ElMessage.success('操作成功!');
|
|
|
+ }
|
|
|
+ queryTableList();
|
|
|
});
|
|
|
-};
|
|
|
-const handleQueryAvailableUserList = (deptName = '', realname = '') => {
|
|
|
+ };
|
|
|
+ const handleQueryAvailableUserList = (deptName = '', realname = '') => {
|
|
|
queryAvailableUserList({
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 200,
|
|
|
- queryParam: {
|
|
|
- deptName,
|
|
|
- realname,
|
|
|
- },
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 200,
|
|
|
+ queryParam: {
|
|
|
+ deptName,
|
|
|
+ realname,
|
|
|
+ },
|
|
|
}).then((res: any) => {
|
|
|
- userOptions.value = (res.records || []).map((u: any) => ({
|
|
|
- value: u.userId || u.id,
|
|
|
- label: u.realname,
|
|
|
- }));
|
|
|
+ userOptions.value = (res.records || []).map((u: any) => ({
|
|
|
+ value: u.userId || u.id,
|
|
|
+ label: u.realname,
|
|
|
+ }));
|
|
|
});
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-const handleSizeChange = (value) => {
|
|
|
+ const handleSizeChange = (value) => {
|
|
|
queryParams.pageSize = value;
|
|
|
queryTableList();
|
|
|
-};
|
|
|
-const handleCurrentChange = (value) => {
|
|
|
+ };
|
|
|
+ const handleCurrentChange = (value) => {
|
|
|
queryParams.pageNumber = value;
|
|
|
queryTableList();
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-const handleConfirmDeleteRow = (scope) => {
|
|
|
+ const handleConfirmDeleteRow = (scope) => {
|
|
|
areaCheckListDelete(scope.row.id).then(() => {
|
|
|
- ElMessage.success('删除成功!');
|
|
|
- queryTableList();
|
|
|
+ ElMessage.success('删除成功!');
|
|
|
+ queryTableList();
|
|
|
});
|
|
|
-};
|
|
|
-const queryTableList = () => {
|
|
|
+ };
|
|
|
+ const queryTableList = () => {
|
|
|
areaCheckListQueryPage(queryParams).then((res) => {
|
|
|
- tableData.data = res.records;
|
|
|
- tableData.total = res.totalRow;
|
|
|
+ tableData.data = res.records;
|
|
|
+ tableData.total = res.totalRow;
|
|
|
});
|
|
|
-};
|
|
|
-const handleRestParams = () => {
|
|
|
+ };
|
|
|
+ const handleRestParams = () => {
|
|
|
Object.assign(queryParams, {
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 10,
|
|
|
- queryParam: {
|
|
|
- ...queryParams.queryParam,
|
|
|
- status: '',
|
|
|
- nameFunction: '',
|
|
|
- safetyResponsibleDepartmentId: [],
|
|
|
- safetySpecificPerson: '',
|
|
|
- },
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ queryParam: {
|
|
|
+ ...queryParams.queryParam,
|
|
|
+ status: '',
|
|
|
+ nameFunction: '',
|
|
|
+ safetyResponsibleDepartmentId: [],
|
|
|
+ safetySpecificPerson: '',
|
|
|
+ },
|
|
|
});
|
|
|
queryTableList();
|
|
|
-};
|
|
|
+ };
|
|
|
|
|
|
-onMounted(async () => {
|
|
|
+ onMounted(async () => {
|
|
|
await getDeptData();
|
|
|
await handleQueryAvailableUserList();
|
|
|
queryTableList();
|
|
|
-});
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-@use '@/styles/page-details-layout.scss' as *;
|
|
|
-@use '@/styles/page-main-layout.scss' as *;
|
|
|
-@use '@/styles/basic-table-action.scss' as *;
|
|
|
+ @use '@/styles/page-details-layout.scss' as *;
|
|
|
+ @use '@/styles/page-main-layout.scss' as *;
|
|
|
+ @use '@/styles/basic-table-action.scss' as *;
|
|
|
|
|
|
-:deep(.el-tabs__header) {
|
|
|
+ :deep(.el-tabs__header) {
|
|
|
margin: 0;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-:deep(.el-tabs__item) {
|
|
|
+ :deep(.el-tabs__item) {
|
|
|
font-size: 14px !important;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-:deep(.flexContent) {
|
|
|
+ :deep(.flexContent) {
|
|
|
display: flex;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-:deep(.breadcrumb .title) {
|
|
|
+ :deep(.breadcrumb .title) {
|
|
|
margin-left: 0;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-:deep(.el-form) {
|
|
|
+ :deep(.el-form) {
|
|
|
flex: 1;
|
|
|
display: flex;
|
|
|
row-gap: 15px;
|
|
|
flex-wrap: wrap;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-:deep(.el-form-item) {
|
|
|
+ :deep(.el-form-item) {
|
|
|
margin-bottom: 0;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-:deep(main) {
|
|
|
+ :deep(main) {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-.search-form {
|
|
|
+ .search-form {
|
|
|
min-width: 800px;
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
margin-bottom: 20px;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-.button-content {
|
|
|
+ .button-content {
|
|
|
margin-bottom: 20px;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-.table-content {
|
|
|
+ .table-content {
|
|
|
flex: 1;
|
|
|
overflow: hidden;
|
|
|
overflow-y: auto;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-.page-content {
|
|
|
+ .page-content {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-.pagination-container {
|
|
|
+ .pagination-container {
|
|
|
margin-top: 20px;
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
-}
|
|
|
+ }
|
|
|
</style>
|