提交 39f73449 authored 作者: matian's avatar matian

删除多余console.log

上级 19d93265
...@@ -8,7 +8,7 @@ const props: any = defineProps<{ ...@@ -8,7 +8,7 @@ const props: any = defineProps<{
tabIndex: string tabIndex: string
}>() }>()
const fileType = ['doc', 'docx', 'xls', 'xlsx', 'pdf', 'ppt', 'pptx', 'mp3', 'mp4', 'png', 'jpeg', 'jpg'] const fileType = ['doc', 'docx', 'xls', 'xlsx', 'pdf', 'ppt', 'pptx', 'mp3', 'mp4', 'png', 'jpeg', 'jpg', 'rar']
const bytesToSize = (bytes: number) => { const bytesToSize = (bytes: number) => {
if (bytes === 0) return '0 B' if (bytes === 0) return '0 B'
......
...@@ -15,7 +15,6 @@ const options = [ ...@@ -15,7 +15,6 @@ const options = [
] ]
const handleSave = () => { const handleSave = () => {
console.log(form) console.log(form)
console.log('000')
} }
</script> </script>
<template> <template>
......
...@@ -64,7 +64,6 @@ const handleOpenTree = () => { ...@@ -64,7 +64,6 @@ const handleOpenTree = () => {
} }
// 获取子组件确定之后节点回显 // 获取子组件确定之后节点回显
const getCheckedLabel = (val: any) => { const getCheckedLabel = (val: any) => {
console.log(val, '99991111')
categoryName.value = val.checkedCategory.checkedLabel categoryName.value = val.checkedCategory.checkedLabel
categoryForm.parent_id = val.checkedCategory.checkedId categoryForm.parent_id = val.checkedCategory.checkedId
categoryForm.depth = parseInt(val.checkedCategory.checkedLevel) + 1 categoryForm.depth = parseInt(val.checkedCategory.checkedLevel) + 1
...@@ -72,13 +71,11 @@ const getCheckedLabel = (val: any) => { ...@@ -72,13 +71,11 @@ const getCheckedLabel = (val: any) => {
// 关闭弹框 // 关闭弹框
const handleCancel = () => { const handleCancel = () => {
emit('update:dialogVisible', false) emit('update:dialogVisible', false)
console.log(formRef.value, 'formRef.value')
categoryName.value = '' categoryName.value = ''
formRef.value.resetFields() formRef.value.resetFields()
} }
// 确认提交表单 // 确认提交表单
const handleConfirm = () => { const handleConfirm = () => {
console.log(props.isEdit, '00000', categoryForm)
if (props.isEdit) { if (props.isEdit) {
const params = Object.assign({ id: props.editData.id }, categoryForm) const params = Object.assign({ id: props.editData.id }, categoryForm)
updateCategory(params).then(() => { updateCategory(params).then(() => {
...@@ -104,7 +101,6 @@ const handleConfirm = () => { ...@@ -104,7 +101,6 @@ const handleConfirm = () => {
} }
onMounted(() => { onMounted(() => {
console.log(props.editData.id, '0000')
categoryForm.depth = parseInt(props.editData?.depth) + 1 || 0 categoryForm.depth = parseInt(props.editData?.depth) + 1 || 0
categoryForm.parent_id = props.editData?.id categoryForm.parent_id = props.editData?.id
categoryName.value = props.editData.category_name categoryName.value = props.editData.category_name
......
...@@ -42,7 +42,6 @@ const submitForm = async (formEl: FormInstance | undefined) => { ...@@ -42,7 +42,6 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) return if (!formEl) return
await formEl.validate(valid => { await formEl.validate(valid => {
if (valid) { if (valid) {
console.log(store.getMapValuesByKey('teacher_level'), ruleForm.education, 'add')
if (ruleForm.education !== '') { if (ruleForm.education !== '') {
ruleForm.education = store ruleForm.education = store
.getMapValuesByKey('teacher_level') .getMapValuesByKey('teacher_level')
......
...@@ -71,11 +71,9 @@ const getTeacherInfo = () => { ...@@ -71,11 +71,9 @@ const getTeacherInfo = () => {
} }
// 更新讲师 // 更新讲师
const handleUpdate = async (formEl: FormInstance | undefined) => { const handleUpdate = async (formEl: FormInstance | undefined) => {
console.log('0000')
if (!formEl) return if (!formEl) return
await formEl.validate(valid => { await formEl.validate(valid => {
if (valid) { if (valid) {
console.log(store.getMapValuesByKey('teacher_level'), ruleForm.education, ruleForm.education, 'edit')
if (ruleForm.education !== '') { if (ruleForm.education !== '') {
ruleForm.education = store ruleForm.education = store
.getMapValuesByKey('teacher_level') .getMapValuesByKey('teacher_level')
...@@ -87,9 +85,7 @@ const handleUpdate = async (formEl: FormInstance | undefined) => { ...@@ -87,9 +85,7 @@ const handleUpdate = async (formEl: FormInstance | undefined) => {
ruleForm.avatar = imgDefault ruleForm.avatar = imgDefault
} }
const params = Object.assign({}, ruleForm) const params = Object.assign({}, ruleForm)
console.log(params, 'params.education')
console.log(params, 'params')
updateTeacher(params).then(() => { updateTeacher(params).then(() => {
ElMessage.success('更新讲师成功') ElMessage.success('更新讲师成功')
router.push('/admin/teacher') router.push('/admin/teacher')
......
...@@ -65,7 +65,6 @@ const handleUpdate = (row: any) => { ...@@ -65,7 +65,6 @@ const handleUpdate = (row: any) => {
} }
//讲师详情 //讲师详情
const handleDetail = (row: any) => { const handleDetail = (row: any) => {
console.log(row.id)
router.push({ router.push({
path: '/admin/teacher/detail', path: '/admin/teacher/detail',
query: { query: {
......
...@@ -13,7 +13,6 @@ const props = defineProps({ ...@@ -13,7 +13,6 @@ const props = defineProps({
} }
}) })
const examList: any = ref([]) const examList: any = ref([])
console.log(props.data.length, 'length')
watch( watch(
() => props.data, () => props.data,
value => { value => {
...@@ -68,7 +67,6 @@ const removeLectuter = (id: string) => { ...@@ -68,7 +67,6 @@ const removeLectuter = (id: string) => {
emit('change', examList.value) emit('change', examList.value)
} }
const handleAddExam = (val: any) => { const handleAddExam = (val: any) => {
console.log(props.data, 'pppp')
let flag = false let flag = false
examList.value.forEach((item: any) => { examList.value.forEach((item: any) => {
val.value.forEach((it: any) => { val.value.forEach((it: any) => {
......
...@@ -8,6 +8,11 @@ const selectionRow: any = ref([]) ...@@ -8,6 +8,11 @@ const selectionRow: any = ref([])
const tableData = ref([]) const tableData = ref([])
const emit = defineEmits<Emits>() const emit = defineEmits<Emits>()
const props = defineProps({ const props = defineProps({
// 是否多选
isMultiple: {
type: Boolean,
required: true
},
isShowExamDialog: { isShowExamDialog: {
type: Boolean, type: Boolean,
required: true required: true
...@@ -90,20 +95,20 @@ const tabChange = () => { ...@@ -90,20 +95,20 @@ const tabChange = () => {
const handleCancel = () => { const handleCancel = () => {
emit('update:isShowExamDialog', false) emit('update:isShowExamDialog', false)
} }
// 单选
const handleSelection = (selection: any) => { const handleSelection = (selection: any) => {
// table组件选中事件 // table组件选中事件
if (selection.length > 1) { if (selection.length > 1 && props.isMultiple === false) {
let del_row = selection.shift() let del_row = selection.shift()
appList.value?.tableRef.toggleRowSelection(del_row, false) appList.value?.tableRef.toggleRowSelection(del_row, false)
console.log(selection, 'selection')
selectionRow.value = selection selectionRow.value = selection
} else { } else if (props.isMultiple === true || (selection.length <= 1 && props.isMultiple === false)) {
selectionRow.value = selection selectionRow.value = selection
} }
} }
// 保存 // 保存
const handleSave = () => { const handleSave = () => {
console.log(selectionRow.value)
const name = selectionRow.value[0]?.paper_title const name = selectionRow.value[0]?.paper_title
const resource_id = selectionRow.value[0]?.id const resource_id = selectionRow.value[0]?.id
const params: any = { const params: any = {
......
...@@ -52,7 +52,6 @@ const typeFilter = () => { ...@@ -52,7 +52,6 @@ const typeFilter = () => {
} }
const listOptions = computed(() => { const listOptions = computed(() => {
console.log(props.btnInfo.resource_type)
let getHttpRequest = null let getHttpRequest = null
if (props.btnInfo.resource_type === '2') { if (props.btnInfo.resource_type === '2') {
getHttpRequest = getVideoList getHttpRequest = getVideoList
...@@ -143,7 +142,6 @@ if (props.btnInfo.resource_type === '2') { ...@@ -143,7 +142,6 @@ if (props.btnInfo.resource_type === '2') {
<template #body="{ data }"> <template #body="{ data }">
<div class="card-list" v-if="data.length"> <div class="card-list" v-if="data.length">
<div class="card-list-con"> <div class="card-list-con">
{{ currentResource }}
<el-radio-group v-model="currentResource"> <el-radio-group v-model="currentResource">
<div style="position: relative" v-for="(item, index) in data" :key="index"> <div style="position: relative" v-for="(item, index) in data" :key="index">
<el-radio <el-radio
......
...@@ -103,7 +103,6 @@ const handleEdit = (node: any) => { ...@@ -103,7 +103,6 @@ const handleEdit = (node: any) => {
isShowDialog.value = true isShowDialog.value = true
chapterName.value = node.label chapterName.value = node.label
} else { } else {
console.log(node.data.label)
chapterName.value = node.data.parent_name chapterName.value = node.data.parent_name
sectionName.value = node.label sectionName.value = node.label
isShowSectionDialog.value = true isShowSectionDialog.value = true
...@@ -111,7 +110,6 @@ const handleEdit = (node: any) => { ...@@ -111,7 +110,6 @@ const handleEdit = (node: any) => {
} }
// 删除章节 // 删除章节
const handleDel = (node: any) => { const handleDel = (node: any) => {
console.log(node, 'node1222')
ElMessageBox.confirm('确定要删除吗?', '提示').then(() => { ElMessageBox.confirm('确定要删除吗?', '提示').then(() => {
const params = { id: node.key, course_id: id } const params = { id: node.key, course_id: id }
delCharacter(params).then(() => { delCharacter(params).then(() => {
...@@ -141,7 +139,6 @@ const handleAddDialog = (node: any, item: any) => { ...@@ -141,7 +139,6 @@ const handleAddDialog = (node: any, item: any) => {
} }
//查阅 //查阅
const handleConsult = (node: any) => { const handleConsult = (node: any) => {
console.log(node.data.resource_type, '000')
// 视频 // 视频
if (node.data.resource_type === '2') { if (node.data.resource_type === '2') {
getVideoDetails({ id: node.data.resource_id }).then(res => { getVideoDetails({ id: node.data.resource_id }).then(res => {
...@@ -152,7 +149,6 @@ const handleConsult = (node: any) => { ...@@ -152,7 +149,6 @@ const handleConsult = (node: any) => {
} }
// 下载 // 下载
const handleDownload = (node: any) => { const handleDownload = (node: any) => {
console.log(node.data.resource.can_view)
window.open(node.data.resource.url) window.open(node.data.resource.url)
} }
//拖拽 //拖拽
...@@ -388,6 +384,7 @@ const handleNodeCollapse = () => { ...@@ -388,6 +384,7 @@ const handleNodeCollapse = () => {
:chapterID="chapterID" :chapterID="chapterID"
:course_id="id" :course_id="id"
:btnInfo="btnInfo" :btnInfo="btnInfo"
:isMultiple="false"
/> />
<!-- 视频查阅弹框 --> <!-- 视频查阅弹框 -->
<VideoPlayDialog <VideoPlayDialog
......
...@@ -54,6 +54,7 @@ let form: any = $ref({ ...@@ -54,6 +54,7 @@ let form: any = $ref({
watch( watch(
() => form.file, () => form.file,
value => { value => {
console.log(form.file)
const name = value[0]?.name const name = value[0]?.name
form.name = name.slice(0, name.lastIndexOf('.')) || '' form.name = name.slice(0, name.lastIndexOf('.')) || ''
} }
...@@ -143,7 +144,7 @@ const createResources = (params: any) => { ...@@ -143,7 +144,7 @@ const createResources = (params: any) => {
// 协议 // 协议
const protocol = ref(false) const protocol = ref(false)
const changeProtocol = (data:any) => { const changeProtocol = (data: any) => {
protocol.value = data.value protocol.value = data.value
} }
</script> </script>
......
...@@ -48,12 +48,10 @@ getCoverList().then(res => { ...@@ -48,12 +48,10 @@ getCoverList().then(res => {
swiperCovers.splice(index, 1) swiperCovers.splice(index, 1)
} }
}) })
console.log(swiperCovers, '123')
}) })
// 获取swiper 自定义左右切换按钮 // 获取swiper 自定义左右切换按钮
let swiper = ref() let swiper = ref()
const swiperChange = (type?: string) => { const swiperChange = (type?: string) => {
console.log(swiperChange, 'index')
type === 'prev' ? swiper.value.prev() : swiper.value.next() type === 'prev' ? swiper.value.prev() : swiper.value.next()
} }
const swiperItemHandle = (url: string) => { const swiperItemHandle = (url: string) => {
......
...@@ -70,7 +70,6 @@ const handleConfirm = async (formEl: FormInstance | undefined) => { ...@@ -70,7 +70,6 @@ const handleConfirm = async (formEl: FormInstance | undefined) => {
} }
onMounted(() => { onMounted(() => {
console.log(props.rowInfo, 'props.rowInfo')
if (props.isEdit) { if (props.isEdit) {
form.name = props.rowInfo.name form.name = props.rowInfo.name
form.key = props.rowInfo.key form.key = props.rowInfo.key
......
...@@ -80,7 +80,6 @@ const handleDelete = (row: any) => { ...@@ -80,7 +80,6 @@ const handleDelete = (row: any) => {
} }
// 跳转列表 // 跳转列表
const handleList = (row: any) => { const handleList = (row: any) => {
console.log('列表', row.rowList)
router.push({ router.push({
path: '/system/dictionary/rowList', path: '/system/dictionary/rowList',
query: { query: {
......
...@@ -35,14 +35,12 @@ const handleAdd = () => { ...@@ -35,14 +35,12 @@ const handleAdd = () => {
isEdit.value = false isEdit.value = false
editData.value = {} editData.value = {}
title.value = '新增数据' title.value = '新增数据'
console.log('新增字典')
} }
const handleEdit = (row: any) => { const handleEdit = (row: any) => {
isEdit.value = true isEdit.value = true
editData.value = row editData.value = row
isListAddDialog.value = true isListAddDialog.value = true
title.value = '修改数据' title.value = '修改数据'
console.log('编辑字典', row)
} }
const handleDelete = (row: any) => { const handleDelete = (row: any) => {
ElMessageBox.confirm('确定要删除吗?', '提示').then(() => { ElMessageBox.confirm('确定要删除吗?', '提示').then(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论