This commit is contained in:
esacpe
2025-09-22 17:25:52 +08:00
20 changed files with 1320 additions and 224 deletions

View File

@ -14,7 +14,7 @@
::v-deep .el-input__inner { ::v-deep .el-input__inner {
background-color: #fff; background-color: #fff;
border: 1px solid #e9e9e9; border: 1px solid #e9e9e9 !important;
&:hover { &:hover {
border: 1px solid #0065d8; border: 1px solid #0065d8;

View File

@ -98,7 +98,7 @@ header {
height: calc(100vh - 137px); height: calc(100vh - 137px);
overflow: auto; overflow: auto;
border: 1px solid #ccc; border: 1px solid #ccc;
top: 10px; top: 4px;
right: 10px; right: 10px;
left: 10px; left: 10px;
background-color: #fff; background-color: #fff;
@ -262,6 +262,7 @@ header {
position: absolute; position: absolute;
right: 0px; right: 0px;
left: 0px; left: 0px;
background: #fff;
} }
} }
} }

View File

@ -1,7 +1,10 @@
<template> <template>
<div class="pageTitle" :style="`margin-bottom: ${marginBottom}px;background-color: ${backgroundColor}`"> <div class="pageTitle" :style="`margin-bottom: ${marginBottom}px;background-color: ${backgroundColor}`">
<div class="title"> <div class="title">
<div class="font">{{ title }}</div> <div class="font" v-if="typeof title === 'string'">{{ title }}</div>
<ul v-else class="flex" style="align-items: center;">
<el-button @click="handleClick(item,index)" :type="active == index ? 'primary':''" v-for="(item, index) in title" :key="index">{{ item }}</el-button>
</ul>
</div> </div>
<div class="cnetr"> <div class="cnetr">
<slot name="center"></slot> <slot name="center"></slot>
@ -13,11 +16,16 @@
</template> </template>
<script setup> <script setup>
import { ref ,defineEmits} from 'vue';
defineProps({ defineProps({
title: { title: {
type: String, type: String || Array,
default: "" default: "" || []
}, },
active:{
type: Number,
default: 0
}, //下标
marginBottom: { marginBottom: {
type: Number, type: Number,
default: 0 default: 0
@ -27,6 +35,11 @@ defineProps({
default: "rgb(255, 255, 255, 0)" default: "rgb(255, 255, 255, 0)"
} }
}); });
const emit = defineEmits(['change','update:active']);
function handleClick (item,index){
emit('update:active',index);
emit('change',item)
}
</script> </script>
<style lang = "scss" scoped> <style lang = "scss" scoped>
@ -50,4 +63,5 @@ defineProps({
} }
} }
} }
</style> </style>

View File

@ -447,15 +447,6 @@ export const publicRoutes = [
icon: "personnel" icon: "personnel"
} }
}, },
{
path: "/training/securityExamManagement",
name: "securityExamManagement",
component: () => import("@/views/Training/SecurityExamManagement/index"),
meta: {
title: "保安考试管理",
icon: "personnel"
}
}
] ]
} }
// { // {

View File

