forked from integrated_whb/integrated_whb_vue
parent
908f306f80
commit
4f57a393b1
2
.env
2
.env
|
@ -1,4 +1,4 @@
|
||||||
VITE_BASE_URL=http://192.168.0.62:8093/
|
VITE_BASE_URL=http://192.168.0.49:8093/
|
||||||
VITE_PROXY=/api/
|
VITE_PROXY=/api/
|
||||||
VITE_FILE_URL=https://file.zcloudchina.com/YTHFile
|
VITE_FILE_URL=https://file.zcloudchina.com/YTHFile
|
||||||
VITE_TEMPLATE_URL=https://qaaq.qhdsafety.com/file/
|
VITE_TEMPLATE_URL=https://qaaq.qhdsafety.com/file/
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -14,6 +14,7 @@
|
||||||
"@icon-park/vue-next": "^1.4.2",
|
"@icon-park/vue-next": "^1.4.2",
|
||||||
"@vueuse/core": "^9.13.0",
|
"@vueuse/core": "^9.13.0",
|
||||||
"@vueuse/integrations": "^10.7.1",
|
"@vueuse/integrations": "^10.7.1",
|
||||||
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"autofit.js": "^3.0.7",
|
"autofit.js": "^3.0.7",
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
"throttle-debounce": "^5.0.0",
|
"throttle-debounce": "^5.0.0",
|
||||||
"v-viewer": "^3.0.11",
|
"v-viewer": "^3.0.11",
|
||||||
"vant": "^4.8.4",
|
"vant": "^4.8.4",
|
||||||
|
"viewerjs": "^1.11.6",
|
||||||
"vue": "^3.4.3",
|
"vue": "^3.4.3",
|
||||||
"vue-countup-v3": "^1.4.1",
|
"vue-countup-v3": "^1.4.1",
|
||||||
"vue-draggable-plus": "^0.3.4",
|
"vue-draggable-plus": "^0.3.4",
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
export const getSafetyOccupationalHazardsList = (params) =>
|
||||||
|
post("/occupationalhazards/listForSecurityOccupationalHazards", params); // 职业危害告知书列表
|
||||||
|
|
||||||
|
export const addOccupationalHazardsView = (params) =>
|
||||||
|
upload("/occupationalhazards/add", params); // 添加 职业危害告知书
|
||||||
|
|
||||||
|
export const editOccupationalHazardsView = (params) =>
|
||||||
|
upload("/occupationalhazards/edit", params); // 修改 职业危害告知书
|
||||||
|
export const infoOccupationalHazardsView = (params) =>
|
||||||
|
upload("/occupationalhazards/goEdit", params); // 详情 职业危害告知书
|
|
@ -0,0 +1,8 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
export const getSafetyCommitmentList = (params) =>
|
||||||
|
post("/commitment/listForSecurityCommitment", params); // 承诺书列表
|
||||||
|
|
||||||
|
export const addCommitmentView = (params) => upload("/commitment/add", params); // 添加 承诺书
|
||||||
|
|
||||||
|
export const editCommitmentView = (params) =>
|
||||||
|
upload("/commitment/edit", params); // 修改 承诺书
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
export const getSafetyContractList = (params) =>
|
||||||
|
post("/laborcontract/listForSecurityStaffing", params); // 合同列表
|
||||||
|
|
||||||
|
export const addContractView = (params) => upload("/laborcontract/add", params); // 添加 合同
|
||||||
|
|
||||||
|
export const editContractView = (params) =>
|
||||||
|
upload("/laborcontract/edit", params); // 修改 合同
|
||||||
|
export const infoContractView = (params) =>
|
||||||
|
upload("/laborcontract/goEdit", params); // 详情 合同
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { post, upload } from "@/request/axios.js";
|
||||||
|
export const getSafetyResponsibilityList = (params) =>
|
||||||
|
post("/responsibility/listForSecurityResponsibility", params); // 岗位安全责任书列表
|
||||||
|
|
||||||
|
export const addResponsibilityView = (params) =>
|
||||||
|
upload("/responsibility/add", params); // 添加 岗位安全责任书
|
||||||
|
|
||||||
|
export const editResponsibilityView = (params) =>
|
||||||
|
upload("/responsibility/edit", params); // 修改 岗位安全责任书
|
||||||
|
export const infoResponsibilityView = (params) =>
|
||||||
|
upload("/responsibility/goEdit", params); // 详情 岗位安全责任书
|
|
@ -0,0 +1,162 @@
|
||||||
|
<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 v-if="type === 'add'" label="合同名称" prop="CONTRACTNAME">
|
||||||
|
<el-input
|
||||||
|
v-model="form.CONTRACTNAME"
|
||||||
|
placeholder="请输入合同名称"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'edit'"
|
||||||
|
label="经营企业"
|
||||||
|
prop="OPERATINGCOMPANY"
|
||||||
|
>
|
||||||
|
<span>{{ operatingCompany }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="合同文件" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.file"
|
||||||
|
accept=".pdf"
|
||||||
|
:limit="9"
|
||||||
|
:before-upload="fnUpload"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="到期时间" prop="EXPIRYDATE">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.EXPIRYDATE"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="备注" prop="MEETING_CONTENT">
|
||||||
|
<layout-editor
|
||||||
|
v-model="form.MEETING_CONTENT"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</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 { onMounted, ref, toRaw } from "vue";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import LayoutEditor from "@/components/editor/index.vue";
|
||||||
|
import {
|
||||||
|
addContractView,
|
||||||
|
editContractView,
|
||||||
|
getSafetyContractList,
|
||||||
|
} from "@/request/traffic_safety_contract.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: {},
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
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 = {
|
||||||
|
file: [{ required: true, message: "请上传合同文件附件", trigger: "change" }],
|
||||||
|
CONTRACTNAME: [
|
||||||
|
{ required: true, message: "请输入合同名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const operatingCompany = ref("");
|
||||||
|
onMounted(async () => {
|
||||||
|
const resData = await getSafetyContractList();
|
||||||
|
if (resData && resData.varList && resData.varList.length > 0) {
|
||||||
|
operatingCompany.value = resData.varList[0].CORP_NAME;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmit = async () => {
|
||||||
|
await formRef.value.validate();
|
||||||
|
|
||||||
|
const rawFormValue = toRaw(form.value);
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
// 处理文件上传
|
||||||
|
if (Array.isArray(rawFormValue.file)) {
|
||||||
|
rawFormValue.file.forEach((fileItem) => {
|
||||||
|
if (fileItem.raw) {
|
||||||
|
formData.append("FFILE", fileItem.raw);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Object.keys(rawFormValue).forEach((key) => {
|
||||||
|
if (key !== "file") {
|
||||||
|
formData.append(key, rawFormValue[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 执行添加或编辑操作
|
||||||
|
if (props.type === "add") {
|
||||||
|
formData.append("USER_ID", rawFormValue.USER_ID);
|
||||||
|
await addContractView(formData);
|
||||||
|
} else {
|
||||||
|
formData.append("LABORCONTRACT_ID", rawFormValue.LABORCONTRACT_ID);
|
||||||
|
await editContractView(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作成功提示
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
|
||||||
|
// 关闭表单对话框
|
||||||
|
fnClose();
|
||||||
|
|
||||||
|
// 触发更新数据的事件
|
||||||
|
emits("get-data");
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnUpload = (file) => {
|
||||||
|
const isLt100M = file.size / 1024 / 1024 < 100;
|
||||||
|
if (!isLt100M) {
|
||||||
|
ElMessage.error("文件大小不能超过100M");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<layout-card>
|
||||||
|
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||||
|
<div v-if="loading">加载中...</div>
|
||||||
|
<div v-else>文件已尝试打开,请检查您的下载文件夹或弹出窗口设置。</div>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { infoStaffingView } from "@/request/traffic_safety_staffing.js";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const STAFFING_ID = route.query.STAFFING_ID;
|
||||||
|
const loading = ref(true); // 用于指示文件是否正在加载
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const response = await infoStaffingView({ STAFFING_ID });
|
||||||
|
loading.value = false; // 加载完成
|
||||||
|
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
|
||||||
|
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,163 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="100px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="合同名称" prop="CONTRACTNAME">
|
||||||
|
<el-input v-model="searchForm.CONTRACTNAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="完成状态" prop="COMPLETIONSTATUS">
|
||||||
|
<el-select v-model="searchForm.COMPLETIONSTATUS">
|
||||||
|
<el-option label="已上传" :value="1" />
|
||||||
|
<el-option label="未上传" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<el-select v-model="searchForm.VALIDSTATUS">
|
||||||
|
<el-option label="正常" :value="1" />
|
||||||
|
<el-option label="未生效" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</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"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
row-key="LABORCONTRACT_ID"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="NEWCONTRACTNAME" label="合同名称" width="250" />
|
||||||
|
<el-table-column prop="COMPLETIONSTATUS" label="完成状态" width="250">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.COMPLETIONSTATUS === '1'">已上传</el-tag>
|
||||||
|
<el-tag v-else>未上传</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.VALIDSTATUS === '1'">正常</el-tag>
|
||||||
|
<el-tag v-else>未生效</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CORP_NAME" label="经营企业" width="150" />
|
||||||
|
<el-table-column prop="OPERATIONTYPE" label="经营类型" width="150" />
|
||||||
|
<el-table-column prop="EXPIRYDATE" label="到期时间" width="150" />
|
||||||
|
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
|
||||||
|
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
|
||||||
|
<el-table-column label="操作" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/labor_contract/details',
|
||||||
|
query: {
|
||||||
|
LABORCONTRACT_ID: row.LABORCONTRACT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.LABORCONTRACT_ID, '', 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', row.USER_ID, 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { nextTick, reactive, watchEffect } from "vue";
|
||||||
|
import router from "@/router/index.js";
|
||||||
|
|
||||||
|
import { getSafetyContractList } from "@/request/traffic_safety_contract.js";
|
||||||
|
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getSafetyContractList);
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (list.value.length > 0) {
|
||||||
|
list.value.forEach((item) => {
|
||||||
|
item.NEWCONTRACTNAME = `${item.NAME} 合同书`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const fnAddOrEdit = async (
|
||||||
|
LABORCONTRACT_ID = "",
|
||||||
|
USER_ID = "",
|
||||||
|
type = "add"
|
||||||
|
) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
data.addOrEditDialog.form = {};
|
||||||
|
if (type === "edit" && LABORCONTRACT_ID) {
|
||||||
|
data.addOrEditDialog.form.LABORCONTRACT_ID = LABORCONTRACT_ID;
|
||||||
|
} else {
|
||||||
|
data.addOrEditDialog.form = { USER_ID };
|
||||||
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -18,13 +18,13 @@
|
||||||
>
|
>
|
||||||
<span>{{ operatingCompany }}</span>
|
<span>{{ operatingCompany }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<!-- <el-form-item-->
|
||||||
v-if="type === 'edit'"
|
<!-- v-if="type === 'edit'"-->
|
||||||
label="经营类型"
|
<!-- label="经营类型"-->
|
||||||
prop="OPERATIONTYPE"
|
<!-- prop="OPERATIONTYPE"-->
|
||||||
>
|
<!-- >-->
|
||||||
<span>{{ operationType }}</span>
|
<!-- <span>{{ operationType }}</span>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="会议文本附件" prop="file">
|
<el-form-item label="会议文本附件" prop="file">
|
||||||
<layout-upload
|
<layout-upload
|
||||||
v-model:file-list="form.file"
|
v-model:file-list="form.file"
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<layout-card>
|
|
||||||
<el-descriptions :column="1" border>
|
|
||||||
<el-descriptions-item label="会议标题">
|
|
||||||
{{ detailItems.MEETING_TITLE }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="运输企业">
|
|
||||||
{{ detailItems.CORP_NAME }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="主持人">
|
|
||||||
{{ detailItems.HOST_PERSON }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="记录人">
|
|
||||||
{{ detailItems.RECORDER }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="会议时间">
|
|
||||||
{{ detailItems.MEETING_DATE_START }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="截止时间">
|
|
||||||
{{ detailItems.MEETING_DATE_END }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="会议类型">
|
|
||||||
<template v-if="detailItems.MEETING_TYPE === '1'">
|
|
||||||
安全生产例会
|
|
||||||
</template>
|
|
||||||
<template v-else-if="detailItems.MEETING_TYPE === '2'">
|
|
||||||
安全生产委员会会议
|
|
||||||
</template>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="会议内容">
|
|
||||||
{{ detailItems.MEETING_CONTENT }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<!-- <el-descriptions-item label="备注">-->
|
|
||||||
<!-- {{ detailItems.NOTES }}-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<el-descriptions-item label="远程参会人员">
|
|
||||||
应参会{{ detailItems.totalPersonNum }}/人,实参人数{{
|
|
||||||
detailItems.realPersonNum
|
|
||||||
}}/人
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-table
|
|
||||||
:border="true"
|
|
||||||
:data="detailItems.recipientsList"
|
|
||||||
:show-header="false"
|
|
||||||
>
|
|
||||||
<el-table-column label="NAME1" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<img :src="row.AVATAR" alt="Avatar" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="NAME2" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ row.PRACTITIONER }}<br />
|
|
||||||
{{ row.CONTACT_PHONE }}<br />
|
|
||||||
{{ row.HOME_ADDRESS }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="NAME3" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<img :src="row.SIGNATUREPICTURE" alt="Signature" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</layout-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { onMounted, reactive } from "vue";
|
|
||||||
import { getSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
const route = useRoute();
|
|
||||||
const { SAFETY_MEETING_ID } = route.query;
|
|
||||||
const detailItems = reactive({
|
|
||||||
MEETING_TITLE: "",
|
|
||||||
TRANSPORTATIONCOMPANY: "",
|
|
||||||
HOST_PERSON: "",
|
|
||||||
RECORDER: "",
|
|
||||||
MEETING_DATE_START: "",
|
|
||||||
MEETING_DATE_END: "",
|
|
||||||
MEETING_TYPE: "",
|
|
||||||
MEETING_CONTENT: "",
|
|
||||||
recipientsInfo: "",
|
|
||||||
totalPersonNum: "",
|
|
||||||
realPersonNum: "",
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const response = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
|
||||||
Object.assign(detailItems, response.pd);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
|
@ -0,0 +1,171 @@
|
||||||
|
<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
|
||||||
|
v-if="type === 'add'"
|
||||||
|
label="职业危害告知书"
|
||||||
|
prop="OCCUPATIONALNAME"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.OCCUPATIONALNAME"
|
||||||
|
placeholder="请输入职业危害告知书名称"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'edit'"
|
||||||
|
label="经营企业"
|
||||||
|
prop="OPERATINGCOMPANY"
|
||||||
|
>
|
||||||
|
<span>{{ operatingCompany }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="职业危害告知书" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.file"
|
||||||
|
accept=".pdf"
|
||||||
|
:limit="9"
|
||||||
|
:before-upload="fnUpload"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="到期时间" prop="EXPIRYDATE">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.EXPIRYDATE"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="备注" prop="MEETING_CONTENT">
|
||||||
|
<layout-editor
|
||||||
|
v-model="form.MEETING_CONTENT"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</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 { onMounted, ref, toRaw } from "vue";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import LayoutEditor from "@/components/editor/index.vue";
|
||||||
|
import {
|
||||||
|
addOccupationalHazardsView,
|
||||||
|
editOccupationalHazardsView,
|
||||||
|
getSafetyOccupationalHazardsList,
|
||||||
|
} from "@/request/traffic_occupational_hazards.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: {},
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
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 = {
|
||||||
|
file: [
|
||||||
|
{ required: true, message: "请上传职业危害告知书", trigger: "change" },
|
||||||
|
],
|
||||||
|
OCCUPATIONALNAME: [
|
||||||
|
{ required: true, message: "请输入职业危害告知书名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const operatingCompany = ref("");
|
||||||
|
onMounted(async () => {
|
||||||
|
const resData = await getSafetyOccupationalHazardsList();
|
||||||
|
if (resData && resData.varList && resData.varList.length > 0) {
|
||||||
|
operatingCompany.value = resData.varList[0].CORP_NAME;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmit = async () => {
|
||||||
|
await formRef.value.validate();
|
||||||
|
|
||||||
|
const rawFormValue = toRaw(form.value);
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
// 处理文件上传
|
||||||
|
if (Array.isArray(rawFormValue.file)) {
|
||||||
|
rawFormValue.file.forEach((fileItem) => {
|
||||||
|
if (fileItem.raw) {
|
||||||
|
formData.append("FFILE", fileItem.raw);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Object.keys(rawFormValue).forEach((key) => {
|
||||||
|
if (key !== "file") {
|
||||||
|
formData.append(key, rawFormValue[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 执行添加或编辑操作
|
||||||
|
if (props.type === "add") {
|
||||||
|
formData.append("USER_ID", rawFormValue.USER_ID);
|
||||||
|
await addOccupationalHazardsView(formData);
|
||||||
|
} else {
|
||||||
|
formData.append(
|
||||||
|
"SAFETYRESPONSIBILITY_ID",
|
||||||
|
rawFormValue.SAFETYRESPONSIBILITY_ID
|
||||||
|
);
|
||||||
|
await editOccupationalHazardsView(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作成功提示
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
|
||||||
|
// 关闭表单对话框
|
||||||
|
fnClose();
|
||||||
|
|
||||||
|
// 触发更新数据的事件
|
||||||
|
emits("get-data");
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnUpload = (file) => {
|
||||||
|
const isLt100M = file.size / 1024 / 1024 < 100;
|
||||||
|
if (!isLt100M) {
|
||||||
|
ElMessage.error("文件大小不能超过100M");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<layout-card>
|
||||||
|
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||||
|
<div v-if="loading">加载中...</div>
|
||||||
|
<div v-else>文件已尝试打开,请检查您的下载文件夹或弹出窗口设置。</div>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { infoOccupationalHazardsView } from "@/request/traffic_occupational_hazards.js";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const OCCUPATIONALHAZARDS_ID = route.query.OCCUPATIONALHAZARDS_ID;
|
||||||
|
const loading = ref(true); // 用于指示文件是否正在加载
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const response = await infoOccupationalHazardsView({
|
||||||
|
OCCUPATIONALHAZARDS_ID,
|
||||||
|
});
|
||||||
|
loading.value = false; // 加载完成
|
||||||
|
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
|
||||||
|
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,166 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="100px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="职业危害告知书" prop="OCCUPATIONALNAME">
|
||||||
|
<el-input v-model="searchForm.OCCUPATIONALNAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="完成状态" prop="COMPLETIONSTATUS">
|
||||||
|
<el-select v-model="searchForm.COMPLETIONSTATUS">
|
||||||
|
<el-option label="已上传" :value="1" />
|
||||||
|
<el-option label="未上传" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<el-select v-model="searchForm.VALIDSTATUS">
|
||||||
|
<el-option label="正常" :value="1" />
|
||||||
|
<el-option label="未生效" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</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"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
row-key="LABORCONTRACT_ID"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="NEWOCCUPATIONALNAME"
|
||||||
|
label="职业危害告知书"
|
||||||
|
width="250"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="COMPLETIONSTATUS" label="完成状态" width="250">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.COMPLETIONSTATUS === '1'">已上传</el-tag>
|
||||||
|
<el-tag v-else>未上传</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.VALIDSTATUS === '1'">正常</el-tag>
|
||||||
|
<el-tag v-else>未生效</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CORP_NAME" label="经营企业" width="150" />
|
||||||
|
<el-table-column prop="OPERATIONTYPE" label="经营类型" width="150" />
|
||||||
|
<el-table-column prop="EXPIRYDATE" label="到期时间" width="150" />
|
||||||
|
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
|
||||||
|
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
|
||||||
|
<el-table-column label="操作" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/labor_contract/details',
|
||||||
|
query: {
|
||||||
|
OCCUPATIONALHAZARDS_ID: row.OCCUPATIONALHAZARDS_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.OCCUPATIONALHAZARDS_ID, '', 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', row.USER_ID, 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { nextTick, reactive, watchEffect } from "vue";
|
||||||
|
import router from "@/router/index.js";
|
||||||
|
import { getSafetyOccupationalHazardsList } from "@/request/traffic_occupational_hazards.js";
|
||||||
|
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getSafetyOccupationalHazardsList);
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (list.value.length > 0) {
|
||||||
|
list.value.forEach((item) => {
|
||||||
|
item.NEWOCCUPATIONALNAME = `${item.NAME} 职业危害告知书`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const fnAddOrEdit = async (
|
||||||
|
OCCUPATIONALHAZARDS_ID = "",
|
||||||
|
USER_ID = "",
|
||||||
|
type = "add"
|
||||||
|
) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
data.addOrEditDialog.form = {};
|
||||||
|
if (type === "edit" && OCCUPATIONALHAZARDS_ID) {
|
||||||
|
data.addOrEditDialog.form.OCCUPATIONALHAZARDS_ID = OCCUPATIONALHAZARDS_ID;
|
||||||
|
} else {
|
||||||
|
data.addOrEditDialog.form = { USER_ID };
|
||||||
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -139,6 +139,7 @@ import LayoutEditor from "@/components/editor/index.vue";
|
||||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import SelectPerson from "@/views/safety_production_related/security_notice/components/select_person.vue";
|
import SelectPerson from "@/views/safety_production_related/security_notice/components/select_person.vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const rules = {
|
const rules = {
|
||||||
MEETING_TITLE: [
|
MEETING_TITLE: [
|
||||||
|
@ -160,6 +161,7 @@ const rules = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
const fnGetUnitsList = async () => {
|
const fnGetUnitsList = async () => {
|
||||||
const resData = await getUserListAll({});
|
const resData = await getUserListAll({});
|
||||||
data.unitsList = resData.varList;
|
data.unitsList = resData.varList;
|
||||||
|
@ -205,20 +207,9 @@ const fnSubmit = async () => {
|
||||||
if (video.raw) formData.append("VVIDEO", video.raw); // 注意: 用不同的字段名区分文件和视频
|
if (video.raw) formData.append("VVIDEO", video.raw); // 注意: 用不同的字段名区分文件和视频
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
|
||||||
await addSafetyMeetingView(formData);
|
await addSafetyMeetingView(formData);
|
||||||
ElMessage.success("添加成功");
|
ElMessage.success("添加成功");
|
||||||
// 清空表单
|
router.push("/safety_production_related/safety_meeting");
|
||||||
Object.keys(data.form).forEach((key) => {
|
|
||||||
if (Array.isArray(data.form[key])) {
|
|
||||||
data.form[key] = [];
|
|
||||||
} else {
|
|
||||||
data.form[key] = "";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
ElMessage.error("添加失败");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const fnUpload = (file) => {
|
const fnUpload = (file) => {
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
@submit.prevent="searchNotifications"
|
@submit.prevent="searchNotifications"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="从业人员" prop="PRACTITIONER">
|
<el-form-item label="从业人员" prop="PRACTITIONER">
|
||||||
<el-input v-model="searchForm.PRACTITIONER" />
|
<el-input v-model="searchForm.PRACTITIONER" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="从业类型" prop="PRACTITIONER_TYPE">
|
<el-form-item label="从业类型" prop="PRACTITIONER_TYPE">
|
||||||
<el-select v-model="searchForm.PRACTITIONER_TYPE">
|
<el-select v-model="searchForm.PRACTITIONER_TYPE">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="参会状态" prop="ATTENDANCE_STATUS">
|
<el-form-item label="参会状态" prop="ATTENDANCE_STATUS">
|
||||||
<el-select v-model="searchForm.ATTENDANCE_STATUS">
|
<el-select v-model="searchForm.ATTENDANCE_STATUS">
|
||||||
<el-option label="已参会" :value="1" />
|
<el-option label="已参会" :value="1" />
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
<el-button native-type="reset" @click="resetSearchForm"
|
<el-button native-type="reset" @click="resetSearchForm"
|
||||||
|
|
|
@ -56,10 +56,15 @@
|
||||||
<el-table-column label="手机号" align="center">
|
<el-table-column label="手机号" align="center">
|
||||||
<template #default="{ row }"> {{ row.USERNAME }}<br /> </template>
|
<template #default="{ row }"> {{ row.USERNAME }}<br /> </template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="参会地址" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.LOCATIONADDRESS }}<br />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="参会证明" align="center">
|
<el-table-column label="参会证明" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<img
|
<img
|
||||||
:src="row.SIGNATUREPICTURE"
|
:src="VITE_FILE_URL + row.SIGNATUREPICTURE"
|
||||||
alt="Signature"
|
alt="Signature"
|
||||||
style="
|
style="
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
|
@ -69,7 +74,7 @@
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
:src="row.LIVEPHOTOS"
|
:src="VITE_FILE_URL + row.LIVEPHOTOS"
|
||||||
alt="LivePhoto"
|
alt="LivePhoto"
|
||||||
style="
|
style="
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
|
@ -90,6 +95,7 @@ import { onMounted, reactive } from "vue";
|
||||||
import { getSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
import { getSafetyMeetingView } from "@/request/traffic_safety_meeting.js";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||||
const { SAFETY_MEETING_ID } = route.query;
|
const { SAFETY_MEETING_ID } = route.query;
|
||||||
const detailItems = reactive({
|
const detailItems = reactive({
|
||||||
MEETING_TITLE: "",
|
MEETING_TITLE: "",
|
||||||
|
@ -99,6 +105,8 @@ const detailItems = reactive({
|
||||||
MEETING_DATE_START: "",
|
MEETING_DATE_START: "",
|
||||||
MEETING_DATE_END: "",
|
MEETING_DATE_END: "",
|
||||||
MEETING_TYPE: "",
|
MEETING_TYPE: "",
|
||||||
|
LIVEPHOTOS: "",
|
||||||
|
SIGNATUREPICTURE: "",
|
||||||
MEETING_CONTENT: "",
|
MEETING_CONTENT: "",
|
||||||
recipientsInfo: "",
|
recipientsInfo: "",
|
||||||
totalPersonNum: "",
|
totalPersonNum: "",
|
||||||
|
@ -107,6 +115,7 @@ const detailItems = reactive({
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const response = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
const response = await getSafetyMeetingView({ SAFETY_MEETING_ID });
|
||||||
|
console.log(response, "1111111111111111111111");
|
||||||
Object.assign(detailItems, response.pd);
|
Object.assign(detailItems, response.pd);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -112,6 +112,7 @@ import SelectPerson from "./components/select_person.vue";
|
||||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
import { getSecurityPerson } from "@/request/waybill_registration.js";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const rules = {
|
const rules = {
|
||||||
TITLE: [{ required: true, message: "请输入通知标题", trigger: "blur" }],
|
TITLE: [{ required: true, message: "请输入通知标题", trigger: "blur" }],
|
||||||
|
@ -127,7 +128,7 @@ const relatedClassificationList = [];
|
||||||
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
||||||
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
|
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
|
||||||
});
|
});
|
||||||
|
const router = useRouter();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
TITLE: "",
|
TITLE: "",
|
||||||
|
@ -179,25 +180,13 @@ const fnSubmit = async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
|
||||||
await addSecurityNotice(formData);
|
await addSecurityNotice(formData);
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: "添加成功",
|
message: "添加成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
});
|
});
|
||||||
// 清空表单
|
router.push("/safety_production_related/security_notice");
|
||||||
Object.keys(data.form).forEach((key) => {
|
|
||||||
if (Array.isArray(data.form[key])) {
|
|
||||||
data.form[key] = []; // 如果是数组,重置为空数组
|
|
||||||
} else {
|
|
||||||
data.form[key] = ""; // 否则重置为空字符串
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
ElMessage.error("添加失败");
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const fnSelectPersonSubmit = (selectionData) => {
|
const fnSelectPersonSubmit = (selectionData) => {
|
||||||
|
|
|
@ -0,0 +1,171 @@
|
||||||
|
<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
|
||||||
|
v-if="type === 'add'"
|
||||||
|
label="岗位安全责任书"
|
||||||
|
prop="CONTRACTNAME"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.CONTRACTNAME"
|
||||||
|
placeholder="请输入岗位安全责任书"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'edit'"
|
||||||
|
label="经营企业"
|
||||||
|
prop="OPERATINGCOMPANY"
|
||||||
|
>
|
||||||
|
<span>{{ operatingCompany }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="岗位安全责任书" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.file"
|
||||||
|
accept=".pdf"
|
||||||
|
:limit="9"
|
||||||
|
:before-upload="fnUpload"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="到期时间" prop="EXPIRYDATE">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.EXPIRYDATE"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="备注" prop="MEETING_CONTENT">
|
||||||
|
<layout-editor
|
||||||
|
v-model="form.MEETING_CONTENT"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</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 { onMounted, ref, toRaw } from "vue";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import LayoutEditor from "@/components/editor/index.vue";
|
||||||
|
import {
|
||||||
|
addResponsibilityView,
|
||||||
|
editResponsibilityView,
|
||||||
|
getSafetyResponsibilityList,
|
||||||
|
} from "@/request/traffic_safety_responsibility.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: {},
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
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 = {
|
||||||
|
file: [
|
||||||
|
{ required: true, message: "请上传岗位安全责任书", trigger: "change" },
|
||||||
|
],
|
||||||
|
CONTRACTNAME: [
|
||||||
|
{ required: true, message: "请输入岗位安全责任书名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const operatingCompany = ref("");
|
||||||
|
onMounted(async () => {
|
||||||
|
const resData = await getSafetyResponsibilityList();
|
||||||
|
if (resData && resData.varList && resData.varList.length > 0) {
|
||||||
|
operatingCompany.value = resData.varList[0].CORP_NAME;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmit = async () => {
|
||||||
|
await formRef.value.validate();
|
||||||
|
|
||||||
|
const rawFormValue = toRaw(form.value);
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
// 处理文件上传
|
||||||
|
if (Array.isArray(rawFormValue.file)) {
|
||||||
|
rawFormValue.file.forEach((fileItem) => {
|
||||||
|
if (fileItem.raw) {
|
||||||
|
formData.append("FFILE", fileItem.raw);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Object.keys(rawFormValue).forEach((key) => {
|
||||||
|
if (key !== "file") {
|
||||||
|
formData.append(key, rawFormValue[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 执行添加或编辑操作
|
||||||
|
if (props.type === "add") {
|
||||||
|
formData.append("USER_ID", rawFormValue.USER_ID);
|
||||||
|
await addResponsibilityView(formData);
|
||||||
|
} else {
|
||||||
|
formData.append(
|
||||||
|
"SAFETYRESPONSIBILITY_ID",
|
||||||
|
rawFormValue.SAFETYRESPONSIBILITY_ID
|
||||||
|
);
|
||||||
|
await editResponsibilityView(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作成功提示
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
|
||||||
|
// 关闭表单对话框
|
||||||
|
fnClose();
|
||||||
|
|
||||||
|
// 触发更新数据的事件
|
||||||
|
emits("get-data");
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnUpload = (file) => {
|
||||||
|
const isLt100M = file.size / 1024 / 1024 < 100;
|
||||||
|
if (!isLt100M) {
|
||||||
|
ElMessage.error("文件大小不能超过100M");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<layout-card>
|
||||||
|
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||||
|
<div v-if="loading">加载中...</div>
|
||||||
|
<div v-else>文件已尝试打开,请检查您的下载文件夹或弹出窗口设置。</div>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { infoStaffingView } from "@/request/traffic_safety_staffing.js";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const SAFETYRESPONSIBILITY_ID = route.query.SAFETYRESPONSIBILITY_ID;
|
||||||
|
const loading = ref(true); // 用于指示文件是否正在加载
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const response = await infoStaffingView({ SAFETYRESPONSIBILITY_ID });
|
||||||
|
loading.value = false; // 加载完成
|
||||||
|
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,166 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="100px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="岗位安全责任书" prop="RESPONSIBILITYNAME">
|
||||||
|
<el-input v-model="searchForm.RESPONSIBILITYNAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="完成状态" prop="COMPLETIONSTATUS">
|
||||||
|
<el-select v-model="searchForm.COMPLETIONSTATUS">
|
||||||
|
<el-option label="已上传" :value="1" />
|
||||||
|
<el-option label="未上传" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<el-select v-model="searchForm.VALIDSTATUS">
|
||||||
|
<el-option label="正常" :value="1" />
|
||||||
|
<el-option label="未生效" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</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"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
row-key="LABORCONTRACT_ID"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="NEWCONTRACTNAME"
|
||||||
|
label="岗位安全责任书"
|
||||||
|
width="250"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="COMPLETIONSTATUS" label="完成状态" width="250">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.COMPLETIONSTATUS === '1'">已上传</el-tag>
|
||||||
|
<el-tag v-else>未上传</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.VALIDSTATUS === '1'">正常</el-tag>
|
||||||
|
<el-tag v-else>未生效</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CORP_NAME" label="经营企业" width="150" />
|
||||||
|
<el-table-column prop="OPERATIONTYPE" label="经营类型" width="150" />
|
||||||
|
<el-table-column prop="EXPIRYDATE" label="到期时间" width="150" />
|
||||||
|
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
|
||||||
|
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
|
||||||
|
<el-table-column label="操作" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/labor_contract/details',
|
||||||
|
query: {
|
||||||
|
SAFETYRESPONSIBILITY_ID: row.SAFETYRESPONSIBILITY_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.SAFETYRESPONSIBILITY_ID, '', 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', row.USER_ID, 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { nextTick, reactive, watchEffect } from "vue";
|
||||||
|
import router from "@/router/index.js";
|
||||||
|
import { getSafetyResponsibilityList } from "@/request/traffic_safety_responsibility.js";
|
||||||
|
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getSafetyResponsibilityList);
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (list.value.length > 0) {
|
||||||
|
list.value.forEach((item) => {
|
||||||
|
item.NEWCONTRACTNAME = `${item.NAME} 岗位安全责任书`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const fnAddOrEdit = async (
|
||||||
|
SAFETYRESPONSIBILITY_ID = "",
|
||||||
|
USER_ID = "",
|
||||||
|
type = "add"
|
||||||
|
) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
data.addOrEditDialog.form = {};
|
||||||
|
if (type === "edit" && SAFETYRESPONSIBILITY_ID) {
|
||||||
|
data.addOrEditDialog.form.SAFETYRESPONSIBILITY_ID = SAFETYRESPONSIBILITY_ID;
|
||||||
|
} else {
|
||||||
|
data.addOrEditDialog.form = { USER_ID };
|
||||||
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,171 @@
|
||||||
|
<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
|
||||||
|
v-if="type === 'add'"
|
||||||
|
label="承诺书名称"
|
||||||
|
prop="COMMITMENTNAME"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.COMMITMENTNAME"
|
||||||
|
placeholder="请输入承诺书名称"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="type === 'edit'"
|
||||||
|
label="经营企业"
|
||||||
|
prop="OPERATINGCOMPANY"
|
||||||
|
>
|
||||||
|
<span>{{ operatingCompany }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="承诺书文件" prop="file">
|
||||||
|
<layout-upload
|
||||||
|
v-model:file-list="form.file"
|
||||||
|
accept=".pdf"
|
||||||
|
:limit="9"
|
||||||
|
:before-upload="fnUpload"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="到期时间" prop="EXPIRYDATE">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.EXPIRYDATE"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="type === 'add'" label="备注" prop="MEETING_CONTENT">
|
||||||
|
<layout-editor
|
||||||
|
v-model="form.MEETING_CONTENT"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</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 { onMounted, ref, toRaw } from "vue";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
|
import LayoutEditor from "@/components/editor/index.vue";
|
||||||
|
import {
|
||||||
|
addCommitmentView,
|
||||||
|
editCommitmentView,
|
||||||
|
getSafetyCommitmentList,
|
||||||
|
} from "@/request/traffic_safety_commitment.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: {},
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
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 = {
|
||||||
|
file: [
|
||||||
|
{ required: true, message: "请上传承诺书文件附件", trigger: "change" },
|
||||||
|
],
|
||||||
|
COMMITMENTNAME: [
|
||||||
|
{ required: true, message: "请输入承诺书名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const operatingCompany = ref("");
|
||||||
|
onMounted(async () => {
|
||||||
|
const resData = await getSafetyCommitmentList();
|
||||||
|
if (resData && resData.varList && resData.varList.length > 0) {
|
||||||
|
operatingCompany.value = resData.varList[0].CORP_NAME;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmit = async () => {
|
||||||
|
await formRef.value.validate();
|
||||||
|
|
||||||
|
const rawFormValue = toRaw(form.value);
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
// 处理文件上传
|
||||||
|
if (Array.isArray(rawFormValue.file)) {
|
||||||
|
rawFormValue.file.forEach((fileItem) => {
|
||||||
|
if (fileItem.raw) {
|
||||||
|
formData.append("FFILE", fileItem.raw);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Object.keys(rawFormValue).forEach((key) => {
|
||||||
|
if (key !== "file") {
|
||||||
|
formData.append(key, rawFormValue[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 执行添加或编辑操作
|
||||||
|
if (props.type === "add") {
|
||||||
|
formData.append("USER_ID", rawFormValue.USER_ID);
|
||||||
|
await addCommitmentView(formData);
|
||||||
|
} else {
|
||||||
|
formData.append(
|
||||||
|
"SECURITYCOMMITMENT_ID",
|
||||||
|
rawFormValue.SECURITYCOMMITMENT_ID
|
||||||
|
);
|
||||||
|
await editCommitmentView(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作成功提示
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
|
||||||
|
// 关闭表单对话框
|
||||||
|
fnClose();
|
||||||
|
|
||||||
|
// 触发更新数据的事件
|
||||||
|
emits("get-data");
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnUpload = (file) => {
|
||||||
|
const isLt100M = file.size / 1024 / 1024 < 100;
|
||||||
|
if (!isLt100M) {
|
||||||
|
ElMessage.error("文件大小不能超过100M");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<layout-card>
|
||||||
|
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||||
|
<div v-if="loading">加载中...</div>
|
||||||
|
<div v-else>文件已尝试打开,请检查您的下载文件夹或弹出窗口设置。</div>
|
||||||
|
</layout-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { infoStaffingView } from "@/request/traffic_safety_staffing.js";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const SECURITYCOMMITMENT_ID = route.query.SECURITYCOMMITMENT_ID;
|
||||||
|
const loading = ref(true); // 用于指示文件是否正在加载
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const response = await infoStaffingView({ SECURITYCOMMITMENT_ID });
|
||||||
|
loading.value = false; // 加载完成
|
||||||
|
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
|
||||||
|
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -0,0 +1,167 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="100px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="承诺书名称" prop="COMMITMENTNAME">
|
||||||
|
<el-input v-model="searchForm.COMMITMENTNAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="完成状态" prop="COMPLETIONSTATUS">
|
||||||
|
<el-select v-model="searchForm.COMPLETIONSTATUS">
|
||||||
|
<el-option label="已上传" :value="1" />
|
||||||
|
<el-option label="未上传" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<el-select v-model="searchForm.VALIDSTATUS">
|
||||||
|
<el-option label="正常" :value="1" />
|
||||||
|
<el-option label="未生效" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</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"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:data="list"
|
||||||
|
row-key="SECURITYCOMMITMENT_ID"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="NEWCOMMITMENTNAME"
|
||||||
|
label="承诺书名称"
|
||||||
|
width="250"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="COMPLETIONSTATUS" label="完成状态" width="250">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.COMPLETIONSTATUS === '1'">已上传</el-tag>
|
||||||
|
<el-tag v-else>未上传</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效状态" prop="VALIDSTATUS">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.VALIDSTATUS === '1'">正常</el-tag>
|
||||||
|
<el-tag v-else>未生效</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="CORP_NAME" label="经营企业" width="150" />
|
||||||
|
<el-table-column prop="OPERATIONTYPE" label="经营类型" width="150" />
|
||||||
|
<el-table-column prop="EXPIRYDATE" label="到期时间" width="150" />
|
||||||
|
<el-table-column prop="CREATETIME" label="创建时间" width="150" />
|
||||||
|
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
|
||||||
|
<el-table-column label="操作" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/security_commitment/details',
|
||||||
|
query: {
|
||||||
|
SECURITYCOMMITMENT_ID: row.SECURITYCOMMITMENT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.SECURITYCOMMITMENT_ID, '', 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', row.USER_ID, 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addOrEditDialog.visible"
|
||||||
|
v-model:form="data.addOrEditDialog.form"
|
||||||
|
:type="data.addOrEditDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { nextTick, reactive, watchEffect } from "vue";
|
||||||
|
import router from "@/router/index.js";
|
||||||
|
import { getSafetyCommitmentList } from "@/request/traffic_safety_commitment.js";
|
||||||
|
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getSafetyCommitmentList);
|
||||||
|
const data = reactive({
|
||||||
|
addOrEditDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (list.value.length > 0) {
|
||||||
|
list.value.forEach((item) => {
|
||||||
|
item.NEWCOMMITMENTNAME = `${item.NAME} 安全承诺书`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const fnAddOrEdit = async (
|
||||||
|
SECURITYCOMMITMENT_ID = "",
|
||||||
|
USER_ID = "",
|
||||||
|
type = "add"
|
||||||
|
) => {
|
||||||
|
data.addOrEditDialog.visible = true;
|
||||||
|
data.addOrEditDialog.type = type;
|
||||||
|
data.addOrEditDialog.form = {};
|
||||||
|
if (type === "edit" && SECURITYCOMMITMENT_ID) {
|
||||||
|
data.addOrEditDialog.form.SECURITYCOMMITMENT_ID = SECURITYCOMMITMENT_ID;
|
||||||
|
} else {
|
||||||
|
data.addOrEditDialog.form = { USER_ID };
|
||||||
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Reference in New Issue