Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
9d16a6e8
提交
9d16a6e8
authored
6月 08, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
47613f2f
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
21 行增加
和
28 行删除
+21
-28
TreeDialog.vue
src/modules/admin/category/component/TreeDialog.vue
+1
-1
List.vue
src/modules/admin/category/views/List.vue
+9
-11
Add.vue
src/modules/admin/teacher/views/Add.vue
+1
-9
List.vue
src/modules/system/dictionary/views/List.vue
+6
-6
map.ts
src/stores/map.ts
+2
-0
tsconfig.json
tsconfig.json
+2
-1
没有找到文件。
src/modules/admin/category/component/TreeDialog.vue
浏览文件 @
9d16a6e8
...
@@ -46,7 +46,7 @@ watch(filterText, val => {
...
@@ -46,7 +46,7 @@ watch(filterText, val => {
treeRef
.
value
?.
filter
(
val
)
treeRef
.
value
?.
filter
(
val
)
})
})
//搜索
//搜索
const
filterNode
=
(
value
:
string
,
data
:
ICategor
y
)
=>
{
const
filterNode
=
(
value
:
string
,
data
:
an
y
)
=>
{
console
.
log
(
value
,
'value'
,
data
.
category_name
,
'data'
)
console
.
log
(
value
,
'value'
,
data
.
category_name
,
'data'
)
if
(
!
value
)
return
true
if
(
!
value
)
return
true
return
data
.
category_name
.
indexOf
(
value
)
!=
-
1
return
data
.
category_name
.
indexOf
(
value
)
!=
-
1
...
...
src/modules/admin/category/views/List.vue
浏览文件 @
9d16a6e8
...
@@ -6,7 +6,6 @@ import { getCategoryList, delCategory, createCategory, updateCategory } from '..
...
@@ -6,7 +6,6 @@ import { getCategoryList, delCategory, createCategory, updateCategory } from '..
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
const
loading
=
ref
(
false
)
const
loading
=
ref
(
false
)
const
prevCategoryName
=
ref
(
''
)
// 上层类别
const
title
=
ref
(
''
)
const
title
=
ref
(
''
)
const
dialogVisible
=
ref
(
false
)
const
dialogVisible
=
ref
(
false
)
let
form
=
reactive
({
let
form
=
reactive
({
...
@@ -43,18 +42,17 @@ const handleDelete = (index: number, row: ICategory) => {
...
@@ -43,18 +42,17 @@ const handleDelete = (index: number, row: ICategory) => {
})
})
}
}
// 新增类别
// 新增类别
const
handleAdd
=
(
index
:
number
,
row
:
ICategory
)
=>
{
const
handleAdd
Row
=
(
index
:
number
,
row
:
ICategory
)
=>
{
isEdit
.
value
=
false
isEdit
.
value
=
false
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
title
.
value
=
'新增类别'
title
.
value
=
'新增类别'
if
(
row
)
{
editData
.
value
=
row
editData
.
value
=
row
if
(
row
.
depth
===
'0'
)
{
}
prevCategoryName
.
value
=
''
const
handleAddCategory
=
()
=>
{
}
isEdit
.
value
=
false
}
else
{
dialogVisible
.
value
=
true
title
.
value
=
'新增类别'
editData
.
value
=
tableData
[
0
]
editData
.
value
=
tableData
[
0
]
}
}
}
// const sortable = (className: any, targetName: any) => {
// const sortable = (className: any, targetName: any) => {
...
@@ -166,14 +164,14 @@ onMounted(() => {
...
@@ -166,14 +164,14 @@ onMounted(() => {
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增类别
</el-button>
<el-button
type=
"primary"
@
click=
"handleAdd
Category
"
>
新增类别
</el-button>
<el-table
<el-table
class=
"t1"
class=
"t1"
:data=
"tableData"
:data=
"tableData"
style=
"width: 100%"
style=
"width: 100%"
row-key=
"id"
row-key=
"id"
ref=
"dragTable"
ref=
"dragTable"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren'
, draggable: true
}"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }"
highlight-current-row
highlight-current-row
v-loading="loading"
v-loading="loading"
>
>
...
@@ -186,7 +184,7 @@ onMounted(() => {
...
@@ -186,7 +184,7 @@ onMounted(() => {
<el-table-column
align=
"center"
label=
"操作"
width=
"300px"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"300px"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
type=
"primary"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
<el-button
@
click=
"handleAdd(scope.$index, scope.row)"
>
新增
</el-button>
<el-button
@
click=
"handleAdd
Row
(scope.$index, scope.row)"
>
新增
</el-button>
<el-button
@
click=
"handleDelete(scope.$index, scope.row)"
>
删除
</el-button>
<el-button
@
click=
"handleDelete(scope.$index, scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
src/modules/admin/teacher/views/Add.vue
浏览文件 @
9d16a6e8
...
@@ -6,7 +6,6 @@ import { ElMessage } from 'element-plus'
...
@@ -6,7 +6,6 @@ import { ElMessage } from 'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
const
router
=
useRouter
()
const
router
=
useRouter
()
const
formSize
=
ref
(
'default'
)
const
ruleFormRef
=
ref
<
FormInstance
>
()
const
ruleFormRef
=
ref
<
FormInstance
>
()
let
ruleForm
=
reactive
({
let
ruleForm
=
reactive
({
id
:
''
,
id
:
''
,
...
@@ -51,14 +50,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
...
@@ -51,14 +50,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
<
template
>
<
template
>
<AppCard
title=
"添加讲师"
>
<AppCard
title=
"添加讲师"
>
<el-form
<el-form
ref=
"ruleFormRef"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"120px"
class=
"demo-ruleForm"
>
ref=
"ruleFormRef"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"120px"
class=
"demo-ruleForm"
:size=
"formSize"
>
<el-row>
<el-row>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"讲师姓名:"
prop=
"name"
>
<el-form-item
label=
"讲师姓名:"
prop=
"name"
>
...
...
src/modules/system/dictionary/views/List.vue
浏览文件 @
9d16a6e8
...
@@ -14,7 +14,9 @@ const rowInfo = ref({})
...
@@ -14,7 +14,9 @@ const rowInfo = ref({})
// 状态
// 状态
let
statusList
=
$ref
<
IMapList
[]
>
([])
let
statusList
=
$ref
<
IMapList
[]
>
([])
//表单每行数据
//表单每行数据
const
listOptions
=
{
const
listOptions
=
$computed
(()
=>
{
return
{
remote
:
{
remote
:
{
httpRequest
:
getDictionaryList
,
httpRequest
:
getDictionaryList
,
params
:
{
params
:
{
...
@@ -30,10 +32,7 @@ const listOptions = {
...
@@ -30,10 +32,7 @@ const listOptions = {
type
:
'select'
,
type
:
'select'
,
prop
:
'status'
,
prop
:
'status'
,
label
:
'字典状态:'
,
label
:
'字典状态:'
,
options
:
[
options
:
statusList
{
label
:
'有效'
,
value
:
'1'
},
{
label
:
'失效'
,
value
:
'0'
}
]
},
},
{
{
type
:
'input'
,
type
:
'input'
,
...
@@ -70,7 +69,8 @@ const listOptions = {
...
@@ -70,7 +69,8 @@ const listOptions = {
]
]
}
}
]
]
}
}
})
// 新增弹窗
// 新增弹窗
const
handleAdd
=
()
=>
{
const
handleAdd
=
()
=>
{
isShowDialog
.
value
=
true
isShowDialog
.
value
=
true
...
...
src/stores/map.ts
浏览文件 @
9d16a6e8
...
@@ -32,3 +32,5 @@ export const useMapStore = defineStore({
...
@@ -32,3 +32,5 @@ export const useMapStore = defineStore({
}
}
}
}
})
})
useMapStore
().
getMapList
()
tsconfig.json
浏览文件 @
9d16a6e8
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
"paths"
:
{
"paths"
:
{
"@/*"
:
[
"./src/*"
]
"@/*"
:
[
"./src/*"
]
},
},
"suppressImplicitAnyIndexErrors"
:
true
"suppressImplicitAnyIndexErrors"
:
true
,
"types"
:
[
"element-plus/global"
]
},
},
"references"
:
[
"references"
:
[
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论