@ -99,7 +99,7 @@ div:focus {
::v-deep { ::v-deep {
.el-input__inner, .el-input__inner:hover, .el-input__inner:focus { .el-input__inner, .el-input__inner:hover, .el-input__inner:focus {
border: none; // border: none;
box-shadow: none; box-shadow: none;
background-color: transparent; background-color: transparent;
} }

View File

@ -0,0 +1,61 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span>详情</span>
<div>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="true" :formList="formList">
</FormMessage>
</div>
</div>
</template>
<script setup>
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 dialogForm = ref(false);
const FormRef = ref();
const listQuery = ref({});
const loading = ref(false);
const formList = reactive([
[
{ label: "姓名", prop: "name", type: "input" },
{ label: "证件号码", prop: "idNumber", type: "input" },
{ label: "联系电话", prop: "contactInfo", type: "input" },
],
[
{ label: "是否年检", prop: "isUploaded", type: "input" },
{ label: "年检时间", prop: "inspectionTime", type: "input" },
],
])
// 初始化数据
const init = (type, id,) => {
dialogForm.value = true;
};
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
};;
defineExpose({init})
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
.mapBox{
width: calc(100% - 24rem);
height:500px;
overflow: hidden;
margin: 0 12rem;
}
</style>

View File

@ -0,0 +1,55 @@
<template>
<div>
<el-dialog title="选择培训公司" v-model="dialogForm" width="400px">
<ul class="company-list">
<li :class="{'active': active == item.id}" @click="active = item.id" class="company-item one_text_detail" v-for="item in companyList" :key="item.id">{{ item.name }}</li>
</ul>
<div class="flex just-center mt10">
<el-button type="primary" @click="dialogForm = false">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script setup>
import { ref ,defineExpose} from 'vue';
const dialogForm = ref(false);
const companyList = ref([
{ id: 1, name: '公司A' },
{ id: 2, name: '公司B' },
{ id: 3, name: '公司C' },
]);
const active = ref(null)
const init = (id) => {
active.value = id;
dialogForm.value = true;
}
defineExpose({
init
})
</script>
<style scoped lang="scss">
.company-list {
list-style-type: none;
padding: 0;
margin: 0;
max-height: 40vh;
overflow: hidden;
overflow-y: auto;
.company-item {
padding: 10px;
cursor: pointer;
line-height: 20px;
text-align: center;
border-bottom: 1px solid #eee;
}
.active{
background: #00bfbf;
color: #fff;
}
}
</style>

View File

@ -1,11 +1,156 @@
<template> <template>
<div class="app-container"> <div>
<h1>年检</h1> <div class="titleBox">
<PageTitle :title="['单位信息','从业人员','年检','申请人员']" @change="changeTab" v-model:active="activeTab">
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
<el-link type="primary" link @click="addEdit('pxgs', row.id)">年检</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" @refresh="getList" />
<!-- 选择培训公司 -->
<Pxgs ref="pxgs"></Pxgs>
</div> </div>
</template> </template>
<script> <script setup>
export default { import PageTitle from "@/components/aboutTable/PageTitle.vue";
name: "AnnualInspection" import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/detailForm.vue";
import Pxgs from "./components/pxgs.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import { el } from "element-plus/es/locale.mjs";
const { proxy } = getCurrentInstance();
const activeTab = ref(2)
const detailDiloag = ref();
const pxgs = ref();
const searchBox = ref(); //搜索框
const baseUrl = 'data:image/jpeg;base64,'
const searchConfiger = ref([
{
label: "人员姓名",
prop: "name",
showType: "input"
},
{
label: "证件号码",
prop: "idNumber",
showType: "input"
},
{
label: "联系方式",
prop: "contactInfo",
showType: "input"
},
]);
const queryFrom = ref({});
const pageData = reactive({
tableData: [{name:'张三',idNumber:'44032519900101001X',contactInfo:'13800000000',isInspected:'是',inspectionTime:'2023-08-01'}],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 180,
tableColumn: [
{ label: "姓名", prop: "name", width: 100 },
{ label: "证件号码", prop: "idNumber" },
{ label: "联系方式", prop: "contactInfo" },
{ label: "是否年检", prop: "isInspected" },
{ label: "年检时间", prop: "inspectionTime", width: 120 }
]
});
onMounted(() => {
getList();
tabHeightFn();
});
const changeTab = (val) => {
console.log(val,'=====ll');
}
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
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;
// });
};
// 详情
const addEdit = (type, id) => {
nextTick(() => {
if(type == 'pxgs'){
pxgs.value.init(id);
}else{
detailDiloag.value.init(type, id);
}
})
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
}; };
</script> </script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -0,0 +1,93 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title"> {{ title == '新增' ? '年检上传资料新增' : '人员年检详情' }}</span>
<div>
<el-button size="small" v-if="title == '新增'" @click="save" type="primary" :loading="loading">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="title == '新增' ? false:true" :labelWidth="120" :formList="formList">
</FormMessage>
</div>
<div class="flex just-center mt10" v-if="title == '详情'">
<el-button type="primary" @click="submit">通过</el-button>
<el-button type="danger" @click="submit">不通过</el-button>
</div>
</div>
</template>
<script setup>
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 dialogForm = ref(false);
const FormRef = ref();
const listQuery = ref({});
const loading = ref(false);
const title = ref('新增');
const rules = reactive({
pxlx: [{ required: true, message: "请输入视频标题", trigger: "blur" }],
});
const formList = reactive([
[
{ label: "姓名", prop: "name", type: "input" },
{ label: "证件号码", prop: "idNumber", type: "input" },
{ label: "联系电话", prop: "contactInfo", type: "input" },
],
[
{ label: "是否年检", prop: "isUploaded", type: "input" },
{ label: "培训项目", prop: "trainingProject", type: "input" },
{ label: "年检时间", prop: "inspectionTime", type: "input" },
],
[
{ label: "体检报告", prop: "inspectionReport", type: "upload" },
{ label: "无犯罪记录证明", prop: "wfzjlzm", type: "upload" },
{ label: "保安证证", prop: "bazzj", type: "upload" },
],
])
// 初始化数据
const init = (type, id,) => {
dialogForm.value = true;
title.value = type == 'add' ? '新增' : '详情';
};
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;
proxy.$message.success("保存成功");
// emit("refresh");
close();
// }).catch(() => {
// loading.value = false;
// })
});
}
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
};;
defineExpose({init})
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
.mapBox{
width: calc(100% - 24rem);
height:500px;
overflow: hidden;
margin: 0 12rem;
}
</style>

