逻辑更改

main
许宏杰 2 weeks ago
parent 5b5df60f4b
commit c1b0c24d5a

@ -23,13 +23,16 @@
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" v-if="showTip"> <div class="el-upload__tip" v-if="showTip">
请上传 请上传
<template v-if="fileType">
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> 的文件
</template>
<template >
最多可上传<b style="color: #f56c6c">{{ limit }}张照片</b>
</template>
<template v-if="fileSize"> <template v-if="fileSize">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</template> </template>
<template v-if="fileType">
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
的文件
</div> </div>
<el-dialog <el-dialog

@ -3,10 +3,15 @@ import { createApp } from 'vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import ElementPlus from 'element-plus' import ElementPlus from 'element-plus'
import { ElTable } from 'element-plus'
import 'element-plus/dist/index.css' import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css' import 'element-plus/theme-chalk/dark/css-vars.css'
import locale from 'element-plus/es/locale/lang/zh-cn' import locale from 'element-plus/es/locale/lang/zh-cn'
const TableProps = ElTable.props
// 全局el-table设置
TableProps.border = { type: Boolean, default: true } // 边框线
import '@/assets/styles/index.scss' // global css import '@/assets/styles/index.scss' // global css
import App from './App' import App from './App'

@ -33,6 +33,9 @@
<template #prepend> <template #prepend>
<el-button icon="MapLocation" /> <el-button icon="MapLocation" />
</template> </template>
<template #append>
<span class="location-search" @click="handleSearch"></span>
</template>
</el-input> </el-input>
<div class="serch-list" v-show="gaodePOIList.length > 0"> <div class="serch-list" v-show="gaodePOIList.length > 0">
@ -66,64 +69,38 @@
/> />
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="工单照片:" prop="gdtp"> <el-form-item label="影响类型:" prop="gdtp">
<ImageUpload v-model="form.gdtp"></ImageUpload> <el-checkbox-group v-model="form.dflx">
</el-form-item>
<el-form-item label="工单等级:" prop="gdLevel">
<el-radio-group v-model="form.gdLevel">
<el-radio
:value="parseInt(dict.value)"
v-for="dict in dict.gdlevel"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="处置方案:" prop="clfa">
<el-select v-model="form.clfa" placeholder="请选择" clearable>
<el-option
v-for="dict in dict.clfa"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="派遣人数:" prop="pqrs">
<el-input v-model="form.pqrs" placeholder="请输入" clearable>
<template #suffix>
<span></span>
</template>
</el-input>
</el-form-item>
<el-form-item label="派遣车辆:" prop="pqcl">
<el-input v-model="form.pqcl" placeholder="请输入" clearable>
<template #suffix>
<span></span>
</template>
</el-input>
</el-form-item>
<el-form-item label="资源协调:" prop="zyxt">
<el-checkbox-group v-model="form.zyxt">
<el-checkbox <el-checkbox
v-for="dict in dict.zyxt" v-for="dict in dict.yxlx"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> />
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="工单照片:" prop="gdtp">
<ImageUpload v-model="form.gdtp" :limit="3"></ImageUpload>
</el-form-item>
<el-form-item label="工单描述:" prop="gdms">
<el-input
v-model="form.gdms"
:rows="2"
type="textarea"
placeholder="请填写"
/>
</el-form-item>
</section> </section>
<section v-else> <section v-else>
<el-form-item label="简要描述:" prop="gdms"> <el-form-item label="简要描述:" prop="gdms">
<el-select v-model="form.gdms" placeholder="请选择" clearable> <el-input
<el-option v-model="form.gdms"
v-for="dict in dict.gdms" :rows="2"
:key="dict.value" type="textarea"
:label="dict.label" placeholder="请填写"
:value="parseInt(dict.value)" />
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="选派人员:" prop="zzjg"> <el-form-item label="选派人员:" prop="zzjg">
<el-cascader <el-cascader
@ -153,8 +130,6 @@ import mapOptions from "@/components/mars-work/mapOptions";
import markerIcon from "@/assets/images/map-marker.png"; import markerIcon from "@/assets/images/map-marker.png";
import { gaodeAddress, gaodePOI } from "@/utils/common.js"; import { gaodeAddress, gaodePOI } from "@/utils/common.js";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const gaodePOIList = ref([]); const gaodePOIList = ref([]);
const currentId = ref(0); const currentId = ref(0);
@ -229,12 +204,6 @@ const data = reactive({
dflx: [{ required: true, message: "请选择倒伏类型", trigger: "blur" }], dflx: [{ required: true, message: "请选择倒伏类型", trigger: "blur" }],
gdtp: [{ required: true, message: "请上传工单照片", trigger: "blur" }], gdtp: [{ required: true, message: "请上传工单照片", trigger: "blur" }],
gdLevel: [{ required: true, message: "请选择工单等级", trigger: "blur" }],
clfa: [{ required: true, message: "请选择处置方案", trigger: "blur" }],
pqrs: [{ required: true, message: "请填写派遣人数", trigger: "blur" }],
pqcl: [{ required: true, message: "请填写派遣车辆", trigger: "blur" }],
zyxt: [{ required: true, message: "请选择资源协调", trigger: "blur" }],
}, },
}); });
const { form, rules } = toRefs(data); const { form, rules } = toRefs(data);
@ -260,6 +229,10 @@ const changeType = () => {
const confirm = () => { const confirm = () => {
proxy.$refs["formRef"].validate(async (valid) => { proxy.$refs["formRef"].validate(async (valid) => {
if (valid) { if (valid) {
if (!form.value.lat || !form.value.lon) {
proxy.$modal.msgWarning("请先落点至地图上!");
return;
}
form.value.zzjg = filterArray(form.value.zzjg, "join"); form.value.zzjg = filterArray(form.value.zzjg, "join");
form.value.dflx = filterArray(form.value.dflx, "join"); form.value.dflx = filterArray(form.value.dflx, "join");
form.value.zyxt = filterArray(form.value.zyxt, "join"); form.value.zyxt = filterArray(form.value.zyxt, "join");
@ -268,8 +241,8 @@ const confirm = () => {
await intruderyj(form.value); await intruderyj(form.value);
proxy.$modal.msgSuccess(`${props.title}成功`); proxy.$modal.msgSuccess(`${props.title}成功`);
} }
if(form.value.status === 1){ if (form.value.status === 1) {
await updateyj(form.value) await updateyj(form.value);
proxy.$modal.msgSuccess(`编辑成功`); proxy.$modal.msgSuccess(`编辑成功`);
} }
} else { } else {
@ -294,10 +267,8 @@ const getInfo = async (val) => {
console.log(props.id, visible.value); console.log(props.id, visible.value);
const res = await getyjById(props.id); const res = await getyjById(props.id);
res.data.zzjg = res.data.zzjg.split(",").map((item) => parseInt(item)); res.data.zzjg = res.data.zzjg.split(",").map((item) => parseInt(item));
res.data.zyxt = filterArray(res.data.zyxt); res.data.zyxt = filterArray(res.data.zyxt);
res.data.dflx = filterArray(res.data.dflx); res.data.dflx = filterArray(res.data.dflx);
form.value = res.data; form.value = res.data;
if (form.value.lat && form.value.lon && mapData) { if (form.value.lat && form.value.lon && mapData) {
nextTick(() => { nextTick(() => {
@ -438,8 +409,6 @@ const handleMapClick = (longitude, latitude) => {
const isPositiveDecimal = (num) => { const isPositiveDecimal = (num) => {
return typeof num === "number" && num >= 0 && !Number.isInteger(num); return typeof num === "number" && num >= 0 && !Number.isInteger(num);
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -472,4 +441,8 @@ const isPositiveDecimal = (num) => {
font-weight: bold; font-weight: bold;
} }
} }
.location-search {
font-size: 14px;
cursor: pointer;
}
</style> </style>

@ -8,7 +8,7 @@
label-width="68px" label-width="68px"
class="search-form" class="search-form"
> >
<el-form-item label="工单地址" prop="address"> <el-form-item label="处置部门" prop="address">
<el-input <el-input
v-model="queryParams.address" v-model="queryParams.address"
placeholder="请输入" placeholder="请输入"
@ -29,7 +29,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工单等级" prop="gdLevel"> <el-form-item label="影响类型" prop="gdLevel">
<el-select <el-select
v-model="queryParams.gdLevel" v-model="queryParams.gdLevel"
placeholder="请选择" placeholder="请选择"
@ -87,12 +87,26 @@
:header-cell-style="proxy.getTableHeaderStyle" :header-cell-style="proxy.getTableHeaderStyle"
:cell-style="proxy.getTablerowStyle" :cell-style="proxy.getTablerowStyle"
> >
<!-- <el-table-column type="selection" width="50" align="center" /> --> <el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column
label="处置部门"
align="center"
key="address"
prop="address"
show-overflow-tooltip
/>
<el-table-column
label="处置班组"
align="center"
key="address"
prop="address"
/>
<el-table-column <el-table-column
label="工单地址" label="工单地址"
align="center" align="center"
key="address" key="address"
prop="address" prop="address"
show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="工单类型" label="工单类型"
@ -104,16 +118,7 @@
<dict-tag :options="gdlx" :value="scope.row.gdType" /> <dict-tag :options="gdlx" :value="scope.row.gdType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="工单等级"
align="center"
key="gdLevel"
prop="gdLevel"
>
<template #default="scope">
<dict-tag :options="gdlevel" :value="scope.row.gdLevel" />
</template>
</el-table-column>
<el-table-column <el-table-column
label="录入时间" label="录入时间"
align="center" align="center"
@ -142,7 +147,7 @@
> >
<template #default="scope"> <template #default="scope">
<div class="table-operation-row"> <div class="table-operation-row">
<section v-show="scope.row.status == 0"> <!-- <section v-show="scope.row.status == 0">
<el-button <el-button
link link
type="primary" type="primary"
@ -157,15 +162,8 @@
@click="handlerRetreat(scope.row)" @click="handlerRetreat(scope.row)"
>退单</el-button >退单</el-button
> >
</section> </section> -->
<section v-show="scope.row.status == 1"> <!-- <section v-show="scope.row.status == 1">
<el-button
link
type="primary"
icon="User"
@click="handlerDistriBute(scope.row, '派发')"
>派发</el-button
>
<el-button <el-button
link link
type="primary" type="primary"
@ -173,7 +171,7 @@
@click="handlerEdit(scope.row)" @click="handlerEdit(scope.row)"
>编辑</el-button >编辑</el-button
> >
</section> </section> -->
<section v-show="scope.row.status == 3"> <section v-show="scope.row.status == 3">
<el-button <el-button
link link
@ -226,12 +224,9 @@
<operation <operation
:dict="{ :dict="{
gdlx, gdlx,
dflx,
gdlevel,
clfa,
zyxt,
gdms, gdms,
deptList, deptList,
yxlx,
}" }"
v-model="open" v-model="open"
:id="workId" :id="workId"
@ -242,7 +237,6 @@
<chargeBack <chargeBack
v-model="retreat" v-model="retreat"
:id="workId" :id="workId"
:dictReason="reason"
@confirm="getList()" @confirm="getList()"
></chargeBack> ></chargeBack>
<!-- 派发 --> <!-- 派发 -->
@ -267,17 +261,11 @@ import useUserStore from "@/store/modules/user";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const userStore = useUserStore(); const userStore = useUserStore();
const deptList = ref([]); const deptList = ref([]);
const { gdlx, gdms, gdlevel, clfa, zyxt, dflx, gd_status, reason } = const { gdlx, gd_status, yxlx } = proxy.useDict(
proxy.useDict( "gdlx",
"gdlx", "gd_status",
"gdms", "yxlx"
"gdlevel", );
"clfa",
"zyxt",
"dflx",
"gd_status",
"reason"
);
const datePicker = ref([]); const datePicker = ref([]);
const workId = ref(null); const workId = ref(null);
const loading = ref(false); const loading = ref(false);

@ -0,0 +1,22 @@
<template>
<div class="main-left">
<panelBlock title="应急抢险资源"></panelBlock>
<panelBlock title="应急抢险工单"></panelBlock>
<panelBlock title="工单派发及完成率分析"></panelBlock>
</div>
</template>
<script setup>
import { panelBlock } from "@/views/visualization/components/index";
</script>
<style lang="scss" scoped>
.main-left{
display: flex;
flex-direction: column;
&>div{
flex: 1;
}
}
</style>

@ -1,10 +1,6 @@
<template> <template>
<div class="emergency-container"> <div class="emergency-container">
<div class="main-left"> <containerLeft></containerLeft>
<panelBlock title="应急抢险资源"></panelBlock>
<panelBlock title="应急抢险工单"></panelBlock>
<panelBlock title="工单派发及完成率分析"></panelBlock>
</div>
<div class="main-right"> <div class="main-right">
<panelBlock title="最新预警信息"></panelBlock> <panelBlock title="最新预警信息"></panelBlock>
<panelBlock title="工单数量变化分析"></panelBlock> <panelBlock title="工单数量变化分析"></panelBlock>
@ -29,6 +25,7 @@ import { onUnmounted } from "vue";
import wallImg from "@/assets/images/visualization/fence-top.png"; import wallImg from "@/assets/images/visualization/fence-top.png";
import areaBg from "@/assets/images/visualization/area-bg.png"; import areaBg from "@/assets/images/visualization/area-bg.png";
import { panelBlock } from "@/views/visualization/components/index"; import { panelBlock } from "@/views/visualization/components/index";
import containerLeft from "./components/containerLeft.vue"
// //
const configUrl = "lib/config/config.json"; const configUrl = "lib/config/config.json";
let mapData = null; let mapData = null;
@ -151,11 +148,7 @@ onUnmounted(() => {
padding-bottom: 34px; padding-bottom: 34px;
width: 16%; width: 16%;
height: 100%; height: 100%;
display: flex;
flex-direction: column;
&>div{
flex: 1;
}
} }
.main-left { .main-left {

Loading…
Cancel
Save