From 81e1b297b1fabec596c1cb7187ce2d6199026429 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 30 Nov 2023 16:51:10 +0800
Subject: [PATCH] 模拟考试成绩查询
---
src/views/people/expression.vue | 398 ++++++++------------------------------------------------
1 files changed, 58 insertions(+), 340 deletions(-)
diff --git a/src/views/people/expression.vue b/src/views/people/expression.vue
index 0b173bc..ae41894 100644
--- a/src/views/people/expression.vue
+++ b/src/views/people/expression.vue
@@ -1,142 +1,45 @@
-/**
-*liu
-**/
-
-
+/** *liu **/
<template>
- <div class="dispatchChildoperable">
- <!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs> -->
- <!-- <span v-if="typeTABS.prop === 'tab1'"> -->
- <!-- <avue-crud
- :option="option"
- :data="data"
- :page.sync="page"
- ref="crudrec"
- @on-load="onLoad"
- :table-loading="loading"
- @row-save="rowSave"
- @search-change="searchChange"
- @search-reset="searchReset"
- @row-update="rowUpdate"
- @row-del="rowDel"
- @selection-change="selectionChange"
- @refresh-change="refreshChange"
- >
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete"
- >删 除
- </el-button>
- </template>
- </avue-crud> -->
- <!-- <avue-form ref="form" v-model="obj0" :option="option0"> -->
- <!-- <template slot-scope="scope" slot="menuForm">
- <el-button @click="tip">自定义按钮</el-button>
- </template> -->
- <!-- </avue-form>
- </span>
- <span v-else-if="typeTABS.prop === 'tab2'"> -->
+ <basic-container
+ :class="[
+ 'dispatchChildoperable',
+ $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+ ]"
+ >
<avue-crud
+ class="tablesss"
:option="option1"
:data="data1"
:page.sync="page1"
- ref="crudrec1"
- :table-loading="loading1"
@row-save="rowSave1"
- @search-change="searchChange1"
- @search-reset="searchReset1"
@row-update="rowUpdate1"
@row-del="rowDel1"
- @selection-change="selectionChange1"
- @refresh-change="refreshChange1"
+ :table-loading="loading1"
+ @current-change="CurrentChange1"
+ @size-change="SizeChange1"
+ @refresh-change="refreshChange"
+ @on-load="onLoad1"
>
- <!-- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete1"
- >删 除
- </el-button>
- </template> -->
</avue-crud>
- <!-- </span> -->
- <!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> -->
- </div>
-</template>
+ </basic-container>
+</template>
<script>
// import { column, column1 } from "./data";
import {
securityBaseInfoColumn,
practitionersColumn,
- trackRecordColumn,
+ trackRecordColumn
} from "./data";
import { getUserPractitionersInfo } from "@/api/system/user";
-import { add, update, page, remove } from "@/api/performance/performance";
import { mapGetters } from "vuex";
+import { add, update, getpage, remove } from "@/api/performance/performance";
export default {
data() {
let baseUrl = "https://cli.avuejs.com/api/area";
return {
- // typeTABS: {}, //标签页
- // optionTABS: {
- // column: [
- // {
- // // icon: "el-icon-info",
- // label: "派遣服务公司详情",
- // prop: "tab1",
- // },
- // {
- // // icon: "el-icon-info",
- // label: "派遣记录",
- // prop: "tab2",
- // },
- // // {
- // // icon: "el-icon-info",
- // // label: "选项卡3",
- // // prop: "tab3",
- // // },
- // ],
- // },
-
- // id: "", //记录归属id
- // //基本信息
- // //保安单位信息表单
- // obj0: {
- // // title: "我是头部标题",
- // },
- // option0: {
- // emptyBtn: false,
- // submitBtn: false,
- // gutter: 30,
- // column: column,
- // },
- // loading: true, //派遣服务公司登记
- // selectionList: [],
- // page: {
- // pageSize: 10,
- // currentPage: 1,
- // total: 0,
- // },
- // query: {},
- // data: [],
- // option: {
- // card: true,
- // searchSize: "mini",
- // searchMenuSpan: 6,
- // height: 547,
- // menuWidth: 160,
- // align: "center",
- // selection: true,
- // column: column,
- // },
deptCategory: "",
deptId: "",
@@ -146,17 +49,19 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize
},
query1: {},
data1: [],
option1: {
card: true,
- menu: false,
+ // menu: false,
addBtn: false,
height: "auto",
widtd: "auto",
calcHeight: 54,
- border: false,
+ indexLabel: "序号",
+ border: true, //liu
stripe: true,
tip: false,
index: true,
@@ -164,197 +69,42 @@
headerAlign: "center",
align: "center",
column: trackRecordColumn,
- },
+ ...this.$store.state.control.clearOtherBut
+ }
};
},
computed: {
...mapGetters(["userInfo"]),
- // ids() {
- // let ids = [];
- // this.selectionList.forEach((ele) => {
- // ids.push(ele.id);
- // });
- // return ids.join(",");
- // },
+
ids1() {
let ids1 = [];
- this.selectionList1.forEach((ele) => {
+ this.selectionList1.forEach(ele => {
ids1.push(ele.id);
});
return ids1.join(",");
- },
+ }
},
methods: {
- handleChangeTABS(column) {
- this.typeTABS = column;
- if (column.prop == "tab1") {
- this.loading1 = false;
- // this.onLoad(this.page);
- } else if (column.prop == "tab2") {
- // this.loading = false;
- console.log(document.getElementsByClassName("el-card__body")[0]);
- this.onLoad1(this.page1); //第二个表格不会自动执行
- }
- // this.$message.success(JSON.stringify(column));
- },
- //派遣服务公司登记
- // sizeChange(val) {
- // this.page1.currentPage = 1;
- // this.page1.pageSize = val;
- // // this.getData();
- // this.onLoad(this.page, this.query);
- // // this.$message.success("行数" + val);
- // },
- // currentChange(val) {
- // this.page1.currentPage = val;
- // // this.getData();
- // this.onLoad(this.page, this.query);
- // // this.$message.success("页码" + val);
- // },
- // rowSave(form, done, loading) {
- // var that = this;
- // var form = this.data[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
- // adddata(form).then(
- // (res) => {
- // this.onLoad(this.page);
- // this.$message({
- // type: "success",
- // message: "操作成功!",
- // });
- // done();
- // },
- // (error) => {
- // window.console.log(error);
- // loading();
- // }
- // );
- // }
- // },
- // searchChange(params, done) {
- // this.query = params;
- // this.page.currentPage = 1;
- // this.onLoad(this.page, params);
- // done();
- // },
- // searchReset() {
- // this.query = {};
- // this.onLoad(this.page);
- // },
- // rowUpdate(row, index, done, loading) {
- // console.log(row);
- // update(row).then(
- // () => {
- // this.onLoad(this.page);
- // this.$message({
- // type: "success",
- // message: "操作成功!",
- // });
- // done();
- // },
- // (error) => {
- // window.console.log(error);
- // loading();
- // }
- // );
- // },
- // rowDel(row) {
- // this.$confirm("确定将选择数据删除?", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning",
- // })
- // .then(() => {
- // return remove(row.id);
- // })
- // .then(() => {
- // this.onLoad(this.page);
- // this.$message({
- // type: "success",
- // message: "操作成功!",
- // });
- // });
- // },
- // selectionChange(list) {
- // this.selectionList = list;
- // },
- // handleDelete() {
- // if (this.selectionList.length === 0) {
- // this.$message.warning("请选择至少一条数据");
- // return;
- // }
- // this.$confirm("确定将选择数据删除?", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning",
- // })
- // .then(() => {
- // return remove(this.ids);
- // })
- // .then(() => {
- // this.onLoad(this.page);
- // this.$message({
- // type: "success",
- // message: "操作成功!",
- // });
- // this.$refs.crudrec.toggleSelection();
- // });
- // },
- // refreshChange() {
- // this.onLoad(this.page, this.query);
- // },
- // onLoad(page, params = {}) {
- // this.loading = true;
- // getdata(
- // page.currentPage,
- // page.pageSize,
- // Object.assign(params, this.query)
- // ).then((res) => {
- // // console.log(res);
- // const data = res.data.data;
- // this.page.total = data.total;
- // this.data = data.records;
- // console.log(this.data);
- // this.loading = false;
- // });
- // },
- //派遣服务公司登记
-
- //派遣记录
sizeChange1(val) {
this.page1.currentPage = 1;
this.page1.pageSize = val;
- // this.getData();
- this.onLoad1(this.page1, this.query1);
- // this.$message.success("行数" + val);
+ this.refreshChange();
},
currentChange1(val) {
this.page1.currentPage = val;
- // this.getData();
- this.onLoad1(this.page1, this.query1);
- // this.$message.success("页码" + val);
+ this.refreshChange();
},
rowSave1(form, done, loading) {
- // var that = this;
- // var form = this.data1[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
- // form["deptId"] = form.tenantName;
- // form["tenantName"] = form.$tenantName;
- // form["dispatcherUnitId"] = this.id;
- // console.log(form);
-
adddata1(form).then(
- (res) => {
+ res => {
this.onLoad1(this.page1);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -364,7 +114,7 @@
searchChange1(params, done) {
this.query1 = params;
this.page1.currentPage = 1;
- this.onLoad1(this.page1, params);
+ this.refreshChange();
done();
},
searchReset1() {
@@ -372,20 +122,16 @@
this.onLoad1(this.page1);
},
rowUpdate1(row, index, done, loading) {
- // row["deptId"] = row.tenantName;
- // row["tenantName"] = row.$tenantName;
- // row["dispatcherUnitId"] = this.id;
- // console.log(row, "row");
update1(row).then(
() => {
this.onLoad1(this.page1);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -395,7 +141,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove1(row.id);
@@ -404,7 +150,7 @@
this.onLoad1(this.page1);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -421,7 +167,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove1(this.ids1);
@@ -430,13 +176,12 @@
this.onLoad1(this.page1);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
this.$refs.crudrec1.toggleSelection();
});
},
- refreshChange1() {
- // console.log(4534)
+ refreshChange() {
this.onLoad1(this.page1, this.query1);
},
@@ -461,54 +206,27 @@
return "";
},
//
- onLoad1(page, params = {}) {
+ onLoad1(page1, params = {}) {
this.loading1 = true;
- // params["cardid"] = this.cardid;
- // params["name"] = this.name;
- // params["dispatcherCompany"] = this.dispatcherCompany;
- // params["dispatcherUnitId"] = this.id;
- // console.log(params, "get");
- // console.log(page);
- // var values;
- // const { releaseTimeRange } = this.query1;
- // if (releaseTimeRange) {
- // values = {
- // ...params,
- // beginTime: releaseTimeRange[0],
- // overTime: releaseTimeRange[1],
- // ...this.query,
- // };
- // values.releaseTimeRange = null;
- // } else {
- // values = {
- // ...params,
- // ...this.query,
- // };
- // }
+
var cardid = this.userInfo.user_id;
- console.log(this.userInfo, "111111111111");
- getPerformancePageInfo(cardid).then((res) => {
- // // page.currentPage,
- // // page.pageSize,
- // // Object.assign(params, this.query)
- // // values
- console.log(res);
- // const data = res.data.data;
- // this.page1.total = data.total;
- // this.data1 = data.records;
- // console.log(this.data1, 1);
- // this.loading1 = false;
+
+ params = {
+ ...params,
+ securityid: cardid
+ };
+ getpage(page1.currentPage, page1.pageSize, params).then(res2 => {
+ const data = res2.data.data;
+ this.page1.total = data.total;
+ this.data1 = data.records;
+ // console.log(this.data1, 1);
+ this.$store.commit("setWindowSizeHeightAdd");
+ this.loading1 = false;
});
- },
- //派遣记录
- // saveLock(name, val) {
- // localStorage.setItem(name, val);
- // },
- // readLock(name) {
- // return localStorage.getItem(name);
- // },
+ }
},
mounted() {
+ this.$store.commit("setWindowSizeHeightAdd");
this.onLoad1(this.page1, this.query1);
//去掉缓存
// this.typeTABS = this.optionTABS.column[0];
@@ -543,7 +261,7 @@
// // console.log("no");
// this.obj0.name = " 未选择派遣单位";
// }
- },
+ }
};
</script>
@@ -557,4 +275,4 @@
.el-collapse-item {
padding-top: 15px !important;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3