提交 91f76947 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 8bceda16
...@@ -3,9 +3,16 @@ import { getProjectList } from '@/api/base' ...@@ -3,9 +3,16 @@ import { getProjectList } from '@/api/base'
export function useProjectList(id?: string) { export function useProjectList(id?: string) {
const list = ref([]) const list = ref([])
const members = ref([]) const members = ref([])
const departmentList = ref([])
getProjectList({ organization_id: id || '' }).then((res: any) => { getProjectList({ organization_id: id || '' }).then((res: any) => {
list.value = res.data.departments list.value = res.data.departments
members.value = res.data.members members.value = res.data.members
departmentList.value = res.data.departments.reduce((a: any, b:any) => {
if (b.organizations.length) {
a.push(b.organizations)
}
return a.flat(Infinity)
}, [])
}) })
return { list, members } return { list, members, departmentList }
} }
\ No newline at end of file
...@@ -18,7 +18,7 @@ const handleDepartment = () => { ...@@ -18,7 +18,7 @@ const handleDepartment = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.status == 1 parseInt(props.data.department_public) === 0
? `该操作将会使本课件资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?` ? `该操作将会使本课件资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?`
: `该操作将会取消本课件资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?` : `该操作将会取消本课件资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?`
} }
...@@ -46,7 +46,7 @@ const handlePlatform = () => { ...@@ -46,7 +46,7 @@ const handlePlatform = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.platform_public == 0 parseInt(props.data.platform_public) === 0
? '该操作将会使本课件资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?' ? '该操作将会使本课件资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?'
: '该操作将会取消本课件资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?' : '该操作将会取消本课件资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?'
} }
...@@ -73,7 +73,7 @@ const handlePlatform = () => { ...@@ -73,7 +73,7 @@ const handlePlatform = () => {
const handleStatus = () => { const handleStatus = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${props.data.status == 0 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'} ${parseInt(props.data.status) === 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'}
`, `,
'提示', '提示',
{ {
......
...@@ -8,8 +8,8 @@ import { useProjectList } from '@/composables/useGetProjectList' ...@@ -8,8 +8,8 @@ import { useProjectList } from '@/composables/useGetProjectList'
const store = useMapStore() const store = useMapStore()
// 筛选项目列表 // 筛选部门列表
let { list: projectList } = useProjectList() const departmentList: any = useProjectList().departmentList
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let { list: selectTree } = useGetCategoryList() let { list: selectTree } = useGetCategoryList()
...@@ -42,9 +42,12 @@ const listOptions = $computed(() => { ...@@ -42,9 +42,12 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.getMapValuesByKey('system_status') options: store.getMapValuesByKey('system_status')
}, },
{ type: 'select', prop: 'authorized', label: '项目', options: projectList.value, labelKey: 'name', valueKey: 'id' },
{ prop: 'classification', label: '类别', slots: 'filter-type' }, { prop: 'classification', label: '类别', slots: 'filter-type' },
{ type: 'input', prop: 'name', label: '标题' } { type: 'input', prop: 'name', label: '标题' },
{
prop: 'authorized',
slots: 'filter-department'
}
], ],
columns: [ columns: [
{ label: '课件标题', prop: 'name' }, { label: '课件标题', prop: 'name' },
...@@ -83,7 +86,19 @@ const typeFilter = () => { ...@@ -83,7 +86,19 @@ const typeFilter = () => {
<AppList v-bind="listOptions" ref="appList"> <AppList v-bind="listOptions" ref="appList">
<template #header-aside></template> <template #header-aside></template>
<template #filter-type="{ params }"> <template #filter-type="{ params }">
<el-tree-select @change="typeFilter" clearable :props="defaultProps" v-model="params.classification" :data="selectTree" /> <el-tree-select
@change="typeFilter"
clearable
:props="defaultProps"
v-model="params.classification"
:data="selectTree"
/>
</template>
<template v-if="tabValue == '3'" #filter-department="{ params }">
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">部门</div>
<el-select @change="typeFilter" clearable v-model="params.authorized">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</template> </template>
<template #table-operate="{ row }"> <template #table-operate="{ row }">
<el-space> <el-space>
...@@ -99,7 +114,13 @@ const typeFilter = () => { ...@@ -99,7 +114,13 @@ const typeFilter = () => {
<!-- 卡片 --> <!-- 卡片 -->
<template #body="{ data }" v-if="isCard"> <template #body="{ data }" v-if="isCard">
<div class="card-list" v-if="data.length"> <div class="card-list" v-if="data.length">
<CardListItem :permission="{ edit: 'v1-resource-courseware-update', view: 'v1-resource-courseware-view' }" path="/resource/courseware" v-for="(item, index) in data" :data="item" :key="index"></CardListItem> <CardListItem
:permission="{ edit: 'v1-resource-courseware-update', view: 'v1-resource-courseware-view' }"
path="/resource/courseware"
v-for="(item, index) in data"
:data="item"
:key="index"
></CardListItem>
</div> </div>
<el-empty v-else description="暂无数据" /> <el-empty v-else description="暂无数据" />
</template> </template>
......
...@@ -4,7 +4,6 @@ import type { FormInstance } from 'element-plus' ...@@ -4,7 +4,6 @@ import type { FormInstance } from 'element-plus'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { createCourse, getCourseDetails, updateCourse } from '../api' import { createCourse, getCourseDetails, updateCourse } from '../api'
import { useGetCategoryList } from '@/composables/useGetCategoryList' import { useGetCategoryList } from '@/composables/useGetCategoryList'
import Operation from '../components/Operation.vue'
import Protocol from '@/components/base/Protocol.vue' import Protocol from '@/components/base/Protocol.vue'
// 路由 // 路由
...@@ -50,6 +49,12 @@ let form: any = $ref({ ...@@ -50,6 +49,12 @@ let form: any = $ref({
type: '', type: '',
size: '' size: ''
}) })
// 监听文件上传
watch(() => form.file, value => {
form.name = value[0]?.name || ''
})
// 表单验证 // 表单验证
const rules = { const rules = {
name: [{ required: true, message: '请输入标题', trigger: 'blur' }], name: [{ required: true, message: '请输入标题', trigger: 'blur' }],
...@@ -118,7 +123,6 @@ const protocol = ref(false) ...@@ -118,7 +123,6 @@ const protocol = ref(false)
<template> <template>
<AppCard :title="isUpdate ? '编辑课件资源' : '新建课件资源'"> <AppCard :title="isUpdate ? '编辑课件资源' : '新建课件资源'">
<Operation :data="form"></Operation>
<el-form ref="ruleFormRef" :model="form" :rules="rules" style="width: 70%"> <el-form ref="ruleFormRef" :model="form" :rules="rules" style="width: 70%">
<el-form-item label="课件文件:" prop="file"> <el-form-item label="课件文件:" prop="file">
<div> <div>
......
...@@ -18,7 +18,7 @@ const handleDepartment = () => { ...@@ -18,7 +18,7 @@ const handleDepartment = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.status == 1 parseInt(props.data.department_public) === 0
? `该操作将会使本教案资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?` ? `该操作将会使本教案资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?`
: `该操作将会取消本教案资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?` : `该操作将会取消本教案资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?`
} }
...@@ -46,7 +46,7 @@ const handlePlatform = () => { ...@@ -46,7 +46,7 @@ const handlePlatform = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.platform_public == 0 parseInt(props.data.platform_public) === 0
? '该操作将会使本教案资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?' ? '该操作将会使本教案资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?'
: '该操作将会取消本教案资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?' : '该操作将会取消本教案资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?'
} }
...@@ -73,7 +73,7 @@ const handlePlatform = () => { ...@@ -73,7 +73,7 @@ const handlePlatform = () => {
const handleStatus = () => { const handleStatus = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${props.data.status == 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'} ${parseInt(props.data.status) === 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'}
`, `,
'提示', '提示',
{ {
......
...@@ -12,8 +12,9 @@ const appList = ref() ...@@ -12,8 +12,9 @@ const appList = ref()
const isCard = ref(true) const isCard = ref(true)
// 筛选项目列表 // 筛选部门列表
let { list: projectList } = useProjectList() const departmentList: any = useProjectList().departmentList
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let { list: selectTree } = useGetCategoryList() let { list: selectTree } = useGetCategoryList()
const defaultProps = { const defaultProps = {
...@@ -41,9 +42,12 @@ const listOptions = $computed(() => { ...@@ -41,9 +42,12 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.getMapValuesByKey('system_status') options: store.getMapValuesByKey('system_status')
}, },
{ type: 'select', prop: 'authorized', label: '项目', options: projectList.value, labelKey: 'name', valueKey: 'id' },
{ prop: 'classification', label: '类别', slots: 'filter-type' }, { prop: 'classification', label: '类别', slots: 'filter-type' },
{ type: 'input', prop: 'name', label: '标题' } { type: 'input', prop: 'name', label: '标题' },
{
prop: 'authorized',
slots: 'filter-department'
}
], ],
columns: [ columns: [
{ label: '教案标题', prop: 'name' }, { label: '教案标题', prop: 'name' },
...@@ -84,6 +88,12 @@ const typeFilter = () => { ...@@ -84,6 +88,12 @@ const typeFilter = () => {
<template #filter-type="{ params }"> <template #filter-type="{ params }">
<el-tree-select @change="typeFilter" clearable :props="defaultProps" v-model="params.classification" :data="selectTree" /> <el-tree-select @change="typeFilter" clearable :props="defaultProps" v-model="params.classification" :data="selectTree" />
</template> </template>
<template v-if="tabValue == '3'" #filter-department="{ params }">
<div class="name" style="font-size:14px;color:#606266;padding-right: 12px;">部门</div>
<el-select @change="typeFilter" clearable v-model="params.authorized">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</template>
<template #table-operate="{ row }"> <template #table-operate="{ row }">
<el-space> <el-space>
<router-link v-permission="'v1-resource-lesson-plan-update'" :to="`/resource/lessonplan/update/?id=${row.id}`"> <router-link v-permission="'v1-resource-lesson-plan-update'" :to="`/resource/lessonplan/update/?id=${row.id}`">
......
...@@ -4,7 +4,6 @@ import type { FormInstance } from 'element-plus' ...@@ -4,7 +4,6 @@ import type { FormInstance } from 'element-plus'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { createLessonPlan, getLessonDetails, updateLessonPlan } from '../api' import { createLessonPlan, getLessonDetails, updateLessonPlan } from '../api'
import { useGetCategoryList } from '@/composables/useGetCategoryList' import { useGetCategoryList } from '@/composables/useGetCategoryList'
import Operation from '../components/Operation.vue'
import Protocol from '@/components/base/Protocol.vue' import Protocol from '@/components/base/Protocol.vue'
// 路由 // 路由
...@@ -50,6 +49,12 @@ let form: any = $ref({ ...@@ -50,6 +49,12 @@ let form: any = $ref({
type: '', type: '',
size: '' size: ''
}) })
// 监听文件上传
watch(() => form.file, value => {
form.name = value[0]?.name || ''
})
// 表单验证 // 表单验证
const rules = { const rules = {
name: [{ required: true, message: '请输入标题', trigger: 'blur' }], name: [{ required: true, message: '请输入标题', trigger: 'blur' }],
...@@ -118,7 +123,6 @@ const protocol = ref(false) ...@@ -118,7 +123,6 @@ const protocol = ref(false)
<template> <template>
<AppCard :title="isUpdate ? '编辑教案资源' : '新建教案资源'"> <AppCard :title="isUpdate ? '编辑教案资源' : '新建教案资源'">
<Operation :data="form"></Operation>
<el-form ref="ruleFormRef" :model="form" :rules="rules" style="width: 70%"> <el-form ref="ruleFormRef" :model="form" :rules="rules" style="width: 70%">
<el-form-item label="教案文件:" prop="file"> <el-form-item label="教案文件:" prop="file">
<div> <div>
......
...@@ -20,7 +20,7 @@ const handleDepartment = () => { ...@@ -20,7 +20,7 @@ const handleDepartment = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.status == 0 parseInt(props.data.department_public) === 0
? `该操作将会使本其他资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?` ? `该操作将会使本其他资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?`
: `该操作将会取消本其他资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?` : `该操作将会取消本其他资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?`
} }
...@@ -48,7 +48,7 @@ const handlePlatform = () => { ...@@ -48,7 +48,7 @@ const handlePlatform = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.platform_public == 0 parseInt(props.data.platform_public) === 0
? '该操作将会使本其他资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?' ? '该操作将会使本其他资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?'
: '该操作将会取消本其他资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?' : '该操作将会取消本其他资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?'
} }
...@@ -75,7 +75,7 @@ const handlePlatform = () => { ...@@ -75,7 +75,7 @@ const handlePlatform = () => {
const handleStatus = () => { const handleStatus = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${props.data.status == 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'} ${parseInt(props.data.status) === 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'}
`, `,
'提示', '提示',
{ {
......
...@@ -19,8 +19,8 @@ const tabChange = () => { ...@@ -19,8 +19,8 @@ const tabChange = () => {
appList.value.refetch() appList.value.refetch()
} }
// 筛选项目列表 // 筛选部门列表
let { list: projectList } = useProjectList() const departmentList: any = useProjectList().departmentList
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let { list: selectTree } = useGetCategoryList() let { list: selectTree } = useGetCategoryList()
...@@ -43,16 +43,12 @@ const listOptions = $computed(() => { ...@@ -43,16 +43,12 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.getMapValuesByKey('system_status') options: store.getMapValuesByKey('system_status')
}, },
{ prop: 'classification', label: '类别', slots: 'filter-type' },
{ type: 'input', prop: 'name', label: '标题' },
{ {
type: 'select',
prop: 'authorized', prop: 'authorized',
label: '项目', slots: 'filter-department'
options: projectList.value, }
labelKey: 'name',
valueKey: 'id'
},
{ prop: 'classification', label: '类别', slots: 'filter-type' },
{ type: 'input', prop: 'name', label: '标题' }
], ],
columns: [ columns: [
{ label: '课件标题', prop: 'name' }, { label: '课件标题', prop: 'name' },
...@@ -91,11 +87,26 @@ const typeFilter = () => { ...@@ -91,11 +87,26 @@ const typeFilter = () => {
<AppList v-bind="listOptions" ref="appList"> <AppList v-bind="listOptions" ref="appList">
<template #header-aside></template> <template #header-aside></template>
<template #filter-type="{ params }"> <template #filter-type="{ params }">
<el-tree-select @change="typeFilter" clearable :props="defaultProps" v-model="params.classification" :data="selectTree" /> <el-tree-select
@change="typeFilter"
clearable
:props="defaultProps"
v-model="params.classification"
:data="selectTree"
/>
</template>
<template v-if="tabValue == '3'" #filter-department="{ params }">
<div class="name" style="font-size:14px;color:#606266;padding-right: 12px;">部门</div>
<el-select @change="typeFilter" clearable v-model="params.authorized">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</template> </template>
<template #table-operate="{ row }"> <template #table-operate="{ row }">
<el-space> <el-space>
<router-link v-permission="'v1-resource-other-information-update'" :to="`/resource/other/update/?id=${row.id}`"> <router-link
v-permission="'v1-resource-other-information-update'"
:to="`/resource/other/update/?id=${row.id}`"
>
<el-button plain>编辑</el-button> <el-button plain>编辑</el-button>
</router-link> </router-link>
<router-link v-permission="'v1-resource-other-information-view'" :to="`/resource/other/view/?id=${row.id}`"> <router-link v-permission="'v1-resource-other-information-view'" :to="`/resource/other/view/?id=${row.id}`">
...@@ -107,7 +118,13 @@ const typeFilter = () => { ...@@ -107,7 +118,13 @@ const typeFilter = () => {
<!-- 卡片 --> <!-- 卡片 -->
<template #body="{ data }" v-if="isCard"> <template #body="{ data }" v-if="isCard">
<div class="card-list" v-if="data.length"> <div class="card-list" v-if="data.length">
<CardListItem :permission="{ edit: 'v1-resource-other-information-update', view: 'v1-resource-other-information-view' }" path="/resource/other" v-for="(item, index) in data" :data="item" :key="index"></CardListItem> <CardListItem
:permission="{ edit: 'v1-resource-other-information-update', view: 'v1-resource-other-information-view' }"
path="/resource/other"
v-for="(item, index) in data"
:data="item"
:key="index"
></CardListItem>
</div> </div>
<el-empty v-else description="暂无数据" /> <el-empty v-else description="暂无数据" />
</template> </template>
......
...@@ -4,7 +4,6 @@ import type { FormInstance } from 'element-plus' ...@@ -4,7 +4,6 @@ import type { FormInstance } from 'element-plus'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { createOther, getOtherDetails, updateOther } from '../api' import { createOther, getOtherDetails, updateOther } from '../api'
import { useGetCategoryList } from '@/composables/useGetCategoryList' import { useGetCategoryList } from '@/composables/useGetCategoryList'
import Operation from '../components/Operation.vue'
import Protocol from '@/components/base/Protocol.vue' import Protocol from '@/components/base/Protocol.vue'
// 路由 // 路由
...@@ -50,6 +49,12 @@ let form: any = $ref({ ...@@ -50,6 +49,12 @@ let form: any = $ref({
type: '', type: '',
size: '' size: ''
}) })
// 监听文件上传
watch(() => form.file, value => {
form.name = value[0]?.name || ''
})
// 表单验证 // 表单验证
const rules = { const rules = {
name: [{ required: true, message: '请输入标题', trigger: 'blur' }], name: [{ required: true, message: '请输入标题', trigger: 'blur' }],
...@@ -118,7 +123,6 @@ const protocol = ref(false) ...@@ -118,7 +123,6 @@ const protocol = ref(false)
<template> <template>
<AppCard :title="isUpdate ? '编辑其他资源' : '新建其他资源'"> <AppCard :title="isUpdate ? '编辑其他资源' : '新建其他资源'">
<Operation :data="form"></Operation>
<el-form ref="ruleFormRef" :model="form" :rules="rules" style="width: 70%"> <el-form ref="ruleFormRef" :model="form" :rules="rules" style="width: 70%">
<el-form-item label="其他文件:" prop="file"> <el-form-item label="其他文件:" prop="file">
<div> <div>
......
...@@ -18,7 +18,7 @@ const handleDepartment = () => { ...@@ -18,7 +18,7 @@ const handleDepartment = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.status == 1 parseInt(props.data.department_public) === 0
? `该操作将会使本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?` ? `该操作将会使本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?`
: `该操作将会取消本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?` : `该操作将会取消本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?`
} }
...@@ -46,7 +46,7 @@ const handlePlatform = () => { ...@@ -46,7 +46,7 @@ const handlePlatform = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${ ${
props.data.platform_public == 0 parseInt(props.data.platform_public) === 0
? '该操作将会使本视频资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?' ? '该操作将会使本视频资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?'
: '该操作将会取消本视频资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?' : '该操作将会取消本视频资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?'
} }
...@@ -73,7 +73,7 @@ const handlePlatform = () => { ...@@ -73,7 +73,7 @@ const handlePlatform = () => {
const handleStatus = () => { const handleStatus = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
` `
${props.data.status == 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'} ${parseInt(props.data.status) === 1 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'}
`, `,
'提示', '提示',
{ {
......
...@@ -8,8 +8,9 @@ import { useMapStore } from '@/stores/map' ...@@ -8,8 +8,9 @@ import { useMapStore } from '@/stores/map'
const store = useMapStore() const store = useMapStore()
// 筛选项目列表 // 筛选部门列表
let { list: projectList } = useProjectList() const departmentList: any = useProjectList().departmentList
// 筛选下拉选择tree 视频分类 // 筛选下拉选择tree 视频分类
let { list: selectTree } = useGetCategoryList() let { list: selectTree } = useGetCategoryList()
const defaultProps = { const defaultProps = {
...@@ -42,16 +43,12 @@ const listOptions = $computed(() => { ...@@ -42,16 +43,12 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.getMapValuesByKey('system_status') options: store.getMapValuesByKey('system_status')
}, },
{ prop: 'classification', label: '类别', slots: 'filter-type' },
{ type: 'input', prop: 'name', label: '标题' },
{ {
type: 'select',
prop: 'authorized', prop: 'authorized',
label: '项目', slots: 'filter-department'
options: projectList.value, }
labelKey: 'name',
valueKey: 'id'
},
{ prop: 'classification', label: '类别', slots: 'filter-type' },
{ type: 'input', prop: 'name', label: '标题' }
], ],
columns: [ columns: [
{ label: '视频标题', prop: 'name', align: 'center' }, { label: '视频标题', prop: 'name', align: 'center' },
...@@ -94,10 +91,29 @@ const typeFilter = () => { ...@@ -94,10 +91,29 @@ const typeFilter = () => {
<el-icon :size="50" color="#ccc" v-if="row.cover == ''"> <el-icon :size="50" color="#ccc" v-if="row.cover == ''">
<PictureFilled></PictureFilled> <PictureFilled></PictureFilled>
</el-icon> </el-icon>
<img v-else :src="row.cover" style="width: 150px; display: block" /> <div
v-else
:style="`width: 150px;
display: block;
height: 83px;
background-size: cover;
background-image: url(${row.cover});`"
></div>
</template> </template>
<template #filter-type="{ params }"> <template #filter-type="{ params }">
<el-tree-select @change="typeFilter" clearable :props="defaultProps" v-model="params.classification" :data="selectTree" /> <el-tree-select
@change="typeFilter"
clearable
:props="defaultProps"
v-model="params.classification"
:data="selectTree"
/>
</template>
<template v-if="tabValue == '3'" #filter-department="{ params }">
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">部门</div>
<el-select @change="typeFilter" clearable v-model="params.authorized">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</template> </template>
<template #table-operate="{ row }"> <template #table-operate="{ row }">
<el-space> <el-space>
......
...@@ -3,7 +3,6 @@ import { PictureFilled, ArrowLeftBold, ArrowRightBold } from '@element-plus/icon ...@@ -3,7 +3,6 @@ import { PictureFilled, ArrowLeftBold, ArrowRightBold } from '@element-plus/icon
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import UploadImg from '../components/UploadImg.vue' import UploadImg from '../components/UploadImg.vue'
import Operation from '../components/Operation.vue'
import UploadVideo from '../components/UploadVideo.vue' import UploadVideo from '../components/UploadVideo.vue'
import { getCoverList, createVideo, getVideoDetails, updateVideo } from '../api' import { getCoverList, createVideo, getVideoDetails, updateVideo } from '../api'
import { useGetCategoryList } from '@/composables/useGetCategoryList' import { useGetCategoryList } from '@/composables/useGetCategoryList'
...@@ -141,7 +140,6 @@ const uploadVideo = (data: any) => { ...@@ -141,7 +140,6 @@ const uploadVideo = (data: any) => {
<template> <template>
<AppCard :title="isUpdate ? '编辑视频资源' : '新建视频资源'"> <AppCard :title="isUpdate ? '编辑视频资源' : '新建视频资源'">
<Operation :data="form.data"></Operation>
<el-form ref="ruleFormRef" :model="form.data" :rules="rules" style="width: 70%"> <el-form ref="ruleFormRef" :model="form.data" :rules="rules" style="width: 70%">
<el-form-item label="视频文件:" prop="source_id" v-if="!isUpdate"> <el-form-item label="视频文件:" prop="source_id" v-if="!isUpdate">
<UploadVideo @upload="uploadVideo"></UploadVideo> <UploadVideo @upload="uploadVideo"></UploadVideo>
...@@ -190,7 +188,7 @@ const uploadVideo = (data: any) => { ...@@ -190,7 +188,7 @@ const uploadVideo = (data: any) => {
src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/upload-video-icon.png" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/upload-video-icon.png"
class="icon" class="icon"
/> />
<div class="text">支持小4M,最好宽240*高175*及以上尺寸</div> <div class="text">支持小4M,最好宽240*高175*及以上尺寸</div>
</div> </div>
<div class="item"> <div class="item">
<img <img
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论