Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖翔宇
/
admin-vue
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ed4cfcfb
authored
Dec 14, 2018
by
肖翔宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12.14
parent
ebd45eda
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
19 deletions
+48
-19
config/dev.env.js
+1
-1
src/components/Modal/index.vue
+1
-1
src/views/bargain/index.vue
+4
-3
src/views/code/index.vue
+23
-9
src/views/course/courseEdit.vue
+2
-1
src/views/course/index.vue
+17
-4
No files found.
config/dev.env.js
View file @
ed4cfcfb
...
...
@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
module
.
exports
=
merge
(
prodEnv
,
{
NODE_ENV
:
'"development"'
,
BASE_API
:
'"http://
gxgqs.com
/sharePiano"'
,
BASE_API
:
'"http://
192.168.10.105:9001
/sharePiano"'
,
})
//http://gxgqs.com/sharePiano
//http://192.168.10.105:9001/sharePiano
src/components/Modal/index.vue
View file @
ed4cfcfb
...
...
@@ -67,7 +67,7 @@
z-index
:
80
;
top
:
10%
;
left
:
25%
;
width
:
50%
;
width
:
600px
;
/* margin: 0 auto; */
background-color
:
#eee
;
border-radius
:
3px
;
...
...
src/views/bargain/index.vue
View file @
ed4cfcfb
...
...
@@ -32,7 +32,7 @@
</
template
>
</el-table-column>
</el-table>
<el-button
@
click
.
native
.
prevent=
"openShowBargain()"
class=
"filter-item"
style=
"margin-left: 10px;"
v-waves
type=
"primary"
icon=
"el-icon-plus"
>
添加
类型
<el-button
@
click
.
native
.
prevent=
"openShowBargain()"
class=
"filter-item"
style=
"margin-left: 10px;"
v-waves
type=
"primary"
icon=
"el-icon-plus"
>
添加
阶段
</el-button>
</modal>
<modal
@
on-close=
"closeBargain()"
:is-show=
'isShowBargain'
>
...
...
@@ -43,8 +43,8 @@
v-model
.
number=
"types.totalNumber"
:maxlength=
"4"
>
</el-input>
</el-form-item>
<el-form-item
label=
"
金额范围
"
prop=
"totalAmount"
>
<el-input
type=
"text"
placeholder=
"请输入
金额范围
"
<el-form-item
label=
"
阶段金额
"
prop=
"totalAmount"
>
<el-input
type=
"text"
placeholder=
"请输入
阶段金额
"
v-model
.
number=
"types.totalAmount"
:maxlength=
"12"
>
</el-input>
</el-form-item>
...
...
@@ -251,6 +251,7 @@
this
.
isShowBargain
=
true
;
},
closeBargain
(){
this
.
$refs
[
"dataForm"
].
resetFields
();
this
.
isShowBargain
=
false
;
this
.
types
.
totalAmount
=
undefined
;
this
.
types
.
totalNumber
=
undefined
;
...
...
src/views/code/index.vue
View file @
ed4cfcfb
...
...
@@ -6,7 +6,7 @@
</el-button>
<modal
@
on-close=
"closeThis()"
:is-show=
'isShowLog'
>
<el-form
:rules=
"rules"
ref=
"dataForm"
:model=
"types"
label-position=
"left"
label-width=
"100px"
style=
'width: 350px; margin-left:50px;'
>
style=
'width: 350px; margin-left:50px;
margin-top:40px;
'
>
<el-form-item
label=
"钢琴品牌"
prop=
"pianoBrand"
>
<el-input
type=
"text"
placeholder=
"请输入钢琴品牌"
v-model
.
trim=
"temp.pianoBrand"
:maxlength=
"25"
>
...
...
@@ -17,7 +17,7 @@
</modal>
<modal
@
on-close=
"closeCode()"
:is-show=
'isShowCode'
>
<el-form
:rules=
"rules"
ref=
"dataForm"
:model=
"types"
label-position=
"left"
label-width=
"100px"
style=
'width: 350px; margin-left:50px;'
>
style=
'width: 350px; margin-left:50px;
margin-top:50px;
'
>
<el-form-item
label=
"生成数量"
prop=
"count"
>
<el-input
type=
"text"
placeholder=
"请输入要生成的二维码数量"
v-model
.
number=
"count"
:maxlength=
"3"
>
...
...
@@ -104,7 +104,7 @@
total
:
null
,
// 表单显示的名称
table
:
{
pianoBrand
:
'
商家信息
'
,
pianoBrand
:
'
钢琴品牌
'
,
name
:
'商家名'
,
id
:
'钢琴编号'
,
cover
:
'二维码'
...
...
@@ -125,7 +125,7 @@
// 表单验证的规则
rules
:
{
count
:
[
{
required
:
true
,
message
:
'
课程名称
不能为空'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'
数量
不能为空'
,
trigger
:
'blur'
},
{
type
:
'number'
,
message
:
'只允许输入数字'
}
]
},
...
...
@@ -139,7 +139,7 @@
},
mounted
()
{
this
.
$fetch
.
sysDict
.
optionsChildren
(
'BANNER_TYPE'
).
then
(({
data
})
=>
{
this
.
bannerTypes
=
data
this
.
bannerTypes
=
data
;
})
},
computed
:
{
...
...
@@ -163,18 +163,29 @@
openShowLog
(
row
){
this
.
isShowLog
=
true
;
const
index
=
this
.
list
.
indexOf
(
row
)
this
.
temp
=
this
.
list
[
index
];
this
.
temp
=
{
currentPage
:
row
.
currentPage
,
id
:
row
.
id
,
limit
:
row
.
limit
,
name
:
row
.
name
,
offset
:
row
.
offset
,
pageSize
:
row
.
pageSize
,
pianoBrand
:
row
.
pianoBrand
,
twoDimensionalCodeAddress
:
row
.
twoDimensionalCodeAddress
}
console
.
log
(
this
.
temp
)
},
openShowCode
(
row
){
this
.
isShowCode
=
true
;
},
closeCode
(){
this
.
$refs
[
"dataForm"
].
resetFields
();
this
.
isShowCode
=
false
;
this
.
count
=
undefined
;
},
shengcheng
(){
this
.
$fetch
.
sysCodeForPaino
.
fileUpload
({
id
:
this
.
count
}).
then
(({
data
})
=>
{
// 赋值数据
this
.
list
=
data
;
this
.
isShowCode
=
false
;
console
.
log
(
this
.
list
);
})
},
...
...
@@ -336,8 +347,9 @@
this
.
$message
.
warning
(
'请等待视频上传成功'
)
return
}
console
.
log
(
this
.
temp
);
this
.
$refs
[
'dataForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
true
)
{
const
tempData
=
Object
.
assign
({},
this
.
temp
)
if
(
!
tempData
.
id
)
{
this
.
$fetch
.
sysCodeForPaino
.
update
(
tempData
).
then
(()
=>
{
...
...
@@ -346,7 +358,8 @@
type
:
'success'
})
this
.
isShowLog
=
false
;
this
.
back
()
this
.
back
();
this
.
refresh
();
})
}
else
{
this
.
$fetch
.
sysCodeForPaino
.
update
(
tempData
).
then
(()
=>
{
...
...
@@ -355,7 +368,8 @@
type
:
'success'
})
this
.
isShowLog
=
false
;
this
.
back
()
this
.
back
();
this
.
refresh
();
})
}
}
else
{
...
...
src/views/course/courseEdit.vue
View file @
ed4cfcfb
...
...
@@ -105,8 +105,9 @@ export default {
filters
:
{},
created
()
{
const
params
=
this
.
$route
.
params
console
.
log
(
params
)
if
(
params
&&
params
.
id
)
{
this
.
$fetch
.
sysCourse
.
query
({
id
:
params
.
id
}).
then
(({
data
})
=>
{
this
.
$fetch
.
sysCourse
.
query
({
id
:
params
.
id
.
id
}).
then
(({
data
})
=>
{
this
.
temp
=
data
;
})
}
...
...
src/views/course/index.vue
View file @
ed4cfcfb
...
...
@@ -35,7 +35,7 @@
<el-form
:rules=
"rules"
ref=
"dataForm"
:model=
"types"
label-position=
"left"
label-width=
"100px"
style=
'width: 350px; margin-left:50px;margin-top:40px;'
>
<el-form-item
label=
"课程类型"
prop=
"courseName"
>
<el-input
type=
"text"
placeholder=
"请输入课程类型"
<el-input
@
change=
"console"
type=
"text"
placeholder=
"请输入课程类型"
v-model
.
trim=
"types.courseName"
:maxlength=
"25"
>
</el-input>
</el-form-item>
...
...
@@ -136,7 +136,7 @@
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click
.
native
.
prevent=
"handleDelete(scope.row)"
size=
"mini"
round
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click
.
native
.
prevent=
"showDiversity(scope.row)"
size=
"mini"
round
></el-button>
@
click
.
native
.
prevent=
"showDiversity(scope.row)"
size=
"mini"
round
>
选集
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -261,11 +261,21 @@
})
},
closeCourse
(){
console
.
log
(
this
.
types
,
this
.
courseTypes
)
this
.
$refs
[
"dataForm"
].
resetFields
();
this
.
isShowCourse
=
false
;
},
console
(){
console
.
log
(
this
.
types
,
this
.
courseTypes
)
},
openShowCourse
(
data
){
if
(
data
){
this
.
types
=
data
;
this
.
types
=
{
courseName
:
data
.
courseName
,
id
:
data
.
id
,
videoAddress
:
data
.
videoAddress
,
videoName
:
data
.
videoName
};
}
else
{
this
.
types
.
id
=
undefined
;
this
.
types
.
courseName
=
undefined
;
...
...
@@ -299,7 +309,9 @@
this
.
isShowDiversityEdit
=
true
;
},
closeDiversityEdit
(){
this
.
isShowDiversityEdit
=
false
this
.
$refs
[
"dataForm"
].
resetFields
();
this
.
isShowDiversityEdit
=
false
;
this
.
types
.
courseName
=
undefined
;
},
beforeUploadVideo
(
file
)
{
const
isLt10M
=
file
.
size
/
1024
/
1024
<
20
...
...
@@ -551,6 +563,7 @@
this
.
$refs
[
'dataForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
for
(
var
i
in
this
.
courseTypes
){
console
.
log
(
this
.
courseTypes
[
i
].
courseName
,
this
.
types
.
courseName
)
if
(
this
.
courseTypes
[
i
].
courseName
==
this
.
types
.
courseName
){
this
.
$message
(
"该课程类型已存在"
);
return
;
...
...
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