123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532 |
- <template>
- <div>
- <section class="content">
- <div class="box box-info">
- <div class="box-body">
- <el-form
- :inline="true"
- :model="formSearch"
- ref="formSearch"
- label-width="70px"
- >
- <el-form-item label="评卷名称" prop="workId">
- <el-select
- clearable
- filterable
- class="input"
- v-model="formSearch.workId"
- placeholder="请选择"
- style="width:150px;"
- @change="changeMarkWork"
- >
- <el-option
- v-for="item in markWorkSelect"
- :label="item.markName"
- :value="item.workId"
- :key="item.workId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="学习中心" prop="orgCode">
- <el-select
- :remote-method="getOrgs"
- remote
- :loading="getOrgsSearchLoading"
- class="input"
- clearable
- v-model="formSearch.orgCode"
- placeholder="请选择"
- filterable
- style="width:150px;"
- @focus="e => getOrgs(e.target.value)"
- >
- <el-option
- v-for="item in orgList"
- :label="item.name"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="姓名" prop="studentName">
- <el-input
- placeholder="请输入姓名"
- v-model="formSearch.studentName"
- style="width:150px;"
- ></el-input>
- </el-form-item>
- <el-form-item label="学号" prop="studentCode">
- <el-input
- placeholder="请输入学号"
- v-model="formSearch.studentCode"
- style="width:150px;"
- ></el-input>
- </el-form-item>
- <el-form-item label="标记卷" prop="tag">
- <el-select
- clearable
- v-model="formSearch.tag"
- placeholder="请选择"
- filterable
- style="width:150px;"
- >
- <el-option
- v-for="item in tags"
- :label="item.name"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="课程" prop="courseCode">
- <el-select
- clearable
- @change="getUserList"
- filterable
- class="input"
- v-model="formSearch.courseCode"
- placeholder="请选择"
- style="width:150px;"
- >
- <el-option
- v-for="item in courseAllListSelect"
- :label="item.courseInfo"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="评委" prop="userId">
- <el-select
- clearable
- class="input"
- filterable
- v-model="formSearch.userId"
- placeholder="请选择"
- style="width:150px;"
- >
- <el-option
- v-for="item in userList"
- :label="item.name"
- :value="item.userId"
- :key="item.userId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="评卷备注" prop="markRemark">
- <el-input
- placeholder="请输入备注"
- v-model="formSearch.markRemark"
- style="width:150px;"
- ></el-input>
- </el-form-item>
- <div></div>
- <el-form-item>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-search"
- @click="searchMarkPaperCheck"
- >查询</el-button
- >
- <el-button
- @click="resetForm()"
- size="small"
- icon="el-icon-refresh"
- >重置</el-button
- >
- </el-form-item>
- </el-form>
- <div class="block-seperator"></div>
- <!-- 页面列表 -->
- <el-table
- stripe
- v-loading="loading"
- element-loading-text="拼命加载中"
- :data="tableData"
- border
- style="width: 100%"
- >
- <el-table-column label="学习中心" width="150" prop="orgName" />
- <el-table-column
- label="学号"
- width="120"
- prop="studentCode"
- sortable
- />
- <el-table-column label="姓名" width="120" prop="studentName" />
- <el-table-column
- label="课程代码"
- width="120"
- prop="courseCode"
- sortable
- />
- <el-table-column label="课程" width="120" prop="courseName" />
- <el-table-column label="试卷类型" width="120" prop="paperType" />
- <el-table-column label="评卷员" width="120" prop="userName" />
- <el-table-column label="主观总分" width="120" prop="score" />
- <el-table-column
- label="客观总分"
- width="120"
- prop="objectiveScore"
- sortable
- />
- <el-table-column
- label="卷面总分"
- width="120"
- prop="totalScore"
- sortable
- />
- <el-table-column label="标记卷" width="120">
- <template slot-scope="scope">
- <div>
- <span>{{ scope.row.tag | tagFilter }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="评卷备注" width="120">
- <template slot-scope="scope">
- <el-popover trigger="hover" name="text" placement="top">
- <div style="width:200px;">{{ scope.row.markRemark }}</div>
- <div slot="reference">
- <span>{{ interceptStr(scope.row.markRemark) }}</span>
- </div>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="180">
- <template slot-scope="scope">
- <el-button
- @click="viewPaper(scope.row)"
- type="primary"
- size="mini"
- icon="el-icon-view"
- plain
- >原卷</el-button
- >
- <el-button
- @click="backRefresh(scope.row)"
- type="danger"
- icon="el-icon-arrow-left"
- size="mini"
- >打回</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div class="page pull-right">
- <el-pagination
- v-if="paginationShow"
- @current-change="handleCurrentChange"
- @size-change="handleSizeChange"
- :current-page="currentPage"
- :page-size="pageSize"
- :page-sizes="[10, 20, 50, 100]"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
- </div>
- </div>
- </section>
- </div>
- </template>
- <script>
- import { mapState } from "vuex";
- import { CORE_API, MARKING_API, DATA_PROCESS_API } from "@/constants/constants";
- export default {
- data() {
- return {
- formSearch: {
- orgCode: "",
- studentName: "",
- studentCode: "",
- tag: "",
- courseCode: "",
- userId: "",
- workId: "",
- markRemark: ""
- },
- orgList: [],
- courseList: [],
- specialtyList: [],
- userList: [],
- tableData: [],
- currentPage: 1,
- pageSize: 10,
- total: 0,
- paginationShow: false,
- examId: "",
- tags: [],
- loading: false,
- examType: "",
- getOrgsSearchLoading: false,
- markWorkList: []
- };
- },
- computed: {
- ...mapState({ user: state => state.user }),
- markWorkSelect() {
- let markWorkNames = [];
- for (let markWork of this.markWorkList) {
- markWorkNames.push({
- workId: markWork.id,
- markName: markWork.name,
- examId: markWork.examId
- });
- }
- return markWorkNames;
- },
- courseAllListSelect() {
- let courseSelect = [];
- for (let course of this.courseList) {
- let courseInfo = course.name + "(" + course.code + ")";
- courseSelect.push({ code: course.code, courseInfo: courseInfo });
- }
- return courseSelect;
- }
- },
- methods: {
- changeMarkWork() {
- if (this.$route.query) {
- this.$router.push({ path: "/marking/mark_paper_check" });
- }
- let obj = {};
- for (let item of this.markWorkList) {
- if (item.id === this.formSearch.workId) {
- obj = item;
- break;
- }
- }
- this.examId = obj.examId;
- this.examType = obj.examType;
- this.getCourses();
- this.formSearch = Object.assign(this.formSearch, {
- orgCode: "",
- studentName: "",
- studentCode: "",
- tag: "",
- courseCode: "",
- userId: "",
- markRemark: ""
- });
- },
- getMarkWorks() {
- this.$http
- .get(DATA_PROCESS_API + "/markWorks?status=1")
- .then(response => {
- this.markWorkList = response.data;
- if (this.$route.query && this.$route.query.workId) {
- this.formSearch.workId = parseInt(this.$route.query.workId);
- }
- });
- },
- //查询学习中心
- getOrgs(name) {
- this.getOrgsSearchLoading = true;
- this.$http.get(CORE_API + "/org/query?name=" + name).then(response => {
- this.getOrgsSearchLoading = false;
- this.orgList = response.data;
- });
- },
- //查询课程
- getCourses() {
- this.$http
- .get(
- MARKING_API +
- "/markResults/queryExamCourseList?workId=" +
- this.formSearch.workId
- )
- .then(response => {
- this.courseList = response.data;
- if (this.$route.query && this.$route.query.courseCode) {
- this.formSearch.courseCode = this.$route.query.courseCode;
- this.getUserList();
- }
- });
- },
- //查询评委
- getUserList() {
- this.$http
- .get(
- DATA_PROCESS_API +
- "/markUsers/assign?workId=" +
- this.formSearch.workId +
- "&courseCode=" +
- this.formSearch.courseCode
- )
- .then(response => {
- this.userList = response.data;
- if (this.$route.query && this.$route.query.userId) {
- this.formSearch.userId = parseInt(this.$route.query.userId);
- }
- });
- },
- //查询标记卷
- getTags() {
- this.$http.get(MARKING_API + "/markResults/tag").then(response => {
- console.log("取到的标记卷:", response);
- this.tags = response.data;
- //移除科目错误
- for (let i = 0; i < this.tags.length; i++) {
- if (this.tags[i].code === "SUBJECT_ERROR") {
- this.tags.splice(i, 1);
- }
- }
- });
- },
- //查询专业
- getSpecialtys() {
- var orgId = this.user.rootOrgId;
- this.$http
- .get(CORE_API + "/specialty/all?orgId=" + orgId)
- .then(response => {
- this.specialtyList = response.data;
- });
- },
- //查询方法
- searchMarkPaperCheck() {
- this.currentPage = 1;
- this.initMarkPaperCheck();
- },
- initMarkPaperCheck() {
- if (!this.formSearch.workId) {
- this.$notify({
- title: "警告",
- message: "请选择评卷名称",
- type: "warning"
- });
- return false;
- }
- this.loading = true;
- var url =
- DATA_PROCESS_API +
- "/markResults/all/" +
- (this.currentPage - 1) +
- "/" +
- this.pageSize;
- this.$http.get(url, { params: this.formSearch }).then(response => {
- console.log("查询的列表集合", response);
- this.tableData = response.data.list;
- this.total = response.data.total;
- this.loading = false;
- this.$router.push({
- path: "/marking/mark_paper_check",
- query: {
- workId: this.formSearch.workId,
- orgCode: this.formSearch.orgCode,
- studentName: this.formSearch.studentName,
- studentCode: this.formSearch.studentCode,
- tag: this.formSearch.tag,
- courseCode: this.formSearch.courseCode,
- userId: this.formSearch.userId,
- markRemark: this.formSearch.markRemark,
- examId: this.examId,
- examType: this.examType,
- currentPage: this.currentPage,
- pageSize: this.pageSize
- }
- });
- this.$nextTick(function() {
- this.paginationShow = true;
- });
- });
- },
- resetForm() {
- this.formSearch = Object.assign(this.formSearch, {
- orgCode: "",
- studentName: "",
- studentCode: "",
- tag: "",
- courseCode: "",
- userId: "",
- workId: "",
- markRemark: ""
- });
- this.tableData = [];
- this.total = 0;
- this.$router.push({ path: "/marking/mark_paper_check" });
- },
- handleCurrentChange(val) {
- this.currentPage = val;
- this.initMarkPaperCheck();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.currentPage = 1;
- this.initMarkPaperCheck();
- },
- //查看原卷
- viewPaper(row) {
- if (this.examType != "OFFLINE") {
- var studentPaperId = row.studentPaper.id;
- console.log("studentPaperId:", studentPaperId);
- var urls =
- "/marking/view_paper/" +
- this.formSearch.workId +
- "/" +
- this.examId +
- "/" +
- studentPaperId +
- "/" +
- this.examType;
- this.$router.push({
- path: urls
- });
- } else {
- var url = row.studentSubjectiveHtml;
- window.open(url);
- }
- },
- //打回
- backRefresh(row) {
- var userId = this.user.userId;
- var url =
- MARKING_API + "/markResults/" + row.id + "/reject?creatorId=" + userId;
- this.$http.post(url).then(response => {
- console.log(response);
- this.searchMarkPaperCheck();
- });
- },
- //字符串截取
- interceptStr(str) {
- if (str) {
- let l = str.length;
- if (l > 3) {
- return str.substring(0, 3) + "...";
- } else {
- return str;
- }
- }
- },
- operaQuery() {
- let formData = this.$route.query;
- if (formData && formData.workId) {
- this.formSearch.workId = formData.workId;
- this.formSearch.orgCode = formData.orgCode;
- this.formSearch.studentName = formData.studentName;
- this.formSearch.studentCode = formData.studentCode;
- this.formSearch.markRemark = formData.markRemark;
- this.formSearch.courseCode = formData.courseCode;
- this.formSearch.userId = formData.userId;
- this.formSearch.tag = formData.tag;
- this.examId = formData.examId;
- this.examType = formData.examType;
- this.currentPage = parseInt(formData.currentPage);
- this.pageSize = parseInt(formData.pageSize);
- this.getCourses();
- this.initMarkPaperCheck();
- }
- }
- },
- created() {
- //查询标记卷
- this.getTags();
- this.getMarkWorks();
- this.operaQuery();
- }
- };
- </script>
|