View File

@ -0,0 +1,133 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="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">
<FormMessage ref="FormRef" v-model="listQuery" :formList="formList">
<el-divider />
</FormMessage>
<div style="padding:0 10vw 0 10vw;">
<div class="table-title">培训保安人员 <el-icon size="20px" style="top: 4px;" color="green"><CirclePlusFilled /></el-icon> </div>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<template #controls="{ row }">
<el-link type="danger" link @click="delRow(row.id)">删除</el-link>
</template>
</MyTable>
</div>
</div>
</div>
</template>
<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 pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
},
tableHeight:400,
tableColumn: [
{ label: "姓名", prop: "xm"},
{ label: "证件号码", prop: "zjhm" },
{ label: "电话号码", prop: "dhhm" },
{ label: "所属单位", prop: "ssdw" },
]
});
// 初始化数据
const init = async (type, id,) => {
dialogForm.value = true;
// const res = await qcckGet({ url: `/training/annualInspectionTraining/detail/${id}`})
// listQuery.value = res || {}
};
const delRow = (id) => {
pageData.tableData = pageData.tableData.filter(item => item.id !== id)
}
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;
proxy.$message.success("保存成功");
// emit("refresh");
close();
// }).catch(() => {
// loading.value = false;
// })
});
}
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
};;
defineExpose({init})
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
.table-title{
line-height: 40px;
text-align: center;
background: #f5f5f5;
color: #333;
cursor: pointer;
}
</style>

View File

