4f759039c251fea61591a9bf7836d2c8b8993c0a..c9df8dbde2884e04c18189ead5763385c1214e85
2025-05-30 Gary Gu
fix: 优化横向滑动条显示
c9df8d diff | tree
2025-05-30 Gary Gu
feat: 优化数据
e2a92d diff | tree
3 files modified
36 ■■■■ changed files
src/components/Gantt.vue 16 ●●●●● patch | view | raw | blame | history
src/views/EquipmentView.vue 18 ●●●●● patch | view | raw | blame | history
src/views/Home.vue 2 ●●● patch | view | raw | blame | history
src/components/Gantt.vue
@@ -30,6 +30,12 @@
  export default {
    name: "Gantt",
    components: {},
    props: {
      selectedId: {
        type: String,
        default: "",
      },
    },
    data() {
      return {
        taskslist: [],
@@ -40,6 +46,16 @@
        columnsShow: false,
      };
    },
    watch: {
      selectedId: {
        handler(newVal) {
          console.log("甘特图接收到的数据:", newVal);
          // 处理数据变化的逻辑
        },
        deep: true, // 深度监听对象内部变化
        immediate: true, // 立即执行一次
      },
    },
    mounted() {
      this.init(); //初始化
      this.getProjectqryDataColl(); //获取数据
src/views/EquipmentView.vue
@@ -280,14 +280,14 @@
                  },
                  data: [
                    {
                      value: 81.5,
                      value: 0,
                      name: "",
                      itemStyle: {
                        color: "#00FFFF",
                      },
                    },
                    {
                      value: 18.5,
                      value: 100,
                      name: "",
                      itemStyle: {
                        color: "transparent",
@@ -368,14 +368,14 @@
                  },
                  data: [
                    {
                      value: 33,
                      value: 0,
                      name: "",
                      itemStyle: {
                        color: "#00FFFF",
                      },
                    },
                    {
                      value: 77,
                      value: 100,
                      name: "",
                      itemStyle: {
                        color: "transparent",
@@ -456,14 +456,14 @@
                  },
                  data: [
                    {
                      value: 20,
                      value: 0,
                      name: "",
                      itemStyle: {
                        color: "#00FFFF",
                      },
                    },
                    {
                      value: 80,
                      value: 100,
                      name: "",
                      itemStyle: {
                        color: "transparent",
@@ -1129,3 +1129,9 @@
    display: none;
  }
</style>
<style lang="scss">
  .el-scrollbar__wrap {
    overflow-x: hidden;
    overflow-y: scroll;
  }
</style>
src/views/Home.vue
@@ -98,7 +98,7 @@
      >
      </div>
      <div class="chart-container" :style="sectionStyle">
        <Gantt />
        <Gantt :selected-id="selectedId" />
      </div>
    </div>
  </div>