Compare commits

...

2 Commits

Author SHA1 Message Date
kbing1981 fea545a5bc Merge branch 'master' of http://47.115.223.229:8888/yangjun/dbsd_kczx
# Conflicts:
#	src/views/kc/zyJxdgBanben/components/ZyJxdgBanbenEditForm.vue
2024-08-23 19:01:08 +08:00
kbing1981 f83978ab9f 修改 2024-08-23 14:10:38 +08:00
2 changed files with 38 additions and 93 deletions

View File

@ -26,7 +26,7 @@
<a-row>
<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 c>
<a-col :span="24" style="margin-bottom:15px;height:40px; background-color:#f5f7fa;border-left:3px solid #19a789;">
<a-col :span="24" style="height:50px; background-color:#f5f7fa;border-left:3px solid #19a789; margin-bottom:10px;">
<span class="title">{{ item.title }}</span>
</a-col>
<!-- 单行文本 1 -->
@ -122,7 +122,7 @@
<a-button type="danger" @click="handleZzbgDel(item.list, record.sort)" >删除</a-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%;"></a-input>
</template>
</template>
</a-table>
@ -498,12 +498,12 @@ export default defineComponent({
<style scoped lang="less" >
.title {
width: 80%;
font-size: 16px;
font-size: 18px;
font-weight: bold;
padding-left: 10px;
position: relative;
color: #333333;
line-height:40px;
line-height:50px;
}
.tishi {
width: 100%;

View File

@ -1,15 +1,16 @@
<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>
<!--
@ -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:50px; background-color:#f5f7fa;border-left:3px solid #19a789;">
<span class="title">{{ item.title }}</span>
</a-col>
<!-- 单行文本 1 -->
@ -70,12 +71,7 @@
<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:10px 10px 10px 15px;" @blur="handleGlxm(item)"></a-input>
<a-button type="danger" @click="handleDhwbDel(item, index2)">删除</a-button>
</a-col>
</a-row>
@ -84,11 +80,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>
@ -98,7 +94,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>
@ -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 });
}
}
}
}
}
@ -558,7 +503,7 @@ export default defineComponent({
padding-left: 10px;
position: relative;
color: #333333;
line-height: 40px;
line-height:50px;
}
.tishi {
width: 100%;
@ -568,16 +513,16 @@ export default defineComponent({
margin: 5px;
margin: 10px 0;
}
.tishi span {
.tishi span{
font-size: 12px;
color: #ff9924;
}
.increase {
.increase{
position: absolute;
right: 6px;
top: -51px;
}
.place-dele {
margin: 10px 0;
right:6px;
top:-41px;
}
.place-dele{
margin:10px 0;
}
</style>