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',
queryDataById2 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryByRwbh',
queryZyJxdgMainListByMainId2 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryByRwbhList',
queryZyJxdgMainListByMainId3 = '/zyJxdgTeacherMain/zyJxdgTeacherMain/queryZyJxdgMainListByMainId3',
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 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, {
record,
isUpdate: true,
showFooter: true,
showFooter: false,
});
}
@ -167,13 +167,12 @@
},
{
label: '模仿教师填写',
onClick: handleDetail.bind(null, record),
onClick: handleTianxie.bind(null, record),
},
// {
// label: '',
// onClick: handleDetail.bind(null, record),
// },
{
label: '填写后详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
placement: 'topRight',

View File

@ -23,23 +23,15 @@
自增多行文本 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="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>
</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">
@ -64,7 +56,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%"></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> -->
</template>
@ -76,15 +68,10 @@
<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>
<a-button type="danger" @click="handleDhwbDel(item, index2)" style="margin: 10px 0; text-align: right">删除</a-button>
<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>
</a-row>
</a-col>
@ -94,9 +81,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" />
<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-row>
</a-col>
@ -106,9 +93,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;color:#666">
<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>
@ -119,10 +106,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>
@ -133,10 +120,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>
@ -159,13 +146,7 @@
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
import {
queryZyJxdgMainListByMainId,
queryZyJxdgMainListByMainId2,
queryZyJxdgMainListByMainId3,
saveOrUpdate2,
queryDataById2,
} from '../ZyJxdgBanben.api';
import { queryZyJxdgMainListByMainId, queryZyJxdgMainListByMainId2, 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';
@ -236,31 +217,21 @@ export default defineComponent({
async function edit(row) {
oldInfo.value = row;
oldInfo.value.rwbh = '202320242000629';
oldInfo.value.teacherNo = '1001901726';
oldInfo.value.banbenId = row.id;
row.rwbh = oldInfo.value.rwbh;
row.teacherNo = oldInfo.value.teacherNo;
row.rwbh = '202320242000629';
row.teacherNo = '2002900106';
//
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);
zyJxdgMainTable.dataSource = [...zyJxdgMainDataList];
}
async function queryMainData(record) {
const row = await queryDataById2(record);
if (row) {
Object.keys(row).map((k) => {
formData[k] = row[k];
});
}
Object.keys(row).map((k) => {
formData[k] = row[k];
});
}
const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
@ -276,14 +247,17 @@ export default defineComponent({
const alllist = zyJxdgMainTable.dataSource;
console.log('✋', alllist);
var values = {};
var values = {
id: '',
rwbh: '',
banbenId: '',
teacherNo: '',
sffb: '',
list: alllist,
};
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;
@ -461,7 +435,7 @@ export default defineComponent({
var item1 = list1[i];
var item2 = alllist[j]; //
item2.list = item2.list || [];
if (item2.guanlian == sort) {
//
var item3 = item.zyJxdgPzxxList;
@ -525,36 +499,37 @@ export default defineComponent({
<style scoped lang="less" >
.title {
width: 80%;
font-size: 16px;
font-weight: bold;
padding-left: 10px;
font-size:16px;
padding-left:20px;
position: relative;
color: #333333;
line-height: 40px;
}
.tishi {
width: 100%;
display: flex;
flex-direction: column;
flex-direction: column;
text-align: left;
margin: 5px;
margin: 10px 0;
}
.tishi span {
.tishi span{
margin: 0 15px;
font-size: 12px;
color: #ff9924;
}
.increase {
.increase{
position: absolute;
right: 6px;
top: -51px;
}
.place-dele {
margin: 10px 0;
}
.Sheet {
color: #91949a;
border-radius: 4px;
right:6px;
top:-46px;
}
.place-dele{
margin:10px 0;
}
.Sheet{
color:#999;
border-radius: 4px;
}
.ant-btn{
color: #666;
}
</style>

View File

@ -45,12 +45,6 @@
</template>
<span @click="getGzt('kcjc')">课堂测验</span>
</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">
<template #icon>
<PieChartOutlined />