@ -1,26 +1,24 @@
<template> <template>
<div> <div>
<div class="titleBox"> <div class="titleBox">
<page-title title="培训人员管理" /> <PageTitle title="年检申请人员">
<el-button type="primary" @click="addEdit('add')">新增</el-button> <el-button type="primary" @click="addEdit('pxsq')">年检培训</el-button>
</PageTitle>
</div> </div>
<!-- 搜索 --> <!-- 搜索 -->
<div ref="searchBox"> <div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch"></Search> <Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div> </div>
<!-- 表格 --> <!-- 表格 -->
<div class="tabBox"> <div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" <MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"> :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
<template #bxxLx="{ row }"> @chooseData="chooseData">
<DictTag :value="row.bxxLx" :tag="false" :options="D_BZ_BXDLX" />
</template>
<!-- 操作 --> <!-- 操作 -->
<template #controls="{ row }"> <template #controls="{ row }">
<el-link type="primary" @click="addEdit('upload', row)">上传资料</el-link> <el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
<el-link type="danger" @click="handleDelete([row.id])">删除</el-link> <el-link type="success" link @click="addEdit('add', '')">上传资料</el-link>
<el-link type="warning" @click="addEdit('view', row)">详情</el-link>
<el-link type="primary" @click="addEdit('select', row)">提交培训公司</el-link>
</template> </template>
</MyTable> </MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{ <Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
@ -28,53 +26,48 @@
total: pageData.total total: pageData.total
}"></Pages> }"></Pages>
</div> </div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" @refresh="getList" />
<add-trainer-dialog v-model="isVisible" ref="trainerRef" @refresh="getList" /> <!-- 培训申请 -->
<select-ttaning-dialog ref="selectTtaningRef" v-model="dialogVisible" /> <PxApllication ref="pxApllication" />
</div> </div>
</template> </template>
<script setup> <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 PageTitle from "@/components/aboutTable/PageTitle.vue";
import AddTrainerDialog from "./components/addTrainerDialog.vue"; import MyTable from "@/components/aboutTable/MyTable.vue";
import selectTtaningDialog from "./components/selectTtaningDialog.vue"; import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
const trainerRef = ref(null); import DetailForm from "./components/detailForm.vue";
const selectTtaningRef = ref(null); import PxApllication from "./components/pxApllication.vue";
const queryFrom = ref({}); import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
const isVisible = ref(false); import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
const dialogVisible = ref(false); const { proxy } = getCurrentInstance();
const searchBox = ref(null); const detailDiloag = ref();
const D_BZ_BXDLX = ref([]); const pxApllication = ref();
const searchBox = ref(); //搜索框
const baseUrl = 'data:image/jpeg;base64,'
const searchConfiger = ref([ const searchConfiger = ref([
{ {
label: "人员姓名", label: "申请时间",
prop: "xm", prop: "sqsj",
placeholder: "请输入人员姓名", placeholder: "请选择申请时间",
showType: "input" showType: "date"
},
{
label: "证件号码",
prop: "sfzh",
placeholder: "请输入证件号码",
showType: "input"
},
{
label: "联系电话",
prop: "lxdh",
placeholder: "请输入联系电话",
showType: "input"
}, },
]); ]);
const queryFrom = ref({});
const pageData = reactive({ const pageData = reactive({
tableData: [{}], tableData: [
{
name: '张三',
idNumber: '44032519900101001X',
contactInfo: '13800000000',
isUploaded: '是',
applyTime: '2023-01-01',
reviewStatus: '是'
}
],
keyCount: 0, keyCount: 0,
tableConfiger: { tableConfiger: {
rowHieght: 61, rowHieght: 61,
@ -83,72 +76,79 @@ const pageData = reactive({
}, },
total: 0, total: 0,
pageConfiger: { pageConfiger: {
pageSize: 10, pageSize: 20,
pageCurrent: 1 pageCurrent: 1
}, },
controlsWidth: 180, controlsWidth: 180,
tableColumn: [ tableColumn: [
{ label: "姓名", prop: "xm" }, { label: "姓名", prop: "name" },
{ label: "证件号码", prop: "sfzh" }, { label: "证件号码", prop: "idNumber" },
{ label: "联系方式", prop: "lxdh" }, { label: "联系方式", prop: "contactInfo" },
{ label: "岗位", prop: "bxds", showSolt: true }, { label: "是否上传资料", prop: "isUploaded" },
{ label: "申请时间", prop: "pxgs" }, { label: "申请时间", prop: "applyTime", },
{ label: "是否上传资料", prop: "pxgs" }, { label: "资料审核是否通过", prop: "reviewStatus"}
{ label: "是否线上培训", prop: "pxgs" },
] ]
}); });
onMounted(() => {
getList();
tabHeightFn();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
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;
// });
};
// 详情
const addEdit = (type, id) => {
nextTick(() => {
if(type == 'pxsq'){
pxApllication.value.init(type, id);
}else{
detailDiloag.value.init(type, id);
}
})
};
// 表格高度计算 // 表格高度计算
const tabHeightFn = () => { const tabHeightFn = () => {
pageData.tableHeight = pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () { window.onresize = function () {
tabHeightFn(); tabHeightFn();
}; };
}; };
const addEdit = (type, row) => {
if (type === 'select') {
selectTtaningRef.value.open(row, type);
return
}
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> </script>
<style scoped lang="scss"> <style>
::v-deep { .el-loading-mask {
.el-dialog__header { background: rgba(0, 0, 0, 0.5) !important;
background: transparent !important;
}
} }
</style> </style>

View File

@ -0,0 +1,111 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">年检培训详情</span>
<div>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="true" :formList="formList">
<el-divider />
</FormMessage>
<div style="padding:0 10vw 0 10vw;">
<div class="table-title">培训保安人员</div>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
</MyTable>
</div>
</div>
</div>
</template>
<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 pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
haveControls:false
},
tableHeight:400,
tableColumn: [
{ label: "姓名", prop: "xm"},
{ label: "证件号码", prop: "zjhm" },
{ label: "电话号码", prop: "dhhm" },
{ label: "所属单位", prop: "ssdw" },
]
});
// 初始化数据
const init = async (type, id,) => {
dialogForm.value = true;
// const res = await qcckGet({ url: `/training/annualInspectionTraining/detail/${id}`})
// listQuery.value = res || {}
};
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
};;
defineExpose({init})
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
.table-title{
line-height: 40px;
text-align: center;
background: #f5f5f5;
color: #333;
}
</style>

