Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
new-sing
admin-base
Commits
4622dd7a
Commit
4622dd7a
authored
Aug 14, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增 导出完课用户
新增 数据管理更新时间 新增 设备移交原因 新增 用户转移 更新 期数名称3个 优化 选择用户样式
parent
230fd530
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1143 additions
and
757 deletions
+1143
-757
index.vue
src/components/class/index.vue
+10
-2
channelConversionList.vue
src/components/conversionList/channelConversionList.vue
+14
-2
channelGoodsConversionList.vue
src/components/conversionList/channelGoodsConversionList.vue
+16
-2
channelTransList.vue
src/components/conversionList/channelTransList.vue
+14
-1
marketEnrollmentConversionList.vue
...ponents/conversionList/marketEnrollmentConversionList.vue
+14
-2
periodsConversionList.vue
src/components/conversionList/periodsConversionList.vue
+14
-2
squadConversionList.vue
src/components/conversionList/squadConversionList.vue
+15
-3
teacherConversionList.vue
src/components/conversionList/teacherConversionList.vue
+14
-2
teacherPeriodsConversionList.vue
...omponents/conversionList/teacherPeriodsConversionList.vue
+16
-4
page.vue
src/components/framework/page.vue
+16
-11
dialog.vue
src/components/shop/dialog.vue
+402
-335
role.vue
src/components/system/role.vue
+1
-1
index.vue
src/components/teacher/index.vue
+35
-4
index.vue
src/components/teacherDetail/index.vue
+21
-45
task.vue
src/components/teacherDetail/task.vue
+2
-2
task3.vue
src/components/teacherDetail/task3.vue
+26
-2
index.vue
src/components/user/index.vue
+202
-52
index.vue
src/components/yunji/index.vue
+8
-4
api.js
src/service/api.js
+303
-281
No files found.
src/components/class/index.vue
View file @
4622dd7a
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
</el-form-item>
</el-form-item>
<el-form-item
style=
"float: right"
>
<el-form-item
style=
"float: right"
>
<div
class=
"search-btn-wrapper"
>
<div
class=
"search-btn-wrapper"
>
<el-button
@
click=
"onAdd"
type=
"success"
v-if=
"!$store.state.readonly"
>
+添加班级
</el-button>
<el-button
@
click=
"onExport"
type=
"primary"
v-if=
"$store.state.export"
plain
>
导出完课用户
</el-button>
<el-button
@
click=
"onAdd"
type=
"success"
v-if=
"!$store.state.readonly"
>
添加班级
</el-button>
<el-button
type=
"success"
@
click=
"sendMsg"
>
发送活动通知
</el-button>
<el-button
type=
"success"
@
click=
"sendMsg"
>
发送活动通知
</el-button>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -159,7 +160,8 @@ import {
...
@@ -159,7 +160,8 @@ import {
getDefaultPeriodsApi
,
getDefaultPeriodsApi
,
postActiveNoticeApi
,
postActiveNoticeApi
,
getConfigListApi
,
getConfigListApi
,
getSourceStudentApi
getSourceStudentApi
,
exportExcelApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
classDialog
from
"./dialog"
;
import
classDialog
from
"./dialog"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
...
@@ -506,6 +508,12 @@ export default {
...
@@ -506,6 +508,12 @@ export default {
});
});
});
});
},
},
onExport
()
{
let
json
=
{
periods_id
:
this
.
selectedGoods
[
1
]
};
exportExcelApi
(
"/api/admin/periods/finish/user/export"
,
json
);
},
onAdd
()
{
onAdd
()
{
this
.
dialogObj
=
{
this
.
dialogObj
=
{
show
:
true
,
show
:
true
,
...
...
src/components/conversionList/channelConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -121,7 +124,8 @@
...
@@ -121,7 +124,8 @@
import
{
import
{
getChannelConversionListApi
,
getChannelConversionListApi
,
getGoodsListApi
,
getGoodsListApi
,
getConfigListApi
getConfigListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
tipArr2
}
from
"../../util/tipArr"
;
import
{
tipArr2
}
from
"../../util/tipArr"
;
...
@@ -131,6 +135,7 @@ export default {
...
@@ -131,6 +135,7 @@ export default {
name
:
"channelConversionList"
,
name
:
"channelConversionList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
typeList
:[],
typeList
:[],
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
...
@@ -186,7 +191,6 @@ export default {
...
@@ -186,7 +191,6 @@ export default {
];
];
}
}
},
},
propertyList
:
[],
spanArr
:
[],
spanArr
:
[],
contentSpanArr
:
[],
contentSpanArr
:
[],
searchFrom
:
{
searchFrom
:
{
...
@@ -430,11 +434,19 @@ export default {
...
@@ -430,11 +434,19 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getChannelTransList
();
this
.
getChannelTransList
();
this
.
getGoodsOption
();
this
.
getGoodsOption
();
this
.
getUpdateTime
()
// this.getGoodsList();
// this.getGoodsList();
}
}
};
};
...
...
src/components/conversionList/channelGoodsConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -140,7 +144,8 @@
...
@@ -140,7 +144,8 @@
import
{
import
{
getChannelGoodsConversionListApi
,
getChannelGoodsConversionListApi
,
getGoodsListApi
,
getGoodsListApi
,
getConfigListApi
getConfigListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
...
@@ -149,6 +154,7 @@ export default {
...
@@ -149,6 +154,7 @@ export default {
name
:
"channelGoodsConversionList"
,
name
:
"channelGoodsConversionList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
typeList
:[],
typeList
:[],
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
...
@@ -480,13 +486,21 @@ export default {
...
@@ -480,13 +486,21 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getChannelTransList
();
this
.
getChannelTransList
();
// this.getPeriodsList();
// this.getPeriodsList();
// this.getGoodsList();
// this.getGoodsList();
this
.
getGoodsOption
()
this
.
getGoodsOption
();
this
.
getUpdateTime
()
}
}
};
};
</
script
>
</
script
>
...
...
src/components/conversionList/channelTransList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -156,7 +159,8 @@ import {
...
@@ -156,7 +159,8 @@ import {
getGoodsListApi
,
getGoodsListApi
,
exportExcelApi
,
exportExcelApi
,
getPeriodsOtherListApi
,
getPeriodsOtherListApi
,
getConfigListApi
getConfigListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
...
@@ -165,6 +169,7 @@ export default {
...
@@ -165,6 +169,7 @@ export default {
name
:
"channelTransList"
,
name
:
"channelTransList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
typeList
:[],
typeList
:[],
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
...
@@ -559,6 +564,13 @@ export default {
...
@@ -559,6 +564,13 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -567,6 +579,7 @@ export default {
...
@@ -567,6 +579,7 @@ export default {
// this.getPeriodsList();
// this.getPeriodsList();
this
.
getGoodsList
();
this
.
getGoodsList
();
this
.
getPeriodsOtherList
();
this
.
getPeriodsOtherList
();
this
.
getUpdateTime
();
}
}
};
};
</
script
>
</
script
>
...
...
src/components/conversionList/marketEnrollmentConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
style=
"padding-top: 20px;"
>
<div
style=
"padding-top: 20px;"
>
<el-form
ref=
"searchFrom"
class=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
class=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -94,11 +97,12 @@
...
@@ -94,11 +97,12 @@
</template>
</template>
<
script
>
<
script
>
import
{
getMarketEnrollmentConversionListApi
,
getPeriodsOtherListApi
}
from
"../../service/api"
;
import
{
getMarketEnrollmentConversionListApi
,
getPeriodsOtherListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
list
:
[],
list
:
[],
dateList
:
[],
dateList
:
[],
propertyList
:
[
propertyList
:
[
...
@@ -307,11 +311,19 @@ export default {
...
@@ -307,11 +311,19 @@ export default {
// colspan: 1
// colspan: 1
// };
// };
// }
// }
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getPeriodsOtherList
()
this
.
getPeriodsOtherList
();
this
.
getUpdateTime
()
}
}
};
};
</
script
>
</
script
>
...
...
src/components/conversionList/periodsConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -140,7 +143,7 @@
...
@@ -140,7 +143,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getPeriodsConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
}
from
"../../service/api"
;
import
{
getPeriodsConversionListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
import
{
tipArr3
}
from
"../../util/tipArr"
;
...
@@ -148,6 +151,7 @@ export default {
...
@@ -148,6 +151,7 @@ export default {
name
:
"periodsConversionList"
,
name
:
"periodsConversionList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
...
@@ -577,6 +581,13 @@ export default {
...
@@ -577,6 +581,13 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -584,7 +595,8 @@ export default {
...
@@ -584,7 +595,8 @@ export default {
// this.getPeriodsList();
// this.getPeriodsList();
this
.
getGoodsList
();
this
.
getGoodsList
();
this
.
getPeriodsOtherList
();
this
.
getPeriodsOtherList
();
this
.
getTeacherList
()
this
.
getTeacherList
();
this
.
getUpdateTime
()
}
}
};
};
</
script
>
</
script
>
...
...
src/components/conversionList/squadConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -99,7 +102,8 @@
...
@@ -99,7 +102,8 @@
import
{
import
{
getSquadConversionListApi
,
getSquadConversionListApi
,
getGoodsListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
getPeriodsOtherListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
...
@@ -108,6 +112,7 @@ export default {
...
@@ -108,6 +112,7 @@ export default {
name
:
"squadConversionList"
,
name
:
"squadConversionList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
...
@@ -162,7 +167,6 @@ export default {
...
@@ -162,7 +167,6 @@ export default {
];
];
}
}
},
},
propertyList
:
[],
spanArr
:
[],
spanArr
:
[],
contentSpanArr
:
[],
contentSpanArr
:
[],
searchFrom
:
{
searchFrom
:
{
...
@@ -454,12 +458,20 @@ export default {
...
@@ -454,12 +458,20 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getChannelTransList
();
this
.
getChannelTransList
();
this
.
getGoodsList
();
this
.
getGoodsList
();
this
.
getPeriodsOtherList
()
this
.
getPeriodsOtherList
();
this
.
getUpdateTime
()
}
}
};
};
</
script
>
</
script
>
...
...
src/components/conversionList/teacherConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -103,7 +106,8 @@
...
@@ -103,7 +106,8 @@
import
{
import
{
getTeacherConversionListApi
,
getTeacherConversionListApi
,
getGoodsListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
getPeriodsOtherListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
...
@@ -112,6 +116,7 @@ export default {
...
@@ -112,6 +116,7 @@ export default {
name
:
"teacherConversionList"
,
name
:
"teacherConversionList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
...
@@ -181,7 +186,6 @@ export default {
...
@@ -181,7 +186,6 @@ export default {
teacher_id
:
""
,
teacher_id
:
""
,
periods_title
:
""
periods_title
:
""
},
},
propertyList
:
[],
watchList
:
[
watchList
:
[
{
id
:
0
,
title
:
5
},
{
id
:
0
,
title
:
5
},
{
id
:
1
,
title
:
6
},
{
id
:
1
,
title
:
6
},
...
@@ -457,12 +461,20 @@ export default {
...
@@ -457,12 +461,20 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getChannelTransList
();
this
.
getChannelTransList
();
this
.
getPeriodsOtherList
();
this
.
getPeriodsOtherList
();
this
.
getGoodsList
();
this
.
getGoodsList
();
this
.
getUpdateTime
();
}
}
};
};
</
script
>
</
script
>
...
...
src/components/conversionList/teacherPeriodsConversionList.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"channel-trans-list"
>
<div
class=
"channel-trans-list"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
>
<el-form-item
label=
"更新时间"
>
{{
updateTime
?
updateTime
:
'-'
}}
</el-form-item>
<el-form-item
label=
"进量日期"
>
<el-form-item
label=
"进量日期"
>
<el-date-picker
<el-date-picker
v-model=
"searchFrom.payTime"
v-model=
"searchFrom.payTime"
...
@@ -94,7 +97,7 @@
...
@@ -94,7 +97,7 @@
:style=
"
{width: width+'px'}"
:style=
"
{width: width+'px'}"
fixed>
fixed>
<!--
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
-->
<!--
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
-->
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"1
7
0px"
>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
width=
"1
8
0px"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
v-html=
"periodName(scope.row)"
></div>
<div
v-html=
"periodName(scope.row)"
></div>
</
template
>
</
template
>
...
@@ -103,8 +106,7 @@
...
@@ -103,8 +106,7 @@
prop=
"duration_over_at"
prop=
"duration_over_at"
label=
"开课看课时间"
label=
"开课看课时间"
style=
"font-size:12px;"
style=
"font-size:12px;"
width=
"200"
width=
"180"
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
开课日期:
{{
scope
.
row
.
start_at
}}
开课日期:
{{
scope
.
row
.
start_at
}}
<br>
<br>
...
@@ -151,7 +153,8 @@ import {
...
@@ -151,7 +153,8 @@ import {
getTeacherPeriodsConversionListApi
,
getTeacherPeriodsConversionListApi
,
getGoodsListApi
,
getGoodsListApi
,
getPeriodsOtherListApi
,
getPeriodsOtherListApi
,
getTeacherListApi
getTeacherListApi
,
getUpdateTimeApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
page
from
"../framework/page"
;
import
page
from
"../framework/page"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
import
{
GOODSTYPE
,
CLASSSOURCE
}
from
"../../util/wordbook"
;
...
@@ -160,6 +163,7 @@ export default {
...
@@ -160,6 +163,7 @@ export default {
name
:
"teacherPeriodsConversionList"
,
name
:
"teacherPeriodsConversionList"
,
data
()
{
data
()
{
return
{
return
{
updateTime
:
''
,
width
:
0
,
width
:
0
,
nowPage
:
1
,
nowPage
:
1
,
total
:
0
,
total
:
0
,
...
@@ -594,6 +598,13 @@ export default {
...
@@ -594,6 +598,13 @@ export default {
this
.
list
=
[];
this
.
list
=
[];
}
}
});
});
},
getUpdateTime
()
{
getUpdateTimeApi
().
then
(
res
=>
{
if
(
res
.
time
)
{
this
.
updateTime
=
res
.
time
}
})
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -601,6 +612,7 @@ export default {
...
@@ -601,6 +612,7 @@ export default {
this
.
getPeriodsOtherList
();
this
.
getPeriodsOtherList
();
this
.
getGoodsList
();
this
.
getGoodsList
();
this
.
getTeacherList
();
this
.
getTeacherList
();
this
.
getUpdateTime
();
}
}
};
};
</
script
>
</
script
>
...
...
src/components/framework/page.vue
View file @
4622dd7a
<
template
>
<
template
>
<div
class=
"page-div"
>
<div
class=
"page-div"
>
<el-pagination
<el-pagination
:small=
"small"
@
size-change=
"handleSizeChange"
@
size-change=
"handleSizeChange"
:page-sizes=
"[5, 10, 20, 30, 40, 50, 60, 80, 100]"
:page-sizes=
"[5, 10, 20, 30, 40, 50, 60, 80, 100]"
:page-size=
"limit"
:page-size=
"limit"
:current-page
.
sync=
"nowPage"
:current-page
.
sync=
"nowPage"
layout=
"total
, sizes, prev, pager, next, jumper"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
:total=
"total"
>
</el-pagination>
</el-pagination>
</div>
</div>
...
@@ -19,16 +20,20 @@
...
@@ -19,16 +20,20 @@
nowPage
:
1
nowPage
:
1
}
}
},
},
props
:{
props
:
{
'total'
:
{
'total'
:
{
required
:
true
required
:
true
},
},
'limit'
:
{
'limit'
:
{
default
:
10
default
:
10
},
'small'
:
{
type
:
Boolean
,
default
:
false
}
}
},
},
watch
:{
watch
:
{
nowPage
(
value
){
nowPage
(
value
)
{
this
.
$emit
(
"pageChange"
,
value
);
this
.
$emit
(
"pageChange"
,
value
);
}
}
},
},
...
@@ -42,7 +47,7 @@
...
@@ -42,7 +47,7 @@
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.page-div
{
.page-div
{
display
:
block
;
display
:
block
;
text-align
:
center
;
text-align
:
center
;
}
}
...
...
src/components/shop/dialog.vue
View file @
4622dd7a
...
@@ -146,9 +146,9 @@
...
@@ -146,9 +146,9 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-if=
"form.goods_type==1||form.goods_type==2"
>
<el-row
v-if=
"form.goods_type==1||form.goods_type==2"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"120"
label=
"课程标题(客户端展示)"
required
>
<el-form-item
label-width=
"120"
label=
"课程标题(客户端展示)"
required
>
<el-input
v-model=
"form.goods_desc.course_title"
style=
"width:200px;"
></el-input>
<el-input
v-model=
"form.goods_desc.course_title"
style=
"width:200px;"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -161,10 +161,10 @@
...
@@ -161,10 +161,10 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-form-item
v-if=
"form.goods_type==4"
label=
"领取到期时间(小时)"
label-width=
"160px"
>
<el-form-item
v-if=
"form.goods_type==4"
label=
"领取到期时间(小时)"
label-width=
"160px"
>
<el-input-number
v-model=
"form.goods_desc.time_limit"
></el-input-number>
<el-input-number
v-model=
"form.goods_desc.time_limit"
></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"form.goods_type==1||form.goods_type==2"
label=
"是否赠送优惠券"
label-width=
"160px"
>
<el-form-item
v-if=
"form.goods_type==1||form.goods_type==2"
label=
"是否赠送优惠券"
label-width=
"160px"
>
<el-select
v-model=
"form.goods_desc.coupon_goods_id"
placeholder=
"请选择"
>
<el-select
v-model=
"form.goods_desc.coupon_goods_id"
placeholder=
"请选择"
>
<el-option
v-for=
"data in coupongoods"
<el-option
v-for=
"data in coupongoods"
:key=
"data.id"
:key=
"data.id"
...
@@ -219,7 +219,8 @@
...
@@ -219,7 +219,8 @@
v-model=
"form.is_real"
v-model=
"form.is_real"
:active-value=
"1"
:active-value=
"1"
:inactive-value=
"0"
>
:inactive-value=
"0"
>
</el-switch>
<span
style=
"font-size: 12px;"
>
打开后提示用户填写具体住址
</span>
</el-switch>
<span
style=
"font-size: 12px;"
>
打开后提示用户填写具体住址
</span>
</el-form-item>
</el-form-item>
<el-row
v-if=
"form.goods_type === 1 "
>
<el-row
v-if=
"form.goods_type === 1 "
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -256,7 +257,7 @@
...
@@ -256,7 +257,7 @@
</el-row>
</el-row>
<el-row
v-if=
"form.goods_type === 2"
>
<el-row
v-if=
"form.goods_type === 2"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"成团人数(人)"
>
<el-form-item
label=
"成团人数(人)"
>
<el-input-number
v-model=
"form.desc.group_number"
label=
"成团人数"
></el-input-number>
<el-input-number
v-model=
"form.desc.group_number"
label=
"成团人数"
></el-input-number>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -302,7 +303,7 @@
...
@@ -302,7 +303,7 @@
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"商品详情"
required
>
<el-form-item
label=
"商品详情"
required
>
<!--
<el-input
type=
"textarea"
:rows=
"25"
v-model=
"form.desc.detail"
></el-input>
-->
<!--
<el-input
type=
"textarea"
:rows=
"25"
v-model=
"form.desc.detail"
></el-input>
-->
<editor-detail
:lookData=
"form.desc"
/>
<editor-detail
:lookData=
"form.desc"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -325,13 +326,21 @@
...
@@ -325,13 +326,21 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getLessonApi
,
addGoodsApi
,
editGoodsApi
,
getGoodsDetailApi
,
uploadFileApi
,
getGoodsListApi
}
from
"../../service/api"
;
import
{
import
{
TEACHERTYPE
,
GOODSTYPE
}
from
"../../util/wordbook"
;
getLessonApi
,
addGoodsApi
,
editGoodsApi
,
getGoodsDetailApi
,
uploadFileApi
,
getGoodsListApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
,
GOODSTYPE
}
from
"../../util/wordbook"
;
import
editorDetail
from
"./editorDetail"
import
editorDetail
from
"./editorDetail"
import
editorKnow
from
"./editorKnow"
import
editorKnow
from
"./editorKnow"
export
default
{
export
default
{
name
:
"dialogObj"
,
name
:
"dialogObj"
,
props
:[
props
:
[
'dialogObj'
,
'dialogObj'
,
],
],
components
:
{
// 引入组件
components
:
{
// 引入组件
...
@@ -339,136 +348,136 @@
...
@@ -339,136 +348,136 @@
editorKnow
editorKnow
},
},
filters
:
{
filters
:
{
filterGoods
(
val
){
filterGoods
(
val
)
{
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
return
'['
+
GOODSTYPE
[
val
.
goods_type
]
+
']'
+
'['
+
val
.
current_price
/
100
+
'元]'
+
val
.
name
}
}
},
},
data
(){
data
()
{
return
{
return
{
tiny
:{
tiny
:
{
height
:
300
height
:
300
},
},
sendObj
:{
sendObj
:
{
content
:
'nihao'
content
:
'nihao'
},
},
loading
:
true
,
loading
:
true
,
goodsYou
:[],
goodsYou
:
[],
goodsList
:[],
goodsList
:
[],
form
:{
form
:
{
name
:
''
,
name
:
''
,
goods_type
:
1
,
goods_type
:
1
,
goods_desc
:{
goods_desc
:
{
desc
:
""
,
desc
:
""
,
imgLesson
:[],
imgLesson
:
[],
img
:[],
img
:
[],
course_title
:
''
,
course_title
:
''
,
time_limit
:
0
time_limit
:
0
},
},
course_id
:
''
,
course_id
:
''
,
course_type
:
0
,
course_type
:
0
,
watch_num
:
''
,
watch_num
:
''
,
invite_earnings
:
0
,
invite_earnings
:
0
,
original_price
:
''
,
original_price
:
''
,
current_price
:
''
,
current_price
:
''
,
is_real
:
0
,
is_real
:
0
,
is_auth_user
:
0
,
is_auth_user
:
0
,
is_auth_teacher
:
0
,
is_auth_teacher
:
0
,
share_desc
:{
share_desc
:
{
title
:
''
,
title
:
''
,
content
:
''
,
content
:
''
,
img
:[],
img
:
[],
refImg
:[]
refImg
:
[]
},
},
desc
:{
desc
:
{
detail
:
""
,
detail
:
""
,
qa
:
""
,
qa
:
""
,
customer_service
:[],
customer_service
:
[],
after_goods_id
:
''
,
after_goods_id
:
''
,
before_goods_id
:
''
before_goods_id
:
''
},
},
is_into_periods
:
'0'
is_into_periods
:
'0'
},
},
lessonList
:[],
lessonList
:
[],
goOn_goods_Id
:{
goOn_goods_Id
:
{
after_goods_id
:
''
,
after_goods_id
:
''
,
before_goods_id
:
''
before_goods_id
:
''
},
},
coupongoods
:[],
coupongoods
:
[],
false
:
false
false
:
false
}
}
},
},
methods
:{
methods
:
{
goodsChange
(){
goodsChange
()
{
if
(
this
.
form
.
goods_type
==
4
||
this
.
form
.
goods_type
==
3
)
{
if
(
this
.
form
.
goods_type
==
4
||
this
.
form
.
goods_type
==
3
)
{
let
json
=
{
let
json
=
{
limit
:
'999'
,
limit
:
'999'
,
page
:
'1'
,
page
:
'1'
,
goods_type
:
'1,2'
,
goods_type
:
'1,2'
,
status
:
"1"
status
:
"1"
};
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
console
.
log
(
json
)
console
.
log
(
json
)
// debugger
// debugger
this
.
goodsList
=
res
.
list
this
.
goodsList
=
res
.
list
});
});
}
else
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
}
else
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
// debugger
// debugger
let
json
=
{
let
json
=
{
limit
:
'999'
,
limit
:
'999'
,
page
:
'1'
,
page
:
'1'
,
goods_type
:
'4'
,
goods_type
:
'4'
,
};
};
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
// debugger
// debugger
let
item
=
{
let
item
=
{
name
:
'不赠送'
,
name
:
'不赠送'
,
id
:
'0'
,
id
:
'0'
,
goods_type
:
4
,
goods_type
:
4
,
course_type
:
0
,
course_type
:
0
,
current_price
:
0
current_price
:
0
}
}
this
.
coupongoods
=
res
.
list
this
.
coupongoods
=
res
.
list
this
.
coupongoods
.
unshift
(
item
)
this
.
coupongoods
.
unshift
(
item
)
});
});
}
}
},
},
sub
(){
sub
()
{
console
.
log
(
this
.
form
)
console
.
log
(
this
.
form
)
if
(
!
this
.
form
.
share_desc
.
img
&&
this
.
form
.
goods_type
==
2
)
{
if
(
!
this
.
form
.
share_desc
.
img
&&
this
.
form
.
goods_type
==
2
)
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'请上传主图!'
message
:
'请上传主图!'
});
});
return
return
}
}
let
_json
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
)
+
''
);
let
_json
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
)
+
''
);
console
.
log
(
this
.
form
)
console
.
log
(
this
.
form
)
// debugger
// debugger
if
(
_json
.
goods_type
===
3
||
_json
.
goods_type
===
4
||
_json
.
goods_type
===
5
)
{
if
(
_json
.
goods_type
===
3
||
_json
.
goods_type
===
4
||
_json
.
goods_type
===
5
)
{
_json
.
course_id
=
0
;
_json
.
course_id
=
0
;
_json
.
watch_num
=
0
;
_json
.
watch_num
=
0
;
}
}
if
(
_json
.
goods_type
===
5
)
{
if
(
_json
.
goods_type
===
5
)
{
_json
.
is_real
=
1
;
_json
.
is_real
=
1
;
}
}
_json
.
desc
.
before_goods_id
=
this
.
goOn_goods_Id
.
before_goods_id
;
_json
.
desc
.
before_goods_id
=
this
.
goOn_goods_Id
.
before_goods_id
;
if
(
this
.
goodsYou
.
length
<
1
)
{
if
(
this
.
goodsYou
.
length
<
1
)
{
_json
.
desc
.
use_goods_ids
=
''
_json
.
desc
.
use_goods_ids
=
''
}
else
{
}
else
{
_json
.
desc
.
use_goods_ids
=
this
.
goodsYou
.
toString
()
_json
.
desc
.
use_goods_ids
=
this
.
goodsYou
.
toString
()
}
}
_json
.
desc
.
after_goods_id
=
this
.
goOn_goods_Id
.
after_goods_id
;
_json
.
desc
.
after_goods_id
=
this
.
goOn_goods_Id
.
after_goods_id
;
_json
.
original_price
=
(
_json
.
original_price
*
100
).
toFixed
(
0
);
_json
.
original_price
=
(
_json
.
original_price
*
100
).
toFixed
(
0
);
_json
.
current_price
=
(
_json
.
current_price
*
100
).
toFixed
(
0
);
_json
.
current_price
=
(
_json
.
current_price
*
100
).
toFixed
(
0
);
_json
.
invite_earnings
=
(
_json
.
invite_earnings
*
100
).
toFixed
(
0
);
_json
.
invite_earnings
=
(
_json
.
invite_earnings
*
100
).
toFixed
(
0
);
_json
.
goods_desc
=
JSON
.
stringify
(
_json
.
goods_desc
);
_json
.
goods_desc
=
JSON
.
stringify
(
_json
.
goods_desc
);
_json
.
desc
=
JSON
.
stringify
(
_json
.
desc
);
_json
.
desc
=
JSON
.
stringify
(
_json
.
desc
);
_json
.
share_desc
=
JSON
.
stringify
(
_json
.
share_desc
);
_json
.
share_desc
=
JSON
.
stringify
(
_json
.
share_desc
);
switch
(
this
.
dialogObj
.
type
)
{
switch
(
this
.
dialogObj
.
type
)
{
case
1
:
case
1
:
editGoodsApi
(
this
.
dialogObj
.
id
,
_json
).
then
(
res
=>
{
editGoodsApi
(
this
.
dialogObj
.
id
,
_json
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'修改成功!'
message
:
'修改成功!'
...
@@ -479,7 +488,7 @@
...
@@ -479,7 +488,7 @@
break
;
break
;
case
0
:
case
0
:
console
.
log
(
_json
)
console
.
log
(
_json
)
addGoodsApi
(
_json
).
then
(
res
=>
{
addGoodsApi
(
_json
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'新增成功!'
message
:
'新增成功!'
...
@@ -490,275 +499,328 @@
...
@@ -490,275 +499,328 @@
break
break
}
}
},
},
removeFileMain
(
a
){
removeFileMain
(
a
)
{
let
x
=
this
.
form
.
goods_desc
.
img
.
findIndex
(
i
=>
{
return
i
.
name
===
a
.
name
});
let
x
=
this
.
form
.
goods_desc
.
img
.
findIndex
(
i
=>
{
this
.
form
.
goods_desc
.
img
.
splice
(
x
,
1
);
return
i
.
name
===
a
.
name
});
this
.
form
.
goods_desc
.
img
.
splice
(
x
,
1
);
},
},
uploadFileLesson
(
a
){
uploadFileLesson
(
a
)
{
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
fileUid
=
a
.
file
.
uid
;
this
.
fileUid
=
a
.
file
.
uid
;
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
form
.
goods_desc
.
imgLesson
=
[{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}];
this
.
form
.
goods_desc
.
imgLesson
=
[{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}];
this
.
$message
({
this
.
$message
({
message
:
'上传成功'
,
message
:
'上传成功'
,
type
:
'success'
type
:
'success'
});
});
})
})
},
},
removeFileLesson
(){
removeFileLesson
()
{
this
.
form
.
goods_desc
.
imgLesson
=
[]
this
.
form
.
goods_desc
.
imgLesson
=
[]
},
},
uploadFileMain
(
a
){
uploadFileMain
(
a
)
{
console
.
log
(
a
)
console
.
log
(
a
)
// debugger
// debugger
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
fileUid
=
a
.
file
.
uid
;
this
.
fileUid
=
a
.
file
.
uid
;
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
form
.
goods_desc
.
img
.
push
({
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
});
this
.
form
.
goods_desc
.
img
.
push
({
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
});
this
.
$message
({
this
.
$message
({
message
:
'上传成功'
,
message
:
'上传成功'
,
type
:
'success'
type
:
'success'
});
});
})
})
},
},
removeFileShareRef
(){
removeFileShareRef
()
{
this
.
form
.
share_desc
.
refImg
=
[]
this
.
form
.
share_desc
.
refImg
=
[]
},
},
uploadFileMainShareRef
(
a
){
uploadFileMainShareRef
(
a
)
{
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
fileUid
=
a
.
file
.
uid
;
this
.
fileUid
=
a
.
file
.
uid
;
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
'上传成功'
,
message
:
'上传成功'
,
type
:
'success'
type
:
'success'
});
});
if
(
this
.
form
.
share_desc
.
refImg
){
if
(
this
.
form
.
share_desc
.
refImg
)
{
this
.
form
.
share_desc
.
refImg
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
this
.
form
.
share_desc
.
refImg
[
0
]
=
{
}
else
{
name
:
res
.
url
,
this
.
form
.
share_desc
.
refImg
=
[];
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
this
.
form
.
share_desc
.
refImg
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
title
:
''
,
lable
:
''
}
}
else
{
this
.
form
.
share_desc
.
refImg
=
[];
this
.
form
.
share_desc
.
refImg
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
}
}
})
})
},
},
uploadFileMainShare
(
a
){
uploadFileMainShare
(
a
)
{
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
fileUid
=
a
.
file
.
uid
;
this
.
fileUid
=
a
.
file
.
uid
;
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
'上传成功'
,
message
:
'上传成功'
,
type
:
'success'
type
:
'success'
});
});
if
(
this
.
form
.
share_desc
.
img
){
if
(
this
.
form
.
share_desc
.
img
)
{
this
.
form
.
share_desc
.
img
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
this
.
form
.
share_desc
.
img
[
0
]
=
{
}
else
{
name
:
res
.
url
,
this
.
form
.
share_desc
.
img
=
[];
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
this
.
form
.
share_desc
.
img
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
title
:
''
,
lable
:
''
}
}
else
{
this
.
form
.
share_desc
.
img
=
[];
this
.
form
.
share_desc
.
img
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
}
}
})
})
},
},
removeFileService
(){
removeFileService
()
{
this
.
form
.
desc
.
customer_service
=
[];
this
.
form
.
desc
.
customer_service
=
[];
},
},
uploadFileMainService
(
a
){
uploadFileMainService
(
a
)
{
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
fileUid
=
a
.
file
.
uid
;
this
.
fileUid
=
a
.
file
.
uid
;
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
'上传成功'
,
message
:
'上传成功'
,
type
:
'success'
type
:
'success'
});
});
if
(
this
.
form
.
desc
.
customer_service
){
if
(
this
.
form
.
desc
.
customer_service
)
{
this
.
form
.
desc
.
customer_service
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
this
.
form
.
desc
.
customer_service
[
0
]
=
{
}
else
{
name
:
res
.
url
,
this
.
form
.
desc
.
customer_service
=
[];
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
this
.
form
.
desc
.
customer_service
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
title
:
''
,
lable
:
''
}
}
else
{
this
.
form
.
desc
.
customer_service
=
[];
this
.
form
.
desc
.
customer_service
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
}
}
})
})
},
},
uploadFileShare
(
a
){
uploadFileShare
(
a
)
{
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
$store
.
dispatch
(
'setProgress'
,
{
type
:
'new'
,
id
:
a
.
file
.
uid
});
this
.
fileUid
=
a
.
file
.
uid
;
this
.
fileUid
=
a
.
file
.
uid
;
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
'上传成功'
,
message
:
'上传成功'
,
type
:
'success'
type
:
'success'
});
});
if
(
this
.
form
.
share_desc
.
img
){
if
(
this
.
form
.
share_desc
.
img
)
{
this
.
form
.
share_desc
.
img
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
this
.
form
.
share_desc
.
img
[
0
]
=
{
}
else
{
name
:
res
.
url
,
this
.
form
.
share_desc
.
img
=
[];
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
this
.
form
.
share_desc
.
img
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
title
:
''
,
lable
:
''
}
}
else
{
this
.
form
.
share_desc
.
img
=
[];
this
.
form
.
share_desc
.
img
[
0
]
=
{
name
:
res
.
url
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
,
title
:
''
,
lable
:
''
}
}
}
})
})
},
},
initDialog
(){
initDialog
()
{
switch
(
this
.
dialogObj
.
type
)
{
switch
(
this
.
dialogObj
.
type
)
{
case
0
:
case
0
:
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
goOn_goods_Id
.
after_goods_id
=
''
;
this
.
goOn_goods_Id
.
after_goods_id
=
''
;
this
.
goodsYou
=
[];
this
.
goodsYou
=
[];
this
.
goOn_goods_Id
.
before_goods_id
=
''
;
this
.
goOn_goods_Id
.
before_goods_id
=
''
;
this
.
form
=
{
this
.
form
=
{
name
:
''
,
name
:
''
,
goods_type
:
1
,
goods_type
:
1
,
goods_desc
:{
goods_desc
:
{
desc
:
""
,
desc
:
""
,
img
:[],
img
:
[],
course_title
:
""
course_title
:
""
},
},
course_id
:
''
,
course_id
:
''
,
course_type
:
0
,
course_type
:
0
,
watch_num
:
''
,
watch_num
:
''
,
duration_num
:
0
,
duration_num
:
0
,
original_price
:
''
,
original_price
:
''
,
current_price
:
''
,
current_price
:
''
,
is_real
:
0
,
is_real
:
0
,
is_auth_user
:
0
,
is_auth_user
:
0
,
is_auth_teacher
:
0
,
is_auth_teacher
:
0
,
share_desc
:{
share_desc
:
{
title
:
''
,
title
:
''
,
content
:
''
,
content
:
''
,
refImg
:[],
refImg
:
[],
img
:[]
img
:
[]
},
},
desc
:{
desc
:
{
detail
:
""
,
detail
:
""
,
qa
:
""
,
qa
:
""
,
customer_service
:[],
customer_service
:
[],
before_goods_id
:
0
,
before_goods_id
:
0
,
after_goods_id
:
0
after_goods_id
:
0
},
},
is_into_periods
:
'0'
is_into_periods
:
'0'
},
},
this
.
getLessonList
();
this
.
getLessonList
();
console
.
log
(
this
.
form
.
course_type
)
console
.
log
(
this
.
form
.
course_type
)
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
let
json
=
{
let
json
=
{
limit
:
200
,
limit
:
200
,
nowPage
:
1
,
nowPage
:
1
,
goods_type
:
'4'
goods_type
:
'4'
}
}
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
// debugger
// debugger
let
item
=
{
let
item
=
{
name
:
'不赠送'
,
name
:
'不赠送'
,
id
:
'0'
,
id
:
'0'
,
goods_type
:
4
,
goods_type
:
4
,
course_type
:
0
,
course_type
:
0
,
current_price
:
0
current_price
:
0
}
}
this
.
coupongoods
=
res
.
list
this
.
coupongoods
=
res
.
list
this
.
coupongoods
.
unshift
(
item
)
this
.
coupongoods
.
unshift
(
item
)
});
});
}
}
break
;
break
;
case
1
:
case
2
:
case
1
:
case
2
:
this
.
goOn_goods_Id
.
after_goods_id
=
''
;
this
.
goOn_goods_Id
.
after_goods_id
=
''
;
this
.
goOn_goods_Id
.
before_goods_id
=
''
;
this
.
goOn_goods_Id
.
before_goods_id
=
''
;
this
.
goodsYou
=
[];
this
.
goodsYou
=
[];
this
.
form
=
{
this
.
form
=
{
name
:
''
,
name
:
''
,
goods_type
:
1
,
goods_type
:
1
,
goods_desc
:
{
goods_desc
:
{
desc
:
""
,
desc
:
""
,
img
:
[],
img
:
[],
course_title
:
''
course_title
:
''
},
},
course_id
:
''
,
course_id
:
''
,
course_type
:
0
,
course_type
:
0
,
watch_num
:
''
,
watch_num
:
''
,
duration_num
:
0
,
duration_num
:
0
,
original_price
:
''
,
original_price
:
''
,
current_price
:
''
,
current_price
:
''
,
is_real
:
0
,
is_real
:
0
,
is_auth_user
:
0
,
is_auth_user
:
0
,
is_auth_teacher
:
0
,
is_auth_teacher
:
0
,
share_desc
:
{
share_desc
:
{
title
:
''
,
title
:
''
,
content
:
''
,
content
:
''
,
refImg
:
[],
refImg
:
[],
img
:
[]
img
:
[]
},
},
desc
:
{
desc
:
{
detail
:
""
,
detail
:
""
,
qa
:
""
,
qa
:
""
,
customer_service
:
[],
customer_service
:
[],
before_goods_id
:
0
,
before_goods_id
:
0
,
after_goods_id
:
0
after_goods_id
:
0
},
},
is_into_periods
:
'0'
is_into_periods
:
'0'
};
};
getGoodsDetailApi
(
this
.
dialogObj
.
id
).
then
(
res
=>
{
getGoodsDetailApi
(
this
.
dialogObj
.
id
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
let
share_desc
=
JSON
.
parse
(
res
.
share_desc
);
let
share_desc
=
JSON
.
parse
(
res
.
share_desc
);
if
(
!
share_desc
.
refImg
)
{
if
(
!
share_desc
.
refImg
)
{
share_desc
.
refImg
=
[]
share_desc
.
refImg
=
[]
}
}
this
.
form
=
{
this
.
form
=
{
name
:
res
.
name
,
name
:
res
.
name
,
goods_type
:
res
.
goods_type
,
goods_type
:
res
.
goods_type
,
goods_desc
:
JSON
.
parse
(
res
.
goods_desc
),
goods_desc
:
JSON
.
parse
(
res
.
goods_desc
),
course_id
:
res
.
course_id
,
course_id
:
res
.
course_id
,
course_type
:
res
.
course_type
,
course_type
:
res
.
course_type
,
watch_num
:
res
.
watch_num
,
watch_num
:
res
.
watch_num
,
duration_num
:
res
.
duration_num
,
duration_num
:
res
.
duration_num
,
original_price
:
res
.
original_price
/
100
,
original_price
:
res
.
original_price
/
100
,
current_price
:
res
.
current_price
/
100
,
current_price
:
res
.
current_price
/
100
,
is_real
:
res
.
is_real
,
is_real
:
res
.
is_real
,
is_auth_user
:
res
.
is_auth_user
,
is_auth_user
:
res
.
is_auth_user
,
share_desc
:
JSON
.
parse
(
res
.
share_desc
),
share_desc
:
JSON
.
parse
(
res
.
share_desc
),
desc
:
JSON
.
parse
(
res
.
desc
),
desc
:
JSON
.
parse
(
res
.
desc
),
invite_earnings
:
res
.
invite_earnings
/
100
,
invite_earnings
:
res
.
invite_earnings
/
100
,
is_auth_teacher
:
res
.
is_auth_teacher
,
is_auth_teacher
:
res
.
is_auth_teacher
,
is_into_periods
:
res
.
is_into_periods
is_into_periods
:
res
.
is_into_periods
};
};
if
(
this
.
form
.
desc
.
before_goods_id
)
{
if
(
this
.
form
.
desc
.
before_goods_id
)
{
this
.
goOn_goods_Id
.
before_goods_id
=
this
.
form
.
desc
.
before_goods_id
;
this
.
goOn_goods_Id
.
before_goods_id
=
this
.
form
.
desc
.
before_goods_id
;
}
}
if
(
this
.
form
.
desc
.
after_goods_id
)
{
if
(
this
.
form
.
desc
.
after_goods_id
)
{
this
.
goOn_goods_Id
.
after_goods_id
=
this
.
form
.
desc
.
after_goods_id
;
this
.
goOn_goods_Id
.
after_goods_id
=
this
.
form
.
desc
.
after_goods_id
;
}
}
if
(
this
.
form
.
desc
.
use_goods_ids
)
{
if
(
this
.
form
.
desc
.
use_goods_ids
)
{
this
.
goodsYou
=
this
.
form
.
desc
.
use_goods_ids
.
split
(
','
);
this
.
goodsYou
=
this
.
form
.
desc
.
use_goods_ids
.
split
(
','
);
this
.
goodsYou
=
this
.
goodsYou
.
map
(
function
(
item
)
{
this
.
goodsYou
=
this
.
goodsYou
.
map
(
function
(
item
)
{
return
+
item
;
return
+
item
;
});
});
}
}
console
.
log
(
this
.
form
)
console
.
log
(
this
.
form
)
if
(
this
.
form
.
course_type
!=
1
&&
this
.
form
.
course_type
!=
2
)
{
if
(
this
.
form
.
course_type
!=
1
&&
this
.
form
.
course_type
!=
2
)
{
// debugger
// debugger
getGoodsListApi
({
limit
:
200
}).
then
(
res
=>
{
getGoodsListApi
({
limit
:
200
}).
then
(
res
=>
{
this
.
goodsList
=
res
.
list
this
.
goodsList
=
res
.
list
});
});
}
}
// debugger
// debugger
console
.
log
(
this
.
form
.
course_type
)
console
.
log
(
this
.
form
.
course_type
)
if
(
this
.
form
.
goods_type
==
4
)
{
if
(
this
.
form
.
goods_type
==
4
)
{
// debugger
// debugger
this
.
getLessonList
()
this
.
getLessonList
()
let
json
=
{
let
json
=
{
limit
:
200
,
limit
:
200
,
nowPage
:
1
,
nowPage
:
1
,
goods_type
:
'1,2'
goods_type
:
'1,2'
}
}
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
goodsList
=
res
.
list
this
.
goodsList
=
res
.
list
});
});
}
}
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
let
json
=
{
let
json
=
{
limit
:
200
,
limit
:
200
,
nowPage
:
1
,
nowPage
:
1
,
goods_type
:
'4'
goods_type
:
'4'
}
}
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
// debugger
// debugger
let
item
=
{
let
item
=
{
name
:
'不赠送'
,
name
:
'不赠送'
,
id
:
'0'
,
id
:
'0'
,
goods_type
:
4
,
goods_type
:
4
,
course_type
:
0
,
course_type
:
0
,
current_price
:
0
current_price
:
0
}
}
this
.
coupongoods
=
res
.
list
this
.
coupongoods
=
res
.
list
this
.
coupongoods
.
unshift
(
item
)
this
.
coupongoods
.
unshift
(
item
)
...
@@ -772,14 +834,14 @@
...
@@ -772,14 +834,14 @@
this
.
show
=
this
.
dialogObj
.
show
;
this
.
show
=
this
.
dialogObj
.
show
;
this
.
id
=
this
.
dialogObj
.
id
;
this
.
id
=
this
.
dialogObj
.
id
;
this
.
type
=
2
;
this
.
type
=
2
;
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
this
.
getLessonList
()
this
.
getLessonList
()
let
json
=
{
let
json
=
{
limit
:
200
,
limit
:
200
,
nowPage
:
1
,
nowPage
:
1
,
goods_type
:
'4'
goods_type
:
'4'
}
}
getGoodsListApi
(
json
).
then
(
res
=>
{
getGoodsListApi
(
json
).
then
(
res
=>
{
this
.
coupongoods
=
res
.
list
this
.
coupongoods
=
res
.
list
});
});
}
}
...
@@ -794,19 +856,19 @@
...
@@ -794,19 +856,19 @@
break
break
}
}
},
},
changeLessonType
(){
changeLessonType
()
{
this
.
getLessonList
()
this
.
getLessonList
()
},
},
getLessonList
(){
getLessonList
()
{
getLessonApi
({
type
:
this
.
form
.
course_type
}).
then
(
res
=>
{
getLessonApi
({
type
:
this
.
form
.
course_type
}).
then
(
res
=>
{
this
.
lessonList
=
res
.
list
this
.
lessonList
=
res
.
list
})
})
}
}
},
},
watch
:{
watch
:
{
dialogObj
:{
dialogObj
:
{
handler
:
function
()
{
handler
:
function
()
{
if
(
this
.
dialogObj
.
show
)
{
if
(
this
.
dialogObj
.
show
)
{
console
.
log
(
this
.
dialogObj
)
console
.
log
(
this
.
dialogObj
)
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
initDialog
()
this
.
initDialog
()
...
@@ -814,36 +876,41 @@
...
@@ -814,36 +876,41 @@
},
},
deep
:
true
deep
:
true
},
},
"dialogObj.show"
:
function
(
a
)
{
"dialogObj.show"
:
function
(
a
)
{
},
},
show
(
value
){
show
(
value
)
{
this
.
$emit
(
"changeShow"
,
value
);
this
.
$emit
(
"changeShow"
,
value
);
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.el-col{
.el-col
{
min-height: 50px;
min-height: 50px;
text-align: center;
text-align: center;
margin-bottom: 10px;
margin-bottom: 10px;
line-height: 40px;
line-height: 40px;
.el-select,.el-select{
.el-select, .el-select {
width: 100%;
width: 100%;
}
}
img{
img {
width: 50px;
width: 50px;
border-radius: 100px;
border-radius: 100px;
}
}
label{
label {
color: #5982e6;
color: #5982e6;
}
}
}
}
.dialog-footer{
.dialog-footer {
display: block;
display: block;
text-align: center;
text-align: center;
}
}
.size {
.size {
color: #666;
color: #666;
font-size: 14px;
font-size: 14px;
...
...
src/components/system/role.vue
View file @
4622dd7a
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
total
:
0
,
total
:
0
,
limit
:
10
,
limit
:
10
,
roleList
:[],
roleList
:[],
exportMenuList
:[
exportMenuList
:[
// 导出权限
'2-3'
,
'5-10'
,
'5-2'
,
'5-1'
,
'5-3'
,
'5-8'
,
'5-9'
,
'3-1'
,
'7-9'
,
'6-3'
,
'10-8'
'2-3'
,
'5-10'
,
'5-2'
,
'5-1'
,
'5-3'
,
'5-8'
,
'5-9'
,
'3-1'
,
'7-9'
,
'6-3'
,
'10-8'
],
],
dialog
:{
dialog
:{
...
...
src/components/teacher/index.vue
View file @
4622dd7a
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
width=
"500px"
:visible
.
sync=
"transfer.show"
>
<el-dialog
width=
"500px"
:visible
.
sync=
"transfer.show"
title=
"移交"
>
<el-form
ref=
"transferForm"
:rules=
"transfer.form.rules"
:model=
"transfer.form"
label-width=
"100px"
>
<el-form
ref=
"transferForm"
:rules=
"transfer.form.rules"
:model=
"transfer.form"
label-width=
"100px"
>
<el-form-item
label=
"当前设备:"
prop=
"teacher_name"
>
<el-form-item
label=
"当前设备:"
prop=
"teacher_name"
>
{{transfer.form.teacher_name}}
{{transfer.form.teacher_name}}
...
@@ -264,6 +264,16 @@
...
@@ -264,6 +264,16 @@
type=
"datetime"
placeholder=
"选择时间"
></el-date-picker>
type=
"datetime"
placeholder=
"选择时间"
></el-date-picker>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"移交原因:"
prop=
"reason"
>
<el-select
v-model=
"transfer.form.reason"
filterable
placeholder=
"请选择"
:clearable=
"false"
@
change=
"transferReasonName"
>
<el-option
v-for=
"(data,index) in transfer.reasonList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<el-button
@
click=
"transferToggle"
>
取消
</el-button>
<el-button
@
click=
"transferToggle"
>
取消
</el-button>
...
@@ -289,6 +299,8 @@
...
@@ -289,6 +299,8 @@
transfer
:
{
transfer
:
{
show
:
false
,
show
:
false
,
form
:
{
form
:
{
reason
:
''
,
reason_name
:
''
,
teacher_name
:
''
,
teacher_name
:
''
,
teacher_id
:
''
,
teacher_id
:
''
,
staff_current_name
:
''
,
// 当前顾问名
staff_current_name
:
''
,
// 当前顾问名
...
@@ -298,9 +310,23 @@
...
@@ -298,9 +310,23 @@
rules
:
{
rules
:
{
staff_id
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
staff_id
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
transfer_at
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
transfer_at
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
reason
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
},
},
},
},
staff
:
[
0
]
staff
:
[
0
],
reasonList
:
[{
id
:
0
,
name
:
'人员入职'
,
},{
id
:
1
,
name
:
'人员离职'
,
},{
id
:
2
,
name
:
'请假'
,
},{
id
:
3
,
name
:
'其它'
,
},]
},
},
searchFrom
:{
searchFrom
:{
name
:
''
,
name
:
''
,
...
@@ -440,6 +466,9 @@
...
@@ -440,6 +466,9 @@
transferStaffName
(
data
)
{
transferStaffName
(
data
)
{
this
.
transfer
.
form
.
staff_name
=
this
.
transfer
.
staff
.
find
(
x
=>
x
.
id
==
data
).
name
;
this
.
transfer
.
form
.
staff_name
=
this
.
transfer
.
staff
.
find
(
x
=>
x
.
id
==
data
).
name
;
},
},
transferReasonName
(
data
)
{
this
.
transfer
.
form
.
reason_name
=
this
.
transfer
.
reasonList
.
find
(
x
=>
x
.
id
==
data
).
name
;
},
transferToggle
(
data
)
{
transferToggle
(
data
)
{
this
.
transfer
.
show
=
!
this
.
transfer
.
show
;
this
.
transfer
.
show
=
!
this
.
transfer
.
show
;
if
(
this
.
transfer
.
show
){
if
(
this
.
transfer
.
show
){
...
@@ -467,8 +496,9 @@
...
@@ -467,8 +496,9 @@
this
.
$confirm
(
`确定将
this
.
$confirm
(
`确定将
<span style="color: red;">
${
this
.
transfer
.
form
.
teacher_name
}
</span> 移交给
<span style="color: red;">
${
this
.
transfer
.
form
.
teacher_name
}
</span> 移交给
<span style="color: red;">
${
this
.
transfer
.
form
.
staff_name
}
</span> ?<br>移交开始时间
<span style="color: red;">
${
this
.
transfer
.
form
.
staff_name
}
</span> ?<br>
${
this
.
transfer
.
form
.
transfer_at
}
`
,
'提示'
,
{
移交开始时间
${
this
.
transfer
.
form
.
transfer_at
}
<br>
移交原因
${
this
.
transfer
.
form
.
reason_name
}
`
,
'提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -478,6 +508,7 @@
...
@@ -478,6 +508,7 @@
teacher_id
:
this
.
transfer
.
form
.
teacher_id
,
teacher_id
:
this
.
transfer
.
form
.
teacher_id
,
staff_id
:
this
.
transfer
.
form
.
staff_id
,
staff_id
:
this
.
transfer
.
form
.
staff_id
,
transfer_at
:
this
.
transfer
.
form
.
transfer_at
,
transfer_at
:
this
.
transfer
.
form
.
transfer_at
,
reason
:
this
.
transfer
.
form
.
reason
,
};
};
postTransferTeacherApi
(
json
).
then
(
res
=>
{
postTransferTeacherApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'移交成功!'
});
this
.
$message
({
type
:
'success'
,
message
:
'移交成功!'
});
...
...
src/components/teacherDetail/index.vue
View file @
4622dd7a
...
@@ -441,58 +441,34 @@
...
@@ -441,58 +441,34 @@
<user-list
:userObj=
"userObj"
@
reflash=
"getTeacherDetail"
/>
<user-list
:userObj=
"userObj"
@
reflash=
"getTeacherDetail"
/>
<choose-good-dialog
:dialogObj=
"chooseGoodDialogObj"
@
changeShow=
"changeShow"
/>
<choose-good-dialog
:dialogObj=
"chooseGoodDialogObj"
@
changeShow=
"changeShow"
/>
<el-dialog
append-to-body
:visible
.
sync=
"addShow"
>
<el-dialog
append-to-body
:visible
.
sync=
"addShow"
top=
"5vh"
>
<el-form
label-width=
"90px"
>
<el-form
label-width=
"90px"
inline
>
<!--<el-form-item label="用户id">-->
<!--<el-form-item label="用户id">-->
<!--<el-input v-model="addId"></el-input>-->
<!--<el-input v-model="addId"></el-input>-->
<!--</el-form-item>-->
<!--</el-form-item>-->
<el-row>
<el-form-item>
<el-col
:span=
"8"
>
<el-input
style=
"width: 160px;"
placeholder=
"ID"
@
change=
"getUser"
v-model=
"searchFrom.userId"
></el-input>
<el-form-item
label=
"ID"
>
<el-input
v-model=
"searchFrom.userId"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
<el-form-item>
<el-col
:span=
"8"
>
<el-input
style=
"width: 160px;"
placeholder=
"昵称"
@
change=
"getUser"
v-model=
"searchFrom.nickName"
></el-input>
<el-form-item
label=
"昵称"
>
<el-input
v-model=
"searchFrom.nickName"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
<el-form-item>
<el-col
:span=
"8"
>
<el-input
style=
"width: 160px;"
placeholder=
"电话"
@
change=
"getUser"
v-model=
"searchFrom.mobile"
></el-input>
<el-form-item
label=
"电话"
>
<el-input
v-model=
"searchFrom.mobile"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
:offset=
"16"
>
<el-form-item>
<el-form-item>
<el-button
style=
"float: right"
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getUser"
>
搜索
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form>
<el-table
<el-table
border
size=
"small"
:data=
"userList"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
:data=
"userList"
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
ref=
"multipleTable"
<el-table-column
className=
"f-c"
label=
"用户"
>
@
selection-change=
"handleSelectionChange"
style=
"width: 100%"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
className=
"f-c"
label=
"用户"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
style=
"margin-right:
5
px;width: 50px;height: 50px;border-radius: 50px"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
<img
style=
"margin-right:
8
px;width: 50px;height: 50px;border-radius: 50px"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"mobile"
label=
"手机号"
></el-table-column>
prop=
"mobile"
label=
"手机号"
>
</el-table-column>
</el-table>
</el-table>
<page
:total=
"userObj.total"
:limit=
"userObj.limit"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
<page
:total=
"userObj.total"
:limit=
"userObj.limit"
:small=
"true"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addShow = false"
>
取 消
</el-button>
<el-button
@
click=
"addShow = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"onAdd"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"onAdd"
>
确 定
</el-button>
...
...
src/components/teacherDetail/task.vue
View file @
4622dd7a
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<div
v-for=
"data in task3List"
class=
"task3-table"
style=
"width:47%"
>
<div
v-for=
"data in task3List"
class=
"task3-table"
style=
"width:47%"
>
<div
class=
"table"
>
<div
class=
"table"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"header bg-h"
>
期数
</div>
<div
class=
"header bg-h"
>
期数
名称
</div>
<div>
<div>
<!--
{{
data
.
title
}}
-->
<!--
{{
data
.
title
}}
-->
<div
v-html=
"periodName(data)"
></div>
<div
v-html=
"periodName(data)"
></div>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<div>
往期意向用户:
</div>
<div>
往期意向用户:
</div>
<div
class=
"table"
>
<div
class=
"table"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"header bg-h"
>
期数
</div>
<div
class=
"header bg-h"
>
期数
名称
</div>
<div>
<div>
往期活跃用户数(近三天)
往期活跃用户数(近三天)
</div>
</div>
...
...
src/components/teacherDetail/task3.vue
View file @
4622dd7a
...
@@ -10,9 +10,10 @@
...
@@ -10,9 +10,10 @@
<div
v-for=
"data in task3List"
class=
"task3-table"
>
<div
v-for=
"data in task3List"
class=
"task3-table"
>
<div
class=
"table"
>
<div
class=
"table"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"title"
style=
"width:8%"
>
<div
class=
"header bg-h"
>
期数
</div>
<div
class=
"header bg-h"
>
期数
名称
</div>
<div>
<div>
{{
data
.
title
}}
<!--
{{
data
.
title
}}
-->
<div
v-html=
"periodName(data)"
></div>
</div>
</div>
</div>
</div>
<div
class=
"total"
>
<div
class=
"total"
>
...
@@ -358,6 +359,29 @@
...
@@ -358,6 +359,29 @@
}
}
}
,
}
,
methods
:{
methods
:{
periodName
(
val
)
{
let
str
=
''
;
if
(
!
val
.
title
)
{
str
=
'-'
}
else
{
if
(
val
.
goods_id
)
{
str
+=
`【${val.goods_id
}
】`
}
if
(
val
.
title
)
{
str
+=
`${val.title
}
<br>`
}
if
(
val
.
watch_num
)
{
str
+=
`${val.watch_num
}
课时`
}
if
(
val
.
start_at
)
{
str
+=
`(${val.start_at.slice(5).replace('-', '')
}
)`
}
if
(
val
.
has_watch_num
||
val
.
has_watch_num
==
0
)
{
str
+=
`-d${val.has_watch_num
}
`
}
}
return
str
}
,
showSourceByDate
(
row
){
showSourceByDate
(
row
){
this
.
sourceByDateDialogJson
=
{
this
.
sourceByDateDialogJson
=
{
"periods_id"
:
row
.
periods_id
,
"periods_id"
:
row
.
periods_id
,
...
...
src/components/user/index.vue
View file @
4622dd7a
...
@@ -33,16 +33,17 @@
...
@@ -33,16 +33,17 @@
<img
class=
"avatar"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
<img
class=
"avatar"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
<br>
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
></el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
width=
"110px"
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"注册时间"
width=
"105px"
sortable
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"注册时间"
sortable
></el-table-column>
<el-table-column
prop=
"last_login_at"
label=
"最后登录"
width=
"105px"
sortable
></el-table-column>
<el-table-column
prop=
"last_login_at"
label=
"最后登录"
sortable
></el-table-column>
<!--<el-table-column prop="last_login_at" label="最后登录时间" width="120px" sortable></el-table-column>-->
<!--<el-table-column prop="last_login_at" label="最后登录时间" width="120px" sortable></el-table-column>-->
<el-table-column
prop=
"baby_name"
label=
"宝宝名称"
></el-table-column>
<el-table-column
prop=
"baby_name"
label=
"宝宝名称"
></el-table-column>
<el-table-column
prop=
"birthday"
label=
"宝宝生日"
width=
"1
05
px"
></el-table-column>
<el-table-column
prop=
"birthday"
label=
"宝宝生日"
width=
"1
10
px"
></el-table-column>
<el-table-column
prop=
"sex"
label=
"宝宝性别"
width=
"80px"
:formatter=
"sexFormatter"
></el-table-column>
<el-table-column
prop=
"sex"
label=
"宝宝性别"
width=
"80px"
:formatter=
"sexFormatter"
></el-table-column>
<el-table-column
label=
"操作"
width=
"
1
00px"
>
<el-table-column
label=
"操作"
width=
"
2
00px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"goToDetail(scope.row.user_id)"
>
查看详情
</el-button>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"goToDetail(scope.row.user_id)"
>
查看详情
</el-button>
<el-button
size=
"mini"
v-if=
"!$store.state.readonly"
plain
type=
"warning"
@
click=
"userTransfer(scope.row)"
>
用户转移
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -54,39 +55,93 @@
...
@@ -54,39 +55,93 @@
<user-detail
:parentDetail=
"dialogDetail"
></user-detail>
<user-detail
:parentDetail=
"dialogDetail"
></user-detail>
</div>
</div>
</el-dialog>
</el-dialog>
<!--用户移交-->
<el-dialog
append-to-body
:visible
.
sync=
"addShow"
top=
"5vh"
:title=
"`把 ${userObj.transfer_user_name} 转移为`"
>
<el-form
label-width=
"90px"
inline
>
<el-form-item>
<el-input
style=
"width: 160px;"
placeholder=
"ID"
@
change=
"getTransferUser"
v-model=
"userObj.searchFrom.userId"
></el-input>
</el-form-item>
<el-form-item>
<el-input
style=
"width: 160px;"
placeholder=
"昵称"
@
change=
"getTransferUser"
v-model=
"userObj.searchFrom.nickName"
></el-input>
</el-form-item>
<el-form-item>
<el-input
style=
"width: 160px;"
placeholder=
"电话"
@
change=
"getTransferUser"
v-model=
"userObj.searchFrom.mobile"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getTransferUser"
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-table
border
size=
"small"
:data=
"userTransferList"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
className=
"f-c"
label=
"用户"
>
<
template
slot-scope=
"scope"
>
<img
style=
"margin-right:8px;width: 50px;height: 50px;border-radius: 50px"
:src=
"scope.row.avatar"
>
{{
scope
.
row
.
nickname
}}
(ID:
{{
scope
.
row
.
user_id
}}
)
</
template
>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
></el-table-column>
</el-table>
<page
:total=
"userObj.total"
:limit=
"userObj.limit"
:small=
"true"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addShow = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"transferSave"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getUserListApi
,
getSyncUs
erApi
}
from
"../../service/api"
;
import
{
getUserListApi
,
getSyncUserApi
,
postUserTransf
erApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
import
page
from
'../framework/page'
import
detailDialog
from
'./detail'
import
detailDialog
from
'./detail'
import
teacherDialog
from
'./dialog'
import
teacherDialog
from
'./dialog'
import
userDetail
from
'../userDetail/index'
import
userDetail
from
'../userDetail/index'
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
data
(){
data
()
{
return
{
return
{
searchFrom
:{
addShow
:
false
,
nickName
:
''
,
userTransferList
:
[],
mobile
:
''
,
userObj
:
{
level
:
''
,
title
:
''
,
show
:
false
,
total
:
0
,
limit
:
10
,
nowPage
:
1
,
transfer_user_id
:
''
,
transfer_user_name
:
''
,
receive_user_id
:
''
,
receive_user_name
:
''
,
searchFrom
:
{
nickName
:
''
,
mobile
:
''
,
level
:
''
,
userId
:
''
userId
:
''
},
},
dialogDetail
:{
show
:
false
,
id
:
''
},
},
userList
:[],
multipleSelection
:
[],
total
:
0
,
nowPage
:
1
,
searchFrom
:
{
nickName
:
''
,
mobile
:
''
,
level
:
''
,
userId
:
''
},
dialogDetail
:
{
show
:
false
,
id
:
''
},
userList
:
[],
total
:
0
,
nowPage
:
1
,
limit
:
10
,
limit
:
10
,
showDetail
:
false
,
showDetail
:
false
,
showId
:
''
,
showId
:
''
,
dialogObj
:{
dialogObj
:
{
show
:
false
,
show
:
false
,
title
:
'绑定老师'
,
title
:
'绑定老师'
,
id
:
0
,
id
:
0
,
teacher_id
:
0
teacher_id
:
0
},
},
dialogDetailObj
:
{
dialogDetailObj
:
{
...
@@ -96,40 +151,133 @@
...
@@ -96,40 +151,133 @@
loading
:
false
loading
:
false
}
}
},
},
components
:{
components
:
{
page
,
page
,
detailDialog
,
detailDialog
,
userDetail
,
userDetail
,
teacherDialog
teacherDialog
},
},
mounted
(){
mounted
()
{
this
.
getUser
()
this
.
getUser
()
},
},
methods
:{
methods
:
{
tagChange
()
{
userTransfer
(
row
)
{
this
.
addShow
=
true
;
this
.
userObj
.
total
=
0
;
this
.
userObj
.
nowPage
=
1
;
this
.
getTransferUser
();
this
.
userObj
.
transfer_user_id
=
row
.
user_id
;
this
.
userObj
.
transfer_user_name
=
row
.
nickname
;
this
.
userObj
.
receive_user_id
=
''
;
this
.
userObj
.
receive_user_name
=
''
;
},
transferSave
()
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择用户!'
});
return
}
else
if
(
this
.
multipleSelection
.
length
!==
1
)
{
this
.
$message
({
type
:
'error'
,
message
:
'只能选择一个用户!'
});
return
}
else
if
(
!
this
.
userObj
.
transfer_user_id
||
!
this
.
userObj
.
transfer_user_name
)
{
return
}
this
.
$confirm
(
`确定将
<span style="color: red;">
${
this
.
userObj
.
transfer_user_name
}
</span> 转移为
<span style="color: red;">
${
this
.
userObj
.
receive_user_name
}
</span> ?`
,
'提示'
,
{
dangerouslyUseHTMLString
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
json
=
{
transfer_user_id
:
this
.
userObj
.
transfer_user_id
,
receive_user_id
:
this
.
userObj
.
receive_user_id
,
}
postUserTransferApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'用户转移成功!'
});
this
.
getUser
();
this
.
addShow
=
false
;
this
.
userObj
.
transfer_user_id
=
''
;
this
.
userObj
.
transfer_user_name
=
''
;
this
.
userObj
.
receive_user_id
=
''
;
this
.
userObj
.
receive_user_name
=
''
;
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消转移'
});
});
},
},
sexFormatter
(
item
){
onPageChange3
(
val
)
{
if
(
item
.
sex
==
0
){
this
.
userObj
.
nowPage
=
val
this
.
getTransferUser
()
},
onSizeChange3
(
val
)
{
this
.
userObj
.
limit
=
val
;
this
.
userObj
.
nowPage
=
1
;
this
.
getTransferUser
()
},
getTransferUser
()
{
let
json
=
{
page
:
this
.
userObj
.
nowPage
,
limit
:
this
.
userObj
.
limit
,
};
if
(
this
.
userObj
.
searchFrom
.
userId
)
{
json
.
user_id
=
this
.
userObj
.
searchFrom
.
userId
}
if
(
this
.
userObj
.
searchFrom
.
nickName
)
{
json
.
nickname
=
this
.
userObj
.
searchFrom
.
nickName
}
if
(
this
.
userObj
.
searchFrom
.
mobile
)
{
json
.
mobile
=
this
.
userObj
.
searchFrom
.
mobile
}
getUserListApi
(
json
).
then
(
res
=>
{
this
.
userTransferList
=
res
.
list
;
this
.
userObj
.
total
=
res
.
total
;
})
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
userObj
.
receive_user_name
=
val
[
0
].
nickname
;
this
.
userObj
.
receive_user_id
=
val
[
0
].
user_id
;
},
sexFormatter
(
item
)
{
if
(
item
.
sex
==
0
)
{
return
'保密'
return
'保密'
}
}
if
(
item
.
sex
==
1
)
{
if
(
item
.
sex
==
1
)
{
return
'男'
return
'男'
}
}
if
(
item
.
sex
==
2
)
{
if
(
item
.
sex
==
2
)
{
return
'女'
return
'女'
}
}
},
},
onPageChange
(
val
){
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
nowPage
=
val
this
.
getUser
()
this
.
getUser
()
},
},
onSizeChange
(
val
){
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
nowPage
=
1
;
this
.
getUser
()
this
.
getUser
()
},
},
getUser
(){
getUser
()
{
let
json
=
{
let
json
=
{
page
:
this
.
nowPage
,
page
:
this
.
nowPage
,
limit
:
this
.
limit
limit
:
this
.
limit
...
@@ -146,43 +294,43 @@
...
@@ -146,43 +294,43 @@
if
(
this
.
searchFrom
.
level
)
{
if
(
this
.
searchFrom
.
level
)
{
json
.
level
=
this
.
searchFrom
.
level
json
.
level
=
this
.
searchFrom
.
level
}
}
getUserListApi
(
json
).
then
(
res
=>
{
getUserListApi
(
json
).
then
(
res
=>
{
this
.
userList
=
res
.
list
;
this
.
userList
=
res
.
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
})
})
},
},
detail
(
data
){
detail
(
data
)
{
this
.
dialogDetailObj
=
{
this
.
dialogDetailObj
=
{
show
:
true
,
show
:
true
,
id
:
data
.
user_id
id
:
data
.
user_id
}
}
},
},
changeShow
(
data
){
changeShow
(
data
)
{
this
.
dialogDetailObj
.
show
=
data
this
.
dialogDetailObj
.
show
=
data
},
},
bindTeacher
(
data
){
bindTeacher
(
data
)
{
this
.
dialogObj
=
{
this
.
dialogObj
=
{
show
:
true
,
show
:
true
,
title
:
'绑定老师'
,
title
:
'绑定老师'
,
id
:
data
.
user_id
,
id
:
data
.
user_id
,
teacher_id
:
data
.
teacher_id
teacher_id
:
data
.
teacher_id
}
}
},
},
goToDetail
(
id
){
goToDetail
(
id
)
{
this
.
dialogDetail
.
id
=
id
;
this
.
dialogDetail
.
id
=
id
;
this
.
dialogDetail
.
show
=
true
this
.
dialogDetail
.
show
=
true
// this.$router.push('/userDetail/'+ id);
// this.$router.push('/userDetail/'+ id);
},
},
syncUser
(){
syncUser
()
{
this
.
loading
=
true
this
.
loading
=
true
getSyncUserApi
().
then
((
data
)
=>
{
getSyncUserApi
().
then
((
data
)
=>
{
this
.
loading
=
false
this
.
loading
=
false
this
.
$message
({
this
.
$message
({
showClose
:
true
,
showClose
:
true
,
message
:
`已更新
${
data
}
条用户数据`
,
message
:
`已更新
${
data
}
条用户数据`
,
type
:
'success'
type
:
'success'
})
})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
}
}
...
@@ -192,14 +340,16 @@
...
@@ -192,14 +340,16 @@
<
style
lang=
"less"
>
<
style
lang=
"less"
>
/*@import "../../util/public";*/
/*@import "../../util/public";*/
.user{
.user
{
/*height: 100%;*/
/*height: 100%;*/
overflow: auto;
overflow: auto;
padding: 20px 0;
padding: 20px 0;
.btn-content{
.btn-content {
text-align: center;
text-align: center;
}
}
}
}
.flexRow {
.flexRow {
display: flex;
display: flex;
flex-flow: row;
flex-flow: row;
...
...
src/components/yunji/index.vue
View file @
4622dd7a
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
>
<el-table-column
prop=
"teacher_name"
label=
"班级老师"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"class_source"
width=
"80"
label=
"活动方案
"
>
<el-table-column
prop=
"class_source"
label=
"活动方案"
width=
"180px
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
class_source
|
classType
}}
{{
scope
.
row
.
class_source
|
classType
}}
</
template
>
</
template
>
...
@@ -905,10 +905,14 @@ export default {
...
@@ -905,10 +905,14 @@ export default {
.sms {
.sms {
padding: 20px 0;
padding: 20px 0;
}
}
.el-button+.el-button{
.el-table {
.el-button + .el-button {
margin-left: 0;
margin-left: 0;
/* margin-top: 10px; */
margin-top: 10px;
}
}
}
.avatar {
.avatar {
width: 50px;
width: 50px;
min-width: 50px;
min-width: 50px;
...
...
src/service/api.js
View file @
4622dd7a
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
axios
from
'axios'
import
axios
from
'axios'
import
{
post
,
fetch
,
patch
,
put
,
del
,
upload
}
from
'./index'
import
{
post
,
fetch
,
patch
,
put
,
del
,
upload
}
from
'./index'
import
md5
from
"js-md5"
;
import
md5
from
"js-md5"
;
import
CommonJs
from
'../util/common'
;
import
CommonJs
from
'../util/common'
;
const
_baseUrl
=
process
.
env
.
API_URL
;
const
_baseUrl
=
process
.
env
.
API_URL
;
Vue
.
prototype
.
$post
=
post
;
Vue
.
prototype
.
$post
=
post
;
Vue
.
prototype
.
$fetch
=
fetch
;
Vue
.
prototype
.
$fetch
=
fetch
;
...
@@ -14,7 +15,7 @@ Vue.prototype.$upload = upload;
...
@@ -14,7 +15,7 @@ Vue.prototype.$upload = upload;
//登录
//登录
const
loginURL
=
`
${
_baseUrl
}
api/admin/login`
;
const
loginURL
=
`
${
_baseUrl
}
api/admin/login`
;
export
const
loginApi
=
function
(
json
)
{
export
const
loginApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
loginURL
,
{
"username"
:
json
.
username
,
"passwd"
:
json
.
password
})
return
Vue
.
prototype
.
$post
(
loginURL
,
{
"username"
:
json
.
username
,
"passwd"
:
json
.
password
})
};
};
//退出登录
//退出登录
const
logOutUrl
=
`
${
_baseUrl
}
api/admin/logout`
;
const
logOutUrl
=
`
${
_baseUrl
}
api/admin/logout`
;
...
@@ -56,6 +57,11 @@ const getUserDetailUrl = `${_baseUrl}api/admin/student/info`;
...
@@ -56,6 +57,11 @@ const getUserDetailUrl = `${_baseUrl}api/admin/student/info`;
export
const
getUserDetailApi
=
function
(
id
)
{
export
const
getUserDetailApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
getUserDetailUrl
}
/
${
id
}
`
)
return
Vue
.
prototype
.
$fetch
(
`
${
getUserDetailUrl
}
/
${
id
}
`
)
};
};
// 用户转移
const
postUserTransferUrl
=
`
${
_baseUrl
}
api/admin/user/data/transfer`
;
export
const
postUserTransferApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
postUserTransferUrl
,
json
)
};
//获取教师列表
//获取教师列表
const
getTeacherListUrl
=
`
${
_baseUrl
}
api/admin/teacher/list`
;
const
getTeacherListUrl
=
`
${
_baseUrl
}
api/admin/teacher/list`
;
export
const
getTeacherListApi
=
function
(
json
)
{
export
const
getTeacherListApi
=
function
(
json
)
{
...
@@ -148,7 +154,7 @@ export const downGoodsApi = function (id) {
...
@@ -148,7 +154,7 @@ export const downGoodsApi = function (id) {
//查询元素、菜单分类
//查询元素、菜单分类
const
getCategoryUrl
=
`
${
_baseUrl
}
api/admin/category/list/0`
;
const
getCategoryUrl
=
`
${
_baseUrl
}
api/admin/category/list/0`
;
export
const
getCategoryApi
=
function
(
pid
)
{
export
const
getCategoryApi
=
function
(
pid
)
{
return
Vue
.
prototype
.
$fetch
(
getCategoryUrl
,
{
'pid'
:
pid
})
return
Vue
.
prototype
.
$fetch
(
getCategoryUrl
,
{
'pid'
:
pid
})
};
};
// 添加教材菜单
// 添加教材菜单
...
@@ -362,7 +368,7 @@ export const delBannerApi = function (id) {
...
@@ -362,7 +368,7 @@ export const delBannerApi = function (id) {
// 移动顺序
// 移动顺序
const
moveUrl
=
`
${
_baseUrl
}
api/admin/banner/sort`
;
const
moveUrl
=
`
${
_baseUrl
}
api/admin/banner/sort`
;
export
const
moveApi
=
function
(
upId
,
downId
)
{
export
const
moveApi
=
function
(
upId
,
downId
)
{
return
Vue
.
prototype
.
$patch
(
`
${
moveUrl
}
`
,
{
banner_up_id
:
upId
,
banner_down_id
:
downId
})
return
Vue
.
prototype
.
$patch
(
`
${
moveUrl
}
`
,
{
banner_up_id
:
upId
,
banner_down_id
:
downId
})
};
};
// 获取期数列表
// 获取期数列表
...
@@ -668,6 +674,7 @@ const editAdminPasswordUrl = `/api/admin/user/passwd`;
...
@@ -668,6 +674,7 @@ const editAdminPasswordUrl = `/api/admin/user/passwd`;
export
const
editAdminPasswordApi
=
function
(
json
)
{
export
const
editAdminPasswordApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$patch
(
editAdminPasswordUrl
,
json
)
return
Vue
.
prototype
.
$patch
(
editAdminPasswordUrl
,
json
)
};
};
// 导出
// 导出
function
exportExcel
(
form
)
{
function
exportExcel
(
form
)
{
return
axios
({
// 用axios发送post请求
return
axios
({
// 用axios发送post请求
...
@@ -681,18 +688,33 @@ function exportExcel(form) {
...
@@ -681,18 +688,33 @@ function exportExcel(form) {
})
})
// return Vue.prototype.$post(form.url, form.params)
// return Vue.prototype.$post(form.url, form.params)
}
}
export
const
exportExcelApi
=
function
(
url
,
params
,
fname
)
{
export
const
exportExcelApi
=
function
(
url
,
params
,
fname
)
{
url
=
`
${
url
}
`
;
url
=
`
${
url
}
`
;
let
obj
=
{
let
obj
=
{
'url'
:
url
,
'url'
:
url
,
params
:
params
params
:
params
}
}
exportExcel
(
obj
).
then
(
res
=>
{
// 处理返回的文件流
exportExcel
(
obj
).
then
(
res
=>
{
// 处理返回的文件流
console
.
log
(
res
)
console
.
log
(
res
)
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
'text/csv'
})
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
res
.
data
.
type
}),
filename
;
console
.
log
(
res
.
headers
[
'content-disposition'
].
split
(
'filename='
)[
1
])
//console.log(res.headers['content-disposition'].split('filename=')[1])
CommonJs
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)
//CommonJs.dateFmt(new Date(), "yyyy-MM-dd")
let
filename
=
fname
+
CommonJs
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)
+
'.xls'
if
(
!
fname
&&
res
.
headers
[
'content-disposition'
].
split
(
'filename='
)[
1
])
{
let
str
=
res
.
headers
[
'content-disposition'
].
split
(
'filename='
)[
1
];
if
(
str
[
str
.
length
-
1
]
==
'"'
||
str
[
str
.
length
-
1
]
==
"'"
)
{
//str = str.substring(-1,(str.length-1));
str
=
str
.
replace
(
/
\"
|
\'
/g
,
""
)
}
if
(
str
.
indexOf
(
'.xls'
)
>
-
1
)
{
filename
=
str
}
else
{
filename
=
str
+
'.xls'
}
}
else
{
filename
=
fname
+
CommonJs
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)
+
'.xls'
}
console
.
log
(
'filename: '
+
filename
);
var
link
=
document
.
createElement
(
'a'
);
var
link
=
document
.
createElement
(
'a'
);
link
.
href
=
window
.
URL
.
createObjectURL
(
blob
);
link
.
href
=
window
.
URL
.
createObjectURL
(
blob
);
link
.
download
=
filename
;
link
.
download
=
filename
;
...
@@ -705,15 +727,15 @@ const exportReceiveInfoUrl = `${_baseUrl}api/admin/order/deliver/periods/export/
...
@@ -705,15 +727,15 @@ const exportReceiveInfoUrl = `${_baseUrl}api/admin/order/deliver/periods/export/
export
const
exportReceiveInfoApi
=
function
(
periods_id
)
{
export
const
exportReceiveInfoApi
=
function
(
periods_id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
obj
=
{
let
obj
=
{
'url'
:
`
${
exportReceiveInfoUrl
}${
periods_id
}
`
,
'url'
:
`
${
exportReceiveInfoUrl
}${
periods_id
}
`
,
params
:
{}
params
:
{}
}
}
exportExcel
(
obj
).
then
(
res
=>
{
// 处理返回的文件流
exportExcel
(
obj
).
then
(
res
=>
{
// 处理返回的文件流
console
.
log
(
res
)
console
.
log
(
res
)
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
'text/csv'
})
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
'text/csv'
})
console
.
log
(
res
.
headers
[
'content-disposition'
].
split
(
'filename='
)[
1
])
console
.
log
(
res
.
headers
[
'content-disposition'
].
split
(
'filename='
)[
1
])
CommonJs
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)
//CommonJs.dateFmt(new Date(),
"yyyy-MM-dd")
let
filename
=
'收货信息'
+
CommonJs
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)
+
'.xls'
let
filename
=
'收货信息'
+
CommonJs
.
dateFmt
(
new
Date
(),
"yyyy-MM-dd"
)
+
'.xls'
var
link
=
document
.
createElement
(
'a'
);
var
link
=
document
.
createElement
(
'a'
);
link
.
href
=
window
.
URL
.
createObjectURL
(
blob
);
link
.
href
=
window
.
URL
.
createObjectURL
(
blob
);
link
.
download
=
filename
;
link
.
download
=
filename
;
...
@@ -1262,8 +1284,8 @@ export const postSourceStudentApi = function (json) {
...
@@ -1262,8 +1284,8 @@ export const postSourceStudentApi = function (json) {
export
const
delSourceStudentApi
=
function
(
type
)
{
export
const
delSourceStudentApi
=
function
(
type
)
{
return
Vue
.
prototype
.
$del
(
`
${
_baseUrl
}
api/admin/source/student/delete/
${
type
}
`
)
return
Vue
.
prototype
.
$del
(
`
${
_baseUrl
}
api/admin/source/student/delete/
${
type
}
`
)
};
};
export
const
putSourceStudentApi
=
function
(
type
,
json
)
{
export
const
putSourceStudentApi
=
function
(
type
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/source/student/edit/
${
type
}
`
,
json
)
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/source/student/edit/
${
type
}
`
,
json
)
};
};
// /api/admin/source/student/list
// /api/admin/source/student/list
// 获取标签
// 获取标签
...
...
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