Compare commits

..

No commits in common. "f0da01456699ca577887aa4216ca267a2f61ae9a" and "2a1f7ef33f9226279b035626ff1aac6c07f5135e" have entirely different histories.

4 changed files with 54 additions and 88 deletions

View File

@ -16,7 +16,6 @@ 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',
} }
/** /**
@ -36,7 +35,6 @@ 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});
/** /**
* *

View File

@ -127,7 +127,7 @@
openModal4(true, { openModal4(true, {
record, record,
isUpdate: true, isUpdate: true,
showFooter: true, showFooter: false,
}); });
} }
@ -167,13 +167,12 @@
}, },
{ {
label: '模仿教师填写', label: '模仿教师填写',
onClick: handleDetail.bind(null, record), onClick: handleTianxie.bind(null, record),
}, },
// {
// label: '',
// onClick: handleDetail.bind(null, record),
// },
{ {
label: '填写后详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除', label: '删除',
popConfirm: { popConfirm: {
placement: 'topRight', placement: 'topRight',

View File

@ -23,23 +23,15 @@
自增多行文本 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 <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;">
: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="height:40px;line-height:40px;border-bottom:1px solid #edf0f6; margin-bottom:10px;">
<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">
@ -64,7 +56,7 @@
<a-col v-else-if="item.type === '5'" :span="24"> <a-col v-else-if="item.type === '5'" :span="24">
<a-table :columns="getTableColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false"> <a-table :columns="getTableColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 80%"></a-input> <a-input placeholder="请输入内容" v-model:value="record[column.key]" style="width: 80%;color:#999"></a-input>
<!-- <template v-if="column.key === 'name'"> <!-- <template v-if="column.key === 'name'">
</template> --> </template> -->
</template> </template>
@ -76,15 +68,10 @@
<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 <a-input placeholder="请输入内容" v-model:value="item2.title" class="Sheet" style="width: 80%; margin: 0 10px 10px 15px; " @blur="handleGlxm(item)"></a-input>
placeholder="请输入内容" <button type="danger" @click="handleDhwbDel(item, index2)" class="ant-btn">删除</button>
v-model:value="item2.title" <div preIcon="ant-design:plus-outlined"></div>
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>
@ -94,9 +81,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> <button type="danger" @click="handleDhfwbDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -106,9 +93,9 @@
<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;color:#666">
<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> <button type="danger" @click="handleDhwbAreaDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -119,10 +106,10 @@
<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> <button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
</template> </template>
<template v-else> <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>
</template> </template>
</a-table> </a-table>
@ -133,10 +120,10 @@
<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> <button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</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%;color:#666"></a-input>
</template> </template>
</template> </template>
</a-table> </a-table>
@ -159,13 +146,7 @@
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 { import { queryZyJxdgMainListByMainId, queryZyJxdgMainListByMainId2, saveOrUpdate2, queryDataById2 } from '../ZyJxdgBanben.api';
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';
@ -236,32 +217,22 @@ export default defineComponent({
async function edit(row) { async function edit(row) {
oldInfo.value = row; oldInfo.value = row;
oldInfo.value.rwbh = '202320242000629'; row.rwbh = '202320242000629';
oldInfo.value.teacherNo = '1001901726'; row.teacherNo = '2002900106';
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 queryZyJxdgMainListByMainId3(params); const zyJxdgMainDataList = await queryZyJxdgMainListByMainId2(row['rwbh'], row['teacherNo']);
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);
if (row) {
Object.keys(row).map((k) => { Object.keys(row).map((k) => {
formData[k] = row[k]; formData[k] = row[k];
}); });
} }
}
const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, { const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
zyJxdgMain: zyJxdgMainTableRef, zyJxdgMain: zyJxdgMainTableRef,
@ -276,14 +247,17 @@ 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;
@ -525,12 +499,10 @@ export default defineComponent({
<style scoped lang="less" > <style scoped lang="less" >
.title { .title {
width: 80%; width: 80%;
font-size: 16px; font-size:16px;
font-weight: bold; padding-left:20px;
padding-left: 10px;
position: relative; position: relative;
color: #333333; color: #333333;
line-height: 40px;
} }
.tishi { .tishi {
width: 100%; width: 100%;
@ -540,21 +512,24 @@ export default defineComponent({
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:-46px;
} }
.place-dele { .place-dele{
margin: 10px 0; margin:10px 0;
} }
.Sheet { .Sheet{
color: #91949a; color:#999;
border-radius: 4px; border-radius: 4px;
} }
.ant-btn{
color: #666;
}
</style> </style>

View File

@ -45,12 +45,6 @@
</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 />