View File

@ -1,11 +1,128 @@
<template> <template>
<div class="app-container"> <div>
<h1>年检培训</h1> <div class="titleBox">
<PageTitle title="年检培训信息">
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" @refresh="getList" />
</div> </div>
</template> </template>
<script> <script setup>
export default { import PageTitle from "@/components/aboutTable/PageTitle.vue";
name: "AnnualInspectionTraining" import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
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 detailDiloag = ref();
const searchBox = ref(); //搜索框
const baseUrl = 'data:image/jpeg;base64,'
const searchConfiger = ref([
{
label: "培训时间",
prop: "time",
showType: "daterange"
},
]);
const queryFrom = ref({});
const pageData = reactive({
tableData: [{pxrs:1,pxsj:'2023-08-01'}],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 180,
tableColumn: [
{ label: "培训人数", prop: "pxrs"},
{ label: "培训时间", prop: "pxsj" },
]
});
onMounted(() => {
getList();
tabHeightFn();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
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;
// });
};
// 详情
const addEdit = (type, id) => {
nextTick(() => {
detailDiloag.value.init(type, id);
})
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
}; };
</script> </script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -1,11 +0,0 @@
<template>
<div class="app-container">
<h1>保安考试管理</h1>
</div>
</template>
<script>
export default {
name: "SecurityExamManagement"
};
</script>

View File

@ -0,0 +1,90 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">保安题库{{ title }}</span>
<div>
<el-button size="small" v-if="openType != 'detail'" @click="save" type="primary" :loading="loading">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="openType == 'detail'" :rules="rules" :formList="formList">
</FormMessage>
</div>
</div>
</template>
<script setup>
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 dialogForm = ref(false);
const title = ref('');
const FormRef = ref();
const loading = ref(false);
const listQuery = ref({});
const openType = ref("")
const rules = reactive({
spbt: [{ required: true, message: "请输入视频标题", trigger: "blur" }],
});
const formList = reactive([
[
{ label: "题型", prop: "tx", type: "select",options: [{label:'单选题',value:'1'},{label:'多选题',value:'2'},{label:'判断题',value:'3'}] },
{ label: "题目", prop: "tm", type: "input" },
],
[
{ label: "选项A", prop: "a", type: "input" },
{ label: "选项B", prop: "b", type: "input" },
],
[
{ label: "选项C", prop: "c", type: "input" },
{ label: "选项D", prop: "d", type: "input" },
],
[
{ label: "选项E", prop: "e", type: "input" },
{ label: "答案", prop: "dw", type: "input" }
],
])
// 初始化数据
const init = (type, id,) => {
dialogForm.value = true;
openType.value = type;
title.value = type == "add" ? "新增" : "编辑";
if(id) getDateById(id)
};
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;
proxy.$message.success("保存成功");
// emit("refresh");
close();
// }).catch(() => {
// loading.value = false;
// })
});
}
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
};;
defineExpose({init})
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
.mapBox{
width: calc(100% - 24rem);
height:500px;
overflow: hidden;
margin: 0 12rem;
}
</style>

