修改bug
This commit is contained in:
parent
d0b1b8fb76
commit
eab0b3a79e
|
@ -16,6 +16,7 @@ enum Api {
|
||||||
queryDataById = '/zyJxdgBanben/zyJxdgBanben/queryById',
|
queryDataById = '/zyJxdgBanben/zyJxdgBanben/queryById',
|
||||||
queryDataById2 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryByRwbh',
|
queryDataById2 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryByRwbh',
|
||||||
queryZyJxdgMainListByMainId2 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryByRwbhList',
|
queryZyJxdgMainListByMainId2 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryByRwbhList',
|
||||||
|
queryZyJxdgMainListByMainId3 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryZyJxdgMainListByMainId3',
|
||||||
zyJxdgMainList = '/zyJxdgBanben/zyJxdgBanben/queryZyJxdgMainByMainId',
|
zyJxdgMainList = '/zyJxdgBanben/zyJxdgBanben/queryZyJxdgMainByMainId',
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +36,7 @@ export const getImportUrl = Api.importExcel;
|
||||||
*/
|
*/
|
||||||
export const queryZyJxdgMainListByMainId = (id) => defHttp.get({url: Api.zyJxdgMainList, params:{ id }});
|
export const queryZyJxdgMainListByMainId = (id) => defHttp.get({url: Api.zyJxdgMainList, params:{ id }});
|
||||||
export const queryZyJxdgMainListByMainId2 = (rwbh,teacherNo) => defHttp.get({url: Api.queryZyJxdgMainListByMainId2, params:{ rwbh,teacherNo }});
|
export const queryZyJxdgMainListByMainId2 = (rwbh,teacherNo) => defHttp.get({url: Api.queryZyJxdgMainListByMainId2, params:{ rwbh,teacherNo }});
|
||||||
|
export const queryZyJxdgMainListByMainId3 = (params) => defHttp.get({url: Api.queryZyJxdgMainListByMainId3, params});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表接口
|
* 列表接口
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
openModal4(true, {
|
openModal4(true, {
|
||||||
record,
|
record,
|
||||||
isUpdate: true,
|
isUpdate: true,
|
||||||
showFooter: false,
|
showFooter: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,12 +167,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '模仿教师填写',
|
label: '模仿教师填写',
|
||||||
onClick: handleTianxie.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '填写后详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
onClick: handleDetail.bind(null, record),
|
||||||
}, {
|
},
|
||||||
|
// {
|
||||||
|
// label: '填写后详情',
|
||||||
|
// onClick: handleDetail.bind(null, record),
|
||||||
|
// },
|
||||||
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
placement: 'topRight',
|
placement: 'topRight',
|
||||||
|
|
|
@ -23,15 +23,23 @@
|
||||||
自增多行文本 8
|
自增多行文本 8
|
||||||
自增表格 9
|
自增表格 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-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-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="margin-bottom: 15px; height: 40px; background-color: #f5f7fa; border-left: 3px solid #19a789">
|
||||||
<span class="title">{{ item.title }}</span>
|
<span class="title">{{ item.title }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- 单行文本 1 -->
|
<!-- 单行文本 1 -->
|
||||||
<a-col v-if="item.type === '1'" :span="24">
|
<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>
|
</a-col>
|
||||||
<!-- 多行文本 2 -->
|
<!-- 多行文本 2 -->
|
||||||
<a-col v-else-if="item.type === '2'" :span="24">
|
<a-col v-else-if="item.type === '2'" :span="24">
|
||||||
|
@ -68,9 +76,15 @@
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-button type="primary" @click="handleDhwb(item)" class="increase">添加</a-button>
|
<a-button type="primary" @click="handleDhwb(item)" class="increase">添加</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-for="(item2, index2) in item.list" :key="index2" >
|
<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-input
|
||||||
<a-button type="danger" @click="handleDhwbDel(item, index2)" style="margin:10px 0;text-align:right;">删除</a-button>
|
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-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -80,9 +94,9 @@
|
||||||
<a-col>
|
<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>
|
||||||
<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" />
|
<j-editor placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" style="width: 500px; height: 200px" />
|
||||||
<a-button type="danger" @click="handleDhfwbDel(item, index2)" class="place-dele" >删除</a-button>
|
<a-button type="danger" @click="handleDhfwbDel(item, index2)" class="place-dele">删除</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -92,7 +106,7 @@
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-button type="primary" @click="handleDhwbArea(item)" class="increase">添加</a-button>
|
<a-button type="primary" @click="handleDhwbArea(item)" class="increase">添加</a-button>
|
||||||
</a-col>
|
</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-textarea placeholder="请输入内容" v-model:value="item2.title" :disabled="disabled" />
|
||||||
<a-button type="danger" @click="handleDhwbAreaDel(item, index2)" class="place-dele">删除</a-button>
|
<a-button type="danger" @click="handleDhwbAreaDel(item, index2)" class="place-dele">删除</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -119,7 +133,7 @@
|
||||||
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<a-button type="danger" @click="handleZzbgDel(item.list, record.sort)" >删除</a-button>
|
<a-button type="danger" @click="handleZzbgDel(item.list, record.sort)">删除</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<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>
|
||||||
|
@ -145,7 +159,13 @@
|
||||||
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
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 { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
||||||
import { zyJxdgMainColumns } from '../ZyJxdgBanben.data';
|
import { zyJxdgMainColumns } from '../ZyJxdgBanben.data';
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
|
@ -216,21 +236,31 @@ export default defineComponent({
|
||||||
|
|
||||||
async function edit(row) {
|
async function edit(row) {
|
||||||
oldInfo.value = row;
|
oldInfo.value = row;
|
||||||
row.rwbh = '202320242000629';
|
oldInfo.value.rwbh = '202320242000629';
|
||||||
row.teacherNo = '2002900106';
|
oldInfo.value.teacherNo = '1001901726';
|
||||||
|
oldInfo.value.banbenId = row.id;
|
||||||
|
row.rwbh = oldInfo.value.rwbh;
|
||||||
|
row.teacherNo = oldInfo.value.teacherNo;
|
||||||
//主表数据
|
//主表数据
|
||||||
await queryMainData(row);
|
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);
|
console.log('💁♀️', zyJxdgMainDataList);
|
||||||
zyJxdgMainTable.dataSource = [...zyJxdgMainDataList];
|
zyJxdgMainTable.dataSource = [...zyJxdgMainDataList];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function queryMainData(record) {
|
async function queryMainData(record) {
|
||||||
const row = await queryDataById2(record);
|
const row = await queryDataById2(record);
|
||||||
Object.keys(row).map((k) => {
|
if (row) {
|
||||||
formData[k] = row[k];
|
Object.keys(row).map((k) => {
|
||||||
});
|
formData[k] = row[k];
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
|
const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
|
||||||
|
@ -246,17 +276,14 @@ export default defineComponent({
|
||||||
const alllist = zyJxdgMainTable.dataSource;
|
const alllist = zyJxdgMainTable.dataSource;
|
||||||
console.log('✋', alllist);
|
console.log('✋', alllist);
|
||||||
|
|
||||||
var values = {
|
var values = {};
|
||||||
id: '',
|
|
||||||
rwbh: '',
|
|
||||||
banbenId: '',
|
|
||||||
teacherNo: '',
|
|
||||||
sffb: '',
|
|
||||||
list: alllist,
|
|
||||||
};
|
|
||||||
const mainData = await getFormData();
|
const mainData = await getFormData();
|
||||||
|
console.log('🧙♀️', mainData);
|
||||||
values = mainData;
|
values = mainData;
|
||||||
|
values.rwbh = oldInfo.value.rwbh;
|
||||||
|
values.banbenId = oldInfo.value.banbenId;
|
||||||
values.list = alllist;
|
values.list = alllist;
|
||||||
|
// values.teacherNo = oldInfo.value.teacherNo;
|
||||||
// const subData = zyJxdgMainTable.dataSource;
|
// const subData = zyJxdgMainTable.dataSource;
|
||||||
// const values = Object.assign({}, dbData, mainData);
|
// const values = Object.assign({}, dbData, mainData);
|
||||||
// values.zyJxdgMainList = subData;
|
// values.zyJxdgMainList = subData;
|
||||||
|
@ -434,7 +461,7 @@ export default defineComponent({
|
||||||
var item1 = list1[i];
|
var item1 = list1[i];
|
||||||
var item2 = alllist[j]; //具体数据
|
var item2 = alllist[j]; //具体数据
|
||||||
item2.list = item2.list || [];
|
item2.list = item2.list || [];
|
||||||
|
|
||||||
if (item2.guanlian == sort) {
|
if (item2.guanlian == sort) {
|
||||||
//判断当前项是否等于关联项
|
//判断当前项是否等于关联项
|
||||||
var item3 = item.zyJxdgPzxxList;
|
var item3 = item.zyJxdgPzxxList;
|
||||||
|
@ -503,31 +530,31 @@ export default defineComponent({
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height:40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
.tishi {
|
.tishi {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
.tishi span{
|
.tishi span {
|
||||||
margin: 0 15px;
|
margin: 0 15px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #ff9924;
|
color: #ff9924;
|
||||||
}
|
}
|
||||||
.increase{
|
.increase {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right:6px;
|
right: 6px;
|
||||||
top:-51px;
|
top: -51px;
|
||||||
|
}
|
||||||
|
.place-dele {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
.Sheet {
|
||||||
|
color: #91949a;
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.place-dele{
|
|
||||||
margin:10px 0;
|
|
||||||
}
|
|
||||||
.Sheet{
|
|
||||||
color:#91949a;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -45,6 +45,12 @@
|
||||||
</template>
|
</template>
|
||||||
<span @click="getGzt('kcjc')">课堂测验</span>
|
<span @click="getGzt('kcjc')">课堂测验</span>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
<!-- <a-menu-item key="sub5">
|
||||||
|
<template #icon>
|
||||||
|
<AppstoreAddOutlined />
|
||||||
|
</template>
|
||||||
|
<span @click="getGzt('gongju')">到课识别率</span>
|
||||||
|
</a-menu-item> -->
|
||||||
<!-- <a-sub-menu key="sub3">
|
<!-- <a-sub-menu key="sub3">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PieChartOutlined />
|
<PieChartOutlined />
|
||||||
|
|
Loading…
Reference in New Issue