|
@@ -0,0 +1,1096 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <section class="content">
|
|
|
|
+ <div>
|
|
|
|
+ <!-- 头信息 -->
|
|
|
|
+ <div>
|
|
|
|
+ <h3 class="box-title">题型创建->{{ detailName }}</h3>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 正文信息 -->
|
|
|
|
+ <div class="box-body">
|
|
|
|
+ <el-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ :model="paperUnitForm"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ ref="paperUnitForm"
|
|
|
|
+ label-position="right"
|
|
|
|
+ label-width="90px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="题型结构"
|
|
|
|
+ class="pull-left"
|
|
|
|
+ prop="questionType"
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ @change="getQuesNameList"
|
|
|
|
+ v-model="paperUnitForm.questionType"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in quesTypes"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="题目数量" prop="count">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.number="paperUnitForm.count"
|
|
|
|
+ @change="muli"
|
|
|
|
+ placeholder="请点击"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ @focus="openDialog"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="每题分值" class="pull-left" prop="score">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.number="paperUnitForm.score"
|
|
|
|
+ @change="muli"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="题型总分" class="pull-left" prop="totalScore">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.totalScore"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="来源大题" class="pull-left" prop="quesNames">
|
|
|
|
+ <el-select
|
|
|
|
+ multiple
|
|
|
|
+ v-model="paperUnitForm.quesNames"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in quesNameList"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="pull-right">
|
|
|
|
+ <el-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="submitForm('paperUnitForm');"
|
|
|
|
+ >保 存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="resetForm('paperUnitForm');"
|
|
|
|
+ >重 置</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="caret-left"
|
|
|
|
+ @click="back"
|
|
|
|
+ >返 回</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <!-- 页面列表 -->
|
|
|
|
+ <el-table
|
|
|
|
+ :data="unitStructs"
|
|
|
|
+ border
|
|
|
|
+ style="width: 100%;text-align:center;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="大题名称" width="100">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ detailName }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="题型结构" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ getQuesTypeName(scope.row.questionType) }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="题目总数" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.count }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(简单)" width="130">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.publicSimple }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(中等)" width="130">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.publicMedium }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(困难)" width="130">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.publicDifficulty }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(简单)" width="140">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.noPublicSimple }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(中等)" width="140">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.noPublicMedium }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(困难)" width="140">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.noPublicDifficulty }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="每题分值" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.score }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="题型总分" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ scope.row.totalScore }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="来源大题" width="150">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <span>{{ getQuesNames(scope.row.quesNames) }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="140">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="info"
|
|
|
|
+ @click="openPaperDetailUnitStructDialog(scope.row.id);"
|
|
|
|
+ >
|
|
|
|
+ 编辑
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="deleteUnit(scope.row.id);"
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="小题信息"
|
|
|
|
+ v-model="paperDetailUnitStructDialog"
|
|
|
|
+ size="small"
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ <el-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ :model="paperUnitForm2"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ ref="paperUnitForm2"
|
|
|
|
+ label-position="right"
|
|
|
|
+ label-width="90px"
|
|
|
|
+ >
|
|
|
|
+ <el-row :gutter="45">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="题型结构" prop="questionType">
|
|
|
|
+ <el-select
|
|
|
|
+ @change="getQuesNameList"
|
|
|
|
+ v-model="paperUnitForm2.questionType"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in quesTypes"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="每题分值"
|
|
|
|
+ class="pull-left"
|
|
|
|
+ prop="score"
|
|
|
|
+ >
|
|
|
|
+ <el-input
|
|
|
|
+ v-model.number="paperUnitForm2.score"
|
|
|
|
+ @change="muli2"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="45">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="题型总分" prop="totalScore">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.totalScore"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="来源大题" prop="quesNames">
|
|
|
|
+ <el-select
|
|
|
|
+ multiple
|
|
|
|
+ v-model="paperUnitForm2.quesNames"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in quesNameList"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-table :data="paperUnitForms" border>
|
|
|
|
+ <el-table-column label="公开(简单)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.publicSimple"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.publicSimple,
|
|
|
|
+ 'publicSimple',
|
|
|
|
+ paperUnitForm2
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(中等)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.publicMedium"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.publicMedium,
|
|
|
|
+ 'publicMedium',
|
|
|
|
+ paperUnitForm2
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(困难)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.publicDifficulty"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.publicDifficulty,
|
|
|
|
+ 'publicDifficulty',
|
|
|
|
+ paperUnitForm2
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.publicSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <el-table :data="paperUnitForms" border>
|
|
|
|
+ <el-table-column label="非公开(简单)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="row.noPublicSimple"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.noPublicSimple,
|
|
|
|
+ 'noPublicSimple',
|
|
|
|
+ paperUnitForm2
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(中等)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="row.noPublicMedium"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.noPublicMedium,
|
|
|
|
+ 'noPublicMedium',
|
|
|
|
+ paperUnitForm2
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ :disabled="scope.row.disable"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(困难)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.noPublicDifficulty"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.noPublicDifficulty,
|
|
|
|
+ 'noPublicDifficulty',
|
|
|
|
+ paperUnitForm2
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ :disabled="scope.row.disable"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.noPublicSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <el-table :data="paperUnitForms" border>
|
|
|
|
+ <el-table-column label="简单总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.simpleSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="中等总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.mediumSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="困难总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.difficultySum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm2.count"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <div>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="editSubmitForm('paperUnitForm2');"
|
|
|
|
+ >保 存</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="题目数量" v-model="propertyDialog" size="small">
|
|
|
|
+ <el-table :data="paperUnitForms" border>
|
|
|
|
+ <el-table-column label="公开(简单)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.publicSimple"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.publicSimple,
|
|
|
|
+ 'publicSimple',
|
|
|
|
+ paperUnitForm
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(中等)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.publicMedium"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.publicMedium,
|
|
|
|
+ 'publicMedium',
|
|
|
|
+ paperUnitForm
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开(困难)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.publicDifficulty"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.publicDifficulty,
|
|
|
|
+ 'publicDifficulty',
|
|
|
|
+ paperUnitForm
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="公开总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.publicSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <el-table
|
|
|
|
+ :data="paperUnitForms"
|
|
|
|
+ border
|
|
|
|
+ style="width: 100%;text-align:center;"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="非公开(简单)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.noPublicSimple"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.noPublicSimple,
|
|
|
|
+ 'noPublicSimple',
|
|
|
|
+ paperUnitForm
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(中等)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="row.noPublicMedium"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.noPublicMedium,
|
|
|
|
+ 'noPublicMedium',
|
|
|
|
+ paperUnitForm
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ :disabled="scope.row.disable"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开(困难)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.noPublicDifficulty"
|
|
|
|
+ @change="
|
|
|
|
+ unitCount(
|
|
|
|
+ scope.row,
|
|
|
|
+ scope.row.noPublicDifficulty,
|
|
|
|
+ 'noPublicDifficulty',
|
|
|
|
+ paperUnitForm
|
|
|
|
+ );
|
|
|
|
+ "
|
|
|
|
+ :disabled="scope.row.disable"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="非公开总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.noPublicSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <el-table :data="paperUnitForms" border>
|
|
|
|
+ <el-table-column label="简单总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.simpleSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="中等总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.mediumSum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="困难总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.difficultySum"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="总数">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="paperUnitForm.count"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <div style="margin-top:20px;margin-left:42%">
|
|
|
|
+ <el-button type="primary" @click="saveCount">保 存</el-button>
|
|
|
|
+ <el-button type="primary" icon="caret-left" @click="close"
|
|
|
|
+ >返 回</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { Q_API, QUESTION_TYPES } from "../constants/constants";
|
|
|
|
+import _ from "lodash";
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ var checkIntegerNumber = (rule, value, callback) => {
|
|
|
|
+ if (!value) {
|
|
|
|
+ return callback(new Error("数值不能为空"));
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (!Number.isInteger(value)) {
|
|
|
|
+ callback(new Error("请输入整数"));
|
|
|
|
+ } else {
|
|
|
|
+ if (value < 0) {
|
|
|
|
+ callback(new Error("必须大于0"));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 100);
|
|
|
|
+ };
|
|
|
|
+ var checkDoubleNumber = (rule, value, callback) => {
|
|
|
|
+ //var reg = /^[-\+]?\d+(\.\d+)?$/;
|
|
|
|
+ var reg = /^\d+(?=\.{0,1}\d+$|$)/;
|
|
|
|
+ if (!value) {
|
|
|
|
+ return callback(new Error("数值不能为空"));
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (!reg.test(value)) {
|
|
|
|
+ callback(new Error("请输入数值"));
|
|
|
|
+ } else {
|
|
|
|
+ if (value < 0) {
|
|
|
|
+ callback(new Error("必须大于等于0"));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, 100);
|
|
|
|
+ };
|
|
|
|
+ var validateQuesNames = (rule, value, callback) => {
|
|
|
|
+ if (Array.isArray(value) && value.length == 0) {
|
|
|
|
+ callback(new Error("请选择来源大题"));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ return {
|
|
|
|
+ quesTypes: QUESTION_TYPES,
|
|
|
|
+ courseNo: "",
|
|
|
|
+ quesNameList: [],
|
|
|
|
+ paperUnitForm: {
|
|
|
|
+ id: "",
|
|
|
|
+ questionType: "",
|
|
|
|
+ count: 0,
|
|
|
|
+ score: "",
|
|
|
|
+ totalScore: "",
|
|
|
|
+ quesNames: [],
|
|
|
|
+ publicSimple: 0,
|
|
|
|
+ publicMedium: 0,
|
|
|
|
+ publicDifficulty: 0,
|
|
|
|
+ noPublicSimple: 0,
|
|
|
|
+ noPublicMedium: 0,
|
|
|
|
+ noPublicDifficulty: 0,
|
|
|
|
+ publicSum: 0,
|
|
|
|
+ noPublicSum: 0,
|
|
|
|
+ simpleSum: 0,
|
|
|
|
+ mediumSum: 0,
|
|
|
|
+ difficultySum: 0
|
|
|
|
+ },
|
|
|
|
+ paperUnitForm2: {
|
|
|
|
+ id: "",
|
|
|
|
+ questionType: "",
|
|
|
|
+ count: "",
|
|
|
|
+ score: "",
|
|
|
|
+ totalScore: "",
|
|
|
|
+ quesNames: [],
|
|
|
|
+ publicSimple: 0,
|
|
|
|
+ publicMedium: 0,
|
|
|
|
+ publicDifficulty: 0,
|
|
|
|
+ noPublicSimple: 0,
|
|
|
|
+ noPublicMedium: 0,
|
|
|
|
+ noPublicDifficulty: 0,
|
|
|
|
+ publicSum: 0,
|
|
|
|
+ noPublicSum: 0,
|
|
|
|
+ simpleSum: 0,
|
|
|
|
+ mediumSum: 0,
|
|
|
|
+ difficultySum: 0
|
|
|
|
+ },
|
|
|
|
+ unitId: "",
|
|
|
|
+ detailName: "",
|
|
|
|
+ detailId: "",
|
|
|
|
+ paperStructId: "",
|
|
|
|
+ paperStruct: {},
|
|
|
|
+ unitStructs: [],
|
|
|
|
+ paperUnitForms: [],
|
|
|
|
+ paperDetailUnitStructDialog: false,
|
|
|
|
+ propertyDialog: false,
|
|
|
|
+ rules: {
|
|
|
|
+ questionType: [
|
|
|
|
+ { required: true, message: "题型不能为空", trigger: "change" }
|
|
|
|
+ ],
|
|
|
|
+ count: [
|
|
|
|
+ { validator: checkIntegerNumber, required: true, trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ score: [
|
|
|
|
+ { required: true, validator: checkDoubleNumber, trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ quesNames: [{ validator: validateQuesNames, trigger: "change" }]
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ //查询来源大题名称
|
|
|
|
+ getQuesNameList(quesType) {
|
|
|
|
+ if (quesType && quesType.length > 0) {
|
|
|
|
+ var quesTypeObj = {};
|
|
|
|
+ var url = Q_API + "/paperStruct/quesNames";
|
|
|
|
+ if (this.courseNo !== "all") {
|
|
|
|
+ quesTypeObj = {
|
|
|
|
+ quesType: quesType,
|
|
|
|
+ courseNo: this.courseNo
|
|
|
|
+ };
|
|
|
|
+ } else {
|
|
|
|
+ quesTypeObj = {
|
|
|
|
+ quesType: quesType
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ this.$http.get(url, { params: quesTypeObj }).then(response => {
|
|
|
|
+ console.log(response);
|
|
|
|
+ this.quesNameList = response.data;
|
|
|
|
+ this.initQuesNames();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ initQuesNames() {
|
|
|
|
+ var arr1 = _.difference(this.paperUnitForm.quesNames, this.quesNames);
|
|
|
|
+ if (arr1.length > 0) {
|
|
|
|
+ this.paperUnitForm.quesNames = [];
|
|
|
|
+ }
|
|
|
|
+ var arr2 = _.difference(this.paperUnitForm2.quesNames, this.quesNames);
|
|
|
|
+ if (arr2.length > 0) {
|
|
|
|
+ this.paperUnitForm2.quesNames = [];
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getQuesNames(quesNameList) {
|
|
|
|
+ var quesNameStr = "";
|
|
|
|
+ if (!Array.isArray(quesNameList)) {
|
|
|
|
+ return quesNameStr;
|
|
|
|
+ }
|
|
|
|
+ for (let quesName of quesNameList) {
|
|
|
|
+ if (quesNameStr === "") {
|
|
|
|
+ quesNameStr += quesName;
|
|
|
|
+ } else {
|
|
|
|
+ quesNameStr += "," + quesName;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return quesNameStr;
|
|
|
|
+ },
|
|
|
|
+ //查询列表集合
|
|
|
|
+ searchForm() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ var paperStructStorge = sessionStorage.getItem("paperStruct");
|
|
|
|
+ if (typeof paperStructStorge === "string") {
|
|
|
|
+ var paperStruct = JSON.parse(paperStructStorge);
|
|
|
|
+ this.paperStruct = paperStruct;
|
|
|
|
+ this.unitStructs = this.getUnits();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //保存
|
|
|
|
+ submitForm(formData) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ this.$refs[formData].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ var unitStruct = Object.assign({}, this.paperUnitForm);
|
|
|
|
+ var ids = [];
|
|
|
|
+ for (let unitStruct of this.unitStructs) {
|
|
|
|
+ ids.push(unitStruct.id);
|
|
|
|
+ }
|
|
|
|
+ ids.sort();
|
|
|
|
+ var maxId;
|
|
|
|
+ if (ids.length == 0) {
|
|
|
|
+ maxId = 1;
|
|
|
|
+ } else {
|
|
|
|
+ maxId = ids[ids.length - 1];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ unitStruct.id = maxId + 1;
|
|
|
|
+ this.unitStructs.push(unitStruct);
|
|
|
|
+ this.resetForm();
|
|
|
|
+ this.setUnits();
|
|
|
|
+ sessionStorage.setItem(
|
|
|
|
+ "paperStruct",
|
|
|
|
+ JSON.stringify(this.paperStruct)
|
|
|
|
+ );
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ editSubmitForm(formData) {
|
|
|
|
+ this.$refs[formData].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ for (let unitStruct of this.unitStructs) {
|
|
|
|
+ if (unitStruct.id == this.paperUnitForm2.id) {
|
|
|
|
+ unitStruct.questionType = this.paperUnitForm2.questionType;
|
|
|
|
+ unitStruct.count = this.paperUnitForm2.count;
|
|
|
|
+ unitStruct.score = this.paperUnitForm2.score;
|
|
|
|
+ unitStruct.totalScore = this.paperUnitForm2.totalScore;
|
|
|
|
+ unitStruct.quesNames = this.paperUnitForm2.quesNames;
|
|
|
|
+ unitStruct.publicSimple = this.paperUnitForm2.publicSimple;
|
|
|
|
+ unitStruct.publicMedium = this.paperUnitForm2.publicMedium;
|
|
|
|
+ unitStruct.publicDifficulty = this.paperUnitForm2.publicDifficulty;
|
|
|
|
+ unitStruct.noPublicSimple = this.paperUnitForm2.noPublicSimple;
|
|
|
|
+ unitStruct.noPublicMedium = this.paperUnitForm2.noPublicMedium;
|
|
|
|
+ unitStruct.noPublicDifficulty = this.paperUnitForm2.noPublicDifficulty;
|
|
|
|
+ unitStruct.publicSum = this.paperUnitForm2.publicSum;
|
|
|
|
+ unitStruct.noPublicSum = this.paperUnitForm2.noPublicSum;
|
|
|
|
+ unitStruct.simpleSum = this.paperUnitForm2.simpleSum;
|
|
|
|
+ unitStruct.mediumSum = this.paperUnitForm2.mediumSum;
|
|
|
|
+ unitStruct.difficultySum = this.paperUnitForm2.difficultySum;
|
|
|
|
+ this.setUnits();
|
|
|
|
+ this.paperDetailUnitStructDialog = false;
|
|
|
|
+ sessionStorage.setItem(
|
|
|
|
+ "paperStruct",
|
|
|
|
+ JSON.stringify(this.paperStruct)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //重置
|
|
|
|
+ resetForm() {
|
|
|
|
+ this.paperUnitForm = {
|
|
|
|
+ id: "",
|
|
|
|
+ questionType: "",
|
|
|
|
+ count: 0,
|
|
|
|
+ score: "",
|
|
|
|
+ totalScore: "",
|
|
|
|
+ quesNames: [],
|
|
|
|
+ publicSimple: 0,
|
|
|
|
+ publicMedium: 0,
|
|
|
|
+ publicDifficulty: 0,
|
|
|
|
+ noPublicSimple: 0,
|
|
|
|
+ noPublicMedium: 0,
|
|
|
|
+ noPublicDifficulty: 0,
|
|
|
|
+ publicSum: 0,
|
|
|
|
+ noPublicSum: 0,
|
|
|
|
+ simpleSum: 0,
|
|
|
|
+ mediumSum: 0,
|
|
|
|
+ difficultySum: 0
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //返回
|
|
|
|
+ back() {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/questions/insert_paper_structure/" + this.paperStructId
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ muli() {
|
|
|
|
+ this.paperUnitForm.totalScore =
|
|
|
|
+ this.paperUnitForm.count * this.paperUnitForm.score;
|
|
|
|
+ },
|
|
|
|
+ muli2() {
|
|
|
|
+ this.paperUnitForm2.totalScore =
|
|
|
|
+ this.paperUnitForm2.count * this.paperUnitForm2.score;
|
|
|
|
+ },
|
|
|
|
+ getUnits() {
|
|
|
|
+ var unitStructs = [];
|
|
|
|
+ for (let paperDetailStruct of this.paperStruct.paperDetailStructs) {
|
|
|
|
+ if (parseInt(paperDetailStruct.id) == this.detailId) {
|
|
|
|
+ if (paperDetailStruct.unitStructs) {
|
|
|
|
+ return paperDetailStruct.unitStructs;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return unitStructs;
|
|
|
|
+ },
|
|
|
|
+ setUnits() {
|
|
|
|
+ for (let paperDetailStruct of this.paperStruct.paperDetailStructs) {
|
|
|
|
+ if (parseInt(paperDetailStruct.id) == this.detailId) {
|
|
|
|
+ paperDetailStruct.unitStructs = this.unitStructs;
|
|
|
|
+ paperDetailStruct.totalScore = this.totalScore;
|
|
|
|
+ paperDetailStruct.detailCount = this.detailCount;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getQuesTypeName(value) {
|
|
|
|
+ for (let quesType of this.quesTypes) {
|
|
|
|
+ if (value == quesType.value) {
|
|
|
|
+ return quesType.label;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ openPaperDetailUnitStructDialog(id) {
|
|
|
|
+ this.unitId = id;
|
|
|
|
+ for (let unitStruct of this.unitStructs) {
|
|
|
|
+ if (unitStruct.id == id) {
|
|
|
|
+ this.paperUnitForm2.id = id;
|
|
|
|
+ this.paperUnitForm2.questionType = unitStruct.questionType;
|
|
|
|
+ this.paperUnitForm2.count = unitStruct.count;
|
|
|
|
+ this.paperUnitForm2.score = unitStruct.score;
|
|
|
|
+ this.paperUnitForm2.totalScore = unitStruct.totalScore;
|
|
|
|
+ this.paperUnitForm2.quesNames = unitStruct.quesNames;
|
|
|
|
+ this.paperUnitForm2.publicSimple = unitStruct.publicSimple;
|
|
|
|
+ this.paperUnitForm2.publicMedium = unitStruct.publicMedium;
|
|
|
|
+ this.paperUnitForm2.publicDifficulty = unitStruct.publicDifficulty;
|
|
|
|
+ this.paperUnitForm2.noPublicSimple = unitStruct.noPublicSimple;
|
|
|
|
+ this.paperUnitForm2.noPublicMedium = unitStruct.noPublicMedium;
|
|
|
|
+ this.paperUnitForm2.noPublicDifficulty =
|
|
|
|
+ unitStruct.noPublicDifficulty;
|
|
|
|
+ //实时计算,不存数据库
|
|
|
|
+ this.paperUnitForm2.publicSum =
|
|
|
|
+ this.paperUnitForm2.publicSimple +
|
|
|
|
+ this.paperUnitForm2.publicMedium +
|
|
|
|
+ this.paperUnitForm2.publicDifficulty;
|
|
|
|
+ this.paperUnitForm2.noPublicSum =
|
|
|
|
+ this.paperUnitForm2.noPublicSimple +
|
|
|
|
+ this.paperUnitForm2.noPublicMedium +
|
|
|
|
+ this.paperUnitForm2.noPublicDifficulty;
|
|
|
|
+ this.paperUnitForm2.simpleSum =
|
|
|
|
+ this.paperUnitForm2.publicSimple +
|
|
|
|
+ this.paperUnitForm2.noPublicSimple;
|
|
|
|
+ this.paperUnitForm2.mediumSum =
|
|
|
|
+ this.paperUnitForm2.publicMedium +
|
|
|
|
+ this.paperUnitForm2.noPublicMedium;
|
|
|
|
+ this.paperUnitForm2.difficultySum =
|
|
|
|
+ this.paperUnitForm2.publicDifficulty +
|
|
|
|
+ this.paperUnitForm2.noPublicDifficulty;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.getQuesNameList(this.paperUnitForm2.questionType);
|
|
|
|
+ this.paperDetailUnitStructDialog = true;
|
|
|
|
+ this.paperUnitForms = [];
|
|
|
|
+ this.paperUnitForms.push(this.paperUnitForm2);
|
|
|
|
+ },
|
|
|
|
+ deleteUnit(id) {
|
|
|
|
+ var unitStructs = this.unitStructs;
|
|
|
|
+ for (let i = unitStructs.length - 1; i >= 0; i--) {
|
|
|
|
+ if (unitStructs[i].id == id) {
|
|
|
|
+ unitStructs.splice(i, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.unitStructs = unitStructs;
|
|
|
|
+ this.setUnits();
|
|
|
|
+ sessionStorage.setItem("paperStruct", JSON.stringify(this.paperStruct));
|
|
|
|
+ console.log(sessionStorage.getItem("paperStruct"));
|
|
|
|
+ },
|
|
|
|
+ openDialog() {
|
|
|
|
+ console.log("aaa");
|
|
|
|
+ //this.propertyDialog = true;
|
|
|
|
+ //this.paperUnitForms = [];
|
|
|
|
+ //this.paperUnitForms.push(this.paperUnitForm);
|
|
|
|
+ },
|
|
|
|
+ //判断是否为正整数
|
|
|
|
+ isPositiveInteger(s) {
|
|
|
|
+ //是否为正整数
|
|
|
|
+ var re = /^[0-9]+$/;
|
|
|
|
+ return re.test(s);
|
|
|
|
+ },
|
|
|
|
+ unitCount(row, data, rowType, paperUnitForm) {
|
|
|
|
+ //计算前校验正整数
|
|
|
|
+ if (!this.isPositiveInteger(data)) {
|
|
|
|
+ if (rowType === "publicSimple") {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.publicSimple = 0;
|
|
|
|
+ }, 1);
|
|
|
|
+ } else if (rowType === "publicMedium") {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.publicMedium = 0;
|
|
|
|
+ }, 1);
|
|
|
|
+ } else if (rowType === "publicDifficulty") {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.publicDifficulty = 0;
|
|
|
|
+ }, 1);
|
|
|
|
+ } else if (rowType === "noPublicSimple") {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.noPublicSimple = 0;
|
|
|
|
+ }, 1);
|
|
|
|
+ } else if (rowType === "noPublicMedium") {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.noPublicMedium = 0;
|
|
|
|
+ }, 1);
|
|
|
|
+ } else if (rowType === "noPublicDifficulty") {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.noPublicDifficulty = 0;
|
|
|
|
+ }, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ row.publicSimple = parseInt(row.publicSimple);
|
|
|
|
+ row.publicMedium = parseInt(row.publicMedium);
|
|
|
|
+ row.publicDifficulty = parseInt(row.publicDifficulty);
|
|
|
|
+ row.noPublicSimple = parseInt(row.noPublicSimple);
|
|
|
|
+ row.noPublicMedium = parseInt(row.noPublicMedium);
|
|
|
|
+ row.noPublicDifficulty = parseInt(row.noPublicDifficulty);
|
|
|
|
+ //公开总数
|
|
|
|
+ paperUnitForm.publicSum =
|
|
|
|
+ parseInt(row.publicSimple) +
|
|
|
|
+ parseInt(row.publicMedium) +
|
|
|
|
+ parseInt(row.publicDifficulty);
|
|
|
|
+ //非公开总数
|
|
|
|
+ paperUnitForm.noPublicSum =
|
|
|
|
+ parseInt(row.noPublicSimple) +
|
|
|
|
+ parseInt(row.noPublicMedium) +
|
|
|
|
+ parseInt(row.noPublicDifficulty);
|
|
|
|
+ //简单总数
|
|
|
|
+ paperUnitForm.simpleSum =
|
|
|
|
+ parseInt(row.publicSimple) + parseInt(row.noPublicSimple);
|
|
|
|
+ //中等总数
|
|
|
|
+ paperUnitForm.mediumSum =
|
|
|
|
+ parseInt(row.publicMedium) + parseInt(row.noPublicMedium);
|
|
|
|
+ //困难总数
|
|
|
|
+ paperUnitForm.difficultySum =
|
|
|
|
+ parseInt(row.publicDifficulty) + parseInt(row.noPublicDifficulty);
|
|
|
|
+ //总数
|
|
|
|
+ paperUnitForm.count =
|
|
|
|
+ paperUnitForm.publicSum + paperUnitForm.noPublicSum;
|
|
|
|
+ //分数
|
|
|
|
+ paperUnitForm.totalScore = paperUnitForm.count * paperUnitForm.score;
|
|
|
|
+ }, 5);
|
|
|
|
+ },
|
|
|
|
+ close() {
|
|
|
|
+ console.log("close");
|
|
|
|
+ this.propertyDialog = false;
|
|
|
|
+ this.paperUnitForms = [];
|
|
|
|
+ },
|
|
|
|
+ saveCount() {
|
|
|
|
+ this.propertyDialog = false;
|
|
|
|
+ this.paperUnitForms = [];
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ totalScore() {
|
|
|
|
+ var sum = 0.0;
|
|
|
|
+ for (let unitStruct of this.unitStructs) {
|
|
|
|
+ sum += unitStruct.totalScore;
|
|
|
|
+ }
|
|
|
|
+ return sum;
|
|
|
|
+ },
|
|
|
|
+ detailCount() {
|
|
|
|
+ var count = 0.0;
|
|
|
|
+ for (let unitStruct of this.unitStructs) {
|
|
|
|
+ count += unitStruct.count;
|
|
|
|
+ }
|
|
|
|
+ return count;
|
|
|
|
+ },
|
|
|
|
+ quesNames() {
|
|
|
|
+ var quesNames = [];
|
|
|
|
+ for (let quesName of this.quesNameList) {
|
|
|
|
+ quesNames.push(quesName.code);
|
|
|
|
+ }
|
|
|
|
+ return quesNames;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //初始化查询
|
|
|
|
+ created() {
|
|
|
|
+ this.paperStructId = this.$route.params.id;
|
|
|
|
+ this.detailName = this.$route.params.name;
|
|
|
|
+ this.detailId = this.$route.params.detailId;
|
|
|
|
+ this.courseNo = this.$route.params.courseNo;
|
|
|
|
+ this.searchForm();
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|