|
|
|
@ -23,15 +23,23 @@
|
|
|
|
|
自增多行文本 8
|
|
|
|
|
自增表格 9
|
|
|
|
|
-->
|
|
|
|
|
<div style="width: 100%; text-align: center; font-weight: bold; font-size: 18px; line-height: 80px">
|
|
|
|
|
{{ oldInfo.title }}({{ oldInfo.twoTitle_dictText }})教学大纲
|
|
|
|
|
</div>
|
|
|
|
|
<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-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="height:40px;line-height:40px;border-bottom:1px solid #edf0f6; margin-bottom:10px;">
|
|
|
|
|
<a-col :span="24" style="margin-bottom: 15px; height: 40px; background-color: #f5f7fa; border-left: 3px solid #19a789">
|
|
|
|
|
<span class="title">{{ item.title }}</span>
|
|
|
|
|
</a-col>
|
|
|
|
|
<!-- 单行文本 1 -->
|
|
|
|
|
<a-col v-if="item.type === '1'" :span="24">
|
|
|
|
|
<a-input placeholder="请输入内容" v-model:value="item.content" style="width: 100%;"></a-input>
|
|
|
|
|
<a-input placeholder="请输入内容" v-model:value="item.content" style="width: 100%"></a-input>
|
|
|
|
|
</a-col>
|
|
|
|
|
<!-- 多行文本 2 -->
|
|
|
|
|
<a-col v-else-if="item.type === '2'" :span="24">
|
|
|
|
@ -56,7 +64,7 @@
|
|
|
|
|
<a-col v-else-if="item.type === '5'" :span="24">
|
|
|
|
|
<a-table :columns="getTableColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 80%;color:#999"></a-input>
|
|
|
|
|
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 80%"></a-input>
|
|
|
|
|
<!-- <template v-if="column.key === 'name'">
|
|
|
|
|
</template> -->
|
|
|
|
|
</template>
|
|
|
|
@ -68,10 +76,15 @@
|
|
|
|
|
<a-col>
|
|
|
|
|
<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" class="Sheet" style="width: 80%; margin: 0 10px 10px 15px; " @blur="handleGlxm(item)"></a-input>
|
|
|
|
|
<button type="danger" @click="handleDhwbDel(item, index2)" class="ant-btn">删除</button>
|
|
|
|
|
<div preIcon="ant-design:plus-outlined"></div>
|
|
|
|
|
<a-col v-for="(item2, index2) in item.list" :key="index2">
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
v-model:value="item2.title"
|
|
|
|
|
class="Sheet"
|
|
|
|
|
style="width: 80%; margin: 0 10px 10px 15px"
|
|
|
|
|
@blur="handleGlxm(item)"
|
|
|
|
|
></a-input>
|
|
|
|
|
<a-button type="danger" @click="handleDhwbDel(item, index2)" style="margin: 10px 0; text-align: right">删除</a-button>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-col>
|
|
|
|
@ -81,9 +94,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" style="text-align:right;">
|
|
|
|
|
<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" />
|
|
|
|
|
<button type="danger" @click="handleDhfwbDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
|
|
|
|
|
<a-button type="danger" @click="handleDhfwbDel(item, index2)" class="place-dele">删除</a-button>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-col>
|
|
|
|
@ -93,9 +106,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;color:#666">
|
|
|
|
|
<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" />
|
|
|
|
|
<button type="danger" @click="handleDhwbAreaDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
|
|
|
|
|
<a-button type="danger" @click="handleDhwbAreaDel(item, index2)" class="place-dele">删除</a-button>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-col>
|
|
|
|
@ -106,10 +119,10 @@
|
|
|
|
|
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
|
<button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
|
|
|
|
|
<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]" style="width: 100%; color:#666"></a-input>
|
|
|
|
|
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 100%"></a-input>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</a-table>
|
|
|
|
@ -120,10 +133,10 @@
|
|
|
|
|
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
|
<button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
|
|
|
|
|
<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%;color:#666"></a-input>
|
|
|
|
|
<a-input placeholder="请输入内容" v-model:value="record[column.key]" @blur="handleTwoGlxm(item)" style="width: 100%"></a-input>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</a-table>
|
|
|
|
@ -146,7 +159,13 @@
|
|
|
|
|
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
|
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
|
|
|
import { queryZyJxdgMainListByMainId, queryZyJxdgMainListByMainId2, saveOrUpdate2, queryDataById2 } from '../ZyJxdgBanben.api';
|
|
|
|
|
import {
|
|
|
|
|
queryZyJxdgMainListByMainId,
|
|
|
|
|
queryZyJxdgMainListByMainId2,
|
|
|
|
|
queryZyJxdgMainListByMainId3,
|
|
|
|
|
saveOrUpdate2,
|
|
|
|
|
queryDataById2,
|
|
|
|
|
} from '../ZyJxdgBanben.api';
|
|
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
|
|
import { zyJxdgMainColumns } from '../ZyJxdgBanben.data';
|
|
|
|
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
|
|
|
@ -217,22 +236,32 @@ export default defineComponent({
|
|
|
|
|
|
|
|
|
|
async function edit(row) {
|
|
|
|
|
oldInfo.value = row;
|
|
|
|
|
row.rwbh = '202320242000629';
|
|
|
|
|
row.teacherNo = '2002900106';
|
|
|
|
|
oldInfo.value.rwbh = '202320242000629';
|
|
|
|
|
oldInfo.value.teacherNo = '1001901726';
|
|
|
|
|
oldInfo.value.banbenId = row.id;
|
|
|
|
|
row.rwbh = oldInfo.value.rwbh;
|
|
|
|
|
row.teacherNo = oldInfo.value.teacherNo;
|
|
|
|
|
//主表数据
|
|
|
|
|
await queryMainData(row);
|
|
|
|
|
var params = {
|
|
|
|
|
mainId: row.id,
|
|
|
|
|
rwbh: row.rwbh,
|
|
|
|
|
teacherNo: row.teacherNo,
|
|
|
|
|
};
|
|
|
|
|
//子表数据
|
|
|
|
|
const zyJxdgMainDataList = await queryZyJxdgMainListByMainId2(row['rwbh'], row['teacherNo']);
|
|
|
|
|
const zyJxdgMainDataList = await queryZyJxdgMainListByMainId3(params);
|
|
|
|
|
console.log('💁♀️', zyJxdgMainDataList);
|
|
|
|
|
zyJxdgMainTable.dataSource = [...zyJxdgMainDataList];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function queryMainData(record) {
|
|
|
|
|
const row = await queryDataById2(record);
|
|
|
|
|
if (row) {
|
|
|
|
|
Object.keys(row).map((k) => {
|
|
|
|
|
formData[k] = row[k];
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
|
|
|
|
|
zyJxdgMain: zyJxdgMainTableRef,
|
|
|
|
@ -247,17 +276,14 @@ export default defineComponent({
|
|
|
|
|
const alllist = zyJxdgMainTable.dataSource;
|
|
|
|
|
console.log('✋', alllist);
|
|
|
|
|
|
|
|
|
|
var values = {
|
|
|
|
|
id: '',
|
|
|
|
|
rwbh: '',
|
|
|
|
|
banbenId: '',
|
|
|
|
|
teacherNo: '',
|
|
|
|
|
sffb: '',
|
|
|
|
|
list: alllist,
|
|
|
|
|
};
|
|
|
|
|
var values = {};
|
|
|
|
|
const mainData = await getFormData();
|
|
|
|
|
console.log('🧙♀️', mainData);
|
|
|
|
|
values = mainData;
|
|
|
|
|
values.rwbh = oldInfo.value.rwbh;
|
|
|
|
|
values.banbenId = oldInfo.value.banbenId;
|
|
|
|
|
values.list = alllist;
|
|
|
|
|
// values.teacherNo = oldInfo.value.teacherNo;
|
|
|
|
|
// const subData = zyJxdgMainTable.dataSource;
|
|
|
|
|
// const values = Object.assign({}, dbData, mainData);
|
|
|
|
|
// values.zyJxdgMainList = subData;
|
|
|
|
@ -499,10 +525,12 @@ export default defineComponent({
|
|
|
|
|
<style scoped lang="less" >
|
|
|
|
|
.title {
|
|
|
|
|
width: 80%;
|
|
|
|
|
font-size:16px;
|
|
|
|
|
padding-left:20px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
position: relative;
|
|
|
|
|
color: #333333;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
}
|
|
|
|
|
.tishi {
|
|
|
|
|
width: 100%;
|
|
|
|
@ -512,24 +540,21 @@ export default defineComponent({
|
|
|
|
|
margin: 5px;
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
}
|
|
|
|
|
.tishi span{
|
|
|
|
|
.tishi span {
|
|
|
|
|
margin: 0 15px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #ff9924;
|
|
|
|
|
}
|
|
|
|
|
.increase{
|
|
|
|
|
.increase {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right:6px;
|
|
|
|
|
top:-46px;
|
|
|
|
|
right: 6px;
|
|
|
|
|
top: -51px;
|
|
|
|
|
}
|
|
|
|
|
.place-dele{
|
|
|
|
|
margin:10px 0;
|
|
|
|
|
}
|
|
|
|
|
.Sheet{
|
|
|
|
|
color:#999;
|
|
|
|
|
.place-dele {
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
}
|
|
|
|
|
.Sheet {
|
|
|
|
|
color: #91949a;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
.ant-btn{
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|