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
95134095
Commit
95134095
authored
Dec 14, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
33259092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
213 additions
and
0 deletions
+213
-0
student-Assit.vue
src/components/school/student/student-Assit.vue
+213
-0
No files found.
src/components/school/student/student-Assit.vue
0 → 100644
View file @
95134095
<
style
>
.delAssist
{
position
:
absolute
;
right
:
0
;
top
:
28px
;
display
:
inline-block
;
background
:
red
;
border-radius
:
50%
;
color
:
#FFF
;
width
:
20px
;
height
:
20px
;
text-align
:
center
;
line-height
:
20px
;
cursor
:
pointer
;
}
</
style
>
<
template
>
<div>
<div
class=
"row wrap"
style=
"flex-direction:row-reverse"
>
<q-btn
label=
"新增"
color=
"accent q-mb-lg"
@
click=
"addAssist"
size=
"sm"
/>
</div>
<template
v-if=
"AssitMsg.AssistList.length>0"
>
<div
class=
"row wrap"
v-for=
"(item,index) in AssitMsg.AssistList"
:key=
"index"
>
<q-select
filled
stack-label
option-label=
"Name"
v-model=
"item.AssistType"
option-value=
"Id"
:options=
"AssistDropList"
label=
"角色"
dense
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
dense
v-model=
"item.AssistId"
@
filter=
"filterEmployee"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
map-options
/>
<i
class=
"iconfont icon-close delAssist"
@
click=
"delAssist(index)"
></i>
</div>
<div
class=
"row wrap"
style=
"margin-bottom:10px;float:right;"
>
<q-btn
label=
"保存"
color=
"accent q-mb-lg"
size=
"md"
@
click=
"saveAssit()"
/>
</div>
</
template
>
<!-- <div style="display:flex;flex:1;flex-direction: column;overflow:hidden;">
<div class="TimeLineDiv">
<q-timeline color="primary">
<q-timeline-entry v-for="(tItem,tIndex) in dataList" :key="tIndex">
<template v-slot:title>
<div class="visit_Cont">
<div class="Log_Content">
<div>约访时间:{{tItem.AppointmentTime}}</div>
<div>约访地点:{{tItem.AppointmentPoint}}</div>
<div class="StuCom_Remark">
<div class="StuCom_Left">备注</div>:
<div class="StuCom_Inner">{{tItem.Remark}}</div>
</div>
<div class="StuCom_Remark">
<div class="StuCom_Left">反馈</div>:
<div class="StuCom_Inner">{{tItem.Feedback}} </div>
</div>
</div>
<div style="display:flex;margin-top:10px;">
<div @click="delVisit(tItem.Id)" class="visit_delete text-negative">删除</div>
<div @click="clickItem(tItem)" class="stu_ComFeed">
{{tItem.Feedback==null||tItem.Feedback==''?'添加反馈':'编辑反馈'}}
<q-popup-proxy>
<q-banner v-if="isShowEdit">
<div class="row wrap" style="margin-top:10px;width:300px;">
<q-input filled v-model="feedBackMsg.Feedback" :rows="3" type="textarea"
class="col-12 q-pb-lg" label="反馈">
</q-input>
</div>
<div class="row wrap" style="float:right;margin-bottom:10px;">
<q-btn label="保存" color="accent" size="sm" @click="SetFeedBack()" />
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
</div>
</template>
<template v-slot:subtitle>
<div class="Time_TopList">
<div>{{ tItem.CreateTime }}</div>
<div>{{ tItem.CreateByName }}</div>
</div>
</template>
</q-timeline-entry>
</q-timeline>
</div>
</div>
<div style="margin-bottom:20px">
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="page_Count" input
@input="changePage" />
</div> -->
</div>
</template>
<
script
>
import
{
GetAssistTypeList
,
SetStudentAssist
,
GetStudentAssistList
}
from
'../../../api/sale/sale'
import
{
queryEmployee
}
from
'../../../api/users/user'
export
default
{
meta
:
{
title
:
""
},
components
:
{
},
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
isShowAdd
:
false
,
AssitMsg
:
{
StuId
:
1
,
//学员编号
AssistList
:[]
},
msg
:
{
StuId
:
1
},
isShowEdit
:
false
,
dataList
:
[],
page_Count
:
0
,
AssistDropList
:[],
//下拉数据
employeeList
:
[],
myEmployeeList
:[],
}
},
created
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
StuId
)
{
this
.
AssitMsg
.
StuId
=
this
.
saveObj
.
StuId
;
this
.
msg
.
StuId
=
this
.
saveObj
.
StuId
;
}
},
mounted
()
{
this
.
getList
();
this
.
GetAssistTypeList
();
this
.
getEmployeeList
();
},
methods
:
{
//获取协助人员
GetAssistTypeList
(){
GetAssistTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
this
.
AssistDropList
=
res
.
Data
;
}
})
},
//获取员工列表
getEmployeeList
()
{
queryEmployee
({
IsLeave
:
1
}).
then
(
res
=>
{
this
.
employeeList
=
res
.
Data
;
this
.
myEmployeeList
=
res
.
Data
;
})
},
//筛选员工
filterEmployee
(
val
,
update
,
abort
)
{
update
(()
=>
{
this
.
myEmployeeList
=
this
.
employeeList
.
filter
(
v
=>
v
.
EmployeeName
.
indexOf
(
val
)
>
-
1
);
});
},
//新增协助人员
addAssist
(){
let
obj
=
{
Id
:
0
,
//编号
AssistId
:
1
,
//员工编号
AssistType
:
1
,
//类型
StuId
:
1
,
//学员编号
}
this
.
AssitMsg
.
AssistList
.
push
(
obj
);
},
//保存协同人员
saveAssit
()
{
SetStudentAssist
(
this
.
AssitMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
}
}).
catch
(()
=>
{
})
},
//获取数据
getList
()
{
GetStudentAssistList
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
if
(
res
.
Code
==
1
)
{
}
}).
catch
(()
=>
{
})
},
//删除到访
delAssist
(
index
)
{
this
.
AssitMsg
.
AssistList
.
splice
(
index
,
1
);
},
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
}
}
}
</
script
>
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