attributeList.vue 3.55 KB
<template>
  <div>
    <div class="scrm-sub-client-container">
      <div class="pageContent">
        <GLCombiForm ref="combiForm" :formObj="searchForm" :formData="clientManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
        <!-- Pie Chart Component -->
        <AttributePieChart style="margin-top: 20px;" :date-filter="searchForm.purchaseCar" />
      </div>
    </div>
  </div>
</template>

<script>
import AttributePieChart from './components/AttributePieChart.vue'

export default {
  name: 'attributeList',
  components: {
    AttributePieChart
  },
  data() {
    const now = new Date();
    const year = now.getFullYear();
    const month = String(now.getMonth() + 1).padStart(2, '0');
    const day = String(now.getDate()).padStart(2, '0');
    const todayStr = `${year}-${month}-${day}`;

    return {
      searchForm: {
        addWay: [],
        customerName: '',
        purchaseCar: todayStr
      },
      clientManageFormList: [
        // {
        //   type: 'input',
        //   inputType: 'text',
        //   name: 'customerName',
        //   label: '客户名称',
        //   placeholder: '请输入客户名称'
        // },
        // {
        //   type: 'select',
        //   name: 'addWay',
        //   label: '事件选择',
        //   multiple: true,
        //   collapseTags: true,
        //   optionLabel: 'label',
        //   optionId: 'value',
        //   placeholder: '请选择事件',
        //   optionList: EVENT_OPTIONS
        // },
        {
          type: 'datePicker',
          name: 'purchaseCar',
          label: '时间选择',
          valueFormat: 'yyyy-MM-dd',
          dateType: 'week',
          attrs: {
            format: 'yyyy 第 WW 周'
          },
          customPickerOptions: {
            disabledDate(time) {
              return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
            }
          }
        }
      ]
    }
  },
  methods: {
    //搜索表格
    searchTable() {
    },
    //重置表格
    resetTable() {
      const now = new Date();
      const year = now.getFullYear();
      const month = String(now.getMonth() + 1).padStart(2, '0');
      const day = String(now.getDate()).padStart(2, '0');
      const todayStr = `${year}-${month}-${day}`;

      this.searchForm = {
        addWay: [],
        customerName: '',
        purchaseCar: todayStr
      }
    },

  },
  mounted() {}
}
</script>

<style lang="scss" scoped>
@import '@/styles/resetelement.scss';
.scrm-sub-client-container {
  .pageTitle {
    margin-bottom: 20px;
    position: relative;
    height: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    line-height: 20px;
    letter-spacing: 1px;
  }
  .pageContent {
    .leadList {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      div {
        text-align: center;
        span:nth-child(1) {
          font-weight: 600;
          font-size: 16px;
        }
      }
      /deep/ .el-button {
        color: #08C489;
        border: 1px solid #08C489;
      }
    }
    padding: 20px 20px 30px;
    background-color: #fff;
    .el-button + .el-button {
      margin-left: 10px;
    }
    .searchTop {
      // margin-bottom: 20px;
    }
    .glsx-table {
      // /deep/ .el-table__fixed {
      //   height: 100% !important; //设置高优先,以覆盖内联样式
      // }
      /deep/ .el-table__fixed,
      /deep/ .el-table__fixed-right {
        height: 100% !important; //设置高优先,以覆盖内联样式
      }
    }
  }
}
</style>