fix:日常监督分页问题 和考试
This commit is contained in:
parent
b528d02580
commit
bde49e291a
|
@ -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 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="考试试卷">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.paper_.name }}
|
||||
<!-- <text v-if="scope.row.paper_">{{scope.row.paper_.name }}</text> -->
|
||||
<span v-if="scope.row.paper_">{{scope.row.paper_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考试地点">
|
||||
|
@ -239,10 +238,7 @@
|
|||
data() {
|
||||
return {
|
||||
selects:[],
|
||||
exam: {
|
||||
id: "",
|
||||
name: "",
|
||||
},
|
||||
exam: defaultexam,
|
||||
// has_certificate:'true',
|
||||
courseOptions:[],
|
||||
depOptions:[],
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
<el-table-column align="left" label="名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="left" label="工作类别">
|
||||
<template slot-scope="scope">{{ scope.row.workscope_name }}</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="left" label="总分">
|
||||
<template slot-scope="scope">{{ scope.row.total_score }}</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -89,14 +89,12 @@
|
|||
<el-table-column label="应提交" prop="count_all" align="center"></el-table-column>
|
||||
<el-table-column label="已提交" prop="count_up" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
style="position:absolute;bottom:10px"
|
||||
v-show="dataList.count > 0"
|
||||
:background = false
|
||||
:total="dataList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
<pagination
|
||||
v-show="dataList.count > 0"
|
||||
:total="dataList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue