schangxiang@126.com
2024-06-08 d939d095aa38879953884ea263eb45984b3876e7
iwara-scada-web/src/views/main/WorkPieceInfo/index.vue
@@ -40,7 +40,6 @@
                </a-select>
              </a-form-item>
            </a-col>
            <template v-if="advanced">
              <a-col :md="colMd" :sm="colSm">
                <a-form-item label="工序">
                  <a-select
@@ -55,17 +54,18 @@
                  </a-select>
                </a-form-item>
              </a-col>
              <a-col :md="colMd" :sm="colSm">
              <a-col :md="colMd2" :sm="colSm2">
                <a-form-item label="初始上线时间">
                  <a-range-picker style="width:100%" :show-time="{format:'HH:mm'}" v-model="queryParam.dates" format="YYYY-MM-DD HH:mm" />
                </a-form-item>
              </a-col>
            </template>
            <!-- <template v-if="advanced">
            </template> -->
            <a-col :md="colMd" :sm="colSm">
              <span class="table-page-search-submitButtons">
                <a-button type="primary" @click="getData(1)">查询</a-button>
                <a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
                <a-button style="margin-left: 8px" @click="resetQueryData">重置</a-button>
                <a @click="toggleAdvanced" style="margin-left: 8px">
                  {{ advanced ? '收起' : '展开' }}
                  <a-icon :type="advanced ? 'up' : 'down'" />
@@ -108,7 +108,7 @@
<script>
// 在制品监控
import { STable, XCard } from '@/components'
import { downloadFile } from '@/utils/util'
import { downloadFile,getThisWeekRange } from '@/utils/util'
import moment from 'moment'
import { WorkPieceInfoPage, WorkPieceInfoToExcel1 } from '@/api/modular/main/WorkPieceInfoManage'
import editForm from './editForm.vue'
@@ -125,6 +125,8 @@
      gutter: 36,
      colMd: 6,
      colSm: 18,
      colMd2: 10,
      colSm2: 24,
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 }
@@ -134,7 +136,9 @@
        sm: { span: 15 }
      },
      advanced: false, // 高级搜索 展开/关闭
      queryParam: {},
      queryParam: {
        dates:[]
      },
      columns: [
        {
          title: '序号',
@@ -232,11 +236,21 @@
  },
  created() {
    this.getEquipmentName()
    this.initData();
    this.getData()
    this.ProcessSelectData = this.$options.filters['dictData']('process_type')
    this.QualityStateSelectData = this.$options.filters['dictData']('quality_state')
  },
  methods: {
    initData(){
      this.queryParam.dates = [];
      this.queryParam.dates = getThisWeekRange();
    },
     //重置
    resetQueryData(){
      this.queryParam = { dates:[] }
      this.initData();
    },
    getRowBackGround(record) {
      switch (
        record.cololType // 这里根据条件改变表格背景色