无人机管理后台前端(已迁走)
张含笑
2025-06-27 0a0a2307122724eeb0c3628af0ce8d6e43b1de6b
feat:帮助中心静态页面
3 files modified
2 files added
273 ■■■■■ changed files
src/assets/images/helpCenter/helpIcon.png patch | view | raw | blame | history
src/page/index/top/index.vue 4 ●●●● patch | view | raw | blame | history
src/page/index/top/top-qna.vue 133 ●●●● patch | view | raw | blame | history
src/router/views/index.js 16 ●●●●● patch | view | raw | blame | history
src/views/system/helpCenter.vue 120 ●●●●● patch | view | raw | blame | history
src/assets/images/helpCenter/helpIcon.png
src/page/index/top/index.vue
@@ -7,13 +7,13 @@
      </div>
    </div>
    <div class="top-bar__title">
<!--      <top-menu ref="topMenu" v-if="setting.menu"></top-menu>-->
<!--<top-menu ref="topMenu" v-if="setting.menu"></top-menu>-->
      <top-search class="top-bar__item" v-if="setting.search"></top-search>
    </div>
    <div class="top-bar__right">
      <div class="icon-box">
        <top-lock v-if="setting.lock"/>
        <top-qna title="帮助中心"/>
        <top-qna />
        <top-full v-if="setting.fullscreen" title="全屏"/>
        <img class="gateway" @click="jumpMH" src="@/assets/images/mh.png" alt="进入门户" title="进入门户" width="20" height="20">
      </div>
src/page/index/top/top-qna.vue
@@ -1,66 +1,29 @@
<template>
  <div class="top-qna" @mouseenter="disableTooltip" @mouseleave="enableTooltip">
    <el-tooltip :disabled="tooltipDisabled" content="帮助中心" placement="bottom">
      <el-icon @click="showHelp" class="help-icon">
        <QuestionFilled />
      </el-icon>
    </el-tooltip>
    <el-dialog v-model="dialogVisible" title="帮助中心" width="30%" @close="closeDialog">
      <div class="dialog-content">
        <div class="qa-item">
          <span class="qa-title">Q1:智飞机场 2 支持哪些无人机?</span>
          <span class="qa-text">
            A1:智飞机场 2 仅支持 DJI Matrice 3D 系列无人机。
          </span>
        </div>
        <div class="qa-item">
          <span class="qa-title">Q2:智飞机场 2 如何应对意外断电?</span>
          <span class="qa-text">
            A2:若发生意外断电,机场仍可借助内置蓄电池独立工作超 5 小时,为飞行器预留充足的返航降落时间。
            断电后,机场不支持飞行器充电、空调、舱盖加热、风速计加热等功能,请及时排查故障。
          </span>
        </div>
        <div class="qa-item">
          <span class="qa-title">Q3:智飞机场 2 和第一代智飞机场有什么区别?</span>
          <span class="qa-text">
            A3:相对于第一代智飞机场,智飞机场 2 在体积、重量上大幅下降,不仅轻量化、易部署,
            且具备更强大的作业能力和云端智能功能,大幅降低了无人值守作业门槛,作业效率和质量也上升至全新高度。
          </span>
        </div>
      </div>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="closeDialog">关闭</el-button>
        </span>
      </template>
    </el-dialog>
  <div class="top-qna">
      <el-dropdown @command="dropdownClick" >
            <img alt="" src="@/assets/images/helpCenter/helpIcon.png" />
            <template #dropdown>
                <el-dropdown-menu>
                    <el-dropdown-item command="guide">入门指南</el-dropdown-item>
                    <el-dropdown-item command="systemupdate">系统更新</el-dropdown-item>
                </el-dropdown-menu>
            </template>
        </el-dropdown>
  </div>
