forked from integrated_whb/integrated_whb_vue
init
parent
e181a0ef35
commit
daa59776e3
|
@ -20,6 +20,7 @@
|
|||
"jspdf": "^2.5.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^3.0.1",
|
||||
"nanoid": "^5.0.4",
|
||||
"normalize.css": "^8.0.1",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
|
@ -4198,20 +4199,14 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.7",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-5.0.4.tgz",
|
||||
"integrity": "sha512-vAjmBf13gsmhXSgBrtIclinISzFFy22WwCYoyilZlsrRXNIHSwgFQ1bEdjRwMT3aoadeIF6HMuDRlOxzfXV8ig==",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
"nanoid": "bin/nanoid.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
"node": "^18 || >=20"
|
||||
}
|
||||
},
|
||||
"node_modules/natural-compare": {
|
||||
|
@ -4633,6 +4628,17 @@
|
|||
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/postcss/node_modules/nanoid": {
|
||||
"version": "3.3.7",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz",
|
||||
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/prelude-ls": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"jspdf": "^2.5.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^3.0.1",
|
||||
"nanoid": "^5.0.4",
|
||||
"normalize.css": "^8.0.1",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
|
|
|
@ -675,6 +675,84 @@ export default [
|
|||
meta: { title: "离岗管理", isSubMenu: false },
|
||||
component: "off_duty_management/leave/index",
|
||||
},
|
||||
{
|
||||
path: "/off_duty_management/login_record",
|
||||
meta: { title: "登录记录", isSubMenu: false },
|
||||
component: "off_duty_management/login_record/index",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/risk_statement",
|
||||
redirect: "/risk_statement/risk_four_color_chart",
|
||||
meta: { title: "风险提示", model: MODEL["1"] },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "/risk_statement/risk_four_color_chart",
|
||||
meta: { title: "风险四色图", isSubMenu: false },
|
||||
component: "risk_statement/risk_four_color_chart/index",
|
||||
},
|
||||
{
|
||||
path: "/risk_statement/risk_notification_card",
|
||||
meta: { title: "风险告知卡", isSubMenu: false },
|
||||
component: "risk_statement/risk_notification_card/index",
|
||||
},
|
||||
{
|
||||
path: "/risk_statement/job_notification_card",
|
||||
meta: { title: "岗位告知卡", isSubMenu: false },
|
||||
component: "risk_statement/job_notification_card/index",
|
||||
},
|
||||
{
|
||||
path: "/risk_statement/safety_production_commitment_card",
|
||||
meta: { title: "安全生产承诺卡", isSubMenu: false },
|
||||
component: "risk_statement/safety_production_commitment_card/index",
|
||||
},
|
||||
{
|
||||
path: "/risk_statement/emergency_response_card",
|
||||
meta: { title: "应急处置卡", isSubMenu: false },
|
||||
component: "risk_statement/emergency_response_card/index",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/dynamic_evaluation",
|
||||
redirect: "/dynamic_evaluation/risk_control_menu",
|
||||
meta: { title: "动态评估", model: MODEL["1"] },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "/dynamic_evaluation/risk_control_menu",
|
||||
meta: { title: "风险管控动态评估菜单", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{ path: "", component: "dynamic_evaluation/risk_control_menu/index" },
|
||||
{
|
||||
path: "/dynamic_evaluation/risk_control_menu/add",
|
||||
meta: {
|
||||
title: "新增",
|
||||
activeMenu: "/dynamic_evaluation/risk_control_menu",
|
||||
},
|
||||
component: "dynamic_evaluation/risk_control_menu/add",
|
||||
},
|
||||
{
|
||||
path: "/dynamic_evaluation/risk_control_menu/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu: "/dynamic_evaluation/risk_control_menu",
|
||||
},
|
||||
component: "dynamic_evaluation/risk_control_menu/add",
|
||||
},
|
||||
{
|
||||
path: "/dynamic_evaluation/risk_control_menu/edit",
|
||||
meta: {
|
||||
title: "编辑",
|
||||
activeMenu: "/dynamic_evaluation/risk_control_menu",
|
||||
},
|
||||
component: "dynamic_evaluation/risk_control_menu/add",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<template>
|
||||
<el-tooltip placement="top">
|
||||
<el-tooltip placement="top" :persistent="!!imgs.length">
|
||||
<template #content>
|
||||
<template v-if="imgs.length > 0">
|
||||
<img
|
||||
v-viewer
|
||||
v-for="item in imgs"
|
||||
:key="item.IMGFILES_ID"
|
||||
:src="VITE_FILE_URL + item.FILEPATH"
|
||||
|
|
|
@ -52,26 +52,25 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onBeforeUnmount, reactive } from "vue";
|
||||
import { reactive } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useMenuStore } from "@/pinia/menu";
|
||||
import { useUserStore } from "@/pinia/user";
|
||||
import { MENU } from "@/assets/js/constant";
|
||||
import { getInfo, getUserInfo, logout } from "@/request/api";
|
||||
import { useMiscellaneousStore } from "@/pinia/miscellaneous.js";
|
||||
import UpdateInfo from "./components/update_info.vue";
|
||||
import UpdateAvatar from "./components/update_avatar.vue";
|
||||
import { checkImgExists, addingPrefixToFile } from "@/assets/js/utils.js";
|
||||
import { useWebSocket } from "@vueuse/core";
|
||||
import { nanoid } from "nanoid";
|
||||
|
||||
defineOptions({
|
||||
name: "LayoutHeader",
|
||||
});
|
||||
const FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
let webSocket;
|
||||
const router = useRouter();
|
||||
const menuStore = useMenuStore();
|
||||
const userStore = useUserStore();
|
||||
const miscellaneousStore = useMiscellaneousStore();
|
||||
const data = reactive({
|
||||
avatar: "",
|
||||
userDialog: {
|
||||
|
@ -122,31 +121,27 @@ const fnGetInfo = async () => {
|
|||
...userStore.getUserInfo,
|
||||
...resData,
|
||||
});
|
||||
miscellaneousStore.setOnlineAddress(resData.onlineAdress);
|
||||
webSocket = new WebSocket(encodeURI("ws://" + resData.onlineAdress));
|
||||
webSocket.onopen = () => {
|
||||
webSocket.send("[join]" + resData.USERNAME);
|
||||
};
|
||||
webSocket.onmessage = (message) => {
|
||||
const messageMsg = JSON.parse(message.data);
|
||||
if (messageMsg.type === "goOut") {
|
||||
fnSignOut();
|
||||
} else if (messageMsg.type === "thegoout") {
|
||||
fnSignOut();
|
||||
const { send } = useWebSocket(
|
||||
encodeURI("wss://qaaq.qhdsafety.com/zxwebsocket/"),
|
||||
{
|
||||
onMessage: (ws, event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
if (data.type === "goOut") {
|
||||
fnSignOut();
|
||||
} else if (data.type === "thegoout") {
|
||||
fnSignOut();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
);
|
||||
send("[join]" + nanoid());
|
||||
};
|
||||
fnGetInfo();
|
||||
const fnSignOut = async () => {
|
||||
await logout();
|
||||
webSocket && webSocket.close();
|
||||
userStore.$reset();
|
||||
await router.replace("/login");
|
||||
};
|
||||
onBeforeUnmount(() => {
|
||||
webSocket && webSocket.close();
|
||||
webSocket = null;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
export const useMiscellaneousStore = defineStore("miscellaneousStore", {
|
||||
state: () => ({
|
||||
onlineAddress: false,
|
||||
}),
|
||||
getters: {
|
||||
getOnlineAddress: (state) => state.onlineAddress,
|
||||
},
|
||||
actions: {
|
||||
setOnlineAddress(onlineAddress) {
|
||||
this.onlineAddress = onlineAddress;
|
||||
},
|
||||
},
|
||||
persist: {
|
||||
storage: window.sessionStorage,
|
||||
},
|
||||
});
|
|
@ -0,0 +1,8 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const getRiskControlMenuList = (params) =>
|
||||
post("/report/getList", params); // 风险管控动态评估菜单列表
|
||||
export const getRiskControlMenuView = (params) =>
|
||||
post("/report/getForm", params); // 风险管控动态评估菜单查看
|
||||
export const setRiskControlMenuSubmit = (params) =>
|
||||
post("/report/init", params); // 风险管控动态评估菜单提交
|
|
@ -3,3 +3,8 @@ import { post } from "@/request/axios.js";
|
|||
export const getLeaveList = (params) => post("/offduty/list", params); // 离岗管理列表
|
||||
export const getLeaveView = (params) => post("/offduty/goEdit", params); // 离岗管理查看
|
||||
export const setLeaveEdit = (params) => post("/offduty/edit", params); // 离岗管理修改
|
||||
export const getApprovedByList = (params) =>
|
||||
post("/app/sys/listUserLeader", params); // 离岗管理获取审批人
|
||||
export const setLeaveReview = (params) => post("/offduty/review", params); // 离岗管理审批
|
||||
export const setLeaveCancel = (params) => post("/offduty/cancel", params); // 离岗管理取消
|
||||
export const getLoginRecordList = (params) => post("/fhlog/getList", params); // 登录记录列表
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const getList = (params) => post("/riskwarning/list", params); // 风险四色图列表
|
||||
export const getView = (params) => post("/riskwarning/goEdit", params); // 风险四色图查看
|
||||
export const setDelete = (params) => post("/riskwarning/delete", params); // 风险四色图删除
|
||||
export const setBatchDelete = (params) =>
|
||||
post("/riskwarning/deleteAll", params); // 风险四色图批量删除
|
||||
export const setAdd = (params) => post("/riskwarning/add", params); // 风险四色图添加
|
||||
export const setEdit = (params) => post("/riskwarning/edit", params); // 风险四色图修改
|
||||
export const getRiskNotificationCardList = (params) =>
|
||||
post("/identificationparts/list", params); // 风险告知卡列表
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div class="pdf-page">
|
||||
<div name="pdf-box" class="pdf-cover">
|
||||
<div class="pdf-cover">
|
||||
<div class="top">
|
||||
<h1>{{ data.cpd.CORP_NAME }}</h1>
|
||||
<h1>秦安双重预防机制建设平台</h1>
|
||||
|
@ -13,10 +13,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="pdf-print">
|
||||
<!-- TODO PDF导出分页截断"-->
|
||||
<el-button type="primary" @click="fnPDFPrinting">PDF导出</el-button>
|
||||
<!-- TODO"-->
|
||||
<el-button type="primary">PDF导出</el-button>
|
||||
</div>
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>1.概述</h1>
|
||||
<p>
|
||||
{{ data.cpd.CORP_NAME }}公司统一社会信用代码为:{{
|
||||
|
@ -60,7 +60,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>3.隐患排查</h1>
|
||||
<h4>3.1清单管理</h4>
|
||||
<p>
|
||||
|
@ -152,7 +152,7 @@
|
|||
data.yys_count
|
||||
}}项,已超期{{ data.cq_count }}项。
|
||||
</p>
|
||||
<p class="pdf-subtitle">隐患治理情况见表2。</p>
|
||||
<p class="pdf-subtitle">隐患治理情况见表2</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -210,7 +210,7 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>4.风险分析记录</h1>
|
||||
<p>改进信息显示风险辨识台账更新记录</p>
|
||||
<table>
|
||||
|
@ -238,7 +238,7 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>5.教育培训情况</h1>
|
||||
<h4>5.1教育培训</h4>
|
||||
<p>
|
||||
|
@ -314,7 +314,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>6.特殊作业管理</h1>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
|
@ -333,7 +333,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>7.绩效考核</h1>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
|
@ -449,7 +449,7 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div name="pdf-box" class="pdf-content">
|
||||
<div class="pdf-content">
|
||||
<h1>8.结论建议</h1>
|
||||
<p>
|
||||
{{ data.corp_advice.ADVICE }}
|
||||
|
@ -493,11 +493,7 @@ import { reactive, ref, watchEffect } from "vue";
|
|||
import dayjs from "dayjs";
|
||||
import Conclusion from "./components/conclusion.vue";
|
||||
import Other from "./components/other.vue";
|
||||
import { ElLoading } from "element-plus";
|
||||
import html2Canvas from "html2canvas";
|
||||
import JsPDF from "jspdf";
|
||||
|
||||
let loading;
|
||||
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const typeMap = {
|
||||
listType0001: "日常隐患排查清单",
|
||||
|
@ -521,6 +517,7 @@ const startDate = ref("");
|
|||
const lastDate = ref("");
|
||||
const color = ref("unset");
|
||||
const border_color = ref("var(--el-border-color-lighter)");
|
||||
const width = ref("100%");
|
||||
const data = reactive({
|
||||
cpd: {},
|
||||
riskpd: {},
|
||||
|
@ -679,92 +676,12 @@ const fnConclusion = () => {
|
|||
data.conclusionDialog.visible = true;
|
||||
data.conclusionDialog.advice = data.corp_advice.ADVICE;
|
||||
};
|
||||
|
||||
const fnPDFPrinting = () => {
|
||||
loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: "正在生成,请稍候...",
|
||||
background: "rgba(0, 0, 0, 0.5)",
|
||||
});
|
||||
color.value = "#000";
|
||||
border_color.value = "#000";
|
||||
const elements = document.querySelectorAll('div[name="pdf-box"]');
|
||||
fnHtmlToPdf("企业诊断报告", elements);
|
||||
};
|
||||
const fnHtmlToPdf = (filename, els) => {
|
||||
const pdf = new JsPDF("", "pt", "a4");
|
||||
const flagArr = [];
|
||||
for (let i = 0, len = els.length; i < len; i++) {
|
||||
flagArr.push(0);
|
||||
}
|
||||
runself(0);
|
||||
|
||||
function runself(index) {
|
||||
const html = els[index];
|
||||
const contentWidth = html.clientWidth; // 获得该容器的宽
|
||||
const contentHeight = html.clientHeight; // 获得该容器的高
|
||||
let leftHeight = contentHeight;
|
||||
const pageHeight = (contentWidth / 592.28) * 841.89;
|
||||
let position = 0;
|
||||
const canvas = document.createElement("canvas");
|
||||
const scale = 2; // 解决清晰度问题,先放大 2倍
|
||||
canvas.width = contentWidth * scale; // 将画布宽&&高放大两倍
|
||||
canvas.height = contentHeight * scale;
|
||||
canvas.getContext("2d").scale(scale, scale);
|
||||
const opts = {
|
||||
// scale: scale,
|
||||
canvas,
|
||||
width: contentWidth,
|
||||
height: contentHeight,
|
||||
useCORS: true,
|
||||
allowTaint: true,
|
||||
};
|
||||
html2Canvas(html, opts)
|
||||
.then((canvas) => {
|
||||
const pageData = canvas.toDataURL("image/jpeg", 1.0); // 清晰度 0 - 1
|
||||
const imgWidth = 555.28;
|
||||
const imgHeight = (imgWidth / contentWidth) * contentHeight;
|
||||
// pdf.addImage(pageData, 'JPEG', 左,上,宽度,高度)设置
|
||||
if (leftHeight < pageHeight) {
|
||||
pdf.addImage(pageData, "JPEG", 20, 0, imgWidth, imgHeight);
|
||||
} else {
|
||||
while (leftHeight > 0) {
|
||||
// arg3-->距离左边距;arg4-->距离上边距;arg5-->宽度;arg6-->高度
|
||||
pdf.addImage(pageData, "JPEG", 20, position, imgWidth, imgHeight);
|
||||
leftHeight -= pageHeight;
|
||||
position -= 841.89;
|
||||
// 避免添加空白页
|
||||
if (leftHeight > 0) {
|
||||
pdf.addPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (index < els.length - 1) {
|
||||
pdf.addPage();
|
||||
}
|
||||
return 1;
|
||||
})
|
||||
.then((item) => {
|
||||
flagArr[index] = item;
|
||||
if (flagArr.every((f) => f === 1)) {
|
||||
pdf.save(filename);
|
||||
}
|
||||
index++;
|
||||
if (index < els.length) {
|
||||
runself(index);
|
||||
} else {
|
||||
color.value = "unset";
|
||||
border_color.value = "var(--el-border-color-lighter)";
|
||||
loading.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pdf-page {
|
||||
width: 1100px;
|
||||
//width: 1100px;
|
||||
width: v-bind(width);
|
||||
border: 1px solid var(--el-border-color);
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
|
|
|
@ -0,0 +1,281 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<div class="pdf-page">
|
||||
<div class="pdf-cover">
|
||||
<div class="top">
|
||||
<h1>{{ info.CREATOR_NAME }}</h1>
|
||||
<h1>
|
||||
{{ dayjs(info.CREATTIME).format("YYYY") }}年度风险管控动态评估报告
|
||||
</h1>
|
||||
</div>
|
||||
<div style="padding-top: 200px; margin: auto; width: 400px">
|
||||
<div style="display: flex">
|
||||
<h1>编制:</h1>
|
||||
<div style="border-bottom: 1px solid #606266; width: 80%" />
|
||||
</div>
|
||||
<div style="display: flex; margin-top: 50px">
|
||||
<h1>批准:</h1>
|
||||
<div style="border-bottom: 1px solid #606266; width: 80%" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bot" style="padding-top: 300px">
|
||||
<h1>{{ info.CREATOR_NAME }}</h1>
|
||||
<h1>{{ dayjs(info.CREATTIME).format("YYYY年MM月DD日") }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pdf-content">
|
||||
<table>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td
|
||||
v-if="fnGetCurrentIndex(item, '0') >= 0"
|
||||
:rowspan="fnGetCurrentData(item, '0').ROW_SPAN"
|
||||
:colspan="fnGetCurrentData(item, '0').COL_SPAN"
|
||||
:style="fnGetCurrentData(item, '0').STYLE"
|
||||
>
|
||||
{{ fnGetCurrentData(item, "0").DESCRITPTION }}
|
||||
</td>
|
||||
<td
|
||||
v-if="fnGetCurrentIndex(item, '1') >= 0"
|
||||
:rowspan="fnGetCurrentData(item, '1').ROW_SPAN"
|
||||
:colspan="fnGetCurrentData(item, '1').COL_SPAN"
|
||||
:style="fnGetCurrentData(item, '1').STYLE"
|
||||
>
|
||||
{{ fnGetCurrentData(item, "1").DESCRITPTION }}
|
||||
</td>
|
||||
<td
|
||||
v-if="fnGetCurrentIndex(item, '2') >= 0"
|
||||
:rowspan="fnGetCurrentData(item, '2').ROW_SPAN"
|
||||
:colspan="fnGetCurrentData(item, '2').COL_SPAN"
|
||||
:style="fnGetCurrentData(item, '2').STYLE"
|
||||
>
|
||||
{{ fnGetCurrentData(item, "2").DESCRITPTION }}
|
||||
</td>
|
||||
<td
|
||||
v-if="fnGetCurrentIndex(item, '3') >= 0"
|
||||
:rowspan="fnGetCurrentData(item, '3').ROW_SPAN"
|
||||
:colspan="fnGetCurrentData(item, '3').COL_SPAN"
|
||||
:style="fnGetCurrentData(item, '3').STYLE"
|
||||
>
|
||||
{{ fnGetCurrentData(item, "3").DESCRITPTION }}
|
||||
</td>
|
||||
<td
|
||||
v-if="fnGetCurrentIndex(item, '4') >= 0"
|
||||
:rowspan="fnGetCurrentData(item, '4').ROW_SPAN"
|
||||
:colspan="fnGetCurrentData(item, '4').COL_SPAN"
|
||||
:style="fnGetCurrentData(item, '4').STYLE"
|
||||
>
|
||||
{{ fnGetCurrentData(item, "4").DESCRITPTION }}
|
||||
</td>
|
||||
<td
|
||||
v-if="fnGetCurrentIndex(item, '5') >= 0"
|
||||
:rowspan="fnGetCurrentData(item, '5').ROW_SPAN"
|
||||
:colspan="fnGetCurrentData(item, '5').COL_SPAN"
|
||||
:style="fnGetCurrentData(item, '5').STYLE"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
v-if="
|
||||
!fnGetCurrentData(item, '5').DESCRITPTION && type !== 'view'
|
||||
"
|
||||
@click="fnEdit(fnGetCurrentData(item, '5'))"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
{{ fnGetCurrentData(item, "5").DESCRITPTION || "" }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</layout-card>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit" v-if="type !== 'view'">
|
||||
确定
|
||||
</el-button>
|
||||
<!-- TODO"-->
|
||||
<el-button type="primary" v-if="type === 'view'">导出PDF</el-button>
|
||||
</div>
|
||||
<assessment-results
|
||||
v-model:visible="data.editDialog.visible"
|
||||
v-model:form="data.editDialog.form"
|
||||
@submit="fnAssessmentResultsSubmit"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import {
|
||||
getRiskControlMenuList,
|
||||
getRiskControlMenuView,
|
||||
setRiskControlMenuSubmit,
|
||||
} from "@/request/dynamic_evaluation.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { nextTick, reactive, ref } from "vue";
|
||||
import AssessmentResults from "./components/assessment_results.vue";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { ElMessage } from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { REPORT_LOG_ID, YEAR, currentPage, pageSize, type } = route.query;
|
||||
const info = ref({});
|
||||
const color = ref("unset");
|
||||
const border_color = ref("var(--el-border-color-lighter)");
|
||||
const width = ref("100%");
|
||||
const { list } = useListData(getRiskControlMenuView, {
|
||||
usePagination: false,
|
||||
otherParams: { REPORT_LOG_ID },
|
||||
key: "list",
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.log || {};
|
||||
},
|
||||
});
|
||||
const { list: outerList, fnGetData } = useListData(getRiskControlMenuList, {
|
||||
otherParams: { YEAR, currentPage, pageSize },
|
||||
key: "list",
|
||||
immediate: false,
|
||||
});
|
||||
if (type === "edit") fnGetData();
|
||||
const data = reactive({
|
||||
editDialog: {
|
||||
visible: false,
|
||||
form: {},
|
||||
},
|
||||
});
|
||||
const fnGetCurrentData = (row, number) => {
|
||||
return row[fnGetCurrentIndex(row, number)];
|
||||
};
|
||||
const fnGetCurrentIndex = (row, number) => {
|
||||
return row.findIndex((item) => item.COL_NUMBER === number);
|
||||
};
|
||||
const fnEdit = async (row) => {
|
||||
data.editDialog.visible = true;
|
||||
await nextTick();
|
||||
data.editDialog.form = cloneDeep({
|
||||
...row,
|
||||
DESCRITPTION: row.DESCRITPTION || 0,
|
||||
});
|
||||
};
|
||||
const fnAssessmentResultsSubmit = (DESCRITPTION) => {
|
||||
for (let i = 0; i < list.value.length; i++) {
|
||||
const index = list.value[i].findIndex(
|
||||
(item) => item.REPORT_ID === data.editDialog.form.REPORT_ID
|
||||
);
|
||||
if (index > -1) {
|
||||
list.value[i][index].DESCRITPTION = DESCRITPTION + "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
let total = 0;
|
||||
for (let i = 0; i < list.value.length; i++) {
|
||||
for (let j = 0; j < list.value[i].length; j++) {
|
||||
if (list.value[i][j].COL_NUMBER === "5") {
|
||||
if (!isNaN(list.value[i][j].DESCRITPTION)) {
|
||||
total =
|
||||
(total * 100 + Number(list.value[i][j].DESCRITPTION) * 100) / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < list.value.length; i++) {
|
||||
for (let j = 0; j < list.value[i].length; j++) {
|
||||
if (list.value[i][j].AUTOMATIC_FLAG === "2") {
|
||||
list.value[i][j].DESCRITPTION = total;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const listData = [];
|
||||
let info = {};
|
||||
for (let i = 0; i < list.value.length; i++) {
|
||||
for (let j = 0; j < list.value[i].length; j++) {
|
||||
if (
|
||||
list.value[i][j].HAND_MOVEMENT_FLAG === "1" ||
|
||||
list.value[i][j].AUTOMATIC_FLAG === "1" ||
|
||||
list.value[i][j].AUTOMATIC_FLAG === "2"
|
||||
) {
|
||||
listData.push(list.value[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < outerList.value.length; i++) {
|
||||
if (outerList.value[i].REPORT_LOG_ID === REPORT_LOG_ID) {
|
||||
info = outerList.value[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
await setRiskControlMenuSubmit({
|
||||
info: JSON.stringify(info),
|
||||
list: JSON.stringify(listData),
|
||||
});
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pdf-page {
|
||||
//width: 1100px;
|
||||
width: v-bind(width);
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
color: v-bind(color);
|
||||
|
||||
.pdf-cover {
|
||||
top: -1523px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 1497px;
|
||||
background: #fff url("/src/assets/images/print/cover-bg.png") no-repeat 0
|
||||
bottom;
|
||||
|
||||
background-size: 100% 630px;
|
||||
|
||||
.top {
|
||||
padding-top: 400px;
|
||||
|
||||
h1 {
|
||||
font-size: 34px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bot {
|
||||
padding-top: 700px;
|
||||
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
td {
|
||||
border: 1px solid v-bind(border_color);
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title {
|
||||
background: var(--el-fill-color-light);
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,52 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="考评结果" :on-close="fnClose">
|
||||
<el-form ref="formRef" :model="form" :rules="rules">
|
||||
<el-form-item label="考评结果" prop="DESCRITPTION">
|
||||
<el-input-number v-model="form.DESCRITPTION" :min="0" :precision="1" />
|
||||
</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 { useVModels } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "submit"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
DESCRITPTION: [
|
||||
{ required: true, message: "请输入考评结果", trigger: "blur" },
|
||||
{ type: "number", message: "请输入数字", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
emits("submit", form.value.DESCRITPTION);
|
||||
fnClose();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,120 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="报表时间" prop="YEAR">
|
||||
<el-date-picker
|
||||
v-model="searchForm.YEAR"
|
||||
type="year"
|
||||
placeholder="选择年"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
/>
|
||||
</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="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="YEAR" label="报表时间" />
|
||||
<el-table-column prop="CREATTIME" label="报表生成时间" />
|
||||
<el-table-column prop="CREATOR_NAME" label="报表填写人" />
|
||||
<el-table-column prop="" label="操作" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/dynamic_evaluation/risk_control_menu/view',
|
||||
query: {
|
||||
type: 'view',
|
||||
REPORT_LOG_ID: row.REPORT_LOG_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/dynamic_evaluation/risk_control_menu/edit',
|
||||
query: {
|
||||
type: 'edit',
|
||||
REPORT_LOG_ID: row.REPORT_LOG_ID,
|
||||
YEAR: searchForm.YEAR,
|
||||
currentPage: pagination.currentPage,
|
||||
pageSize: pagination.pageSize,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/dynamic_evaluation/risk_control_menu/add',
|
||||
query: { type: 'add' },
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getRiskControlMenuList } from "@/request/dynamic_evaluation.js";
|
||||
import dayjs from "dayjs";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, searchForm, pagination, fnGetData, fnResetPagination } =
|
||||
useListData(getRiskControlMenuList, {
|
||||
defaultSearchForm: {
|
||||
YEAR: dayjs().format("YYYY"),
|
||||
},
|
||||
key: "list",
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -115,8 +115,8 @@ const fnSubmit = debounce(
|
|||
const listData = differenceWith(selectionData, props.listData, (a, b) => {
|
||||
return a.RISKCHECKITEM_ID === b.RISKCHECKITEM_ID;
|
||||
});
|
||||
emits("submit", listData);
|
||||
fnClose();
|
||||
emits("submit", listData);
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
|
|
@ -144,9 +144,9 @@ const fnSubmit = debounce(
|
|||
if (form.value.rectifyImgs[i].raw)
|
||||
await fnUploadImage(currentHiddenId, form.value.rectifyImgs[i].raw, 4);
|
||||
}
|
||||
fnClose();
|
||||
ElMessage.success("保存成功");
|
||||
emits("submit", currentHiddenId);
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="离岗审批" width="600" :on-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="审批" prop="REVIEW_STATUS">
|
||||
<el-radio-group v-model="form.REVIEW_STATUS">
|
||||
<el-radio label="1">通过</el-radio>
|
||||
<el-radio label="-1">打回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="REVIEW_DESC">
|
||||
<el-input
|
||||
v-model="form.REVIEW_DESC"
|
||||
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 { useVModels } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setLeaveReview } from "@/request/off_duty_management.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
REVIEW_STATUS: [
|
||||
{ required: true, message: "请选择审批状态", trigger: "change" },
|
||||
],
|
||||
REVIEW_DESC: [{ required: true, message: "请输入审批意见", trigger: "blur" }],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await setLeaveReview({
|
||||
...form.value,
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,64 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="取消申请" width="600" :on-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="取消原因" prop="REVIEW_DESC">
|
||||
<el-input
|
||||
v-model="form.REVIEW_DESC"
|
||||
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 { useVModels } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setLeaveCancel } from "@/request/off_duty_management.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
REVIEW_DESC: [{ required: true, message: "请输入取消原因", trigger: "blur" }],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await setLeaveCancel({
|
||||
...form.value,
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,108 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="离岗管理" width="600" :on-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="离岗申请时间" prop="offdutyDates">
|
||||
<el-date-picker
|
||||
v-model="form.offdutyDates"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="离岗原因" prop="DESCR">
|
||||
<el-input
|
||||
v-model="form.DESCR"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批人" prop="REVIEW_USER_ID">
|
||||
<el-select v-model="form.REVIEW_USER_ID">
|
||||
<el-option
|
||||
v-for="item in reviewUserList"
|
||||
:key="item.USER_ID"
|
||||
:value="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</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 { useVModels } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
getApprovedByList,
|
||||
setLeaveEdit,
|
||||
} from "@/request/off_duty_management.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
offdutyDates: [
|
||||
{ required: true, message: "请选择离岗申请时间", trigger: "change" },
|
||||
],
|
||||
DESCR: [{ required: true, message: "请输入离岗原因", trigger: "blur" }],
|
||||
REVIEW_USER_ID: [
|
||||
{ required: true, message: "请选择审批人", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const reviewUserList = ref([]);
|
||||
const formRef = ref(null);
|
||||
const fnGetReviewUserList = async () => {
|
||||
const resData = await getApprovedByList({
|
||||
CORPINFO_ID: userStore.getUserInfo.CORPINFO_ID,
|
||||
DEPARTMENT_ID: userStore.getUserInfo.DEPARTMENT_ID,
|
||||
USER_ID: userStore.getUserInfo.USER_ID,
|
||||
});
|
||||
reviewUserList.value = resData.userList;
|
||||
};
|
||||
fnGetReviewUserList();
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await setLeaveEdit({
|
||||
...form.value,
|
||||
STARTTIME: form.value.offdutyDates[0],
|
||||
ENDTIME: form.value.offdutyDates[1],
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -136,7 +136,7 @@
|
|||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="handleReview(row.OFFDUTY_ID)"
|
||||
@click="fnApproval(row.OFFDUTY_ID)"
|
||||
>
|
||||
审批
|
||||
</el-button>
|
||||
|
@ -149,7 +149,7 @@
|
|||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="handleCancel(row.OFFDUTY_ID)"
|
||||
@click="fnCancel(row.OFFDUTY_ID)"
|
||||
>
|
||||
取消
|
||||
</el-button>
|
||||
|
@ -166,6 +166,21 @@
|
|||
v-model:form="data.timeAdjustmentDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
<edit
|
||||
v-model:visible="data.editDialog.visible"
|
||||
v-model:form="data.editDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
<approval
|
||||
v-model:visible="data.approvalDialog.visible"
|
||||
v-model:form="data.approvalDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
<cancel
|
||||
v-model:visible="data.cancelDialog.visible"
|
||||
v-model:form="data.cancelDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -179,6 +194,9 @@ import { useUserStore } from "@/pinia/user.js";
|
|||
import { nextTick, reactive } from "vue";
|
||||
import ViewInfo from "./components/view.vue";
|
||||
import TimeAdjustment from "./components/time_adjustment.vue";
|
||||
import Edit from "./components/edit.vue";
|
||||
import Approval from "./components/approval.vue";
|
||||
import Cancel from "./components/cancel.vue";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "0", NAME: "待审批" },
|
||||
|
@ -209,6 +227,31 @@ const data = reactive({
|
|||
OFFDUTY_ID: "",
|
||||
},
|
||||
},
|
||||
editDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
OFFDUTY_ID: "",
|
||||
offdutyDates: [],
|
||||
DESCR: "",
|
||||
REVIEW_USER_ID: "",
|
||||
},
|
||||
},
|
||||
approvalDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
OFFDUTY_ID: "",
|
||||
REVIEW_DESC: "",
|
||||
REVIEW_STATUS: "",
|
||||
},
|
||||
},
|
||||
cancelDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
OFFDUTY_ID: "",
|
||||
REVIEW_DESC: "",
|
||||
REVIEW_STATUS: "",
|
||||
},
|
||||
},
|
||||
});
|
||||
const buttonJurisdiction = await useButtonJurisdiction("offduty");
|
||||
const fnGetDataTransfer = () => {
|
||||
|
@ -237,7 +280,27 @@ const fnTimeAdjustment = async (OFFDUTY_ID) => {
|
|||
];
|
||||
data.timeAdjustmentDialog.form.OFFDUTY_ID = OFFDUTY_ID;
|
||||
};
|
||||
const fnEdit = async () => {};
|
||||
const fnEdit = async (OFFDUTY_ID) => {
|
||||
data.editDialog.visible = true;
|
||||
await nextTick();
|
||||
const resData = await getLeaveView({ OFFDUTY_ID });
|
||||
data.editDialog.form = resData.pd;
|
||||
data.timeAdjustmentDialog.form.offdutyDates = [
|
||||
resData.pd.STARTTIME,
|
||||
resData.pd.ENDTIME,
|
||||
];
|
||||
};
|
||||
const fnApproval = async (OFFDUTY_ID) => {
|
||||
data.approvalDialog.visible = true;
|
||||
await nextTick();
|
||||
data.approvalDialog.form.OFFDUTY_ID = OFFDUTY_ID;
|
||||
};
|
||||
const fnCancel = async (OFFDUTY_ID) => {
|
||||
data.cancelDialog.visible = true;
|
||||
await nextTick();
|
||||
data.cancelDialog.form.OFFDUTY_ID = OFFDUTY_ID;
|
||||
data.cancelDialog.form.REVIEW_STATUS = "-1";
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关键字" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="离岗时间" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门">
|
||||
<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-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPARTMENT_ALL" label="部门" />
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="NAME" label="用户名称" />
|
||||
<el-table-column prop="CZTIME" label="登录时间" />
|
||||
<el-table-column label="登录方式">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.SOURCE === '1'"> 网页端 </span>
|
||||
<span v-else-if="row.SOURCE === '2'"> APP </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getLoginRecordList } from "@/request/off_duty_management.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getLoginRecordList);
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -68,9 +68,9 @@ const fnSubmit = debounce(
|
|||
let resData = {};
|
||||
if (props.type === "add") resData = await setRiskControlLedgerAdd(params);
|
||||
else resData = await setRiskControlLedgerEdit(params);
|
||||
emits("get-data", resData.pd);
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data", resData.pd);
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view :list-type="['3', '18']" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "../risk_four_color_chart/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,88 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="5">
|
||||
<layout-department-tree
|
||||
:department-id="DEPARTMENT_ID"
|
||||
@node-click="
|
||||
router.push({
|
||||
path: '/risk_statement/job_notification_card',
|
||||
query: {
|
||||
DEPARTMENT_ID: $event.id,
|
||||
},
|
||||
})
|
||||
"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<layout-table
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column post prop="DEPARTMENT_NAME" label="机构" />
|
||||
<el-table-column post prop="NAME" label="岗位" />
|
||||
<el-table-column label="状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.STATUS === '0'">启用</span>
|
||||
<span v-if="row.STATUS === '1'">禁用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="照片">
|
||||
<template v-slot="{ row }">
|
||||
<layout-tooltip-img :imgs="row.imgs" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getPostList } from "@/request/enterprise_management.js";
|
||||
import { ref } from "vue";
|
||||
import LayoutDepartmentTree from "@/components/department_tree/index.vue";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
|
||||
import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const departmentIdDefault = userStore.getUserInfo.DEPARTMENT_ID;
|
||||
const DEPARTMENT_ID = ref(route.query.DEPARTMENT_ID || departmentIdDefault);
|
||||
const { list, pagination, fnGetData, fnResetPagination } = useListData(
|
||||
getPostList,
|
||||
{
|
||||
otherParams: {
|
||||
DEPARTMENT_ID: DEPARTMENT_ID.value,
|
||||
},
|
||||
}
|
||||
);
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPARTMENT_ID: DEPARTMENT_ID.value,
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPARTMENT_ID: DEPARTMENT_ID.value,
|
||||
});
|
||||
};
|
||||
onBeforeRouteUpdate((to) => {
|
||||
DEPARTMENT_ID.value = to.query.DEPARTMENT_ID || departmentIdDefault;
|
||||
fnResetPaginationTransfer();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,101 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="type === 'add' ? '新增' : '修改'"
|
||||
:on-close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="文件名" prop="NAME">
|
||||
<el-input v-model="form.NAME" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="file">
|
||||
<layout-upload
|
||||
v-model:file-list="form.file"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card"
|
||||
delete-to-server
|
||||
: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 { useVModels } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { setAdd, setEdit } from "@/request/risk_statement.js";
|
||||
import { setUploadImg } from "@/request/api.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
listType: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const rules = {
|
||||
NAME: [{ required: true, message: "请输入文件名", trigger: "blur" }],
|
||||
file: [{ 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);
|
||||
const resData =
|
||||
props.type === "add"
|
||||
? await setAdd({
|
||||
...form.value,
|
||||
TYPE: props.listType[0],
|
||||
})
|
||||
: await setEdit({
|
||||
...form.value,
|
||||
TYPE: props.listType[0],
|
||||
});
|
||||
const formData = new FormData();
|
||||
for (let i = 0; i < form.value.file.length; i++) {
|
||||
if (form.value.file[i].raw)
|
||||
formData.append("FFILE", form.value.file[i].raw);
|
||||
}
|
||||
formData.append("FOREIGN_KEY", resData.pd.RISKWARNING_ID);
|
||||
formData.append("TYPE", props.listType[1]);
|
||||
await setUploadImg(formData);
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,203 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="60px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="文件名" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</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="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
row-key="RISKWARNING_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="文件名" />
|
||||
<el-table-column label="图片">
|
||||
<template #default="{ row }">
|
||||
<layout-tooltip-img :imgs="row.imgs" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDownload(row.RISKWARNING_ID)"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnAddOrEdit(row.RISKWARNING_ID, 'edit')"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.RISKWARNING_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-show="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="fnAddOrEdit('', 'add')"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<add
|
||||
v-model:visible="data.addOrEditDialog.visible"
|
||||
v-model:form="data.addOrEditDialog.form"
|
||||
:type="data.addOrEditDialog.type"
|
||||
@get-data="fnResetPagination"
|
||||
:list-type="listType"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { addingPrefixToFile, serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||
import {
|
||||
getList,
|
||||
getView,
|
||||
setBatchDelete,
|
||||
setDelete,
|
||||
} from "@/request/risk_statement.js";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { nextTick, reactive } from "vue";
|
||||
import Add from "./components/add.vue";
|
||||
|
||||
const props = defineProps({
|
||||
listType: {
|
||||
type: Array,
|
||||
required: true,
|
||||
validator: (value) => {
|
||||
if (value.length === 2) {
|
||||
return true;
|
||||
} else {
|
||||
throw new Error("listType必须是长度为2的数组");
|
||||
}
|
||||
},
|
||||
default: () => ["1", "16"],
|
||||
},
|
||||
});
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getList, {
|
||||
otherParams: { TYPE: props.listType[0] },
|
||||
});
|
||||
const data = reactive({
|
||||
addOrEditDialog: {
|
||||
visible: false,
|
||||
type: "",
|
||||
form: {
|
||||
NAME: "",
|
||||
file: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
const buttonJurisdiction = await useButtonJurisdiction("riskwarning");
|
||||
const fnDownload = async (RISKWARNING_ID) => {
|
||||
await ElMessageBox.confirm("确定要下载此文件吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
window.location.href =
|
||||
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||
"riskwarning/goDownload?RISKWARNING_ID=" +
|
||||
RISKWARNING_ID +
|
||||
"&TYPE=" +
|
||||
props.listType[1];
|
||||
};
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (RISKWARNING_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
await setDelete({ RISKWARNING_ID, TYPE: props.listType[1] });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
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.RISKWARNING_ID).join(",");
|
||||
await setBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnAddOrEdit = async (RISKWARNING_ID, type) => {
|
||||
data.addOrEditDialog.visible = true;
|
||||
await nextTick();
|
||||
data.addOrEditDialog.type = type;
|
||||
if (type === "edit") {
|
||||
const resData = await getView({
|
||||
RISKWARNING_ID,
|
||||
TYPE: props.listType[1],
|
||||
});
|
||||
data.addOrEditDialog.form = resData.pd;
|
||||
data.addOrEditDialog.form.file = addingPrefixToFile(resData.imgs);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,62 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="60px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关键字" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</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="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
v-model:pagination="pagination"
|
||||
row-key="RISKWARNING_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="RISKUNITNAME" label="风险点(单元)" />
|
||||
<el-table-column prop="PARTSNAME" label="辨识部位名称" />
|
||||
<el-table-column label="图片">
|
||||
<template #default="{ row }">
|
||||
<layout-tooltip-img :imgs="row.imgs" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||
import { getRiskNotificationCardList } from "@/request/risk_statement.js";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getRiskNotificationCardList);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view :list-type="['4', '19']" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "../risk_four_color_chart/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
Loading…
Reference in New Issue