parent
2dac5c7f04
commit
35401bf86f
@ -0,0 +1,224 @@
|
|||||||
|
<template>
|
||||||
|
<main-app :showTree="false" listTitle="任务列表">
|
||||||
|
<template v-slot:tablec>
|
||||||
|
<el-button type="primary" plain icon="el-icon-plus" size="mini"
|
||||||
|
>任务创建</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template v-slot:search>
|
||||||
|
<el-form
|
||||||
|
:model="formInline"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
label-width="110px"
|
||||||
|
>
|
||||||
|
<el-form-item label="任务名称:" prop="taskName">
|
||||||
|
<el-input
|
||||||
|
v-model="formInline.taskName"
|
||||||
|
placeholder="请输入"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务状态:" prop="taskStatus">
|
||||||
|
<el-select v-model="formInline.taskStatus" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
v-for="dict in dict.type.tc_rwgl_stste"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务完成时间:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="time"
|
||||||
|
format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetimerange"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<template v-slot:table>
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
:height="tabHeader"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
:max-height="tabHeader"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||||
|
|
||||||
|
<el-table-column label="任务名称" prop="taskName" align="center" />
|
||||||
|
<el-table-column label="任务下发时间" prop="taskTime" align="center" />
|
||||||
|
|
||||||
|
<el-table-column label="任务期限" prop="taskDeadline" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="任务完成时间"
|
||||||
|
prop="taskFinishTime"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="任务状态"
|
||||||
|
width="200px"
|
||||||
|
prop="taskStatus"
|
||||||
|
class-name="table-status"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag
|
||||||
|
:options="dict.type.tc_rwgl_stste"
|
||||||
|
:value="scope.row.taskStatus"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
prop="userId"
|
||||||
|
class-name="table-operation"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" plain icon="el-icon-view"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
<el-button type="warning" size="mini" plain icon="el-icon-s-check"
|
||||||
|
>审核</el-button
|
||||||
|
>
|
||||||
|
<el-button type="danger" size="mini" plain icon="el-icon-delete"
|
||||||
|
>关闭</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
prev-text="上页"
|
||||||
|
next-text="下页"
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page-sizes="[10, 20, 40, 80, 100]"
|
||||||
|
:page.sync="formInline.current"
|
||||||
|
:limit.sync="formInline.size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</main-app>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
addassetTaskadd,
|
||||||
|
getassetTask,
|
||||||
|
getassetTaskid,
|
||||||
|
assetTaskclose,
|
||||||
|
} from "@/api/renwuApi/index.js";
|
||||||
|
export default {
|
||||||
|
dicts: ["tc_rwgl_stste"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
const date = new Date();
|
||||||
|
const oneday = date.getTime();
|
||||||
|
return time.getTime() < new Date().getTime() - 86400000;
|
||||||
|
},
|
||||||
|
selectableRange: (() => {
|
||||||
|
let data = new Date();
|
||||||
|
let hour = data.getHours();
|
||||||
|
let minute = data.getMinutes();
|
||||||
|
let second = data.getSeconds();
|
||||||
|
return [`${hour}:${minute}:${second} - 23:59:59`];
|
||||||
|
})(),
|
||||||
|
},
|
||||||
|
|
||||||
|
btnloading: false,
|
||||||
|
time: [],
|
||||||
|
formInline: {
|
||||||
|
taskName: "",
|
||||||
|
taskStatus: "",
|
||||||
|
current: 1,
|
||||||
|
size: 20,
|
||||||
|
isfanhui: false,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
tableData: [],
|
||||||
|
loading: false,
|
||||||
|
tabHeader: 600,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 修改table背景色
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
if (rowIndex % 2 !== 0) {
|
||||||
|
return "evenNumber-row";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.time = [];
|
||||||
|
this.formInline.startTime = "";
|
||||||
|
this.formInline.endTime = "";
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
handleQuery() {
|
||||||
|
this.formInline.current = 1;
|
||||||
|
if (this.time.length > 0) {
|
||||||
|
this.formInline.startTime = this.time[0];
|
||||||
|
this.formInline.endTime = this.time[1];
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取列表
|
||||||
|
*/
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getassetTask(this.formInline).then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.total = res.data.total;
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-form-item__content {
|
||||||
|
width: 280px;
|
||||||
|
.el-select,
|
||||||
|
.el-date-editor {
|
||||||
|
width: 100%;
|
||||||
|
color: #67c23a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,7 @@
|
|||||||
|
<template></template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
Loading…
Reference in new issue