This commit is contained in:
BianLzhaoMin 2025-09-26 09:06:25 +08:00
parent 661da659fd
commit eb77d0ecff
3 changed files with 58 additions and 19 deletions

View File

@ -3,10 +3,10 @@
<div class="platform-container">
<el-form :model="queryParams" label-width="100px" inline>
<el-form-item>
<el-input placeholder="平台名称" v-model="queryParams.name" />
<el-input placeholder="平台名称" v-model="queryParams.name" clearable />
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="getPlatformList">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onHandleSearch">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
@ -45,7 +45,7 @@
</el-table>
<pagination
:total="total"
@pagination="getPlatformList"
@pagination="onHandlePagination"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
/>
@ -86,6 +86,7 @@ export default {
return {
total: 0,
tableData: [],
tableDataAll: [],
rightTableData: [],
//
queryParams: {
@ -109,6 +110,20 @@ export default {
this.editRow = row
this.dialogConfig.outerVisible = true
},
onHandleSearch() {
this.tableData = this.tableDataAll.filter((item) => {
return item.name.includes(this.queryParams.name)
})
},
onHandlePagination() {
this.tableData = this.tableDataAll.slice(
(this.queryParams.pageNum - 1) * this.queryParams.pageSize,
this.queryParams.pageNum * this.queryParams.pageSize,
)
},
handleDelete(row) {
console.log(row)
this.$modal
@ -125,7 +140,14 @@ export default {
},
async getPlatformList() {
const res = await getPlatformListAPI()
this.tableData = res?.data
// this.tableData = res?.data
if (res?.data.length > 10) {
this.tableData = res?.data.slice(0, 10)
} else {
this.tableData = res?.data
}
this.tableDataAll = res?.data
this.total = res?.data?.length
this.rightTableData = res?.data[0]?.list || []
},

View File

@ -184,7 +184,20 @@
<el-input v-model="basicInfoForm.driverUrl" clearable placeholder="请输入交互方式" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="cron表达式" prop="cronExpression">
<el-input v-model="basicInfoForm.cronExpression" clearable placeholder="请输入cron执行表达式">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成表达式
<i class="el-icon-time el-icon--right"></i>
</el-button>
</template>
</el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item label="任务失败" prop="errTimes">
<el-input-number
:min="0"
@ -195,7 +208,7 @@
/>
<span> 本次任务终止 </span>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row>
@ -218,18 +231,6 @@
<el-input v-model="basicInfoForm.driverName" clearable placeholder="请输入交互方式" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="cron表达式" prop="cronExpression">
<el-input v-model="basicInfoForm.cronExpression" placeholder="请输入cron执行表达式">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成表达式
<i class="el-icon-time el-icon--right"></i>
</el-button>
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>

View File

@ -43,7 +43,19 @@
<el-table-column align="center" prop="status" label="上次运行时间" />
<el-table-column align="center" prop="status" label="上次运行状态" />
<el-table-column align="center" prop="status" label="执行" />
<el-table-column align="center" label="执行">
<template slot-scope="scope">
<el-button
size="mini"
type="success"
icon="el-icon-refresh"
style="padding: 4px 6px"
@click="handleExecute(scope.row)"
>
立即执行
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="240">
<template slot-scope="scope">
<el-button style="padding: 4px 6px" size="mini" type="success" @click="handleDetails(scope.row)">
@ -199,7 +211,6 @@ export default {
//
onHandleSave() {
console.log('保存')
this.$refs.addAndEditFormRef.submitForm()
},
@ -208,6 +219,11 @@ export default {
this.dialogConfig.outerVisible = false
this.getTaskList()
},
//
handleExecute(row) {
console.log(row)
},
},
}
</script>