From 449b3c9916cf19a9385111e75c413a175c52ea6a Mon Sep 17 00:00:00 2001 From: Esacpe <1113279529@qq.com> Date: Wed, 24 Sep 2025 19:26:59 +0800 Subject: [PATCH] 1111 --- .../AnnualInspectionApplicants/index.vue | 40 +++++++------------ .../components/detailForm.vue | 6 +-- .../AnnualInspectionTraining/index.vue | 9 ++--- .../components/detailForm.vue | 39 +++++++++++------- .../SecurityTrainingSyllabus/index.vue | 28 +++++++------ 5 files changed, 62 insertions(+), 60 deletions(-) diff --git a/src/views/Training/AnnualInspectionApplicants/index.vue b/src/views/Training/AnnualInspectionApplicants/index.vue index 0152bfc..f44eb8e 100644 --- a/src/views/Training/AnnualInspectionApplicants/index.vue +++ b/src/views/Training/AnnualInspectionApplicants/index.vue @@ -46,7 +46,6 @@ const { proxy } = getCurrentInstance(); const detailDiloag = ref(); const pxApllication = ref(); const searchBox = ref(); //搜索框 -const baseUrl = 'data:image/jpeg;base64,' const searchConfiger = ref([ { label: "申请时间", @@ -58,16 +57,7 @@ const searchConfiger = ref([ const queryFrom = ref({}); const pageData = reactive({ - tableData: [ - { - name: '张三', - idNumber: '44032519900101001X', - contactInfo: '13800000000', - isUploaded: '是', - applyTime: '2023-01-01', - reviewStatus: '是' - } - ], + tableData: [], keyCount: 0, tableConfiger: { rowHieght: 61, @@ -81,12 +71,12 @@ const pageData = reactive({ }, controlsWidth: 180, tableColumn: [ - { label: "姓名", prop: "name" }, - { label: "证件号码", prop: "idNumber" }, - { label: "联系方式", prop: "contactInfo" }, + { label: "姓名", prop: "xm" }, + { label: "证件号码", prop: "zjhm" }, + { label: "联系方式", prop: "lxdh" }, { label: "是否上传资料", prop: "isUploaded" }, - { label: "申请时间", prop: "applyTime", }, - { label: "资料审核是否通过", prop: "reviewStatus"} + { label: "申请时间", prop: "sqrq", }, + { label: "资料审核是否通过", prop: "njzt"} ] }); @@ -113,15 +103,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/njry/queryCurrent").then((res) => { + pageData.tableData = res.records || []; + pageData.total = res.total; + pageData.tableConfiger.loading = false; + }).catch(() => { + pageData.tableConfiger.loading = false; + }); }; diff --git a/src/views/Training/AnnualInspectionTraining/components/detailForm.vue b/src/views/Training/AnnualInspectionTraining/components/detailForm.vue index f9b4721..f9d26db 100644 --- a/src/views/Training/AnnualInspectionTraining/components/detailForm.vue +++ b/src/views/Training/AnnualInspectionTraining/components/detailForm.vue @@ -86,10 +86,10 @@ const pageData = reactive({ // 初始化数据 -const init = async (type, id,) => { +const init = async (type, id) => { dialogForm.value = true; - // const res = await qcckGet({ url: `/training/annualInspectionTraining/detail/${id}`}) - // listQuery.value = res || {} + const res = await qcckGet({ url: `/mosty-base/baxx/njpx/getInfo/${id}`}) + listQuery.value = res || {} }; const close = () => { diff --git a/src/views/Training/AnnualInspectionTraining/index.vue b/src/views/Training/AnnualInspectionTraining/index.vue index f454e73..5d401f3 100644 --- a/src/views/Training/AnnualInspectionTraining/index.vue +++ b/src/views/Training/AnnualInspectionTraining/index.vue @@ -39,7 +39,6 @@ import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue"; const { proxy } = getCurrentInstance(); const detailDiloag = ref(); const searchBox = ref(); //搜索框 -const baseUrl = 'data:image/jpeg;base64,' const searchConfiger = ref([ { label: "培训时间", @@ -50,7 +49,7 @@ const searchConfiger = ref([ const queryFrom = ref({}); const pageData = reactive({ - tableData: [{pxrs:1,pxsj:'2023-08-01'}], + tableData: [], keyCount: 0, tableConfiger: { rowHieght: 61, @@ -64,8 +63,8 @@ const pageData = reactive({ }, controlsWidth: 180, tableColumn: [ - { label: "培训人数", prop: "pxrs"}, - { label: "培训时间", prop: "pxsj" }, + { label: "培训人数", prop: "pxrysl"}, + { label: "培训时间", prop: "pxrq" }, ] }); @@ -94,7 +93,7 @@ const changeSize = (val) => { const getList = () => { pageData.tableConfiger.loading = true; let data = { ...pageData.pageConfiger, ...queryFrom.value }; - qcckPost(data, "/mosty-base/baxx/njpxry/page").then((res) => { + qcckPost(data, "/mosty-base/baxx/njpx/page").then((res) => { pageData.tableData = res.records || []; pageData.total = res.total; pageData.tableConfiger.loading = false; diff --git a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue index c588517..5804e1e 100644 --- a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue +++ b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue @@ -19,6 +19,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 props = defineProps({ + dic: { + type: Object, + default: () => {} + } +}) const { proxy } = getCurrentInstance(); const dialogForm = ref(false); const title = ref(''); @@ -27,25 +33,23 @@ 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: "select", options: D_PXDG_PXLX }, + { label: "培训类型", prop: "pxlx", type: "select", options: props.dic.D_PXDG_PXLX }, { label: "教学项目", prop: "jxxm", type: "input" }, ], [ - { label: "教学内容", prop: "jxnr", type: "input" }, + { label: "教学内容", prop: "dgnr", type: "input" }, { label: "教学目标", prop: "jxmb", type: "input" }, ], [ - { label: "学时安排", prop: "xsap", type: "input" }, + { label: "学时安排", prop: "gksc", type: "number" }, ], [ - { label: "上传附件", prop: "fjdz", type: "upload" }, + { label: "上传附件", prop: "fj", type: "upload" }, ], ]) @@ -58,22 +62,29 @@ const init = (type, id,) => { if(id) getDateById(id) }; +function getDateById (id) { + qcckPost({},`/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => { + listQuery.value = res || {}; + }) +} + const save = () => { FormRef.value.submit(()=>{ - // loading.value = true; - // let url = title.value == '新增' ? `/mosty-jbld/jbldzsd/add` : `/mosty-jbld/jbldzsd/update`; - // qcckPost(listQuery.value, url).then(() => { - // loading.value = false; + loading.value = true; + let url = title.value == '新增' ? `/mosty-base/baxx/jxda/add` : `/mosty-base/baxx/jxda/edit`; + qcckPost(listQuery.value, url).then(() => { + loading.value = false; proxy.$message.success("保存成功"); - // emit("refresh"); + emit("refresh"); close(); - // }).catch(() => { - // loading.value = false; - // }) + }).catch(() => { + loading.value = false; + }) }); } const close = () => { dialogForm.value = false; + listQuery.value = {fj:''} FormRef.value.reset() };; diff --git a/src/views/Training/SecurityTrainingSyllabus/index.vue b/src/views/Training/SecurityTrainingSyllabus/index.vue index 3cde234..8d61935 100644 --- a/src/views/Training/SecurityTrainingSyllabus/index.vue +++ b/src/views/Training/SecurityTrainingSyllabus/index.vue @@ -19,12 +19,14 @@ - + - + @@ -48,10 +50,9 @@ import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue"; const { proxy } = getCurrentInstance(); const { D_PXDG_PXLX } = proxy.$dict("D_PXDG_PXLX") - +const show = ref(false) const detailDiloag = ref(); const searchBox = ref(); //搜索框 -const baseUrl = 'data:image/jpeg;base64,' const searchConfiger = ref([ { label: "教学项目", @@ -77,7 +78,7 @@ const pageData = reactive({ }, controlsWidth: 180, tableColumn: [ - { label: "培训类型", prop: "pxlx", options: D_PXDG_PXLX }, + { label: "培训类型", prop: "pxlx",showSolt: true}, { label: "教学项目", prop: "jxxm" }, ] }); @@ -118,17 +119,18 @@ const getList = () => { // 删除 -const handleDelete = (id) => { - // proxy.$modal.confirm("是否确认删除该值守点?").then(() => { - // qcckPost({ id }, "/mosty-jbld/jbldzsd/delete").then(() => { - // proxy.$modal.msgSuccess("删除成功"); - // getList(); - // }); - // }); +const handleDelete = (ids) => { + proxy.$modal.confirm("是否确认删除?").then(() => { + qcckPost(ids, "/mosty-base/baxx/jxda/remove").then(() => { + proxy.$modal.msgSuccess("删除成功"); + getList(); + }); + }); }; // 详情 const addEdit = (type, id) => { + show.value = true; nextTick(() => { detailDiloag.value.init(type, id); })