|
@@ -32,13 +32,13 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="每题分值" prop="score">
|
|
|
- <el-input
|
|
|
- v-model.number="paperUnitForm.score"
|
|
|
- class="search_width"
|
|
|
- placeholder="请输入"
|
|
|
+ <el-input-number
|
|
|
+ v-model="paperUnitForm.score"
|
|
|
size="small"
|
|
|
+ :precision="1"
|
|
|
+ :min="0.1"
|
|
|
@change="muli"
|
|
|
- ></el-input>
|
|
|
+ ></el-input-number>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -720,6 +720,7 @@ import { QUESTION_API } from "@/constants/constants";
|
|
|
import { QUESTION_TYPES } from "../constants/constants";
|
|
|
import _ from "lodash";
|
|
|
import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
|
|
|
+import { mapState } from "vuex";
|
|
|
export default {
|
|
|
components: { LinkTitlesCustom },
|
|
|
data() {
|
|
@@ -765,7 +766,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
- quesTypes: QUESTION_TYPES,
|
|
|
+ quesTypes: [],
|
|
|
courseNo: "",
|
|
|
quesNameList: [],
|
|
|
paperUnitForm: {
|
|
@@ -829,6 +830,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState({ user: (state) => state.user }),
|
|
|
totalScore() {
|
|
|
var sum = 0.0;
|
|
|
for (let unitStruct of this.unitStructs) {
|
|
@@ -853,6 +855,18 @@ export default {
|
|
|
},
|
|
|
//初始化查询
|
|
|
created() {
|
|
|
+ var url =
|
|
|
+ QUESTION_API +
|
|
|
+ "/org/property/" +
|
|
|
+ this.user.rootOrgId +
|
|
|
+ "/ROOT_ORG_QUESTION_TYPES";
|
|
|
+ this.$http.get(url).then((response) => {
|
|
|
+ if (response.data && response.data.length > 0) {
|
|
|
+ this.quesTypes = QUESTION_TYPES.filter((m) =>
|
|
|
+ response.data.includes(m.value)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
this.paperStructId = this.$route.params.id;
|
|
|
this.detailName = this.$route.params.name;
|
|
|
this.detailId = this.$route.params.detailId;
|