taskList.js 751 Bytes
Component({
  mixins: [],
  data: {
    show: false
  },
  props: {
    isCanEdit: true
  },
  didMount() {},
  didUpdate() {
    if (this.props.taskList.id === 108) {
      console.log(this.props);
    }
  },
  didUnmount() {},
  methods: {
    showPop(e) {
      if (this.props.isCanEdit) {
        this.props.onShowPop(e);
        this.props.onSetCurrentTask(e.target.dataset.task);
      }
    },
    closePop() {
      this.setData({
        show: false
      });
    },
    checkChange(e) {
      let { status, id, groupId, scheduleId } = e.target.dataset;
      if (status == "0") {
        status = "1";
      } else {
        status = "0";
      }
      this.props.onChangeTaskStatusOnList({ status, id, groupId, scheduleId });
    }
  }
});