提交 92be75d4 authored 作者: 刘佳星-公司's avatar 刘佳星-公司

去除警告

上级 1e443c8e
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
"vue": "^3.5.13", "vue": "^3.5.13",
"vue-router": "^4.5.0", "vue-router": "^4.5.0",
"vuedraggable": "4.1.0", "vuedraggable": "4.1.0",
"vxe-pc-ui": "^4.8.20", "vxe-pc-ui": "~4.8.20",
"vxe-table": "^4.15.9" "vxe-table": "~4.15.9"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue": "^5.2.1",
......
...@@ -57,7 +57,7 @@ export const constantRoutes = [ ...@@ -57,7 +57,7 @@ export const constantRoutes = [
component: () => import('@/views/error/401.vue'), component: () => import('@/views/error/401.vue'),
hidden: true hidden: true
}, },
{ {
path: '', path: '',
component: Layout, component: Layout,
...@@ -75,7 +75,7 @@ export const constantRoutes = [ ...@@ -75,7 +75,7 @@ export const constantRoutes = [
component: () => import('../views/buildManage/index.vue'), component: () => import('../views/buildManage/index.vue'),
name: 'BuildManage', name: 'BuildManage',
meta: { title: '建筑管理', icon: 'dashboard', affix: true }, meta: { title: '建筑管理', icon: 'dashboard', affix: true },
}, },
{ {
path: '/uavManage', path: '/uavManage',
...@@ -109,75 +109,75 @@ export const constantRoutes = [ ...@@ -109,75 +109,75 @@ export const constantRoutes = [
meta: { title: '分析页面', icon: 'dashboard', affix: true } meta: { title: '分析页面', icon: 'dashboard', affix: true }
}, },
{ {
path: '/workBenchPage', path: '/workBenchPage',
component: () => import('../views/dashboard/workbench/index.vue'), component: () => import('../views/dashboard/workbench/index.vue'),
name: 'WorkbenchPage', name: 'WorkbenchPage',
meta: { title: '工作台', icon: 'dashboard', affix: true } meta: { title: '工作台', icon: 'dashboard', affix: true }
}, },
{ {
path: '/usermanage', path: '/usermanage',
component: () => import('../views/systemmanage/staffManage/index.vue'), component: () => import('../views/systemmanage/staffManage/index.vue'),
name: 'systemManage', name: 'systemManage',
meta: { title: '人员管理', icon: 'dashboard', affix: true } meta: { title: '人员管理', icon: 'dashboard', affix: true }
}, },
{ {
path: '/areabuildmanage', path: '/areabuildmanage',
component: () => import('../views/areabuildmanage/index.vue'), component: () => import('../views/areabuildmanage/index.vue'),
name: 'areaBuildmanage', name: 'areaBuildmanage',
meta: { title: '建筑管理', icon: 'dashboard', affix: true } meta: { title: '建筑管理', icon: 'dashboard', affix: true }
}, },
{ {
path: '/uavdispatch', path: '/uavdispatch',
component: () => import('../views/uavshowdate/index.vue'), component: () => import('../views/uavshowdate/index.vue'),
name: 'uavDispatch', name: 'uavDispatch',
meta: { title: '无人机调度', icon: 'dashboard', affix: true } meta: { title: '无人机调度', icon: 'dashboard', affix: true }
}, },
{ {
path: '/firesurveillance', path: '/firesurveillance',
component: () => import('../views/areafiremanage/firesurveillance/index.vue'), component: () => import('../views/areafiremanage/firesurveillance/index.vue'),
name: 'fireSurveillance', name: 'fireSurveillance',
meta: { title: '历史火情', icon: 'dashboard', affix: true } meta: { title: '历史火情', icon: 'dashboard', affix: true }
}, },
{ {
path: '/historyfire', path: '/historyfire',
component: () => import('../views/areafiremanage/historyfire/index.vue'), component: () => import('../views/areafiremanage/historyfire/index.vue'),
name: 'historyFire', name: 'historyFire',
meta: { title: '当前火情', icon: 'dashboard', affix: true }, meta: { title: '当前火情', icon: 'dashboard', affix: true },
}, },
{ {
path: '/floordetaildate', path: '/floordetaildate',
component: () => import('../views/areafiremanage/historyfire/components/floordetail.vue'), component: () => import('../views/areafiremanage/historyfire/components/floordetail.vue'),
name: 'floorDetailDate', name: 'floorDetailDate',
meta: { title: '详细楼层火情', icon: 'dashboard', affix: true } meta: { title: '详细楼层火情', icon: 'dashboard', affix: true }
}, },
{ {
path: '/buildingdetaildate', path: '/buildingdetaildate',
component: () => import('../views/areabuildmanage/components/showdetaildate.vue'), component: () => import('../views/areabuildmanage/components/showdetaildate.vue'),
name: 'buildingDetailDate', name: 'buildingDetailDate',
meta: { title: '楼详细建筑数据', icon: 'dashboard', affix: true } meta: { title: '楼详细建筑数据', icon: 'dashboard', affix: true }
}, },
{ {
path: '/onefloorbuildingdetaildate', path: '/onefloorbuildingdetaildate',
component: () => import('../views/areabuildmanage/onefloor/index.vue'), component: () => import('../views/areabuildmanage/onefloor/index.vue'),
name: 'oneFloorBuildingDetailDate', name: 'oneFloorBuildingDetailDate',
meta: { title: '层详细建筑数据', icon: 'dashboard', affix: true } meta: { title: '层详细建筑数据', icon: 'dashboard', affix: true }
}, },
{ {
path: '/uavdetaildate', path: '/uavdetaildate',
component: () => import('../views/uavshowdate/uavmanage/index.vue'), component: () => import('../views/uavshowdate/uavmanage/index.vue'),
name: 'uavDetailDate', name: 'uavDetailDate',
meta: { title: '无人机管理', icon: 'dashboard', affix: true } meta: { title: '无人机管理', icon: 'dashboard', affix: true }
}, },
{
path: '/recordfireinfo',
component: () => import('../views/areafiremanage/firerecord/index.vue'),
name: 'recordFireInfo',
meta: { title: '火情记录管理', icon: 'dashboard', affix: true }
},
{
path: '/recordfireinfo',
component: () => import('../views/areafiremanage/firerecord/index.vue'),
name: 'recordFireInfo',
meta: { title: '火情记录管理', icon: 'dashboard', affix: true }
},
] ]
}, },
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<main class="main-content"> <main class="main-content">
<!-- 左侧区域 --> <!-- 左侧区域 -->
<div class="left-section"> <div class="left-section">
<!-- 左侧下部分:统计区域 --> <!-- 左侧下部分:统计区域 -->
<div class="info-card stats-alerts"> <div class="info-card stats-alerts">
<div class="card-table"> <div class="card-table">
<onefloorbuildingdetaildate></onefloorbuildingdetaildate> <onefloorbuildingdetaildate></onefloorbuildingdetaildate>
</div> </div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
</main> </main>
</div> </div>
</template> </template>
...@@ -33,9 +33,9 @@ import { message } from 'ant-design-vue'; ...@@ -33,9 +33,9 @@ import { message } from 'ant-design-vue';
// import Operation from 'ant-design-vue/es/transfer/operation'; // import Operation from 'ant-design-vue/es/transfer/operation';
// 定义一个名为searchShowData的ref变量,它是一个数组,数组中的每个元素都是一个对象,对象中包含了label、placeholder、type、content和options等属性 // 定义一个名为searchShowData的ref变量,它是一个数组,数组中的每个元素都是一个对象,对象中包含了label、placeholder、type、content和options等属性
const searchShowData = ref([ const searchShowData = ref([
{ label: '用户姓名', placeholder: "请输入", type: 'input',content:'' ,isShow: false }, { label: '用户姓名', placeholder: "请输入", type: 'input', content: '', isShow: false },
{ label: '用户状态', placeholder: "请选择", type: 'select',content:'' ,isShow: false, options: [{label:'启用', value:'启用'}, {label:'禁用', value:'禁用'}] }, { label: '用户状态', placeholder: "请选择", type: 'select', content: '', isShow: false, options: [{ label: '启用', value: '启用' }, { label: '禁用', value: '禁用' }] },
{ label: '用户角色', placeholder: "请选择", type: 'select', content:'' ,isShow: false,options: [{label:'管理员', value:'管理员'}, {label:'巡查员', value:'巡查员'}]}, { label: '用户角色', placeholder: "请选择", type: 'select', content: '', isShow: false, options: [{ label: '管理员', value: '管理员' }, { label: '巡查员', value: '巡查员' }] },
]) ])
// 响应式布局配置 // 响应式布局配置
const layoutConfig = reactive({ const layoutConfig = reactive({
...@@ -76,7 +76,7 @@ const editData = (data) => { ...@@ -76,7 +76,7 @@ const editData = (data) => {
// 设置要编辑的数据 // 设置要编辑的数据
rowData.value = data rowData.value = data
console.log("000000-------1-----0000000000",data) console.log("000000-------1-----0000000000", data)
} }
/** /**
...@@ -85,7 +85,7 @@ const editData = (data) => { ...@@ -85,7 +85,7 @@ const editData = (data) => {
* 显示确认对话框,用户确认后执行删除操作 * 显示确认对话框,用户确认后执行删除操作
*/ */
const deleteData = (data) => { const deleteData = (data) => {
console.log("000000---2---------0000000000",data) console.log("000000---2---------0000000000", data)
ElMessageBox.confirm( ElMessageBox.confirm(
'删除操作不可逆,是否继续?', '删除操作不可逆,是否继续?',
'删除', '删除',
...@@ -97,20 +97,20 @@ const deleteData = (data) => { ...@@ -97,20 +97,20 @@ const deleteData = (data) => {
} }
) )
.then(() => { .then(() => {
console.log("000000---1-456464564------0000000000","我是确认") console.log("000000---1-456464564------0000000000", "我是确认")
try { try {
const res = staffRemoveInfoApi({id:data.id}); const res = staffRemoveInfoApi({ id: data.id });
if (res.code === 200) { if (res.code === 200) {
ElMessage({ type: 'success', message: '已删除' }); ElMessage({ type: 'success', message: '已删除' });
tableDataRefresh(); tableDataRefresh();
} else { } else {
ElMessage({ type: 'error', message: '删除失败:' + res.msg }); ElMessage({ type: 'error', message: '删除失败:' + res.msg });
} }
} catch (err) { } catch (err) {
// API 请求失败时在此捕获,不向上冒泡 // API 请求失败时在此捕获,不向上冒泡
ElMessage({ type: 'error', message: '删除失败(网络错误)' }); ElMessage({ type: 'error', message: '删除失败(网络错误)' });
// console.error('删除接口失败:', err); // console.error('删除接口失败:', err);
} }
}) })
.catch(() => { .catch(() => {
...@@ -143,73 +143,73 @@ const isResetPasswordDialogVisible = ref(false); // 控制重置密码弹窗的 ...@@ -143,73 +143,73 @@ const isResetPasswordDialogVisible = ref(false); // 控制重置密码弹窗的
const resetPasswordData = ref({}); const resetPasswordData = ref({});
const resetData = (data) => { const resetData = (data) => {
console.log("000000-----3-------0000000000",data) console.log("000000-----3-------0000000000", data)
isResetPasswordDialogVisible.value = true; isResetPasswordDialogVisible.value = true;
resetPasswordData.value = data; resetPasswordData.value = data;
} }
const showuserinfodata = ref({}) const showuserinfodata = ref({})
const userData = (data) => { const userData = (data) => {
console.log("000000------4------0000000000",data) console.log("000000------4------0000000000", data)
isUserInfoDialogVisible.value = true isUserInfoDialogVisible.value = true
showuserinfodata.value = data showuserinfodata.value = data
} }
const tableShowData = ref([{ const tableShowData = ref([{
tableHeader:[ tableHeader: [
{label: '姓名', prop: 'name'}, { label: '姓名', prop: 'name' },
{label: '电话', prop: 'phone'}, { label: '电话', prop: 'phone' },
{label: '是否可用', prop: 'status'}, { label: '是否可用', prop: 'status' },
{label: '用户权限', prop: 'role'}, { label: '用户权限', prop: 'role' },
{label: '创建时间', prop: 'createTime'}, { label: '创建时间', prop: 'createTime' },
{label: '更新时间', prop: 'updateTime'}, { label: '更新时间', prop: 'updateTime' },
{label: '操作', prop: 'Operation'} { label: '操作', prop: 'Operation' }
], ],
tableBody:[ tableBody: [
] ]
} }
]) ])
const Operation = ref( [ { label: '编辑', type: 'primary', icon: 'EditPen', click: editData }, const Operation = ref([{ label: '编辑', type: 'primary', icon: 'EditPen', click: editData },
{ label: '删除', type: 'danger', icon: 'Delete', click: deleteData }, { label: '删除', type: 'danger', icon: 'Delete', click: deleteData },
{ label: '用户信息', type: 'primary', icon: 'EditPen', click: userData }, { label: '用户信息', type: 'primary', icon: 'EditPen', click: userData },
{ label: '重置密码', type: 'primary', icon: 'EditPen', click: resetData }] { label: '重置密码', type: 'primary', icon: 'EditPen', click: resetData }]
) )
const initTableData = () => { const initTableData = () => {
staffGetPageInfoApi({ staffGetPageInfoApi({
"currentPageNum": 1, "currentPageNum": 1,
"currentPageSize": 10, "currentPageSize": 10,
}).then(res => {
if(res.code === 200){
let tempData = res.data.list
tableShowData.value[0].tableBody = []
//获取未逻辑删除的数据
console.log(res.data,"--------999999999----")
tempData = tempData.filter(element => {
return element.isDeleted === 0;
});
tempData.forEach(element => {
element.Operation = [...Operation.value]
});
tableShowData.value[0].tableBody = tempData
tableShowData.value[0].total = res.data.total
tableShowData.value[0].pageSize = res.data.pageSize
console.log(tableShowData.value, '展示数据');
} }).then(res => {
if (res.code === 200) {
}).catch(err => { let tempData = res.data.list
ElMessage.error(err.message) tableShowData.value[0].tableBody = []
//获取未逻辑删除的数据
console.log(res.data, "--------999999999----")
tempData = tempData.filter(element => {
return element.isDeleted === 0;
});
}) tempData.forEach(element => {
element.Operation = [...Operation.value]
});
tableShowData.value[0].tableBody = tempData
tableShowData.value[0].total = res.data.total
tableShowData.value[0].pageSize = res.data.pageSize
console.log(tableShowData.value, '展示数据');
}
}).catch(err => {
ElMessage.error(err.message)
})
} }
onMounted(() => { onMounted(() => {
// console.log(tableShowData.value, '错误'); // console.log(tableShowData.value, '错误');
initTableData() initTableData()
}) })
...@@ -242,7 +242,7 @@ const containerStyle = computed(() => ({ ...@@ -242,7 +242,7 @@ const containerStyle = computed(() => ({
flex-direction: column; flex-direction: column;
gap: var(--card-spacing); gap: var(--card-spacing);
height: 100%; height: 100%;
} }
.left-top { .left-top {
...@@ -287,24 +287,28 @@ const containerStyle = computed(() => ({ ...@@ -287,24 +287,28 @@ const containerStyle = computed(() => ({
padding: 10px; padding: 10px;
} }
.title{
.title {
width: 70%; width: 70%;
} }
.card-actions { .card-actions {
display: flex; display: flex;
flex: 1; flex: 1;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
/* margin-bottom: 1rem; */ /* margin-bottom: 1rem; */
height: 8%; height: 8%;
padding: 1.5rem; padding: 1.5rem;
} }
.operation-button { .operation-button {
width: 15%; width: 15%;
} }
.card-tabs-footer { .card-tabs-footer {
display: flex; display: flex;
...@@ -320,30 +324,36 @@ const containerStyle = computed(() => ({ ...@@ -320,30 +324,36 @@ const containerStyle = computed(() => ({
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
/* 文本样式 */ /* 文本样式 */
.page-text { .page-text {
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
white-space: nowrap; /* 防止文本换行 */ white-space: nowrap;
/* 防止文本换行 */
} }
/* 修复 Element Plus 分页组件默认的块级布局问题 */ /* 修复 Element Plus 分页组件默认的块级布局问题 */
:deep .el-pagination { :deep(.el-pagination) {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0; /* 清除默认外边距 */ margin: 0;
/* 清除默认外边距 */
} }
.pagination-block{
.pagination-block {
height: 8%; height: 8%;
} }
.card-table{
.card-table {
width: 100%; width: 100%;
/* display: flex; */ /* display: flex; */
/* background-color: #000000; */ /* background-color: #000000; */
flex:1; flex: 1;
overflow: hidden; overflow: hidden;
border-radius: 8PX; border-radius: 8PX;
} }
...@@ -353,7 +363,7 @@ const containerStyle = computed(() => ({ ...@@ -353,7 +363,7 @@ const containerStyle = computed(() => ({
.left-top { .left-top {
flex-direction: column; flex-direction: column;
} }
.region-overview { .region-overview {
width: 100%; width: 100%;
flex: none; flex: none;
......
...@@ -5,7 +5,7 @@ import AutoImport from 'unplugin-auto-import/vite'; ...@@ -5,7 +5,7 @@ import AutoImport from 'unplugin-auto-import/vite';
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [vue(), plugins: [vue(),
AutoImport({ AutoImport({
dts: './auto-imports.d.ts', // 项目根目录生成auto-imports.d.ts配置文件 dts: './auto-imports.d.ts', // 项目根目录生成auto-imports.d.ts配置文件
...@@ -25,7 +25,7 @@ export default defineConfig({ ...@@ -25,7 +25,7 @@ export default defineConfig({
open: true,//自动在默认浏览器上打开 open: true,//自动在默认浏览器上打开
proxy: { proxy: {
'/api': { '/api': {
target: 'http://117.89.29.251:18083/api', //test----------------------尾部214,2,31,12,11都可以,登不上时换个试试 target: 'http://117.89.29.251:18083/api', //
// target: 'http://172.16.34.76:18088', // target: 'http://172.16.34.76:18088',
ws: false,//代理websocked ws: false,//代理websocked
changeOrigin: true, //是否跨域 changeOrigin: true, //是否跨域
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论