xiatian vor 11 Monaten
Ursprung
Commit
69c2535af4
1 geänderte Dateien mit 135 neuen und 1 gelöschten Zeilen
  1. 135 1
      src/modules/marking/views/MarkPaperCheck.vue

+ 135 - 1
src/modules/marking/views/MarkPaperCheck.vue

@@ -165,6 +165,14 @@
             @click="bachBackRefresh"
             >打回
           </el-button>
+          <el-button
+            type="danger"
+            icon="el-icon-arrow-left"
+            size="mini"
+            :disabled="noBatchSelected"
+            @click="openBatchAudit"
+            >违纪审核
+          </el-button>
           <el-button
             type="primary"
             size="mini"
@@ -241,7 +249,7 @@
                 </el-popover>
               </template>
             </el-table-column>
-            <el-table-column fixed="right" label="操作" width="180">
+            <el-table-column fixed="right" label="操作" width="300">
               <template slot-scope="scope">
                 <el-button
                   type="primary"
@@ -258,6 +266,13 @@
                   @click="backRefresh(scope.row)"
                   >打回</el-button
                 >
+                <el-button
+                  type="danger"
+                  icon="el-icon-arrow-left"
+                  size="mini"
+                  @click="openAudit(scope.row.examRecordDataId)"
+                  >违纪审核
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -288,6 +303,53 @@
         v-html="imgHtml"
       ></div>
     </el-dialog>
+
+    <el-dialog
+      title="违纪审核"
+      width="400px"
+      :visible.sync="dialogFormVisible"
+      @closed="auditDialogClosed"
+    >
+      <el-form ref="auditForm" :model="auditForm">
+        <el-form-item
+          label="违纪类型"
+          prop="illegallyTypeId"
+          :rules="[
+            { required: true, message: '请选择违纪类型', trigger: 'change' },
+          ]"
+        >
+          <el-select
+            v-model="auditForm.illegallyTypeId"
+            filterable
+            remote
+            :remote-method="getDisciplineTypeList"
+            clearable
+            placeholder="请选择"
+            size="small"
+            @clear="getDisciplineTypeList"
+          >
+            <el-option
+              v-for="item in disciplineTypeList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="详情描述" style="margin-top: 15px">
+          <el-input
+            v-model="auditForm.disciplineDetail"
+            type="textarea"
+            :autosize="{ minRows: 3, maxRows: 5 }"
+            placeholder="请输入内容"
+          ></el-input>
+        </el-form-item>
+        <div class="dialog-footer margin-top-10 text-center">
+          <el-button type="primary" @click="doAudit">确 定</el-button>
+          <el-button @click="dialogFormVisible = false">取 消</el-button>
+        </div>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 
@@ -317,6 +379,12 @@ export default {
         examRecordDataId: "",
         identityNumber: "",
       },
+      auditForm: {
+        examRecordDataIds: [],
+        illegallyTypeId: null,
+        disciplineDetail: "",
+        isPass: false,
+      },
       orgList: [],
       courseList: [],
       specialtyList: [],
@@ -332,6 +400,8 @@ export default {
       markWorkList: [],
       imgHtml: "",
       imageDialog: false,
+      disciplineTypeList: [],
+      dialogFormVisible: false,
     };
   },
   computed: {
@@ -360,6 +430,7 @@ export default {
   },
   created() {
     //查询标记卷
+    this.getDisciplineTypeList("");
     this.getTags();
     this.getMarkWorks();
     this.operaQuery();
@@ -368,6 +439,67 @@ export default {
     window.viewPicture = this.viewPicture;
   },
   methods: {
+    auditDialogClosed() {
+      this.$refs["auditForm"].resetFields();
+    },
+    openAudit(dataId) {
+      var dataIds = [];
+      dataIds.push(dataId);
+      this.dialogFormVisible = true;
+      this.auditForm = {
+        examRecordDataIds: dataIds,
+        illegallyTypeId: null,
+        disciplineDetail: "",
+        isPass: false,
+      };
+    },
+    openBatchAudit() {
+      this.dialogFormVisible = true;
+      this.auditForm = {
+        examRecordDataIds: this.auditForm.examRecordDataIds,
+        illegallyTypeId: null,
+        disciplineDetail: "",
+        isPass: false,
+      };
+    },
+    doAudit() {
+      this.$refs["auditForm"].validate((valid) => {
+        if (valid) {
+          this.$confirm("确定执行?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            var param = new URLSearchParams(this.auditForm);
+            this.$http
+              .post("/api/ecs_oe_admin/exam/audit/batch/audit", param)
+              .then(() => {
+                this.$notify({
+                  title: "成功",
+                  message: "操作成功",
+                  type: "success",
+                  duration: 5000,
+                });
+                this.dialogFormVisible = false;
+              });
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+    getDisciplineTypeList(name) {
+      if (!name) {
+        name = "";
+      }
+      this.$http
+        .get("/api/ecs_oe_admin/illegallyType/queryByNameLike", {
+          params: { name, queryScope: "audit" },
+        })
+        .then((response) => {
+          this.disciplineTypeList = response.data;
+        });
+    },
     exportData() {
       if (!this.formSearch.workId) {
         this.$notify({
@@ -414,8 +546,10 @@ export default {
     },
     selectChange(rows) {
       this.selectedIds = [];
+      this.auditForm.examRecordDataIds = [];
       rows.forEach((element) => {
         this.selectedIds.push(element.id);
+        this.auditForm.examRecordDataIds.push(element.examRecordDataId);
       });
     },
     viewPicture(imagesClass, index) {