ziliaoshangbao

This commit is contained in:
shilixia 2021-03-17 13:58:04 +08:00
parent f175379237
commit afe51cbcc9
1 changed files with 52 additions and 11 deletions

View File

@ -3,25 +3,28 @@
<div class="app-container">
<div
<el-card
style="margin-top: 10px"
>
<el-tabs v-model="activeName">
<el-row>
<el-col :span="24">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="待上报" name="first" lazy>
</el-tab-pane>
<el-tab-pane label="已上报" name="three" lazy>
<el-tab-pane label="已上报" name="second" lazy>
</el-tab-pane>
<el-tab-pane label="待整改" name="secord" lazy>
<el-tab-pane label="待整改" name="third" lazy>
</el-tab-pane>
<el-tab-pane label="已确认" name="fore" lazy>
<el-tab-pane label="已确认" name="forth" lazy>
</el-tab-pane>
</el-tabs>
</div>
<el-table
</el-col>
</el-row>
<el-table
v-loading="listLoading"
:data="recordList"
border
@ -31,9 +34,14 @@
max-height="600px"
>
<el-table-column label="序号" type="index" align="center" />
<el-table-column label="单位">
<el-table-column label="任务标题">
<template slot-scope="scope">{{
scope.row.belong_dept_.name
scope.row.task_.name
}}</template>
</el-table-column>
<el-table-column label="材料">
<template slot-scope="scope">{{
scope.row.content_.name
}}</template>
</el-table-column>
<el-table-column label="状态">
@ -86,6 +94,8 @@
</el-table-column>
</el-table>
</el-card>
<el-dialog
:visible.sync="dialogVisible"
title="主动上报"
@ -112,6 +122,7 @@ export default {
return {
dialogVisible: false,
activeName: "first",
state:"待上报",
contents: [],
depts: [],
listLoading: false,
@ -127,17 +138,47 @@ export default {
checkPermission,
getRecordList(){
getRecordList().then((res) => {
getRecordList({state:this.state}).then((res) => {
this.listLoading = false;
this.recordList = res.data.results;
});
},
handleClick(tab, event) {
switch (tab.name) {
case "first":
this.state="待上报";
this.getRecordList();
break;
case "second":
this.state="已上报";
this.getRecordList();
break;
case "third":
this.state="待整改";
this.getRecordList();
break;
case "forth":
this.state="已确认";
this.getRecordList();
break;
}
},
handleUpdate(scope) {
this.data = {
action: "update",
record: scope.row,
};
this.drawer = true;
},
chooseComplete(data) {
this.dialogVisible = false;
const rLoading = this.openLoading("正在初始化任务,请稍等...");
inittask(this.task.id, data).then((res) => {
rLoading.close();
this.$message.success("成功");
this.$router.go(0);
});
},
handleUp(scope) {
this.data = {