This commit is contained in:
给我
2025-12-30 09:50:02 +08:00
parent bd47ebd435
commit 948b92b6df
10 changed files with 1673 additions and 111 deletions

View File

@ -0,0 +1,303 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">{{ pageInfo[pageType].title }}</span>
<div>
<el-button size="small" type="primary" v-if="['add', 'edit'].includes(pageType)" @click="_onSave">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<el-form ref="formRef" :model="listQuery" :disabled="forbidden" :rules="rules" :inline="true"
label-position="top">
<el-form-item style="width: 46%" prop="ssbmdm" label="所属部门">
<MOSTY.Department width="100%" clearable v-model="listQuery.ssbmdm"
:placeholder="listQuery.ssbm ? listQuery.ssbm : '请选择所属部门'" />
</el-form-item>
<el-form-item style="width: 46%" prop="kkMc" label="环林卡口名称">
<div class="diviput" @click="forbidden ? '' : showJcz = true">
<span v-if="listQuery.kkMc">{{ listQuery.kkMc }}</span>
<span class="placeholder" v-else> 请选择布控卡口</span>
</div>
</el-form-item>
<el-form-item style="width: 46%" prop="ryxm" label="过检人员姓名">
<div class="diviput" @click="forbidden ? '' : showGjry = true">
<span v-if="listQuery.ryxm">{{ listQuery.ryxm }}</span>
<span class="placeholder" v-else> 请选择过检人员</span>
</div>
</el-form-item>
<el-form-item style="width: 46%" prop="hphm" label="过检车辆">
<div class="diviput" @click="forbidden ? '' : showGjcl = true">
<span v-if="listQuery.hphm">{{ listQuery.hphm }}</span>
<span class="placeholder" v-else> 请选择过检车辆</span>
</div>
</el-form-item>
<el-form-item prop="wplx" label="物品类型" style="width: 46%">
<el-select clearable v-model="listQuery.wplx" placeholder="请选择物品类型" style="width: 100%">
<el-option v-for="(item, index) in dict.D_BZ_WPLX" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="物品数量" prop="wpsl" style="width: 46%">
<el-input-number style="width: 100%" v-model="listQuery.wpsl" placeholder="请输入物品数量" />
</el-form-item>
<el-form-item label="物品说明" prop="wpms" style="width: 100%">
<el-input type="textarea" rows="3" v-model="listQuery.wpms" placeholder="物品说明" />
</el-form-item>
</el-form>
</div>
</div>
<Jczloder v-model="showJcz" :Single="true" @choosedJcz="JczMsg" :data="[]" />
<Gjrxloder v-model="showGjry" :Single="true" @choosedJcz="GjryMsg" :data="[]" />
<Gjclloder v-model="showGjcl" :Single="true" @choosedJcz="GjclMsg" :data="[]" />
</template>
<script setup>
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { ref, reactive, onMounted } from "vue";
import Jczloder from "@/components/loder/Jczloder.vue";
import Gjrxloder from "@/components/loder/gjrxloder.vue";
import Gjclloder from "@/components/loder/gjclloder.vue";
import { GjrytxinsertEntity, GjrytxeditEntity } from "@/api/mosty-jcz.js";
import * as MOSTY from "@/components/MyComponents/index";
import emitter from "@/utils/eventBus.js";
import GdMap from "@/components/GdMap/index.vue";
import { ElMessage } from "element-plus";
const props = defineProps({
dict: {
type: Object,
default: () => { }
}
});
const rules = reactive({
ssbmdm: [
{
required: true,
message: "请选择所属部门"
}
],
wplx: [
{
required: true,
message: "请选择物品类型"
}
],
wpsl: [
{
required: true,
message: "请输入物品数量",
trigger: "change"
}
],
});
const formRef = ref(null);
const emit = defineEmits(["getjczgetXfllList"]);
const dialogForm = ref(false);
const listQuery = ref({
ssbmdm:""
});
const pageInfo = {
edit: {
title: "编辑",
url: ""
},
add: {
title: "新增",
url: ""
},
detail: {
title: "详情"
}
};
onMounted(() => { });
let pageType = ref("add");
const showJcz = ref(false);
const showGjry = ref(false);
const showGjcl = ref(false);
const JczMsg = (val) => {
listQuery.value.kkMc = val.jczmc;
listQuery.value.kkId = val.id;
listQuery.value.jczmsm = val.id;
};
const GjryMsg = (val) => {
listQuery.value.ryxm = val.gjryxm;
listQuery.value.rysfzh = val.gjrysfzh;
listQuery.value.ryid = val.id;
}
const GjclMsg = (val) => {
listQuery.value.hphm = val.hphm;
listQuery.value.clid = val.id;
}
const forbidden = ref(false)
// 初始化数据
const init = (type, row) => {
pageType.value = type;
dialogForm.value = true;
// 根据type和row初始化表单数据
tabHeightFn();
if (type == "edit" || type == "detail") {
listQuery.value = { ...row };
if (type == "detail") {
forbidden.value = true
}
}
};
//保存
const _onSave = () => {
if (!formRef) return;
formRef.value.validate((valid, fields) => {
if (valid) {
if (pageType.value == "add") {
qcckPost(listQuery.value , "/mosty-jcz/tbJczBpcWp/addBpcWp").then((res) => {
ElMessage({ message: "新增成功", type: "success" });
emit("getjczgetXfllList");
close();
});
} else {
qcckPost(listQuery.value ,"/mosty-jcz/tbJczBpcWp/updateById").then((res) => {
ElMessage({ message: "修改成功", type: "success" });
emit("getjczgetXfllList");
close();
});
}
} else {
console.log("error submit!", fields);
}
});
};
//页面关闭
const close = () => {
dialogForm.value = false;
forbidden.value = false
listQuery.value = {};
};
// 表格高度计算
const tableHeight1 = ref();
const tabHeightFn = () => {
tableHeight1.value = window.innerHeight - 450;
};
defineExpose({ init });
</script>
<style lang="scss" scoped>
.dialog {
padding: 20px;
.head_box {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.cntinfo {
height: calc(100% - 70px);
overflow: hidden;
overflow-y: auto;
}
}
.my_transfer {
height: calc(100% - 50px);
display: flex;
.btn {
width: 50px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 10px;
}
.left {
margin: 12px;
flex: 1;
position: relative;
.tableBox {
position: absolute;
width: 100%;
}
.serch {
position: relative;
width: 100%;
// height: 96px;
>.el-form--inline {
display: block;
width: 100%;
padding: 0;
>.el-form-item--default {
width: 31%;
}
}
}
.tableBox {
width: 100%;
}
}
.right {
width: 380px;
margin: 12px;
}
}
.phone {
width: 95px;
height: 120px;
.el-image {
width: 95px;
max-height: 120px;
}
}
::v-deep .el-upload {
width: 90px;
height: 100px;
border: 1px dashed #000000;
margin-bottom: 14px;
.el-icon {
margin-top: 34px;
font-size: 26px;
}
.el-image {
width: 100%;
height: 100%;
}
}
.mapbox {
width: 1000px;
padding: 0 10px;
height: 400px;
box-sizing: border-box;
background: #000;
}
.diviput {
width: 100%;
background-color: #ffffff;
border: 1px solid #c0c4cc;
color: #000;
height: 32px;
line-height: 32px;
padding: 0 10px;
border-radius: 5px;
.placeholder {
color: #b5b5b5;
}
}
::v-deep .el-icon svg {
color: #000000 !important;
}
</style>

View File

@ -0,0 +1,202 @@
<template>
<div>
<div class="titleBox">
<PageTitle title="过检物品管理">
<el-button type="primary" @click="addEdit('add', '')" v-if="Auth">
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle" @click="addEdit('add', row)"
>新增</span
>
</el-button>
</PageTitle>
</div>
<!-- 表格 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" />
</div>
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
>
<template #wplx="{ row }">
<dict-tag :value="row.wplx" :options="D_BZ_WPLX" :tag="false" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="primary" @click="addEdit('edit', row)">修改</el-link>
<el-link type="primary" @click="addEdit('detail', row)">详情</el-link>
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
</template>
</MyTable>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
</div>
<!-- 编辑详情 -->
<EditAddForm
ref="detailDiloag"
:dict="{ D_BZ_WPLX }"
@getjczgetXfllList="getjczgetXfllList"
/>
</div>
</template>
<script setup>
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import { isAuth } from "@/utils/tools.js";
import { ElMessage } from "element-plus";
import EditAddForm from "./components/editAddForm.vue";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const { D_BZ_WPLX } = proxy.$dict("D_BZ_WPLX");
const searchConfiger = ref([
{
showType: "department",
prop: "ssbmdm",
placeholder: "请选择所属部门",
label: "所属部门"
},
{
label: "过检卡口",
prop: "kkMc",
placeholder: "请输入过检卡口",
showType: "input"
},
{
label: "物品类型",
prop: "wplx",
placeholder: "请输入物品类型",
showType: "select",
options: D_BZ_WPLX
}
]);
const detailDiloag = ref();
const pageData = reactive({
tableData: [], //表格数据
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 250, //操作栏宽度
tableColumn: [
{ label: "所属部门", prop: "ssbm", showOverflowTooltip: true },
{ label: "人员姓名", prop: "ryxm", showOverflowTooltip: true },
{ label: "人员身份证号", prop: "rysfzh", showOverflowTooltip: true },
{ label: "过检车辆", prop: "hphm", showOverflowTooltip: true },
{
label: "卡口名称",
prop: "kkMc",
showOverflowTooltip: true
},
{
label: "物品类型",
prop: "wplx",
showSolt: true,
showOverflowTooltip: true
},
{
label: "物品数量",
prop: "wpsl",
showOverflowTooltip: true
}
]
});
const Auth = ref(true);
onMounted(() => {
// Auth.value = isAuth()
tabHeightFn();
});
//查询条件
const queryCondition = ref({});
// 获取数据
const getjczgetXfllList = () => {
pageData.tableConfiger.loading = true;
const promes = { ...queryCondition.value, ...pageData.pageConfiger };
qcckGet(promes, "/mosty-jcz/tbJczBpcWp/getPagelist")
.then((res) => {
pageData.tableData = res.records;
pageData.total = res.total;
})
.finally(() => {
pageData.tableConfiger.loading = false;
});
};
getjczgetXfllList();
// 搜索
const onSearch = (val) => {
queryCondition.value = { ...queryCondition.value, ...val };
getjczgetXfllList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
};
// 获取列表
// 删除
const delDictItem = (id) => {
proxy
.$confirm("确定删除该数据?", "警告", { type: "warning" })
.then(() => {
qcckPost({ id }, "/mosty-jcz/tbJczBpcWp/deleteById").then((res) => {
ElMessage({ message: "删除成功", type: "success" });
pageData.pageConfiger.pageCurrent = 1;
getjczgetXfllList();
});
})
.catch(() => {
proxy.$message.info("已取消");
});
};
// 新增
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
};
const searchBox = ref(null);
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 280;
window.onresize = function () {
tabHeightFn();
};
};
</script>
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -24,15 +24,6 @@
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #jczlx="{ row }">
<dict-tag :value="row.jczlx" :options="D_BZ_JCZLX" :tag="false" />
</template>
<template #zqlx="{ row }">
<dict-tag :options="D_BZ_ZQLX" :value="row.zqlx" :tag="false" />
</template>
<template #jczjb="{ row }">
<dict-tag :options="D_BZ_JCZJB" :value="row.jczjb" :tag="false" />
</template>
<template #swrltx="{ row }">
<div class="phone">
<el-image
@ -78,7 +69,7 @@
<!-- 编辑详情 -->
<EditAddForm
ref="detailDiloag"
:dict="{ D_BZ_JCZLX, D_BZ_ZQLX, D_BZ_DLLX, D_BZ_JCZJB }"
:dict="{ D_BZ_ZQLX, D_BZ_DLLX }"
@getjczgetXfllList="getjczgetXfllList"
/>
</div>
@ -91,15 +82,14 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import { isAuth } from '@/utils/tools.js'
import { ElMessage } from "element-plus";
import Person from '@/assets/images/default_male.png'
import EditAddForm from "./components/editAddForm.vue";
import { GjrytxselectPage, GjrytxdeleteById } from "@/api/mosty-jcz.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const { D_BZ_JCZLX, D_BZ_ZQLX, D_BZ_DLLX, D_BZ_JCZJB } = proxy.$dict(
"D_BZ_JCZLX",
const { D_BZ_ZQLX, D_BZ_DLLX } = proxy.$dict(
"D_BZ_ZQLX",
"D_BZ_DLLX",
"D_BZ_JCZJB"
"D_BZ_DLLX"
);
const urlImg = "/mosty-api/mosty-base/minio/image/download/";
const searchConfiger = ref([

View File

@ -0,0 +1,263 @@
<template>
<div>
<div class="titleBox">
<PageTitle title="过站汇总管理"> </PageTitle>
</div>
<!-- 表格 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" />
</div>
<div class="top_box">
<div class="item_box">
<div>过站总人数{{ totalObj.gzryNum }}</div>
<div class="fl_box">
<div>入林人数{{ totalObj.rlclNum }}</div>
<div>出林人数{{ totalObj.clryNum }}</div>
</div>
</div>
<div class="item_box">
<div>过站总车数{{ totalObj.gzclNum }}</div>
<div class="fl_box">
<div>入林车数{{ totalObj.rlclNum }}</div>
<div>出林车数{{ totalObj.clclNum }}</div>
</div>
</div>
<div class="item_box">
<div>过站物品数{{ totalObj.gzwpNum }}</div>
<div class="fl_box">
<div>入林物品数{{ totalObj.rlwpNum }}</div>
<div>出林物品数{{ totalObj.clwpNum }}</div>
</div>
</div>
</div>
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@columnInfo="columnInfo">
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
</div>
<Gjrxloder v-model="showGjry" :chooseShow="false" :searchData="dialogSearch" />
<Gjclloder v-model="showGjcl" :chooseShow="false" :searchData="dialogSearch" />
<Gjwploder v-model="showGjwp" :chooseShow="false" :searchData="dialogSearch" />
</template>
<script setup>
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import Gjrxloder from "@/components/loder/gjrxloder.vue";
import Gjclloder from "@/components/loder/gjclloder.vue";
import Gjwploder from "@/components/loder/gjwploder.vue";
import { isAuth } from "@/utils/tools.js";
import { ElMessage } from "element-plus";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const { D_BZ_WPLX } = proxy.$dict("D_BZ_WPLX");
const searchConfiger = ref([
{
showType: "datetimerange",
prop: "time",
placeholder: "请选择时间",
label: "时间"
}
]);
const totalObj = ref({});
const showGjry = ref(false);
const showGjcl = ref(false);
const showGjwp = ref(false);
const detailDiloag = ref();
const dialogSearch = ref({});
const pageData = reactive({
tableData: [], //表格数据
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
haveControls: false
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 250, //操作栏宽度
tableColumn: [
{
label: "检查站名称",
prop: "kkMc",
showOverflowTooltip: true
},
{ label: "过站总人数", prop: "gzryNum", showOverflowTooltip: true },
{ label: "入林人数", prop: "rlclNum", showOverflowTooltip: true },
{ label: "出林人数", prop: "clryNum", showOverflowTooltip: true },
{
label: "过站总车辆",
prop: "gzclNum",
showOverflowTooltip: true
},
{
label: "入林车辆",
prop: "rlclNum",
showOverflowTooltip: true
},
{
label: "出林车辆",
prop: "clclNum",
showOverflowTooltip: true
},
{
label: "过站物品数",
prop: "gzwpNum",
showOverflowTooltip: true
},
{
label: "入林物品数",
prop: "rlwpNum",
showOverflowTooltip: true
},
{
label: "出林物品数",
prop: "clwpNum",
showOverflowTooltip: true
}
]
});
const Auth = ref(true);
onMounted(() => {
tabHeightFn();
});
//查询条件
const queryCondition = ref({});
// 统计
const getjczgetXfllTj = () => {
qcckGet(queryCondition.value, "/mosty-jcz/jczGjrytx/getGjrytxhzTj").then(
(res) => {
console.log(res, "res");
totalObj.value = res;
}
);
};
const getjczgetXfllList = () => {
qcckGet(queryCondition.value, "/mosty-jcz/jczGjrytx/getGjrytxhzlb")
.then((res) => {
pageData.tableData = res.records;
pageData.total = res.total;
})
.finally(() => {
pageData.tableConfiger.loading = false;
});
};
getjczgetXfllTj();
getjczgetXfllList();
// 搜索
const onSearch = (val) => {
if (val.time) {
queryCondition.value.kssj = val.time[0];
queryCondition.value.jssj = val.time[1];
} else {
queryCondition.value.kssj = "";
queryCondition.value.jssj = "";
}
getjczgetXfllTj();
getjczgetXfllList();
};
const columnInfo = (val) => {
// 过站类型01 入林 02 出林) 01 入林 02 出林
dialogSearch.value.kkId = val.row.kkId;
switch (val.column.property) {
case "gzryNum":
dialogSearch.value.gzlx = "";
showGjry.value = true;
break;
case "rlclNum":
dialogSearch.value.gzlx = "01";
showGjry.value = true;
break;
case "clryNum":
dialogSearch.value.gzlx = "02";
showGjry.value = true;
break;
case "gzclNum":
dialogSearch.value.gzlx = "";
showGjcl.value = true;
break;
case "rlclNum":
dialogSearch.value.gzlx = "01";
showGjcl.value = true;
break;
case "clclNum":
dialogSearch.value.gzlx = "02";
showGjcl.value = true;
break;
case "gzwpNum":
dialogSearch.value.gzlx = "";
showGjwp.value = true;
break;
case "rlwpNum":
dialogSearch.value.gzlx = "01";
showGjwp.value = true;
break;
case "clwpNum":
dialogSearch.value.gzlx = "02";
showGjwp.value = true;
break;
}
};
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
};
// 新增
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
};
const searchBox = ref(null);
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 280;
window.onresize = function () {
tabHeightFn();
};
};
</script>
<style lang="scss" scoped>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
.top_box {
display: flex;
justify-content: space-around;
color: #000;
margin-bottom: 10px;
.item_box {
text-align: center;
width: 22%;
font-size: 20px;
}
.fl_box {
display: flex;
font-size: 16px;
justify-content: space-between;
}
}
</style>