InspectManage.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="inspect-page">
  3. <div class="head">
  4. <div>
  5. <h2>门店巡检与考核</h2>
  6. <p>指标配置 · 计划管理 · 任务执行 · 整改流程 · 考核排名</p>
  7. </div>
  8. <el-button type="primary" icon="el-icon-refresh" @click="reload">刷新当前页</el-button>
  9. </div>
  10. <el-tabs v-model="tab" type="card" @tab-click="reload">
  11. <el-tab-pane label="考核指标配置" name="indicator"><indicator-index ref="indicator" /></el-tab-pane>
  12. <el-tab-pane label="巡检计划管理" name="plan"><plan-index ref="plan" /></el-tab-pane>
  13. <el-tab-pane label="巡检任务执行" name="task"><task-index ref="task" /></el-tab-pane>
  14. <el-tab-pane label="整改流程管理" name="rect"><rectification-index ref="rect" /></el-tab-pane>
  15. <el-tab-pane label="考核结果排名" name="assess"><assess-index ref="assess" /></el-tab-pane>
  16. </el-tabs>
  17. </div>
  18. </template>
  19. <script>
  20. import IndicatorIndex from './indicator/Index.vue'
  21. import PlanIndex from './plan/Index.vue'
  22. import TaskIndex from './task/Index.vue'
  23. import RectificationIndex from './rectification/Index.vue'
  24. import AssessIndex from './assess/Index.vue'
  25. export default {
  26. name: 'InspectManage',
  27. components: { IndicatorIndex, PlanIndex, TaskIndex, RectificationIndex, AssessIndex },
  28. data() {
  29. return { tab: 'indicator' }
  30. },
  31. methods: {
  32. reload() {
  33. this.$nextTick(() => {
  34. const page = this.$refs[this.tab]
  35. if (page) {
  36. if (typeof page.loadAll === 'function') page.loadAll()
  37. else if (typeof page.load === 'function') page.load()
  38. }
  39. })
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped>
  45. .inspect-page { padding: 20px; background: #f5f7fa; min-height: 100%; color: #303133; }
  46. .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
  47. .head h2 { margin: 0; font-size: 22px; }
  48. .head p { margin: 7px 0 0; color: #909399; }
  49. </style>