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

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

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