'新增页面'
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import request from "@/utils/request";
|
||||
const api = "/mosty-base";
|
||||
const api = "/mosty-api/mosty-base";
|
||||
/*
|
||||
* 登录
|
||||
* return promise 实例对象
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
import { COMPONENT_WIDTH } from "@/constant";
|
||||
import { ref, defineProps, defineEmits, defineExpose, computed, watch, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import type from "element-plus/es/components/upload/src/upload.type";
|
||||
|
||||
import { useStore } from "vuex";
|
||||
const props = defineProps({
|
||||
//获取组件传值
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div @click="goToHome">
|
||||
<!-- <div @click="goToHome">
|
||||
<img src="@/assets/images/meun.png" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
@ -326,12 +326,52 @@ export const publicRoutes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/trainer",
|
||||
name: "trainer",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/trainer/index"),
|
||||
path: "/trainingManagement",
|
||||
name: "/trainingManagement",
|
||||
meta: {
|
||||
title: "培训人员管理",
|
||||
title: "培训管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/trainingManagement/trainer",
|
||||
name: "trainer",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/trainingManagement/trainer/index"),
|
||||
meta: {
|
||||
title: "培训人员",
|
||||
icon: "personnel"
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/trainingManagement/personnelTraining",
|
||||
name: "personnelTraining",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/trainingManagement/personnelTraining/index"),
|
||||
meta: {
|
||||
title: "保安待培训人员管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/trainingManagement/trainingProject",
|
||||
name: "trainingProject",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/trainingManagement/trainingProject/index"),
|
||||
meta: {
|
||||
title: "保安培训项目管理",
|
||||
icon: "personnel"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/examManagement",
|
||||
name: "examManagement",
|
||||
component: () =>
|
||||
import("@/views/securityManagement/examManagement/index"),
|
||||
meta: {
|
||||
title: "保安考试管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
}
|
||||
|
||||
@ -97,6 +97,13 @@ div:focus {
|
||||
border-color: rgb(8, 85, 170);
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-input__inner, .el-input__inner:hover, .el-input__inner:focus {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.new-btn-class-bj {
|
||||
color: #409eff;
|
||||
margin-right: 10px;
|
||||
|
||||
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<el-dialog class="dialogWerapper" v-model="modelValue" :title="title" @close="handleClose">
|
||||
<form-message ref="FormRef" v-model="formData" :rules="rules" :formList="formList" />
|
||||
|
||||
<template #footer>
|
||||
<el-button type="primary" :loading="loading" @click="handleSubmit">确定</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, reactive } from 'vue';
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '上传成绩'
|
||||
},
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:modelValue'])
|
||||
|
||||
const visible = computed({
|
||||
get() {
|
||||
return props.modelValue
|
||||
},
|
||||
set(val) {
|
||||
emits('update:modelValue', val)
|
||||
}
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const FormRef = ref(null)
|
||||
const formData = ref({})
|
||||
|
||||
const formList = reactive([
|
||||
[
|
||||
{ label: "成绩", prop: "cj", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "卷面", prop: "ssbmdm", type: "upload", limit: 1 },
|
||||
],
|
||||
])
|
||||
|
||||
const rules = {
|
||||
cj: [{ required: true, message: "请输入考试成绩", trigger: "change" }],
|
||||
sfzh: [{ required: true, message: "请输入证件号码", trigger: "change" }],
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
const handleSubmit = () => {
|
||||
try {
|
||||
loading.value = true
|
||||
FormRef.value.submit(res => {
|
||||
console.log(res)
|
||||
visible.value = false
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep {
|
||||
.dialogWerapper {
|
||||
.el-dialog__header {
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogVisible">
|
||||
<div class="head_box">
|
||||
<span class="title">{{ title }}</span>
|
||||
<div>
|
||||
<el-button size="small" @click="save" type="primary" :loading="loading">保存</el-button>
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cntinfo">
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="培训项目名称">{{ formData.xm }}</el-descriptions-item>
|
||||
<el-descriptions-item label="考试时间">{{ formData.sfzh }}</el-descriptions-item>
|
||||
<el-descriptions-item label="考试辖区">{{ formData.lxdh }}</el-descriptions-item>
|
||||
<el-descriptions-item label="考试地址">{{ formData.jzdz }}</el-descriptions-item>
|
||||
<el-descriptions-item label="监考民警">{{ formData.rzsj }}</el-descriptions-item>
|
||||
<el-descriptions-item label="考试方式">{{ formData.ssbmdm }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- <el-descriptions title="考试人员" column="2" border class="mt20"> -->
|
||||
<div class="label">考试人员</div>
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
||||
>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('updata', row)">上传成绩</el-link>
|
||||
<el-link type="primary" @click="addEdit('view', row)">查看成绩</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<!-- </el-descriptions> -->
|
||||
|
||||
<view-and-upload-dialog v-model="viewAndUploadVisible" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive, getCurrentInstance } from 'vue'
|
||||
import { qcckPost } from "@/api/qcckApi.js";
|
||||
import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import viewAndUploadDialog from './viewAndUploadDialog.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const title = ref('保安线下考试详情')
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const FormRef = ref(null)
|
||||
const viewAndUploadVisible = ref(true)
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
dic: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:modelValue'])
|
||||
|
||||
const dialogVisible = computed({
|
||||
get() {
|
||||
return props.modelValue
|
||||
},
|
||||
set(val) {
|
||||
emits('update:modelValue', val)
|
||||
}
|
||||
})
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [{}],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
pageSize: 10,
|
||||
pageCurrent: 1
|
||||
},
|
||||
controlsWidth: 180,
|
||||
tableColumn: [
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "证件号码", prop: "sfzh" },
|
||||
{ label: "联系方式", prop: "lxdh" },
|
||||
{ label: "线上培训时间", prop: "sfzh" },
|
||||
{ label: "线下培训课程", prop: "lxdh" },
|
||||
{ label: "考试成绩", prop: "lxdh" },
|
||||
]
|
||||
});
|
||||
|
||||
const formData = ref({})
|
||||
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
const open = (row = {}, type = 'add') => {
|
||||
disabled.value = false
|
||||
dialogVisible.value = true
|
||||
formData.value = { ...row }
|
||||
if (type === 'add') {
|
||||
title.value = '新增从业人员'
|
||||
} else if (type === 'edit') {
|
||||
title.value = '编辑从业人员'
|
||||
} else {
|
||||
disabled.value = true
|
||||
title.value = '查看详情'
|
||||
}
|
||||
}
|
||||
|
||||
const save = () => {
|
||||
FormRef.value.submit(() => {
|
||||
loading.value = true;
|
||||
const url = !formData.value?.id ? `/mosty-base/baxx/cyry/add` : `/mosty-base/baxx/cyry/edit`;
|
||||
qcckPost(formData.value, url).then(() => {
|
||||
loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
emits("refresh");
|
||||
close();
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/assets/css/layout.scss";
|
||||
|
||||
.label {
|
||||
margin-top: 20px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cntinfo {
|
||||
padding: 2rem 12rem 0rem 12rem;
|
||||
height: calc(100% - 70px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.mapBox {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
131
src/views/securityManagement/examManagement/index.vue
Normal file
131
src/views/securityManagement/examManagement/index.vue
Normal file
@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<page-title title="保安考试管理" />
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox">
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch"></Search>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div class="tabBox">
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||
<template #bxxLx="{ row }">
|
||||
<DictTag :value="row.bxxLx" :tag="false" :options="D_BZ_BXDLX" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('view', row)">详情</el-link>
|
||||
<el-link type="primary" @click="addEdit('edit', row)">证件申请</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
}"></Pages>
|
||||
</div>
|
||||
|
||||
<!-- 线下线上考试详情 -->
|
||||
<view-exam-detalis v-model="isVisible" ref="trainerRef" @refresh="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import Pages from '@/components/aboutTable/Pages.vue';
|
||||
import Search from '@/components/aboutTable/Search.vue';
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
import ViewExamDetalis from "./components/viewExamDetalis.vue";
|
||||
// import AddTrainerDialog from "./components/addTrainerDialog.vue";
|
||||
|
||||
const trainerRef = ref(null);
|
||||
const queryFrom = ref({});
|
||||
const isVisible = ref(true);
|
||||
const searchBox = ref(null);
|
||||
const D_BZ_BXDLX = ref([]);
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "培训项目名称",
|
||||
prop: "xm",
|
||||
placeholder: "请输入培训项目名称",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "考试时间",
|
||||
prop: "sfzh",
|
||||
placeholder: "请选择考试时间",
|
||||
showType: "date"
|
||||
},
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
pageSize: 10,
|
||||
pageCurrent: 1
|
||||
},
|
||||
controlsWidth: 180,
|
||||
tableColumn: [
|
||||
{ label: "培训项目名称", prop: "xm" },
|
||||
{ label: "考试时间", prop: "sfzh" },
|
||||
{ label: "监考民警", prop: "sfzh" },
|
||||
{ label: "考试地址", prop: "sfzh" },
|
||||
{ label: "考试方式", prop: "lxdh" },
|
||||
]
|
||||
});
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight =
|
||||
window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
const addEdit = (type, row) => {
|
||||
trainerRef.value.open(row, type);
|
||||
};
|
||||
|
||||
const onSearch = (value) => {
|
||||
queryFrom.value = value
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
try {
|
||||
pageData.tableConfiger.loading = true;
|
||||
const res = await qcckPost({
|
||||
...pageData.pageConfiger,
|
||||
...queryFrom.value
|
||||
}, `/mosty-base/baxx/pxry/page`)
|
||||
|
||||
if(res) {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
}
|
||||
} finally {
|
||||
pageData.tableConfiger.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle title="从业人员管理" />
|
||||
<page-title title="从业人员管理" />
|
||||
<el-button type="primary" @click="addEdit('add', row)">新增</el-button>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
@ -41,8 +41,9 @@ import { onMounted, reactive, ref } from "vue";
|
||||
import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import Pages from '@/components/aboutTable/Pages.vue';
|
||||
import Search from '@/components/aboutTable/Search.vue';
|
||||
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import addPractitionerDialog from "./components/addPractitionerDialog.vue";
|
||||
import AddPractitionerDialog from "./components/addPractitionerDialog.vue";
|
||||
|
||||
const addPractitionerRef = ref(null);
|
||||
const queryFrom = ref({});
|
||||
|
||||
@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogVisible">
|
||||
<div class="head_box">
|
||||
<span class="title">{{ title }}</span>
|
||||
<div>
|
||||
<!-- <el-button size="small" @click="save" type="primary" :loading="loading">保存</el-button> -->
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cntinfo">
|
||||
<el-descriptions column="2" border>
|
||||
<el-descriptions-item label="姓名">{{ formData.xm }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ formData.sfzh }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ formData.lxdh }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属保安公司">{{ formData.jzdz }}</el-descriptions-item>
|
||||
<el-descriptions-item label="线上培训时长">{{ formData.rzsj }}</el-descriptions-item>
|
||||
<el-descriptions-item label="提交日期">{{ formData.ssbmdm }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, getCurrentInstance } from 'vue'
|
||||
import { qcckPost } from "@/api/qcckApi.js";
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const title = ref('保安考试申请')
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const FormRef = ref(null)
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
dic: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:modelValue'])
|
||||
|
||||
const dialogVisible = computed({
|
||||
get() {
|
||||
return props.modelValue
|
||||
},
|
||||
set(val) {
|
||||
emits('update:modelValue', val)
|
||||
}
|
||||
})
|
||||
|
||||
const formData = ref({})
|
||||
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
const open = (row = {}, type = 'add') => {
|
||||
disabled.value = false
|
||||
dialogVisible.value = true
|
||||
formData.value = { ...row }
|
||||
}
|
||||
|
||||
const save = () => {
|
||||
FormRef.value.submit(() => {
|
||||
loading.value = true;
|
||||
const url = !formData.value?.id ? `/mosty-base/baxx/cyry/add` : `/mosty-base/baxx/cyry/edit`;
|
||||
qcckPost(formData.value, url).then(() => {
|
||||
loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
emits("refresh");
|
||||
close();
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/assets/css/layout.scss";
|
||||
|
||||
.cntinfo {
|
||||
padding: 2rem 12rem 0rem 12rem;
|
||||
height: calc(100% - 70px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.mapBox {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<page-title title="保安待培训人员管理" />
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox">
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch"></Search>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div class="tabBox">
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||
<template #bxxLx="{ row }">
|
||||
<DictTag :value="row.bxxLx" :tag="false" :options="D_BZ_BXDLX" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="danger" @click="handleDelete([row.id])">删除</el-link>
|
||||
<el-link type="warning" @click="addEdit('view', row)">详情</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
}"></Pages>
|
||||
</div>
|
||||
|
||||
<view-info-dialog ref="trainerRef" v-model="isVisible" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import Pages from '@/components/aboutTable/Pages.vue';
|
||||
import Search from '@/components/aboutTable/Search.vue';
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
import viewInfoDialog from "./components/viewInfoDialog.vue";
|
||||
|
||||
const trainerRef = ref(null);
|
||||
const queryFrom = ref({});
|
||||
const isVisible = ref(false);
|
||||
const searchBox = ref(null);
|
||||
const D_BZ_BXDLX = ref([]);
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "xm",
|
||||
placeholder: "请输入人员姓名",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "lxdh",
|
||||
placeholder: "请输入联系电话",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "所属保安公司",
|
||||
prop: "sfzh",
|
||||
placeholder: "请选择所属保安公司",
|
||||
showType: "select"
|
||||
},
|
||||
{
|
||||
label: "提交日期",
|
||||
prop: "sfzh",
|
||||
placeholder: "请选择提交日期",
|
||||
showType: "date"
|
||||
}
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
pageSize: 10,
|
||||
pageCurrent: 1
|
||||
},
|
||||
controlsWidth: 180,
|
||||
tableColumn: [
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "身份证号", prop: "sfzh" },
|
||||
{ label: "联系方式", prop: "lxdh" },
|
||||
{ label: "所属保安公司", prop: "pxgs" },
|
||||
{ label: "线上培训时长", prop: "pxgs" },
|
||||
{ label: "提交日期", prop: "pxgs" },
|
||||
]
|
||||
});
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight =
|
||||
window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
const addEdit = (type, row) => {
|
||||
trainerRef.value.open(row, type);
|
||||
};
|
||||
|
||||
const onSearch = (value) => {
|
||||
queryFrom.value = value
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
try {
|
||||
pageData.tableConfiger.loading = true;
|
||||
const res = await qcckPost({
|
||||
...pageData.pageConfiger,
|
||||
...queryFrom.value
|
||||
}, `/mosty-base/baxx/pxry/page`)
|
||||
|
||||
if(res) {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
}
|
||||
} finally {
|
||||
pageData.tableConfiger.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -57,12 +57,14 @@ const formList = reactive([
|
||||
{ label: "姓名", prop: "xm", type: "input" },
|
||||
{ label: "证件号码", prop: "sfzh", type: "select", options: props.dic.D_BZ_BXDLX },
|
||||
{ label: "联系电话", prop: "lxdh", type: "input" },
|
||||
{ label: "居住地址", prop: "jzdz", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "居住地址", prop: "jzdz", type: "input" },
|
||||
{ label: "申请时间", prop: "rzsj", type: "date" },
|
||||
{ label: "岗位", prop: "ssbmdm", type: "select" },
|
||||
{ label: "所属保安公司", prop: "pxgs", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "所属保安公司", prop: "pxgs", type: "select" },
|
||||
],
|
||||
[
|
||||
{ label: "身份证正反面", prop: "ssbmdm", type: "upload", limit: 2 },
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle title="培训人员管理" />
|
||||
<page-title title="培训人员管理" />
|
||||
<el-button type="primary" @click="addEdit('add', row)">新增</el-button>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
@ -39,7 +39,8 @@ import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import Pages from '@/components/aboutTable/Pages.vue';
|
||||
import Search from '@/components/aboutTable/Search.vue';
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import addTrainerDialog from "./components/addTrainerDialog.vue";
|
||||
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
import AddTrainerDialog from "./components/addTrainerDialog.vue";
|
||||
|
||||
const trainerRef = ref(null);
|
||||
const queryFrom = ref({});
|
||||
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<page-title title="保安培训项目管理" />
|
||||
<el-button type="primary" @click="addEdit('add', row)">新增</el-button>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox">
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch"></Search>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div class="tabBox">
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||
<template #bxxLx="{ row }">
|
||||
<DictTag :value="row.bxxLx" :tag="false" :options="D_BZ_BXDLX" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('view', row)">详情</el-link>
|
||||
<el-link type="primary" @click="addEdit('edit', row)">考试申请</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
}"></Pages>
|
||||
</div>
|
||||
|
||||
<!-- <add-trainer-dialog v-model="isVisible" ref="trainerRef" @refresh="getList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import Pages from '@/components/aboutTable/Pages.vue';
|
||||
import Search from '@/components/aboutTable/Search.vue';
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
// import AddTrainerDialog from "./components/addTrainerDialog.vue";
|
||||
|
||||
const trainerRef = ref(null);
|
||||
const queryFrom = ref({});
|
||||
const isVisible = ref(false);
|
||||
const searchBox = ref(null);
|
||||
const D_BZ_BXDLX = ref([]);
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "培训项目名称",
|
||||
prop: "xm",
|
||||
placeholder: "请输入培训项目名称",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "培训开始时间",
|
||||
prop: "sfzh",
|
||||
placeholder: "请选择培训开始时间",
|
||||
showType: "date"
|
||||
},
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
pageSize: 10,
|
||||
pageCurrent: 1
|
||||
},
|
||||
controlsWidth: 180,
|
||||
tableColumn: [
|
||||
{ label: "培训项目名称", prop: "xm" },
|
||||
{ label: "培训开始时间", prop: "sfzh" },
|
||||
{ label: "培训结束时间", prop: "sfzh" },
|
||||
{ label: "培训公司", prop: "sfzh" },
|
||||
{ label: "培训地址", prop: "lxdh" },
|
||||
]
|
||||
});
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight =
|
||||
window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
const addEdit = (type, row) => {
|
||||
trainerRef.value.open(row, type);
|
||||
};
|
||||
|
||||
const onSearch = (value) => {
|
||||
queryFrom.value = value
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
try {
|
||||
pageData.tableConfiger.loading = true;
|
||||
const res = await qcckPost({
|
||||
...pageData.pageConfiger,
|
||||
...queryFrom.value
|
||||
}, `/mosty-base/baxx/pxry/page`)
|
||||
|
||||
if(res) {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
}
|
||||
} finally {
|
||||
pageData.tableConfiger.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle title="单位管理" />
|
||||
<page-title title="单位管理" />
|
||||
<el-button type="primary" @click="addEdit('add', row)">新增</el-button>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
@ -25,6 +25,7 @@
|
||||
<el-link type="warning" @click="handleXfrw(row)">下发任务</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
@ -38,6 +39,7 @@ import { onMounted, reactive, ref } from "vue";
|
||||
import MyTable from '@/components/aboutTable/MyTable.vue';
|
||||
import Pages from '@/components/aboutTable/Pages.vue';
|
||||
import Search from '@/components/aboutTable/Search.vue';
|
||||
import PageTitle from '@/components/aboutTable/PageTitle.vue';
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
|
||||
const searchBox = ref(null);
|
||||
|
||||
Reference in New Issue
Block a user