</template>
<script>
export default {
  name: 'top-qna',
  data() {
    return {
      dialogVisible: false, // 确保初始值为 false
      tooltipDisabled: false, // 控制 tooltip 是否显示
    };
  },
  methods: {
    showHelp() {
      this.dialogVisible = true;
    },
    closeDialog() {
      this.dialogVisible = false;
    },
    disableTooltip() {
      this.tooltipDisabled = true; // 禁用 tooltip
    },
    enableTooltip() {
      this.tooltipDisabled = false; // 启用 tooltip
    },
  },
};
<script setup>
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus';
const router = useRouter()
const dropdownClick =(val)=>{
if(val ==='guide'){
 ElMessage.warning('加急开发中...');
}else{
router.push('/helpCenter')
}
}
</script>
<style lang="scss" scoped>
@@ -70,57 +33,5 @@
  font-size: 18px;
  justify-content: center;
  cursor: pointer;
}
/* 优化弹出框样式 */
:deep(.el-dialog) {
  border-radius: 8px; /* 圆角边框 */
  overflow: visible; /* 防止内容溢出 */
  .el-dialog__header {
    padding: 15px 20px;
    border-bottom: 1px solid #e8e8e8; /* 标题下边框 */
    .el-dialog__title {
      font-size: 16px;
      font-weight: bold;
      color: #333;
    }
  }
  .el-dialog__body {
    padding: 20px;
    max-height: none; /* 取消高度限制 */
    overflow: visible; /* 取消滚动条 */
    word-wrap: break-word; /* 自动换行 */
    word-break: break-word; /* 防止长单词溢出 */
    white-space: normal; /* 确保文字自动换行 */
  }
  .el-dialog__footer {
    padding: 10px 20px;
    border-top: 1px solid #e8e8e8; /* 底部上边框 */
    text-align: right;
  }
}
/* 优化内容样式 */
.dialog-content {
  .qa-item {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e8e8e8; /* 边框 */
    border-radius: 4px; /* 圆角 */
    background-color: #f9f9f9; /* 背景色 */
    .qa-title {
      font-size: 14px;
      font-weight: bold;
      color: #333;
      display: block; /* 确保换行 */
      margin-bottom: 5px;
    }
    .qa-text {
      font-size: 14px;
      color: #666;
      line-height: 1.6; /* 行间距 */
      display: block; /* 确保换行 */
    }
  }
}
</style>
src/router/views/index.js
@@ -141,4 +141,20 @@
      },
    ],
  },
  {
    path: '/helpCenter',
    component: Layout,
    redirect: '/system/helpCenter',
    children: [
      {
        path: 'system',
        name: '帮助中心',
        meta: {
          i18n: 'info',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/system/helpCenter.vue'),
      },
    ],
  },
];
src/views/system/helpCenter.vue
New file
@@ -0,0 +1,120 @@
<template>
  <basic-container>
    <div class="helpContainer">
      <el-table
      class="custom-table"
        :data="tableData"
        style="width: 100%"
        :row-class-name="tableRowClassName"
      >
        <el-table-column label="序号" type="index" width="100">
          <template #default="{ $index }">
            {{ $index + 1 }}
          </template>
        </el-table-column>
        <el-table-column prop="jibie1" label="一级类别" />
        <el-table-column prop="jibie2" label="二级类别" />
        <el-table-column prop="name" label="上传者" />
        <el-table-column prop="date" label="上传时间" />
        <el-table-column label="操作" width="150" align="center">
          <template #default="scope">
            <span class="look">查看</span>
            <span class="uploads">上传</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </basic-container>
</template>
<script setup>
const helpData = ref([{}]);
const tableData = [
  {
    jibie1: '入门指南',
    jibie2: '指挥调度平台',
    name: 'cdsfsdf',
    date: '2025/05/03 14:10',
  },
  {
    jibie1: '入门指南',
    jibie2: '综合管理平台',
    name: 'cdsfsdf',
    date: '2025/05/03 14:10',
  },
  {
    jibie1: '入门指南',
    jibie2: 'AISKY算法平台',
    name: 'cdsfsdf',
    date: '2025/05/03 14:10',
  },
  {
    jibie1: '一级类别',
    jibie2: '7.6.35版本更新',
    name: 'cdsfsdf',
    date: '2025/05/03 14:10',
  },
];
// 表格隔行变色
const tableRowClassName = ({ row, rowIndex }) => {
  if (rowIndex % 2 === 1) {
    return 'warning-row';
  } else {
    return 'success-row';
  }
};
</script>
<style lang="scss">
.helpContainer {
.el-table .success-row {
  --el-table-tr-bg-color: #fff;
}
.el-table .warning-row {
    --el-table-tr-bg-color: #f3f6ff;
}
}
</style>
<style scoped lang="scss">
/* 表头样式 */
.custom-table :deep(.el-table__header) th {
  height: 70px;
 font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 14px;
color: #49556E;
  background-color: #f3f6ff;
  text-align: center;
}
/* 行样式 */
.custom-table :deep(.el-table__body) tr {
  height: 70px;
 font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 14px;
color: #363636;
  text-align: center;
}
.custom-table  :deep(.el-table__body) td.el-table__cell{
text-align: center;
}
.helpContainer {
  height: 100%;
  .look {
    font-family: Source Han Sans CN, Source Han Sans CN;
    color: #1c5cff;
    cursor: pointer;
    margin-right: 15px;
    font-size: 14px;
  }
  .uploads {
    font-family: Source Han Sans CN, Source Han Sans CN;
    font-weight: 400;
    font-size: 14px;
    color: #19876d;
    cursor: pointer;
  }
}
</style>