|
@@ -14,19 +14,19 @@
|
|
|
<el-input
|
|
|
v-model="formSearch.name"
|
|
|
placeholder="评卷工作名称"
|
|
|
- @keyup.native="searchMarkWork"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <span>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="addMarkWorkModal"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
- </span>
|
|
|
+ <el-button size="small" type="primary" @click="search"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="addMarkWorkModal"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="block-seperator"></div>
|
|
@@ -442,19 +442,32 @@ export default {
|
|
|
//this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ search() {
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.initMarkWorkData();
|
|
|
+ },
|
|
|
initMarkWorkData() {
|
|
|
var orgId = this.user.rootOrgId;
|
|
|
this.loading = true;
|
|
|
this.$http
|
|
|
- .get(MARKING_LOGIC_API + "/markWorks?orgId=" + orgId)
|
|
|
+ .get(
|
|
|
+ MARKING_LOGIC_API +
|
|
|
+ "/markWorks?orgId=" +
|
|
|
+ orgId +
|
|
|
+ `&pageNumber=${this.currentPage - 1}&pageSize=${
|
|
|
+ this.pageSize
|
|
|
+ }&name=${this.formSearch.name}`
|
|
|
+ )
|
|
|
.then((response) => {
|
|
|
console.log(response);
|
|
|
- this.totalTableData = response.data;
|
|
|
- this.total = response.data.length;
|
|
|
- this.filterMarkWork();
|
|
|
- this.paging();
|
|
|
+ // this.totalTableData = response.data;
|
|
|
+ this.tableData = response.data?.content || [];
|
|
|
+ // this.total = response.data.length;
|
|
|
+ this.total = response.data?.totalElements;
|
|
|
+ // this.filterMarkWork();
|
|
|
+ // this.paging();
|
|
|
this.loading = false;
|
|
|
- this.getWorkStatus();
|
|
|
+ // this.getWorkStatus();
|
|
|
});
|
|
|
},
|
|
|
getWorkStatus() {
|
|
@@ -505,17 +518,17 @@ export default {
|
|
|
this.total = tempData.length;
|
|
|
},
|
|
|
paging() {
|
|
|
- var start = (this.currentPage - 1) * this.pageSize;
|
|
|
- var end =
|
|
|
- this.currentPage * this.pageSize < this.total
|
|
|
- ? this.currentPage * this.pageSize
|
|
|
- : this.total;
|
|
|
- var tempData = [];
|
|
|
- console.log(`当前页: ${this.currentPage},开始:${start},结束:${end}`);
|
|
|
- for (let i = start; i < end; i++) {
|
|
|
- tempData.push(this.tableData[i]);
|
|
|
- }
|
|
|
- this.tableData = tempData;
|
|
|
+ // var start = (this.currentPage - 1) * this.pageSize;
|
|
|
+ // var end =
|
|
|
+ // this.currentPage * this.pageSize < this.total
|
|
|
+ // ? this.currentPage * this.pageSize
|
|
|
+ // : this.total;
|
|
|
+ // var tempData = [];
|
|
|
+ // console.log(`当前页: ${this.currentPage},开始:${start},结束:${end}`);
|
|
|
+ // for (let i = start; i < end; i++) {
|
|
|
+ // tempData.push(this.tableData[i]);
|
|
|
+ // }
|
|
|
+ // this.tableData = tempData;
|
|
|
},
|
|
|
openModal() {
|
|
|
console.log("open");
|
|
@@ -773,14 +786,16 @@ export default {
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentPage = val;
|
|
|
- this.filterMarkWork();
|
|
|
- this.paging();
|
|
|
+ this.initMarkWorkData();
|
|
|
+ // this.filterMarkWork();
|
|
|
+ // this.paging();
|
|
|
//this.searchMarkWork()
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
this.pageSize = val;
|
|
|
- this.filterMarkWork();
|
|
|
- this.paging();
|
|
|
+ this.initMarkWorkData();
|
|
|
+ // this.filterMarkWork();
|
|
|
+ // this.paging();
|
|
|
},
|
|
|
},
|
|
|
};
|