提交 1145c4b9 authored 作者: lihuihui's avatar lihuihui

公共筛选提取修改

上级 05ffa360
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
"useDisplayMedia": true, "useDisplayMedia": true,
"useDocumentVisibility": true, "useDocumentVisibility": true,
"useDraggable": true, "useDraggable": true,
"useDropZone": true,
"useElementBounding": true, "useElementBounding": true,
"useElementByPoint": true, "useElementByPoint": true,
"useElementHover": true, "useElementHover": true,
......
...@@ -135,6 +135,7 @@ declare global { ...@@ -135,6 +135,7 @@ declare global {
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia'] const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility'] const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
const useDraggable: typeof import('@vueuse/core')['useDraggable'] const useDraggable: typeof import('@vueuse/core')['useDraggable']
const useDropZone: typeof import('@vueuse/core')['useDropZone']
const useElementBounding: typeof import('@vueuse/core')['useElementBounding'] const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint'] const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
const useElementHover: typeof import('@vueuse/core')['useElementHover'] const useElementHover: typeof import('@vueuse/core')['useElementHover']
......
...@@ -52,4 +52,9 @@ export function updateAuth(data: { source_id: string }) { ...@@ -52,4 +52,9 @@ export function updateAuth(data: { source_id: string }) {
// 获取分类列表 // 获取分类列表
export function getCategoryList(params: { type: string; category_name?: string }) { export function getCategoryList(params: { type: string; category_name?: string }) {
return httpRequest.get('/api/resource/v1/backend/category/list', { params }) return httpRequest.get('/api/resource/v1/backend/category/list', { params })
}
// 获取项目列表
export function getProjectList(params: { organization_id: string }) {
return httpRequest.get('/api/resource/v1/util/members', { params })
} }
\ No newline at end of file
import { getCategoryList } from '@/api/base' import { getCategoryList } from '@/api/base'
export function useCategory() { export function useGetCategoryList() {
const list = ref([]) const list = ref([])
onMounted(() => { onMounted(() => {
getCategoryList({ type: 'tree' }).then((res: any) => { getCategoryList({ type: 'tree' }).then((res: any) => {
......
import { getProjectList } from '@/api/base'
export function useProjectList(id?: string) {
const list = ref([])
onMounted(() => {
getProjectList({ organization_id: id || '' }).then((res: any) => {
list.value = res.data.departments
})
})
return { list }
}
\ No newline at end of file
...@@ -23,11 +23,6 @@ export function createCourse(data: { ...@@ -23,11 +23,6 @@ export function createCourse(data: {
return httpRequest.post('/api/resource/v1/resource/courseware/create', data) return httpRequest.post('/api/resource/v1/resource/courseware/create', data)
} }
// 获取分类列表
export function getCategoryList(params: { type: string; category_name?: string }) {
return httpRequest.get('/api/resource/v1/backend/category/list', { params })
}
// 更新课件 // 更新课件
export function updateCourse(data: { export function updateCourse(data: {
id: string id: string
...@@ -43,10 +38,7 @@ export function updateCourse(data: { ...@@ -43,10 +38,7 @@ export function updateCourse(data: {
export function getCourseDetails(params: { id: string }) { export function getCourseDetails(params: { id: string }) {
return httpRequest.get('/api/resource/v1/resource/courseware/view', { params }) return httpRequest.get('/api/resource/v1/resource/courseware/view', { params })
} }
// 获取项目列表
export function getProjectList(params: { organization_id: string }) {
return httpRequest.get('/api/resource/v1/util/members', { params })
}
// 部门共享 // 部门共享
export function setDepartment(data: { id: string }) { export function setDepartment(data: { id: string }) {
return httpRequest.post('/api/resource/v1/resource/courseware/set-department', data) return httpRequest.post('/api/resource/v1/resource/courseware/set-department', data)
......
<script setup lang="ts"> <script setup lang="ts">
import { setDepartment, setPlatform, setStatus, getProjectList, setBelong } from '../api' import { setDepartment, setPlatform, setStatus, setBelong } from '../api'
import { useProjectList } from '@/composables/useGetProjectList'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
...@@ -103,9 +104,7 @@ const dialogFormVisible = ref(false) ...@@ -103,9 +104,7 @@ const dialogFormVisible = ref(false)
// 人员列表 // 人员列表
let members: any = ref([]) let members: any = ref([])
const getMembers = () => { const getMembers = () => {
getProjectList({ organization_id: props.data.organ_id }).then((res: any) => { members.value = useProjectList(props.data.organ_id)
members.value = res.data.members
})
} }
// 点击更改负责人按钮弹窗 // 点击更改负责人按钮弹窗
const handleMembers = () => { const handleMembers = () => {
......
<script setup lang="ts"> <script setup lang="ts">
import { getCourseList, getProjectList, getCategoryList } from '../api' import { getCourseList } from '../api'
import CardListItem from '@/components/base/CardListItem.vue' import CardListItem from '@/components/base/CardListItem.vue'
import { Expand, Search } from '@element-plus/icons-vue' import { Expand, Search } from '@element-plus/icons-vue'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { useGetCategoryList } from '@/composables/useGetCategoryList'
import { useProjectList } from '@/composables/useGetProjectList'
const store = useMapStore() const store = useMapStore()
const appList = ref() const appList = ref()
...@@ -16,20 +18,16 @@ const tabChange = () => { ...@@ -16,20 +18,16 @@ const tabChange = () => {
} }
// 筛选项目列表 // 筛选项目列表
let projectList: any = $ref([]) let { list: projectList } = useProjectList()
getProjectList({ organization_id: '' }).then((res: any) => {
projectList = res.data.departments
})
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let selectTree = $ref([]) let { list: selectTree } = useGetCategoryList()
getCategoryList({ type: 'tree' }).then((res: any) => {
selectTree = res.data
})
const defaultProps = { const defaultProps = {
children: 'children', children: 'children',
label: 'category_name', label: 'category_name',
value: 'id' value: 'id'
} }
const listOptions = $computed(() => { const listOptions = $computed(() => {
return { return {
remote: { remote: {
...@@ -47,7 +45,7 @@ const listOptions = $computed(() => { ...@@ -47,7 +45,7 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values
}, },
{ type: 'select', prop: 'authorized', label: '项目', options: projectList, labelKey: 'name', valueKey: 'id' }, { type: 'select', prop: 'authorized', label: '项目', options: projectList.value, labelKey: 'name', valueKey: 'id' },
{ prop: 'classification', label: '类别', slots: 'filter-type' }, { prop: 'classification', label: '类别', slots: 'filter-type' },
{ prop: 'search', slots: 'filter-search' } { prop: 'search', slots: 'filter-search' }
// { type: 'input', prop: 'category_id', prefixIcon: 'Search' } // { type: 'input', prop: 'category_id', prefixIcon: 'Search' }
......
<script setup lang="ts"> <script setup lang="ts">
import { createCourse, updateCourse, getCategoryList, getCourseDetails } from '../api' import { createCourse, updateCourse, getCourseDetails } from '../api'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import UploadAuth from '@/components/base/UploadAuth.vue' import UploadAuth from '@/components/base/UploadAuth.vue'
import type { FormInstance, FormRules } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus'
import { useGetCategoryList } from '@/composables/useGetCategoryList'
// 路由 // 路由
const router = useRouter() const router = useRouter()
const ruleFormRef = ref<FormInstance>() const ruleFormRef = ref<FormInstance>()
...@@ -38,16 +39,13 @@ const upload = (res: any) => { ...@@ -38,16 +39,13 @@ const upload = (res: any) => {
videoUpload.progress = 0 videoUpload.progress = 0
} }
// 下拉选择tree 课件分类 // 下拉选择tree 视频分类
let { list: selectTree } = useGetCategoryList()
const defaultProps = { const defaultProps = {
children: 'children', children: 'children',
label: 'category_name', label: 'category_name',
value: 'id' value: 'id'
} }
let selectTree = $ref([])
getCategoryList({ type: 'tree' }).then(res => {
selectTree = res.data
})
const handleConfirm = async (formEl: FormInstance | undefined) => { const handleConfirm = async (formEl: FormInstance | undefined) => {
if (!formEl) return if (!formEl) return
......
...@@ -12,15 +12,6 @@ export function getLessonList(params?: { ...@@ -12,15 +12,6 @@ export function getLessonList(params?: {
return httpRequest.get('/api/resource/v1/resource/lesson-plan/list', { params }) return httpRequest.get('/api/resource/v1/resource/lesson-plan/list', { params })
} }
// 获取项目列表
export function getProjectList(params: { organization_id: string }) {
return httpRequest.get('/api/resource/v1/util/members', { params })
}
// 获取分类列表
export function getCategoryList(params: { type: string; category_name?: string }) {
return httpRequest.get('/api/resource/v1/backend/category/list', { params })
}
// 创建教案 // 创建教案
export function createLessonPlan(data: { name: string; source: string; classification: string; knowledge_points: string; url: string; type: string; size: string }) { export function createLessonPlan(data: { name: string; source: string; classification: string; knowledge_points: string; url: string; type: string; size: string }) {
return httpRequest.post('/api/resource/v1/resource/lesson-plan/create', data) return httpRequest.post('/api/resource/v1/resource/lesson-plan/create', data)
......
<script setup lang="ts"> <script setup lang="ts">
import { getLessonList, getProjectList, getCategoryList } from '../api' import { getLessonList } from '../api'
import CardListItem from '@/components/base/CardListItem.vue' import CardListItem from '@/components/base/CardListItem.vue'
import { Expand, Search } from '@element-plus/icons-vue' import { Expand, Search } from '@element-plus/icons-vue'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { useGetCategoryList } from '@/composables/useGetCategoryList'
import { useProjectList } from '@/composables/useGetProjectList'
const store = useMapStore() const store = useMapStore()
const appList = ref() const appList = ref()
...@@ -14,21 +17,16 @@ const tabChange = () => { ...@@ -14,21 +17,16 @@ const tabChange = () => {
appList.value.refetch() appList.value.refetch()
} }
// 筛选项目列表 // 筛选项目列表
let projectList: any = $ref([]) let { list: projectList } = useProjectList()
getProjectList({ organization_id: '' }).then((res: any) => {
projectList = res.data.departments
})
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let selectTree = $ref([]) let { list: selectTree } = useGetCategoryList()
getCategoryList({ type: 'tree' }).then((res: any) => {
selectTree = res.data
})
const defaultProps = { const defaultProps = {
children: 'children', children: 'children',
label: 'category_name', label: 'category_name',
value: 'id' value: 'id'
} }
const listOptions = $computed(() => {
const listOptions = $computed(() => {
return { return {
remote: { remote: {
httpRequest: getLessonList, httpRequest: getLessonList,
...@@ -45,7 +43,7 @@ const listOptions = $computed(() => { ...@@ -45,7 +43,7 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values
}, },
{ type: 'select', prop: 'authorized', label: '项目', options: projectList, labelKey: 'name', valueKey: 'id' }, { type: 'select', prop: 'authorized', label: '项目', options: projectList.value, labelKey: 'name', valueKey: 'id' },
{ prop: 'classification', label: '类别', slots: 'filter-type' }, { prop: 'classification', label: '类别', slots: 'filter-type' },
{ prop: 'search', slots: 'filter-search' } { prop: 'search', slots: 'filter-search' }
// { type: 'input', prop: 'category_id', prefixIcon: 'Search' } // { type: 'input', prop: 'category_id', prefixIcon: 'Search' }
......
...@@ -16,14 +16,6 @@ export function getOtherDetails(params: { id: string }) { ...@@ -16,14 +16,6 @@ export function getOtherDetails(params: { id: string }) {
return httpRequest.get('/api/resource/v1/resource/other-information/view', { params }) return httpRequest.get('/api/resource/v1/resource/other-information/view', { params })
} }
// 获取项目列表
export function getProjectList(params: { organization_id: string }) {
return httpRequest.get('/api/resource/v1/util/members', { params })
}
// 获取分类列表
export function getCategoryList(params: { type: string; category_name?: string }) {
return httpRequest.get('/api/resource/v1/backend/category/list', { params })
}
// 部门共享 // 部门共享
export function setDepartment(data: { id: string }) { export function setDepartment(data: { id: string }) {
return httpRequest.post('/api/resource/v1/resource/other-information/set-department', data) return httpRequest.post('/api/resource/v1/resource/other-information/set-department', data)
......
<script setup lang="ts"> <script setup lang="ts">
import { setDepartment, setPlatform, setStatus, getProjectList, setBelong } from '../api' import { setDepartment, setPlatform, setStatus, setBelong } from '../api'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { useProjectList } from '@/composables/useGetProjectList'
const store = useMapStore() const store = useMapStore()
console.log(store) console.log(store)
...@@ -102,9 +103,7 @@ const dialogFormVisible = ref(false) ...@@ -102,9 +103,7 @@ const dialogFormVisible = ref(false)
// 人员列表 // 人员列表
let members: any = ref([]) let members: any = ref([])
const getMembers = () => { const getMembers = () => {
getProjectList({ organization_id: props.data.organ_id }).then((res: any) => { members.value = useProjectList(props.data.organ_id)
members.value = res.data.members
})
} }
// 点击更改负责人按钮弹窗 // 点击更改负责人按钮弹窗
const handleMembers = () => { const handleMembers = () => {
......
<script setup lang="ts"> <script setup lang="ts">
import { getOtherList, getProjectList, getCategoryList } from '../api' import { getOtherList } from '../api'
import CardListItem from '@/components/base/CardListItem.vue' import CardListItem from '@/components/base/CardListItem.vue'
import { Expand, Search } from '@element-plus/icons-vue' import { Expand, Search } from '@element-plus/icons-vue'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { useProjectList } from '@/composables/useGetProjectList'
// 下拉选择tree 视频分类
import { useGetCategoryList } from '@/composables/useGetCategoryList'
const store = useMapStore() const store = useMapStore()
const appList = ref() const appList = ref()
...@@ -16,20 +19,16 @@ const tabChange = () => { ...@@ -16,20 +19,16 @@ const tabChange = () => {
} }
// 筛选项目列表 // 筛选项目列表
let projectList: any = $ref([]) let { list: projectList } = useProjectList()
getProjectList({ organization_id: '' }).then((res: any) => {
projectList = res.data.departments
})
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let selectTree = $ref([]) let { list: selectTree } = useGetCategoryList()
getCategoryList({ type: 'tree' }).then((res: any) => {
selectTree = res.data
})
const defaultProps = { const defaultProps = {
children: 'children', children: 'children',
label: 'category_name', label: 'category_name',
value: 'id' value: 'id'
} }
const listOptions = $computed(() => { const listOptions = $computed(() => {
return { return {
remote: { remote: {
...@@ -47,7 +46,7 @@ const listOptions = $computed(() => { ...@@ -47,7 +46,7 @@ const listOptions = $computed(() => {
label: '状态', label: '状态',
options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values options: store.mapList?.filter((item: any) => item.key === 'system_status')[0]?.values
}, },
{ type: 'select', prop: 'authorized', label: '项目', options: projectList, labelKey: 'name', valueKey: 'id' }, { type: 'select', prop: 'authorized', label: '项目', options: projectList.value, labelKey: 'name', valueKey: 'id' },
{ prop: 'classification', label: '类别', slots: 'filter-type' }, { prop: 'classification', label: '类别', slots: 'filter-type' },
{ prop: 'search', slots: 'filter-search' } { prop: 'search', slots: 'filter-search' }
// { type: 'input', prop: 'category_id', prefixIcon: 'Search' } // { type: 'input', prop: 'category_id', prefixIcon: 'Search' }
......
...@@ -20,11 +20,6 @@ export function getVideoDetails(params: { id: string }) { ...@@ -20,11 +20,6 @@ export function getVideoDetails(params: { id: string }) {
return httpRequest.get('/api/resource/v1/resource/video/view', { params }) return httpRequest.get('/api/resource/v1/resource/video/view', { params })
} }
// 获取项目列表
export function getProjectList(params: { organization_id: string }) {
return httpRequest.get('/api/resource/v1/util/members', { params })
}
// 更新视频 // 更新视频
export function updateVideo(data: { id: string; name: string; classification: string; knowledge_points?: string; cover?: string }) { export function updateVideo(data: { id: string; name: string; classification: string; knowledge_points?: string; cover?: string }) {
return httpRequest.post('/api/resource/v1/resource/video/update', data) return httpRequest.post('/api/resource/v1/resource/video/update', data)
......
<script setup lang="ts"> <script setup lang="ts">
import { setDepartment, setPlatform, setStatus, getProjectList, setBelong } from '../api' import { setDepartment, setPlatform, setStatus, setBelong } from '../api'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
const store= useMapStore() import { useProjectList } from '@/composables/useGetProjectList'
const store = useMapStore()
console.log(store) console.log(store)
const router = useRouter() const router = useRouter()
...@@ -16,41 +18,49 @@ console.log(path, 'path') ...@@ -16,41 +18,49 @@ console.log(path, 'path')
const id = router.currentRoute.value.query.id as string const id = router.currentRoute.value.query.id as string
// 设置部门共享 // 设置部门共享
const handleDepartment = () => { const handleDepartment = () => {
ElMessageBox.confirm(` ElMessageBox.confirm(
`
${ ${
props.data.status == 0 props.data.status == 0
? `该操作将会使本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?` ? `该操作将会使本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,管理者不变,其余人员只能共享使用该资源,确认部门共享吗?`
: `该操作将会取消本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?` : `该操作将会取消本视频资源在您所在的部门“${props.data.organ_id_name}”内部共享,部门其余人员将不能再看到该共享资源,确认取消部门共享吗?`
} }
`, '提示', { `,
confirmButtonText: '确认', '提示',
cancelButtonText: '取消', {
type: 'warning', confirmButtonText: '确认',
}).then(() => { cancelButtonText: '取消',
setDepartment({ id: id }).then((res: any) => { type: 'warning'
if (res.code === 0) { }
ElMessage({ message: '更改成功', type: 'success' }) ).then(() => {
setTimeout(() => { setDepartment({ id: id }).then((res: any) => {
router.go(0) if (res.code === 0) {
}, 500) ElMessage({ message: '更改成功', type: 'success' })
} setTimeout(() => {
}) router.go(0)
}, 500)
}
}) })
})
} }
// 设置平台共享 // 设置平台共享
const handlePlatform = () => { const handlePlatform = () => {
ElMessageBox.confirm(` ElMessageBox.confirm(
`
${ ${
props.data.platform_public == 0 props.data.platform_public == 0
? '该操作将会使本视频资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?' ? '该操作将会使本视频资源在e-SaaS平台中公开共享供所有老师使用,资源的管理者不变,其余人员只能共享使用该资源,确认公开该资源吗?'
: '该操作将会取消本视频资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?' : '该操作将会取消本视频资源在e-SaaS平台中公开共享,平台所有人员将不能再看到该共享资源,确认取消平台共享吗?'
} }
`, '提示', { `,
confirmButtonText: '确认', '提示',
cancelButtonText: '取消', {
type: 'warning', confirmButtonText: '确认',
}).then(() => { cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
setPlatform({ id: id }).then((res: any) => { setPlatform({ id: id }).then((res: any) => {
if (res.code === 0) { if (res.code === 0) {
ElMessage({ message: '更改成功', type: 'success' }) ElMessage({ message: '更改成功', type: 'success' })
...@@ -64,17 +74,17 @@ const handlePlatform = () => { ...@@ -64,17 +74,17 @@ const handlePlatform = () => {
// 上下线设置 // 上下线设置
const handleStatus = () => { const handleStatus = () => {
ElMessageBox.confirm(` ElMessageBox.confirm(
${ `
props.data.status == 0 ${props.data.status == 0 ? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' : '确认再次上线该资源吗?'}
? '已下线的资源将不能被关联到课程使用,确认下线该资源吗?' `,
: '确认再次上线该资源吗?' '提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
} }
`, '提示', { ).then(() => {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
setStatus({ id: id }).then((res: any) => { setStatus({ id: id }).then((res: any) => {
if (res.code === 0) { if (res.code === 0) {
ElMessage({ message: '更改成功', type: 'success' }) ElMessage({ message: '更改成功', type: 'success' })
...@@ -91,13 +101,13 @@ const form = reactive({ ...@@ -91,13 +101,13 @@ const form = reactive({
members: '' members: ''
}) })
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)
// 人员列表 // 人员列表
let members:any = ref([]) let members: any = ref([])
const getMembers = () => { const getMembers = () => {
getProjectList({ organization_id: props.data.organ_id }).then((res: any) => { members.value = useProjectList(props.data.organ_id)
members.value = res.data.members
})
} }
// 点击更改负责人按钮弹窗 // 点击更改负责人按钮弹窗
const handleMembers = () => { const handleMembers = () => {
getMembers() getMembers()
...@@ -117,7 +127,7 @@ const handlesetBelong = () => { ...@@ -117,7 +127,7 @@ const handlesetBelong = () => {
</script> </script>
<template> <template>
<div class="tool-btn-box" v-if="$route.query.id" style="margin-bottom: 20px;"> <div class="tool-btn-box" v-if="$route.query.id" style="margin-bottom: 20px">
<template v-if="path === '/resource/video/view'"> <template v-if="path === '/resource/video/view'">
<router-link :to="`/resource/video/update?id=${id}`"> <router-link :to="`/resource/video/update?id=${id}`">
<div class="btn-item">编辑视频信息</div> <div class="btn-item">编辑视频信息</div>
...@@ -126,59 +136,65 @@ const handlesetBelong = () => { ...@@ -126,59 +136,65 @@ const handlesetBelong = () => {
<div class="btn-item">编辑视频课件</div> <div class="btn-item">编辑视频课件</div>
</router-link> </router-link>
</template> </template>
<div class="btn-item" @click="handleDepartment">{{ props.data.department_public == 0 ? '部门共享' : '取消部门共享' }}</div> <div class="btn-item" @click="handleDepartment">
<div class="btn-item" @click="handlePlatform">{{ props.data.platform_public == 0 ? '平台共享' : '取消平台共享' }}</div> {{ props.data.department_public == 0 ? '部门共享' : '取消部门共享' }}
</div>
<div class="btn-item" @click="handlePlatform">
{{ props.data.platform_public == 0 ? '平台共享' : '取消平台共享' }}
</div>
<div class="btn-item" @click="handleStatus">{{ props.data.status == 0 ? '资源上线' : '资源下线' }}</div> <div class="btn-item" @click="handleStatus">{{ props.data.status == 0 ? '资源上线' : '资源下线' }}</div>
<div class="btn-item" @click="handleMembers">更改负责人</div> <div class="btn-item" @click="handleMembers">更改负责人</div>
</div> </div>
<el-dialog v-model="dialogFormVisible" title="更改负责人" center> <el-dialog v-model="dialogFormVisible" title="更改负责人" center>
<el-form :model="form"> <el-form :model="form">
<el-form-item> <el-form-item>
<div style="width:500px"> <div style="width: 500px">
<el-row> <el-row>
<el-col :span="12"><div class="grid-content ep-bg-purple" /> <el-col :span="12"
><div class="grid-content ep-bg-purple" />
资源创建人: {{ props.data.created_operator_name }} 资源创建人: {{ props.data.created_operator_name }}
</el-col> </el-col>
<el-col :span="12"><div class="grid-content ep-bg-purple-light" /> <el-col :span="12"
><div class="grid-content ep-bg-purple-light" />
创建时间: {{ props.data.created_time }} 创建时间: {{ props.data.created_time }}
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"><div class="grid-content ep-bg-purple" /> <el-col :span="12"
><div class="grid-content ep-bg-purple" />
资源负责人: {{ props.data.belong_operator_name }} 资源负责人: {{ props.data.belong_operator_name }}
</el-col> </el-col>
<el-col :span="12"><div class="grid-content ep-bg-purple-light" /> <el-col :span="12"
><div class="grid-content ep-bg-purple-light" />
更新时间: {{ props.data.updated_time }} 更新时间: {{ props.data.updated_time }}
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-select style="width:500px;margin-top:20px;" v-model="form.members" placeholder="请选择新的资源负责人"> <el-select style="width: 500px; margin-top: 20px" v-model="form.members" placeholder="请选择新的资源负责人">
<el-option v-for="item in members" :label="item.name" :value="item.id" :key="item.id"/> <el-option v-for="item in members" :label="item.name" :value="item.id" :key="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button> <el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="handlesetBelong" <el-button type="primary" @click="handlesetBelong">确认</el-button>
>确认</el-button
>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.tool-btn-box{ .tool-btn-box {
display: flex; display: flex;
justify-content: right; justify-content: right;
.btn-item{ .btn-item {
width: 127px; width: 127px;
line-height: 36px; line-height: 36px;
background: #AA1941; background: #aa1941;
border-radius: 20px; border-radius: 20px;
margin-right: 10px; margin-right: 10px;
font-size: 14px; font-size: 14px;
color: #FFFFFF; color: #ffffff;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }
......
<script setup lang="ts"> <script setup lang="ts">
import { getVideoList, getProjectList } from '../api' import { getVideoList } from '../api'
// import { getCategoryList } from '@/api/base'
import CardListItem from '../components/CardListItem.vue' import CardListItem from '../components/CardListItem.vue'
import { Expand, Search } from '@element-plus/icons-vue' import { Expand, Search } from '@element-plus/icons-vue'
import { useCategory } from '@/composables/useCategory' import { useGetCategoryList } from '@/composables/useGetCategoryList'
import { useProjectList } from '@/composables/useGetProjectList'
// 筛选项目列表 // 筛选项目列表
let projectList: any = $ref([]) let { list: projectList } = useProjectList()
getProjectList({ organization_id: '' }).then(res => {
projectList = res.data.departments
})
// 资源出处 tab触发 // 资源出处 tab触发
const tabValue = ref('1') const tabValue = ref('1')
...@@ -42,7 +39,14 @@ const listOptions = $computed(() => { ...@@ -42,7 +39,14 @@ const listOptions = $computed(() => {
{ label: '失效', value: '0' } { label: '失效', value: '0' }
] ]
}, },
{ type: 'select', prop: 'authorized', label: '项目', options: projectList, labelKey: 'name', valueKey: 'id' }, {
type: 'select',
prop: 'authorized',
label: '项目',
options: projectList.value,
labelKey: 'name',
valueKey: 'id'
},
{ prop: 'classification', label: '类别', slots: 'filter-type' }, { prop: 'classification', label: '类别', slots: 'filter-type' },
{ prop: 'title', slots: 'filter-search' } { prop: 'title', slots: 'filter-search' }
], ],
...@@ -62,11 +66,7 @@ const listOptions = $computed(() => { ...@@ -62,11 +66,7 @@ const listOptions = $computed(() => {
}) })
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let { list: selectTree } = useCategory() let { list: selectTree } = useGetCategoryList()
console.log(selectTree)
// getCategoryList({ type: 'tree' }).then((res: any) => {
// selectTree = res.data
// })
const defaultProps = { const defaultProps = {
children: 'children', children: 'children',
label: 'category_name', label: 'category_name',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论