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

去除警告

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