|
@@ -52,6 +52,7 @@
|
|
import { problemOptions } from './data.config';
|
|
import { problemOptions } from './data.config';
|
|
import { Button } from '/@/components/Button';
|
|
import { Button } from '/@/components/Button';
|
|
import { Input, InputNumber } from 'ant-design-vue';
|
|
import { Input, InputNumber } from 'ant-design-vue';
|
|
|
|
+ import { cloneDeep } from 'vue-json-pretty/types/utils';
|
|
|
|
|
|
const isUpdate = ref(true);
|
|
const isUpdate = ref(true);
|
|
const modelRef = ref({});
|
|
const modelRef = ref({});
|
|
@@ -125,6 +126,7 @@
|
|
|
|
|
|
modelRef.value = { ...data.baseData };
|
|
modelRef.value = { ...data.baseData };
|
|
const formatData = { ...data.baseData.item };
|
|
const formatData = { ...data.baseData.item };
|
|
|
|
+ // console.log('formatData', modelRef.value);
|
|
formatData.type = formatData.type || '1';
|
|
formatData.type = formatData.type || '1';
|
|
if (formatData.type !== '1') {
|
|
if (formatData.type !== '1') {
|
|
if (formatData.optionJson) {
|
|
if (formatData.optionJson) {
|
|
@@ -157,9 +159,12 @@
|
|
if (!checkScore(values)) return false;
|
|
if (!checkScore(values)) return false;
|
|
values.optionJson = JSON.stringify(values.optionJson);
|
|
values.optionJson = JSON.stringify(values.optionJson);
|
|
}
|
|
}
|
|
|
|
+
|
|
const postParams: any = unref(modelRef);
|
|
const postParams: any = unref(modelRef);
|
|
|
|
+ const key = postParams.item.key;
|
|
Object.assign(postParams, { item: values });
|
|
Object.assign(postParams, { item: values });
|
|
-
|
|
|
|
|
|
+ postParams.item.key = key;
|
|
|
|
+ // console.log('postParams', postParams);
|
|
// createMessage.success('操作成功');
|
|
// createMessage.success('操作成功');
|
|
closeModal();
|
|
closeModal();
|
|
emit('success', postParams, unref(isUpdate));
|
|
emit('success', postParams, unref(isUpdate));
|