Changes
This commit is contained in:
@@ -1,74 +1,74 @@
|
||||
<!--业务用户管理界面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader >
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
||||
<el-form-item label='流程名称'>
|
||||
<el-input v-model='tableStore.table.params.name' clearable placeholder='流程名称' />
|
||||
</el-form-item>
|
||||
<el-form-item label='流程分类'>
|
||||
<el-select v-model="tableStore.table.params.searchState" clearable placeholder="请选择流程分类">
|
||||
<el-option v-for="item in categoryList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button>
|
||||
<el-button type='primary' @click='exportReport' class='ml10' icon='el-icon-Download'>导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { pageTable } from '@/api/harmonic-boot/luckyexcel'
|
||||
import { myProcessList } from '@/api/task/process'
|
||||
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/reate/word'
|
||||
name: 'admin/flowTask/mytask'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//区域联级选择
|
||||
const industry = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const categoryList: any = ref([
|
||||
{ id: 0, name: '未启用' },
|
||||
{ id: 1, name: '启用' }
|
||||
])
|
||||
|
||||
//用户信息弹出框
|
||||
const tableRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/flowable/task/todoList',
|
||||
url: '/process-boot/flowable/task/myProcess',
|
||||
method: 'GET',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq',width: 60 },
|
||||
{ title: '流程名称', field: 'procDefName', width: 200 },
|
||||
{ title: '流程类别', field: 'category', width: 200 },
|
||||
{ title: '流程版本', field: 'procDefVersion' },
|
||||
{ title: '提交时间', field: 'createTime' },
|
||||
{
|
||||
title: '序号',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
title: '流程状态', field: 'finishTime',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
formatter(row: any) {
|
||||
return row.finishTime == null ? 0 : 1
|
||||
}
|
||||
},
|
||||
{ title: '变电站', field: 'subName', width: 200 },
|
||||
{ title: '监测点名称', field: 'lineName', width: 200 },
|
||||
{
|
||||
title: '行业类型',
|
||||
field: 'businessType',
|
||||
formatter: (row: any) => {
|
||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '分类等级',
|
||||
field: 'calssificationGrade',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{ title: '电压等级', field: 'voltageScale' },
|
||||
{
|
||||
title: '上级变电站',
|
||||
field: 'superiorsSubstation',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
}
|
||||
{ title: '耗时', field: 'duration' },
|
||||
{ title: '当前节点', field: 'taskName' },
|
||||
{ title: '审核人', field: 'superiorsSubstation' }
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||
@@ -83,18 +83,18 @@ onMounted(() => {
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
const exportReport = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
pageTable(form).then(res => {
|
||||
myProcessList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '合格率报告', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
columnFilterMethod: function(column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user