shangbao
This commit is contained in:
parent
d8488bc925
commit
86f7afac43
|
@ -132,6 +132,13 @@ export const asyncRoutes = [
|
|||
component: () => import('@/views/supervision/record.vue'),
|
||||
meta: { title: '材料列表', icon: 'guide', perms: ['record_manage'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'report',
|
||||
name: 'Report',
|
||||
component: () => import('@/views/supervision/report.vue'),
|
||||
meta: { title: '材料报送', icon: 'guide', perms: ['report_manage'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,40 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<div>
|
||||
<el-input
|
||||
placeholder="材料名称"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
placeholder="上报时间"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
placeholder="记录状态"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
placeholder="所属部门"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
style="margin-left: 10px"
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
>刷新重置</el-button
|
||||
>
|
||||
</div>
|
||||
<el-card
|
||||
style="margin-top: 10px"
|
||||
>
|
||||
|
@ -123,6 +157,8 @@ import {
|
|||
deleteContent,
|
||||
updateContent,
|
||||
} from "@/api/content";
|
||||
import getRecordList
|
||||
from "@/api/record";
|
||||
import { genTree } from "@/utils";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
@ -160,7 +196,6 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTypeAll();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
@ -179,73 +214,14 @@ export default {
|
|||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
getTypeAll() {
|
||||
getDictList({ type__code: "data_type" }).then((res) => {
|
||||
this.typeOptions = genTree(res.data);
|
||||
});
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleAddContent() {
|
||||
this.Content = Object.assign({}, defaultContent);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleEdit(scope) {
|
||||
this.Content = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteContent(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateContent(this.Content.id, this.Content).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createContent(this.Content).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div>待整改界面</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div>已确认</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div>上报界面</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div>待整改界面</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
|
@ -0,0 +1,82 @@
|
|||
<template>
|
||||
|
||||
<div class="app-container">
|
||||
|
||||
<div>
|
||||
<el-input
|
||||
placeholder="材料名称"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
placeholder="上报时间"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
placeholder="记录状态"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
placeholder="所属部门"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
style="margin-left: 10px"
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
>刷新重置</el-button
|
||||
>
|
||||
</div>
|
||||
<el-card
|
||||
style="margin-top: 10px"
|
||||
>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="待上报" name="first" lazy>
|
||||
<recorddo></recorddo>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已上报" name="three" lazy>
|
||||
<Recordsub></Recordsub>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待整改" name="secord" lazy>
|
||||
<Recordchange></Recordchange>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已确认" name="fore" lazy>
|
||||
<Recordcomplete></Recordcomplete>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
|
||||
</el-tabs>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Recorddo from "@/views/supervision/recorddo"
|
||||
import Recordchange from "@/views/supervision/recordchange"
|
||||
import Recordcomplete from "@/views/supervision/recordcomplete"
|
||||
import Recordsub from "@/views/supervision/recordsub"
|
||||
export default {
|
||||
components: { Recorddo,Recordchange,Recordcomplete,Recordsub },
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -1,18 +1,12 @@
|
|||
from django.urls import path, include
|
||||
from rest_framework import routers
|
||||
<<<<<<< HEAD
|
||||
from .views import ContentViewSet,RecordViewSet
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register('content', ContentViewSet, basename="content")
|
||||
router.register('record', RecordViewSet, basename="record")
|
||||
=======
|
||||
from .views import ContentViewSet, TaskViewSet
|
||||
from .views import ContentViewSet, TaskViewSet,RecordViewSet
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register('content', ContentViewSet, basename="content")
|
||||
router.register('task', TaskViewSet, basename="task")
|
||||
>>>>>>> a408760d711fd524ef58b7b4df59544a48c079fe
|
||||
router.register('record', RecordViewSet, basename="record")
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(router.urls))
|
||||
]
|
Loading…
Reference in New Issue