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
646ee51f
Commit
646ee51f
authored
Jan 24, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加
parent
0ac6986d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
158 deletions
+146
-158
stuReceiveChannel-form.vue
src/components/system/stuReceiveChannel-form.vue
+14
-0
stuReceiveChannel.vue
src/pages/system/stuReceiveChannel.vue
+132
-158
No files found.
src/components/system/stuReceiveChannel-form.vue
View file @
646ee51f
...
...
@@ -9,6 +9,12 @@
<q-input
filled
stack-label
maxlength=
"30"
v-model=
"msg.Name"
ref=
"Name"
class=
"col-12 q-pb-lg"
label=
"收客渠道"
:rules=
"[val => !!val || '请填写收客渠道']"
/>
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
multiple
option-value=
"Id"
option-label=
"Name"
clearable
v-model=
"msg.StaticTypeList"
:options=
"optionList"
label=
"统计类型"
:dense=
"false"
class=
"col-12"
emit-value
map-options
>
</q-select>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
...
@@ -37,8 +43,16 @@
msg
:
{
Id
:
0
,
Name
:
""
,
StaticTypeList
:[]
},
optionTitle
:
""
,
optionList
:
[{
Id
:
1
,
Name
:
"普通员工"
},
{
Id
:
2
,
Name
:
"主管"
}]
}
},
mounted
()
{
...
...
src/pages/system/stuReceiveChannel.vue
View file @
646ee51f
<
template
>
<div>
<div
class=
"row q-my-sm"
>
<q-input
filled
v-model=
"msg.Name"
dense
label=
"收客渠道"
class=
"col-3"
@
input=
"refreshPage"
/>
<q-input
filled
v-model=
"msg.Name"
dense
label=
"收客渠道"
class=
"col-3"
@
input=
"refreshPage"
/>
</div>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<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=
"showForm(null)"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增"
@
click=
"showForm(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-StaticTypeList=
"props"
>
<q-td
:props=
"props"
>
<q-chip
v-for=
"(item,index) in props.row.StaticTypeList"
color=
"primary"
text-color=
"white"
size=
"sm"
:key=
"index"
>
<span
v-if=
"item==1"
>
普通员工统计
</span>
<span
v-if=
"item==2"
>
主管统计
</span>
</q-chip>
</q-td>
</
template
>
<
template
v-slot:body-cell-Group_Id=
"props"
>
<q-td
:props=
"props"
>
<div>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"showForm(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"del(props.row.Id)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"showForm(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"del(props.row.Id)"
/>
</div>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
:max=
"pageCount"
input
color=
"primary"
@
input=
"changePage"
/>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
:max=
"pageCount"
input
color=
"primary"
@
input=
"changePage"
/>
</
template
>
</q-table>
<stuReceiveChannelForm
v-if=
"showStuReceiveChannelForm"
@
success=
"refreshPage"
@
close=
"closeForm"
:row=
"row"
></stuReceiveChannelForm>
<stuReceiveChannelForm
v-if=
"showStuReceiveChannelForm"
@
success=
"refreshPage"
@
close=
"closeForm"
:row=
"row"
>
</stuReceiveChannelForm>
</div>
</template>
<
script
>
import
{
GetChannelPage
,
RemoveChannel
}
from
"../../api/system/index"
;
import
stuReceiveChannelForm
from
"../../components/system/stuReceiveChannel-form"
;
export
default
{
components
:
{
stuReceiveChannelForm
},
data
()
{
return
{
showStuReceiveChannelForm
:
false
,
columns
:
[
{
name
:
"Id"
,
label
:
"Id"
,
field
:
"Id"
,
align
:
"left"
},
{
name
:
"Name"
,
label
:
"收客渠道"
,
align
:
"left"
,
field
:
"Name"
},
{
name
:
"CreateByName"
,
label
:
"创建人"
,
align
:
"left"
,
field
:
"CreateByName"
},
{
name
:
"CreateTime"
,
label
:
"创建时间"
,
align
:
"left"
,
field
:
"CreateTime"
import
{
GetChannelPage
,
RemoveChannel
}
from
"../../api/system/index"
;
import
stuReceiveChannelForm
from
"../../components/system/stuReceiveChannel-form"
;
export
default
{
components
:
{
stuReceiveChannelForm
},
data
()
{
return
{
showStuReceiveChannelForm
:
false
,
columns
:
[{
name
:
"Id"
,
label
:
"Id"
,
field
:
"Id"
,
align
:
"left"
},
{
name
:
"Name"
,
label
:
"收客渠道"
,
align
:
"left"
,
field
:
"Name"
},
{
name
:
"StaticTypeList"
,
label
:
"统计类型"
,
align
:
"left"
,
field
:
"StaticTypeList"
},
{
name
:
"CreateByName"
,
label
:
"创建人"
,
align
:
"left"
,
field
:
"CreateByName"
},
{
name
:
"CreateTime"
,
label
:
"创建时间"
,
align
:
"left"
,
field
:
"CreateTime"
},
{
name
:
"Group_Id"
,
label
:
"操作"
,
field
:
"Group_Id"
}
],
msg
:
{
rowsPerPage
:
12
,
pageIndex
:
1
,
pageSize
:
12
,
Name
:
""
},
{
name
:
"Group_Id"
,
label
:
"操作"
,
field
:
"Group_Id"
}
],
msg
:
{
rowsPerPage
:
12
,
pageIndex
:
1
,
pageSize
:
12
,
Name
:
""
},
dataList
:
[],
pageCount
:
0
,
loading
:
false
,
row
:
{}
};
},
methods
:
{
getList
()
{
GetChannelPage
(
this
.
msg
).
then
(
res
=>
{
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
});
dataList
:
[],
pageCount
:
0
,
loading
:
false
,
row
:
{}
};
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
methods
:
{
getList
()
{
GetChannelPage
(
this
.
msg
).
then
(
res
=>
{
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
});
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
refreshPage
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
showForm
(
row
)
{
this
.
showStuReceiveChannelForm
=
true
;
this
.
row
=
row
;
},
closeForm
()
{
this
.
showStuReceiveChannelForm
=
false
;
},
del
(
Id
)
{
let
delMsg
=
{
Id
:
Id
};
this
.
$q
.
dialog
({
title
:
"提示信息"
,
message
:
"是否确认删除?"
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
})
.
onOk
(()
=>
{
RemoveChannel
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"删除成功!"
,
position
:
"top"
});
this
.
getList
();
}
});
});
}
},
refreshPage
()
{
this
.
msg
.
pageIndex
=
1
;
created
()
{
this
.
getList
();
},
showForm
(
row
)
{
this
.
showStuReceiveChannelForm
=
true
;
this
.
row
=
row
;
},
closeForm
()
{
this
.
showStuReceiveChannelForm
=
false
;
},
del
(
Id
)
{
let
delMsg
=
{
Id
:
Id
};
this
.
$q
.
dialog
({
title
:
"提示信息"
,
message
:
"是否确认删除?"
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
})
.
onOk
(()
=>
{
RemoveChannel
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"删除成功!"
,
position
:
"top"
});
this
.
getList
();
}
});
});
}
},
created
()
{
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