global-config.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <script lang="ts" setup>
  2. import { computed, ref } from "vue";
  3. import type { TabsPaneContext } from "element-plus";
  4. import engrInstrumentConfig from "@/views/modules/global-config/components/engrInstrumentConfig.vue";
  5. import engrGlobalData from "@/views/modules/global-config/components/engrGlobalData.vue";
  6. import SecondHeader from "@/views/modules/conmon/SecondHeader.vue";
  7. const route = useRoute();
  8. const activeName = ref("仪器配置");
  9. const handleClick = (tab: TabsPaneContext, event: Event) => {
  10. // console.log(tab, event);
  11. };
  12. // =======================
  13. </script>
  14. <template>
  15. <div class="global-config">
  16. <SecondHeader>全局配置</SecondHeader>
  17. <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
  18. <el-tab-pane label="仪器配置" name="仪器配置">
  19. <engrInstrumentConfig :property="1" tabName="仪器配置" />
  20. </el-tab-pane>
  21. <el-tab-pane label="全局数据" name="全局数据">
  22. <engrGlobalData />
  23. </el-tab-pane>
  24. <el-tab-pane label="执行终端" name="执行终端">
  25. <engrInstrumentConfig :property="2" tabName="执行终端" />
  26. <!-- 跟仪器配置一样只是 instrumentProperty 仪器属性(1工程仪器 2执行仪器)
  27. 仪器类型是字典要选择 -->
  28. </el-tab-pane>
  29. </el-tabs>
  30. <!-- <configAddVue ref="configChildRef" @save="configSaveFun"></configAddVue> -->
  31. <!-- <globalAddVue ref="globalChildRef" @save="globalSaveFun"></globalAddVue> -->
  32. </div>
  33. </template>
  34. <style scoped lang="scss">
  35. .global-config {
  36. width: 100%;
  37. height: 100vh;
  38. .demo-tabs {
  39. // background-color: red;
  40. :deep(.el-tabs__nav-scroll) {
  41. padding: 0 20px;
  42. }
  43. }
  44. .add {
  45. width: 12px;
  46. height: 12px;
  47. line-height: 12px;
  48. border-radius: 12px;
  49. text-align: center;
  50. background-color: #fff;
  51. color: #3b7cff;
  52. margin-right: 10px;
  53. vertical-align: middle;
  54. }
  55. // .global-config-pane {
  56. // padding: 0 20px;
  57. // .btns {
  58. // text-align: right;
  59. // margin-bottom: 12px;
  60. // }
  61. // }
  62. // .content-pag {
  63. // float: right;
  64. // margin-right: 20px;
  65. // margin-top: 20px;
  66. // padding-bottom: 30px;
  67. // }
  68. }
  69. </style>