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
ed66af1f
Commit
ed66af1f
authored
Oct 17, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform-ui
into base-modify
parents
c3392610
37817dfe
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
991 additions
and
805 deletions
+991
-805
dev.env.js
config/dev.env.js
+1
-1
index.js
src/api/admin/userManagement/index.js
+18
-1
activity.js
src/api/summit/activity.js
+7
-0
index.vue
src/views/order/rentVehicleInfo/index.vue
+2
-1
index.vue
src/views/summit/index.vue
+293
-282
reviewPopup.vue
src/views/summit/model/reviewPopup.vue
+71
-37
summitPopup.vue
src/views/summit/model/summitPopup.vue
+39
-32
employeesInput.vue
src/views/userManagement/employeesInput.vue
+555
-446
index.vue
src/views/vehicle/vehicleInfo/index.vue
+5
-5
No files found.
config/dev.env.js
View file @
ed66af1f
module
.
exports
=
{
NODE_ENV
:
'"development"'
,
BASE_API
:
'"https://xxtest.upyuns.com"'
,
//'"https://dev.dfangche.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
BASE_API
:
'"https://xxtest.upyuns.com"'
,
//'"https://
xxtest.upyuns.com"',//'"https://
dev.dfangche.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
APP_ORIGIN
:
'"https://wallstreetcn.com"'
}
src/api/admin/userManagement/index.js
View file @
ed66af1f
...
...
@@ -99,15 +99,32 @@ export function postions(obj) {
});
}
// 身份列表
export
function
jobs
(
obj
)
{
return
fetch
({
url
:
'/api/admin/postion/admin/jobs'
,
method
:
'get'
,
data
:
obj
});
}
// 添加员工
export
function
addEditor
(
obj
)
{
return
fetch
({
url
:
'/api/admin/postion/admin/add'
,
url
:
'/api/admin/postion/admin/add
UserPostion
'
,
method
:
'post'
,
data
:
obj
});
}
// 编辑员工
export
function
editorUpd
(
obj
)
{
return
fetch
({
url
:
'/api/admin/postion/admin/updUserPostion'
,
method
:
'post'
,
data
:
obj
});
}
//删除员工
export
function
deleteStaffs
(
id
)
{
return
fetch
({
...
...
src/api/summit/activity.js
View file @
ed66af1f
...
...
@@ -39,3 +39,10 @@ export function activityIds() {
method
:
'get'
})
}
export
function
remove
(
id
)
{
return
fetch
({
url
:
'/api/summit/activity/remove/'
+
id
,
method
:
'delete'
})
}
\ No newline at end of file
src/views/order/rentVehicleInfo/index.vue
View file @
ed66af1f
...
...
@@ -398,8 +398,9 @@
<span
class=
"label-text"
>
拍照取证*:
</span>
<br
/>
<img
v-for=
"
item
in otherImg"
v-for=
"
(item,index)
in otherImg"
:src=
"item"
:key=
"index"
style=
"width: 100px; height: 100px;margin-left:110px;"
/>
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
...
...
src/views/summit/index.vue
View file @
ed66af1f
...
...
@@ -17,12 +17,7 @@
</el-form-item>
<el-form-item
label=
"峰会状态"
>
<el-select
class=
"filter-item"
v-model=
"query.status"
placeholder=
"状态"
>
<el-option
v-for=
"(val,index) in status"
:key=
"index"
:label=
"val.name"
:value=
"val.id"
></el-option>
<el-option
v-for=
"(val,index) in status"
:key=
"index"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
</el-row>
...
...
@@ -84,7 +79,7 @@
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"applyPage(scope.row)"
>
报名页面
</el-button>
-->
>
报名页面
</el-button>
-->
<el-button
class=
"el-button el-button--text el-button--small"
size=
"small"
...
...
@@ -128,44 +123,40 @@
:enrollRow=
"enrollRow"
v-on:enrollDialogEvent=
"enrollDialogEvent"
/>
<reviewPopup
v-if=
"reviewShow"
:reviewRow=
"reviewRow"
v-on:reviewDialogEvent=
"reviewDialogEvent"
/>
<reviewPopup
v-if=
"reviewShow"
:reviewRow=
"reviewRow"
v-on:reviewDialogEvent=
"reviewDialogEvent"
/>
<!-- <applyPage :applyInfo='applyInfo'></applyPage> -->
</div>
</template>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
import
{
timestamp2Date
}
from
"src/utils/dateUtils"
;
import
{
page
,
update
}
from
"src/api/summit/activity"
;
import
summitPopup
from
"src/views/summit/model/summitPopup"
;
import
enrollDataPopup
from
"src/views/summit/model/enrollDataPopup"
;
import
reviewPopup
from
"src/views/summit/model/reviewPopup"
;
import
{
mapGetters
}
from
'vuex'
import
{
timestamp2Date
}
from
'src/utils/dateUtils'
import
{
page
,
update
,
remove
}
from
'src/api/summit/activity'
import
summitPopup
from
'src/views/summit/model/summitPopup'
import
enrollDataPopup
from
'src/views/summit/model/enrollDataPopup'
import
reviewPopup
from
'src/views/summit/model/reviewPopup'
// import applyPage from "src/views/summit/model/applyPage";
import
{
getToken
}
from
"src/utils/auth"
;
import
{
getToken
}
from
'src/utils/auth'
export
default
{
name
:
"summitList"
,
name
:
'summitList'
,
components
:
{
summitPopup
,
enrollDataPopup
,
reviewPopup
,
reviewPopup
// applyPage
},
data
()
{
return
{
applyInfo
:
{
dialogVisible
:
false
,
applyInfo
:
{
dialogVisible
:
false
},
query
:
{
page
:
1
,
limit
:
10
,
title
:
""
,
startTime
:
""
,
title
:
''
,
startTime
:
''
,
status
:
undefined
,
type
:
1
},
...
...
@@ -173,15 +164,15 @@ export default {
list
:
[],
listLoading
:
true
,
status
:
[
{
id
:
0
,
name
:
"全部"
},
{
id
:
1
,
name
:
"报名中"
},
{
id
:
2
,
name
:
"进行中"
},
{
id
:
3
,
name
:
"已结束"
}
{
id
:
0
,
name
:
'全部'
},
{
id
:
1
,
name
:
'报名中'
},
{
id
:
2
,
name
:
'进行中'
},
{
id
:
3
,
name
:
'已结束'
}
],
total
:
0
,
inline
:
true
,
popupShow
:
false
,
titleNme
:
"创建峰会"
,
titleNme
:
'创建峰会'
,
popupRow
:
undefined
,
enrollRow
:
undefined
,
enrollShow
:
false
,
...
...
@@ -189,21 +180,21 @@ export default {
reviewShow
:
false
,
statusNameList
:
{
1
:
"默认"
,
2
:
"报名中"
,
3
:
"进行中"
,
4
:
"已结束"
1
:
'默认'
,
2
:
'报名中'
,
3
:
'进行中'
,
4
:
'已结束'
}
}
};
},
created
()
{
this
.
getList
();
this
.
getList
()
},
computed
:
{
...
mapGetters
([
"elements"
]),
...
mapGetters
([
'elements'
]),
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()
};
return
{
Authorization
:
getToken
()
}
}
},
methods
:
{
...
...
@@ -212,86 +203,106 @@ export default {
// this.applyInfo.dialogVisible = true;
// },
getList
()
{
this
.
listLoading
=
true
;
this
.
listLoading
=
true
page
(
this
.
query
).
then
(
res
=>
{
this
.
list
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
});
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
})
setTimeout
(()
=>
{
this
.
listLoading
=
false
;
},
500
);
this
.
listLoading
=
false
},
500
)
},
changeTime
(
val
)
{
!!
val
?
(
this
.
query
.
startTime
=
Date
.
now
(
val
))
:
this
.
query
.
startTime
==
""
;
:
this
.
query
.
startTime
==
''
},
handleFilter
()
{
this
.
getList
();
this
.
getList
()
},
viewDetails
(
row
)
{
update
(
row
).
then
(
res
=>
{
if
(
res
.
rel
)
{
this
.
$notify
.
success
({
title
:
"编辑成功"
,
title
:
'编辑成功'
,
message
:
`success`
});
this
.
getList
();
})
this
.
getList
()
}
else
{
this
.
$notify
.
warning
({
title
:
"编辑失败"
,
title
:
'编辑失败'
,
message
:
`failed`
});
})
}
});
})
},
handleSizeChange
(
val
)
{
this
.
query
.
limit
=
val
;
this
.
getList
();
this
.
query
.
limit
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
query
.
page
=
val
;
this
.
getList
();
this
.
query
.
page
=
val
this
.
getList
()
},
timestamp2Date
(
timeStamp
)
{
return
timestamp2Date
(
timeStamp
);
return
timestamp2Date
(
timeStamp
)
},
enrollData
(
row
)
{
this
.
enrollRow
=
row
;
this
.
enrollShow
=
true
;
this
.
enrollRow
=
row
this
.
enrollShow
=
true
},
edit
(
row
)
{
// debugger;
this
.
popupRow
=
row
;
this
.
titleNme
=
"编辑峰会"
;
this
.
popupShow
=
true
;
this
.
popupRow
=
row
this
.
titleNme
=
'编辑峰会'
this
.
popupShow
=
true
},
createSummit
()
{
this
.
popupRow
=
{};
this
.
titleNme
=
"创建峰会"
;
this
.
popupShow
=
true
;
this
.
popupRow
=
{}
this
.
titleNme
=
'创建峰会'
this
.
popupShow
=
true
},
review
(
row
)
{
this
.
reviewRow
=
row
;
this
.
reviewShow
=
true
;
console
.
log
(
this
.
reviewRow
);
this
.
reviewRow
=
row
this
.
reviewShow
=
true
},
deleteSummit
(
row
)
{
this
.
$confirm
(
'此操作将删除该峰会, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
remove
(
row
.
id
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
data
.
message
})
}
})
})
},
deleteSummit
()
{},
getStatusName
(
status
)
{
return
status
+
1
?
this
.
statusNameList
[
status
+
1
]
:
""
;
return
status
+
1
?
this
.
statusNameList
[
status
+
1
]
:
''
},
summitDialogEvent
(
e
)
{
this
.
popupShow
=
false
;
this
.
popupShow
=
false
if
(
e
)
{
this
.
getList
();
this
.
getList
()
}
},
enrollDialogEvent
(
e
)
{
this
.
enrollShow
=
false
;
this
.
enrollShow
=
false
},
reviewDialogEvent
(
e
)
{
this
.
reviewShow
=
false
;
this
.
reviewShow
=
false
}
}
}
;
}
</
script
>
src/views/summit/model/reviewPopup.vue
View file @
ed66af1f
...
...
@@ -41,7 +41,7 @@
list-type=
"picture-card"
:file-list=
"list"
:on-success=
"handlePictureCardPreview"
:on-remove=
"handleRemove"
:on-remove=
"handleRemove
Zip
"
:before-upload=
"beforeAvatarUpload"
>
<i
class=
"el-icon-plus"
></i>
...
...
@@ -64,11 +64,11 @@
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
<video
<
!--
<
video
v-if=
"$utils.isString(form.videoPath) && !$utils.isEmpty(form.videoPath) && !imgFlag"
:src=
"form.videoPath"
style=
"width:300px;max-height:300px;"
/>
/>
-->
<!--
<i
v-else-if=
"!imgFlag"
class=
"el-icon-plus avatar-uploader-icon"
...
...
@@ -78,8 +78,8 @@
</el-col>
<el-col>
<el-form-item>
<el-button
class=
"button"
type=
"primary"
@
click=
"cre"
>
确 定
</el-button>
<el-button
class=
"button"
@
click=
"cancelHandel"
>
取 消
</el-button>
<!--
<el-button
class=
"button"
type=
"primary"
@
click=
"cre"
>
确 定
</el-button>
-->
</el-form-item>
</el-col>
</el-row>
...
...
@@ -117,12 +117,14 @@ export default {
imgFlag
:
false
,
BASE_API
:
process
.
env
.
BASE_API
,
percent
:
0
,
//上传进度
list
:
[],
list
:
[],
//压缩包
oldList
:
''
,
oldVadio
:
''
,
vadio
:
[],
//视频
activeId
:
''
,
//峰会id
form
:
{
id
:
undefined
,
banner
:
undefined
,
activityId
:
undefined
,
banner
:
undefined
,
videoPath
:
undefined
,
picturePath
:
undefined
}
...
...
@@ -151,44 +153,74 @@ export default {
// },
mounted
()
{
this
.
getOrderInfo
()
console
.
log
(
this
.
reviewRow
)
},
methods
:
{
vidioSuccess
(
res
)
{
vidioSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
status
==
200
)
{
this
.
$notify
({
title
:
'提示'
,
message
:
res
.
message
,
type
:
'success'
,
duration
:
2000
})
this
.
vadio
=
fileList
}
},
beforeAvatarUpload
(
file
)
{
// const zip = file.type === 'application/zip'
// if (!zip) {
// this.$message.error('上传头像图片只能是 zip 格式!')
// }
// return zip
var
index
=
file
.
name
.
lastIndexOf
(
'.'
)
var
ext
=
file
.
name
.
substr
(
index
+
1
)
if
(
ext
!=
'zip'
)
{
this
.
$message
.
error
(
'上传压缩包只能是 zip 格式!'
)
return
false
}
return
true
},
videoUpload
(
file
)
{
console
.
log
(
file
.
type
)
const
isJPG
=
file
.
type
===
'video/mp4'
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传
头像图片
只能是 mp4 格式!'
)
this
.
$message
.
error
(
'上传
压缩包
只能是 mp4 格式!'
)
}
return
isJPG
},
getOrderInfo
()
{
console
.
log
(
this
.
reviewRow
.
id
)
one
(
this
.
reviewRow
.
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
activeId
=
res
.
data
.
id
//峰会id
this
.
oldList
=
res
.
data
.
picturePath
||
''
//压缩包
this
.
oldVadio
=
res
.
data
.
videoPath
||
''
//视频
this
.
dialogVisible
=
true
this
.
imgDialogVisible
=
true
})
},
cre
()
{
console
.
log
(
this
.
form
.
picturePath
)
save
(
this
.
form
).
then
(
res
=>
{
let
zipPic
=
[]
this
.
list
.
forEach
(
element
=>
{
zipPic
.
push
(
element
.
response
.
data
)
})
let
mp4Vadio
=
[]
this
.
vadio
.
forEach
(
element
=>
{
mp4Vadio
.
push
(
element
.
response
.
data
)
})
let
params
=
{
id
:
this
.
activeId
,
//回顾id
banner
:
this
.
form
.
banner
,
activityId
:
this
.
reviewRow
.
id
,
//峰会id
videoPath
:
this
.
oldVadio
?
mp4Vadio
==
''
?
this
.
oldVadio
:
mp4Vadio
.
join
(
','
)
+
','
+
this
.
oldVadio
:
mp4Vadio
.
join
(
','
),
picturePath
:
this
.
oldList
?
zipPic
==
''
?
this
.
oldList
:
zipPic
.
join
(
','
)
+
','
+
this
.
oldList
:
zipPic
.
join
(
','
)
}
// console.log(params);
save
(
params
).
then
(
res
=>
{
this
.
responseResult
(
res
)
})
},
...
...
@@ -241,20 +273,22 @@ export default {
this
.
form
.
videoPath
=
file
.
data
this
.
imgDialogVisible
=
true
},
handleRemoveZip
(
file
,
fileList
)
{
this
.
list
=
fileList
},
handleRemove
(
file
,
fileList
)
{
// console.log(file)
console
.
log
(
file
,
fileList
)
this
.
vadio
=
fileList
},
handlePictureCardPreview
(
res
,
file
)
{
handlePictureCardPreview
(
res
,
file
,
fileList
)
{
if
(
res
.
status
==
200
)
{
this
.
$notify
({
title
:
'提示'
,
message
:
res
.
message
,
type
:
'success'
,
duration
:
2000
message
:
'上传成功'
,
type
:
'success'
})
this
.
list
.
push
({
url
:
res
.
data
})
// this.imgDialogVisible = true;
this
.
list
=
fileList
}
},
cleanForm
()
{
this
.
form
=
{
...
...
src/views/summit/model/summitPopup.vue
View file @
ed66af1f
...
...
@@ -105,12 +105,7 @@
<el-form-item
label=
"活动id:"
>
<!--
<el-input
v-model=
"form.rid"
placeholder=
"请输入签到/抽奖活动的id"
></el-input>
-->
<el-select
v-model=
"form.rid"
placeholder=
"请选择签到/抽奖活动id"
>
<el-option
v-for=
"(item,index) in optionsId"
:key=
"index"
:label=
"item"
:value=
"item"
></el-option>
<el-option
v-for=
"(item,index) in optionsId"
:key=
"index"
:label=
"item"
:value=
"item"
></el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -151,20 +146,16 @@
<div>
<el-row>
<el-col>
<el-form-item
label=
"房车介绍:"
>
<el-form-item
label=
"房车介绍:"
style=
"margin-top:20px"
>
<el-upload
class=
"upload-demo"
:headers=
"getHeaderWithToken"
:action=
"BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:on-remove=
"handleRemove
"
list-type=
"picture-card
"
:file-list=
"fileList2"
:on-success=
"handleBannerSuccess"
list-type=
"picture"
:on-remove=
"handleRemove"
:headers=
"getHeaderWithToken"
>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<span
style=
"color: red;"
>
建议尺寸:1080*644px
</span>
</div>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
<el-form-item
label=
"峰会流程:"
>
...
...
@@ -205,8 +196,8 @@
<el-row>
<el-col>
<el-button
class=
"button"
@
click=
"cancelHandel"
>
取 消
</el-button>
<el-button
class=
"button"
type=
"primary"
v-if=
"titleNme=='创建峰会'"
@
click=
"create('form')"
>
确
定
</el-button>
<el-button
class=
"button"
type=
"primary"
v-if=
"titleNme=='编辑峰会'"
@
click=
"update1()"
>
确
定
</el-button>
<el-button
class=
"button"
type=
"primary"
v-if=
"titleNme=='创建峰会'"
@
click=
"create('form')"
>
确定
</el-button>
<el-button
class=
"button"
type=
"primary"
v-if=
"titleNme=='编辑峰会'"
@
click=
"update1()"
>
确定
</el-button>
</el-col>
</el-row>
</el-form>
...
...
@@ -287,7 +278,7 @@ export default {
created
()
{
activityIds
().
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
optionsId
=
data
.
data
;
this
.
optionsId
=
data
.
data
}
})
},
...
...
@@ -306,11 +297,14 @@ export default {
}
},
methods
:
{
handleBannerSuccess
(
res
,
file
)
{
this
.
fileList2
.
push
({
url
:
res
.
data
})
this
.
form
.
vehicleImgs
=
this
.
fileList2
handleBannerSuccess
(
res
,
file
,
fileList
)
{
console
.
log
(
fileList
);
this
.
fileList2
=
fileList
// this.form.vehicleImgs = this.fileList2
},
handleRemove
(
res
,
file
,
fileList
)
{
this
.
fileList2
=
file
},
handleRemove
()
{},
getOrderInfo
()
{
this
.
title
=
this
.
titleNme
if
(
this
.
title
===
'编辑峰会'
)
{
...
...
@@ -384,7 +378,7 @@ export default {
},
getState
(
status
)
{
if
(
this
.
$utils
.
isInteger
(
status
))
{
console
.
log
(
status
)
;
console
.
log
(
status
)
if
(
status
==
0
)
{
return
'默认'
}
else
{
...
...
@@ -450,10 +444,17 @@ export default {
?
(
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
)
:
(
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
.
getTime
())
let
pic
=
[]
if
(
!!
this
.
form
.
vehicleImgs
)
{
this
.
form
.
vehicleImgs
.
forEach
(
element
=>
{
pic
.
push
(
element
.
url
)
})
if
(
this
.
fileList2
!=
''
)
{
console
.
log
(
this
.
fileList2
);
this
.
fileList2
.
forEach
(
element
=>
{
if
(
!!
element
.
response
)
{
pic
.
push
(
element
.
response
.
data
)
}
else
{
pic
.
push
(
element
.
url
);
}
});
console
.
log
(
pic
);
this
.
form
.
vehicleImgs
=
pic
.
join
(
','
)
}
...
...
@@ -501,12 +502,18 @@ export default {
this
.
form
.
startTime
=
this
.
form
.
startTime
.
getTime
()
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
.
getTime
()
let
pic
=
[]
if
(
!!
this
.
form
.
vehicleImgs
)
{
this
.
f
orm
.
vehicleImgs
.
forEach
(
element
=>
{
pic
.
push
(
element
.
url
)
})
if
(
this
.
fileList2
!=
''
)
{
this
.
f
ileList2
.
forEach
(
element
=>
{
pic
.
push
(
element
.
response
.
data
);
})
;
this
.
form
.
vehicleImgs
=
pic
.
join
(
','
)
}
// if (!!this.form.vehicleImgs) {
// this.form.vehicleImgs.forEach(element => {
// pic.push(element.url)
// })
// this.form.vehicleImgs = pic.join(',')
// }
this
.
dataProcessing
()
add
(
this
.
form
).
then
(
res
=>
{
this
.
responseResult
(
res
)
...
...
@@ -516,7 +523,7 @@ export default {
dataProcessing
()
{
if
(
this
.
form
.
state
===
'默认'
)
{
this
.
form
.
status
=
'0'
}
else
{
}
else
{
this
.
form
.
status
=
this
.
statusRadio
}
this
.
form
.
processJson
=
JSON
.
stringify
(
this
.
processJson
)
...
...
src/views/userManagement/employeesInput.vue
View file @
ed66af1f
...
...
@@ -28,16 +28,32 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"分公司"
>
<el-autocomplete
class=
"inline-input"
v-model=
"listQuery.companyName"
:fetch-suggestions=
"querySearch"
placeholder=
"请选择分公司"
@
select=
"handleSelectPark"
clearable
></el-autocomplete>
<!--
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选分公司"
>
<el-option
:key=
"undefined"
label=
"全部"
:value=
"undefined"
></el-option>
<el-option
v-for=
"(item,index) in companyList "
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
-->
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"delete"
@
click=
"cleaningQuery"
>
清除搜索条件
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"delete"
@
click=
"cleaningQuery"
>
清除搜索条件
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
@
click=
"addStaff"
>
新增员工
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
@
click=
"toLoad"
>
批量导入员工
</el-button>
...
...
@@ -53,6 +69,8 @@
>
<el-table-column
prop=
"name"
label=
"姓名"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"phone"
label=
"手机号"
align=
"center"
></el-table-column>
<el-table-column
prop=
"jobName"
label=
"职位"
align=
"center"
></el-table-column>
<el-table-column
prop=
"companyName"
label=
"所属公司"
align=
"center"
></el-table-column>
<el-table-column
prop=
"positionName"
label=
"身份"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
align=
"center"
>
<template
scope=
"scope"
>
...
...
@@ -90,12 +108,7 @@
></el-pagination>
<!-- 新增编辑员工 -->
<el-dialog
:title=
"staffTitle"
:visible
.
sync=
"bulkUploadMember"
class=
"member"
@
close=
"closeAdd"
>
<el-dialog
:title=
"staffTitle"
:visible
.
sync=
"bulkUploadMember"
class=
"member"
@
close=
"closeAdd"
>
<el-form
:model=
"staffTitleFrom"
ref=
"userMembership"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"员工姓名"
>
<el-input
v-model
.
number=
"staffTitleFrom.name"
placeholder=
"请输入姓名"
></el-input>
...
...
@@ -119,6 +132,34 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"员工职位"
>
<el-select
class=
"filter-item"
v-model=
"staffTitleFrom.jobId"
placeholder=
"请选择员工身份"
style=
"width:100%"
>
<el-option
:key=
"undefined"
label=
"全部"
:value=
"undefined"
></el-option>
<el-option
v-for=
"(item,index) in jobsList "
:key=
"index"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"分公司"
>
<el-autocomplete
class=
"inline-input"
v-model=
"staffTitleFrom.companyName"
:fetch-suggestions=
"querySearch"
placeholder=
"请选择分公司"
style=
"width:100%"
@
select=
"handleSelectParks"
></el-autocomplete>
</el-form-item>
<div
style=
"text-align:center"
>
<el-button
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"bulkUploadMember = false"
>
取消
</el-button>
...
...
@@ -131,10 +172,7 @@
<el-form
:model=
"fileForm"
>
<el-form-item
label=
"上传文件"
label-width=
"80px"
>
<el-button
type=
"primary"
icon=
"el-icon-download"
>
<a
class=
"el-icon-download"
href=
"https://mgmt.dfangche.com/axshare/userposition.xlsx"
>
下载模板
</a>
<a
class=
"el-icon-download"
href=
"https://mgmt.dfangche.com/axshare/userposition.xlsx"
>
下载模板
</a>
</el-button>
<el-upload
...
...
@@ -157,12 +195,7 @@
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xlsx(Excel2007以上版本)文件,且不超过10M
</div>
</el-upload>
<el-button
size=
"small"
class=
"filter-item"
type=
"primary"
@
click=
"cancelNotDeleteForm"
>
取消
</el-button>
<el-button
size=
"small"
class=
"filter-item"
type=
"primary"
@
click=
"cancelNotDeleteForm"
>
取消
</el-button>
</el-form-item>
</el-form>
</el-dialog>
...
...
@@ -193,48 +226,56 @@ import {
staffList
,
postions
,
addEditor
,
deleteStaffs
}
from
"src/api/admin/userManagement/index"
;
import
{
getToken
}
from
"src/utils/auth"
;
import
{
mapGetters
}
from
"vuex"
;
import
{
staffImport
}
from
"src/api/admin/UserMember/index"
;
deleteStaffs
,
jobs
,
editorUpd
}
from
'src/api/admin/userManagement/index'
import
{
getToken
}
from
'src/utils/auth'
import
{
mapGetters
}
from
'vuex'
import
{
staffImport
}
from
'src/api/admin/UserMember/index'
import
{
getAll
}
from
'api/base_info/branch_company'
export
default
{
created
()
{
this
.
getList
();
this
.
postionsFn
();
this
.
getList
()
this
.
postionsFn
()
this
.
getAllFn
()
this
.
jobsFn
()
},
computed
:
{
...
mapGetters
([
"elements"
]),
...
mapGetters
([
'elements'
]),
/**
* 获取token
*/
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()
};
return
{
Authorization
:
getToken
()
}
}
},
data
()
{
return
{
activeId
:
""
,
jobsList
:
[],
activeId
:
''
,
uploadListHiut
:
{
uploadList
:
[],
success
:
""
,
error
:
""
success
:
''
,
error
:
''
},
companyList
:
[],
uploadHiut
:
false
,
fileList
:
[],
BASE_API
:
process
.
env
.
BASE_API
,
limitNum
:
1
,
fileForm
:
{
file
:
""
file
:
''
},
tolead
:
false
,
listQuery
:
{
name
:
""
,
phone
:
""
,
name
:
''
,
phone
:
''
,
status
:
null
,
page
:
1
,
limit
:
10
limit
:
10
,
companyId
:
''
,
companyName
:
''
},
total
:
null
,
tableKey
:
0
,
...
...
@@ -242,48 +283,90 @@ export default {
listLoading
:
true
,
statusList
:
[
{
label
:
"未核销"
,
value
:
"0"
label
:
'未核销'
,
value
:
'0'
},
{
label
:
"已核销"
,
value
:
"1"
label
:
'已核销'
,
value
:
'1'
}
],
postionsList
:
[],
staffTitle
:
"新增员工"
,
staffTitle
:
'新增员工'
,
bulkUploadMember
:
false
,
staffTitleFrom
:
{
phone
:
""
,
name
:
""
,
positionId
:
""
phone
:
''
,
name
:
''
,
positionId
:
''
,
jobId
:
''
,
companyId
:
''
,
companyName
:
''
},
rules
:
{}
};
}
},
methods
:
{
handleSelectPark
(
item
)
{
this
.
listQuery
.
companyId
=
item
.
id
},
handleSelectParks
(
item
)
{
this
.
staffTitleFrom
.
companyId
=
item
.
id
this
.
staffTitleFrom
.
companyName
=
item
.
name
},
createFilter
(
queryString
)
{
return
restaurant
=>
{
return
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
}
},
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[]
this
.
companyList
.
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
)
},
//分公司
getAllFn
()
{
getAll
().
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
companyList
=
data
.
data
;
this
.
companyList
.
unshift
({
name
:
'全部'
,
id
:
''
})
console
.
log
(
this
.
companyList
);
}
})
},
//新增,编辑员工弹窗关闭
closeAdd
()
{
this
.
staffTitleFrom
=
{
phone
:
""
,
name
:
""
,
positionId
:
""
};
phone
:
''
,
name
:
''
,
positionId
:
''
,
jobId
:
''
,
companyId
:
''
,
companyName
:
''
}
},
upLoad
(
file
)
{
var
form
=
new
FormData
();
var
form
=
new
FormData
()
// 文件对象
form
.
append
(
"file"
,
file
.
file
);
form
.
append
(
'file'
,
file
.
file
)
staffImport
(
form
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
uploadHiut
=
true
;
(
this
.
uploadListHiut
=
{
console
.
log
(
res
)
this
.
uploadHiut
=
true
;
(
this
.
uploadListHiut
=
{
uploadList
:
res
.
data
.
data
,
success
:
res
.
data
.
success
,
error
:
res
.
data
.
error
}),
this
.
getList
();
});
this
.
getList
()
})
},
//excel上传
handleRemove
(
file
,
fileList
)
{
...
...
@@ -293,22 +376,22 @@ export default {
//console.log(file);
},
beforeRemove
(
file
,
fileList
)
{
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
);
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
)
},
// 文件超出个数限制时的钩子
exceedFile
(
files
,
fileList
)
{
this
.
$notify
.
warning
({
title
:
"警告"
,
title
:
'警告'
,
message
:
`只能选择
${
this
.
limitNum
}
个文件,当前共选择了
${
files
.
length
+
fileList
.
length
}
个`
});
})
},
// 文件状态改变时的钩子
fileChange
(
file
,
fileList
)
{
//console.log("change");
//console.log(file);
this
.
fileForm
.
file
=
file
.
raw
;
this
.
fileForm
.
file
=
file
.
raw
//console.log(this.fileForm.file);
// console.log(fileList);
},
...
...
@@ -316,134 +399,152 @@ export default {
beforeUploadFile
(
file
)
{
//console.log("before upload");
//console.log(file);
let
extension
=
file
.
name
.
substring
(
file
.
name
.
lastIndexOf
(
"."
)
+
1
);
let
size
=
file
.
size
/
1024
/
1024
;
if
(
extension
!==
"xlsx"
)
{
let
extension
=
file
.
name
.
substring
(
file
.
name
.
lastIndexOf
(
'.'
)
+
1
)
let
size
=
file
.
size
/
1024
/
1024
if
(
extension
!==
'xlsx'
)
{
this
.
$notify
.
warning
({
title
:
"警告"
,
title
:
'警告'
,
message
:
`只能上传Excel 2007以上版本(即后缀是.xlsx)的文件`
});
})
}
if
(
size
>
10
)
{
this
.
$notify
.
warning
({
title
:
"警告"
,
title
:
'警告'
,
message
:
`文件大小不得超过10M`
});
})
}
},
cancelNotDeleteForm
()
{
this
.
tolead
=
false
;
this
.
$refs
.
uploadExcel
.
clearFiles
();
this
.
tolead
=
false
this
.
$refs
.
uploadExcel
.
clearFiles
()
},
//员工列表
getList
()
{
staffList
(
this
.
listQuery
).
then
(
data
=>
{
this
.
listLoading
=
true
;
this
.
listLoading
=
true
if
(
data
.
status
==
200
)
{
console
.
log
(
data
);
this
.
list
=
data
.
data
.
data
;
this
.
total
=
data
.
data
.
totalCount
;
this
.
listLoading
=
false
;
console
.
log
(
data
)
this
.
list
=
data
.
data
.
data
this
.
total
=
data
.
data
.
totalCount
this
.
listLoading
=
false
}
});
})
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
this
.
listQuery
.
limit
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
this
.
listQuery
.
page
=
val
this
.
getList
()
},
//搜索
handleFilter
()
{
this
.
getList
();
this
.
getList
()
},
//清空搜索条件
cleaningQuery
()
{
this
.
listQuery
.
page
=
1
;
this
.
listQuery
.
limit
=
10
;
this
.
listQuery
.
name
=
""
;
this
.
listQuery
.
phone
=
""
;
this
.
listQuery
.
status
=
""
;
this
.
getList
();
this
.
listQuery
.
page
=
1
this
.
listQuery
.
limit
=
10
this
.
listQuery
.
name
=
''
this
.
listQuery
.
phone
=
''
this
.
listQuery
.
status
=
''
this
.
listQuery
.
companyId
=
''
this
.
listQuery
.
companyName
=
''
this
.
getList
()
},
//新增员工
addStaff
()
{
this
.
staffTitle
==
"新增员工"
this
.
bulkUploadMember
=
true
;
this
.
staffTitle
=
'新增员工'
this
.
bulkUploadMember
=
true
},
//批量导入员工
toLoad
()
{
this
.
tolead
=
true
;
this
.
tolead
=
true
},
//编辑员工
editorStaff
(
row
)
{
this
.
activeId
=
row
.
id
;
this
.
staffTitle
=
"编辑员工"
;
this
.
bulkUploadMember
=
true
;
this
.
activeId
=
row
.
id
this
.
staffTitle
=
'编辑员工'
this
.
bulkUploadMember
=
true
this
.
staffTitleFrom
=
{
phone
:
row
.
phone
,
name
:
row
.
name
,
positionId
:
row
.
positionId
};
positionId
:
row
.
positionId
,
companyId
:
row
.
companyId
,
companyName
:
row
.
companyName
,
}
},
//删除员工
deleteStaff
(
row
)
{
this
.
$confirm
(
"确定删除吗?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
this
.
$confirm
(
'确定删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteStaffs
(
row
.
id
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"删除成功"
,
type
:
"success"
,
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
})
this
.
getList
()
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
"删除失败"
,
type
:
"failed"
,
title
:
'失败'
,
message
:
'删除失败'
,
type
:
'failed'
,
duration
:
2000
});
})
}
});
});
})
})
},
//确定
confirm
(
formName
)
{
if
(
this
.
staffTitle
==
"新增员工"
)
{
if
(
this
.
staffTitle
==
'新增员工'
)
{
addEditor
(
this
.
staffTitleFrom
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"新增成功"
,
type
:
"success"
,
title
:
'成功'
,
message
:
'新增成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
bulkUploadMember
=
false
;
this
.
getList
();
})
this
.
bulkUploadMember
=
false
this
.
getList
()
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
data
.
message
,
type
:
'failed'
,
duration
:
2000
})
}
});
})
}
else
{
this
.
staffTitleFrom
.
id
=
this
.
activeId
;
addEditor
(
this
.
staffTitleFrom
).
then
(
data
=>
{
this
.
staffTitleFrom
.
id
=
this
.
activeId
editorUpd
(
this
.
staffTitleFrom
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"编辑成功"
,
type
:
"success"
,
title
:
'成功'
,
message
:
'编辑成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
bulkUploadMember
=
false
;
this
.
getList
();
})
this
.
bulkUploadMember
=
false
this
.
getList
()
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
data
.
message
,
type
:
'failed'
,
duration
:
2000
})
}
});
})
}
},
//身份列表
...
...
@@ -451,15 +552,23 @@ export default {
postions
().
then
(
data
=>
{
//console.log(data);
if
(
data
.
status
==
200
)
{
this
.
postionsList
=
data
.
data
;
this
.
postionsList
=
data
.
data
}
})
},
jobsFn
()
{
jobs
().
then
(
data
=>
{
//console.log(data);
if
(
data
.
status
==
200
)
{
this
.
jobsList
=
data
.
data
}
});
})
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
this
.
$refs
[
formName
].
resetFields
()
}
}
}
;
}
</
script
>
<
style
>
.member
.el-dialog--small
{
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
ed66af1f
...
...
@@ -1541,11 +1541,11 @@
},
queryVehicleModelSearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
let
iitem
=
{
value
:
"全部"
,
name
:
"全部"
};
selectArry
.
push
(
iitem
);
//
let iitem = {
//
value: "全部",
//
name: "全部"
//
};
//
selectArry.push(iitem);
this
.
allVehicleList
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
...
...
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