diff --git a/client/src/api/record.js b/client/src/api/record.js
index 12d8525..dad31d8 100644
--- a/client/src/api/record.js
+++ b/client/src/api/record.js
@@ -34,7 +34,13 @@ export function updateRecord(id, data) {
data
})
}
-
+export function createself(data) {
+ return request({
+ url: `/supervision/record/createself/`,
+ method: 'post',
+ data
+ })
+}
export function upRecord(id, data) {
return request({
url: `/supervision/record/${id}/up/`,
diff --git a/client/src/views/supervision/record.vue b/client/src/views/supervision/record.vue
index 48408e7..f4e5313 100644
--- a/client/src/views/supervision/record.vue
+++ b/client/src/views/supervision/record.vue
@@ -76,15 +76,15 @@
- {{ scope.row.task_.name }}
+ {{ scope.row.task_.name }}
- {{ scope.row.content_.name }}
+ {{ scope.row.content_.name }}
- {{ scope.row.up_date }}
+ {{ scope.row.up_date }}
-
+
{{ scope.row.up_user }}
@@ -100,7 +100,7 @@
- {{ scope.row.belong_dept_.name }}
+ {{ scope.row.belong_dept_.name }}
{{ scope.row.state }}
diff --git a/client/src/views/supervision/report.vue b/client/src/views/supervision/report.vue
index 5cf05c4..5930681 100644
--- a/client/src/views/supervision/report.vue
+++ b/client/src/views/supervision/report.vue
@@ -1,80 +1,124 @@
-
-
-
-
-
-
-
-
-
-
-
- {{
- scope.row.belong_dept_.name
- }}
-
-
- {{ scope.row.state }}
-
-
- {{ scope.row.up_user_.name }}/{{ scope.row.up_date }}
-
-
-
- 编辑
- 上报
- 确认
- 驳回
- 查看
-
-
-
-
+ 主动上报
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ scope.row.task_.name
+ }}
+
+
+ {{
+ scope.row.content_.name
+ }}
+
+
+ {{
+ scope.row.state
+ }}
+
+
+ {{ scope.row.up_user_.name }}/{{ scope.row.up_date }}
+
+
+
+ 编辑
+ 上报
+ 确认
+ 驳回
+ 查看
+
+
+
+
+
+
+
diff --git a/server/apps/supervision/views.py b/server/apps/supervision/views.py
index ffd7de5..9715af2 100644
--- a/server/apps/supervision/views.py
+++ b/server/apps/supervision/views.py
@@ -29,7 +29,7 @@ class ContentViewSet(CreateUpdateCustomMixin, ModelViewSet):
serializer_class = ContentSerializer
pagination_class = None
search_fields = ['name', 'desc']
- filterset_fields = ['type']
+ filterset_fields = ['type','can_doself']
ordering = ['type__sort', 'create_time']
class TaskViewSet(CreateUpdateCustomMixin, ModelViewSet):
@@ -125,7 +125,7 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
instance.save()
return Response(status=status.HTTP_200_OK)
- @action(methods=['post'], detail=True, perms_map = {'post':'record_up'})
+ @action(methods=['post'], detail=False, perms_map = {'post':'record_creates'})
def createself(self, request, *args, **kwargs):
contents = request.data['contents']
rlist = []