|
@@ -249,7 +249,7 @@ import {
|
|
TEMPLATE_CLASSIFY
|
|
TEMPLATE_CLASSIFY
|
|
} from "@/constants/enumerate";
|
|
} from "@/constants/enumerate";
|
|
import { deepCopy } from "@/plugins/utils";
|
|
import { deepCopy } from "@/plugins/utils";
|
|
-import { updateExamConfig } from "../api";
|
|
|
|
|
|
+import { updateExamConfig, listOrgsByExamId } from "../api";
|
|
import { printPlanTemplateList } from "../../print/api";
|
|
import { printPlanTemplateList } from "../../print/api";
|
|
import SelectOrgs from "./SelectOrgs";
|
|
import SelectOrgs from "./SelectOrgs";
|
|
|
|
|
|
@@ -359,6 +359,7 @@ export default {
|
|
ordinaryContent: [],
|
|
ordinaryContent: [],
|
|
templateSources: {},
|
|
templateSources: {},
|
|
oldPrintContent: [],
|
|
oldPrintContent: [],
|
|
|
|
+ usedOrgIds: [],
|
|
allSelected: false,
|
|
allSelected: false,
|
|
infoShow: true,
|
|
infoShow: true,
|
|
rules: {
|
|
rules: {
|
|
@@ -417,8 +418,17 @@ export default {
|
|
this.getTemplates();
|
|
this.getTemplates();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- visibleChange() {
|
|
|
|
- this.initData(this.instance);
|
|
|
|
|
|
+ async visibleChange() {
|
|
|
|
+ const data = await listOrgsByExamId({
|
|
|
|
+ examId: this.instance.examId,
|
|
|
|
+ id: this.instance.id
|
|
|
|
+ });
|
|
|
|
+ this.usedOrgIds = data || [];
|
|
|
|
+ this.$refs.SelectOrgs.setDisabledOrgs(this.usedOrgIds);
|
|
|
|
+
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.initData(this.instance);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
this.modalIsShow = false;
|
|
this.modalIsShow = false;
|
|
@@ -435,7 +445,7 @@ export default {
|
|
});
|
|
});
|
|
this.templateSources = templateSources;
|
|
this.templateSources = templateSources;
|
|
},
|
|
},
|
|
- async initData(val) {
|
|
|
|
|
|
+ initData(val) {
|
|
if (val.id) {
|
|
if (val.id) {
|
|
this.modalForm = this.$objAssign(deepCopy(initModalForm), val);
|
|
this.modalForm = this.$objAssign(deepCopy(initModalForm), val);
|
|
const transformInfo = item => {
|
|
const transformInfo = item => {
|