duhang 2024-01-08 18:27:07 +08:00
commit 382f6fa062
30 changed files with 1316 additions and 114 deletions

4
.env
View File

@ -1,5 +1,5 @@
VITE_BASE_URL=http://192.168.0.17:8001/
VITE_PROXY=/api
VITE_PROXY=/api/
VITE_FILE_URL=https://file.zcloudchina.com/YTHFile
VITE_TEMPLATE_URL='https://qaaq.qhdsafety.com/file/'
VITE_TEMPLATE_URL=https://qaaq.qhdsafety.com/file/

View File

@ -112,6 +112,43 @@ export default [
},
],
},
{
path: "/system_operation",
redirect: "/system_operation/system_documents",
meta: { title: "体系运行", model: MODEL["1"] },
component: "children",
children: [
{
path: "/system_operation/system_documents",
meta: { title: "体系文件", isSubMenu: false },
component: "system_operation/system_documents/index",
},
],
},
{
path: "/risk_control",
redirect: "/risk_control/risk_point",
meta: { title: "风险管控", model: MODEL["1"] },
component: "children",
children: [
{
path: "/risk_control/risk_point",
meta: { title: "风险点(单元)", isSubMenu: false },
component: "children",
children: [
{
path: "",
component: "risk_control/risk_point/index",
},
{
path: "/risk_control/risk_point/view",
meta: { title: "查看", activeMenu: "/risk_control/risk_point" },
component: "risk_control/risk_point/view",
},
],
},
],
},
{
path: "/platform_resource_library",
redirect: "/platform_resource_library/courseware",

View File

@ -4,6 +4,7 @@ import {
getLevelsAndChildrenNumber,
getRegulatoryType,
getDepartmentTree,
getLevelsCorp,
} from "@/request/data_dictionary.js";
import { ref } from "vue";
@ -112,21 +113,21 @@ export const layoutFnGetPersonnelType = async () => {
};
// 职务
export const layoutFnGetDuties = async () => {
const resData = await getLevels({
const resData = await getLevelsCorp({
DICTIONARIES_ID: "09e36ac01e9540f8bc84eab1c1a78754",
});
return ref(resData.list);
};
// 职称
export const layoutFnGetProfessionalTitle = async () => {
const resData = await getLevels({
const resData = await getLevelsCorp({
DICTIONARIES_ID: "945a6b10e59946078b500f0fbafa8679",
});
return ref(resData.list);
};
// 工种
export const layoutFnGetJobType = async () => {
const resData = await getLevels({
const resData = await getLevelsCorp({
DICTIONARIES_ID: "55484e491a5e442d839c4595380713ec",
});
return ref(resData.list);
@ -139,8 +140,8 @@ export const layoutFnGetEmploymentSituation = async () => {
return ref(resData.list);
};
// 部门树
export const layoutFnGetDepartmentTree = async () => {
const resData = await getDepartmentTree();
export const layoutFnGetDepartmentTree = async (params) => {
const resData = await getDepartmentTree(params);
return ref(JSON.parse(resData.zTreeNodes));
};
// 无法确定DICTIONARIES_ID的数据字典

View File

@ -0,0 +1,22 @@
import { ElMessageBox } from "element-plus";
import { getFileName, getFileSuffix } from "@/assets/js/utils.js";
export default async function useDownloadFile(url, name) {
if (!url) throw new Error("没有下载地址");
await ElMessageBox.confirm("确定要下载此文件吗?", { type: "warning" });
const FILE_URL = import.meta.env.VITE_FILE_URL;
name = name ? name + getFileSuffix(url) : getFileName(url);
fetch(FILE_URL + url)
.then((res) => res.blob())
.then((blob) => {
const a = document.createElement("a");
document.body.appendChild(a);
a.style.display = "none";
const url = window.URL.createObjectURL(blob);
a.href = url;
a.download = `${name}`;
a.click();
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
});
}

View File

@ -1,4 +1,4 @@
import { ElMessage, ElMessageBox } from "element-plus";
import { ElMessage } from "element-plus";
/**
* @description 计算序号
@ -266,16 +266,6 @@ export function secondConversion(second) {
}
}
/**
* @description 下载附件
* @param {string} filePah 下载路径
**/
export async function downloadFile(filePah) {
const FILE_URL = import.meta.env.VITE_FILE_URL;
await ElMessageBox.confirm("确定要下载此文件吗?", { type: "warning" });
window.open(FILE_URL + filePah, "_blank");
}
/**
* @description 附件添加前缀
* @param {Array} list 附件数组
@ -319,6 +309,18 @@ export function translationStatus(status, list) {
}
}
/**
* @description 计算文件大小
* @param {number | string} size 文件kb
* @return {string} 计算后的文件大小
**/
export function calculateFileSize(size) {
return size > 1024
? (size / 1024 + "").substring(0, (size / 1024 + "").lastIndexOf(".") + 3) +
"MB"
: size + "KB";
}
/**
* @description 根据身份证号获取出生日期和性别
* @param {String} idCard 身份证号

View File

@ -86,6 +86,10 @@ const play = () => {
const pause = () => {
player && player.pause();
};
defineExpose({
play,
pause,
});
</script>
<style scoped lang="scss">

View File

@ -6,7 +6,6 @@
:props="{
children: 'nodes',
label: 'name',
disabled: '',
}"
:render-after-expand="false"
accordion
@ -51,10 +50,16 @@ const props = defineProps({
type: Boolean,
default: true,
},
rootDisabled: {
type: String,
default: "N",
},
});
const emits = defineEmits(["update:modelValue"]);
const modelValue = useVModel(props, "modelValue", emits);
const departmentTree = await layoutFnGetDepartmentTree();
const departmentTree = await layoutFnGetDepartmentTree({
rootDisabled: props.rootDisabled,
});
</script>
<style scoped></style>

View File

@ -5,7 +5,7 @@
ref="pdfRef"
v-for="page in numOfPages"
:key="page"
:src="src"
:src="VITE_FILE_URL + src"
:page="page"
/>
</div>
@ -18,6 +18,7 @@ import { VuePdf, createLoadingTask } from "vue3-pdfjs/esm";
import { ElMessage } from "element-plus";
import { useVModel } from "@vueuse/core";
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
defineOptions({
name: "LayoutPdf",
});
@ -38,7 +39,7 @@ const pdfRef = ref(null);
const numOfPages = ref(0);
watchEffect(() => {
if (props.visible) {
const loadingTask = createLoadingTask(props.src);
const loadingTask = createLoadingTask(VITE_FILE_URL + props.src);
loadingTask.promise
.then((pdf) => {
numOfPages.value = pdf.numPages;

View File

@ -0,0 +1,28 @@
<template>
<div class="tc mt-20 mb-20">
<img :src="src" alt="" width="200" height="200" />
</div>
</template>
<script setup>
import { useQRCode } from "@vueuse/integrations/useQRCode";
defineOptions({
name: "LayoutQrCode",
});
const props = defineProps({
src: {
type: String,
required: true,
default: "",
},
});
const src = useQRCode(() => props.src, {
width: 200,
height: 200,
margin: 1,
correctLevel: "H",
});
</script>
<style scoped lang="scss"></style>

View File

@ -20,7 +20,7 @@
>
<div>{{ item.NAME }}</div>
<div>
<el-icon @click="fnDelete(index)">
<el-icon @click.stop="fnDelete(index)">
<circle-close />
</el-icon>
</div>

View File

@ -8,7 +8,7 @@
:height="height"
:max-height="maxHeight"
:highlight-current-row="highlightCurrentRow"
:row-key="rowKey"
:row-key="getRowKey"
:row-class-name="rowClassName"
:show-header="showHeader"
:show-summary="showSummary"
@ -121,6 +121,11 @@ const handleSizeChange = (val) => {
});
emits("get-data");
};
const getRowKey = (row) => {
if (!props.rowKey) return;
if (typeof props.rowKey === "string") return row[props.rowKey];
else return props.rowKey(row);
};
const rowClick = (row, column, event) => {
emits("row-click", row, column, event);
};

View File

@ -0,0 +1,43 @@
<template>
<el-dialog title="视频" v-model="visible">
<ali-player :source="fnSrc(src)" ref="playerRef" />
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import AliPlayer from "@/components/ali-player/index.vue";
import { ref, watchEffect } from "vue";
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
defineOptions({
name: "LayoutVideo",
});
const props = defineProps({
src: {
type: String,
required: true,
},
visible: {
type: Boolean,
default: false,
required: true,
},
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
const playerRef = ref(null);
const fnSrc = (src) => {
if (src.indexOf("http") !== -1 || src.indexOf("https") !== -1) return src;
else return VITE_FILE_URL + src;
};
watchEffect(() => {
if (visible.value) {
playerRef.value && playerRef.value.play();
} else {
playerRef.value && playerRef.value.pause();
}
});
</script>
<style scoped lang="scss"></style>

View File

@ -3,6 +3,7 @@ import { post, upload } from "./axios";
export const Login = (params) => post("/admin/check", params); // 登录
export const logout = (params) => post("/main/logout", params); // 退出登录
export const getAsyncRouter = (params) => post("/main/index", params); // 获取动态路由
export const getHasMenu = (params) => post("/head/hasMenu", params); // 获取有没有权限访问路由
export const getUserInfo = (params) => post("/user/goEditMyInfo", params); // 获取用户信息
export const setUserInfo = (params) => post("/user/editUserOwn", params); // 修改用户信息
export const getVerifyDuplicateEmail = (params) =>

View File

@ -6,6 +6,12 @@ export const getLevels = (params) =>
loading: false,
...params,
});
// 获取数据字典
export const getLevelsCorp = (params) =>
post("/dictionariesCorp/getLevels", {
loading: false,
...params,
});
// 获取数据字典包括子级数量
export const getLevelsAndChildrenNumber = (params) =>
post("/dictionaries/getLevelsAndSCount", {

View File

@ -39,3 +39,6 @@ export const getUserScheduleView = (params) =>
post("/shiftworkperiod/getWorkDate", params); // 用户管理查看排班表
export const setDictionaryDelete = (params) =>
post("/dictionariesCorp/delete", params); // 数据字典删除
export const setUserAdd = (params) => post("/user/saveUser", params); // 用户管理添加
export const setUserEdit = (params) => post("/user/editUser", params); // 用户管理修改
export const getUserView = (params) => post("/user/goEditUser", params); // 用户管理查看

View File

@ -0,0 +1,13 @@
import { post, upload } from "@/request/axios.js";
export const getRiskPointList = (params) => post("/riskunit/list", params); // 风险点单元列表
export const setRiskPointDelete = (params) => post("/riskunit/delete", params); // 风险点单元删除
export const setRiskPointImport = (params) =>
upload("/riskunit/readExcel", params); // 风险点单元导入
export const setRiskPointBatchDelete = (params) =>
post("/riskunit/deleteAll", params); // 风险点单元批量删除
export const getRiskPointView = (params) => post("/riskunit/goEdit", params); // 风险点单元查看
export const setRiskPointAdd = (params) => post("/riskunit/add", params); // 风险点单元添加
export const setRiskPointEdit = (params) => post("/riskunit/edit", params); // 风险点单元修改
export const getRiskPointInspectList = (params) =>
post("/riskunit/getRisByUnitId", params); // 风险点单元检查内容

View File

@ -0,0 +1,13 @@
import { post, upload } from "@/request/axios.js";
export const getSystemDocumentsTree = (params) =>
post("/mfolder/listTree", params); // 体系文件树
export const getSystemDocumentsList = (params) => post("/mfolder/list", params); // 体系文件列表
export const setSystemDocumentsDelete = (params) =>
post("/mfolder/delete", params); // 体系文件删除
export const setSystemDocumentsAddFolder = (params) =>
post("/mfolder/add", params); // 体系文件添加文件夹
export const setSystemDocumentsUploadFile = (params) =>
upload("/mfolder/upload", params); // 体系文件上传文件
export const setSystemDocumentsBatchUploadFile = (params) =>
upload("/mfolder/batchUpload", params); // 体系文件批量上传文件

View File

@ -54,7 +54,12 @@
label="监管部门"
prop="checkedIds"
>
<layout-department v-model="form.checkedIds" multiple show-checkbox />
<layout-department
v-model="form.checkedIds"
multiple
show-checkbox
root-disabled="Y"
/>
</el-form-item>
<el-form-item label="备注" prop="BZ">
<el-input

View File

@ -0,0 +1,36 @@
<template>
<el-dialog v-model="visible" title="查看二维码" width="600px">
<div id="printContainer" style="border: 1px dashed #ccc">
<div class="tc mt-20">
<h1>{{ info.CORP_NAME }}</h1>
</div>
<layout-qr-code :src="info.CORPINFO_ID" />
</div>
<template #footer>
<el-button @click="visible = false">关闭</el-button>
<el-button v-print="'#printContainer'" type="primary"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import LayoutQrCode from "@/components/qr_code/index.vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
info: {
type: Object,
required: true,
default: () => ({}),
},
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
</script>
<style scoped lang="scss"></style>

View File

@ -584,7 +584,7 @@ const data = reactive({
SUBORDINATION: "",
SCALE: "",
SCALE_TYPE: "",
TRAINTYPE: [],
TRAINTYPE: "",
USERS_NUM: "",
FOURTYPE: "",
four_images: [],

View File

@ -191,26 +191,9 @@
>
修改
</el-button>
<el-button @click="fnQrCode"></el-button>
<el-button @click="data.qrCodeDialogVisible = true">二维码</el-button>
</div>
<el-dialog
v-model="data.qrCodeDialog.visible"
title="查看二维码"
width="600px"
>
<div id="printContainer" style="border: 1px dashed #ccc">
<div class="tc mt-20">
<h1>{{ data.info.CORP_NAME }}</h1>
</div>
<div class="tc mt-20 mb-20">
<img :src="data.qrCodeDialog.src" alt="" />
</div>
</div>
<template #footer>
<el-button @click="fnQrCodeDialogChangeShow"> </el-button>
<el-button v-print="'#printContainer'" type="primary"> </el-button>
</template>
</el-dialog>
<print :info="data.info" v-model:visible="data.qrCodeDialogVisible" />
</layout-card>
</template>
@ -219,18 +202,14 @@ import { getEnterpriseInfo } from "@/request/enterprise_management.js";
import { addingPrefixToFile } from "@/assets/js/utils.js";
import { reactive } from "vue";
import { useRouter } from "vue-router";
import { useQRCode } from "@vueuse/integrations/useQRCode";
import { ElMessage } from "element-plus";
import Print from "./components/print.vue";
const router = useRouter();
const data = reactive({
info: {},
bus_images: [],
four_images: [],
qrCodeDialog: {
visible: false,
src: "",
},
qrCodeDialogVisible: false,
});
const fnGetData = async () => {
const resData = await getEnterpriseInfo();
@ -239,21 +218,6 @@ const fnGetData = async () => {
data.four_images = addingPrefixToFile(resData.fourImgs);
};
fnGetData();
const fnQrCodeDialogChangeShow = () => {
data.qrCodeDialog.visible = !data.qrCodeDialog.visible;
};
const fnQrCode = () => {
if (data.info.CORPINFO_ID) {
fnQrCodeDialogChangeShow();
// TODO:
data.qrCodeDialog.src = useQRCode("https://vueuse.org", {
width: 200,
height: 200,
margin: 1,
correctLevel: "H",
});
} else ElMessage.error("请重新获取二维码");
};
</script>
<style scoped lang="scss"></style>

View File

@ -390,7 +390,10 @@ import {
getUserCurrentShiftList,
getUserInfo,
getUserScheduling,
getUserView,
setDictionaryDelete,
setUserAdd,
setUserEdit,
} from "@/request/enterprise_management.js";
import LayoutDepartment from "@/components/department/index.vue";
import LayoutUpload from "@/components/upload/index.vue";
@ -399,7 +402,11 @@ import { getPostListAll } from "@/request/data_dictionary.js";
import { useRoute, useRouter } from "vue-router";
import Scheduling from "./components/scheduling.vue";
import { InfoFilled } from "@element-plus/icons-vue";
import { idCardGetDateAndGender } from "@/assets/js/utils.js";
import {
addingPrefixToFile,
idCardGetDateAndGender,
image2Base64,
} from "@/assets/js/utils.js";
import {
layoutFnGetDegreeOfEducation,
layoutFnGetDuties,
@ -416,6 +423,7 @@ import { debounce } from "throttle-debounce";
import {
getVerifyDeduplicationUser,
getVerifyDuplicateEmail,
setUploadImg,
} from "@/request/api.js";
import useFormValidate from "@/assets/js/useFormValidate.js";
@ -534,6 +542,8 @@ const data = reactive({
employmentSituationList: [],
allUser: 0,
USERS_NUM: 0,
oldPostId: "",
oldDepartId: "",
form: {
ROLE_ID: "",
DEPARTMENT_ID: "",
@ -573,6 +583,24 @@ const data = reactive({
},
scheduleVisible: false,
});
const fnGetData = async () => {
if (!USER_ID) return;
const resData = await getUserView({ USER_ID });
const form = resData.pd;
form.PASSWORD = "666666";
form.periodStr = resData.periodStr;
form.ISSTUDENT = resData.pd.ISSTUDENT.toString();
if (form.USERAVATARURL_CONVERT)
form.faceFile = [
{ url: form.USERAVATARPREFIX + form.USERAVATARURL_CONVERT },
];
data.scheduleInfo = resData.period;
data.oldPostId = form.POST_ID;
data.oldDepartId = form.DEPARTMENT_ID;
form.userCerFile = addingPrefixToFile(resData.userCerList);
data.form = { ...data.form, ...form };
};
fnGetData();
const fnGetUserRole = async () => {
const resData = await getUserInfo();
data.roleList = resData.roleList;
@ -624,41 +652,27 @@ const fnChangeIdCard = () => {
data.form.SEX = sex;
data.form.DATE_OF_BIRTH = date;
};
const fnGetNation = async () => {
const { value } = await layoutFnGetNation();
data.nationList = value;
};
const fnGetSex = async () => {
const { value } = await layoutFnGetSex();
data.sexList = value;
};
const fnGetPoliticalLandscape = async () => {
const { value } = await layoutFnGetPoliticalLandscape();
data.politicalLandscapeList = value;
};
const fnGetDegreeOfEducation = async () => {
const { value } = await layoutFnGetDegreeOfEducation();
data.degreeOfEducationList = value;
};
const fnGetPersonnelType = async () => {
const { value } = await layoutFnGetPersonnelType();
data.personnelTypeList = value;
};
const fnGetDuties = async () => {
const { value } = await layoutFnGetDuties();
data.dutiesList = value;
};
const fnGetProfessionalTitle = async () => {
const { value } = await layoutFnGetProfessionalTitle();
data.professionalTitleList = value;
};
const fnGetJobType = async () => {
const { value } = await layoutFnGetJobType();
data.jobTypeList = value;
};
const fnGetEmploymentSituation = async () => {
const { value } = await layoutFnGetEmploymentSituation();
data.employmentSituationList = value;
const fnGetLevels = async () => {
const { value: nationList } = await layoutFnGetNation();
data.nationList = nationList;
const { value: sexList } = await layoutFnGetSex();
data.sexList = sexList;
const { value: politicalLandscapeList } =
await layoutFnGetPoliticalLandscape();
data.politicalLandscapeList = politicalLandscapeList;
const { value: degreeOfEducationList } = await layoutFnGetDegreeOfEducation();
data.degreeOfEducationList = degreeOfEducationList;
const { value: personnelTypeList } = await layoutFnGetPersonnelType();
data.personnelTypeList = personnelTypeList;
const { value: dutiesList } = await layoutFnGetDuties();
data.dutiesList = dutiesList;
const { value: professionalTitleList } = await layoutFnGetProfessionalTitle();
data.professionalTitleList = professionalTitleList;
const { value: jobTypeList } = await layoutFnGetJobType();
data.jobTypeList = jobTypeList;
const { value: employmentSituationList } =
await layoutFnGetEmploymentSituation();
data.employmentSituationList = employmentSituationList;
};
const fnDictionaryDelete = debounce(
1000,
@ -704,15 +718,7 @@ const stop = watch(
() => data.form.ISSTUDENT,
(val) => {
if (val === "true") {
fnGetNation();
fnGetSex();
fnGetPoliticalLandscape();
fnGetDegreeOfEducation();
fnGetPersonnelType();
fnGetDuties();
fnGetProfessionalTitle();
fnGetJobType();
fnGetEmploymentSituation();
fnGetLevels();
stop && stop();
}
},
@ -728,20 +734,82 @@ const fnSubmit = debounce(
form.WORKSTATUS = data.scheduleInfo.WORKSTATUS;
form.DURATION = data.scheduleInfo.DURATION;
form.WORKPERIOD = data.scheduleInfo.WORKPERIOD;
if (fnFindValueInList("dutiesList", form.DUTIES)) {
form.letDutiesType = "select";
form.DUTIESValue = "";
} else {
form.letDutiesType = "value";
form.DUTIESValue = form.DUTIES;
}
if (fnFindValueInList("professionalTitleList", form.TITLE)) {
form.letTitleType = "select";
form.letTitleValue = "";
} else {
form.letTitleType = "value";
form.letTitleValue = form.TITLE;
}
if (fnFindValueInList("jobTypeList", form.TYPE_OF_WORK)) {
form.letTypeOfWorkType = "select";
form.letTypeOfWorkValue = "";
} else {
form.letTypeOfWorkType = "value";
form.letTypeOfWorkValue = form.TYPE_OF_WORK;
}
if (data.form.faceFile?.[0]?.raw) {
const resData = await image2Base64(data.form.faceFile[0].url);
form.USERAVATARPREFIX = resData.substring(
0,
resData.indexOf("base64,") + 7
);
form.USERAVATARURL = resData.substring(resData.indexOf("base64,") + 7);
}
if (!USER_ID) {
//
if (data.USERS_NUM > data.allUser) {
if (data.allUser > data.USERS_NUM) {
ElMessage.error("已超过可创建用户数量");
return;
}
const resData = await setUserAdd({ ...form });
if (data.form.ISSTUDENT === "true") await fnUploadImage(resData.USER_ID);
} else {
//
if (
data.oldDepartId !== data.form.DEPARTMENT_ID ||
data.oldPostId !== data.form.POST_ID
) {
await ElMessageBox.confirm(
"如变更了部门或岗位,保存后将删除该用户所有清单,是否确定?",
{ type: "warning" }
);
form.OPERATIONTYPE = 1;
}
await setUserEdit({ ...form });
if (data.form.ISSTUDENT === "true")
await fnUploadImage(data.form.USER_ID);
}
ElMessage.success("操作成功");
router.back();
},
{ atBegin: true }
);
const fnUploadImage = async (USER_ID) => {
const formData = new FormData();
for (let i = 0; i < data.form.userCerFile.length; i++) {
if (data.form.userCerFile[i].raw)
formData.append("FFILE", data.form.userCerFile[i].raw);
}
formData.append("FOREIGN_KEY", USER_ID);
formData.append("TYPE", 18);
await setUploadImg(formData);
};
const fnFindValueInList = (list, value) => {
let existence = false;
for (let i = 0; i < data[list].length; i++) {
if (data[list][i].DICTIONARIES_ID === value) {
existence = true;
break;
}
}
return existence;
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,78 @@
<template>
<el-dialog
v-model="visible"
:title="type === 'edit' ? '修改' : '新增'"
:before-close="fnClose"
>
<el-form ref="formRef" :rules="rules" :model="form" label-width="150px">
<el-form-item label="部门" prop="DEPARTMENT_ID">
<layout-department v-model="form.DEPARTMENT_ID" />
</el-form-item>
<el-form-item label="风险点(单元)名称" prop="RISKUNITNAME">
<el-input v-model="form.RISKUNITNAME" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import { ref } from "vue";
import { useVModels } from "@vueuse/core";
import LayoutDepartment from "@/components/department/index.vue";
import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { setRiskPointAdd, setRiskPointEdit } from "@/request/risk_control.js";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
form: {
type: Object,
required: true,
default: () => ({}),
},
type: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
const { visible, form } = useVModels(props, emits);
const rules = {
RISKUNITNAME: [
{ required: true, message: "风险点(单元)不能为空", trigger: "blur" },
],
DEPARTMENT_ID: [
{ required: true, message: "管控部门不能为空", trigger: "change" },
],
};
const formRef = ref(null);
const fnClose = () => {
formRef.value.resetFields();
visible.value = false;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
props.type === "add"
? await setRiskPointAdd({ ...form.value })
: await setRiskPointEdit({ ...form.value });
ElMessage.success("操作成功");
fnClose();
emits("get-data");
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,48 @@
<template>
<el-dialog v-model="visible" title="查看二维码">
<div id="printContent">
<el-divider content-position="left">风险点单元信息</el-divider>
<el-descriptions :column="2" border>
<el-descriptions-item label="风险点(单元)">
{{ info.RISKUNITNAME }}
</el-descriptions-item>
<el-descriptions-item label="管控部门">
{{ info.DEPT_NAME }}
</el-descriptions-item>
<el-descriptions-item label="所属公司">
{{ info.CORP_NAME }}
</el-descriptions-item>
<el-descriptions-item label="管控负责人">
{{ info.HEADMAN }}
</el-descriptions-item>
</el-descriptions>
<layout-qr-code :src="info.RISKUNIT_ID" />
</div>
<template #footer>
<el-button @click="visible = false">关闭</el-button>
<el-button type="primary" v-print="'#printContent'"></el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import LayoutQrCode from "@/components/qr_code/index.vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
info: {
type: Object,
required: true,
default: () => ({}),
},
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,248 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="50px"
@submit.prevent="fnResetPaginationTransfer"
>
<el-row>
<el-col :span="6">
<el-form-item
label="风险点(单元)"
prop="KEYWORDS"
label-width="120px"
>
<el-input
v-model="searchForm.KEYWORDS"
placeholder="请输入关键字"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="部门" prop="DEPTIDS">
<layout-department
v-model="searchForm.DEPTIDS"
multiple
show-checkbox
collapse-tags
root-disabled="Y"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPaginationTransfer">
重置
</el-button>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px" class="end">
<el-button>打印</el-button>
<el-button @click="fnImportDialogChangeShow"> </el-button>
<el-button @click="fnExport"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
ref="tableRef"
:data="list"
v-model:pagination="pagination"
@get-data="fnGetDataTransfer"
row-key="RISKUNIT_ID"
>
<el-table-column reserve-selection type="selection" width="55" />
<el-table-column label="序号" width="70">
<template v-slot="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="DEPT_NAME_ALL" label="所属部门" />
<el-table-column prop="RISKUNITNAME" label="风险点(单元)" />
<el-table-column label="操作" width="200">
<template v-slot="{ row }">
<el-button type="primary" text link @click="fnPrint(row)">
二维码
</el-button>
<el-button
type="primary"
text
link
@click="
router.push({
path: '/risk_control/risk_point/view',
query: {
RISKUNIT_ID: row.RISKUNIT_ID,
RISKUNITNAME: row.RISKUNITNAME,
DEPT_NAME: row.DEPT_NAME,
},
})
"
>
查看
</el-button>
<el-button
type="primary"
text
link
@click="fnAddOrEdit(row.RISKUNIT_ID, 'edit')"
>
编辑
</el-button>
<el-button
type="primary"
text
link
@click="fnDelete(row.RISKUNIT_ID)"
>
删除
</el-button>
</template>
</el-table-column>
<template #button>
<el-button type="primary" @click="fnAddOrEdit('', 'add')">
新增
</el-button>
<el-button type="danger" @click="fnBatchDelete"> </el-button>
</template>
</layout-table>
</layout-card>
<layout-import-file
v-model:visible="data.importDialogVisible"
template-url="/template/riskunitExcelTemplate.xls"
@submit="fnSubmitImport"
/>
<add
v-model:visible="data.addOrEditDialog.visible"
v-model:form="data.addOrEditDialog.form"
:type="data.addOrEditDialog.type"
@get-data="fnResetPaginationTransfer"
/>
<print
v-model:visible="data.printDialog.visible"
:info="data.printDialog.info"
/>
</div>
</template>
<script setup>
import { serialNumber } from "@/assets/js/utils.js";
import useListData from "@/assets/js/useListData.js";
import LayoutDepartment from "@/components/department/index.vue";
import {
getRiskPointList,
getRiskPointView,
setRiskPointBatchDelete,
setRiskPointDelete,
setRiskPointImport,
} from "@/request/risk_control.js";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import { nextTick, reactive } from "vue";
import LayoutImportFile from "@/components/import_file/index.vue";
import Add from "./components/add.vue";
import { useRouter } from "vue-router";
import Print from "./components/print.vue";
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
useListData(getRiskPointList);
const data = reactive({
importDialogVisible: false,
addOrEditDialog: {
visible: false,
type: "",
form: {
DEPARTMENT_ID: "",
RISKUNITNAME: "",
},
},
printDialog: {
visible: false,
info: {},
},
});
const fnGetDataTransfer = () => {
fnGetData({
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
});
};
const fnResetPaginationTransfer = () => {
fnResetPagination({
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
});
};
const fnDelete = debounce(
1000,
async (RISKUNIT_ID) => {
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
await setRiskPointDelete({ RISKUNIT_ID });
ElMessage.success("删除成功");
fnResetPaginationTransfer();
},
{ atBegin: true }
);
const fnImportDialogChangeShow = () => {
data.importDialogVisible = !data.importDialogVisible;
};
const fnSubmitImport = async (formData) => {
const resData = await setRiskPointImport(formData);
if (resData.resultStr) {
ElMessage({
dangerouslyUseHTMLString: true,
message: resData.resultStr,
type: resData.resultType,
});
}
fnImportDialogChangeShow();
fnResetPaginationTransfer();
};
const fnExport = async () => {
const selectionData = tableRef.value.getSelectionRows();
if (selectionData.length === 0) {
ElMessage.warning("请选择需要导出至excel报表的记录信息");
return;
}
await ElMessageBox.confirm("确定要导出到excel吗", { type: "warning" });
const DATA_IDS = selectionData.map((item) => item.RISKUNIT_ID).join(",");
window.location.href =
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
"/riskunit/excel?" +
"&KEYWORDS=" +
searchForm.value.KEYWORDS +
"&DATA_IDS=" +
DATA_IDS;
};
const fnBatchDelete = async () => {
const selectionData = tableRef.value.getSelectionRows();
if (selectionData.length === 0) {
ElMessage.warning("请选中要删除的项");
return;
}
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
const DATA_IDS = selectionData.map((item) => item.RISKUNIT_ID).join(",");
await setRiskPointBatchDelete({ DATA_IDS });
ElMessage.success("删除成功");
fnResetPaginationTransfer();
};
const fnAddOrEdit = async (RISKUNIT_ID, type) => {
data.addOrEditDialog.visible = true;
await nextTick();
data.addOrEditDialog.type = type;
if (type === "edit") {
const resData = await getRiskPointView({ RISKUNIT_ID });
data.addOrEditDialog.form = resData.pd;
}
};
const fnPrint = (row) => {
data.printDialog.visible = true;
data.printDialog.info = row;
};
</script>
<style scoped></style>

View File

@ -0,0 +1,55 @@
<template>
<layout-card>
<el-divider content-position="left"> 风险点单元信息 </el-divider>
<el-descriptions :column="2" border>
<el-descriptions-item label="风险点(单元)">
{{ RISKUNITNAME }}
</el-descriptions-item>
<el-descriptions-item label="管控部门">
{{ DEPT_NAME }}
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left"> 检查内容 </el-divider>
<layout-table :data="list" :show-pagination="false">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="PARTSNAME" label="辨识部位" />
<el-table-column prop="risk_descr" label="存在风险" />
<el-table-column label="风险分级">
<template v-slot="{ row }">
<span v-if="row.LEVELID === 'levelD'" class="text-blue">
低风险/D级
</span>
<span v-else-if="row.LEVELID === 'levelC'" class="text-yellow">
一般风险/C级
</span>
<span v-else-if="row.LEVELID === 'levelB'" class="text-orange">
较大风险/B级
</span>
<span v-else-if="row.LEVELID === 'levelA'" class="text-red">
重大风险/A级
</span>
</template>
</el-table-column>
<el-table-column prop="MEASURES" label="管控措施" />
<el-table-column prop="ACCIDENTS_NAME" label="事故类型" />
<el-table-column prop="EME_MEASURES" label="应急处置措施" />
</layout-table>
</layout-card>
</template>
<script setup>
import { useRoute } from "vue-router";
import { getRiskPointInspectList } from "@/request/risk_control.js";
import useListData from "@/assets/js/useListData.js";
const route = useRoute();
const { RISKUNIT_ID, RISKUNITNAME, DEPT_NAME } = route.query;
const { list } = useListData(getRiskPointInspectList, {
otherParams: {
RISK_UNIT_ID: RISKUNIT_ID,
},
usePagination: false,
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,76 @@
<template>
<el-dialog v-model="visible" title="新建文件夹" :before-close="fnClose">
<el-form ref="formRef" :model="data.form" :rules="rules" label-width="80px">
<el-form-item label="文件名" prop="NAME">
<el-input v-model="data.form.NAME" />
</el-form-item>
<el-form-item label="备注" prop="REMARKS">
<el-input
v-model="data.form.REMARKS"
type="textarea"
:autosize="{
minRows: 3,
}"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { debounce } from "throttle-debounce";
import { setSystemDocumentsAddFolder } from "@/request/system_operation.js";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
mfolderId: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["update:visible", "get-data"]);
const visible = useVModel(props, "visible", emits);
const rules = {
NAME: [{ required: true, message: "名称不能为空", trigger: "blur" }],
};
const formRef = ref(null);
const data = reactive({
form: {
NAME: "",
REMARKS: "",
},
});
const fnClose = () => {
formRef.value.resetFields();
visible.value = false;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
await setSystemDocumentsAddFolder({
...data.form,
PARENT_ID: props.mfolderId,
});
fnClose();
ElMessage.success("保存成功");
emits("get-data");
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,77 @@
<template>
<el-dialog v-model="visible" title="上传文件" :before-close="fnClose">
<el-form ref="formRef" :model="data.form" :rules="rules" label-width="80px">
<el-form-item label="附件" prop="file">
<layout-upload
v-model:file-list="data.form.file"
accept=".pdf"
:limit="99"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { debounce } from "throttle-debounce";
import { setSystemDocumentsBatchUploadFile } from "@/request/system_operation.js";
import LayoutUpload from "@/components/upload/index.vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
mfolderId: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["update:visible", "get-data"]);
const visible = useVModel(props, "visible", emits);
const rules = {
file: [{ required: true, message: "附件不能为空", trigger: "change" }],
};
const formRef = ref(null);
const data = reactive({
form: {
file: [],
},
});
const fnClose = () => {
formRef.value.resetFields();
visible.value = false;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
const formData = new FormData();
Object.keys(data.form).forEach((key) => {
formData.append(key, data.form[key]);
});
formData.delete("file");
formData.append("PARENT_ID", props.mfolderId);
for (let i = 0; i < data.form.file.length; i++) {
formData.append("FFILE", data.form.file[i].raw);
}
await setSystemDocumentsBatchUploadFile(formData);
fnClose();
ElMessage.success("保存成功");
emits("get-data");
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,91 @@
<template>
<el-dialog v-model="visible" title="上传文件" :before-close="fnClose">
<el-form
ref="formRef"
:model="data.form"
:rules="rules"
label-width="100px"
>
<el-form-item label="文件名" prop="NAME">
<el-input v-model="data.form.NAME" />
</el-form-item>
<el-form-item label="附件" prop="file">
<layout-upload v-model:file-list="data.form.file" accept=".pdf" />
</el-form-item>
<el-form-item label="备注" prop="REMARKS">
<el-input
v-model="data.form.REMARKS"
type="textarea"
:autosize="{
minRows: 3,
}"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import { reactive, ref } from "vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { debounce } from "throttle-debounce";
import { setSystemDocumentsUploadFile } from "@/request/system_operation.js";
import LayoutUpload from "@/components/upload/index.vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
mfolderId: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["update:visible", "get-data"]);
const visible = useVModel(props, "visible", emits);
const rules = {
NAME: [{ required: true, message: "名称不能为空", trigger: "blur" }],
file: [{ required: true, message: "附件不能为空", trigger: "change" }],
};
const formRef = ref(null);
const data = reactive({
form: {
NAME: "",
file: [],
REMARKS: "",
},
});
const fnClose = () => {
formRef.value.resetFields();
visible.value = false;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
const formData = new FormData();
Object.keys(data.form).forEach((key) => {
formData.append(key, data.form[key]);
});
formData.delete("file");
formData.append("PARENT_ID", props.mfolderId);
formData.append("FFILE", data.form.file[0].raw);
await setSystemDocumentsUploadFile(formData);
fnClose();
ElMessage.success("保存成功");
emits("get-data");
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,272 @@
<template>
<layout-card>
<layout-table
:data="list"
v-model:pagination="pagination"
@get-data="fnGetDataTransfer"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column v-if="MFOLDER_ID === '0'" label="目录名" width="220">
<template v-slot="{ row }">
<el-button
link
type="primary"
@click="
router.push({
path: '/system_operation/system_documents',
query: {
MFOLDER_ID: row.MFOLDER_ID,
},
})
"
>
{{ row.NAME }}<el-icon><ArrowRight /></el-icon>
</el-button>
</template>
</el-table-column>
<el-table-column v-if="MFOLDER_ID !== '0'" label="文件名">
<template v-slot="{ row }">
{{ row.NAME }}
<el-button
link
type="primary"
v-if="interceptTheSuffix(row.FILEPATH, '.txt')"
@click="fnPreviewTxt(row.FILEPATH)"
>
[预览]
</el-button>
<el-button
text
link
type="primary"
v-if="interceptTheSuffix(row.FILEPATH, '.pdf')"
@click="fnPreviewPdf(row.FILEPATH)"
>
[预览]
</el-button>
<el-button
link
type="primary"
v-if="interceptTheSuffix(row.FILEPATH, '.mp4')"
@click="fnPreviewVideo(row.FILEPATH)"
>
[预览]
</el-button>
<a
v-if="
interceptTheSuffix(row.FILEPATH, '.doc') ||
interceptTheSuffix(row.FILEPATH, '.xls') ||
interceptTheSuffix(row.FILEPATH, '.ppt') ||
interceptTheSuffix(row.FILEPATH, '.docx') ||
interceptTheSuffix(row.FILEPATH, '.xlsx') ||
interceptTheSuffix(row.FILEPATH, '.pptx')
"
:href="
'http://view.officeapps.live.com/op/view.aspx?src=' +
VITE_FILE_URL +
row.FILEPATH
"
target="_blank"
>
[预览]
</a>
</template>
</el-table-column>
<el-table-column v-if="MFOLDER_ID === '0'" prop="num" label="文件数量" />
<el-table-column v-if="MFOLDER_ID !== '0'" label="文件大小">
<template v-slot="{ row }">
{{ calculateFileSize(row.FILESIZE) }}
</template>
</el-table-column>
<el-table-column prop="CTIME" label="上传时间" />
<el-table-column prop="UNAME" label="上传者" />
<el-table-column label="是否共享">
<template v-slot="{ row }">
{{ row.SHARE === "no" ? "私有文件" : "公共文件" }}
</template>
</el-table-column>
<el-table-column prop="REMARKS" label="备注说明" show-overflow-tooltip />
<el-table-column label="操作" width="120">
<template v-slot="{ row }">
<el-button
v-if="buttonJurisdiction.del && row.UNAME !== 'init'"
type="primary"
text
link
@click="fnDelete(row.MFOLDER_ID, row.FILEPATH)"
>
删除
</el-button>
<el-button
v-show="MFOLDER_ID !== '0'"
type="primary"
text
link
@click="useDownloadFile(row.FILEPATH)"
>
下载
</el-button>
</template>
</el-table-column>
<template #button>
<el-button
v-if="MFOLDER_ID === '0' && buttonJurisdiction.add"
type="primary"
@click="data.addFolderDialogVisible = true"
>
新建文件夹
</el-button>
<template v-if="MFOLDER_ID !== '0'">
<el-button
v-if="buttonJurisdiction.add"
type="primary"
@click="data.uploadFileDialogVisible = true"
>
上传文件
</el-button>
<el-button
v-if="buttonJurisdiction.add"
type="primary"
@click="data.batchUploadFileDialogVisible = true"
>
批量上传
</el-button>
<el-button @click="router.back"> </el-button>
</template>
</template>
</layout-table>
<layout-pdf
:src="data.pdfDialog.src"
v-model:visible="data.pdfDialog.visible"
/>
<layout-txt
:src="data.txtDialog.src"
v-model:visible="data.txtDialog.visible"
/>
<layout-video
:src="data.videoDialog.src"
v-model:visible="data.videoDialog.visible"
/>
<add-folder
v-model:visible="data.addFolderDialogVisible"
:mfolder-id="MFOLDER_ID"
@get-data="fnResetPaginationTransfer"
/>
<upload-folder
v-model:visible="data.uploadFileDialogVisible"
:mfolder-id="MFOLDER_ID"
@get-data="fnResetPaginationTransfer"
/>
<batch-upload-file
v-model:visible="data.batchUploadFileDialogVisible"
:mfolder-id="MFOLDER_ID"
@get-data="fnResetPaginationTransfer"
/>
</layout-card>
</template>
<script setup>
import {
getSystemDocumentsList,
setSystemDocumentsDelete,
} from "@/request/system_operation.js";
import { reactive, ref } from "vue";
import LayoutPdf from "@/components/pdf/index";
import LayoutTxt from "@/components/txt/index.vue";
import LayoutVideo from "@/components/video/index";
import {
serialNumber,
calculateFileSize,
interceptTheSuffix,
} from "@/assets/js/utils";
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
import useListData from "@/assets/js/useListData.js";
import { useUserStore } from "@/pinia/user.js";
import { ArrowRight } from "@element-plus/icons-vue";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import useDownloadFile from "@/assets/js/useDownloadFile.js";
import AddFolder from "./components/add_folder.vue";
import UploadFolder from "./components/upload_file.vue";
import BatchUploadFile from "./components/batch_upload_file.vue";
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const router = useRouter();
const route = useRoute();
const userStore = useUserStore();
const mfolderIdDefault = "0";
const MFOLDER_ID = ref(route.query.MFOLDER_ID || mfolderIdDefault);
const { list, pagination, fnGetData, fnResetPagination } = useListData(
getSystemDocumentsList,
{
otherParams: {
MFOLDER_ID: MFOLDER_ID.value,
SHARE: "no",
CORPINFO_ID: userStore.getUserInfo.CORPINFO_ID,
},
}
);
const data = reactive({
pdfDialog: {
visible: false,
src: "",
},
videoDialog: {
visible: false,
src: "",
},
txtDialog: {
visible: false,
src: "",
},
addFolderDialogVisible: false,
uploadFileDialogVisible: false,
batchUploadFileDialogVisible: false,
});
const buttonJurisdiction = await useButtonJurisdiction("mfolder");
const fnGetDataTransfer = () => {
fnGetData({
MFOLDER_ID: MFOLDER_ID.value,
});
};
const fnResetPaginationTransfer = () => {
fnResetPagination({
MFOLDER_ID: MFOLDER_ID.value,
});
};
onBeforeRouteUpdate((to) => {
MFOLDER_ID.value = to.query.MFOLDER_ID || mfolderIdDefault;
fnResetPaginationTransfer();
});
const fnDelete = debounce(
1000,
async (MFOLDER_ID, FILEPATH) => {
await ElMessageBox.confirm(`确定要删除吗?`, {
type: "warning",
});
await setSystemDocumentsDelete({ MFOLDER_ID, FILEPATH: FILEPATH || "" });
ElMessage.success("删除成功");
fnResetPaginationTransfer();
},
{ atBegin: true }
);
const fnPreviewTxt = async (FILEPATH) => {
data.txtDialog.visible = true;
data.txtDialog.src = FILEPATH;
};
const fnPreviewPdf = (FILEPATH) => {
data.pdfDialog.visible = true;
data.pdfDialog.src = FILEPATH;
};
const fnPreviewVideo = (FILEPATH) => {
data.videoDialog.visible = true;
data.videoDialog.src = FILEPATH;
};
</script>
<style scoped></style>