Browse Source

idea ts配置

CzRger 8 months ago
parent
commit
c7eec34cab

+ 1 - 0
package.json

@@ -17,6 +17,7 @@
     "sass": "^1.77.8",
     "uuid": "^10.0.0",
     "vant": "^4.9.3",
+    "vconsole": "^3.15.1",
     "vite-plugin-compression": "^0.5.1",
     "vite-plugin-html-env": "^1.2.8",
     "vite-plugin-svg-icons": "^2.0.1",

+ 44 - 0
src/layout/router-view.vue

@@ -0,0 +1,44 @@
+<template>
+  <router-view v-slot="{ Component }">
+<!--    <transition>-->
+      <keep-alive>
+        <component :is="Component" />
+      </keep-alive>
+<!--    </transition>-->
+  </router-view>
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup() {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 2 - 0
src/main.ts

@@ -10,6 +10,7 @@ import repeatFileValid from '@/plugins/repeatFileValid'
 import initDirect from '@/plugins/initDirect'
 import 'default-passive-events'
 import './browerPatch'
+import Vant from 'vant';
 
 
 repeatFileValid()
@@ -20,6 +21,7 @@ initComponent(app)
 app.use(initDirect)
 app.use(router)
 app.use(store)
+app.use(Vant);
 app.mount('#app')
 // 设置为 true 以在浏览器开发工具的 performance/timeline 面板中启用对组件初始化、编译、渲染和更新的性能追踪。
 app.config.performance = true

+ 1 - 1
src/router/index.ts

@@ -1,7 +1,7 @@
 import {createRouter, createWebHistory} from 'vue-router'
 import staticRouter from './modules/static'
 import store from '@/store/index'
-import Temp404 from '@/views/global/temp/404/.vue'
+import Temp404 from '@/views/global/temp/404.vue'
 import * as api from '@/api/index'
 import {toLogin} from "@/utils/permissions";
 

+ 1 - 75
src/router/modules/static.ts

@@ -1,80 +1,6 @@
 import RouterViewCom from "@/layout/router-view.vue";
 // 不需要菜单管理配置的路由
 const staticRouter = [
-  {
-    path: '/login',
-    name: 'fde2b927-2116-43f6-ba5e-94be4abacf39',
-    component: () => import('@/views/global/login/login.vue'),
-    meta: { title: "登录", icon: "el-icon-location", noAuth: true },
-  },
-  {
-    path:'/find',
-    name: '8d7ca281-9f0b-4406-b622-e2525e67c66d',
-    component: () => import('@/views/global/findPassword/index.vue'),
-    meta: { title: "找回密码", icon: "el-icon-location", noAuth: true },
-  },
-  {
-    path:'/portal',
-    name: '455cffd7-6843-4b96-8f4f-57b35bcf5520',
-    component: () => import('@/views/global/portal/index.vue'),
-    meta: { title: "平台门户", icon: "el-icon-location" }
-  },
-  {
-    path:'/problem',
-    name: '8054d0b9-93b5-439c-b7b1-b6c22f1b98d1',
-    component: () => import('@/views/global/problem/index.vue'),
-    meta: { title: "常见问题", icon: "el-icon-location" }
-  },
-  {
-    path: "/playbackIndex",
-    name: "5a244443-04bf-407d-b095-9e999c0b439d",
-    component: () => import("@/views/home-management/history/index.vue"),
-    meta: { title: "历史回放", icon: "el-icon-location" }
-  },
-  {
-    path: '/weather',
-    name: "a68efb11-4774-4988-8598-4b07c6ce13c0",
-    component: () => import("@/views/home-management/weather/index.vue"),
-    meta: { title: "气象", icon: "el-icon-location" }
-  },
-  {
-    path: "/smart-search",
-    component: RouterViewCom,
-    name: "fe144048-04a9-4cd2-a66c-c01316305a41",
-    meta: { title: "智慧搜索", icon: "el-icon-location" },
-    redirect: '/smart-search/index',
-    children: [
-      {
-        path: "index",
-        component: () => import('@/views/smart-search/index.vue'),
-        name: "8b766a72-186d-4375-b6f4-65cd197f6812",
-        meta: { title: "智慧搜索-首页", icon: "el-icon-location" }
-      },
-      {
-        path: "list",
-        component: () => import('@/views/smart-search/list.vue'),
-        name: "1379c42d-98dd-4f79-be11-042390a2bf83",
-        meta: { title: "智慧搜索-查询列表", icon: "el-icon-location" },
-      },
-      {
-        path: "person",
-        component: () => import('@/views/smart-search/person/index.vue'),
-        name: "3a1cd9fc-ef05-4ca0-975a-e6b074fef381",
-        meta: { title: "智慧搜索-人员档案", icon: "el-icon-location" },
-      },
-      {
-        path: "car",
-        component: () => import('@/views/smart-search/car/index.vue'),
-        name: "d395537f-bdbc-4b89-ad1a-08c822d5585d",
-        meta: { title: "智慧搜索-车辆档案", icon: "el-icon-location" },
-      },
-      {
-        path: "ship",
-        component: () => import('@/views/smart-search/ship/index.vue'),
-        name: "4f795e96-d431-43aa-b672-b68c0defbd4b",
-        meta: { title: "智慧搜索-船舶档案", icon: "el-icon-location" },
-      }
-    ]
-  },
+
 ]
 export default staticRouter

+ 0 - 2
src/store/index.ts

@@ -1,6 +1,4 @@
 import { createStore } from "vuex";
-// @ts-ignore
-import demo from "./modules/demo";
 import app from "./modules/app";
 import dictionary from "./modules/dictionary";
 import regex from "./modules/regex";

+ 0 - 645
src/store/modules/dictionary.ts

@@ -1,138 +1,13 @@
 import * as api from '@/api/index'
 import { dictionary, dictionaryDefine } from './dictionary-define'
 import { dictionaryOther, dictionaryOtherDefine } from './dictionary-other-define'
-import lan from "../plateColor/lan.png";
-import huang from "../plateColor/huang.png";
-import lv from "../plateColor/lv.png";
-import hei from "../plateColor/hei.png";
-import bai from "../plateColor/bai.png";
-import mhLv from "../plateColor/mhLv.png";
 
 const state = {
 	...dictionary,
 	...dictionaryOther,
-	caseTypeTree: [],	// 案件类型级联
-	caseTypeTreeMap: new Map(),	// 案件类型级联
-	cbglPersonDictionary: [],	// 船籍港一级
-	cbglPersonDictionaryMap: new Map(), // 船籍港一级
-	portOfRegistryTwoList: [],	// 船籍港二级
-	portOfRegistryTwoMap: new Map(), // 船籍港二级
-	cbglPersonTemporary: [],	// 船籍港停泊点一级
-	cbglPersonTemporaryMap: new Map(), // 船籍港停泊点一级
-	residentMooringPointTwoList: [],	// 船籍港停泊点二级
-	residentMooringPointTwoMap: new Map(), // 船籍港停泊点二级
-	listLibraryDeployTypePeopleList: [],	// 人员名单库-布控类型一级
-	listLibraryDeployTypePeopleMap: new Map(), // 人员名单库-布控类型一级
-	listLibraryDeployTypeTwoPeopleList: [],	// 人员名单库-布控类型二级
-	listLibraryDeployTypeTwoPeopleMap: new Map(), // 人员布控类型-布控类型二级
-	listLibraryDeployTypeCarList: [],	// 车辆名单库-布控类型一级
-	listLibraryDeployTypeCarMap: new Map(), // 车辆名单库-布控类型一级
-	listLibraryDeployTypeTwoCarList: [],	// 车辆名单库-布控类型二级
-	listLibraryDeployTypeTwoCarMap: new Map(), // 车辆布控类型-布控类型二级
-	ShipData: {
-		ShipId:'',
-		ShipStatus:'',
-		getStatus:false
-	},
-	bayonetDeepCheckList: {
-		all: [],
-		car: [],
-		face: []
-	},	//	卡口深度核查-点位选择-地图框选卡口标点数据
-	bayonetDeepCheckTree: {
-		car: [],
-		face: []
-	},	//	卡口深度核查-点位选择-树弹窗选择数据
-	bayonetDeepCheckTreeMap: {
-		car: new Map(),
-		face: new Map()
-	},	//	卡口深度核查-点位选择-树弹窗选择数据-Map翻译
-	videoList: [],	//	视频监控
-	videoMap: new Map(),	//	视频监控
-	portList: [], //	港口
-	portMap: new Map(),	//	港口
-	meetEmergencyPlanTypeList: [],	//	应急资源 > 预案管理 > 分类
-	meetEmergencyPlanTypeMap: new Map(),	//	应急资源 > 预案管理 > 分类
-	plateColorImgList: [
-		{
-			colorImg: lan,
-			colorFont: '#ffffff',
-			dictValue: "蓝色",
-			dictLabel: "琼·88888",
-		},
-		{
-			colorImg: huang,
-			colorFont: '#000000',
-			dictValue: "黄色",
-			dictLabel: "琼·88888",
-		},
-		{
-			colorImg: lv,
-			dictValue: "绿色",
-			colorFont: '#000000',
-			dictLabel: "琼·88888",
-		},
-		{
-			colorImg: hei,
-			colorFont: '#ffffff',
-			dictValue: "黑色",
-			dictLabel: "琼·88888",
-		},
-		{
-			colorImg: bai,
-			colorFont: '#000000',
-			dictValue: "白色",
-			dictLabel: "琼·88888",
-		},
-		{
-			colorImg: mhLv,
-			colorFont: '#ffffff',
-			dictValue: "民航绿色",
-			dictLabel: "民航·88888",
-		},
-		{
-			colorImg: hei,
-			colorFont: '#ffffff',
-			dictValue: "民航黑色",
-			dictLabel: "民航·88888",
-		},
-		{
-			colorImg: "",
-			colorFont: '',
-			dictValue: "其他",
-			dictLabel: "其他颜色",
-		},
-	],
-	warningYxxList: [
-		{dictLabel: '有效', dictValue: 0},
-		{dictLabel: '无效', dictValue: 1},
-	],
-	warningLdjzList: [
-		{dictLabel: '不需转发', dictValue: 0},
-		{dictLabel: '需转发', dictValue: 1},
-	],
-	warningCzfsList: [
-		{dictLabel: '任务分派', dictValue: 0},
-		{dictLabel: '线上处置', dictValue: 1},
-	],
 }
 
 const mutations = {
-	SET_SHIPDATA_ID(state, data){
-         switch (data.type) {
-			 case 'id':
-				state.ShipData.ShipId=data.value
-				state.ShipData.getStatus=false
-				 break
-			 case 'get':
-				state.ShipData.ShipId=data.value
-				state.ShipData.getStatus=true
-				 break
-			 case 'sta':
-				state.ShipData.ShipStatus=data.value
-				 break
-		 }
-	},
 	SET_DICT_LIST(state: any, { listName, mapName, objMapName, data }: any) {
 		const map = new Map()
 		const objMap = new Map()
@@ -148,163 +23,6 @@ const mutations = {
 		state[mapName] = map
 		state[objMapName] = objMap
 	},
-	SET_CASE_TYPE_TREE(state: any, data: Array<any>) {
-		const map = new Map()
-		const deep = (arr: any) => {
-			arr.forEach((v: any) => {
-				map.set(v.value, v.label)
-				if (v.children?.length > 0) {
-					deep(v.children)
-				}
-			})
-		}
-		deep(data)
-		state.caseTypeTree = data
-		state.caseTypeTreeMap = map
-	},
-	SET_PORT_OF_REGISTRY(state: any, {one, two}: any) {
-		const mapOne = new Map()
-		const mapTwo = new Map()
-		one.forEach((v: any) => {
-			mapOne.set(v.dictType, v.dictName)
-		})
-		two.forEach((v: any) => {
-			mapTwo.set(v.dictValue, v.dictName)
-		})
-		state.cbglPersonDictionary = one
-		state.cbglPersonDictionaryMap = mapOne
-		state.portOfRegistryTwoList = two
-		state.portOfRegistryTwoMap = mapTwo
-	},
-	SET_RESIDENT_MOORING_POINT(state: any, {one, two}: any) {
-		const mapOne = new Map()
-		const mapTwo = new Map()
-		one.forEach((v: any) => {
-			mapOne.set(v.dictType, v.dictName)
-		})
-		two.forEach((v: any) => {
-			mapTwo.set(v.dictValue, v.dictName)
-		})
-		state.cbglPersonTemporary = one
-		state.cbglPersonTemporaryMap = mapOne
-		state.residentMooringPointTwoList = two
-		state.residentMooringPointTwoMap = mapTwo
-	},
-	SET_LIST_LIBRARY_DEPLOY_TYPE_PEOPLE(state: any, {one, two}: any) {
-		const mapOne = new Map()
-		const mapTwo = new Map()
-		one.forEach((v: any) => {
-			mapOne.set(v.dictValue, v.dictLabel)
-		})
-		two.forEach((v: any) => {
-			mapTwo.set(v.dictValue, v.dictLabel)
-		})
-		state.listLibraryDeployTypePeopleList = one
-		state.listLibraryDeployTypePeopleMap = mapOne
-		state.listLibraryDeployTypeTwoPeopleList = two
-		state.listLibraryDeployTypeTwoPeopleMap = mapTwo
-	},
-	SET_LIST_LIBRARY_DEPLOY_TYPE_CAR(state: any, {one, two}: any) {
-		const mapOne = new Map()
-		const mapTwo = new Map()
-		one.forEach((v: any) => {
-			mapOne.set(v.dictValue, v.dictLabel)
-		})
-		two.forEach((v: any) => {
-			mapTwo.set(v.dictValue, v.dictLabel)
-		})
-		state.listLibraryDeployTypeCarList = one
-		state.listLibraryDeployTypeCarMap = mapOne
-		state.listLibraryDeployTypeTwoCarList = two
-		state.listLibraryDeployTypeTwoCarMap = mapTwo
-	},
-	SET_BAYONET_DEEP_CHECK(state, {carTree, faceTree, bayonetAll, bayonetCar, bayonetFace}) {
-		const carTreeMap = new Map()
-		const faceTreeMap = new Map()
-		const deepTree = (map, arr, pObj: any = []) => {
-			return arr.map(v => {
-				v.cIds = []
-				v.videoObjs = []
-				if (!v.children && v.videos) {
-					v.children = v.videos
-				}
-				v.videoNum = 0
-				if (v.indexCode === undefined) {
-					v.source = 'dept'
-					v.treeName = v.deptName
-					v.treeId = v.deptId + v.deptName
-				} else {
-					v.source = 'video'
-					v.treeName = v.name
-					v.treeId = v.name
-					pObj.forEach((p, i) => {
-						p.videoNum++
-						p.videoObjs.push(v)
-						if (i === pObj.length - 1) {
-							p.lastDept = true
-						}
-					})
-				}
-				v.pIds = pObj.map(p => {
-					p.cIds.push(v.treeId)
-					return p.treeId
-				})
-				if (v.children?.length > 0) {
-					v.children = deepTree(map, v.children, [...pObj, v])
-				}
-				map.set(v.treeId, v)
-				return v
-			})
-		}
-		state.bayonetDeepCheckList.all = bayonetAll
-		state.bayonetDeepCheckList.car = bayonetCar
-		state.bayonetDeepCheckList.face = bayonetFace
-		state.bayonetDeepCheckTree.car = deepTree(carTreeMap, carTree)
-		state.bayonetDeepCheckTreeMap.car = carTreeMap
-		state.bayonetDeepCheckTree.face = deepTree(faceTreeMap, faceTree)
-		state.bayonetDeepCheckTreeMap.face = faceTreeMap
-	},
-	SET_VIDEO(state, data) {
-		const map = new Map()
-		data.forEach(v => {
-			if (v.equipmentNumber) {
-				map.set(v.equipmentNumber, v)
-			}
-		})
-		state.videoMap = map
-		state.videoList = data
-	},
-	SET_PORT (state, data) {
-		const map = new Map()
-		data.forEach(v => {
-			map.set(v.id, v)
-		})
-		state.portList = data
-		state.portMap = map
-	},
-	//	船籍港一级
-	SET_VBGLPEESON(state,{type,data}){
-		const map = new Map()
-		data.forEach(v => {
-			map.set(v.dictType, v.dictName)
-		})
-		state[type] = data;
-		state[type + 'Map'] = map;
-	},
-	SET_MEET_EMERGENCY_PLAN_TYPE(state, data) {
-		const map = new Map()
-		const deep = (arr: any) => {
-			arr.forEach((v: any) => {
-				map.set(v.id, v.typeName)
-				if (v.children?.length > 0) {
-					deep(v.children)
-				}
-			})
-		}
-		deep(data)
-		state.meetEmergencyPlanTypeList = data
-		state.meetEmergencyPlanTypeMap = map
-	}
 }
 
 const actions = {
@@ -328,369 +46,6 @@ const actions = {
 			}
 		})
 	},
