|
@@ -25,12 +25,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="执行类型" prop="excType"> |
|
|
<el-form-item label="执行类型" prop="excType"> |
|
|
<el-select v-model="queryParams.excType" placeholder="请选择执行类型" clearable> |
|
|
<el-select v-model="queryParams.excType" placeholder="请选择执行类型" clearable> |
|
|
<el-option |
|
|
|
|
|
v-for="dict in dict.type.exc_type" |
|
|
|
|
|
:key="dict.value" |
|
|
|
|
|
:label="dict.label" |
|
|
|
|
|
:value="dict.value" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<el-option v-for="dict in dict.type.exc_type" :key="dict.value" :label="dict.label" :value="dict.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="优先级" prop="priority"> |
|
|
<el-form-item label="优先级" prop="priority"> |
|
@@ -63,6 +58,7 @@ |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="ctApplyPlanList" @selection-change="handleSelectionChange"> |
|
|
<el-table v-loading="loading" :data="ctApplyPlanList" @selection-change="handleSelectionChange"> |
|
|
|
|
|
<!-- :summary-method="getSummaries" show-summary --> |
|
|
<el-table-column type="selection" width="55" align="center" fixed="left" /> |
|
|
<el-table-column type="selection" width="55" align="center" fixed="left" /> |
|
|
<el-table-column label="序号" width="55" align="center" fixed="left"> |
|
|
<el-table-column label="序号" width="55" align="center" fixed="left"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
@@ -70,49 +66,64 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="计划名称" align="center" prop="planName" width="100" /> |
|
|
<el-table-column label="计划名称" align="center" prop="planName" width="100" /> |
|
|
|
|
|
<el-table-column label="应用名称" align="center" prop="appName" width="250" /> |
|
|
<el-table-column label="执行类型" align="center" prop="planType" width="100"> |
|
|
<el-table-column label="执行类型" align="center" prop="planType" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<dict-tag :options="dict.type.plan_type" :value="scope.row.planType" /> |
|
|
<dict-tag :options="dict.type.plan_type" :value="scope.row.planType" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="机器人名称" align="center" prop="robotName" width="100" /> |
|
|
|
|
|
|
|
|
<el-table-column label="机器人名称" align="center" prop="robotName" width="150" /> |
|
|
<el-table-column label="应用类型名称" align="center" prop="appTypeName" width="100" /> |
|
|
<el-table-column label="应用类型名称" align="center" prop="appTypeName" width="100" /> |
|
|
<el-table-column label="应用名称" align="center" prop="appName" width="250" /> |
|
|
|
|
|
<el-table-column label="appid" align="center" prop="appId" width="300" /> |
|
|
<el-table-column label="appid" align="center" prop="appId" width="300" /> |
|
|
<el-table-column label="应用类型枚举" align="center" prop="appType" width="100" /> |
|
|
<el-table-column label="应用类型枚举" align="center" prop="appType" width="100" /> |
|
|
<el-table-column label="预计人工耗时" align="center" prop="manualTime" width="100" /> |
|
|
|
|
|
<el-table-column label="计划参数" align="center" prop="planParams" width="100" /> |
|
|
<el-table-column label="计划参数" align="center" prop="planParams" width="100" /> |
|
|
<el-table-column label="等待超时时间" align="center" prop="waitTimeout" width="100"> |
|
|
<el-table-column label="等待超时时间" align="center" prop="waitTimeout" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<dict-tag :options="dict.type.wait_timeout" :value="scope.row.waitTimeout"/> |
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.wait_timeout" :value="scope.row.waitTimeout" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="优先级" align="center" prop="priority" width="100" /> |
|
|
<el-table-column label="优先级" align="center" prop="priority" width="100" /> |
|
|
<el-table-column label="执行类型" align="center" prop="excType" width="100"> |
|
|
<el-table-column label="执行类型" align="center" prop="excType" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<dict-tag :options="dict.type.exc_type" :value="scope.row.excType"/> |
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.exc_type" :value="scope.row.excType" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="执行时间" align="center" prop="excTime" width="100"/> |
|
|
|
|
|
<el-table-column label="执行表达式" align="center" prop="cronExpression" width="100"/> |
|
|
|
|
|
<el-table-column label="任务运行uuid" align="center" prop="taskUuid" width="300"/> |
|
|
|
|
|
<el-table-column label="创建者" align="center" fixed="right" prop="createBy" width="100" /> |
|
|
|
|
|
<el-table-column label="创建时间" align="center" fixed="right" prop="createTime" width="100"> |
|
|
|
|
|
|
|
|
<el-table-column label="执行时间" align="center" prop="excTime" width="100" /> |
|
|
|
|
|
<el-table-column label="执行表达式" align="center" prop="cronExpression" width="100" /> |
|
|
|
|
|
<el-table-column label="任务执行状态" align="center" fixed="right" prop="taskStatus" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.plan_run_status" :value="scope.row.taskStatus" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="任务运行uuid" align="center" prop="taskUuid" width="300" /> |
|
|
|
|
|
<el-table-column label="开始时间" align="center" fixed="right" prop="startTime" width="100" /> |
|
|
|
|
|
<el-table-column label="结束时间" align="center" fixed="right" prop="endTime" width="100" /> |
|
|
|
|
|
<el-table-column label="人工耗时" align="center" fixed="right" prop="manualTime" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ scope.row.manualTime }} 分钟</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="实际耗时" align="center" fixed="right" prop="planTime" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.planTime != null">{{ scope.row.planTime }} 分钟</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="更新者" align="center" fixed="right" prop="updateBy" width="100" /> |
|
|
|
|
|
<el-table-column label="更新时间" align="center" fixed="right" prop="updateTime" width="100"> |
|
|
|
|
|
|
|
|
<el-table-column label="节约时间" align="center" fixed="right" prop="timeSaving" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.timeSaving != null">{{ scope.row.timeSaving }} 分钟</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="创建人" align="center" fixed="right" prop="createBy" width="100" /> |
|
|
|
|
|
<el-table-column label="创建时间" align="center" fixed="right" prop="createTime" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="备注" align="center" prop="remark" /> |
|
|
<el-table-column label="备注" align="center" prop="remark" /> |
|
|
<el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width"> |
|
|
<el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:ctApplyPlan:edit']">修改</el-button> |
|
|
|
|
|
|
|
|
<el-button size="mini" v-if="scope.row.taskStatus == 'await_create'" type="text" icon="el-icon-edit" |
|
|
|
|
|
@click="handleUpdate(scope.row)" v-hasPermi="['business:ctApplyPlan:edit']">修改</el-button> |
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
|
|
v-hasPermi="['business:ctApplyPlan:remove']">删除</el-button> |
|
|
v-hasPermi="['business:ctApplyPlan:remove']">删除</el-button> |
|
|
</template> |
|
|
</template> |
|
@@ -125,69 +136,116 @@ |
|
|
<!-- 添加或修改应用执行计划管理对话框 --> |
|
|
<!-- 添加或修改应用执行计划管理对话框 --> |
|
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> |
|
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
|
|
<el-form-item label="计划名称" prop="planName"> |
|
|
|
|
|
<el-input v-model="form.planName" placeholder="请输入计划名称" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="执行类型" prop="planType"> |
|
|
|
|
|
<el-select v-model="form.planType" placeholder="请选择执行类型"> |
|
|
|
|
|
<el-option v-for="dict in dict.type.plan_type" :key="dict.value" :label="dict.label" |
|
|
|
|
|
:disabled="dict.value == 0" :value="dict.value"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item v-if="form.planType == 0" label="机器人名称" prop="robotName"> |
|
|
|
|
|
<el-select v-model="form.robotName" multiple collapse-tags style="margin-left: 20px;" placeholder="请选择机器人"> |
|
|
|
|
|
<el-option v-for="rebot in rebotList" :key="rebot.robotClientName" :label="rebot.robotClientName" |
|
|
|
|
|
:value="rebot.robotClientName"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
<el-input v-model="form.robotName" placeholder="请输入机器人名称" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="应用名称" prop="appName"> |
|
|
|
|
|
<el-select v-model="form.appId" multiple filterable collapse-tags style="margin-left: 20px;" placeholder="请选择机器人" > |
|
|
|
|
|
<el-option v-for="apply in applyList" :key="apply.appId" :label="apply.appName":value="apply.appId"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="计划参数" prop="planParams"> |
|
|
|
|
|
<el-input v-model="form.planParams" type="textarea" placeholder="请输入内容" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="等待超时时间" prop="waitTimeout"> |
|
|
|
|
|
<el-select v-model="form.waitTimeout" placeholder="请选择等待超时时间"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="dict in dict.type.wait_timeout" |
|
|
|
|
|
:key="dict.value" |
|
|
|
|
|
:label="dict.label" |
|
|
|
|
|
:value="dict.value" |
|
|
|
|
|
></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="优先级" prop="priority"> |
|
|
|
|
|
<el-input-number v-model="form.priority" @change="handleChange" label="请输入预计人工用时"></el-input-number> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="执行类型" prop="excType"> |
|
|
|
|
|
<el-select v-model="form.excType" placeholder="请选择执行类型"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="dict in dict.type.exc_type" |
|
|
|
|
|
:key="dict.value" |
|
|
|
|
|
:label="dict.label" |
|
|
|
|
|
:value="dict.value" |
|
|
|
|
|
></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item v-if="form.excType == 1" label="执行时间" prop="excTime"> |
|
|
|
|
|
<el-date-picker clearable |
|
|
|
|
|
v-model="form.excTime" |
|
|
|
|
|
type="date" |
|
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
placeholder="请选择执行时间"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item v-if="form.excType == 2" label="执行表达式" prop="cronExpression"> |
|
|
|
|
|
<el-input v-model="form.cronExpression" placeholder="请输入执行表达式" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="计划名称" prop="planName"> |
|
|
|
|
|
<el-input v-model="form.planName" placeholder="请输入计划名称" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="执行类型" prop="planType"> |
|
|
|
|
|
<el-select v-model="form.planType" placeholder="请选择执行类型"> |
|
|
|
|
|
<el-option v-for="dict in dict.type.plan_type" :key="dict.value" :label="dict.label" |
|
|
|
|
|
:disabled="dict.value == 0" :value="dict.value"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
<!-- <el-col :span="12"> |
|
|
|
|
|
<el-form-item v-if="form.planType == 0" label="机器人名称" prop="robotName"> |
|
|
|
|
|
<el-select v-model="form.robotName" multiple collapse-tags style="margin-left: 20px;" |
|
|
|
|
|
placeholder="请选择机器人"> |
|
|
|
|
|
<el-option v-for="rebot in rebotList" :key="rebot.robotClientName" :label="rebot.robotClientName" |
|
|
|
|
|
:value="rebot.robotClientName"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
<el-input v-model="form.robotName" placeholder="请输入机器人名称" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> --> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="应用名称" prop="appName"> |
|
|
|
|
|
<el-select v-model="form.appId" multiple filterable collapse-tags style="margin-left: 20px;" |
|
|
|
|
|
placeholder="请选择机器人"> |
|
|
|
|
|
<el-option v-for="apply in applyList" :key="apply.appId" :label="apply.appName" :value="apply.appId"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="等待超时时间" prop="waitTimeout"> |
|
|
|
|
|
<el-select v-model="form.waitTimeout" placeholder="请选择等待超时时间"> |
|
|
|
|
|
<el-option v-for="dict in dict.type.wait_timeout" :key="dict.value" :label="dict.label" |
|
|
|
|
|
:value="dict.value"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="计划参数" prop="planParams"> |
|
|
|
|
|
<el-input v-model="form.planParams" type="textarea" placeholder="请输入内容" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="优先级" prop="priority"> |
|
|
|
|
|
<el-input-number v-model="form.priority" label="请输入预计人工用时"></el-input-number> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="执行类型" prop="excType"> |
|
|
|
|
|
<el-select v-model="form.excType" placeholder="请选择执行类型"> |
|
|
|
|
|
<el-option v-for="dict in dict.type.exc_type" :key="dict.value" :label="dict.label" |
|
|
|
|
|
:value="dict.value"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item v-if="form.excType == 1" label="执行时间" prop="excTime"> |
|
|
|
|
|
<el-date-picker clearable v-model="form.excTime" type="date" value-format="yyyy-MM-dd" |
|
|
|
|
|
placeholder="请选择执行时间"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item v-if="form.excType == 2" label="执行表达式" prop="cronExpression"> |
|
|
|
|
|
<el-input v-model="form.cronExpression" placeholder="请输入执行表达式" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-row :gutter="24"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
@@ -204,7 +262,7 @@ import { listApplyAll } from "@/api/business/ctApply"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "CtApplyPlan", |
|
|
name: "CtApplyPlan", |
|
|
dicts: ['plan_type', 'wait_timeout',, 'exc_type'], |
|
|
|
|
|
|
|
|
dicts: ['plan_type', 'wait_timeout', , 'exc_type', 'plan_run_status'], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
// 遮罩层 |
|
|
// 遮罩层 |
|
@@ -267,15 +325,15 @@ export default { |
|
|
}, |
|
|
}, |
|
|
/** 查询所有应用 */ |
|
|
/** 查询所有应用 */ |
|
|
listAll() { |
|
|
listAll() { |
|
|
this.listRebotAll(); |
|
|
|
|
|
this.listApplyAll(); |
|
|
|
|
|
|
|
|
this.listRebotAll(); |
|
|
|
|
|
this.listApplyAll(); |
|
|
}, |
|
|
}, |
|
|
/** 查询所有可用机器人 */ |
|
|
/** 查询所有可用机器人 */ |
|
|
listRebotAll() { |
|
|
listRebotAll() { |
|
|
listRebotAll({}).then(res => { |
|
|
listRebotAll({}).then(res => { |
|
|
this.rebotList = res.data; |
|
|
this.rebotList = res.data; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
/** 查询应用 */ |
|
|
/** 查询应用 */ |
|
|
listApplyAll() { |
|
|
listApplyAll() { |
|
@@ -381,6 +439,32 @@ export default { |
|
|
this.download('business/ctApplyPlan/export', { |
|
|
this.download('business/ctApplyPlan/export', { |
|
|
...this.queryParams |
|
|
...this.queryParams |
|
|
}, `ctApplyPlan_${new Date().getTime()}.xlsx`) |
|
|
}, `ctApplyPlan_${new Date().getTime()}.xlsx`) |
|
|
|
|
|
}, |
|
|
|
|
|
getSummaries(param) { |
|
|
|
|
|
const { columns, data } = param; |
|
|
|
|
|
const sums = []; |
|
|
|
|
|
columns.forEach((column, index) => { |
|
|
|
|
|
if (index === 0) { |
|
|
|
|
|
sums[index] = '总计时间'; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
const values = data.map(item => Number(item[column.property])); |
|
|
|
|
|
if (!values.every(value => isNaN(value))) { |
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
|
|
const value = Number(curr); |
|
|
|
|
|
if (!isNaN(value)) { |
|
|
|
|
|
return prev + curr; |
|
|
|
|
|
} else { |
|
|
|
|
|
return prev; |
|
|
|
|
|
} |
|
|
|
|
|
}, 0); |
|
|
|
|
|
sums[index] += ' 分钟'; |
|
|
|
|
|
} else { |
|
|
|
|
|
sums[index] = ''; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return sums; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |