From 7d5a18597ae5d17d3642f844e8eae3e9660dcb7e Mon Sep 17 00:00:00 2001
From: esacpe <12345678>
Date: Wed, 24 Sep 2025 17:35:24 +0800
Subject: [PATCH] =?UTF-8?q?'=E8=80=83=E8=AF=95=E7=AE=A1=E7=90=86=E4=BA=BA?=
=?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/css/element-plus.scss | 8 +-
src/components/MyComponents/Upload/index.vue | 2 +-
src/components/aboutTable/Pages.vue | 13 +-
src/layout/components/Header.vue | 3 +-
.../AnnualInspectionTraining/index.vue | 20 +--
.../components/detailForm.vue | 10 +-
.../Training/SecurityQuestionBank/index.vue | 10 +-
.../components/detailForm.vue | 5 +-
.../SecurityTrainingSyllabus/index.vue | 29 +++--
.../components/viewAndUploadDialog.vue | 27 ++--
.../components/viewExamDetalis.vue | 37 +++++-
.../examManagement/index.vue | 2 +-
.../components/addTrainerDialog.vue | 11 +-
.../personnelTraining/index.vue | 4 +
.../trainer/components/addTrainerDialog.vue | 1 +
.../trainingProject/components/addPxxm.vue | 90 +++++++++----
.../components/prejectDetailsDialog.vue | 63 ++++++---
.../components/selectPersonnelDialog.vue | 121 ++++++++++++++++++
.../components/viewProjectDetailsDialog.vue | 90 ++++++++-----
.../trainingProject/index.vue | 3 +-
.../components/viewDetailsDialog.vue | 12 +-
vue.config.js | 4 +-
22 files changed, 420 insertions(+), 145 deletions(-)
create mode 100644 src/views/securityManagement/trainingManagement/trainingProject/components/selectPersonnelDialog.vue
diff --git a/src/assets/css/element-plus.scss b/src/assets/css/element-plus.scss
index 19ca9db..3438eae 100644
--- a/src/assets/css/element-plus.scss
+++ b/src/assets/css/element-plus.scss
@@ -214,10 +214,10 @@
padding: 10px 20px;
}
-::v-deep .el-pagination__total,
-::v-deep .el-pagination__jump {
- color: #bdc7da;
-}
+// ::v-deep .el-pagination__total,
+// ::v-deep .el-pagination__jump {
+// color: #bdc7da;
+// }
::v-deep .el-radio {
color: rgb(206, 208, 220);
diff --git a/src/components/MyComponents/Upload/index.vue b/src/components/MyComponents/Upload/index.vue
index f5aa56c..d24ae5e 100644
--- a/src/components/MyComponents/Upload/index.vue
+++ b/src/components/MyComponents/Upload/index.vue
@@ -187,7 +187,7 @@ const handleExceed = (files, fileList) => {
const beforeImgUpload = (file) => {
if (props.isImg) {
let isIMG = false;
- if (getSuffix(file.name) === "IMG") {
+ if (getSuffix(file.name) === "IMG" || getSuffix(file.name) === "MUSIC") {
isIMG = true;
}
const isLt5M = file.size / 1024 / 1024 < 5;
diff --git a/src/components/aboutTable/Pages.vue b/src/components/aboutTable/Pages.vue
index 5365222..032f0a1 100644
--- a/src/components/aboutTable/Pages.vue
+++ b/src/components/aboutTable/Pages.vue
@@ -8,13 +8,14 @@
-->
+ {{ pageData.configer }}
{
diff --git a/src/layout/components/Header.vue b/src/layout/components/Header.vue
index 5301e3c..bb96c72 100644
--- a/src/layout/components/Header.vue
+++ b/src/layout/components/Header.vue
@@ -43,7 +43,8 @@ onMounted(() => {
// 路由跳转
function goToHome() {
- window.location.href = "/";
+ router.push(`/unitInformation`);
+ // window.location.href = "/";
}
const active = ref("");
diff --git a/src/views/Training/AnnualInspectionTraining/index.vue b/src/views/Training/AnnualInspectionTraining/index.vue
index 11c7e48..f454e73 100644
--- a/src/views/Training/AnnualInspectionTraining/index.vue
+++ b/src/views/Training/AnnualInspectionTraining/index.vue
@@ -92,15 +92,15 @@ const changeSize = (val) => {
// 获取列表
const getList = () => {
- // pageData.tableConfiger.loading = true;
- // let data = { ...pageData.pageConfiger, ...queryFrom.value };
- // qcckGet(data, "/mosty-jbld/jbldzsd/selectPage").then((res) => {
- // pageData.tableData = res.records || [];
- // pageData.total = res.total;
- // pageData.tableConfiger.loading = false;
- // }).catch(() => {
- // pageData.tableConfiger.loading = false;
- // });
+ pageData.tableConfiger.loading = true;
+ let data = { ...pageData.pageConfiger, ...queryFrom.value };
+ qcckPost(data, "/mosty-base/baxx/njpxry/page").then((res) => {
+ pageData.tableData = res.records || [];
+ pageData.total = res.total;
+ pageData.tableConfiger.loading = false;
+ }).catch(() => {
+ pageData.tableConfiger.loading = false;
+ });
};
@@ -125,4 +125,4 @@ const tabHeightFn = () => {
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
-
\ No newline at end of file
+
diff --git a/src/views/Training/SecurityQuestionBank/components/detailForm.vue b/src/views/Training/SecurityQuestionBank/components/detailForm.vue
index aac1a8e..7bbf148 100644
--- a/src/views/Training/SecurityQuestionBank/components/detailForm.vue
+++ b/src/views/Training/SecurityQuestionBank/components/detailForm.vue
@@ -18,8 +18,12 @@
import { qcckPost , qcckGet} from "@/api/qcckApi.js";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { ref, reactive,defineEmits,getCurrentInstance } from 'vue';
+
const emit = defineEmits(["refresh"]);
+
const { proxy } = getCurrentInstance();
+const { D_BAXX_KTLX } = proxy.dict("D_BAXX_KTLX");
+
const dialogForm = ref(false);
const title = ref('');
const FormRef = ref();
@@ -41,7 +45,7 @@ const rules = reactive({
const formList = reactive([
[
- { label: "题型", prop: "type", type: "select", options: [{label:'单选题',value:'1'},{label:'多选题',value:'2'},{label:'判断题',value:'3'}] },
+ { label: "题型", prop: "type", type: "select", options: D_BAXX_KTLX },
{ label: "题目", prop: "tm", type: "input" },
],
[
@@ -60,11 +64,11 @@ const formList = reactive([
// 初始化数据
-const init = (type, id,) => {
+const init = (type, row = {}) => {
dialogForm.value = true;
openType.value = type;
title.value = type == "add" ? "新增" : "编辑";
- if(id) getDateById(id)
+ listQuery.value = { ...row }
};
const save = () => {
diff --git a/src/views/Training/SecurityQuestionBank/index.vue b/src/views/Training/SecurityQuestionBank/index.vue
index 5ad39a5..b11770f 100644
--- a/src/views/Training/SecurityQuestionBank/index.vue
+++ b/src/views/Training/SecurityQuestionBank/index.vue
@@ -24,8 +24,8 @@
- 编辑
- 详情
+ 编辑
+ 详情
删除
@@ -114,7 +114,7 @@ const changeSize = (val) => {
const getList = () => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
- qcckGet(data, "/mosty-base/baxx/tkgl/page").then((res) => {
+ qcckPost(data, "/mosty-base/baxx/tkgl/page").then((res) => {
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
@@ -135,9 +135,9 @@ const handleDelete = (ids) => {
};
// 详情
-const addEdit = (type, id) => {
+const addEdit = (type, row) => {
nextTick(() => {
- detailDiloag.value.init(type, id);
+ detailDiloag.value.init(type, row);
})
};
diff --git a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue
index 51a5888..c588517 100644
--- a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue
+++ b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue
@@ -26,12 +26,15 @@ const FormRef = ref();
const loading = ref(false);
const listQuery = ref({});
const openType = ref("")
+
+const { D_PXDG_PXLX } = proxy.$dict("D_PXDG_PXLX")
+
const rules = reactive({
pxlx: [{ required: true, message: "请输入视频标题", trigger: "blur" }],
});
const formList = reactive([
[
- { label: "培训类型", prop: "pxlx", type: "input" },
+ { label: "培训类型", prop: "pxlx", type: "select", options: D_PXDG_PXLX },
{ label: "教学项目", prop: "jxxm", type: "input" },
],
[
diff --git a/src/views/Training/SecurityTrainingSyllabus/index.vue b/src/views/Training/SecurityTrainingSyllabus/index.vue
index 16e767c..3cde234 100644
--- a/src/views/Training/SecurityTrainingSyllabus/index.vue
+++ b/src/views/Training/SecurityTrainingSyllabus/index.vue
@@ -45,14 +45,17 @@ import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/detailForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
+
const { proxy } = getCurrentInstance();
+const { D_PXDG_PXLX } = proxy.$dict("D_PXDG_PXLX")
+
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const baseUrl = 'data:image/jpeg;base64,'
const searchConfiger = ref([
{
label: "教学项目",
- prop: "questionContent",
+ prop: "jxxm",
placeholder: "请输入教学项目",
showType: "input"
},
@@ -74,8 +77,8 @@ const pageData = reactive({
},
controlsWidth: 180,
tableColumn: [
- { label: "培训类型", prop: "questionType"},
- { label: "教学项目", prop: "questionContent" },
+ { label: "培训类型", prop: "pxlx", options: D_PXDG_PXLX },
+ { label: "教学项目", prop: "jxxm" },
]
});
@@ -102,15 +105,15 @@ const changeSize = (val) => {
// 获取列表
const getList = () => {
- // pageData.tableConfiger.loading = true;
- // let data = { ...pageData.pageConfiger, ...queryFrom.value };
- // qcckGet(data, "/mosty-jbld/jbldzsd/selectPage").then((res) => {
- // pageData.tableData = res.records || [];
- // pageData.total = res.total;
- // pageData.tableConfiger.loading = false;
- // }).catch(() => {
- // pageData.tableConfiger.loading = false;
- // });
+ pageData.tableConfiger.loading = true;
+ let data = { ...pageData.pageConfiger, ...queryFrom.value };
+ qcckPost(data, "/mosty-base/baxx/jxda/page").then((res) => {
+ pageData.tableData = res.records || [];
+ pageData.total = res.total;
+ pageData.tableConfiger.loading = false;
+ }).catch(() => {
+ pageData.tableConfiger.loading = false;
+ });
};
@@ -145,4 +148,4 @@ const tabHeightFn = () => {
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
-
\ No newline at end of file
+
diff --git a/src/views/securityManagement/examManagement/components/viewAndUploadDialog.vue b/src/views/securityManagement/examManagement/components/viewAndUploadDialog.vue
index ba73740..9cc2c56 100644
--- a/src/views/securityManagement/examManagement/components/viewAndUploadDialog.vue
+++ b/src/views/securityManagement/examManagement/components/viewAndUploadDialog.vue
@@ -10,9 +10,11 @@
diff --git a/src/views/securityManagement/examManagement/index.vue b/src/views/securityManagement/examManagement/index.vue
index f82ebce..9856294 100644
--- a/src/views/securityManagement/examManagement/index.vue
+++ b/src/views/securityManagement/examManagement/index.vue
@@ -111,7 +111,7 @@ const getList = async () => {
}, `/mosty-base/baxx/ksgl/page`)
if(res) {
- pageData.tableData = res.records || [];
+ pageData.tableData = [{}];
pageData.total = res.total;
}
} finally {
diff --git a/src/views/securityManagement/personnelManagement/applicantPersonnel/components/addTrainerDialog.vue b/src/views/securityManagement/personnelManagement/applicantPersonnel/components/addTrainerDialog.vue
index cb615ed..55b5696 100644
--- a/src/views/securityManagement/personnelManagement/applicantPersonnel/components/addTrainerDialog.vue
+++ b/src/views/securityManagement/personnelManagement/applicantPersonnel/components/addTrainerDialog.vue
@@ -9,10 +9,8 @@
-
@@ -76,6 +74,10 @@ const formList = reactive([
])
const rules = {
+ ryzpzm: [{ required: true, message: "请上传身份证正面", trigger: "change" }],
+ ryzpfm: [{ required: true, message: "请上传身份证反面", trigger: "change" }],
+ // tjbj: [{ required: true, message: "请上传体检报告", trigger: "change" }],
+ wfzzmjl: [{ required: true, message: "请上传无犯罪记录证明", trigger: "change" }],
xm: [{ required: true, message: "请输入姓名", trigger: "change" }],
zjhm: [
{ required: true, message: "请输入证件号码", trigger: "change" },
@@ -124,6 +126,7 @@ const close = () => {
}
const open = (row = {}, type = 'add') => {
+ FormRef.value?.reset()
disabled.value = false
dialogVisible.value = true
formData.value = { ...row }
diff --git a/src/views/securityManagement/trainingManagement/personnelTraining/index.vue b/src/views/securityManagement/trainingManagement/personnelTraining/index.vue
index af02c60..95d69aa 100644
--- a/src/views/securityManagement/trainingManagement/personnelTraining/index.vue
+++ b/src/views/securityManagement/trainingManagement/personnelTraining/index.vue
@@ -14,6 +14,10 @@
+
+
+ {{ row.pxsc }}小时
+
删除
diff --git a/src/views/securityManagement/trainingManagement/trainer/components/addTrainerDialog.vue b/src/views/securityManagement/trainingManagement/trainer/components/addTrainerDialog.vue
index f7f983f..d0948bd 100644
--- a/src/views/securityManagement/trainingManagement/trainer/components/addTrainerDialog.vue
+++ b/src/views/securityManagement/trainingManagement/trainer/components/addTrainerDialog.vue
@@ -93,6 +93,7 @@ const close = () => {
}
const open = (row = {}, type = 'add') => {
+ FormRef.value?.reset()
disabled.value = false
dialogVisible.value = true
formData.value = { ...row }
diff --git a/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue b/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue
index 6e1a9b5..ead757b 100644
--- a/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue
+++ b/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue
@@ -39,37 +39,38 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
+
-
+
@@ -81,15 +82,19 @@
新增课程
- 培训保安人员
+ 培训保安人员
-
-
- 删除
-
+
+ {{ row.pxsc }}h
+
+
+
+ 删除
+
-
+
+
@@ -97,9 +102,13 @@
import { qcckPost } from "@/api/qcckApi.js";
import MyTable from '@/components/aboutTable/MyTable.vue';
import { ref, computed, reactive, getCurrentInstance } from 'vue'
+import SelectPersonnelDialog from "./selectPersonnelDialog.vue";
+
+const { proxy } = getCurrentInstance()
+const visible = ref(false)
const showDialog = ref(false)
const formData = ref({
- courceList: [{
+ pxkcList: [{
pxkcxm: '', //课程名称
pxzcdw: '', //组织单位
pxfcy: '', //授课教员
@@ -107,9 +116,10 @@ const formData = ref({
}] //课程
})
+const emits = defineEmits(['refresh'])
const FormRef = ref(null)
const pageData = reactive({
- tableData: [{xm: '张三', sfzh: '123456789012345678', lxdh: '13800000000'}],
+ tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
@@ -126,8 +136,8 @@ const pageData = reactive({
{ label: "姓名", prop: "xm" },
{ label: "证件号码", prop: "sfzh" },
{ label: "联系号码", prop: "lxdh" },
- { label: "线上培训时长", prop: "sfzh" },
- { label: "所属单位", prop: "lxdh" },
+ { label: "线上培训时长", prop: "pxsc", showSolt: true },
+ { label: "所属单位", prop: "lxdw" },
]
});
@@ -141,11 +151,17 @@ const rules = {
kcmc: [{ required: true, message: "请输入课程名称", trigger: "change" }],
zzdw: [{ required: true, message: "请输入组织单位", trigger: "change" }],
skjy: [{ required: true, message: "请选择授课教员", trigger: "change" }],
- pxnr: [{ required: true, message: "请输入培训内容", trigger: "change" }]
+ pxnr: [{ required: true, message: "请输入培训内容", trigger: "change" }],
+ pxsj: [{ required: true, message: "请选择培训开始时间", trigger: "change" }],
+}
+
+const selectPersonnelRef = ref(null)
+const hanbleClickSelect = () => {
+ selectPersonnelRef.value?.open()
}
const addItem = () => {
- formData.value.courceList.push({
+ formData.value.pxkcList.push({
pxkcxm: '', //课程名称
pxzcdw: '', //组织单位
pxfcy: '', //授课教员
@@ -154,21 +170,39 @@ const addItem = () => {
}
const delItem = (item,index) => {
- if(formData.value.courceList.length === 1) return proxy.$message.error('请至少添加一门课程');
- formData.value.courceList.splice(index,1)
+ if(formData.value.pxkcList.length === 1) return proxy.$message.error('请至少添加一门课程');
+ formData.value.pxkcList.splice(index,1)
}
const init = () => {
- showDialog.value = true
+ showDialog.value = true
}
const close = () => {
- showDialog.value = false
+ FormRef.value.resetFields()
+ showDialog.value = false
}
-const save = async () => {
- FormRef.value.validate((valid) => {
+const handleDelItem = (row) => {
+ const index = pageData.tableData.findIndex(item => item.id === row.id)
+ pageData.tableData.splice(index, 1)
+}
+const handleChange = (val) => {
+ pageData.tableData = [...pageData.tableData, ...val]?.filter((i, index, arr) => arr?.findIndex(s => i?.id === s?.id) === index)
+}
+
+const save = () => {
+ if (pageData.tableData.length === 0) return proxy.$message.warning('请选择培训保安人员')
+ const ryidList = pageData.tableData?.map(i => i?.id)
+ const { pxkcList, pxxmid } = formData.value
+ FormRef.value.validate( async (valid) => {
+ const url = !formData.value?.id ? `/mosty-base/baxx/pxxm/add` : `/mosty-base/baxx/pxxm/edit`
+ const res = await qcckPost(formData.value, url)
+ await qcckPost({ pxkcList, pxxmid: res?.id, ryidList }, !formData.value?.id ? `/mosty-base/baxx/pxkc/saveList` : `/mosty-base/baxx/pxkc/updateList`)
+ proxy.$message.success('新增培训项目成功')
+ emits("refresh");
+ close()
})
}
diff --git a/src/views/securityManagement/trainingManagement/trainingProject/components/prejectDetailsDialog.vue b/src/views/securityManagement/trainingManagement/trainingProject/components/prejectDetailsDialog.vue
index 4bccec9..02a8daa 100644
--- a/src/views/securityManagement/trainingManagement/trainingProject/components/prejectDetailsDialog.vue
+++ b/src/views/securityManagement/trainingManagement/trainingProject/components/prejectDetailsDialog.vue
@@ -16,22 +16,23 @@
{{ formData.jssj }}
-
- {{ courseInfo.pxrq }}
- {{ courseInfo.pxsj }}
- {{ courseInfo.kcmc }}
- {{ courseInfo.zzdw }}
- {{ courseInfo.skjy }}
- {{ courseInfo.pxnr }}
- {{ courseInfo.ypxry }}
+
+
+ {{ item.pxrq }}
+ {{ item.pxsj }}
+ {{ item.kcmc }}
+ {{ item.zzdw }}
+ {{ item.skjy }}
+ {{ item.pxnr }}
+ {{ item.ypxry }}
-
+
+
-
培训保安人员
删除
-
+
@@ -51,6 +55,7 @@
import { ref, computed, reactive, getCurrentInstance } from 'vue'
import { qcckPost } from "@/api/qcckApi.js";
import MyTable from '@/components/aboutTable/MyTable.vue';
+import Pages from "@/components/aboutTable/Pages.vue"
import Upload from "@/components/MyComponents/Upload/index.vue"
const { proxy } = getCurrentInstance()
@@ -83,7 +88,8 @@ const dialogVisible = computed({
})
const pageData = reactive({
- tableData: [{}],
+ tableData: [],
+ pxkcList: [],
keyCount: 0,
tableConfiger: {
haveControls: false,
@@ -113,14 +119,36 @@ const close = () => {
dialogVisible.value = false
}
+// 根据项目id获取培训课程
+const getPxkcList = async ({ id }) => {
+ const res = await qcckPost({ pxxmid: id }, `/mosty-base/baxx/pxkc/list`)
+ if (res) {
+ pageData.pxkcList = res
+ }
+}
+
// 获取保安信息培训课程管理详情
-const getbaInfo = async () => {
- const res = await qcckPost({}, `/mosty-base/baxx/pxkc/getInfo/${id}`)
+const getbaInfo = async ({ id = '' }) => {
+ const res = await qcckPost({ id }, `/mosty-base/baxx/pxkc/getInfo/${id}`)
if (res) {
courseInfo.value = res
}
}
+// 根据项目id获取培训人员
+const getList = async ({ id = "" }) => {
+ const res = await qcckPost({
+ ...pageData.pageConfiger,
+ pxxmid: id
+ }, `/mosty-base/baxx/pxry/page`)
+ if (res) {
+ console.log(res);
+
+ pageData.tableData = res.records || [];
+ pageData.total = res.total;
+ }
+}
+
const open = (row = {}, type = 'view') => {
disabled.value = false
dialogVisible.value = true
@@ -128,10 +156,9 @@ const open = (row = {}, type = 'view') => {
if (type === 'view') {
title.value = '保安线下考试详情'
visible.value = true
- getbaInfo()
- } else if (type === 'edit') {
- title.value = '保安证申请'
- visible.value = false
+ getbaInfo(row)
+ getPxkcList(row)
+ getList(row)
}
}
diff --git a/src/views/securityManagement/trainingManagement/trainingProject/components/selectPersonnelDialog.vue b/src/views/securityManagement/trainingManagement/trainingProject/components/selectPersonnelDialog.vue
new file mode 100644
index 0000000..bde8c51
--- /dev/null
+++ b/src/views/securityManagement/trainingManagement/trainingProject/components/selectPersonnelDialog.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+ {{ row.pxsc }}h
+
+
+
+
+ 取 消
+ 确 定
+
+
+
+
+
+
+
+
diff --git a/src/views/securityManagement/trainingManagement/trainingProject/components/viewProjectDetailsDialog.vue b/src/views/securityManagement/trainingManagement/trainingProject/components/viewProjectDetailsDialog.vue
index 266ee13..dffc1d2 100644
--- a/src/views/securityManagement/trainingManagement/trainingProject/components/viewProjectDetailsDialog.vue
+++ b/src/views/securityManagement/trainingManagement/trainingProject/components/viewProjectDetailsDialog.vue
@@ -8,19 +8,10 @@
-
- {{ formData.xmmc }}
- {{ formData.kskssj }}
- {{ formData.ksxq }}
- {{ formData.ksdz }}
- {{ formData.jkrxm }}
-
-
-
-
+
-
- 培训保安人员
+
+
考试人员
@@ -29,24 +20,26 @@
删除
-
-
+
+