From 32d659432b0e6627758faf39380fc569e56b9799 Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期一, 11 八月 2025 16:26:48 +0800
Subject: [PATCH] 1
---
src/views/flowmgr/timeoutQuery.vue | 103 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 74 insertions(+), 29 deletions(-)
diff --git a/src/views/flowmgr/timeoutQuery.vue b/src/views/flowmgr/timeoutQuery.vue
index cf69180..a71fb8b 100644
--- a/src/views/flowmgr/timeoutQuery.vue
+++ b/src/views/flowmgr/timeoutQuery.vue
@@ -1,5 +1,6 @@
<template>
<basic-container>
+ <avue-form v-model="searchForm" :option="serachOption" @submit="searchSubmit"></avue-form>
<avue-crud
:addBtn="false"
:option="option"
@@ -16,16 +17,51 @@
@on-load="onLoad"
>
<template #menu-left>
- <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleEdit">瀵煎嚭</el-button>
+ <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">瀵煎嚭</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
+import { exportBlob } from '@/api/common';
+import { getToken } from '@/utils/auth';
+import NProgress from 'nprogress';
+import { downloadXls } from '@/utils/util';
+import 'nprogress/nprogress.css';
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: ""
@@ -46,38 +82,28 @@
menu: false,
column: [
{
- label: '浠诲姟鏃堕棿',
- type: 'input',
- prop: '',
- search: true,
- hide: true
- },
- {
label: '鎵ц浜哄憳',
- type: 'input',
- prop: '',
- search: true
+ prop: 'assigneeName',
},
{
label: '浠诲姟鍚嶇О',
- prop: '',
+ prop: 'taskName',
},
{
label: '浠诲姟鑺傜偣',
- prop: '',
+ prop: 'assignee',
},
{
label: '浠诲姟鍒拌揪鏃堕棿',
- prop: '',
+ prop: 'createTime',
},
{
label: '瑕佹眰瀹屾垚鏃堕棿',
- prop: '',
+ prop: 'claimTime',
},
{
- label: '璇︽儏',
- prop: '',
- search: true,
+ label: '鍏抽敭瀛�',
+ prop: 'keyword',
hide: true
}
],
@@ -86,8 +112,24 @@
};
},
methods: {
- handleEdit(row,index) {
-
+ searchSubmit(params,done) {
+ this.onLoad(params);
+ done();
+ },
+ handleExport() {
+ this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ NProgress.start();
+ exportBlob(
+ `/blade-mdm/flow/mgr/overtime-export?${this.website.tokenHeader}=${getToken()}`
+ ).then(res => {
+ downloadXls(res.data, `瓒呮椂瀵煎嚭${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
+ NProgress.done();
+ });
+ });
},
searchReset() {
//this.onLoad(this.mypage);
@@ -106,18 +148,21 @@
refreshChange() {
},
- onLoad() {
- this.loading = true;
- var obj = {
- keyword: this.search.keyword,
- machineGroupCode: this.search.machineGroupCode,
- current: this.mypage.current,
- size: this.mypage.size,
+ 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];
}
+ this.loading = true;
axios({
- url: '/blade-mdm/machine/page',
+ url: '/blade-mdm/flow/mgr/overtime-list',
method: 'get',
- date: obj,
+ params: this.searchForm,
}).then(
res => {
const data = res.data.data;
--
Gitblit v1.9.3