123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <template>
- <div class="app-container">
- <evaluation-title
- :title="routeParams.evaluationName + '/选择班级'"
- :navBackButton="true"
- ></evaluation-title>
- <form-search
- :withoutSearchButton="true"
- :searchformShow="{ class: '', clbum: '' }"
- @change="handleQuery"
- @handleQuery="handleQuery"
- @resetQuery="resetQuery"
- ></form-search>
- <el-row :gutter="10">
- <el-col
- class="evaluation-card-wrapper"
- v-for="item in dataList"
- :key="item.evaluationClassId"
- :xs="12"
- :sm="8"
- :md="8"
- :lg="6"
- :xl="6"
- >
- <evaluation-card
- @click.native="detail(item)"
- :title="item.name"
- :subTitle="item.subjectName"
- :thirdTitle="item.className"
- :stateOptions="mxGlobal.MergeEvalInspectionStates(item.stateStr)"
- :state="item.stateStr"
- :proportion="`${item.valid}/${item.total}`"
- ></evaluation-card>
- </el-col>
- </el-row>
- <pagination
- v-show="total > queryParams.pageSize"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- :page-size="20"
- @pagination="getList"
- />
- <evaluation-empty v-if="total == 0" />
- </div>
- </template>
- <script>
- import { getEvaluationForTeacher } from "@/api/webApi/studentEvaluating";
- import Treeselect from "@riophae/vue-treeselect";
- import "@riophae/vue-treeselect/dist/vue-treeselect.css";
- import IconSelect from "@/components/IconSelect";
- export default {
- name: "Menu",
- components: { Treeselect, IconSelect },
- data() {
- return {
- total: 0,
- // 遮罩层
- loading: true,
- // 多级传递参数
- routeParams: {},
- // 查询参数
- queryParams: {
- classId: "",
- catalogId: "",
- evaluationId: "",
- pageNum: 1,
- pageSize: 20,
- },
- evaluationName: "",
- dataList: [],
- };
- },
- created() {
- this.routeParams = this.$route.query;
- this.queryParams = { ...this.queryParams, ...this.$route.query };
- delete this.queryParams.evaluationName;
- this.handleQuery({});
- },
- methods: {
- detail(item) {
- this.$router.push({
- path: "/accurateTeaching/evaluating/inspection/student",
- query: { ...this.routeParams, evaluationClassId: item.evaluationClassId, className: item.className },
- });
- },
- // 选择图标
- selected(name) {
- this.form.icon = name;
- },
- /** 测评列表 */
- getList() {
- this.loading = true;
- getEvaluationForTeacher(this.queryParams)
- .then((response) => {
- this.dataList = response.rows;
- this.total = response.total;
- this.loading = false;
- })
- .catch((err) => {
- this.loading = false;
- });
- },
- // 表单重置
- reset() {
- this.form = {};
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery(data = {}) {
- this.queryParams.pageNum = 1;
- this.queryParams.classId = data.clbum;
- this.queryParams.gradeId = data.gradeid;
- this.queryParams.subjectId = data.userSubject;
- this.queryParams.termId = data.semester;
- this.queryParams.typeId = data.exam;
- this.getList();
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- },
- /** 重置按钮操作 */
- resetQuery() {
- // this.resetForm("queryForm");
- // this.handleQuery();
- this.queryParams = {
- pageNum: 1,
- pageSize: 20,
- };
- this.handleQuery();
- },
- },
- };
- </script>
|