View File

@ -1,11 +1,154 @@
<template> <template>
<div class="app-container"> <div>
<h1>保安题库</h1> <div class="titleBox">
<PageTitle title="保安题库">
<el-button type="primary" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="primary" link @click="addEdit('edit', row.id)">编辑</el-link>
<el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
<el-link type="danger" link @click="handleDelete(row.id)">删除</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" @refresh="getList" />
</div> </div>
</template> </template>
<script> <script setup>
export default { import PageTitle from "@/components/aboutTable/PageTitle.vue";
name: "SecurityQuestionBank" import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
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 detailDiloag = ref();
const searchBox = ref(); //搜索框
const baseUrl = 'data:image/jpeg;base64,'
const searchConfiger = ref([
{
label: "题目",
prop: "questionContent",
placeholder: "请输入题目",
showType: "input"
},
]);
const queryFrom = ref({});
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 180,
tableColumn: [
{ label: "题型", prop: "questionType"},
{ label: "题目", prop: "questionContent" },
{ label: "选项A", prop: "optionA" },
{ label: "选项B", prop: "optionB" },
{ label: "选项C", prop: "optionC" },
{ label: "选项D", prop: "optionD" },
{ label: "选项E", prop: "optionE" },
{ label: "答案", prop: "answer"}
]
});
onMounted(() => {
getList();
tabHeightFn();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
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;
// });
};
// 删除
const handleDelete = (id) => {
// proxy.$modal.confirm("是否确认删除该值守点?").then(() => {
// qcckPost({ id }, "/mosty-jbld/jbldzsd/delete").then(() => {
// proxy.$modal.msgSuccess("删除成功");
// getList();
// });
// });
};
// 详情
const addEdit = (type, id) => {
nextTick(() => {
detailDiloag.value.init(type, id);
})
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
}; };
</script> </script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -0,0 +1,78 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">保安培训教学大纲{{ title }}</span>
<div>
<el-button size="small" v-if="openType != 'detail'" @click="save" type="primary" :loading="loading">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="openType == 'detail'" :rules="rules" :formList="formList">
</FormMessage>
</div>
</div>
</template>
<script setup>
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 dialogForm = ref(false);
const title = ref('');
const FormRef = ref();
const loading = ref(false);
const listQuery = ref({});
const openType = ref("")
const rules = reactive({
pxlx: [{ required: true, message: "请输入视频标题", trigger: "blur" }],
});
const formList = reactive([
[
{ label: "培训类型", prop: "pxlx", type: "input" },
{ label: "教学项目", prop: "jxxm", type: "input" },
],
])
// 初始化数据
const init = (type, id,) => {
dialogForm.value = true;
openType.value = type;
title.value = type == "add" ? "新增" : "编辑";
if(id) getDateById(id)
};
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;
proxy.$message.success("保存成功");
// emit("refresh");
close();
// }).catch(() => {
// loading.value = false;
// })
});
}
const close = () => {
dialogForm.value = false;
FormRef.value.reset()
};;
defineExpose({init})
</script>
<style lang="scss" scoped>
@import "@/assets/css/layout.scss";
.mapBox{
width: calc(100% - 24rem);
height:500px;
overflow: hidden;
margin: 0 12rem;
}
</style>

