video table
This commit is contained in:
parent
141d2aadfc
commit
27ba3d1d34
|
@ -74,7 +74,7 @@
|
||||||
:limit.sync="listQuery.limit"
|
:limit.sync="listQuery.limit"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
<el-dialog :visible.sync="dialogVisible" :title="dialogType==='update'?'编辑':'新增'">
|
<el-dialog :visible.sync="dialogVisible" :title="dialogType==='update'?'编辑':'新增'" :close-on-click-modal="false">
|
||||||
<el-form
|
<el-form
|
||||||
ref="Form"
|
ref="Form"
|
||||||
:model="material"
|
:model="material"
|
||||||
|
@ -120,7 +120,8 @@ const defaultmaterial = {
|
||||||
id:null,
|
id:null,
|
||||||
name:null,
|
name:null,
|
||||||
description:null,
|
description:null,
|
||||||
path:null
|
path:null,
|
||||||
|
type:'文档'
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.0.4 on 2020-08-11 00:35
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cms', '0006_auto_20200626_1741'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='material',
|
||||||
|
name='poster',
|
||||||
|
field=models.CharField(blank=True, max_length=10000, null=True, verbose_name='封面地址'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='material',
|
||||||
|
name='type',
|
||||||
|
field=models.CharField(default='文档', max_length=50, verbose_name='格式'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -25,7 +25,15 @@ class Material(CommonModel):
|
||||||
"""
|
"""
|
||||||
学习资料
|
学习资料
|
||||||
"""
|
"""
|
||||||
|
type_choices = (
|
||||||
|
('文档', '文档'),
|
||||||
|
('视频', '视频'),
|
||||||
|
('图片', '图片'),
|
||||||
|
('音乐', '音乐'),
|
||||||
|
)
|
||||||
name = models.CharField(max_length=200, verbose_name='标题', unique=True)
|
name = models.CharField(max_length=200, verbose_name='标题', unique=True)
|
||||||
description = models.TextField('描述', null=True, blank=True)
|
description = models.TextField('描述', null=True, blank=True)
|
||||||
path = models.CharField(max_length=1000, verbose_name='文件地址')
|
path = models.CharField(max_length=1000, verbose_name='文件地址')
|
||||||
|
poster = models.CharField(max_length=10000, verbose_name='封面地址', null=True, blank=True)
|
||||||
|
type = models.CharField('格式', default='文档', max_length=50)
|
||||||
down_count = models.IntegerField('阅读量', default=0)
|
down_count = models.IntegerField('阅读量', default=0)
|
||||||
|
|
Loading…
Reference in New Issue