安全会议纪要,站班会,安全巡检工单
This commit is contained in:
@ -39,9 +39,11 @@
|
|||||||
"image-conversion": "2.1.1",
|
"image-conversion": "2.1.1",
|
||||||
"js-cookie": "3.0.5",
|
"js-cookie": "3.0.5",
|
||||||
"jsencrypt": "3.3.2",
|
"jsencrypt": "3.3.2",
|
||||||
|
"mitt": "^3.0.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.2.6",
|
"pinia": "2.2.6",
|
||||||
"screenfull": "6.0.2",
|
"screenfull": "6.0.2",
|
||||||
|
"spark-md5": "^3.0.2",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vue-cropper": "1.1.1",
|
"vue-cropper": "1.1.1",
|
||||||
"vue-i18n": "10.0.5",
|
"vue-i18n": "10.0.5",
|
||||||
|
@ -9,7 +9,6 @@ import useSettingsStore from '@/store/modules/settings';
|
|||||||
import { handleThemeStyle } from '@/utils/theme';
|
import { handleThemeStyle } from '@/utils/theme';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
import { getProjectTeam } from './utils/projectTeam';
|
import { getProjectTeam } from './utils/projectTeam';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
87
src/api/safety/documentSafetyMeeting/index.ts
Normal file
87
src/api/safety/documentSafetyMeeting/index.ts
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import {
|
||||||
|
documentSafetyMeetingListFile,
|
||||||
|
documentSafetyMeetingListFolder,
|
||||||
|
documentSafetyMeetingListQuery,
|
||||||
|
documentSafetyMeetingListVo,
|
||||||
|
documentRecycleBinListQuery,
|
||||||
|
documentRecycleBinListVO
|
||||||
|
} from './type';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
// 查询安全会议结构
|
||||||
|
export function documentCompletionTreeStructure(query: object) {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 查询安全会议文件列表
|
||||||
|
export function documentCompletionList(query: documentSafetyMeetingListQuery): AxiosPromise<documentSafetyMeetingListVo> {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 安全会议添加
|
||||||
|
export function documentCompletionAdd(data: documentSafetyMeetingListFile) {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/file',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 安全会议修改文件名
|
||||||
|
export function documentCompletionEdit(query: object) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/system/documentSafetyMeeting/edit',
|
||||||
|
method: 'put',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 安全会议删除文件
|
||||||
|
export function documentCompletionDelete(id: string) {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 安全会议获取指定id信息
|
||||||
|
export function documentCompletionGet(id: string) {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 新建文件夹
|
||||||
|
export function newFolder(data: documentSafetyMeetingListFolder): AxiosPromise<any> {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/folder',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 单文件下载
|
||||||
|
export function uniFileDownload(query: object) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/system/documentSafetyMeeting/safetyDataUniFileDownload',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 回收站恢复
|
||||||
|
export function completionDataRecyclingStation(id: string[]) {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/recovery/' + id,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 回收站列表数据
|
||||||
|
export function documentRecycleBinList(query: documentRecycleBinListQuery): AxiosPromise<documentRecycleBinListVO> {
|
||||||
|
return request({
|
||||||
|
url: '/safety/documentSafetyMeeting/recycleBin/list',
|
||||||
|
method: 'get',
|
||||||
|
params: { ...query, fileType: '2' }
|
||||||
|
});
|
||||||
|
}
|
61
src/api/safety/documentSafetyMeeting/type.ts
Normal file
61
src/api/safety/documentSafetyMeeting/type.ts
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
export interface documentSafetyMeetingListFolder {
|
||||||
|
//新增文件夹
|
||||||
|
projectId: string;
|
||||||
|
pid?: string;
|
||||||
|
fileName: string;
|
||||||
|
remark?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface documentSafetyMeetingListFile {
|
||||||
|
//新增文件
|
||||||
|
file: any;
|
||||||
|
req?: reqQuery;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface reqQuery {
|
||||||
|
projectId: string;
|
||||||
|
pid?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface documentSafetyMeetingListQuery {
|
||||||
|
projectId: string;
|
||||||
|
pid?: string;
|
||||||
|
//1文件 2文件夹 3图片
|
||||||
|
fileType?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface documentSafetyMeetingListVo {
|
||||||
|
projectId: string;
|
||||||
|
id: string;
|
||||||
|
pid: string;
|
||||||
|
fileName: string;
|
||||||
|
fileStatus?: string;
|
||||||
|
filePath: string;
|
||||||
|
fileSuffix: string;
|
||||||
|
originalName: string;
|
||||||
|
remark?: string;
|
||||||
|
//1文件 2文件夹 3图片
|
||||||
|
fileType?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface documentRecycleBinListQuery {
|
||||||
|
projectId: string;
|
||||||
|
pid?: string;
|
||||||
|
fileType?: string;
|
||||||
|
pageSize?: number;
|
||||||
|
pageNum?: number;
|
||||||
|
orderByColumn?: string;
|
||||||
|
isAsc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface documentRecycleBinListVO {
|
||||||
|
id: string;
|
||||||
|
projectId: string;
|
||||||
|
pid?: string;
|
||||||
|
fileName?: string;
|
||||||
|
filePath?: number;
|
||||||
|
fileSuffix?: number;
|
||||||
|
fileStatus?: string;
|
||||||
|
originalName?: string;
|
||||||
|
remark?: string;
|
||||||
|
}
|
@ -102,6 +102,7 @@ export interface SafetyLogForm extends BaseEntity {
|
|||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
id?: string | number;
|
id?: string | number;
|
||||||
|
creatorName?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目id
|
* 项目id
|
||||||
@ -189,6 +190,7 @@ export interface SafetyLogQuery extends PageQuery {
|
|||||||
* 项目id
|
* 项目id
|
||||||
*/
|
*/
|
||||||
projectId?: string | number;
|
projectId?: string | number;
|
||||||
|
creatorName?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发生日期
|
* 发生日期
|
||||||
|
@ -14,12 +14,12 @@ export interface TeamMeetingVO {
|
|||||||
/**
|
/**
|
||||||
* 班组
|
* 班组
|
||||||
*/
|
*/
|
||||||
team: IdAndNameVO;
|
teamName: IdAndNameVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包公司
|
* 分包公司
|
||||||
*/
|
*/
|
||||||
contractor: IdAndNameVO;
|
contractorName: IdAndNameVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开会时间
|
* 开会时间
|
||||||
@ -29,7 +29,7 @@ export interface TeamMeetingVO {
|
|||||||
/**
|
/**
|
||||||
* 宣讲人
|
* 宣讲人
|
||||||
*/
|
*/
|
||||||
compere: IdAndNameVO;
|
compereName: IdAndNameVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参与人列表
|
* 参与人列表
|
||||||
|
BIN
src/assets/icons/svg/file.png
Normal file
BIN
src/assets/icons/svg/file.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
src/assets/icons/svg/file1.png
Normal file
BIN
src/assets/icons/svg/file1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -25,6 +25,9 @@ import HighLight from '@highlightjs/vue-plugin';
|
|||||||
import 'virtual:svg-icons-register';
|
import 'virtual:svg-icons-register';
|
||||||
import ElementIcons from '@/plugins/svgicon';
|
import ElementIcons from '@/plugins/svgicon';
|
||||||
|
|
||||||
|
//通信
|
||||||
|
import mitt from 'mitt';
|
||||||
|
|
||||||
// permission control
|
// permission control
|
||||||
import './permission';
|
import './permission';
|
||||||
|
|
||||||
@ -55,3 +58,5 @@ app.use(plugins);
|
|||||||
directive(app);
|
directive(app);
|
||||||
|
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
|
|
||||||
|
app.config.globalProperties.mittBus = mitt();
|
||||||
|
12
src/store/modules/bigUpload.ts
Normal file
12
src/store/modules/bigUpload.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
|
export const bigUpload = defineStore('bigUpload', {
|
||||||
|
state: (): { panelShow: boolean } => ({
|
||||||
|
panelShow: false
|
||||||
|
}),
|
||||||
|
actions: {
|
||||||
|
async setPanelShow(bool: boolean) {
|
||||||
|
this.panelShow = bool;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,135 @@
|
|||||||
|
<template>
|
||||||
|
<div class="system-document-container">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<div class="system-document-search mb15">
|
||||||
|
<el-form :model="param" ref="queryRef" :inline="true" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-button type="success" v-hasPermi="['project:project:remove']" :disabled="multiple" @click="onRecyclingStation(null)"
|
||||||
|
><el-icon><RefreshRight /></el-icon>批量恢复</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="序号" align="center" type="index" min-width="30px" />
|
||||||
|
<el-table-column label="文件名称" align="center" prop="fileName" min-width="100px" />
|
||||||
|
<el-table-column label="文件类型" align="center" prop="fileType" min-width="100px">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.fileType == '1' ? '文件' : '文件夹' }}</span>
|
||||||
|
</template> </el-table-column
|
||||||
|
><el-table-column label="文件路径" align="center" min-width="100px">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.filePath }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="删除时间" align="center" prop="deletedAt" min-width="100px"> </el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding" min-width="100px" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="success" v-hasPermi="['project:project:remove']" link @click="onRecyclingStation(scope.row)"
|
||||||
|
><el-icon><RefreshRight /></el-icon>恢复</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- <pagination v-show="total > 0" :total="total" v-model:page="param.pageNum" v-model:limit="param.pageSize" @pagination="getDocumentDataList" /> -->
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
import { toRefs, reactive, ref, defineComponent, getCurrentInstance } from 'vue';
|
||||||
|
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
import { documentRecycleBinList, completionDataRecyclingStation } from '@/api/safety/documentSafetyMeeting';
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'index',
|
||||||
|
setup() {
|
||||||
|
const { proxy } = <any>getCurrentInstance();
|
||||||
|
const loading = ref(false);
|
||||||
|
const queryRef = ref();
|
||||||
|
// 非多个禁用
|
||||||
|
const multiple = ref(true);
|
||||||
|
const state = reactive({
|
||||||
|
tableData: [],
|
||||||
|
param: {
|
||||||
|
type: 2,
|
||||||
|
projectId: currentProject.value.id
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
ids: [] //所选择的文件
|
||||||
|
});
|
||||||
|
// 获取资料删除的列表数据
|
||||||
|
const getDocumentDataList = () => {
|
||||||
|
loading.value = true;
|
||||||
|
documentRecycleBinList(state.param).then((res: any) => {
|
||||||
|
let list = res.rows ?? [];
|
||||||
|
state.tableData = list;
|
||||||
|
console.log('🚀 ~ documentRecycleBinList ~ state.tableData:', state.tableData);
|
||||||
|
|
||||||
|
state.total = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 多选框选中数据
|
||||||
|
const handleSelectionChange = (selection) => {
|
||||||
|
state.ids = selection.map((item) => item.id);
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
const onRecyclingStation = (row) => {
|
||||||
|
let ids = [];
|
||||||
|
if (row) {
|
||||||
|
ids = [row.id];
|
||||||
|
} else {
|
||||||
|
// 批量
|
||||||
|
ids = state.ids;
|
||||||
|
}
|
||||||
|
ElMessageBox.confirm('你确定要恢复所选文件或文件夹?', '提示', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '正在恢复中……',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
|
completionDataRecyclingStation(ids).then((res) => {
|
||||||
|
loading.close();
|
||||||
|
if (res.code == 200) {
|
||||||
|
getDocumentDataList();
|
||||||
|
ElMessage.success('操作成功');
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
proxy,
|
||||||
|
multiple,
|
||||||
|
loading,
|
||||||
|
onRecyclingStation,
|
||||||
|
handleSelectionChange,
|
||||||
|
getDocumentDataList,
|
||||||
|
...toRefs(state)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.colBlock {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.colNone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
524
src/views/safety/documentSafetyMeeting/index.vue
Normal file
524
src/views/safety/documentSafetyMeeting/index.vue
Normal file
@ -0,0 +1,524 @@
|
|||||||
|
<template>
|
||||||
|
<div class="documentCompletion-data">
|
||||||
|
<el-tabs v-model="activeName" class="p-4" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="文件夹" name="first">
|
||||||
|
<el-button type="success" :disabled="toolStart" @click="handleFile(3)"
|
||||||
|
><el-icon><Plus /></el-icon>新建文件夹</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" :disabled="toolStart" @click="handleFile(2)"
|
||||||
|
><el-icon><Upload /></el-icon>上传文件</el-button
|
||||||
|
>
|
||||||
|
<el-card style="margin-top: 10px">
|
||||||
|
<div class="breadcrumb-img">
|
||||||
|
<el-breadcrumb>
|
||||||
|
<el-breadcrumb-item @click="onBreadcrumb(item)" v-for="(item, i) of breadcrumbList" :key="i">
|
||||||
|
<span title="点击打开文件夹" style="cursor: pointer">{{ item.fileName }}</span>
|
||||||
|
</el-breadcrumb-item>
|
||||||
|
</el-breadcrumb>
|
||||||
|
<div class="tool-All">
|
||||||
|
<div v-if="!toolStart">
|
||||||
|
<el-button type="primary" v-hasPermi="['project:project:remove']" @click="onBatchAll">
|
||||||
|
<el-icon><Menu /></el-icon>批量操作</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div v-if="toolStart">
|
||||||
|
<el-button type="warning" @click="onBatchAll">
|
||||||
|
<el-icon><Tools /></el-icon>取消操作</el-button
|
||||||
|
>
|
||||||
|
<el-button type="danger" @click="onDeleteAll">
|
||||||
|
<el-icon><Delete /></el-icon>删除</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="margin-top: 10px">
|
||||||
|
<div class="file_detail" id="file_detail1">
|
||||||
|
<el-row class="row-bg" v-if="fileList.length">
|
||||||
|
<el-col :span="2" v-for="(item, i) of fileList" :key="i">
|
||||||
|
<div :class="{ file_style: true }">
|
||||||
|
<div @click="onNav(item)" title="点击打开文件" @contextmenu="onContextmenu($event, item, i)">
|
||||||
|
<img src="../../../assets/icons/svg/file1.png" v-if="item.fileType == '2'" alt="" />
|
||||||
|
<img src="../../../assets/icons/svg/file.png" v-else-if="item.fileType == '1'" alt="" />
|
||||||
|
<el-image
|
||||||
|
v-else-if="item.fileType == '3'"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
:src="item.filePath"
|
||||||
|
:zoom-rate="1.2"
|
||||||
|
:max-scale="7"
|
||||||
|
:min-scale="0.2"
|
||||||
|
:initial-index="4"
|
||||||
|
:preview-src-list="[item.filenPathCoding]"
|
||||||
|
fit="cover"
|
||||||
|
/>
|
||||||
|
<img :src="'/icon/' + item.fileType + '.png'" v-else />
|
||||||
|
</div>
|
||||||
|
<span @click="onFileName(item)" title="点击重命名">{{ item.fileName }}</span>
|
||||||
|
<div :class="{ fileActive: toolStart }" v-if="toolStart" @click="onToolAll(item)"></div>
|
||||||
|
<div class="checkbox-box" v-if="toolStart">
|
||||||
|
<el-checkbox v-model="item.checkbox" size="large" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-empty :image-size="200" description="暂无文件" v-else />
|
||||||
|
<div class="right_box" id="right_box">
|
||||||
|
<div v-for="(item, i) of list" :key="i" @click="item.callback($event)">
|
||||||
|
{{ item.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="回收站" name="second">
|
||||||
|
<RecyclingStation ref="RecyclingStationRef"></RecyclingStation>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
import { toRefs, reactive, onMounted, ref, defineComponent, computed, getCurrentInstance, toRaw, nextTick, onBeforeUnmount } from 'vue';
|
||||||
|
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||||
|
import {
|
||||||
|
documentCompletionTreeStructure,
|
||||||
|
documentCompletionDelete,
|
||||||
|
documentCompletionAdd,
|
||||||
|
documentCompletionEdit,
|
||||||
|
newFolder,
|
||||||
|
uniFileDownload
|
||||||
|
} from '@/api/safety/documentSafetyMeeting/index';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
// 回收站
|
||||||
|
import RecyclingStation from '@/views/safety/documentSafetyMeeting/RecyclingStation/index.vue';
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'index',
|
||||||
|
components: {
|
||||||
|
RecyclingStation
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
const { proxy } = <any>getCurrentInstance();
|
||||||
|
const RecyclingStationRef = ref();
|
||||||
|
// 字典选项数据
|
||||||
|
const {} = proxy.useDict();
|
||||||
|
// 文件下载
|
||||||
|
const onExport = (event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
// 文件下载 state.typeFile: 2、文件夹 1、文件
|
||||||
|
if (state.typeFile == '2') {
|
||||||
|
window.open(state.relativePath, '_black');
|
||||||
|
} else {
|
||||||
|
uniFileDownload({ relativePath: state.relativePath, type: state.typeFile }).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
window.open(res.data.Path, '_black');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 文件删除
|
||||||
|
const onDeleteFile = (event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
setDel([state.delId]);
|
||||||
|
};
|
||||||
|
const state = reactive({
|
||||||
|
fileList: [],
|
||||||
|
activeName: 'first',
|
||||||
|
breadcrumbList: [{ id: 0, fileName: '目录' }], //菜单列表
|
||||||
|
projectId: currentProject.value.id,
|
||||||
|
parentPid: '0', //父级的id 默认为0
|
||||||
|
fileType: 0, //文件 或压缩文件
|
||||||
|
list: [
|
||||||
|
{ id: 1, name: '文件下载', callback: onExport, auth: 'api/v1/system/documentSafetyMeeting/safetyDataUniFileDownload' },
|
||||||
|
{ id: 2, name: '文件删除', callback: onDeleteFile, auth: 'api/v1/system/documentSafetyMeeting/delete' }
|
||||||
|
],
|
||||||
|
relativePath: '', //文件下载需要相对路径
|
||||||
|
delId: '', //删除需要的id
|
||||||
|
toolStart: false,
|
||||||
|
imageType: ['jpg', 'png', 'jpeg'],
|
||||||
|
wordType: ['docx', 'doc', 'pdf', 'xls', 'xlsx', 'pptx', 'ppt'],
|
||||||
|
typeFile: ''
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
// 全局设置阻止右键点击
|
||||||
|
document.addEventListener('contextmenu', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
let file_detail_box = document.getElementById('file_detail1');
|
||||||
|
// 监听当前元素点击事件 并关闭弹框
|
||||||
|
file_detail_box.addEventListener('click', () => {
|
||||||
|
let box = document.getElementById('right_box');
|
||||||
|
box.style.display = 'none';
|
||||||
|
});
|
||||||
|
// 默认第一级 父级pid为0
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
// 压缩文件上传
|
||||||
|
|
||||||
|
proxy.mittBus.on('bigUploader.uploadFileSuccess' + 1010, (res: any) => {
|
||||||
|
const { filename, totalSize, url, identifier, fileType } = res;
|
||||||
|
let arr = filename.split('.');
|
||||||
|
let fileType1 = arr[arr.length - 1];
|
||||||
|
if (fileType1 == 'zip' || fileType1 == 'rar') {
|
||||||
|
state.fileType = 1;
|
||||||
|
} else {
|
||||||
|
//除了压缩 其他文件
|
||||||
|
state.fileType = 2;
|
||||||
|
}
|
||||||
|
let obj = {
|
||||||
|
filePath: {
|
||||||
|
url,
|
||||||
|
name: filename,
|
||||||
|
size: totalSize,
|
||||||
|
fileType: '.' + fileType1 //后缀名
|
||||||
|
},
|
||||||
|
file: ''
|
||||||
|
};
|
||||||
|
documentCompletionAdd(obj).then((res: any) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '上传成功'
|
||||||
|
});
|
||||||
|
getdocumentCompletionTreeStructure(); //获取当前当前文件夹的文件数据
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
type: 'error',
|
||||||
|
message: res.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
// 取消订阅特定事件
|
||||||
|
proxy.mittBus.off('bigUploader.uploadFileSuccess' + 1010);
|
||||||
|
});
|
||||||
|
const getdocumentCompletionTreeStructure = () => {
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '正在查询文件……',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
|
documentCompletionTreeStructure({ projectId: currentProject.value.id, pid: state.parentPid }).then((res: any) => {
|
||||||
|
loading.close();
|
||||||
|
if (res.code == 200) {
|
||||||
|
state.fileList = res.data || [];
|
||||||
|
if (state.fileList.length) {
|
||||||
|
state.fileList.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
checkbox: false
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleFile = (type) => {
|
||||||
|
state.fileType = type;
|
||||||
|
if (type == 3) {
|
||||||
|
// 新建文件夹
|
||||||
|
ElMessageBox.prompt('填写文件夹名', '新建文件夹', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消'
|
||||||
|
})
|
||||||
|
.then(({ value }) => {
|
||||||
|
// pid 父级
|
||||||
|
newFolder({ fileName: value, pid: state.parentPid == '0' ? '' : state.parentPid, projectId: state.projectId }).then((res: any) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '添加成功'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
type: 'error',
|
||||||
|
message: res.data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
// 竣工图
|
||||||
|
proxy.mittBus.emit('bigUploader.uploadFile', { type: 100, types: 1010, accept: [] });
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
// 页面跳转
|
||||||
|
const onNav = (item) => {
|
||||||
|
// 通过后缀判断该文件是什么类型
|
||||||
|
// 图片格式 jpg、png、jpeg、
|
||||||
|
// word文档格式:docx、doc、pdf、xls、xlsx、pptx、ppt
|
||||||
|
// 其他全文件夹
|
||||||
|
if (item.fileType == '3') {
|
||||||
|
// 可以预览图片
|
||||||
|
return;
|
||||||
|
} else if (item.fileType == '2') {
|
||||||
|
// 打开文件夹
|
||||||
|
state.parentPid = item.id;
|
||||||
|
state.breadcrumbList.push(item); //路径设置
|
||||||
|
state.fileList = [];
|
||||||
|
// 获取对应文件夹的数据
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
} else {
|
||||||
|
window.open(item.filenPathCoding, '_black');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const onFileName = (item) => {
|
||||||
|
// 修改文件名称
|
||||||
|
ElMessageBox.prompt('文件名称修改', '重命名', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputValue: item.name
|
||||||
|
})
|
||||||
|
.then(({ value }) => {
|
||||||
|
// 确定
|
||||||
|
documentCompletionEdit({ id: item.id, name: value, type: item.type }).then((res: any) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
item.name = value;
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '修改成功'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
type: 'error',
|
||||||
|
message: res.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
};
|
||||||
|
const handleClick = (val) => {
|
||||||
|
if (state.activeName == 'second') {
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
} else {
|
||||||
|
RecyclingStationRef.value.getDocumentDataList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const onBreadcrumb = (item) => {
|
||||||
|
if (item.fileName == '目录') {
|
||||||
|
state.parentPid = '0';
|
||||||
|
state.breadcrumbList = [{ id: 0, fileName: '目录' }]; //菜单列表
|
||||||
|
// 最初目录
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
} else {
|
||||||
|
let arr = [];
|
||||||
|
let array = state.breadcrumbList;
|
||||||
|
for (let index = 0; index < array.length; index++) {
|
||||||
|
arr.push(array[index]);
|
||||||
|
if (array[index].fileName == item.fileName) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state.breadcrumbList = arr;
|
||||||
|
// 通过 当前点击的文件进行获取数据
|
||||||
|
// 重复点击不用再次获取
|
||||||
|
if (item.id == state.parentPid) return;
|
||||||
|
state.parentPid = item.id;
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 批量操作数据
|
||||||
|
const onBatchAll = () => {
|
||||||
|
state.toolStart = !state.toolStart;
|
||||||
|
};
|
||||||
|
const setDel = (ids) => {
|
||||||
|
let msg = '你确定要删除所选数据?';
|
||||||
|
if (ids.length === 0) {
|
||||||
|
ElMessage.error('请选择要删除的数据。');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ElMessageBox.confirm(msg, '温馨提示', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log(ids);
|
||||||
|
|
||||||
|
documentCompletionDelete(ids).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
let box = document.getElementById('right_box');
|
||||||
|
box.style.display = 'none'; //显示div盒子
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
getdocumentCompletionTreeStructure();
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
};
|
||||||
|
// 批量删除
|
||||||
|
const onDeleteAll = () => {
|
||||||
|
//获取所有已经选中的数据
|
||||||
|
let selectList = [];
|
||||||
|
if (state.fileList.length) {
|
||||||
|
state.fileList.map((item) => {
|
||||||
|
if (item.checkbox) {
|
||||||
|
selectList.push(item.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!selectList.length) {
|
||||||
|
ElMessage.warning('请选择需要删除的文件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setDel(selectList);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 批量选择
|
||||||
|
const onToolAll = (row) => {
|
||||||
|
row.checkbox = !row.checkbox;
|
||||||
|
};
|
||||||
|
const onContextmenu = (event, item, i) => {
|
||||||
|
state.typeFile = item.fileType;
|
||||||
|
state.relativePath = item.filenPath;
|
||||||
|
state.delId = item.id;
|
||||||
|
let len = (100 / 12) * (i % 12) + 4 + '%';
|
||||||
|
let box = document.getElementById('right_box');
|
||||||
|
box.style.top = event.clientY - 250 + 'px'; //鼠标点击时给div定位Y轴
|
||||||
|
box.style.left = len; //鼠标点击时给div定位X轴
|
||||||
|
box.style.display = 'block'; //显示div盒子
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
proxy,
|
||||||
|
handleFile,
|
||||||
|
onFileName,
|
||||||
|
onNav,
|
||||||
|
handleClick,
|
||||||
|
RecyclingStationRef,
|
||||||
|
onBreadcrumb,
|
||||||
|
onBatchAll,
|
||||||
|
onDeleteAll,
|
||||||
|
onExport,
|
||||||
|
onDeleteFile,
|
||||||
|
onToolAll,
|
||||||
|
onContextmenu,
|
||||||
|
...toRefs(state)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.documentCompletion-data {
|
||||||
|
.el-card__body {
|
||||||
|
padding: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-img {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 10px;
|
||||||
|
.tool-All {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.batch {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_detail {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 66vh;
|
||||||
|
overflow: auto;
|
||||||
|
.right_box {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 999;
|
||||||
|
background-color: rgb(0 0 0 / 56%);
|
||||||
|
width: 120px;
|
||||||
|
height: 100px;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 14px 4px;
|
||||||
|
> div {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
padding: 8px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: revert;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
> div:hover {
|
||||||
|
background-color: rgb(0 0 0 / 80%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_style {
|
||||||
|
// height: 100px;
|
||||||
|
width: 90px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
animation: 0.5s ease;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
> div {
|
||||||
|
width: 100%;
|
||||||
|
// height: 70%;
|
||||||
|
height: 80px;
|
||||||
|
> img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.checkbox-box {
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
left: 60px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
> span {
|
||||||
|
font-size: 12px;
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// justify-content: center;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.file_style:hover {
|
||||||
|
background-color: rgba(189, 189, 189, 0.322);
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.fileActive {
|
||||||
|
display: block;
|
||||||
|
top: 0;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 999;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100% !important;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: rgba(189, 189, 189, 0.322);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.colBlock {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.colNone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
@ -14,7 +14,7 @@
|
|||||||
<dict-tag :options="safety_inspection_violation_type" :value="safetyInspectionDetail?.violationType" />
|
<dict-tag :options="safety_inspection_violation_type" :value="safetyInspectionDetail?.violationType" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="检查时间">{{ safetyInspectionDetail?.checkTime }} </el-descriptions-item>
|
<el-descriptions-item label-align="center" label="检查时间">{{ safetyInspectionDetail?.checkTime }} </el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="检查人">{{ safetyInspectionDetail?.creatorName }} </el-descriptions-item>
|
<el-descriptions-item label-align="center" label="检查人">{{ safetyInspectionDetail?.correctorName }} </el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="整改人">{{ safetyInspectionDetail?.correctorName }} </el-descriptions-item>
|
<el-descriptions-item label-align="center" label="整改人">{{ safetyInspectionDetail?.correctorName }} </el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="要求整改期限">
|
<el-descriptions-item label-align="center" label="要求整改期限">
|
||||||
{{ dayjs(safetyInspectionDetail?.rectificationDeadline).format('YYYY 年 MM 月 DD 日') }}
|
{{ dayjs(safetyInspectionDetail?.rectificationDeadline).format('YYYY 年 MM 月 DD 日') }}
|
||||||
@ -104,6 +104,7 @@ const get = async () => {
|
|||||||
const res = await getSafetyInspection(props.safetyInspectionId);
|
const res = await getSafetyInspection(props.safetyInspectionId);
|
||||||
if (res.data && res.code === 200) {
|
if (res.data && res.code === 200) {
|
||||||
safetyInspectionDetail.value = res.data;
|
safetyInspectionDetail.value = res.data;
|
||||||
|
|
||||||
if (res.data.checkFile) {
|
if (res.data.checkFile) {
|
||||||
const checkFileRes = await listByIds(res.data.checkFile.split(','));
|
const checkFileRes = await listByIds(res.data.checkFile.split(','));
|
||||||
checkFileList.value = checkFileRes.data;
|
checkFileList.value = checkFileRes.data;
|
||||||
@ -117,6 +118,7 @@ const get = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
console.log('🚀 ~ onMounted ~ props.safetyInspectionId:', props.safetyInspectionId);
|
||||||
get();
|
get();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="检查类型" prop="checkType">
|
<el-form-item label="检查类型" prop="checkType">
|
||||||
<el-select v-model="queryParams.checkType" placeholder="请选择检查类型" clearable>
|
<el-select v-model="queryParams.checkType" placeholder="全部" clearable>
|
||||||
<el-option v-for="dict in safety_inspection_check_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in safety_inspection_check_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="违章类型" prop="violationType">
|
<el-form-item label="违章类型" prop="violationType">
|
||||||
<el-select v-model="queryParams.violationType" placeholder="请选择违章类型" clearable>
|
<el-select v-model="queryParams.violationType" placeholder="全部" clearable>
|
||||||
<el-option v-for="dict in safety_inspection_violation_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in safety_inspection_violation_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理状态" prop="status">
|
<el-form-item label="处理状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择工单状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="全部" clearable>
|
||||||
<el-option v-for="dict in safety_inspection_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in safety_inspection_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['safety:safetyInspection:remove']">
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['safety:safetyInspection:remove']">
|
||||||
批量删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -54,10 +54,10 @@
|
|||||||
<dict-tag :options="safety_inspection_type" :value="scope.row.status" />
|
<dict-tag :options="safety_inspection_type" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查人" align="center" prop="creator.name" />
|
<el-table-column label="检查人" align="center" prop="correctorName" />
|
||||||
<el-table-column label="检查时间" align="center" prop="checkTime" width="180">
|
<el-table-column label="检查时间" align="center" prop="rectificationDeadline" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.rectificationDeadline, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查类型" align="center" prop="checkType">
|
<el-table-column label="检查类型" align="center" prop="checkType">
|
||||||
@ -84,9 +84,7 @@
|
|||||||
<el-button link type="primary" icon="View" @click="handleShowDialog(scope.row)" v-hasPermi="['safety:safetyInspection:query']">
|
<el-button link type="primary" icon="View" @click="handleShowDialog(scope.row)" v-hasPermi="['safety:safetyInspection:query']">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['safety:safetyInspection:edit']">
|
<!-- <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['safety:safetyInspection:edit']">修改 </el-button> -->
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['safety:safetyInspection:remove']">
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['safety:safetyInspection:remove']">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -287,6 +285,7 @@ const currentSafetyInspectionId = ref<string | number>();
|
|||||||
const showDetailDialog = ref<boolean>(false);
|
const showDetailDialog = ref<boolean>(false);
|
||||||
const handleShowDialog = (row?: SafetyInspectionVO) => {
|
const handleShowDialog = (row?: SafetyInspectionVO) => {
|
||||||
currentSafetyInspectionId.value = row.id;
|
currentSafetyInspectionId.value = row.id;
|
||||||
|
|
||||||
showDetailDialog.value = true;
|
showDetailDialog.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
<el-form-item label="发生日期" prop="dateOfOccurrence">
|
<el-form-item label="发生日期" prop="dateOfOccurrence">
|
||||||
<el-date-picker clearable v-model="queryParams.dateOfOccurrence" type="date" value-format="YYYY-MM-DD" placeholder="请选择发生日期" />
|
<el-date-picker clearable v-model="queryParams.dateOfOccurrence" type="date" value-format="YYYY-MM-DD" placeholder="请选择发生日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="录入人" prop="creatorName">
|
||||||
|
<el-input clearable v-model="queryParams.creatorName" placeholder="请输入录入人" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
@ -48,7 +51,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="录入时间" align="center" prop="createTime" />
|
<el-table-column label="录入时间" align="center" prop="createTime" />
|
||||||
<el-table-column label="录入人" align="center" prop="creator.name" />
|
<el-table-column label="录入人" align="center" prop="creatorName" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -56,7 +59,7 @@
|
|||||||
<el-button link type="primary" icon="View" @click="handleShowDialog(scope.row)" v-hasPermi="['safety:safetyLog:query']">
|
<el-button link type="primary" icon="View" @click="handleShowDialog(scope.row)" v-hasPermi="['safety:safetyLog:query']">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['safety:safetyLog:edit']"> 修改 </el-button>
|
<!-- <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['safety:safetyLog:edit']"> 修改 </el-button> -->
|
||||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['safety:safetyLog:remove']"> 删除 </el-button>
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['safety:safetyLog:remove']"> 删除 </el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
@ -176,6 +179,7 @@ const initFormData: SafetyLogForm = {
|
|||||||
stoppageOrOvertime: undefined,
|
stoppageOrOvertime: undefined,
|
||||||
otherCondition: undefined,
|
otherCondition: undefined,
|
||||||
fileId: undefined,
|
fileId: undefined,
|
||||||
|
creatorName: undefined,
|
||||||
remark: undefined
|
remark: undefined
|
||||||
};
|
};
|
||||||
const data = reactive<PageData<SafetyLogForm, SafetyLogQuery>>({
|
const data = reactive<PageData<SafetyLogForm, SafetyLogQuery>>({
|
||||||
@ -198,6 +202,7 @@ const data = reactive<PageData<SafetyLogForm, SafetyLogQuery>>({
|
|||||||
stoppageOrOvertime: undefined,
|
stoppageOrOvertime: undefined,
|
||||||
otherCondition: undefined,
|
otherCondition: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
creatorName: undefined,
|
||||||
params: {}
|
params: {}
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-descriptions v-loading="loading" :column="2">
|
<el-descriptions v-loading="loading" :column="2">
|
||||||
<el-descriptions-item :span="2" label="宣讲人">{{ teamMeetingDetail?.compere?.name }}</el-descriptions-item>
|
<el-descriptions-item :span="2" label="宣讲人">{{ teamMeetingDetail?.compereName }}</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2" label="参与人">
|
<el-descriptions-item :span="2" label="参与人">
|
||||||
<span :key="item.id" v-for="item in teamMeetingDetail?.participantList">{{ item.name }},</span>
|
<span :key="item.id" v-for="item in teamMeetingDetail?.participantList">{{ item.name }},</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="班组名称">{{ teamMeetingDetail?.team.name }}</el-descriptions-item>
|
<el-descriptions-item label="班组名称">{{ teamMeetingDetail?.teamName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="施工单位">{{ teamMeetingDetail?.contractor.name }}</el-descriptions-item>
|
<el-descriptions-item label="施工单位">{{ teamMeetingDetail?.contractorName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="开会时间">{{ dayjs(teamMeetingDetail?.meetingDate).format('YYYY 年 MM 月 DD 日') }}</el-descriptions-item>
|
<el-descriptions-item label="开会时间">{{ dayjs(teamMeetingDetail?.meetingDate).format('YYYY 年 MM 月 DD 日') }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="上传时间">{{ teamMeetingDetail?.createTime }}</el-descriptions-item>
|
<el-descriptions-item label="上传时间">{{ teamMeetingDetail?.createTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2" label="班会内容">{{ teamMeetingDetail?.content }}</el-descriptions-item>
|
<el-descriptions-item :span="2" label="班会内容">{{ teamMeetingDetail?.content }}</el-descriptions-item>
|
||||||
|
@ -19,17 +19,17 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['safety:teamMeeting:add']"> 新增 </el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['safety:teamMeeting:add']"> 新增 </el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['safety:teamMeeting:remove']">
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['safety:teamMeeting:remove']">
|
||||||
批量删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['safety:teamMeeting:export']">导出 </el-button>
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['safety:teamMeeting:export']">导出 </el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@ -37,9 +37,9 @@
|
|||||||
<el-table v-loading="loading" :data="teamMeetingList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="teamMeetingList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||||
<el-table-column label="宣讲人" align="center" prop="compere.name" />
|
<el-table-column label="宣讲人" align="center" prop="compereName" />
|
||||||
<el-table-column label="施工单位" align="center" prop="contractor.name" />
|
<el-table-column label="施工单位" align="center" prop="contractorName" />
|
||||||
<el-table-column label="班组名称" align="center" prop="team.name" />
|
<el-table-column label="班组名称" align="center" prop="teamName" />
|
||||||
<el-table-column label="参与人数" align="center">
|
<el-table-column label="参与人数" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.participantList.length + 1 }}</span>
|
<span>{{ scope.row.participantList.length + 1 }}</span>
|
||||||
@ -50,6 +50,11 @@
|
|||||||
<span>{{ parseTime(scope.row.meetingDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.meetingDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="上传时间" align="center" prop="createTime" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -57,7 +62,7 @@
|
|||||||
<el-button link type="primary" icon="View" @click="handleShowDrawer(scope.row)" v-hasPermi="['safety:teamMeeting:query']">
|
<el-button link type="primary" icon="View" @click="handleShowDrawer(scope.row)" v-hasPermi="['safety:teamMeeting:query']">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['safety:teamMeeting:edit']"> 修改 </el-button>
|
<!-- <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['safety:teamMeeting:edit']"> 修改 </el-button> -->
|
||||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['safety:teamMeeting:remove']">
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['safety:teamMeeting:remove']">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
Reference in New Issue
Block a user