|
@@ -288,12 +288,12 @@ it .ql-editor,
|
|
|
/>
|
|
|
</el-form>
|
|
|
<!-- 暂时用的按钮 -->
|
|
|
- <button
|
|
|
+ <!-- <button
|
|
|
style="position: fixed; bottom: 20px; right: 20px; font-size: 16px"
|
|
|
@click="assessCommitTest"
|
|
|
>
|
|
|
暂时用的按钮
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -515,15 +515,14 @@ export default {
|
|
|
methods: {
|
|
|
onEditorChange(e) {
|
|
|
e.quill.deleteText(1000, 4);
|
|
|
- console.log(e.quill.getLength());
|
|
|
// e.quill.getLength()>1000
|
|
|
},
|
|
|
assessCommitTest() {
|
|
|
console.dir(this.formtParams());
|
|
|
},
|
|
|
formtParams() {
|
|
|
- console.log("this.scaleData.klScaleParent");
|
|
|
- console.dir(this.scaleData.klScaleParent);
|
|
|
+ // console.log("this.scaleData.klScaleParent");
|
|
|
+ // console.dir(this.scaleData.klScaleParent);
|
|
|
// 提交数据的处理 start....
|
|
|
// 1. 新建一个整体对象
|
|
|
const params = {
|
|
@@ -544,10 +543,8 @@ export default {
|
|
|
// 5. 遍历数据 添加组、问题、以及选项。
|
|
|
table.klScaleSaveGroup.forEach((group, groupIndex) => {
|
|
|
const groupFindIndex = groupArr.findIndex((item) => {
|
|
|
- console.log(item.groupNum, group.groupId);
|
|
|
return item.groupNum === group.groupId;
|
|
|
});
|
|
|
- console.log("groupFindIndex", groupFindIndex);
|
|
|
// 6. 查看数组中有没有同组的,如果没有同组的,直接push
|
|
|
if (groupFindIndex === -1) {
|
|
|
groupArr.push({
|
|
@@ -640,7 +637,7 @@ export default {
|
|
|
params.klScaleParent[tableIndex].klScaleSaveGroup = groupArr;
|
|
|
} else if (table.textType === 12) {
|
|
|
// 文本类型单独处理
|
|
|
- console.dir(table);
|
|
|
+ // console.dir(table);
|
|
|
params.klScaleParent.push({
|
|
|
...table,
|
|
|
klScaleSaveGroup: [
|
|
@@ -738,8 +735,7 @@ export default {
|
|
|
assessCommit() {
|
|
|
// new Promise((resolve))
|
|
|
let valid1 = new Promise((resolve, reject) => {
|
|
|
- this.$refs["scaleFormRef"].validate((valid) => {
|
|
|
- console.log(valid);
|
|
|
+ this.$refs["scaleFormRef"].validate((valid, object) => {
|
|
|
if (valid) {
|
|
|
resolve();
|
|
|
} else {
|
|
@@ -750,7 +746,6 @@ export default {
|
|
|
});
|
|
|
let valid2 = new Promise((resolve, reject) => {
|
|
|
this.$refs["ScoreResultsRef"].validate((valid) => {
|
|
|
- console.log(valid);
|
|
|
if (valid) {
|
|
|
resolve();
|
|
|
} else {
|
|
@@ -759,16 +754,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- console.log(123);
|
|
|
return [valid1, valid2];
|
|
|
- // Promise.all([valid1, valid2])
|
|
|
- // .then(() => {
|
|
|
- // console.log("allllll");
|
|
|
- // console.dir(this.formtParams());
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // console.log("fillllll");
|
|
|
- // });
|
|
|
},
|
|
|
/**
|
|
|
* 增/删/得分结果表格
|
|
@@ -776,7 +762,6 @@ export default {
|
|
|
* @param index :当前行索引
|
|
|
*/
|
|
|
CHANEG_SCORE_RESULT(type, index) {
|
|
|
- console.log(type, index);
|
|
|
// 节流: 阻止用户频繁点击
|
|
|
if (this.timer) return;
|
|
|
this.timer = setTimeout(() => {
|
|
@@ -946,17 +931,16 @@ export default {
|
|
|
},
|
|
|
// 清空选项
|
|
|
initializationTableData(e, tableIndex) {
|
|
|
- console.log(this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup);
|
|
|
this.$set(this.scaleData.klScaleParent[tableIndex], "klScaleSaveGroup", [
|
|
|
{ ...defaultDate }
|
|
|
]);
|
|
|
},
|
|
|
resizeTable() {
|
|
|
- console.log("this.$refs.ScaleTable", this.$refs.ScaleTable);
|
|
|
this.$refs.ScaleTable.forEach((item) => {
|
|
|
item.resizeTable();
|
|
|
});
|
|
|
- this.$refs.ScoreResultsTable.resizeTable();
|
|
|
+ this.$refs.ScoreResultsTable &&
|
|
|
+ this.$refs.ScoreResultsTable.resizeTable();
|
|
|
// this.$refs.ScaleTable.resizeTable();
|
|
|
}
|
|
|
},
|
|
@@ -968,8 +952,8 @@ export default {
|
|
|
deep: true
|
|
|
},
|
|
|
childScaleData() {
|
|
|
- console.log("child Mounted");
|
|
|
- console.dir(this.childScaleData);
|
|
|
+ // console.log("child Mounted");
|
|
|
+ // console.dir(this.childScaleData);
|
|
|
if (this.childScaleData) {
|
|
|
// 修改时的默认数据赋值 逻辑:遍历接口数据 赋值给结构体数据
|
|
|
let obj = {
|
|
@@ -1075,9 +1059,8 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- console.log("??????????");
|
|
|
- console.dir(obj);
|
|
|
- console.dir(scoreresults);
|
|
|
+ // console.dir(obj);
|
|
|
+ // console.dir(scoreresults);
|
|
|
|
|
|
this.scaleData = obj;
|
|
|
this.scoreresults = scoreresults;
|