Merge branch 'master' of http://47.115.223.229:8888/yangjun/dbsd_kczx
# Conflicts: # src/views/kc/zyJxdgBanben/components/ZyJxdgBanbenDetailForm.vue
This commit is contained in:
commit
f0da014566
|
@ -10,6 +10,7 @@
|
|||
<a-col :span="12">
|
||||
<a-form-item label="课程类型" v-bind="validateInfos.twoTitle"> ({{ oldInfo.twoTitle_dictText }}) </a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
<!--
|
||||
|
@ -25,9 +26,9 @@
|
|||
自增表格(两列关联)10
|
||||
-->
|
||||
<a-row>
|
||||
<a-col :span="24" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index">
|
||||
<a-col :span="24" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index" style="border:1px solid #f5f5f5;margin:5px 0; background:#fbfbfb;border-radius:5px;" >
|
||||
<a-row>
|
||||
<a-col :span="24" style="margin-bottom:15px;height:40px; margin-top:15px; background-color:#f3faf9;">
|
||||
<a-col :span="24" style="height:40px;line-height:40px;border-bottom:1px solid #edf0f6; margin-bottom:10px;">
|
||||
<span class="title">{{ item.title }}</span>
|
||||
</a-col>
|
||||
<!-- 单行文本 1 -->
|
||||
|
@ -70,13 +71,8 @@
|
|||
<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-button type="danger" @click="handleDhwbDel(item, index2)">删除</a-button>
|
||||
<a-input placeholder="请输入内容" v-model:value="item2.title" style="width: 80%; margin:0px 10px 10px 15px;color:#666" @blur="handleGlxm(item)"></a-input>
|
||||
<button type="danger" @click="handleDhwbDel(item, index2)" class="ant-btn">删除</button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
@ -86,9 +82,9 @@
|
|||
<a-col>
|
||||
<a-button type="primary" @click="handleDhfwb(item)" class="increase" >添加</a-button>
|
||||
</a-col>
|
||||
<a-col v-for="(item2, index2) in item.list" :key="index2">
|
||||
<a-col v-for="(item2, index2) in item.list" :key="index2" style="text-align:right;">
|
||||
<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>
|
||||
<button type="danger" @click="handleDhfwbDel(item, index2)" class="ant-btn" style="margin:8px 0" >删除</button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
@ -98,9 +94,9 @@
|
|||
<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>
|
||||
<button type="danger" @click="handleDhwbAreaDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
@ -111,10 +107,10 @@
|
|||
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-button type="danger" @click="handleZzbgDel(item.list, record.sort)">删除</a-button>
|
||||
<button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 100%"></a-input>
|
||||
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 100%;color:#666"></a-input>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
@ -125,10 +121,10 @@
|
|||
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-button type="danger" @click="handleZzbgDel(item.list, record.sort)">删除</a-button>
|
||||
<button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-input placeholder="请输入内容" v-model:value="record[column.key]" @blur="handleTwoGlxm(item)" style="width: 100%"></a-input>
|
||||
<a-input placeholder="请输入内容" v-model:value="record[column.key]" @blur="handleTwoGlxm(item)" style="width: 100%; color:#666"></a-input>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
@ -262,10 +258,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) {
|
||||
|
@ -398,26 +394,14 @@ 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]; //具体数据
|
||||
|
||||
// 单行文本 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) {
|
||||
//判断第一回将原来的清空重新赋值
|
||||
|
@ -425,49 +409,10 @@ export default defineComponent({
|
|||
}
|
||||
//判断当前项是否等于关联项
|
||||
var item3 = item2.zyJxdgPzxxList;
|
||||
console.log('🤨item3', item3);
|
||||
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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -553,12 +498,10 @@ export default defineComponent({
|
|||
<style scoped lang="less" >
|
||||
.title {
|
||||
width: 80%;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
font-size:16px;
|
||||
padding-left:20px;
|
||||
position: relative;
|
||||
color: #333333;
|
||||
line-height: 40px;
|
||||
}
|
||||
.tishi {
|
||||
width: 100%;
|
||||
|
@ -571,13 +514,17 @@ export default defineComponent({
|
|||
.tishi span{
|
||||
font-size: 12px;
|
||||
color: #ff9924;
|
||||
margin:0 20px;
|
||||
}
|
||||
.increase{
|
||||
position: absolute;
|
||||
right:6px;
|
||||
top: -51px;
|
||||
top:-46px;
|
||||
}
|
||||
.place-dele{
|
||||
margin:10px 0;
|
||||
}
|
||||
.ant-btn{
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue