Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
ba46222a
Commit
ba46222a
authored
Jun 17, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旅游管理
parent
f1227342
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2634 additions
and
15 deletions
+2634
-15
mark.png
src/assets/images/mark.png
+0
-0
editorTool.vue
src/views/modal/editorTool.vue
+29
-15
index.vue
src/views/tourManage/index.vue
+945
-0
departureModal.vue
src/views/tourManage/modal/departureModal.vue
+198
-0
destinationModal.vue
src/views/tourManage/modal/destinationModal.vue
+438
-0
oneTourModal.vue
src/views/tourManage/modal/oneTourModal.vue
+764
-0
tourLabelModal.vue
src/views/tourManage/modal/tourLabelModal.vue
+53
-0
tourTime.vue
src/views/tourManage/modal/tourTime.vue
+207
-0
No files found.
src/assets/images/mark.png
0 → 100644
View file @
ba46222a
367 Bytes
src/views/modal/editorTool.vue
View file @
ba46222a
<
template
>
<div>
<!-- 图片上传组件辅助-->
<!--
<el-upload-->
<!--class="avatar-uploader"-->
<!--name="img"-->
<!--:headers="getHeaderWithToken"-->
<!--action="https://xxtest.upyuns.com/api/universal/file/app/unauth/admin/upload"-->
<!--:show-file-list="false"-->
<!--:on-success="uploadSuccess"-->
<!--:on-error="uploadError"-->
<!--:before-upload="beforeUpload">-->
<!--
</el-upload>
-->
<el-upload
class=
"avatar-uploader"
:action=
"'https://xxtest.upyuns.com/api/universal/file/app/unauth/admin/upload'"
...
...
@@ -23,7 +13,7 @@
<quill-editor
class=
"editor"
v-model=
"content"
ref=
"myQuillEditor"
:
ref=
"myQuillEditor"
:options=
"editorOption"
@
blur=
"onEditorBlur($event)"
@
focus=
"onEditorFocus($event)"
@
change=
"onEditorChange($event)"
>
...
...
@@ -65,10 +55,16 @@
value
:
{
type
:
String
},
myQuillEditor
:
{
type
:
String
},
/*图片大小*/
maxSize
:
{
type
:
Number
,
default
:
4000
//kb
},
activeName2
:{
type
:
String
}
},
...
...
@@ -85,6 +81,7 @@
return
{
content
:
this
.
value
,
quillUpdateImg
:
false
,
// 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示
quill
:
undefined
,
editorOption
:
{
placeholder
:
""
,
theme
:
"snow"
,
// or 'bubble'
...
...
@@ -114,7 +111,6 @@
}
}
},
serverUrl
:
this
.
baseServerUrl
+
"/fileUpload/uploadPic?filepath=artwork"
,
// 这里写你要上传的图片服务器地址
header
:
{
// token: sessionStorage.token
}
// 有的图片服务器要求请求头需要有token
...
...
@@ -125,13 +121,29 @@
this
.
content
=
value
;
}
},
mounted
()
{
debugger
// switch(this.activeName2){
// case "first":
// this.myQuillEditor="myQuillEditorExplain";
// break;
//
// };
let
tt
=
this
.
$refs
;
this
.
quill
=
tt
[
this
.
myQuillEditor
].
quill
;
console
.
log
(
this
.
quill
);
console
.
log
(
this
.
activeName2
);
},
methods
:
{
onEditorBlur
()
{
//失去焦点事件
},
onEditorFocus
()
{
onEditorFocus
(
e
)
{
//获得焦点事件
// let tt = this.$refs;
// this.quill = tt[this.myQuillEditor].quill;
// console.log(this.quill);
},
onEditorChange
()
{
//内容改变事件
...
...
@@ -148,8 +160,10 @@
console
.
log
(
file
)
// res为图片服务器返回的数据
// 获取富文本组件实例
debugger
let
quill
=
this
.
$refs
.
myQuillEditor
.
quill
;
// let quill = this.$refs.myQuillEditor.quill;
let
tt
=
this
.
$refs
;
console
.
log
(
tt
);
let
quill
=
this
.
quill
;
//tt[this.myQuillEditor].quill;
// 如果上传成功
if
(
res
.
status
==
200
)
{
// 获取光标所在位置
...
...
src/views/tourManage/index.vue
0 → 100644
View file @
ba46222a
This diff is collapsed.
Click to expand it.
src/views/tourManage/modal/departureModal.vue
0 → 100644
View file @
ba46222a
<
template
>
<el-dialog
title=
"出发地"
:visible
.
sync=
"isVisible"
>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"plus"
@
click=
"addTime()"
>
添加
</el-button>
<el-form>
<el-row
style=
"margin: 10px 0;"
v-for=
"item in lists"
:key=
"item.id"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"出发地"
>
<el-autocomplete
class=
"inline-input"
style=
"margin-left: 10px;"
v-model=
"item.name"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
@
select=
"handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"出发时间"
>
<el-input
style=
"width: 150px;"
v-model=
"item.departTimeNew"
@
blur=
"onEditorBlur(item)"
placeholder=
"请输入出发时间"
></el-input>
<div>
格式0:0,8:0,8:30
</div>
<!--
<el-time-picker-->
<!--v-model="item.departTime"-->
<!--value-format="HH:mm"-->
<!--format="HH:mm"-->
<!--@change="changeTime(item)"-->
<!--placeholder="任意时间点">-->
<!--
</el-time-picker>
-->
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"排序"
>
<el-input
style=
"width: 150px;"
type=
"number"
min=
"0"
v-model=
"item.rank"
placeholder=
"请输入排序"
></el-input>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteItem(item)"
>
删除
</el-button>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"3"
>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteItem(item)"
>
删除
</el-button></el-col>
-->
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getSonRegionByCodes
,
getRegionByCodes
,
}
from
'api/base_info/region/'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
formatDate
}
from
'utils/dateFormattor'
;
import
{
getAllCompany
,
getAll
}
from
'api/base_info/branch_company/'
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElInput
from
"../../../../node_modules/element-ui/packages/input/src/input.vue"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElFormItem
from
"../../../../node_modules/element-ui/packages/form/src/form-item.vue"
;
import
ElForm
from
"../../../../node_modules/element-ui/packages/form/src/form.vue"
;
export
default
{
props
:
[
"list"
],
name
:
'destinationDialog'
,
components
:
{
ElForm
,
ElFormItem
,
ElCol
,
ElInput
,
ElRow
},
data
()
{
return
{
isVisible
:
false
,
time
:
""
,
lists
:
[],
//新增项
t
:
{},
num
:
0
,
obj
:{}
//新增项
}
},
created
()
{
getAll
()
.
then
(
response
=>
{
this
.
allCompaniesArr
=
response
.
data
;
});
getAllCompany
(
codeAndBranchCompany
=>
{
this
.
allCompanies
=
codeAndBranchCompany
;
});
},
watch
:
{
isVisible
(
newValue
,
oldValue
){
if
(
!
newValue
){
this
.
$emit
(
'departureEvent'
,
false
);
}
},
},
mounted
()
{
let
that
=
this
;
let
arr
=
[];
this
.
list
.
map
(
function
(
item
){
debugger
item
.
h
=
parseInt
(
item
.
departTime
/
3600
);
item
.
s
=
(
item
.
departTime
-
item
.
h
*
3600
)
/
60
;
item
.
departTimeNew
=
item
.
h
+
":"
+
item
.
s
;
item
.
rank
=
item
.
rank
?
item
.
rank
:
0
;
item
.
visible2
=
false
;
arr
.
push
(
item
);
});
this
.
lists
=
arr
;
this
.
isVisible
=
true
;
},
computed
:
{
...
mapGetters
([
'elements'
,
])
},
methods
:
{
deleteHandler
(){},
addTime
(){
this
.
t
=
{
name
:
""
,
rank
:
0
,
departTime
:
28800
,
};
this
.
lists
.
push
(
this
.
t
);
},
/**
* 改变出发时间
* */
onEditorBlur
(
val
){
let
arr
=
val
.
departTimeNew
.
split
(
":"
);
val
.
departTime
=
arr
[
0
]
*
3600
+
arr
[
1
]
*
60
;
console
.
log
(
val
);
},
changeTime
(
val
){
// if(typeof val == "object"){
// let hour = val.departTime.getHours();
// let sec = val.departTime.getMinutes();
// val.departTime = hour*3600+ sec*60;
// console.log(val.departTime);
// }
},
/**
* 删除分公司出发地
* */
deleteItem
(
obj
){
this
.
lists
.
splice
(
this
.
lists
.
indexOf
(
obj
),
1
);
console
.
log
(
obj
);
},
/**
* 确定
* */
okHandler
()
{
let
arr
=
[];
// this.lists.map(function(item){
// // 时间转时间戳
// let hour = item.departTime_new.getHours();
// let sec = item.departTime_new.getMinutes();
// item.departTime = hour*3600+ sec*60;
// });
this
.
$emit
(
'departureEvent'
,
this
.
lists
);
console
.
log
(
this
.
list
)
},
/**
* 弹框-取消
* */
cancel
()
{
this
.
$emit
(
'departureEvent'
,
false
);
},
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
this
.
allCompaniesArr
.
map
(
function
(
item
){
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
selectArry
=
selectArry
;
var
results
=
queryString
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
:
selectArry
;
// 调用 callback 返回建议列表的数据
cb
(
results
);
},
handleSelect
(
item
)
{
this
.
lists
.
splice
(
this
.
lists
.
indexOf
(
item
),
1
);
item
.
departTime
=
28800
;
this
.
lists
.
push
(
item
);
},
createFilter
(
queryString
)
{
return
(
restaurant
)
=>
{
return
(
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
);
};
},
}
}
</
script
>
src/views/tourManage/modal/destinationModal.vue
0 → 100644
View file @
ba46222a
This diff is collapsed.
Click to expand it.
src/views/tourManage/modal/oneTourModal.vue
0 → 100644
View file @
ba46222a
This diff is collapsed.
Click to expand it.
src/views/tourManage/modal/tourLabelModal.vue
0 → 100644
View file @
ba46222a
<
template
>
<el-dialog
title=
"旅游标签"
:visible
.
sync=
"isVisible"
>
<el-checkbox-group
v-model=
"list"
>
<el-checkbox
v-for=
"item in allLabelList"
:key=
"item.id"
:label=
"item.name"
></el-checkbox>
</el-checkbox-group>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler()"
>
确 定
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
[
"allLabelList"
,
"checkList"
],
name
:
'tourLabelModal'
,
data
()
{
return
{
isVisible
:
false
,
list
:
""
,
}
},
created
()
{
},
watch
:
{
isVisible
(
newValue
,
oldValue
){
if
(
!
newValue
){
this
.
$emit
(
'tourLabelEvent'
,
false
);
}
}
},
mounted
()
{
let
that
=
this
;
this
.
list
=
this
.
checkList
;
this
.
isVisible
=
true
;
},
methods
:
{
/**
* 确定
* */
okHandler
()
{
this
.
$emit
(
'tourLabelEvent'
,
this
.
list
);
},
/**
* 弹框-取消
* */
cancel
()
{
this
.
$emit
(
'tourLabelEvent'
,
false
);
},
}
}
</
script
>
src/views/tourManage/modal/tourTime.vue
0 → 100644
View file @
ba46222a
<
template
>
<el-dialog
title=
"活动日期"
:visible
.
sync=
"isVisible"
>
<el-button
size=
"small"
class=
"el-button el-button--primary"
type=
"button"
icon=
"plus"
@
click=
"addTime()"
>
添加
</el-button>
<el-form>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"活动天数"
>
<el-input
style=
"width: 200px;"
v-model=
"num"
type=
"number"
min=
"1"
placeholder=
"请输入活动天数"
@
change=
"changeNum()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
v-for=
"item in list"
style=
"margin: 10px 0;"
:key=
"item.id"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"开始时间"
>
<el-date-picker
v-model=
"item.startTime"
type=
"date"
@
change=
"changeStartTime(item)"
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"结束时间"
>
<el-date-picker
disabled
v-model=
"item.endTime"
type=
"date"
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"库存"
>
<el-input
style=
"width: 150px;"
v-model=
"item.stock"
placeholder=
"请输入库存"
></el-input>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteItem(item)"
>
删除
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getSonRegionByCodes
,
getRegionByCodes
,
}
from
'api/base_info/region/'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
formatDate
}
from
'utils/dateFormattor'
;
import
{
getAllCompany
,
getAll
}
from
'api/base_info/branch_company/'
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElInput
from
"../../../../node_modules/element-ui/packages/input/src/input.vue"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElFormItem
from
"../../../../node_modules/element-ui/packages/form/src/form-item.vue"
;
import
ElForm
from
"../../../../node_modules/element-ui/packages/form/src/form.vue"
;
export
default
{
props
:
[
"list"
,
"number"
],
name
:
'destinationDialog'
,
components
:
{
ElForm
,
ElFormItem
,
ElCol
,
ElInput
,
ElRow
},
data
()
{
return
{
isVisible
:
false
,
time
:
""
,
lists
:
[],
t
:
{},
num
:
0
}
},
created
()
{
},
watch
:
{
isVisible
(
newValue
,
oldValue
){
if
(
!
newValue
){
this
.
$emit
(
'tourDepartTimeEvent'
,
false
);
}
},
},
mounted
()
{
let
that
=
this
;
this
.
num
=
this
.
number
;
this
.
list
.
map
(
function
(
item
){
let
arr
=
[];
arr
.
push
(
item
.
startTime
);
arr
.
push
(
item
.
endTime
);
item
.
visible2
=
false
;
item
.
time
=
arr
;
});
// this.lists = this.list;
this
.
isVisible
=
true
;
},
computed
:
{
...
mapGetters
([
'elements'
,
])
},
methods
:
{
/**
* 删除时间
* */
deleteItem
(
obj
){
this
.
list
.
splice
(
this
.
list
.
indexOf
(
obj
),
1
);
console
.
log
(
obj
);
},
deleteHandler
(){},
addTime
(){
this
.
t
=
{
startTime
:
""
,
endTime
:
""
,
stock
:
0
};
this
.
list
.
push
(
this
.
t
);
},
/**
* 确定
* */
okHandler
()
{
if
(
this
.
num
*
1
<=
0
){
this
.
$notify
({
title
:
'失败'
,
message
:
'活动时间必须大于0'
,
type
:
'warning'
,
duration
:
2000
});
return
false
;
}
let
arr
=
[];
this
.
list
.
map
(
function
(
item
){
let
t
=
{
startTime
:
item
.
startTime
,
endTime
:
item
.
endTime
,
stock
:
item
.
stock
};
arr
.
push
(
t
);
});
let
params
=
{
priceDTOS
:
arr
,
num
:
this
.
num
*
1
};
this
.
$emit
(
'tourDepartTimeEvent'
,
params
);
console
.
log
(
params
)
},
/**
* 弹框-取消
* */
cancel
()
{
this
.
$emit
(
'tourDepartTimeEvent'
,
false
);
},
dateChange1
(
val
)
{
this
.
filters
.
startDate
=
val
;
},
/**
* 改变时间
* */
changeStartTime
(
d
){
if
(
this
.
num
<=
0
){
this
.
$notify
({
title
:
'失败'
,
message
:
'活动时间必须大于0'
,
type
:
'warning'
,
duration
:
2000
});
return
false
;
}
else
{
}
d
.
endTime
=
formatDate
(
new
Date
(
d
.
startTime
.
getTime
()
+
3600
*
1000
*
24
*
this
.
num
),
'yyyy-MM-dd'
);
d
.
startTime
=
formatDate
(
d
.
startTime
,
'yyyy-MM-dd'
);
},
/**
* 改变活动天数-重新计算结束时间
* */
changeNum
(){
console
.
log
(
this
.
num
);
let
that
=
this
;
this
.
num
=
this
.
num
*
1
;
if
(
this
.
num
>
0
){
this
.
list
.
map
(
function
(
item
){
let
t
=
new
Date
(
new
Date
(
item
.
startTime
).
getTime
()
+
3600
*
1000
*
24
*
that
.
num
);
item
.
startTime
=
formatDate
(
new
Date
(
item
.
startTime
),
'yyyy-MM-dd'
);
item
.
endTime
=
formatDate
(
t
,
'yyyy-MM-dd'
);
});
console
.
log
(
this
.
list
);
}
}
}
}
</
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