gaoshp
2025-08-24 367fff00519ea35beba2374f8ba94df9289e544e
待办
已添加1个文件
已修改1个文件
82 ■■■■■ 文件已修改
src/page/index/top/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/top/top-todo.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/top/index.vue
@@ -29,8 +29,11 @@
      <div class="top-bar__item" v-if="setting.fullscreen">
        <top-full></top-full>
      </div>
      <div class="top-bar__item" v-if="setting.debug">
      <!-- <div class="top-bar__item" v-if="setting.debug">
        <top-logs></top-logs>
      </div> -->
      <div class="top-bar__item" v-if="setting.debug">
        <topTodo></topTodo>
      </div>
      <div class="top-user">
        <img class="top-bar__img" :src="userInfo.avatar" />
@@ -120,6 +123,7 @@
import topSearch from './top-search.vue';
import topTheme from './top-theme.vue';
import topLogs from './top-logs.vue';
import topTodo from './top-todo.vue';
import topColor from './top-color.vue';
import topLang from './top-lang.vue';
import topFull from './top-full.vue';
@@ -140,6 +144,7 @@
    topLang,
    topFull,
    topSetting,
    topTodo
  },
  name: 'top',
  data() {
src/page/index/top/top-todo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
<template>
  <span @click="handleOpen()">
    <el-badge :value="logsLen" :max="99">
      <i class="iconfont iconicon_notice"></i>
    </el-badge>
    <el-dialog title="待办" v-model="box" width="60%" append-to-body>
      <el-button type="primary" @click="handle">处理</el-button>
      <el-table :data="dataList">
        <el-table-column prop="" label="标题">
            <template  #default="{ row }">
                <div>
                    {{ row.variables.title }}
                </div>
            </template>
        </el-table-column>
        <el-table-column prop="processCreateTime" label="创建时间" show-overflow-tooltip width="180">
            <!-- <template #default="scope">
                {{ scope.row.createTime | formatDate('yyyy-MM-dd hh:mm') }}
            </template> -->
        </el-table-column>
        <el-table-column prop="startUserName" show-overflow-tooltip label="创建人"> </el-table-column>
      </el-table>
    </el-dialog>
  </span>
</template>
<script>
import { mapGetters } from 'vuex';
import { getList } from '@/api/flow/todolist';
export default {
  name: 'top-todo',
  data() {
    return {
      box: false,
      logsLen: 0,
      dataList: [],
    };
  },
  created() {
    this.getCount()
    setInterval(() => {
      this.getCount();
    }, 2*60*1000);
  },
  mounted() {},
  computed: {
  },
  props: [],
  methods: {
    handleOpen() {
      this.box = true;
    },
    handle() {
        this.$router.push({ path: '/flow/todoindex' });
        this.box = false;
    },
    getCount() {
      getList(1,10).then((res) => {
        this.logsLen = res.data.data.total;
        this.dataList = res.data.data.records;
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.code {
  font-size: 12px;
  display: block;
  font-family: monospace;
  white-space: pre;
  margin: 1em 0px;
}
</style>