diff --git a/client/src/views/exam/index.vue b/client/src/views/exam/index.vue index ec60138..db4e268 100644 --- a/client/src/views/exam/index.vue +++ b/client/src/views/exam/index.vue @@ -23,7 +23,7 @@ fit v-loading="listLoading" highlight-current-row - max-height="600" + max-height="700" row-key="id" default-expand-all > @@ -32,8 +32,7 @@ @@ -239,10 +238,7 @@ data() { return { selects:[], - exam: { - id: "", - name: "", - }, + exam: defaultexam, // has_certificate:'true', courseOptions:[], depOptions:[], diff --git a/client/src/views/exam/testPaper.vue b/client/src/views/exam/testPaper.vue index 052538c..07f0d3d 100644 --- a/client/src/views/exam/testPaper.vue +++ b/client/src/views/exam/testPaper.vue @@ -33,9 +33,6 @@ - diff --git a/client/src/views/supervisionNew/mytask.vue b/client/src/views/supervisionNew/mytask.vue index 4f9a08a..933733e 100644 --- a/client/src/views/supervisionNew/mytask.vue +++ b/client/src/views/supervisionNew/mytask.vue @@ -89,14 +89,12 @@ - @@ -795,12 +793,18 @@ import saveoinDialog from "./oinspect_form.vue"; import FileSaver from "file-saver"; import * as XLSX from "xlsx"; + import user from "@/store/modules/user"; const defaulttask = { year: "", cycle: "", type: 10, }; + const listQuery = { + page: 1, + belong_dept:null, + page_size: 20, + }; export default { components:{Pagination,savercDialog,saveptDialog, saveriskDialog,savecomDialog,saveoinDialog}, @@ -837,11 +841,7 @@ results:[], count:0, }, - listQuery:{ - page: 1, - belong_dept:null, - page_size: 20, - }, + listQuery:listQuery, rc2ListQuery:{ page: 1, page_size: 20, @@ -954,7 +954,6 @@ type: "warning", }).then(() => { let ids = this.sels.map((item) => item.id); - console.log("ids",ids); this.deleteItems(type, ids); this.getList()}); } @@ -1008,8 +1007,6 @@ }, getList(){ this.listLoading = true; - this.dataList.results =[]; - this.dataList.count =0; getMyTask2Do(this.listQuery).then((response) => { if (response.data) { this.dataList = response.data; diff --git a/server/apps/information/serializers.py b/server/apps/information/serializers.py index 5b608b8..59158ce 100644 --- a/server/apps/information/serializers.py +++ b/server/apps/information/serializers.py @@ -41,6 +41,9 @@ class Qualification2Serializer(serializers.ModelSerializer): fields = ["id","name","company_name","quali_type","org","org_date","expiration_date","number","scope"] def create(self, validated_data): + data = Organization.objects.filter(name = validated_data.get("company_name")) + if not data: + raise serializers.ValidationError("公司名称不存在") validated_data["belong_dept_id"] = Organization.objects.filter(name = validated_data.get("company_name")).first().id return super().create(validated_data)