|
@@ -2,10 +2,10 @@
|
|
|
<div class="app-container">
|
|
|
<div class="common-card">
|
|
|
<!-- 新建类型 -->
|
|
|
- <div class="engineeringWork-create">
|
|
|
- <div class="engineeringWork-create-title">新建类型</div>
|
|
|
- <div class="engineeringWork-create-edit">
|
|
|
- <div class="engineeringWork-create-input">
|
|
|
+ <div class="questionTypeCondition-create">
|
|
|
+ <div class="questionTypeCondition-create-title">新建类型</div>
|
|
|
+ <div class="questionTypeCondition-create-edit">
|
|
|
+ <div class="questionTypeCondition-create-input">
|
|
|
<span>父类名称:</span>
|
|
|
<a-input
|
|
|
v-model.trim="questionTypeParentName"
|
|
@@ -19,10 +19,10 @@
|
|
|
>新建父类</a-button
|
|
|
>
|
|
|
</div>
|
|
|
- <div class="engineeringWork-create-edit">
|
|
|
- <div class="engineeringWork-create-input">
|
|
|
+ <div class="questionTypeCondition-create-edit">
|
|
|
+ <div class="questionTypeCondition-create-input">
|
|
|
<span>所属父类:</span>
|
|
|
- <a-select v-model="parentTypeValue">
|
|
|
+ <a-select v-model="parentTypeValue" style="width: 174px">
|
|
|
<a-select-option
|
|
|
v-for="(item, index) in parentTypeTableList"
|
|
|
:key="index"
|
|
@@ -32,7 +32,7 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</div>
|
|
|
- <div class="engineeringWork-create-input">
|
|
|
+ <div class="questionTypeCondition-create-input">
|
|
|
<span>子类名称:</span>
|
|
|
<a-input
|
|
|
v-model.trim="questionTypeChildrenName"
|
|
@@ -50,8 +50,8 @@
|
|
|
</div>
|
|
|
<div class="common-card a-card-margin-top">
|
|
|
<!-- 已有类型-父类 -->
|
|
|
- <div class="engineeringWork-list">
|
|
|
- <div class="engineeringWork-list-title">已有父类</div>
|
|
|
+ <div class="questionTypeCondition-list">
|
|
|
+ <div class="questionTypeCondition-list-title">已有父类</div>
|
|
|
<a-table
|
|
|
:columns="columns"
|
|
|
:row-key="(record) => record.id"
|
|
@@ -61,7 +61,7 @@
|
|
|
<a
|
|
|
slot="action"
|
|
|
slot-scope="text, record"
|
|
|
- @click="engineeringWorkDelete(record)"
|
|
|
+ @click="questionTypeConditionDelete(record)"
|
|
|
>删除</a
|
|
|
>
|
|
|
</a-table>
|
|
@@ -69,8 +69,20 @@
|
|
|
</div>
|
|
|
<div class="common-card a-card-margin-top">
|
|
|
<!-- 已有类型-子类 -->
|
|
|
- <div class="engineeringWork-list">
|
|
|
- <div class="engineeringWork-list-title">已有子类</div>
|
|
|
+ <div class="questionTypeCondition-list">
|
|
|
+ <div class="questionTypeCondition-list-title">已有子类</div>
|
|
|
+ <div class="questionTypeCondition-list-filter">
|
|
|
+ <span>所属父类:</span>
|
|
|
+ <a-select v-model="parentTypeValue" style="width: 174px">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(item, index) in parentTypeTableList"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
<a-table
|
|
|
:columns="columns"
|
|
|
:row-key="(record) => record.id"
|
|
@@ -80,7 +92,7 @@
|
|
|
<a
|
|
|
slot="action"
|
|
|
slot-scope="text, record"
|
|
|
- @click="engineeringWorkDelete(record)"
|
|
|
+ @click="questionTypeConditionDelete(record)"
|
|
|
>删除</a
|
|
|
>
|
|
|
</a-table>
|
|
@@ -129,8 +141,21 @@ export default {
|
|
|
width: 150,
|
|
|
},
|
|
|
];
|
|
|
- this.getTableParentListFun(); // 查询:列表-父类
|
|
|
- this.getTableChildrenListFun(); // 查询:列表-子类
|
|
|
+ this.initTableParentListFun(); // 查询:列表-父类
|
|
|
+ },
|
|
|
+ // 查询:试题类型列表-父类
|
|
|
+ initTableParentListFun() {
|
|
|
+ this.loading = true;
|
|
|
+ this.$_http
|
|
|
+ .get(this.$_API.INTERFACE_GET_EXAMS_QUESTION_TYPE_CONDITION_PARENT)
|
|
|
+ .then((res) => {
|
|
|
+ this.parentTypeTableList = res.data;
|
|
|
+ this.parentTypeValue = this.parentTypeTableList[0].id;
|
|
|
+ this.getTableChildrenListFun(); // 查询:列表-子类
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
// 查询:试题类型列表-父类
|
|
|
getTableParentListFun() {
|
|
@@ -149,8 +174,16 @@ export default {
|
|
|
// 查询:试题类型列表-子类
|
|
|
getTableChildrenListFun() {
|
|
|
this.loading = true;
|
|
|
+ let params = {
|
|
|
+ categoryId: this.parentTypeValue,
|
|
|
+ };
|
|
|
this.$_http
|
|
|
- .get(this.$_API.INTERFACE_GET_EXAMS_QUESTION_TYPE_CONDITION_CHILDRENS)
|
|
|
+ .get(
|
|
|
+ formatePathParams(
|
|
|
+ this.$_API.INTERFACE_GET_EXAMS_QUESTION_TYPE_CONDITION_CHILDRENS,
|
|
|
+ params
|
|
|
+ )
|
|
|
+ )
|
|
|
.then((res) => {
|
|
|
this.childrenTypeTableList = res.data;
|
|
|
this.loading = false;
|
|
@@ -198,7 +231,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 操作:删除试题类型
|
|
|
- engineeringWorkDelete(record) {
|
|
|
+ questionTypeConditionDelete(record) {
|
|
|
let that = this;
|
|
|
this.$confirm({
|
|
|
title: '删除',
|
|
@@ -239,19 +272,19 @@ export default {
|
|
|
@import '~@/styles/common/variable.less';
|
|
|
.app-container {
|
|
|
overflow-y: auto;
|
|
|
- .engineeringWork-create {
|
|
|
+ .questionTypeCondition-create {
|
|
|
width: 100%;
|
|
|
- .engineeringWork-create-title {
|
|
|
+ .questionTypeCondition-create-title {
|
|
|
font-size: 18px;
|
|
|
font-weight: bold;
|
|
|
color: @mainColorBlack85;
|
|
|
}
|
|
|
- .engineeringWork-create-edit {
|
|
|
+ .questionTypeCondition-create-edit {
|
|
|
margin-top: @paddingMarginVal;
|
|
|
padding: 0 100px 0 100px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- .engineeringWork-create-input {
|
|
|
+ .questionTypeCondition-create-input {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
> span {
|
|
@@ -262,13 +295,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .engineeringWork-list {
|
|
|
- .engineeringWork-list-title {
|
|
|
+ .questionTypeCondition-list {
|
|
|
+ .questionTypeCondition-list-title {
|
|
|
margin-bottom: @paddingMarginVal;
|
|
|
font-size: 18px;
|
|
|
font-weight: bold;
|
|
|
color: @mainColorBlack85;
|
|
|
}
|
|
|
+ .questionTypeCondition-list-filter {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: @paddingMarginVal;
|
|
|
+ > span {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|