-	LOAD_DICT_OTHER({ commit }: any, {data, label, value, type}) {
-		return new Promise((resolve, reject) => {
-			if (state[dictionaryOtherDefine[type][0]].length === 0) {
-				commit('SET_DICT_LIST', {
-					listName: dictionaryOtherDefine[type][0],
-					mapName: dictionaryOtherDefine[type][1],
-					objMapName: dictionaryOtherDefine[type]?.[2],
-					data: data.map(v => {
-						v.dictLabel = v[label]
-						v.dictValue = v[value]
-						return v
-					})
-				})
-				resolve(state[dictionaryOtherDefine[type][0]])
-			} else {
-				resolve(state[dictionaryOtherDefine[type][0]])
-			}
-		})
-	},
-	LOAD_CASE_TYPE({ commit }: any, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.caseTypeTree?.length > 0 && !refresh) {
-				resolve(state.caseTypeTree)
-			} else {
-				api.default.getCaseTypeTree({
-					caseTypeSource: 'xjz'
-				}).then((res: any) => {
-					if (res.code === 200) {
-						commit('SET_CASE_TYPE_TREE', res.data)
-					} else {
-						reject(null)
-					}
-				}).catch(() => {
-					reject(null)
-				})
-			}
-		})
-	},
-	// 船籍港
-	LOAD_PORT_OF_REGISTRY({ commit }: any, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.cbglPersonDictionary?.length > 0 && !refresh) {
-				if (state.portOfRegistryTwoList?.length > 0) {
-					resolve(state.cbglPersonDictionary)
-				} else {
-					const one: any = state.cbglPersonDictionary
-					Promise.all([
-						...one.map((v: any) => api.default.cbglPersonDictionary2(v.dictType))
-					]).then((res) => {
-						const two: any = []
-						res.forEach((v: any, i: number) => {
-							if (v.code === 200) {
-								two.push(...v.data.map((s: any) => {
-									s.parent = one[i].dictType
-									return s
-								}))
-							} else {
-								two.push([])
-							}
-						})
-						commit('SET_PORT_OF_REGISTRY', {one, two})
-						resolve({one, two})
-					}).catch(() => {
-						reject(null)
-					})
-				}
-			} else {
-				api.default.cbglPersonDictionary().then((res: any) => {
-					if (res.code === 200) {
-						const one = res.data
-						Promise.all([
-							...one.map((v: any) => api.default.cbglPersonDictionary2(v.dictType))
-						]).then((res) => {
-							const two: any = []
-							res.forEach((v: any, i: number) => {
-								if (v.code === 200) {
-									two.push(...v.data.map((s: any) => {
-										s.parent = one[i].dictType
-										return s
-									}))
-								} else {
-									two.push([])
-								}
-							})
-							commit('SET_PORT_OF_REGISTRY', {one, two})
-							resolve({one, two})
-						}).catch(() => {
-							reject(null)
-						})
-					} else {
-						reject(null)
-					}
-				}).catch(() => {
-					reject(null)
-				})
-			}
-		})
-	},
-	// 船籍港停泊点
-	LOAD_RESIDENT_MOORING_POINT({ commit }: any, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.cbglPersonTemporary?.length > 0 && !refresh) {
-				if (state.residentMooringPointTwoList?.length > 0) {
-					resolve(state.cbglPersonTemporary)
-				} else {
-					const one: any = state.cbglPersonTemporary
-					Promise.all([
-						...one.map((v: any) => api.default.cbglPersonTemporary2(v.dictType))
-					]).then((res) => {
-						const two: any = []
-						res.forEach((v: any, i: number) => {
-							if (v.code === 200) {
-								two.push(...v.data.map((s: any) => {
-									s.parent = one[i].dictType
-									return s
-								}))
-							} else {
-								two.push([])
-							}
-						})
-						commit('SET_RESIDENT_MOORING_POINT', {one, two})
-						resolve({one, two})
-					}).catch(() => {
-						reject(null)
-					})
-				}
-			} else {
-				api.default.cbglPersonTemporary().then((res: any) => {
-					if (res.code === 200) {
-						const one = res.data
-						Promise.all([
-							...one.map((v: any) => api.default.cbglPersonTemporary2(v.dictType))
-						]).then((res) => {
-							const two: any = []
-							res.forEach((v: any, i: number) => {
-								if (v.code === 200) {
-									two.push(...v.data.map((s: any) => {
-										s.parent = one[i].dictType
-										return s
-									}))
-								} else {
-									two.push([])
-								}
-							})
-							commit('SET_RESIDENT_MOORING_POINT', {one, two})
-							resolve({one, two})
-						}).catch(() => {
-							reject(null)
-						})
-					} else {
-						reject(null)
-					}
-				}).catch(() => {
-					reject(null)
-				})
-			}
-		})
-	},
-	// 人员名单库
-	LOAD_LIST_LIBRARY_DEPLOY_TYPE_PEOPLE({ commit }: any, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.listLibraryDeployTypePeopleList?.length > 0 && !refresh) {
-				if (state.listLibraryDeployTypeTwoPeopleList?.length > 0) {
-					resolve(state.listLibraryDeployTypePeopleList)
-				} else {
-					const one: any = state.listLibraryDeployTypePeopleList
-					Promise.all([
-						...one.map((v: any) => api.default.dicDeptDictList(v.dictValue))
-					]).then((res) => {
-						const two: any = []
-						res.forEach((v: any, i: number) => {
-							if (v.code === 200) {
-								two.push(...v.data.map((s: any) => {
-									s.parent = one[i].dictValue
-									return s
-								}))
-							} else {
-								two.push([])
-							}
-						})
-						commit('SET_LIST_LIBRARY_DEPLOY_TYPE_PEOPLE', {one, two})
-						resolve({one, two})
-					}).catch(() => {
-						reject(null)
-					})
-				}
-			} else {
-				api.default.dicDeptDictList('warning_list_library_type').then((res: any) => {
-					if (res.code === 200) {
-						const one = res.data
-						Promise.all([
-							...one.map((v: any) => api.default.dicDeptDictList(v.dictValue))
-						]).then((res) => {
-							const two: any = []
-							res.forEach((v: any, i: number) => {
-								if (v.code === 200) {
-									two.push(...v.data.map((s: any) => {
-										s.parent = one[i].dictValue
-										return s
-									}))
-								} else {
-									two.push([])
-								}
-							})
-							commit('SET_LIST_LIBRARY_DEPLOY_TYPE_PEOPLE', {one, two})
-							resolve({one, two})
-						}).catch(() => {
-							reject(null)
-						})
-					} else {
-						reject(null)
-					}
-				}).catch(() => {
-					reject(null)
-				})
-			}
-		})
-	},
-	// 车辆名单库
-	LOAD_LIST_LIBRARY_DEPLOY_TYPE_CAR({ commit }: any, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.listLibraryDeployTypeCarList?.length > 0 && !refresh) {
-				if (state.listLibraryDeployTypeTwoCarList?.length > 0) {
-					resolve(state.listLibraryDeployTypeCarList)
-				} else {
-					const one: any = state.listLibraryDeployTypeCarList
-					Promise.all([
-						...one.map((v: any) => api.default.dicDeptDictList(v.dictValue))
-					]).then((res) => {
-						const two: any = []
-						res.forEach((v: any, i: number) => {
-							if (v.code === 200) {
-								two.push(...v.data.map((s: any) => {
-									s.parent = one[i].dictValue
-									return s
-								}))
-							} else {
-								two.push([])
-							}
-						})
-						commit('SET_LIST_LIBRARY_DEPLOY_TYPE_CAR', {one, two})
-						resolve({one, two})
-					}).catch(() => {
-						reject(null)
-					})
-				}
-			} else {
-				api.default.dicDeptDictList('warning_list_library_car_type').then((res: any) => {
-					if (res.code === 200) {
-						const one = res.data
-						Promise.all([
-							...one.map((v: any) => api.default.dicDeptDictList(v.dictValue))
-						]).then((res) => {
-							const two: any = []
-							res.forEach((v: any, i: number) => {
-								if (v.code === 200) {
-									two.push(...v.data.map((s: any) => {
-										s.parent = one[i].dictValue
-										return s
-									}))
-								} else {
-									two.push([])
-								}
-							})
-							commit('SET_LIST_LIBRARY_DEPLOY_TYPE_CAR', {one, two})
-							resolve({one, two})
-						}).catch(() => {
-							reject(null)
-						})
-					} else {
-						reject(null)
-					}
-				}).catch(() => {
-					reject(null)
-				})
-			}
-		})
-	},
-	//	卡口深度核查-卡口数据
-	LOAD_BAYONET_DEEP_CHECK({commit}, refresh = false){
-		return new Promise((resolve, reject) => {
-			if (state.bayonetDeepCheckList.all.length === 0 || refresh) {
-				//	api请求数据
-				Promise.all([
-					api.default.getVideoHKTree('car'),
-					api.default.getVideoHKTree('face'),
-					api.default.getVideoMap(),
-					api.default.getVideoMap(`type=car`),
-					api.default.getVideoMap(`type=face`),
-				]).then(([carTreeRes, faceTreeRes, bayonetAllRes, bayonetCarRes, bayonetFaceRes]) => {
-					commit('SET_BAYONET_DEEP_CHECK', {
-						carTree: [carTreeRes.data] || [],
-						faceTree: [faceTreeRes.data] || [],
-						bayonetAll: bayonetAllRes.data || [],
-						bayonetCar: bayonetCarRes.data || [],
-						bayonetFace: bayonetFaceRes.data || []
-					})
-					resolve('')
-				})
-			} else {
-				resolve('')
-			}
-		})
-
-	},
-	//	视频监控数据
-	LOAD_VIDEO({commit}, deptId, refresh = false){
-		return new Promise((resolve, reject) => {
-			if (state.videoList.length === 0 || refresh) {
-				api.default.monitoringList(`pageNum=1&pageSize=5000&deptId=${deptId}`).then(res => {
-					if (res.code === 200 && res.rows?.length > 0) {
-						commit('SET_VIDEO', res.rows)
-					}
-					resolve(state.videoList)
-				})
-			} else {
-				resolve(state.videoList)
-			}
-		})
-
-	},
-	LOAD_PORT ({ commit }, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.portList.length === 0 || refresh) {
-				api.default
-					.portList()
-					.then(res => {
-						commit('SET_PORT', res.rows)
-						resolve(res.rows)
-					})
-					.catch(() => {
-						reject('获取港岙口列表错误')
-					})
-			} else {
-				resolve(null)
-			}
-		})
-	},
-	//	获取船籍港和船籍港停泊点一级
-	LOAD_VBGLPEESON({commit},type){
-		if(state[type].length<1){
-			api.default[type]().then(res=>{
-				commit("SET_VBGLPEESON",{data:res.data,type})
-			})
-		}
-	},
-	LOAD_MEET_EMERGENCY_PLAN_TYPE({ commit }: any, refresh = false) {
-		return new Promise((resolve, reject) => {
-			if (state.meetEmergencyPlanTypeList?.length > 0 && !refresh) {
-				resolve(state.meetEmergencyPlanTypeList)
-			} else {
-				api.default.prePlanQueryTypeTree().then((res: any) => {
-					if (res.code === 200) {
-						commit('SET_MEET_EMERGENCY_PLAN_TYPE', res.data)
-					} else {
-						reject(null)
-					}
-				}).catch(() => {
-					reject(null)
-				})
-			}
-		})
-	},
 }
 
 export default {

+ 0 - 46
src/views/global/404/temp.vue

@@ -1,46 +0,0 @@
-<template>
-  <div class="main">
-    <img class="img" src="@/assets/images/global/temp.png" />
-    <div class="text">敬请期待</div>
-    <div class="text2">程序员正在开发建设中</div>
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue'
-
-export default defineComponent({
-	name: '',
-	components: {},
-	setup() {
-		return {}
-	}
-})
-</script>
-
-<style scoped lang="scss">
-.main {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  width: 100%;
-  height: 100%;
-  .text {
-    font-family: MicrosoftYaHei;
-    font-size: 18px;
-    font-weight: normal;
-    font-stretch: normal;
-    letter-spacing: 0px;
-    color: #409eff;
-  }
-  .text2 {
-    font-family: MicrosoftYaHei;
-    font-size: 14px;
-    font-weight: normal;
-    font-stretch: normal;
-    letter-spacing: 0px;
-    color: #999999;
-  }
-}
-</style>

+ 0 - 27
tsconfig.app.json

@@ -1,27 +0,0 @@
-{
-  "compilerOptions": {
-    "composite": true,
-    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
-    "target": "ES2020",
-    "useDefineForClassFields": true,
-    "module": "ESNext",
-    "lib": ["ES2020", "DOM", "DOM.Iterable"],
-    "skipLibCheck": true,
-
-    /* Bundler mode */
-    "moduleResolution": "bundler",
-    "allowImportingTsExtensions": true,
-    "resolveJsonModule": true,
-    "isolatedModules": true,
-    "moduleDetection": "force",
-    "noEmit": true,
-    "jsx": "preserve",
-
-    /* Linting */
-    "strict": true,
-    "noUnusedLocals": true,
-    "noUnusedParameters": true,
-    "noFallthroughCasesInSwitch": true
-  },
-  "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
-}

+ 27 - 8
tsconfig.json

@@ -1,11 +1,30 @@
 {
-  "files": [],
-  "references": [
-    {
-      "path": "./tsconfig.app.json"
+  "compilerOptions": {
+    "noImplicitAny": false,
+    "allowJs": true,
+    "target": "ESNext",
+    "useDefineForClassFields": true,
+    "module": "ESNext",
+    "moduleResolution": "Node",
+    "strict": true,
+    "jsx": "preserve",
+    "resolveJsonModule": true,
+    "isolatedModules": true,
+    "esModuleInterop": true,
+    "lib": ["ESNext", "DOM"],
+    "skipLibCheck": true,
+    "noEmit": true,
+    "baseUrl": "./",
+    "paths": {
+      "@/*": [
+        "./src/*"
+      ]
     },
-    {
-      "path": "./tsconfig.node.json"
-    }
-  ]
+    "types": [
+      "vite-plugin-svg-icons/client", // 【svg-icons相关】
+      "node"  // 【svg-icons相关】
+    ]
+  },
+  "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
+  "references": [{ "path": "./tsconfig.node.json" }]
 }

+ 2 - 6
tsconfig.node.json

@@ -1,13 +1,9 @@
 {
   "compilerOptions": {
     "composite": true,
-    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
-    "skipLibCheck": true,
     "module": "ESNext",
-    "moduleResolution": "bundler",
-    "allowSyntheticDefaultImports": true,
-    "strict": true,
-    "noEmit": true
+    "moduleResolution": "Node",
+    "allowSyntheticDefaultImports": true
   },
   "include": ["vite.config.ts"]
 }

+ 3 - 8
vite.config.ts

@@ -43,25 +43,20 @@ export default defineConfig({
   resolve: {
     alias: {
       '@': resolve(__dirname, 'src'),
-      '~@': resolve(__dirname, 'src'),
-      '@views': resolve(__dirname, 'src/views'),
-      '@components': resolve(__dirname, 'src/components')
     },
   },
   server: {
     port: 8090,
-    // open: true,
-    https: false,
-    host: '0.0.0.0',
+    open: false,
     strictPort: false,
     proxy: {
       '/mock-api': {
         target: 'https://www.fastmock.site/mock/002bd20e30dcef8f255675f80a50382c/mock',
         changeOrigin: true,
-        rewrite: path => {
+        rewrite: (path) => {
           return path.replace(/^\/mock-api/, '')
         }
-      },
+      }
     }
   },
   build: {

+ 37 - 0
yarn.lock

@@ -7,6 +7,13 @@
   resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.24.8.tgz#58a4dbbcad7eb1d48930524a3fd93d93e9084c6f"
   integrity sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==
 
+"@babel/runtime@^7.17.2":
+  version "7.24.8"
+  resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.8.tgz#5d958c3827b13cc6d05e038c07fb2e5e3420d82e"
+  integrity sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==
+  dependencies:
+    regenerator-runtime "^0.14.0"
+
 "@esbuild/aix-ppc64@0.21.5":
   version "0.21.5"
   resolved "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f"
@@ -775,6 +782,16 @@ copy-descriptor@^0.1.0:
   resolved "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
   integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==
 
+copy-text-to-clipboard@^3.0.1:
+  version "3.2.0"
+  resolved "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz#0202b2d9bdae30a49a53f898626dcc3b49ad960b"
+  integrity sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==
+
+core-js@^3.11.0:
+  version "3.37.1"
+  resolved "https://registry.npmmirror.com/core-js/-/core-js-3.37.1.tgz#d21751ddb756518ac5a00e4d66499df981a62db9"
+  integrity sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==
+
 cors@^2.8.5:
   version "2.8.5"
   resolved "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29"
@@ -1867,6 +1884,11 @@ muggle-string@^0.4.1:
   resolved "https://registry.npmmirror.com/muggle-string/-/muggle-string-0.4.1.tgz#3b366bd43b32f809dc20659534dd30e7c8a0d328"
   integrity sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==
 
+mutation-observer@^1.0.3:
+  version "1.0.3"
+  resolved "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz#42e9222b101bca82e5ba9d5a7acf4a14c0f263d0"
+  integrity sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==
+
 nanoid@^3.3.7:
   version "3.3.7"
   resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
@@ -2089,6 +2111,11 @@ readdirp@~3.6.0:
   dependencies:
     picomatch "^2.2.1"
 
+regenerator-runtime@^0.14.0:
+  version "0.14.1"
+  resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
+  integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
+
 regex-not@^1.0.0, regex-not@^1.0.2:
   version "1.0.2"
   resolved "https://registry.npmmirror.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
@@ -2640,6 +2667,16 @@ vary@^1:
   resolved "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
   integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
 
+vconsole@^3.15.1:
+  version "3.15.1"
+  resolved "https://registry.npmmirror.com/vconsole/-/vconsole-3.15.1.tgz#569a8ab15f353259527bbcf004f02946b4482cff"
+  integrity sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==
+  dependencies:
+    "@babel/runtime" "^7.17.2"
+    copy-text-to-clipboard "^3.0.1"
+    core-js "^3.11.0"
+    mutation-observer "^1.0.3"
+
 vite-plugin-compression@^0.5.1:
   version "0.5.1"
   resolved "https://registry.npmmirror.com/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz#a75b0d8f48357ebb377b65016da9f20885ef39b6"