修改bug
This commit is contained in:
parent
880ffa2f5f
commit
eb3c8300fe
|
@ -1,16 +1,15 @@
|
|||
<template>
|
||||
<a-spin :spinning="loading" >
|
||||
<a-spin :spinning="loading">
|
||||
<a-form v-bind="formItemLayout">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="版本" v-bind="validateInfos.title" >
|
||||
<a-form-item label="版本" v-bind="validateInfos.title">
|
||||
{{ formData.title }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程类型" v-bind="validateInfos.twoTitle"> ({{ oldInfo.twoTitle_dictText }}) </a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
<!--
|
||||
|
@ -28,7 +27,7 @@
|
|||
<a-row>
|
||||
<a-col :span="24" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index">
|
||||
<a-row>
|
||||
<a-col :span="24" style="margin-bottom:15px;height:40px; margin-top:15px; background-color:rgba(1, 156, 136, 0.1);">
|
||||
<a-col :span="24" style="margin-bottom: 15px; height: 40px; margin-top: 15px; background-color: rgba(1, 156, 136, 0.1)">
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</a-col>
|
||||
<!-- 单行文本 1 -->
|
||||
|
@ -71,7 +70,12 @@
|
|||
<a-button type="primary" @click="handleDhwb(item)" class="increase">添加</a-button>
|
||||
</a-col>
|
||||
<a-col v-for="(item2, index2) in item.list" :key="index2">
|
||||
<a-input placeholder="请输入内容" v-model:value="item2.title" style="width: 80%; margin: 0 10px 10px 0px;" @blur="handleGlxm(item)"></a-input>
|
||||
<a-input
|
||||
placeholder="请输入内容"
|
||||
v-model:value="item2.title"
|
||||
style="width: 80%; margin: 0 10px 10px 0px"
|
||||
@blur="handleGlxm(item)"
|
||||
></a-input>
|
||||
<a-button type="danger" @click="handleDhwbDel(item, index2)">删除</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -80,11 +84,11 @@
|
|||
<a-col v-else-if="item.type === '7'" :span="24">
|
||||
<a-row>
|
||||
<a-col>
|
||||
<a-button type="primary" @click="handleDhfwb(item)" class="increase" >添加</a-button>
|
||||
<a-button type="primary" @click="handleDhfwb(item)" class="increase">添加</a-button>
|
||||
</a-col>
|
||||
<a-col v-for="(item2, index2) in item.list" :key="index2">
|
||||
<j-editor placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" style="width: 500px; height: 200px" />
|
||||
<a-button type="danger" @click="handleDhfwbDel(item, index2)" style="margin-top:10px"></a-button>
|
||||
<a-button type="danger" @click="handleDhfwbDel(item, index2)" style="margin-top: 10px"></a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
@ -94,7 +98,7 @@
|
|||
<a-col>
|
||||
<a-button type="primary" @click="handleDhwbArea(item)" class="increase">添加</a-button>
|
||||
</a-col>
|
||||
<a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align:right;" >
|
||||
<a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align: right">
|
||||
<a-textarea placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" />
|
||||
<a-button type="danger" @click="handleDhwbAreaDel(item, index2)" class="place-dele">删除</a-button>
|
||||
</a-col>
|
||||
|
@ -258,10 +262,10 @@ export default defineComponent({
|
|||
// const values = Object.assign({}, dbData, mainData);
|
||||
// values.zyJxdgMainList = subData;
|
||||
console.log('表单提交数据', values);
|
||||
const isUpdate = values.id ? true : false;
|
||||
await saveOrUpdate2(values, isUpdate);
|
||||
//关闭弹窗
|
||||
emit('success');
|
||||
// const isUpdate = values.id ? true : false;
|
||||
// await saveOrUpdate2(values, isUpdate);
|
||||
// //关闭弹窗
|
||||
// emit('success');
|
||||
}
|
||||
|
||||
function setFieldsValue(values) {
|
||||
|
@ -394,25 +398,76 @@ export default defineComponent({
|
|||
var sort = item.sort; //第几个关联项目
|
||||
console.log('💆♂️sort', sort);
|
||||
var alllist = zyJxdgMainTable.dataSource; //获取全部的数据
|
||||
console.log('🧜♂️alllist', alllist);
|
||||
for (var j = 0; j < alllist.length; j++) {
|
||||
for (var i = 0; i < list1.length; i++) {
|
||||
var item1 = list1[i];
|
||||
var title = item1.title; //具体信息
|
||||
var item2 = alllist[j]; //具体数据
|
||||
item2.list = item2.list || [];
|
||||
if (item2.guanlian == sort) {
|
||||
//关联项目等于当前数据
|
||||
if (i == 0) {
|
||||
//判断第一回将原来的清空重新赋值
|
||||
item2.list = [];
|
||||
|
||||
// 单行文本 1
|
||||
// 多行文本 2
|
||||
// 富文本 3
|
||||
// 固定表单(基础信息) 4
|
||||
// 关联表格 5
|
||||
// 自增单行文本 6
|
||||
// 自增富文本 7
|
||||
// 自增多行文本 8
|
||||
// 自增表格 9
|
||||
// 自增表格(两列关联)10
|
||||
if(item2.type == '5' || item2.type == '9' || item2.type == '10'){
|
||||
item2.list = item2.list || [];
|
||||
if (item2.guanlian == sort) {
|
||||
console.log('🤣item2', item2);
|
||||
//关联项目等于当前数据
|
||||
if (i == 0) {
|
||||
//判断第一回将原来的清空重新赋值
|
||||
item2.list = [];
|
||||
}
|
||||
//判断当前项是否等于关联项
|
||||
var item3 = item2.zyJxdgPzxxList;
|
||||
console.log('🤨item3', item3);
|
||||
if (item3 != null && item3.length > 0) {
|
||||
item2.list.push({ [item3[0].id]: title });
|
||||
}
|
||||
}
|
||||
//判断当前项是否等于关联项
|
||||
var item3 = item2.zyJxdgPzxxList;
|
||||
if (item3 != null && item3.length > 0) {
|
||||
item2.list.push({ [item3[0].id]: title });
|
||||
}else if(item2.type == '7'){
|
||||
|
||||
item2.list = item2.list || [];
|
||||
if (item2.guanlian == sort) {
|
||||
console.log('🤣item2', item2);
|
||||
//关联项目等于当前数据
|
||||
if (i == 0) {
|
||||
//判断第一回将原来的清空重新赋值
|
||||
item2.list = [];
|
||||
}
|
||||
title = (i+1)+"、"+title + "<br/>"
|
||||
// title = title + "(1)教学目标:<br/>"
|
||||
// title = title + "(2)核心问题:<br/>"
|
||||
// title = title + "(3)主要内容:<br/>"
|
||||
// title = title + "(4)教学方法:<br/>"
|
||||
// title = title + "(5)学习要求:<br/>"
|
||||
// title = title + "(6)学习资源(参考文献):<br/>"
|
||||
// title = title + "(7)课程思政融入点:<br/>"
|
||||
// title = title + "(1)-(7)可根据课程实际需要填写,不需要的可不保留。<br/>"
|
||||
item2.list.push({ title: title });
|
||||
}
|
||||
}else if(item2.type == '6' || item2.type == '8'){
|
||||
|
||||
item2.list = item2.list || [];
|
||||
if (item2.guanlian == sort) {
|
||||
console.log('🤣item2', item2);
|
||||
//关联项目等于当前数据
|
||||
if (i == 0) {
|
||||
//判断第一回将原来的清空重新赋值
|
||||
item2.list = [];
|
||||
}
|
||||
title = (i+1)+"、"+title
|
||||
item2.list.push({ title: title });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -434,7 +489,7 @@ export default defineComponent({
|
|||
var item1 = list1[i];
|
||||
var item2 = alllist[j]; //具体数据
|
||||
item2.list = item2.list || [];
|
||||
|
||||
|
||||
if (item2.guanlian == sort) {
|
||||
//判断当前项是否等于关联项
|
||||
var item3 = item.zyJxdgPzxxList;
|
||||
|
@ -503,25 +558,25 @@ export default defineComponent({
|
|||
padding-left: 10px;
|
||||
position: relative;
|
||||
color: #333333;
|
||||
line-height:40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.tishi {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: column;
|
||||
text-align: left;
|
||||
margin: 5px;
|
||||
}
|
||||
.tishi span{
|
||||
.tishi span {
|
||||
font-size: 12px;
|
||||
color: #fd8f02;
|
||||
}
|
||||
.increase{
|
||||
.increase {
|
||||
position: absolute;
|
||||
right:6px;
|
||||
top:-51px;
|
||||
right: 6px;
|
||||
top: -51px;
|
||||
}
|
||||
.place-dele {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.place-dele{
|
||||
margin:10px 0;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue