|
@@ -1,4 +1,4 @@
|
|
-
|
|
|
|
|
|
+<!DOCTYPE html>
|
|
<html>
|
|
<html>
|
|
<head>
|
|
<head>
|
|
<title>私塾家</title>
|
|
<title>私塾家</title>
|
|
@@ -98,11 +98,11 @@
|
|
<el-table-column type="expand">
|
|
<el-table-column type="expand">
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
<el-form label-position="left" inline class="demo-table-expand unit_item">
|
|
<el-form label-position="left" inline class="demo-table-expand unit_item">
|
|
- <div v-for="(item,index) in props.row.unitList">
|
|
|
|
|
|
+ <div v-for="(item,index) in props.row.unitList" :key="index">
|
|
<el-form-item label="单元名称">
|
|
<el-form-item label="单元名称">
|
|
<span :title="item.unitName">{{ item.unitName}}</span>
|
|
<span :title="item.unitName">{{ item.unitName}}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item v-if="item.videoList&&(item.videoList[0].videoLink!=''||item.videoList[0].videoName!='')">
|
|
|
|
|
|
+ <el-form-item v-if="item.videoList.length>0&&(item.videoList[0].videoLink!=''||item.videoList[0].videoName!='')">
|
|
<div class="link link2"><i class="el-icon-link"></i> <a target="_blank" :href="item.videoList[0].videoLink"><span :title="item.videoList[0].videoName">{{item.videoList[0].videoName}}</span></a></div>
|
|
<div class="link link2"><i class="el-icon-link"></i> <a target="_blank" :href="item.videoList[0].videoLink"><span :title="item.videoList[0].videoName">{{item.videoList[0].videoName}}</span></a></div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item style="float:right">
|
|
<el-form-item style="float:right">
|
|
@@ -136,7 +136,7 @@
|
|
label="链接"
|
|
label="链接"
|
|
align="center" width="130">
|
|
align="center" width="130">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div class="link"><i class="el-icon-link"></i> <a target="_blank" :href="scope.row.materialLink">教材链接</a></div>
|
|
|
|
|
|
+ <div class="link" v-if='scope.row.materialLink'><i class="el-icon-link"></i> <a target="_blank" :href="scope.row.materialLink">教材链接</a></div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -163,7 +163,6 @@
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
- </template>
|
|
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="复习" name="second">
|
|
<el-tab-pane label="复习" name="second">
|
|
@@ -209,7 +208,6 @@
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
- </template>
|
|
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
@@ -378,9 +376,9 @@
|
|
volume: [
|
|
volume: [
|
|
{ required: true, message: '请选择上下册', trigger: 'change' },
|
|
{ required: true, message: '请选择上下册', trigger: 'change' },
|
|
],
|
|
],
|
|
- link: [
|
|
|
|
- { required: true, message: '请输入链接', trigger: 'blur' },
|
|
|
|
- ],
|
|
|
|
|
|
+ // link: [
|
|
|
|
+ // { required: true, message: '请输入链接', trigger: 'blur' },
|
|
|
|
+ // ],
|
|
},
|
|
},
|
|
activeName:'first',
|
|
activeName:'first',
|
|
tabPosition:'语文',
|
|
tabPosition:'语文',
|
|
@@ -432,66 +430,6 @@
|
|
}
|
|
}
|
|
],
|
|
],
|
|
expands:[],
|
|
expands:[],
|
|
- tableData: [{
|
|
|
|
- "id": "xxx",
|
|
|
|
- "subject": "科目",
|
|
|
|
- "versionType": "版本数字描述",
|
|
|
|
- "versionName": "版本文字描述",
|
|
|
|
- "grade":"年级",
|
|
|
|
- "semester":1,
|
|
|
|
- "materialLink":"http://baidu.com",
|
|
|
|
- "unitList":[
|
|
|
|
- {"id": "xxx",
|
|
|
|
- "unitId":"单元Id",
|
|
|
|
- "versionType": "版本数字描述",
|
|
|
|
- "versionName": "版本文字描述",
|
|
|
|
- "grade":"年级",
|
|
|
|
- "unitName":"单元",
|
|
|
|
- "videoList":[
|
|
|
|
- {'videoLink':"",
|
|
|
|
- 'videoName':""}
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {"id": "xxx",
|
|
|
|
- "unitId":"单元Id",
|
|
|
|
- "versionType": "版本数字描述",
|
|
|
|
- "versionName": "版本文字描述",
|
|
|
|
- "grade":"年级",
|
|
|
|
- "unitName":"单元",
|
|
|
|
- "videoList":[
|
|
|
|
- {'videoLink':"21312",
|
|
|
|
- 'videoName':""}
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- //"subject": "科目",
|
|
|
|
- //"versionType": "版本数字描述",
|
|
|
|
- //"versionName": "版本文字描述"
|
|
|
|
- },{
|
|
|
|
- "id": "xxx",
|
|
|
|
- "subject": "科目",
|
|
|
|
- "versionType": "版本数字描述",
|
|
|
|
- "versionName": "版本文字描述",
|
|
|
|
- "grade":"年级",
|
|
|
|
- "semester":1,
|
|
|
|
- "materialLink":"http://baidu.com",
|
|
|
|
- "unitList":[
|
|
|
|
- {"id": "xxx",
|
|
|
|
- "unitId":"单元Id",
|
|
|
|
- "versionType": "版本数字描述",
|
|
|
|
- "versionName": "版本文字描述",
|
|
|
|
- "grade":"年级",
|
|
|
|
- "unitName":"单元",
|
|
|
|
- "videoList":[
|
|
|
|
- {'videoLink':"21312",
|
|
|
|
- 'videoName':""}
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- //"subject": "科目",
|
|
|
|
- //"versionType": "版本数字描述",
|
|
|
|
- //"versionName": "版本文字描述"
|
|
|
|
- }],
|
|
|
|
tableData_p:[],
|
|
tableData_p:[],
|
|
tableData_r:[],
|
|
tableData_r:[],
|
|
material_title:'添加教材',
|
|
material_title:'添加教材',
|
|
@@ -578,7 +516,8 @@
|
|
});
|
|
});
|
|
|
|
|
|
var data={params:param};
|
|
var data={params:param};
|
|
- var Host='[[${sysUrl}]]'
|
|
|
|
|
|
+ var Host='[[${sysUrl}]]/sys';
|
|
|
|
+ axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
axios.get(Host+url,data,successFunction)
|
|
axios.get(Host+url,data,successFunction)
|
|
.then((response)=> {
|
|
.then((response)=> {
|
|
loading.close();
|
|
loading.close();
|
|
@@ -619,12 +558,14 @@
|
|
spinner: 'el-icon-loading',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(0, 0, 0, 0)'
|
|
background: 'rgba(0, 0, 0, 0)'
|
|
});
|
|
});
|
|
- var Host='[[${sysUrl}]]'
|
|
|
|
|
|
+ var Host='[[${sysUrl}]]/sys';
|
|
|
|
+ axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
axios.post(Host+url,param,config)
|
|
axios.post(Host+url,param,config)
|
|
.then((response)=> {
|
|
.then((response)=> {
|
|
successFunction(response.data);
|
|
successFunction(response.data);
|
|
loading.close();
|
|
loading.close();
|
|
}).catch((res)=>{
|
|
}).catch((res)=>{
|
|
|
|
+
|
|
loading.close();
|
|
loading.close();
|
|
if(typeof(errorFunction) == 'function'){
|
|
if(typeof(errorFunction) == 'function'){
|
|
errorFunction(res);
|
|
errorFunction(res);
|
|
@@ -716,7 +657,6 @@
|
|
this.page_p.total = data.total;
|
|
this.page_p.total = data.total;
|
|
if(expand){
|
|
if(expand){
|
|
this.expands=[expand];
|
|
this.expands=[expand];
|
|
- console.log(this.expands)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -850,6 +790,32 @@
|
|
submit_addUnit(formName){
|
|
submit_addUnit(formName){
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ var flag='1';
|
|
|
|
+ this.videoList.forEach(element => {
|
|
|
|
+ if(element.videoLink==''&&element.videoName!=''){
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: `请输入视频${element.videoName}的视频链接`
|
|
|
|
+ });
|
|
|
|
+ flag='2';
|
|
|
|
+ }
|
|
|
|
+ if(element.videoLink!=''&&element.videoName==''){
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: `请输入视频链接为${element.videoLink}的视频名称`
|
|
|
|
+ });
|
|
|
|
+ flag=2;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if(flag==2){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var unitList=[];
|
|
|
|
+ this.videoList.forEach(element => {
|
|
|
|
+ if(element.videoLink!=''||element.videoName!=''){
|
|
|
|
+ unitList.push(element);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
this.post(
|
|
this.post(
|
|
"/summerVacation/edit/preUnitVersion",
|
|
"/summerVacation/edit/preUnitVersion",
|
|
{
|
|
{
|
|
@@ -857,7 +823,7 @@
|
|
unitName:this.unit_form.unitName,
|
|
unitName:this.unit_form.unitName,
|
|
unitId:this.unit_form.unitId,
|
|
unitId:this.unit_form.unitId,
|
|
parentId:this.unit_form.parentId,
|
|
parentId:this.unit_form.parentId,
|
|
- unitList:this.videoList,
|
|
|
|
|
|
+ unitList:unitList,
|
|
},
|
|
},
|
|
(data) => {
|
|
(data) => {
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|