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

删除多余console.log

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