Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
ac13fb0e
Commit
ac13fb0e
authored
Jan 24, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加
parent
e8a60285
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
412 additions
and
0 deletions
+412
-0
index.js
src/api/system/index.js
+55
-0
type-form.vue
src/components/system/type-form.vue
+145
-0
type.vue
src/pages/studyAbroad/common/type.vue
+179
-0
studyType.vue
src/pages/studyAbroad/studyType.vue
+27
-0
routes.js
src/router/routes.js
+6
-0
No files found.
src/api/system/index.js
View file @
ac13fb0e
...
...
@@ -699,4 +699,59 @@ export function GetConsultantGoal(data) {
method
:
'post'
,
data
});
}
/**
* 获取留学就业类型分页列表
*/
export
function
GetStudyabroadTypePage
(
data
)
{
return
request
({
url
:
'/StudyAbroad/GetStudyabroadTypePage'
,
method
:
'post'
,
data
});
}
/**
* 根据编号删除留学就业类型
*/
export
function
RemoveStudyabroadType
(
data
)
{
return
request
({
url
:
'/StudyAbroad/RemoveStudyabroadType'
,
method
:
'post'
,
data
});
}
/**
* 留学就业类型列表(下拉使用)
*/
export
function
GetStudyabroadTypeList
(
data
)
{
return
request
({
url
:
'/StudyAbroad/GetStudyabroadTypeList'
,
method
:
'post'
,
data
});
}
/**
* 新增修改留学就业类型
*/
export
function
SetStudyabroadType
(
data
)
{
return
request
({
url
:
'/StudyAbroad/SetStudyabroadType'
,
method
:
'post'
,
data
});
}
/**
* 根据编号获取留学就业类型实体详情
*/
export
function
GetStudyabroadType
(
data
)
{
return
request
({
url
:
'/StudyAbroad/GetStudyabroadType'
,
method
:
'post'
,
data
});
}
\ No newline at end of file
src/components/system/type-form.vue
0 → 100644
View file @
ac13fb0e
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 400px;max-width:400px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
optionTitle
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.Name"
ref=
"Name"
class=
"col-12 q-pb-lg"
label=
"名称"
:rules=
"[val => !!val || '请填写名称']"
/>
</div>
<div
class=
"row wrap"
>
<q-select
class=
"col-12 q-pb-lg"
filled
stack-label
clearable
option-value=
"ID"
option-label=
"Name"
v-model=
"objOption.CountryId"
:options=
"CountryList"
label=
"国家编号"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"row wrap"
style=
"display:none"
>
<q-select
class=
"col-12 q-pb-lg"
filled
stack-label
clearable
option-value=
"ID"
option-label=
"Name"
v-model=
"objOption.Type"
:options=
"TypeList"
label=
"类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Num"
ref=
"Num"
class=
"col-12 q-pb-lg"
label=
"排序"
@
keyup
.
native=
"checkInteger(objOption,'Num')"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveStage"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
queryCountryList
}
from
'../../api/common/common'
import
{
GetStudyabroadTypeList
,
SetStudyabroadType
,
GetStudyabroadType
}
from
'../../api/system/index'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
saveLoading
:
false
,
objOption
:
{
Id
:
0
,
Name
:
''
,
//留学就业类型名称
Type
:
1
,
//类型(1-留学,2-就业)
Num
:
''
,
//排序
CountryId
:
''
//国家编号
},
CountryList
:[],
//国家下拉
optionTitle
:
""
,
TypeList
:[],
//下拉类型
typeMsg
:{
Name
:
""
,
Type
:
1
,
CountryId
:
0
}
}
},
mounted
()
{
this
.
getCountryList
();
this
.
initObj
();
},
methods
:
{
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
this
.
objOption
.
Id
=
this
.
saveObj
.
Id
;
GetStudyabroadType
({
Id
:
this
.
saveObj
.
Id
}).
then
(
res
=>
{
this
.
objOption
.
Id
=
res
.
Data
.
Id
;
this
.
objOption
.
Name
=
res
.
Data
.
Name
;
this
.
objOption
.
Type
=
res
.
Data
.
Type
;
this
.
objOption
.
Num
=
res
.
Data
.
Num
;
this
.
objOption
.
CountryId
=
res
.
Data
.
CountryId
;
})
this
.
optionTitle
=
"修改类型"
}
else
{
this
.
optionTitle
=
"新增类型"
this
.
objOption
.
Id
=
0
;
this
.
objOption
.
Name
=
''
;
this
.
objOption
.
Type
=
1
;
this
.
objOption
.
Num
=
''
;
this
.
objOption
.
CountryId
=
''
;
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
},
//获取国家列表
getCountryList
()
{
queryCountryList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CountryList
=
res
.
Data
;
}
});
},
//获取留学就业类型
getTypeList
(
CountryId
){
this
.
typeMsg
.
CountryId
=
CountryId
;
GetStudyabroadTypeList
(
this
.
typeMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
);
}
});
},
//保存菜单
saveStage
()
{
this
.
$refs
.
Name
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
)
{
this
.
saveLoading
=
true
SetStudyabroadType
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}
})
}
}
}
}
</
script
>
src/pages/studyAbroad/common/type.vue
0 → 100644
View file @
ac13fb0e
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
filled
dense
v-model=
"msg.Name"
label=
"名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
class=
"col-12 q-pb-lg"
@
input=
"resetSearch"
filled
stack-label
dense
clearable
option-value=
"ID"
option-label=
"Name"
v-model=
"msg.CountryId"
:options=
"CountryList"
label=
"国家编号"
emit-value
map-options
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
类型
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增类型"
@
click=
"addObj(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Id=
"props"
>
<q-td
:props=
"props"
>
<div>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"addObj(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"deleteType(props.row.Id)"
/>
</div>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"PageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
<type-form
v-if=
"isShowType"
:save-obj=
"typeObj"
@
close=
"closeTypeForm"
@
success=
"refreshPage"
>
</type-form>
</div>
</template>
<
script
>
import
{
queryCountryList
}
from
'../../../api/common/common'
import
{
GetStudyabroadTypePage
,
RemoveStudyabroadType
}
from
'../../../api/system/index'
import
typeForm
from
'../../../components/system/type-form'
export
default
{
meta
:
{
title
:
"客户阶段管理"
},
components
:
{
typeForm
},
data
()
{
return
{
columns
:
[{
name
:
'Name'
,
label
:
'名称'
,
field
:
'Name'
,
align
:
'left'
},
{
name
:
'CreateByName'
,
required
:
true
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'CreateByName'
},
{
name
:
'Id'
,
label
:
'操作'
,
field
:
'Id'
}],
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
Name
:
""
,
Type
:
1
,
CountryId
:
''
,
rowsPerPage
:
10
},
dataList
:
[],
loading
:
true
,
isShowType
:
false
,
typeObj
:
{},
PageCount
:
0
,
CountryList
:[]
}
},
mounted
()
{
this
.
getCountryList
();
this
.
getList
()
},
methods
:
{
//获取国家列表
getCountryList
()
{
queryCountryList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CountryList
=
res
.
Data
;
}
});
},
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
deleteType
(
Id
)
{
let
delMsg
=
{
Id
:
Id
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定该类型?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveStudyabroadType
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getList
();
}
})
}).
onCancel
(()
=>
{
});
},
getList
()
{
this
.
loading
=
true
;
GetStudyabroadTypePage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
PageCount
=
res
.
Data
.
PageCount
;
}
})
},
closeTypeForm
()
{
this
.
isShowType
=
false
},
refreshPage
()
{
this
.
getList
();
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
addObj
(
obj
)
{
if
(
obj
)
{
this
.
typeObj
=
obj
}
else
{
this
.
typeObj
=
null
}
this
.
isShowType
=
true
;
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/studyAbroad/studyType.vue
0 → 100644
View file @
ac13fb0e
<
template
>
<div
class=
"page-body"
>
<q-tabs
v-model=
"tabCheck"
narrow-indicator
dense
align=
"left"
class=
"text-primary q-mb-sm"
>
<q-tab
:ripple=
"false"
:name=
"1"
label=
"类型"
/>
</q-tabs>
<type
v-if=
"tabCheck == 1"
></type>
</div>
</
template
>
<
script
>
import
type
from
"../studyAbroad/common/type"
;
export
default
{
components
:
{
type
},
data
()
{
return
{
tabCheck
:
1
};
}
};
</
script
>
src/router/routes.js
View file @
ac13fb0e
...
...
@@ -1235,6 +1235,12 @@ const routes = [{
component
:
()
=>
import
(
"pages/studyAbroad/studyabroad.vue"
)
},
{
path
:
"/studyAbroad/studyType"
,
//类型
component
:
()
=>
import
(
"pages/studyAbroad/studyType.vue"
)
},
{
path
:
"/studyAbroad/employment"
,
//就业
component
:
()
=>
...
...
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