6/22完善引入,

This commit is contained in:
Zy
2026-06-22 08:14:35 +08:00
parent ea8129216b
commit 826bf3c782
208 changed files with 1122 additions and 1685 deletions

View File

@@ -24,7 +24,6 @@
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { addMonthCard, getMonthCard, updateMonthCard } from '@/api/system/MonthCard';
import { addItem, getItem, updateItem } from '@/api/system/InspectionItem';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;

View File

@@ -6,7 +6,6 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
</script>

View File

@@ -49,8 +49,8 @@
</el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:item:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:item:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:item:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:item:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -61,7 +61,7 @@
</template>
<script setup name="Item" lang="ts">
import { listItem, getItem, delItem, addItem, updateItem, updateItemStatus } from '@/api/system/InspectionItem/index';
import { listItem, delItem, addItem, updateItem, updateItemStatus } from '@/api/system/InspectionItem/index';
import { ItemVO, ItemQuery, ItemForm } from '@/api/system/InspectionItem/type';
import { checkPermi } from '@/utils/permission';

View File

@@ -92,7 +92,7 @@
<script setup name="Item" lang="ts">
import EchartsCompontent from '@/components/Echarts/index.vue';
import { listItem, type Request } from '@/api/system/Inspection/index';
import { getNaturalDayDiff, getLast7Days, getLastNDays, diffDays, formatDate } from '@/utils/time';
import { getNaturalDayDiff, getLastNDays, diffDays, formatDate } from '@/utils/time';
import { EChartsOption } from 'echarts';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -360,7 +360,7 @@ onMounted(() => {
height: 112px;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 6px 0px rgba(26, 117, 255, 0.2);
box-shadow: 0 2px 6px 0 rgba(26, 117, 255, 0.2);
border: 1px solid rgba(26, 117, 255, 0.2);
.overviewitem_name {
@@ -392,12 +392,12 @@ onMounted(() => {
border-left: none;
cursor: pointer;
&:first-of-type {
border-radius: 4px 0px 0px 0px;
border-radius: 4px 0 0 0;
border-left: 1px solid rgba(220, 223, 230, 1);
}
&:last-of-type {
border-radius: 0px 4px 0px 0px;
border-radius: 0 4px 0 0;
}
&.active {
color: #fff;

View File

@@ -12,7 +12,7 @@
</el-form-item>
<el-form-item label="任务时间">
<div flex flex-wrap>
<div class="flex flex-wrap">
<div
class="week-items"
@click="checkoutWeekFun(item)"
@@ -33,7 +33,7 @@
<!-- <el-select v-model="form.taskTime" placeholder="选择任务时间段" style="width: 100%">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> -->
<div v-for="(item, index) in taskTime" :key="index" style="display: flex; align-items: center; margin-top: 10px">
<div v-for="(_, index) in taskTime" :key="index" style="display: flex; align-items: center; margin-top: 10px">
<el-time-picker
v-model="taskTime[index]"
is-range
@@ -62,13 +62,13 @@
</el-form-item>
<el-form-item label="计划路线">
<el-select @change="handlChangeMap" v-model="form.routeIds" placeholder="请选择" style="width: 100%">
<el-option v-for="item in planlist" :key="item.value" :label="item.routeName" :value="item.id" />
<el-option v-for="item in playlist" :key="item.value" :label="item.routeName" :value="item.id" />
</el-select>
<div class="mapbox" id="PlanMapBox"></div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">提交</el-button>
<el-button @click="routeback">返回</el-button>
<el-button @click="outback">返回</el-button>
</el-form-item>
</el-form>
</div>
@@ -77,13 +77,13 @@
</template>
<script setup lang="ts">
// TODO 巡检计划 添加
import { listRoute } from '@/api/system/InspectionRoute';
import PageHeader from '@/components/Pageheader/index.vue';
import { numToWeek } from '@/utils/time';
import { ref } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
import { addPlan, getPlan, updatePlan } from '@/api/system/InspectionPlan';
import { Check } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
@@ -126,10 +126,10 @@ const editid = ref(null);
// 初始化
// 路线列表
const planlist = ref([]);
const playlist = ref([]);
async function init() {
const res = await listRoute();
planlist.value = res.rows;
playlist.value = res.rows;
if (route.query.id) {
editid.value = route.query.id;
getPlan(editid.value).then((res) => {
@@ -173,7 +173,7 @@ async function init() {
init();
// 返回
function routeback() {
function outback() {
router.back();
}
@@ -182,16 +182,16 @@ const map = ref(null);
const mapReady = ref(false);
const markerlist = [];
function handlChangeMap(val) {
function handlChangeMap(val: string) {
map.value.remove(markerlist);
if (val) {
const find = planlist.value.find((item) => item.id === val);
const find = playlist.value.find((item) => item.id === val);
if (find) {
if (find.points && find.points.length > 0) {
find.points.forEach((item, index) => {
const lnglat = item.location.split(',').map(Number);
find.points.forEach((item: { location: string; pointName: any }, index: number) => {
const angular = item.location.split(',').map(Number);
const marker = new AMapLib.value.Marker({
position: new AMapLib.value.LngLat(lnglat[0], lnglat[1]), //经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
position: new AMapLib.value.LngLat(angular[0], angular[1]), //经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
title: item.pointName,
content: `
<div style="display:flex;align-items:center;justify-content:center;width:30px;height:30px;line-height:18px;border-radius:50%;background-color:rgba(26,117,255,0.3);">
@@ -228,14 +228,14 @@ function handlChangeMap(val) {
}
}
}
const aloaderkey = import.meta.env.VITE_GCJ02_KEY_GD;
const autoloader = import.meta.env.VITE_GCJ02_KEY_GD;
const VITE_GCJ02_JS_CODE_GD = import.meta.env.VITE_GCJ02_JS_CODE_GD;
onMounted(async () => {
await nextTick();
window._AMapSecurityConfig = { securityJsCode: VITE_GCJ02_JS_CODE_GD };
AMapLoader.load({
key: aloaderkey,
key: autoloader,
version: '2.0',
plugins: ['AMap.Scale', 'AMap.Marker']
}).then(async (AMap) => {
@@ -261,12 +261,12 @@ function submit() {
if (editid.value) {
updatePlan(form.value).then(() => {
ElMessage.success('编辑成功');
routeback();
outback();
});
} else {
addPlan(form.value).then(() => {
ElMessage.success('添加成功');
routeback();
outback();
});
}
}
@@ -281,8 +281,7 @@ function submit() {
background-color: white;
.bodybox {
width: 600px;
margin: 0 auto;
margin-top: 20px;
margin: 20px auto 0;
}
.inspectorIdsBox {
display: flex;

View File

@@ -20,17 +20,6 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:plan:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:plan:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:plan:remove']"
>删除</el-button
>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
@@ -68,8 +57,8 @@
</el-table-column>
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:plan:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:plan:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:plan:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:plan:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -80,7 +69,7 @@
</template>
<script setup name="Plan" lang="ts">
import { listPlan, getPlan, delPlan, addPlan, updatePlan, changePlanStatus } from '@/api/system/InspectionPlan/index';
import { listPlan, delPlan, changePlanStatus } from '@/api/system/InspectionPlan/index';
import { PlanVO, PlanQuery, PlanForm } from '@/api/system/InspectionPlan/type';
import { checkPermi } from '@/utils/permission';
import { numToWeek } from '@/utils/time';
@@ -205,9 +194,8 @@ const handleAdd = () => {
};
/** 修改按钮操作 */
const handleUpdate = async (row?: PlanVO) => {
const handleUpdate = (row?: PlanVO) => {
const _ids = row?.id || ids.value[0];
router.push({
path: '/inspection/editPlan',
query: {

View File

@@ -65,6 +65,7 @@ import { listItem } from '@/api/system/InspectionItem';
import { onMounted, onUnmounted } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
import { getVillageByIdAPI } from '@/api/system/community';
import { Check } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
// const { com_inspection_point_checkmode } = toRefs<any>(proxy?.useDict('com_inspection_point_checkmode'));

View File

@@ -20,17 +20,6 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:point:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:point:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:point:remove']"
>删除</el-button
>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
@@ -67,8 +56,8 @@
<el-table-column label="添加时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:point:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:point:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:point:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:point:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -80,7 +69,7 @@
<script setup name="Point" lang="ts">
import Pageheader from '@/components/Pageheader/index.vue';
import { listPoint, getPoint, delPoint, addPoint, updatePoint, changePointStatus } from '@/api/system/InspectionPoint/index';
import { listPoint, delPoint, changePointStatus } from '@/api/system/InspectionPoint/index';
import { PointVO, PointQuery, PointForm } from '@/api/system/InspectionPoint/type';
import { checkPermi } from '@/utils/permission';

View File

@@ -62,7 +62,7 @@
<el-table-column label="关联计划" align="center" prop="planName" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:main:record']">查看详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:main:record']">查看详情</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -65,6 +65,7 @@ import { onMounted, onUnmounted } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
import { addRoute, getRoute, updateRoute } from '@/api/system/InspectionRoute';
import { getVillageByIdAPI } from '@/api/system/community';
import { Check } from '@element-plus/icons-vue';
const router = useRouter();
const route = useRoute();
@@ -189,7 +190,6 @@ function init() {
});
}
}
// TODO 巡检路线开关
// ! map
const mapReady = ref(false);
const AMapLib = ref(null);

View File

@@ -1,12 +1,12 @@
<template>
<div class="p-2 h-full flex flex-col">
<Pageheader></Pageheader>
<pageHeader></pageHeader>
<div class="flex-1 color-gray flex h-full font-size-6 flex-center">系统还在维护中,敬请期待...</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import pageHeader from '@/components/Pageheader/index.vue';
</script>
<style scoped lang="scss"></style>

View File

@@ -20,17 +20,6 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:route:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:route:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:route:remove']"
>删除</el-button
>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
@@ -68,8 +57,8 @@
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:route:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:route:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:route:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:route:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -80,7 +69,7 @@
</template>
<script setup name="Route" lang="ts">
import { listRoute, getRoute, delRoute, addRoute, updateRoute, changeStatusRoute } from '@/api/system/InspectionRoute/index';
import { listRoute, delRoute, changeStatusRoute } from '@/api/system/InspectionRoute/index';
import { RouteVO, RouteQuery, RouteForm } from '@/api/system/InspectionRoute/type';
import { checkPermi } from '@/utils/permission';

View File

@@ -79,12 +79,12 @@
<script setup lang="ts">
import RepairUser from '@/components/Holder/repairUser.vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { Delete } from '@element-plus/icons-vue';
import { Delete, Plus } from '@element-plus/icons-vue';
import { ref } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
import { addPlan, getPlan, listPlan, updatePlan } from '@/api/system/InspectionPlan';
import { listPlan } from '@/api/system/InspectionPlan';
import { addTask, getTask, updateTask } from '@/api/system/InspectionTask';
import { getRoute, listRoute } from '@/api/system/InspectionRoute';
import { getRoute } from '@/api/system/InspectionRoute';
import { RouteVO } from '@/api/system/InspectionRoute/type';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -300,8 +300,7 @@ function submit() {
background-color: white;
.bodybox {
width: 600px;
margin: 0 auto;
margin-top: 20px;
margin: 20px auto 0;
}
.inspectorIdsBox {
display: flex;

View File

@@ -34,17 +34,6 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:task:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:task:edit']">编辑</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:task:remove']"
>删除</el-button
>
</el-col> -->
<right-toolbar
:disable-delete="multiple"
:disable-edit="single"
@@ -76,8 +65,8 @@
<el-table-column label="关联巡检计划" align="center" prop="planName" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:task:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:task:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:task:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:task:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -88,7 +77,7 @@
</template>
<script setup name="Task" lang="ts">
import { listTask, getTask, delTask, addTask, updateTask } from '@/api/system/InspectionTask/index';
import { listTask, delTask } from '@/api/system/InspectionTask/index';
import { TaskVO, TaskQuery, TaskForm } from '@/api/system/InspectionTask/type';
import { checkPermi } from '@/utils/permission';