This commit is contained in:
kbing1981 2024-08-23 20:38:57 +08:00
parent f0da014566
commit d566862448
2 changed files with 49 additions and 45 deletions

View File

@ -16,17 +16,17 @@
</div>
<div v-if="showType == 1">
<a-row>
<a-col :span="24">
<a-col :span="24" >
<span class="title">填写教学大纲内容</span>
<a-button type="primary" @click="init" style="float: right; margin-right: 8px"> <Icon icon="ant-design:export-outlined" />返回 </a-button>
<a-button type="primary" @click="init" style="float: right; margin-right: 8px;margin-top:-6px"> <Icon icon="ant-design:export-outlined" />返回 </a-button>
<a-divider />
</a-col>
<a-col :span="24">
<a-row>
<a-col :span="24">
<span style="margin:10px;">请选择填写的教学大纲版本</span>
<div style="width:100%;padding:2px 20px;color:#666;font-size:14px;background:#f6f6f6;"><span>请选择填写的教学大纲版本</span></div>
</a-col>
<a-col :span="24">
<a-col :span="23" style="margin:0 auto;border:1px solid #eceff6;border-radius:4px;margin-top:8px">
<a-table :columns="jxdgbbColumns" :dataSource="jxdgbbDataSource" :pagination="false">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -39,13 +39,13 @@
</a-col>
<a-col>
<a-row>
<a-col :span="24" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index">
<a-col :span="23" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index" style="margin:8px auto; background:#fff;border:1px solid #eee;">
<a-row>
<a-col :span="24" style="margin-bottom: 15px; height: 40px; margin-top: 15px; background-color: rgba(1, 156, 136, 0.1)">
<a-col :span="24" style="height: 40px; line-height:40px; background-color:#f6f6f6">
<span class="title">{{ item.title }}</span>
</a-col>
<!-- 单行文本 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%" @blur="handleGlxm(item)"></a-input>
</a-col>
<!-- 多行文本 2 -->
@ -57,7 +57,7 @@
<j-editor placeholder="请输入内容" v-model:value="item.content" :disabled="disabled" />
</a-col>
<!-- 固定表单基础信息 4 -->
<a-col v-else-if="item.type === '4'" v-model:value="item.content" :span="24">
<a-col v-else-if="item.type === '4'" v-model:value="item.content" :span="24" >
<a-form v-bind="formItemLayout">
<a-row>
<a-col v-for="(item2, index2) in item.zyJxdgPzxxList" :key="index2" :span="12">
@ -85,11 +85,11 @@
<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"
v-model:value="item2.title" class="form-pattern"
style="width: 80%; margin: 0 10px 5px 20px"
@blur="handleGlxm(item)"
></a-input>
<a-button type="danger" @click="handleDhwbDel(item, index2)">删除</a-button>
<button type="danger" @click="handleDhwbDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
</a-col>
</a-row>
</a-col>
@ -99,9 +99,9 @@
<a-col>
<a-button type="primary" @click="handleDhfwb(item)" class="increase" preIcon="ant-design:plus-outlined">添加</a-button>
</a-col>
<a-col v-for="(item2, index2) in item.list" :key="index2">
<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" />
<a-button type="danger" @click="handleDhfwbDel(item, index2)" style="margin-top: 10px"></a-button>
<button type="danger" @click="handleDhfwbDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
</a-col>
</a-row>
</a-col>
@ -113,7 +113,7 @@
</a-col>
<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>
<button type="danger" @click="handleDhwbAreaDel(item, index2)" class="ant-btn" style="margin:8px 0">删除</button>
</a-col>
</a-row>
</a-col>
@ -124,7 +124,7 @@
<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>
@ -138,7 +138,7 @@
<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
@ -173,34 +173,34 @@
<a-col :span="24">
<span class="title">教学大纲内容</span>
<a-button type="primary" @click="handleShowType(2)" style="float: right; margin-right: 8px"> <Icon icon="ant-design:form-outlined" />编辑 </a-button>
<a-button type="primary" @click="handleFabu(1)" style="float: right; margin-right: 8px" v-if="jxdgInfo.sffb == '0'"> <Icon icon="ant-design:check-outlined"/>发布 </a-button>
<a-button type="primary" @click="handleFabu(1)" style="float: right; margin-right: 8px;" v-if="jxdgInfo.sffb == '0'"> <Icon icon="ant-design:check-outlined"/>发布 </a-button>
<a-button type="primary" @click="handleFabu(0)" style="float: right; margin-right: 8px" v-if="jxdgInfo.sffb == '1'"> <Icon icon="ant-design:export-outlined"/>撤销</a-button>
<a-divider />
</a-col>
<a-col :span="24" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index">
<a-col :span="23" v-for="(item, index) in zyJxdgMainTable.dataSource" :key="index" style="margin:8px auto; background:#fff;border:1px solid #eee;">
<a-row>
<a-col :span="24" style="margin-bottom: 15px; height: 40px; margin-top: 15px; background-color: rgba(1, 156, 136, 0.1)">
<a-col :span="24" style="height: 40px; line-height:40px; background-color:#f6f6f6">
<span class="title">{{ item.title }}</span>
</a-col>
<!-- 单行文本 1 -->
<a-col v-if="item.type === '1'" :span="24" style="margin: 10px; ">
<span v-text="item.content"></span>
<a-col v-if="item.type === '1'" :span="24" style="margin: 10px;">
<span class="Text-Content" v-text="item.content"></span>
</a-col>
<!-- 多行文本 2 -->
<a-col v-else-if="item.type === '2'" :span="24" style="margin: 10px; ">
<span v-text="item.content"></span>
<span class="Text-Content" v-text="item.content"></span>
</a-col>
<!-- 富文本 3 -->
<a-col v-else-if="item.type === '3'" :span="24">
<div v-html="item.content"></div>
<div class="Text-Content" v-html="item.content"></div>
</a-col>
<!-- 固定表单基础信息 4 -->
<a-col v-else-if="item.type === '4'" v-model:value="item.content" :span="24">
<a-form v-bind="formItemLayout">
<a-row>
<a-col v-for="(item2, index2) in item.zyJxdgPzxxList" :key="index2" :span="12">
<a-form-item :label="item2.title" >
<span v-text="item2.content"></span>
<a-form-item :label="item2.title">
<span class="Text-Content" v-text="item2.content"></span>
</a-form-item>
</a-col>
</a-row>
@ -218,7 +218,7 @@
<a-col v-else-if="item.type === '6'" :span="24">
<a-row>
<a-col v-for="(item2, index2) in item.list" :key="index2" style="margin: 10px; ">
<span v-text="item2.title"></span>
<span class="Text-Content" v-text="item2.title"></span>
</a-col>
</a-row>
</a-col>
@ -226,7 +226,7 @@
<a-col v-else-if="item.type === '7'" :span="24">
<a-row>
<a-col v-for="(item2, index2) in item.list" :key="index2">
<div v-html="item2.title"></div>
<div class="Text-Content" v-html="item2.title"></div>
</a-col>
</a-row>
</a-col>
@ -234,7 +234,7 @@
<a-col v-else-if="item.type === '8'" :span="24">
<a-row>
<a-col v-for="(item2, index2) in item.list" :key="index2" style="margin: 10px; ">
<span v-text="item2.title"></span>
<span class="Text-Content" v-text="item2.title"></span>
</a-col>
</a-row>
</a-col>
@ -576,9 +576,10 @@ onMounted(() => {
</script>
<style lang="less" scoped>
.title {
height: 35px;
line-height: 35px;
margin-left: 20px;
font-size: 16px;
font-weight: bold;
}
.title2 {
font-size: 16px;
@ -591,15 +592,6 @@ onMounted(() => {
min-width: 100%;
margin: 3px 0 5px;
}
.tishi {
width: 100%;
font-size: 12px;
color: #fd8f02;
margin-top: -4px;
background: #fffbf2;
text-align: center;
padding: 6px 0;
}
.cardClass {
min-height: 200px;
}
@ -747,22 +739,32 @@ onMounted(() => {
}
.tishi {
width: 100%;
display: flex;
flex-direction: column;
text-align: left;
margin: 5px;
background: #fff8ef;
color: #fd8f02;
}
.tishi span{
font-size: 12px;
color: #fd8f02;
text-indent: 10px;
padding: 8px;
}
.increase{
position: absolute;
right:6px;
top:-51px;
top:-36px;
}
.place-dele{
margin:10px 0;
}
.form-pattern{
color: #666;
}
.Text-Content{
padding: 10px;
color: #888;
}
</style>

View File

@ -51,7 +51,7 @@
<a-input v-model:value="item.tsy" placeholder="请输入提示语" :disabled="disabled" class="Prompt-language" />
</a-col>
<a-col :span="3">
<a-button type="danger" @click="handleOneDel(item,index)" style="margin-left:10px">删除</a-button>
<button type="danger" @click="handleOneDel(item,index)" class="ant-btn" style="margin-left:10px">删除</button>
</a-col>
<!--
单行文本 1 a
@ -67,7 +67,7 @@
-->
<a-col v-if="item.type==='4' || item.type==='5' || item.type==='9'|| item.type==='10'">
<a-row>
<a-col :span="24" style="margin:15px 0 0px 0px;">
<a-col :span="24">
<a-button type="primary" @click="handleTwoType(item)" class="margin10" preIcon="ant-design:plus-outlined">新增字段</a-button>
</a-col>
<a-col :span="24" v-for="(twoItem,index2) in item.zyJxdgPzxxList" :key="index2">
@ -75,8 +75,8 @@
<a-col :span="21">
<a-input v-model:value="twoItem.title" placeholder="请输入选项" :disabled="disabled" class="fields-add"/>
</a-col>
<a-col :span="3">
<a-button type="danger" @click="handleTwoDel(item,index2)" style="margin-left:10px">删除</a-button>
<a-col :span="3"><close-outlined />
<button type="danger" @click="handleTwoDel(item,index2)" class="ant-btn" style="margin-left:10px">删除</button>
</a-col>
</a-row>
</a-col>
@ -305,10 +305,12 @@
.Prompt-language{
color: #bda787;
font-size:14px;
padding: 6px;
}
.explain-word{
color:#ff9924;
font-size:12px;
}
.ant-btn{
color: #666;
}
</style>