提交 87e19558 authored 作者: matian's avatar matian

Auto stash before merge of "master" and "origin/master"

上级 76177b2a
......@@ -111,17 +111,17 @@ onMounted(() => {
</el-form>
<el-card>
<div class="form_title">讲授课程:</div>
<AppList v-bind="listOptions" ref="appList">
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #header-aside> </template>
<template #table-operate="{ row }">
<el-space>
<router-link to="/admin/teacher/detail">
<el-button type="primary" plain>查看</el-button>
<el-link type="primary" plain>查看</el-link>
</router-link>
<router-link to="/admin/teacher/update">
<el-button type="primary" plain>更新</el-button>
<el-link type="primary" plain>更新</el-link>
</router-link>
<el-button type="primary" plain @click="handleDelete(row)">删除</el-button>
<el-link type="primary" plain @click="handleDelete(row)">删除</el-link>
</el-space>
</template>
</AppList>
......
......@@ -61,18 +61,17 @@ const handleDetail = (row: any) => {
<template>
<AppCard title="讲师管理">
<AppList v-bind="listOptions" ref="appList">
<AppList v-bind="listOptions" ref="appList" border stripe>
<router-link to="/admin/teacher/add">
<el-button type="primary" round>添加讲师</el-button>
<el-button type="primary" round style="margin-bottom: 20px">添加讲师</el-button>
</router-link>
<template #header-aside> </template>
<template #table-img="{ row }"> <img :src="row.avatar" alt="" style="width: 100%" /></template>
<template #table-operate="{ row }">
<el-space>
<el-button type="primary" plain @click="handleDetail(row)">查看</el-button>
<el-button type="primary" plain @click="handleUpdate(row)">更新</el-button>
<el-button type="primary" plain @click="handleDelete(row)">删除</el-button>
<el-link type="primary" plain @click="handleDetail(row)">查看</el-link>
<el-link type="primary" plain @click="handleUpdate(row)">更新</el-link>
<el-link type="primary" plain @click="handleDelete(row)">删除</el-link>
</el-space>
</template>
</AppList>
......
......@@ -3,11 +3,12 @@ import AppUpload from '@/components/base/AppUpload.vue'
import type { FormInstance, FormRules } from 'element-plus'
import { useMapStore } from '@/stores/map'
const store = useMapStore()
const emit = defineEmits<Emits>()
const ruleFormRef = ref<FormInstance>()
// 封面类型
const typeList = store.mapList.filter((item: any) => item.key === 'system_cover_type')[0].values
// 封面状态
const statusList = store.mapList.filter((item: any) => item.key === 'system_status')[0].values
const form = reactive({
title: '',
status: '1',
......@@ -38,11 +39,7 @@ interface Emits {
(e: 'createCover', form: any): void
}
const emit = defineEmits<Emits>()
const ruleFormRef = ref<FormInstance>()
// 普通属性
// 取消
const handleCancel = () => {
emit('update:isShowDialog', false)
}
......@@ -62,7 +59,7 @@ onMounted(() => {
form.status = props.editData.status
form.url = props.editData.url
form.type = props.editData.type
form.title = props.editData.url
form.title = props.editData.title
}
})
</script>
......
......@@ -14,7 +14,7 @@ const listOptions = {
},
columns: [
{ label: '封面地址', prop: 'url', align: 'center' },
{ label: '封面标题', prop: 'title', align: 'center' },
{ label: '封面预览', prop: 'url', slots: 'table-cover', align: 'center' },
{ label: '封面类型', prop: 'type_name', align: 'center' },
{
......@@ -68,7 +68,7 @@ const handleEdit = (row: any) => {
<template>
<AppCard title="封面管理">
<el-button type="primary" round @click="handleAdd">添加</el-button>
<AppList v-bind="listOptions" ref="appList">
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #header-aside> </template>
<template #table-cover="{ row }">
<img :src="row.url" alt="" style="width: 100px" />
......
......@@ -13,46 +13,49 @@ const store = useMapStore()
// 状态
//表单每行数据
const listOptions = {
remote: {
httpRequest: getDictionaryList,
params: {
type: '',
created_time_start: '',
created_time_end: ''
}
},
filters: [
{ type: 'input', prop: 'name', label: '字典名称:' },
{ type: 'input', prop: 'key', label: '字典类型:' },
{
type: 'select',
prop: 'status',
label: '字典状态:',
options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values || []
},
{
type: 'input',
label: '创建时间:',
slots: 'created_time_start',
prop: 'created_time_start'
},
{ slots: 'created_time_end', prop: 'created_time_end' }
],
columns: [
{ label: '字典主键', prop: 'id', width: 224, align: 'center' },
{ label: '字典名称', prop: 'name', align: 'center' },
{ label: '字典类型', prop: 'key', align: 'center' },
{
label: '状态',
prop: 'status_name',
align: 'center'
const listOptions = $computed(() => {
return {
remote: {
httpRequest: getDictionaryList,
params: {
type: '',
created_time_start: '',
created_time_end: ''
}
},
{ label: '备注 ', prop: 'remark', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 300 }
]
}
filters: [
{ type: 'input', prop: 'name', label: '字典名称:' },
{ type: 'input', prop: 'key', label: '字典类型:' },
{
type: 'select',
prop: 'status',
placeholder: '请选择字典状态',
label: '字典状态:',
options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values
},
{
type: 'input',
label: '创建时间:',
slots: 'created_time_start',
prop: 'created_time_start'
},
{ slots: 'created_time_end', prop: 'created_time_end' }
],
columns: [
{ label: '字典主键', prop: 'id', width: 224, align: 'center' },
{ label: '字典名称', prop: 'name', align: 'center' },
{ label: '字典类型', prop: 'key', align: 'center' },
{
label: '状态',
prop: 'status_name',
align: 'center'
},
{ label: '备注 ', prop: 'remark', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 300 }
]
}
})
// 新增弹窗
const handleAdd = () => {
isShowDialog.value = true
......@@ -108,9 +111,9 @@ const handleConfirm = (val: any) => {
<template>
<AppCard title="数据字典">
<AppList v-bind="listOptions" ref="appList">
<AppList v-bind="listOptions" ref="appList" border stripe>
<el-row>
<el-button type="primary" @click="handleAdd">新增字典</el-button>
<el-button type="primary" @click="handleAdd" style="margin-bottom: 20px">新增字典</el-button>
</el-row>
<template v-slot:created_time_start="{ params }">
<el-date-picker v-model="params.created_time_start" type="date" placeholder="开始时间"> </el-date-picker>
......@@ -121,9 +124,9 @@ const handleConfirm = (val: any) => {
</template>
<template #table-operate="{ row }">
<el-space>
<el-button type="primary" plain @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" plain @click="handleList(row)">列表</el-button>
<el-button type="primary" plain @click="handleDelete(row)">删除</el-button>
<el-link type="primary" plain @click="handleEdit(row)">编辑</el-link>
<el-link type="primary" plain @click="handleList(row)">列表</el-link>
<el-link type="primary" plain @click="handleDelete(row)">删除</el-link>
</el-space>
</template>
<template v-if="isShowDialog === true">
......
......@@ -75,15 +75,15 @@ const handleConfirm = (val: any) => {
</script>
<template>
<AppCard>
<AppCard title="字典列表">
<AppList v-bind="listOptions" ref="appList">
<el-row>
<el-button type="primary" @click="handleAdd">新增</el-button>
</el-row>
<template #table-operate="{ row }">
<el-space>
<el-button type="primary" plain @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" plain @click="handleDelete(row)">删除</el-button>
<el-link type="primary" plain @click="handleEdit(row)">编辑</el-link>
<el-link type="primary" plain @click="handleDelete(row)">删除</el-link>
</el-space>
</template>
</AppList>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论