View File

@ -1,11 +1,148 @@
<template> <template>
<div class="app-container"> <div>
<h1>保安培训教学大纲</h1> <div class="titleBox">
<PageTitle title="保安培训教学大纲">
<el-button type="primary" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="primary" link @click="addEdit('edit', row.id)">编辑</el-link>
<el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
<el-link type="danger" link @click="handleDelete(row.id)">删除</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" @refresh="getList" />
</div> </div>
</template> </template>
<script> <script setup>
export default { import PageTitle from "@/components/aboutTable/PageTitle.vue";
name: "SecurityTrainingSyllabus" import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
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 detailDiloag = ref();
const searchBox = ref(); //搜索框
const baseUrl = 'data:image/jpeg;base64,'
const searchConfiger = ref([
{
label: "教学项目",
prop: "questionContent",
placeholder: "请输入教学项目",
showType: "input"
},
]);
const queryFrom = ref({});
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 180,
tableColumn: [
{ label: "培训类型", prop: "questionType"},
{ label: "教学项目", prop: "questionContent" },
]
});
onMounted(() => {
getList();
tabHeightFn();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
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;
// });
};
// 删除
const handleDelete = (id) => {
// proxy.$modal.confirm("是否确认删除该值守点?").then(() => {
// qcckPost({ id }, "/mosty-jbld/jbldzsd/delete").then(() => {
// proxy.$modal.msgSuccess("删除成功");
// getList();
// });
// });
};
// 详情
const addEdit = (type, id) => {
nextTick(() => {
detailDiloag.value.init(type, id);
})
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
window.onresize = function () {
tabHeightFn();
};
}; };
</script> </script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="dialog" v-if="dialogForm"> <div class="dialog" v-if="dialogForm">
<div class="head_box"> <div class="head_box">
<span class="title">巡逻路线{{ title }}</span> <span class="title">保安视频库{{ title }}</span>
<div> <div>
<el-button size="small" v-if="openType != 'detail'" @click="save" type="primary" :loading="loading">保存</el-button> <el-button size="small" v-if="openType != 'detail'" @click="save" type="primary" :loading="loading">保存</el-button>
<el-button size="small" @click="close">关闭</el-button> <el-button size="small" @click="close">关闭</el-button>
@ -9,36 +9,17 @@
</div> </div>
<div class="cntinfo"> <div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :disabled="openType == 'detail'" :rules="rules" :formList="formList"> <FormMessage ref="FormRef" v-model="listQuery" :disabled="openType == 'detail'" :rules="rules" :formList="formList">
<template #jwd>
<div class="flex align-center ww100">
<el-input style="width: 48%;" v-model="listQuery.jd" placeholder="请选择经度"/>
<el-input style="width: 48%;" v-model="listQuery.wd" placeholder="请选择纬度"/>
<el-button type="primary" @click="changePoint">选择点位</el-button>
</div>
</template>
</FormMessage> </FormMessage>
<div class="mapBox relative">
<GdMap></GdMap>
</div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import emitter from "@/utils/eventBus.js";
import GdMap from "@/components/GdMap/index.vue";
import { qcckPost , qcckGet} from "@/api/qcckApi.js"; import { qcckPost , qcckGet} from "@/api/qcckApi.js";
import FormMessage from "@/components/aboutTable/FormMessage.vue"; import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { ref,defineProps, reactive,defineEmits,getCurrentInstance, onMounted } from 'vue'; import { ref, reactive,defineEmits,getCurrentInstance } from 'vue';
import { color } from "echarts";
const emit = defineEmits(["refresh"]); const emit = defineEmits(["refresh"]);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const props = defineProps({
dic: {
type: Object,
default: () => ({})
}
});
const dialogForm = ref(false); const dialogForm = ref(false);
const title = ref(''); const title = ref('');
const FormRef = ref(); const FormRef = ref();
@ -46,32 +27,17 @@ const loading = ref(false);
const listQuery = ref({}); const listQuery = ref({});
const openType = ref("") const openType = ref("")
const rules = reactive({ const rules = reactive({
zsdMc: [{ required: true, message: "请输入值守点名称", trigger: "blur" }], spbt: [{ required: true, message: "请输入视频标题", trigger: "blur" }],
}); });
const formList = reactive([ const formList = reactive([
[ [
{ label: "值守点名称", prop: "zsdMc", type: "input" }, { label: "视频标题", prop: "spbt", type: "input" },
{ label: "所属辖区", prop: "ssbmdm", type: "department" },
], ],
[ [
{ label: "地址", prop: "xxdz", type: "input"}, { label: "附件", prop: "fjdz", type: "upload"},
],
[
{ label: "选择点位", prop: "jwd", type: "slot"},
], ],
]) ])
// 获取数据
onMounted(()=>{
emitter.on("coordString", (res => {
if(res.type == 'point') {
listQuery.value.jd = res.coord[0];
listQuery.value.wd = res.coord[1];
let icon = require('@/assets/point/zsd1.png');
emitter.emit("showPoint", { coords: [{jd:res.coord[0],wd:res.coord[1]}], icon, flag: 'bxd'});
}
}))
})
// 初始化数据 // 初始化数据
const init = (type, id,) => { const init = (type, id,) => {
@ -81,43 +47,20 @@ const init = (type, id,) => {
if(id) getDateById(id) if(id) getDateById(id)
}; };
// 根据id获取数据
const getDateById = (id) =>{
emitter.emit("deletePointArea", 'bxd');
qcckGet({id}, `/mosty-jbld/jbldzsd/selectByid`).then((res) => {
listQuery.value = res || {};
if(res.jd && res.wd){
let icon = require('@/assets/point/zsd1.png');
emitter.emit("showPoint", { coords: [{jd:res.jd,wd:res.wd}], icon, flag: 'bxd'});
emitter.emit("setMapCenter", { location: [res.jd,res.wd], zoomLevel:12});
}
})
}
// 选择点位
const changePoint = () =>{
listQuery.value.jd = ''
listQuery.value.wd = ''
emitter.emit("removePlot", 'point');
emitter.emit("deletePointArea", 'bxd');
emitter.emit("drawShape", { type: 'point', flag: 'point'});
}
const save = () => { const save = () => {
FormRef.value.submit(()=>{ FormRef.value.submit(()=>{
loading.value = true; // loading.value = true;
let url = title.value == '新增' ? `/mosty-jbld/jbldzsd/add` : `/mosty-jbld/jbldzsd/update`; // let url = title.value == '新增' ? `/mosty-jbld/jbldzsd/add` : `/mosty-jbld/jbldzsd/update`;
qcckPost(listQuery.value, url).then(() => { // qcckPost(listQuery.value, url).then(() => {
loading.value = false; // loading.value = false;
proxy.$message.success("保存成功"); proxy.$message.success("保存成功");
emit("refresh"); // emit("refresh");
close(); close();
}).catch(() => { // }).catch(() => {
loading.value = false; // loading.value = false;
}) // })
}); });
} }
const close = () => { const close = () => {
dialogForm.value = false; dialogForm.value = false;
FormRef.value.reset() FormRef.value.reset()

View File

@ -19,11 +19,6 @@
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" <MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth" :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"> @chooseData="chooseData">
<template #ewm="{ row }">
<el-image style="width: 70px;" :src="`${baseUrl}${row.ewm}`" preview-teleported>
</el-image>
</template>
<!-- 操作 --> <!-- 操作 -->
<template #controls="{ row }"> <template #controls="{ row }">
<el-link type="primary" link @click="addEdit('edit', row.id)">编辑</el-link> <el-link type="primary" link @click="addEdit('edit', row.id)">编辑</el-link>