Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b4ba1043
authored
Dec 01, 2023
by
owen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eslint
parent
08be3595
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
64 additions
and
67 deletions
+64
-67
src/api/infra/demo/demo01/index.ts
+1
-2
src/api/infra/demo/demo02/index.ts
+1
-2
src/api/infra/demo/demo03/erp/index.ts
+1
-2
src/api/infra/demo/demo03/inner/index.ts
+7
-4
src/api/infra/demo/demo03/normal/index.ts
+7
-4
src/components/RouterSearch/index.vue
+7
-2
src/layout/components/ToolHeader.vue
+1
-1
src/views/crm/businessStatusType/index.vue
+1
-1
src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue
+2
-2
src/views/infra/codegen/EditTable.vue
+5
-1
src/views/infra/demo/demo01/Demo01ContactForm.vue
+1
-2
src/views/infra/demo/demo02/Demo02CategoryForm.vue
+1
-2
src/views/infra/demo/demo03/erp/Demo03StudentForm.vue
+1
-2
src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue
+1
-2
src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue
+4
-5
src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue
+1
-2
src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue
+4
-5
src/views/infra/demo/demo03/inner/Demo03StudentForm.vue
+1
-2
src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue
+3
-4
src/views/infra/demo/demo03/inner/components/Demo03CourseList.vue
+1
-2
src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue
+4
-5
src/views/infra/demo/demo03/inner/components/Demo03GradeList.vue
+1
-2
src/views/infra/demo/demo03/normal/Demo03StudentForm.vue
+1
-2
src/views/infra/demo/demo03/normal/components/Demo03CourseForm.vue
+3
-4
src/views/infra/demo/demo03/normal/components/Demo03GradeForm.vue
+4
-5
No files found.
src/api/infra/demo/demo01/index.ts
View file @
b4ba1043
...
@@ -37,4 +37,4 @@ export const deleteDemo01Contact = async (id: number) => {
...
@@ -37,4 +37,4 @@ export const deleteDemo01Contact = async (id: number) => {
// 导出示例联系人 Excel
// 导出示例联系人 Excel
export
const
exportDemo01Contact
=
async
(
params
)
=>
{
export
const
exportDemo01Contact
=
async
(
params
)
=>
{
return
await
request
.
download
({
url
:
`/infra/demo01-contact/export-excel`
,
params
})
return
await
request
.
download
({
url
:
`/infra/demo01-contact/export-excel`
,
params
})
}
}
\ No newline at end of file
src/api/infra/demo/demo02/index.ts
View file @
b4ba1043
...
@@ -34,4 +34,4 @@ export const deleteDemo02Category = async (id: number) => {
...
@@ -34,4 +34,4 @@ export const deleteDemo02Category = async (id: number) => {
// 导出示例分类 Excel
// 导出示例分类 Excel
export
const
exportDemo02Category
=
async
(
params
)
=>
{
export
const
exportDemo02Category
=
async
(
params
)
=>
{
return
await
request
.
download
({
url
:
`/infra/demo02-category/export-excel`
,
params
})
return
await
request
.
download
({
url
:
`/infra/demo02-category/export-excel`
,
params
})
}
}
\ No newline at end of file
src/api/infra/demo/demo03/erp/index.ts
View file @
b4ba1043
...
@@ -88,4 +88,4 @@ export const deleteDemo03Grade = async (id: number) => {
...
@@ -88,4 +88,4 @@ export const deleteDemo03Grade = async (id: number) => {
// 获得学生班级
// 获得学生班级
export
const
getDemo03Grade
=
async
(
id
:
number
)
=>
{
export
const
getDemo03Grade
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-grade/get?id=`
+
id
})
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-grade/get?id=`
+
id
})
}
}
\ No newline at end of file
src/api/infra/demo/demo03/inner/index.ts
View file @
b4ba1043
...
@@ -42,12 +42,16 @@ export const exportDemo03Student = async (params) => {
...
@@ -42,12 +42,16 @@ export const exportDemo03Student = async (params) => {
// 获得学生课程列表
// 获得学生课程列表
export
const
getDemo03CourseListByStudentId
=
async
(
studentId
)
=>
{
export
const
getDemo03CourseListByStudentId
=
async
(
studentId
)
=>
{
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-course/list-by-student-id?studentId=`
+
studentId
})
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-course/list-by-student-id?studentId=`
+
studentId
})
}
}
// ==================== 子表(学生班级) ====================
// ==================== 子表(学生班级) ====================
// 获得学生班级
// 获得学生班级
export
const
getDemo03GradeByStudentId
=
async
(
studentId
)
=>
{
export
const
getDemo03GradeByStudentId
=
async
(
studentId
)
=>
{
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-grade/get-by-student-id?studentId=`
+
studentId
})
return
await
request
.
get
({
}
url
:
`/infra/demo03-student/demo03-grade/get-by-student-id?studentId=`
+
studentId
\ No newline at end of file
})
}
src/api/infra/demo/demo03/normal/index.ts
View file @
b4ba1043
...
@@ -42,12 +42,16 @@ export const exportDemo03Student = async (params) => {
...
@@ -42,12 +42,16 @@ export const exportDemo03Student = async (params) => {
// 获得学生课程列表
// 获得学生课程列表
export
const
getDemo03CourseListByStudentId
=
async
(
studentId
)
=>
{
export
const
getDemo03CourseListByStudentId
=
async
(
studentId
)
=>
{
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-course/list-by-student-id?studentId=`
+
studentId
})
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-course/list-by-student-id?studentId=`
+
studentId
})
}
}
// ==================== 子表(学生班级) ====================
// ==================== 子表(学生班级) ====================
// 获得学生班级
// 获得学生班级
export
const
getDemo03GradeByStudentId
=
async
(
studentId
)
=>
{
export
const
getDemo03GradeByStudentId
=
async
(
studentId
)
=>
{
return
await
request
.
get
({
url
:
`/infra/demo03-student/demo03-grade/get-by-student-id?studentId=`
+
studentId
})
return
await
request
.
get
({
}
url
:
`/infra/demo03-student/demo03-grade/get-by-student-id?studentId=`
+
studentId
\ No newline at end of file
})
}
src/components/RouterSearch/index.vue
View file @
b4ba1043
...
@@ -29,7 +29,12 @@
...
@@ -29,7 +29,12 @@
:class=
"showTopSearch ? 'w-220px ml2' : 'w-0'"
:class=
"showTopSearch ? 'w-220px ml2' : 'w-0'"
@
change=
"handleChange"
@
change=
"handleChange"
>
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-select>
</div>
</div>
</
template
>
</
template
>
...
@@ -73,7 +78,7 @@ function remoteMethod(data) {
...
@@ -73,7 +78,7 @@ function remoteMethod(data) {
function
handleChange
(
path
)
{
function
handleChange
(
path
)
{
router
.
push
({
path
})
router
.
push
({
path
})
hiddenTopSearch
()
;
hiddenTopSearch
()
}
}
function
hiddenTopSearch
()
{
function
hiddenTopSearch
()
{
...
...
src/layout/components/ToolHeader.vue
View file @
b4ba1043
...
@@ -65,7 +65,7 @@ export default defineComponent({
...
@@ -65,7 +65,7 @@ export default defineComponent({
{
screenfull
.
value
?
(
{
screenfull
.
value
?
(
<
Screenfull
class
=
"custom-hover"
color
=
"var(--top-header-text-color)"
><
/Screenfull
>
<
Screenfull
class
=
"custom-hover"
color
=
"var(--top-header-text-color)"
><
/Screenfull
>
)
:
undefined
}
)
:
undefined
}
{
search
.
value
?
(
<
RouterSearch
isModal
=
{
false
}
/>
)
: undefined
}
{
search
.
value
?
<
RouterSearch
isModal
=
{
false
}
/>
: undefined
}
{
size
.
value
?
(
{
size
.
value
?
(
<
SizeDropdown
class
=
"custom-hover"
color
=
"var(--top-header-text-color)"
><
/SizeDropdown
>
<
SizeDropdown
class
=
"custom-hover"
color
=
"var(--top-header-text-color)"
><
/SizeDropdown
>
)
:
undefined
}
)
:
undefined
}
...
...
src/views/crm/businessStatusType/index.vue
View file @
b4ba1043
...
@@ -95,7 +95,7 @@ const list = ref([]) // 列表的数据
...
@@ -95,7 +95,7 @@ const list = ref([]) // 列表的数据
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
exportLoading
=
ref
(
false
)
// 导出的加载中
const
exportLoading
=
ref
(
false
)
// 导出的加载中
...
...
src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue
View file @
b4ba1043
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
v-model=
"formData.userIds"
v-model=
"formData.userIds"
:data=
"userTree"
:data=
"userTree"
:props=
"defaultProps"
:props=
"defaultProps"
check-on-click-node
multiple
multiple
filterable
filterable
check-on-click-node
node-key=
"id"
node-key=
"id"
placeholder=
"请选择规则适用人群"
placeholder=
"请选择规则适用人群"
/>
/>
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
:data=
"deptTree"
:data=
"deptTree"
:props=
"defaultProps"
:props=
"defaultProps"
multiple
multiple
check-strictly
filterable
filterable
check-strictly
node-key=
"id"
node-key=
"id"
placeholder=
"请选择规则适用部门"
placeholder=
"请选择规则适用部门"
/>
/>
...
...
src/views/infra/codegen/EditTable.vue
View file @
b4ba1043
...
@@ -8,7 +8,11 @@
...
@@ -8,7 +8,11 @@
<colum-info-form
ref=
"columInfoRef"
:columns=
"formData.columns"
/>
<colum-info-form
ref=
"columInfoRef"
:columns=
"formData.columns"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"生成信息"
name=
"generateInfo"
>
<el-tab-pane
label=
"生成信息"
name=
"generateInfo"
>
<generate-info-form
ref=
"generateInfoRef"
:table=
"formData.table"
:columns=
"formData.columns"
/>
<generate-info-form
ref=
"generateInfoRef"
:table=
"formData.table"
:columns=
"formData.columns"
/>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<el-form>
<el-form>
...
...
src/views/infra/demo/demo01/Demo01ContactForm.vue
View file @
b4ba1043
...
@@ -123,4 +123,4 @@ const resetForm = () => {
...
@@ -123,4 +123,4 @@ const resetForm = () => {
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo02/Demo02CategoryForm.vue
View file @
b4ba1043
...
@@ -111,4 +111,4 @@ const getDemo02CategoryTree = async () => {
...
@@ -111,4 +111,4 @@ const getDemo02CategoryTree = async () => {
root
.
children
=
handleTree
(
data
,
'id'
,
'parentId'
)
root
.
children
=
handleTree
(
data
,
'id'
,
'parentId'
)
demo02CategoryTree
.
value
.
push
(
root
)
demo02CategoryTree
.
value
.
push
(
root
)
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/erp/Demo03StudentForm.vue
View file @
b4ba1043
...
@@ -118,4 +118,4 @@ const resetForm = () => {
...
@@ -118,4 +118,4 @@ const resetForm = () => {
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue
View file @
b4ba1043
...
@@ -96,4 +96,4 @@ const resetForm = () => {
...
@@ -96,4 +96,4 @@ const resetForm = () => {
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue
View file @
b4ba1043
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</el-button>
</el-button>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"名字"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"名字"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"分数"
align=
"center"
prop=
"score"
/>
<el-table-column
label=
"分数"
align=
"center"
prop=
"score"
/>
<el-table-column
<el-table-column
label=
"创建时间"
label=
"创建时间"
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<Demo03CourseForm
ref=
"formRef"
@
success=
"getList"
/>
<Demo03CourseForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -123,4 +123,4 @@ const handleDelete = async (id: number) => {
...
@@ -123,4 +123,4 @@ const handleDelete = async (id: number) => {
await
getList
()
await
getList
()
}
catch
{}
}
catch
{}
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue
View file @
b4ba1043
...
@@ -96,4 +96,4 @@ const resetForm = () => {
...
@@ -96,4 +96,4 @@ const resetForm = () => {
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue
View file @
b4ba1043
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</el-button>
</el-button>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"名字"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"名字"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"班主任"
align=
"center"
prop=
"teacher"
/>
<el-table-column
label=
"班主任"
align=
"center"
prop=
"teacher"
/>
<el-table-column
<el-table-column
label=
"创建时间"
label=
"创建时间"
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<Demo03GradeForm
ref=
"formRef"
@
success=
"getList"
/>
<Demo03GradeForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -123,4 +123,4 @@ const handleDelete = async (id: number) => {
...
@@ -123,4 +123,4 @@ const handleDelete = async (id: number) => {
await
getList
()
await
getList
()
}
catch
{}
}
catch
{}
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/inner/Demo03StudentForm.vue
View file @
b4ba1043
...
@@ -150,4 +150,4 @@ const resetForm = () => {
...
@@ -150,4 +150,4 @@ const resetForm = () => {
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue
View file @
b4ba1043
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
>
>
<el-table
:data=
"formData"
class=
"-mt-10px"
>
<el-table
:data=
"formData"
class=
"-mt-10px"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
/>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
/>
<el-table-column
label=
"名字"
min-width=
"150"
>
<el-table-column
label=
"名字"
min-width=
"150"
>
<template
#
default=
"
{ row, $index }">
<template
#
default=
"
{ row, $index }">
<el-form-item
:prop=
"`$
{$index}.name`" :rules="formRules.name" class="mb-0px!">
<el-form-item
:prop=
"`$
{$index}.name`" :rules="formRules.name" class="mb-0px!">
<el-input
v-model=
"row.name"
placeholder=
"请输入名字"
/>
<el-input
v-model=
"row.name"
placeholder=
"请输入名字"
/>
...
@@ -57,7 +57,7 @@ watch(
...
@@ -57,7 +57,7 @@ watch(
formData
.
value
=
[]
formData
.
value
=
[]
// 2. val 非空,则加载数据
// 2. val 非空,则加载数据
if
(
!
val
)
{
if
(
!
val
)
{
return
;
return
}
}
try
{
try
{
formLoading
.
value
=
true
formLoading
.
value
=
true
...
@@ -97,4 +97,4 @@ const getData = () => {
...
@@ -97,4 +97,4 @@ const getData = () => {
}
}
defineExpose
({
validate
,
getData
})
defineExpose
({
validate
,
getData
})
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/inner/components/Demo03CourseList.vue
View file @
b4ba1043
...
@@ -48,4 +48,4 @@ const handleQuery = () => {
...
@@ -48,4 +48,4 @@ const handleQuery = () => {
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
})
})
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue
View file @
b4ba1043
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
label-width=
"100px"
label-width=
"100px"
v-loading=
"formLoading"
v-loading=
"formLoading"
>
>
<el-form-item
label=
"名字"
prop=
"name"
>
<el-form-item
label=
"名字"
prop=
"name"
>
<el-input
v-model=
"formData.name"
placeholder=
"请输入名字"
/>
<el-input
v-model=
"formData.name"
placeholder=
"请输入名字"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"班主任"
prop=
"teacher"
>
<el-form-item
label=
"班主任"
prop=
"teacher"
>
...
@@ -38,11 +38,11 @@ watch(
...
@@ -38,11 +38,11 @@ watch(
id
:
undefined
,
id
:
undefined
,
studentId
:
undefined
,
studentId
:
undefined
,
name
:
undefined
,
name
:
undefined
,
teacher
:
undefined
,
teacher
:
undefined
}
}
// 2. val 非空,则加载数据
// 2. val 非空,则加载数据
if
(
!
val
)
{
if
(
!
val
)
{
return
;
return
}
}
try
{
try
{
formLoading
.
value
=
true
formLoading
.
value
=
true
...
@@ -69,4 +69,4 @@ const getData = () => {
...
@@ -69,4 +69,4 @@ const getData = () => {
}
}
defineExpose
({
validate
,
getData
})
defineExpose
({
validate
,
getData
})
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/inner/components/Demo03GradeList.vue
View file @
b4ba1043
...
@@ -52,4 +52,4 @@ const handleQuery = () => {
...
@@ -52,4 +52,4 @@ const handleQuery = () => {
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
})
})
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/normal/Demo03StudentForm.vue
View file @
b4ba1043
...
@@ -150,4 +150,4 @@ const resetForm = () => {
...
@@ -150,4 +150,4 @@ const resetForm = () => {
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/normal/components/Demo03CourseForm.vue
View file @
b4ba1043
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
>
>
<el-table
:data=
"formData"
class=
"-mt-10px"
>
<el-table
:data=
"formData"
class=
"-mt-10px"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
/>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
/>
<el-table-column
label=
"名字"
min-width=
"150"
>
<el-table-column
label=
"名字"
min-width=
"150"
>
<template
#
default=
"
{ row, $index }">
<template
#
default=
"
{ row, $index }">
<el-form-item
:prop=
"`$
{$index}.name`" :rules="formRules.name" class="mb-0px!">
<el-form-item
:prop=
"`$
{$index}.name`" :rules="formRules.name" class="mb-0px!">
<el-input
v-model=
"row.name"
placeholder=
"请输入名字"
/>
<el-input
v-model=
"row.name"
placeholder=
"请输入名字"
/>
...
@@ -57,7 +57,7 @@ watch(
...
@@ -57,7 +57,7 @@ watch(
formData
.
value
=
[]
formData
.
value
=
[]
// 2. val 非空,则加载数据
// 2. val 非空,则加载数据
if
(
!
val
)
{
if
(
!
val
)
{
return
;
return
}
}
try
{
try
{
formLoading
.
value
=
true
formLoading
.
value
=
true
...
@@ -97,4 +97,4 @@ const getData = () => {
...
@@ -97,4 +97,4 @@ const getData = () => {
}
}
defineExpose
({
validate
,
getData
})
defineExpose
({
validate
,
getData
})
</
script
>
</
script
>
\ No newline at end of file
src/views/infra/demo/demo03/normal/components/Demo03GradeForm.vue
View file @
b4ba1043
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
label-width=
"100px"
label-width=
"100px"
v-loading=
"formLoading"
v-loading=
"formLoading"
>
>
<el-form-item
label=
"名字"
prop=
"name"
>
<el-form-item
label=
"名字"
prop=
"name"
>
<el-input
v-model=
"formData.name"
placeholder=
"请输入名字"
/>
<el-input
v-model=
"formData.name"
placeholder=
"请输入名字"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"班主任"
prop=
"teacher"
>
<el-form-item
label=
"班主任"
prop=
"teacher"
>
...
@@ -38,11 +38,11 @@ watch(
...
@@ -38,11 +38,11 @@ watch(
id
:
undefined
,
id
:
undefined
,
studentId
:
undefined
,
studentId
:
undefined
,
name
:
undefined
,
name
:
undefined
,
teacher
:
undefined
,
teacher
:
undefined
}
}
// 2. val 非空,则加载数据
// 2. val 非空,则加载数据
if
(
!
val
)
{
if
(
!
val
)
{
return
;
return
}
}
try
{
try
{
formLoading
.
value
=
true
formLoading
.
value
=
true
...
@@ -69,4 +69,4 @@ const getData = () => {
...
@@ -69,4 +69,4 @@ const getData = () => {
}
}
defineExpose
({
validate
,
getData
})
defineExpose
({
validate
,
getData
})
</
script
>
</
script
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment