任务状态
- {{task.state}}
- {{task.state}}
- {{task.state}}
+ {{
+ task.state
+ }}
+ {{
+ task.state
+ }}
+ {{ task.state }}
上报/确认率
- {{ task.up_rate }}% -- {{task.confirm_rate}}%
+
+ {{ task.up_rate }}% -- {{ task.confirm_rate }}%
@@ -81,7 +87,9 @@
v-bind:key="item.id"
@click="chosecontent(item)"
>
- {{index+1}}-{{ item.name }}
+ {{ index + 1 }}-{{ item.name }}
@@ -90,10 +98,10 @@
shadow="never"
style="height: 600px; overflow-y: auto; overflow-x: auto"
>
-
- 当前选择
- {{nowcontent.name}}
-
+
+ 当前选择
+ {{ nowcontent.name }}
+
- {{ scope.row.state }}
- {{ scope.row.state }}
- {{ scope.row.state }}
- {{ scope.row.state }}
+ {{ scope.row.state }}
+ {{ scope.row.state }}
+ {{ scope.row.state }}
+ {{
+ scope.row.state
+ }}
- {{ scope.row.up_user_.name }}/{{ scope.row.up_date }}{{ scope.row.up_user_.name }}/{{
+ scope.row.up_date
+ }}
-
+
+ 有
+ {{
+ scope.row.files.length
+ }}
+ 个文件
+
+ {{ item.name }}
+
+
-
+
编辑
上报
确认
驳回
查看
@@ -190,7 +256,9 @@
v-bind:key="item.id"
@click="chosedept(item)"
>
- {{index+1}}-{{ item.name }}
+ {{ index + 1 }}-{{ item.name }}
@@ -199,10 +267,10 @@
shadow="never"
style="height: 600px; overflow-y: auto; overflow-x: auto"
>
-
- 当前选择
- {{nowdept.name}}
-
+
+ 当前选择
+ {{ nowdept.name }}
+
- {{ scope.row.state }}
- {{ scope.row.state }}
- {{ scope.row.state }}
- {{ scope.row.state }}
+ {{ scope.row.state }}
+ {{ scope.row.state }}
+ {{ scope.row.state }}
+ {{
+ scope.row.state
+ }}
- {{ scope.row.up_user }}/{{ scope.row.up_date }}{{ scope.row.up_user }}/{{ scope.row.up_date }}
-
-
-
+
-
+
编辑
上报
确认
驳回
查看
@@ -302,7 +397,12 @@
>
-
+
{
this.contents = res.data;
this.listLoading = true;
- this.nowcontent = {id:this.contents[0].id, name:this.contents[0].name}
+ this.nowcontent = {
+ id: this.contents[0].id,
+ name: this.contents[0].name,
+ };
getRecordList({
pageoff: true,
content: this.contents[0].id,
@@ -404,11 +507,11 @@ export default {
});
},
chosecontent(item) {
- this.nowcontent = item
+ this.nowcontent = item;
var data = {
pageoff: true,
task: this.task.id,
- content:item.id
+ content: item.id,
};
this.listLoading = true;
getRecordList(data).then((res) => {
@@ -417,11 +520,11 @@ export default {
});
},
chosedept(item) {
- this.nowdept = item
+ this.nowdept = item;
var data = {
pageoff: true,
task: this.task.id,
- belong_dept:item.id
+ belong_dept: item.id,
};
this.listLoading = true;
getRecordList(data).then((res) => {
@@ -429,17 +532,17 @@ export default {
this.recordList2 = res.data;
});
},
- handleRecord(data){
+ handleRecord(data) {
this.data = data;
this.drawer = true;
},
handleDo(data) {
this.drawer = false;
- this.gettask()
- if(this.activeName == 'contenttab'){
- this.chosecontent(this.nowcontent)
- }else if(this.activeName == 'depttab'){
- this.chosedept(this.nowdept)
+ this.gettask();
+ if (this.activeName == "contenttab") {
+ this.chosecontent(this.nowcontent);
+ } else if (this.activeName == "depttab") {
+ this.chosedept(this.nowdept);
}
},
},
diff --git a/server/apps/supervision/views.py b/server/apps/supervision/views.py
index 6809e82..ad01b68 100644
--- a/server/apps/supervision/views.py
+++ b/server/apps/supervision/views.py
@@ -154,11 +154,10 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
obj = self.get_object()
if obj.state in ['待整改','待上报']:
if 'files' in request.data and len(request.data['files'])==0:
- if request.data.get('noteb', None):
- if request.data.get('is_yes', True):
- return Response('请选择不适用', status=status.HTTP_400_BAD_REQUEST)
+ if request.data.get('noteb', None) and request.data.get('is_yes', True):
+ pass
else:
- return Response('请上传文件或填写备注', status=status.HTTP_400_BAD_REQUEST)
+ return Response('请上传文件或选择不适用并填写上报说明', status=status.HTTP_400_BAD_REQUEST)
obj.is_yes = request.data.get('is_yes')
obj.files.clear()
obj.files.add(*request.data['files'])