gaoshp
2025-06-17 cb442efd16356c29f4edb496a3f30b7a91906efa
Merge branch 'master' of http://www.beijingsoft.cn:9090/r/mdmweb
已添加1个文件
168 ■■■■■ 文件已修改
src/views/flowmgr/timeoutQuery.vue 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowmgr/timeoutQuery.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,168 @@
<template>
  <basic-container>
    <avue-form v-model="searchForm" :option="serachOption" @submit="searchSubmit"></avue-form>
    <avue-crud
      :addBtn="false"
      :option="option"
      :table-loading="loading"
      :data="data"
      ref="crud"
      v-model:search="search"
      v-model:page="mypage"
      @search-change="searchChange"
      @search-reset="searchReset"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
      <template #menu-left>
        <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleEdit">导出</el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
export default {
  data() {
    return {
      searchForm: {},
      serachOption: {
        labelWidth: 90,
        menuSpan: 6,
        submitText: "查询",
        emptyBtn: false,
        column: [
          {
            label: "任务时间",
            prop: "daterange",
            type: "daterange",
            format: 'YYYY-MM-DD',
            valueFormat: 'YYYY-MM-DD',
            startPlaceholder: '日期开始范围自定义',
            endPlaceholder: '日期结束范围自定义',
            span: 6
          },
          {
            label: '执行人员',
            prop: 'assigneeName',
            span: 6
          },
          {
            label: '关键字',
            prop: 'keyword',
            span: 6
          }
        ]
      },
      search: {
        keyword: "",
        machineGroupCode: ""
      },
      loading: true,
      mypage: {
        size: 10,
        current: 1,
        total: 0,
      },
      option: {
        addBtn: false,
        editBtn: false,
        delBtn: false,
        labelWidth: 120,
        emptyBtn: false,
        searchSpan: 8,
        menu: false,
        column: [
          {
            label: '执行人员',
            prop: 'assigneeName',
          },
          {
            label: '任务名称',
            prop: 'taskName',
          },
          {
            label: '任务节点',
            prop: 'assignee',
          },
          {
            label: '任务到达时间',
            prop: 'createTime',
          },
          {
            label: '要求完成时间',
            prop: 'claimTime',
          },
          {
            label: '关键字',
            prop: 'keyword',
            hide: true
          }
        ],
      },
      data: [],
    };
  },
  methods: {
    searchSubmit(params,done) {
      this.onLoad(params);
      done();
    },
    handleEdit(row,index) {
    },
    searchReset() {
      //this.onLoad(this.mypage);
    },
    searchChange(params, done) {
      this.mypage.current = 1;
      this.onLoad();
      done();
    },
    currentChange(current) {
      this.mypage.current = current;
    },
    sizeChange(size) {
      this.mypage.size = size;
    },
    refreshChange() {
    },
    onLoad(params) {
      if(this.searchForm.daterange == undefined) {
        this.searchForm.createTimeBegin = "";
        this.searchForm.createTimeEnd = "";
      }else if(this.searchForm.daterange.length == 1) {
        this.searchForm.createTimeBegin = this.searchForm.daterange[0];
      }else if(this.searchForm.daterange.length == 2) {
        this.searchForm.createTimeBegin = this.searchForm.daterange[0];
        this.searchForm.createTimeEnd = this.searchForm.daterange[1];
      }
      console.log(this.searchForm,111)
      this.loading = true;
      axios({
        url: '/blade-mdm/flow/mgr/overtime-list',
        method: 'get',
        params: this.searchForm,
      }).then(
        res => {
          const data = res.data.data;
          this.mypage.total = data.total;
          this.data = data.records;
          this.loading = false;
        },
        error => {
        }
      );
    }
  },
};
</script>
<style lang="scss">
</style>