|
@@ -198,6 +198,38 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+
|
|
|
+ <!-- 智能出题 -->
|
|
|
+ <el-form v-if="activeName === 'tab5'" label-width="120px">
|
|
|
+ <el-form-item label="购买出题数据包">
|
|
|
+ <el-radio-group v-model="trade">
|
|
|
+ <el-radio-button
|
|
|
+ v-for="item in tradeOptions"
|
|
|
+ :key="item"
|
|
|
+ :label="item"
|
|
|
+ >{{ item + "道" }}</el-radio-button
|
|
|
+ >
|
|
|
+ </el-radio-group>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="margin-left-10"
|
|
|
+ :disabled="!trade"
|
|
|
+ :loading="loading"
|
|
|
+ @click="toBuy"
|
|
|
+ >购买</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="剩余出题数量">{{
|
|
|
+ form.properties.AI_QUESTION_REMAINDER
|
|
|
+ }}</el-form-item>
|
|
|
+ <el-form-item label="已购记录">
|
|
|
+ <el-table :data="tradeList" border style="max-width: 600px">
|
|
|
+ <el-table-column type="index" label="序号" width="70" />
|
|
|
+ <el-table-column prop="questionCount" label="购买出题数量" />
|
|
|
+ <el-table-column prop="creationTime" width="170" label="购买时间" />
|
|
|
+ </el-table>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</section>
|
|
|
</template>
|
|
@@ -205,6 +237,7 @@
|
|
|
<script>
|
|
|
import { mapState } from "vuex";
|
|
|
import { QUESTION_API } from "@/constants/constants.js";
|
|
|
+import { orgAiTransactionSaveApi, orgAiTransactionListApi } from "../api";
|
|
|
|
|
|
export default {
|
|
|
name: "OrgProperty",
|
|
@@ -232,6 +265,10 @@ export default {
|
|
|
name: "组卷配置",
|
|
|
val: "tab4",
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "智能出题",
|
|
|
+ val: "tab5",
|
|
|
+ },
|
|
|
],
|
|
|
activeName: "tab2",
|
|
|
rootOrgName: "",
|
|
@@ -256,11 +293,17 @@ export default {
|
|
|
CHECK_DUPLICATE_COUNT: 5,
|
|
|
// 综合组卷
|
|
|
PAPER_BUILD_SYNTHESIS: "false",
|
|
|
+ AI_QUESTION_REMAINDER: 0,
|
|
|
},
|
|
|
},
|
|
|
rules: {
|
|
|
// code: [{ required: true, validator: validateCode, trigger: "blur" }],
|
|
|
},
|
|
|
+ // 智能出题
|
|
|
+ trade: 10000,
|
|
|
+ tradeOptions: [10000, 20000, 50000],
|
|
|
+ tradeList: [],
|
|
|
+ loading: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -281,6 +324,7 @@ export default {
|
|
|
sessionStorage.setItem("org_prop_info_org_name", this.rootOrgName);
|
|
|
}
|
|
|
this.init();
|
|
|
+ this.getTradeList();
|
|
|
},
|
|
|
mounted() {
|
|
|
setTimeout(() => {
|
|
@@ -316,53 +360,11 @@ export default {
|
|
|
// response.data.QUESTION_TYPE_SPECIAL_SET
|
|
|
// );
|
|
|
// }
|
|
|
- if (response.data.PAPER_AUDIT) {
|
|
|
- this.form.properties.PAPER_AUDIT = response.data.PAPER_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.PAPER_FIRST_AUDIT) {
|
|
|
- this.form.properties.PAPER_FIRST_AUDIT =
|
|
|
- response.data.PAPER_FIRST_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.PAPER_SECOND_AUDIT) {
|
|
|
- this.form.properties.PAPER_SECOND_AUDIT =
|
|
|
- response.data.PAPER_SECOND_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.PAPER_THIRD_AUDIT) {
|
|
|
- this.form.properties.PAPER_THIRD_AUDIT =
|
|
|
- response.data.PAPER_THIRD_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.EXAM_PAPER_AUDIT) {
|
|
|
- this.form.properties.EXAM_PAPER_AUDIT =
|
|
|
- response.data.EXAM_PAPER_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.EXAM_PAPER_FIRST_AUDIT) {
|
|
|
- this.form.properties.EXAM_PAPER_FIRST_AUDIT =
|
|
|
- response.data.EXAM_PAPER_FIRST_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.EXAM_PAPER_SECOND_AUDIT) {
|
|
|
- this.form.properties.EXAM_PAPER_SECOND_AUDIT =
|
|
|
- response.data.EXAM_PAPER_SECOND_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.EXAM_PAPER_THIRD_AUDIT) {
|
|
|
- this.form.properties.EXAM_PAPER_THIRD_AUDIT =
|
|
|
- response.data.EXAM_PAPER_THIRD_AUDIT;
|
|
|
- }
|
|
|
- if (response.data.CHECK_DUPLICATE) {
|
|
|
- this.form.properties.CHECK_DUPLICATE =
|
|
|
- response.data.CHECK_DUPLICATE;
|
|
|
- }
|
|
|
- if (response.data.CHECK_DUPLICATE_THRESHOLD) {
|
|
|
- this.form.properties.CHECK_DUPLICATE_THRESHOLD =
|
|
|
- response.data.CHECK_DUPLICATE_THRESHOLD;
|
|
|
- }
|
|
|
- if (response.data.CHECK_DUPLICATE_COUNT) {
|
|
|
- this.form.properties.CHECK_DUPLICATE_COUNT =
|
|
|
- response.data.CHECK_DUPLICATE_COUNT;
|
|
|
- }
|
|
|
- if (response.data.PAPER_BUILD_SYNTHESIS) {
|
|
|
- this.form.properties.PAPER_BUILD_SYNTHESIS =
|
|
|
- response.data.PAPER_BUILD_SYNTHESIS;
|
|
|
- }
|
|
|
+
|
|
|
+ this.form.properties = this.$objAssign(
|
|
|
+ this.form.properties,
|
|
|
+ response.data
|
|
|
+ );
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -411,6 +413,26 @@ export default {
|
|
|
this.back();
|
|
|
});
|
|
|
},
|
|
|
+ async getTradeList() {
|
|
|
+ const res = await orgAiTransactionListApi(this.form.orgId);
|
|
|
+ this.tradeList = res.data || [];
|
|
|
+ },
|
|
|
+ async toBuy() {
|
|
|
+ if (!this.trade) return;
|
|
|
+
|
|
|
+ if (this.loading) return;
|
|
|
+ this.loading = true;
|
|
|
+
|
|
|
+ const res = await orgAiTransactionSaveApi({
|
|
|
+ rootOrgId: this.form.orgId,
|
|
|
+ trade: this.trade,
|
|
|
+ }).catch(() => {});
|
|
|
+ this.loading = false;
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success("购买成功!");
|
|
|
+ this.init();
|
|
|
+ this.getTradeList();
|
|
|
+ },
|
|
|
back() {
|
|
|
this.$router.push({ path: "/questions/school" });
|
|
|
},
|