'保安项目提交'
This commit is contained in:
@ -0,0 +1,146 @@
|
||||
<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">
|
||||
<FormMessage ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" :labelWidth='120'>
|
||||
<!-- <template #zb>
|
||||
<el-input v-model="formData.zb" placeholder="请选择巡逻路线">
|
||||
<template #append><el-button type="primary" @click="chackLat">开始绘制</el-button></template>
|
||||
</el-input>
|
||||
</template> -->
|
||||
</FormMessage>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive, getCurrentInstance } from 'vue'
|
||||
import { qcckPost } from "@/api/qcckApi.js";
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
|
||||
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 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: "rzsj", type: "date" },
|
||||
// { label: "离职时间", prop: "lzsj", type: "input" },
|
||||
{ label: "文化程度", prop: "ssbmdm", type: "select" },
|
||||
{ label: "资格证编号", prop: "zgzbh", type: "input" },
|
||||
{ label: "资格证类型", prop: "zgzlx", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "资格证起始日期", prop: "zgzKssj", type: "date" },
|
||||
{ label: "资格证截至日期", prop: "zgzJssj", type: "date" },
|
||||
{ label: "岗位", prop: "ssbmdm", type: "input" },
|
||||
{ label: "外派岗位", prop: "ssbmdm", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "从业人员照片", prop: "ssbmdm", type: "upload" },
|
||||
],
|
||||
[
|
||||
{ label: "保安证件", prop: "bazzp", type: "upload", limit: 1 },
|
||||
]
|
||||
])
|
||||
|
||||
const rules = {
|
||||
xm: [{ required: true, message: "请输入姓名", trigger: "change" }],
|
||||
sfzh: [{ required: true, message: "请输入证件号码", trigger: "change" }],
|
||||
lxdh: [{ required: true, message: "请输入联系电话", trigger: "change" }],
|
||||
jzdz: [{ required: true, message: "请输入居住地址", trigger: "change" }],
|
||||
rzsj: [{ required: true, message: "请选择入职时间", trigger: "change" }],
|
||||
zgzbh: [{ required: true, message: "请输入资格证编号", trigger: "change" }],
|
||||
|
||||
zgzlx: [{ required: true, message: "请输入资格证类型", trigger: "change" }],
|
||||
zgzKssj: [{ required: true, message: "请选择资格证起始日期", trigger: "change" }],
|
||||
zgzJssj: [{ required: true, message: "请选择资格证截至日期", trigger: "blur" }],
|
||||
}
|
||||
|
||||
const formData = ref({})
|
||||
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
const open = (row = {}, type = 'add') => {
|
||||
dialogVisible.value = true
|
||||
formData.value = { ...row }
|
||||
if (type === 'add') {
|
||||
title.value = '新增从业人员'
|
||||
} else if (type === 'edit') {
|
||||
title.value = '编辑从业人员'
|
||||
} else {
|
||||
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";
|
||||
|
||||
.cntinfo{
|
||||
height: calc(100% - 70px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.mapBox {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
148
src/views/securityManagement/practitioner/index.vue
Normal file
148
src/views/securityManagement/practitioner/index.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle 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 #bxds="{ row }">
|
||||
<div>{{ row.bxds?.length }}</div>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link type="danger" @click="handleDelete([row.id])">删除</el-link>
|
||||
<el-link type="warning" @click="addEdit('view', row)">详情</el-link>
|
||||
<el-link type="primary" @click="handleXfrw(row)">离职</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
}"></Pages>
|
||||
</div>
|
||||
|
||||
<add-practitioner-dialog v-model="isVisible" ref="addPractitionerRef" @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 addPractitionerDialog from "./components/addPractitionerDialog.vue";
|
||||
|
||||
const addPractitionerRef = 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: "input"
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "lxdh",
|
||||
placeholder: "请输入联系电话",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "是否在职",
|
||||
prop: "ssbmdm",
|
||||
placeholder: "请选择是否在职",
|
||||
showType: "select"
|
||||
}
|
||||
]);
|
||||
|
||||
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: "bxds", showSolt: true },
|
||||
{ label: "入职时间", prop: "rzsj" },
|
||||
{ label: "外派单位", prop: "controls", },
|
||||
{ label: "是否在职", prop: "controls" },
|
||||
]
|
||||
});
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight =
|
||||
window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
const addEdit = (type, row) => {
|
||||
addPractitionerRef.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/cyry/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>
|
||||
@ -0,0 +1,139 @@
|
||||
<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">
|
||||
<FormMessage ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" :labelWidth='120'>
|
||||
<!-- <template #zb>
|
||||
<el-input v-model="formData.zb" placeholder="请选择巡逻路线">
|
||||
<template #append><el-button type="primary" @click="chackLat">开始绘制</el-button></template>
|
||||
</el-input>
|
||||
</template> -->
|
||||
</FormMessage>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive, getCurrentInstance } from 'vue'
|
||||
import { qcckPost } from "@/api/qcckApi.js";
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
|
||||
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 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: "rzsj", type: "date" },
|
||||
{ label: "岗位", prop: "ssbmdm", type: "select" },
|
||||
{ label: "所属保安公司", prop: "pxgs", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "身份证正反面", prop: "ssbmdm", type: "upload", limit: 2 },
|
||||
],
|
||||
[
|
||||
{ label: "体检报告", prop: "ssbmdm", type: "upload", limit: 1 },
|
||||
],
|
||||
[
|
||||
{ label: "无犯罪记录证明", prop: "ssbmdm", type: "upload", limit: 1 },
|
||||
]
|
||||
])
|
||||
|
||||
const rules = {
|
||||
xm: [{ required: true, message: "请输入姓名", trigger: "change" }],
|
||||
sfzh: [{ required: true, message: "请输入证件号码", trigger: "change" }],
|
||||
lxdh: [{ required: true, message: "请输入联系电话", trigger: "change" }],
|
||||
jzdz: [{ required: true, message: "请输入居住地址", trigger: "change" }],
|
||||
rzsj: [{ required: true, message: "请选择入职时间", trigger: "change" }],
|
||||
pxgs: [{ required: true, message: "请选择所属保安公司", trigger: "change" }],
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
.cntinfo{
|
||||
height: calc(100% - 70px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.mapBox {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
137
src/views/securityManagement/trainer/index.vue
Normal file
137
src/views/securityManagement/trainer/index.vue
Normal file
@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle 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('edit', row)">编辑</el-link>
|
||||
<el-link type="danger" @click="handleDelete([row.id])">删除</el-link>
|
||||
<el-link type="warning" @click="addEdit('view', row)">详情</el-link>
|
||||
<el-link type="primary" @click="handleXfrw(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 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: "input"
|
||||
},
|
||||
{
|
||||
label: "联系电话",
|
||||
prop: "lxdh",
|
||||
placeholder: "请输入联系电话",
|
||||
showType: "input"
|
||||
},
|
||||
]);
|
||||
|
||||
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: "bxds", showSolt: true },
|
||||
{ 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>
|
||||
116
src/views/securityManagement/unitInformation/index.vue
Normal file
116
src/views/securityManagement/unitInformation/index.vue
Normal file
@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="titleBox">
|
||||
<PageTitle 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 #bxds="{ row }">
|
||||
<div>{{ row.bxds?.length }}</div>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link type="danger" @click="handleDelete([row.id])">删除</el-link>
|
||||
<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
|
||||
}"></Pages>
|
||||
</div>
|
||||
</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";
|
||||
|
||||
const searchBox = ref(null);
|
||||
const D_BZ_BXDLX = ref([]);
|
||||
const searchConfiger = ref([
|
||||
{
|
||||
label: "巡逻路线名称",
|
||||
prop: "bxxMc",
|
||||
placeholder: "巡逻路线名称",
|
||||
showType: "input"
|
||||
},
|
||||
{
|
||||
label: "所属辖区",
|
||||
prop: "ssbmdm",
|
||||
placeholder: "分县局",
|
||||
showType: "department"
|
||||
}
|
||||
]);
|
||||
|
||||
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: "bxxMc" },
|
||||
{ label: "证件号码", prop: "ssbm" },
|
||||
{ label: "巡逻路线类型", prop: "bxxLx", showSolt: true },
|
||||
{ label: "巡逻点位数量", prop: "bxds", showSolt: true }
|
||||
]
|
||||
});
|
||||
|
||||
// 表格高度计算
|
||||
const tabHeightFn = () => {
|
||||
pageData.tableHeight =
|
||||
window.innerHeight - searchBox.value.offsetHeight - 250;
|
||||
window.onresize = function () {
|
||||
tabHeightFn();
|
||||
};
|
||||
};
|
||||
|
||||
const getList = async () => {
|
||||
try {
|
||||
pageData.tableConfiger.loading = true;
|
||||
const res = await qcckGet({
|
||||
...pageData.pageConfiger,
|
||||
}, `/mosty-base/baxx/dwgl/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>
|
||||
Reference in New Issue
Block a user