This commit is contained in:
2025-09-24 20:30:47 +08:00
parent 449b3c9916
commit 10a8094a3c
4 changed files with 48 additions and 48 deletions

View File

@ -7,9 +7,43 @@
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="true" :formList="formList">
<el-divider />
</FormMessage>
<div style="padding: 2vw 10vw;box-sizing: border-box;">
<el-form :model="listQuery" ref="FormRef" label-width="120px" disabled>
<el-row class="peoRow" v-for="(item, index) in listQuery.pxkcList" :key="index">
<el-col :span="12">
<el-form-item label="培训日期" style="width: 100%;">
<el-date-picker v-model="item.pxrq" type="date" value-format="YYYY-MM-DD" placeholder="请输入培训日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训时间" style="width: 100%;">
<el-input v-model="item.pxsj" placeholder="请输入培训时间" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="课程名称" style="width: 100%;" >
<el-input v-model="item.kcmc" placeholder="请输入课程名称" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="组织单位" style="width: 100%;">
<el-input v-model="item.zzdw" placeholder="请输入组织单位" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="授课教员" style="width: 100%;">
<el-input v-model="item.skjy" placeholder="请选择授课教员" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训内容" style="width: 100%;" >
<el-input v-model="item.pxnr" placeholder="请输入培训内容" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
<el-divider />
</el-row>
</el-form>
</div>
<div style="padding:0 10vw 0 10vw;">
<div class="table-title">培训保安人员</div>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
@ -24,48 +58,10 @@
<script setup>
import MyTable from "@/components/aboutTable/MyTable.vue";
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 dialogForm = ref(false);
const FormRef = ref();
const listQuery = ref({});
const formList = reactive([
[
{ label: "培训日期", prop: "pxrq", type: "input" },
{ label: "培训时间", prop: "pxsj", type: "input" },
{ label: "课程名称", prop: "kcmc", type: "input" },
],
[
{ label: "组织单位", prop: "zzdw", type: "input" },
{ label: "授课教员", prop: "skfcy", type: "input" },
{ label: "培训内容", prop: "pxnr", type: "input" },
],
{ label: "分割线", prop: "diver", type: "slot" },
[
{ label: "培训日期", prop: "pxrq", type: "input" },
{ label: "培训时间", prop: "pxsj", type: "input" },
{ label: "课程名称", prop: "kcmc", type: "input" },
],
[
{ label: "组织单位", prop: "zzdw", type: "input" },
{ label: "授课教员", prop: "skfcy", type: "input" },
{ label: "培训内容", prop: "pxnr", type: "input" },
],
{ label: "分割线", prop: "diver", type: "slot" },
[
{ label: "培训日期", prop: "pxrq", type: "input" },
{ label: "培训时间", prop: "pxsj", type: "input" },
{ label: "课程名称", prop: "kcmc", type: "input" },
],
[
{ label: "组织单位", prop: "zzdw", type: "input" },
{ label: "授课教员", prop: "skfcy", type: "input" },
{ label: "培训内容", prop: "pxnr", type: "input" },
],
])
const listQuery = ref({pxkcList:[]});
const pageData = reactive({
tableData: [],
keyCount: 0,
@ -84,17 +80,19 @@ const pageData = reactive({
]
});
// 初始化数据
const init = async (type, id) => {
dialogForm.value = true;
const res = await qcckGet({ url: `/mosty-base/baxx/njpx/getInfo/${id}`})
listQuery.value = res || {}
const res = await qcckGet({},`/mosty-base/baxx/njpx/getInfo/${id}`)
console.log(res,'=========');
listQuery.value.pxkcList = res.pxkcList || []
pageData.tableData = res.pxryList || []
};
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
listQuery.value.pxkcList = []
pageData.tableData = []
};;
defineExpose({init})

View File

@ -46,7 +46,7 @@ const formList = reactive([
{ label: "教学目标", prop: "jxmb", type: "input" },
],
[
{ label: "学时安排", prop: "gksc", type: "number" },
{ label: "学时安排", prop: "gksc", type: "input" },
],
[
{ label: "上传附件", prop: "fj", type: "upload" },