11
86134
2023-11-17 9ae715c71e78d4d68b05a91b399b3f6c91ee45e7
src/views/product/workbench/operation-task-pane.vue
@@ -14,7 +14,7 @@
      :key="index"
      :class="['task-item', item.checkFlag ? 'card-checked' : 'card-unchecked']"
    >
      <img class="selectedImg" src="/img/workbench/icon_selected.png" />
  <!-- <img class="selectedImg" /> -->
      <div class="header">
        <div>工单号:{{ item.taskNo }}</div>
        <!-- <div>计划号:{{ item.mpsNo }}</div> -->
@@ -96,10 +96,13 @@
  border-radius: 12px;
  cursor: pointer;
  position: relative;
background:none;
  box-shadow: 1px 2px 24px 1px rgba(4, 0, 0, 0.14);
  & + .task-item {
    margin-top: 10px;
  }
  &.card-checked {
    // color: white;
    background-image: -webkit-linear-gradient(
@@ -344,6 +347,28 @@
    }
  },
  methods: {
    // setCheckFlag(item) {
    //   this.$nextTick(() => {
    //     this.changeBackgroundColor(item.planFinishDay);
    //   });
    // },
    // changeBackgroundColor(dateString) {
    //   const date = new Date(dateString);
    //   const threeDaysAgo = new Date();
    //   threeDaysAgo.setDate(threeDaysAgo.getDate() - 3);
    //   const oneDayAgo = new Date();
    //   oneDayAgo.setDate(oneDayAgo.getDate() - 1);
    //   if (date <= threeDaysAgo) {
    //     document.body.style.backgroundColor = "blue";
    //   } else if (date <= oneDayAgo) {
    //     document.body.style.backgroundColor = "yellow";
    //   } else {
    //     document.body.style.backgroundColor = "red";
    //   }
    // },
    // 点击工单,选中工单
    setCheckFlag(item) {
      if (item.checkFlag) {