Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
office-web
Overview
Overview
Details
Activity
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
office
office-web
Commits
0cd5fdc5
Commit
0cd5fdc5
authored
Jan 04, 2019
by
xiaohai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stay up
parent
9ca12d8b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
570 additions
and
43 deletions
+570
-43
employeeList.vue
src/components/contacts/share/employeeList.vue
+111
-0
storeView.vue
src/components/contacts/storeFrame/storeView.vue
+9
-1
index.js
src/router/index.js
+5
-0
administrativeFrame.vue
src/views/contacts/administrativeFrame.vue
+1
-1
employeeIo.vue
src/views/contacts/employeeIo.vue
+108
-38
shareContact.vue
src/views/contacts/shareContact.vue
+2
-2
storeFrame.vue
src/views/contacts/storeFrame.vue
+2
-1
storeIo.vue
src/views/contacts/storeIo.vue
+332
-0
No files found.
src/components/contacts/share/employeeList.vue
0 → 100644
View file @
0cd5fdc5
<
template
>
<div
class=
"employee-table"
>
<el-table
height=
"495"
@
selection-change=
"selectMember"
@
row-click=
"linkToDetail"
:data=
"tableData"
>
<template
v-for=
"prop in headList"
>
<el-table-column
:key=
"prop"
v-if=
"prop == 'selection'"
type=
"selection"
width=
"42"
>
</el-table-column>
<el-table-column
:key=
"prop"
v-if=
"prop == 'name'"
label=
"姓名"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
<span
v-if=
"scope.row.isManager == 1"
class=
"is-manager"
>
部门负责人
</span>
</
template
>
</el-table-column>
<el-table-column
:key=
"prop"
v-if=
"prop == 'phoneNumber'"
label=
"手机号"
prop=
"phoneNumber"
></el-table-column>
<el-table-column
:key=
"prop"
v-if=
"prop == 'positionName'"
label=
"职位"
prop=
"positionName"
></el-table-column>
<el-table-column
:key=
"prop"
v-if=
"prop == 'activationStatus'"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<div
class=
"status-icon"
:class=
"scope.row.activationStatus == 1 ? 'is-active' : ''"
>
<i
class=
"iconfont icon-shouji"
></i>
</div>
</
template
>
</el-table-column>
</template>
</el-table>
</div>
</template>
<
script
>
export
default
{
name
:
"employee-table"
,
props
:
{
employeeList
:
{
type
:
Array
,
default
()
{
return
[];
}
},
headList
:
{
type
:
Array
,
default
()
{
return
[
"name"
,
"phoneNumber"
,
"positionName"
,
"activationStatus"
];
}
}
},
methods
:
{
/**
* table选择员工
*/
selectMember
(
selection
)
{
this
.
$emit
(
"selectMember"
,
selection
);
},
/**
* 跳转至员工详情
*/
linkToDetail
(
row
)
{
console
.
log
(
row
);
window
.
location
.
href
=
"#/employee?employeeClerkId="
+
row
.
employeeClerkId
;
}
},
computed
:
{
tableData
()
{
let
arr
=
[];
this
.
employeeList
.
forEach
(
clerk
=>
{
arr
.
push
(
clerk
.
ext
.
employeeClerk
);
});
return
arr
;
}
}
};
</
script
>
<
style
lang=
"scss"
>
.el-table
.cell
.is-manager
{
display
:
inline-block
;
font-size
:
10px
;
color
:
#fff
;
width
:
56px
;
height
:
13px
;
text-align
:
center
;
line-height
:
15px
;
background
:
rgba
(
247
,
203
,
39
,
1
);
border-radius
:
2px
;
}
.el-table
tr
{
cursor
:
pointer
;
}
</
style
>
src/components/contacts/storeFrame/storeView.vue
View file @
0cd5fdc5
...
...
@@ -4,7 +4,7 @@
<a
href=
"#/storeInfo"
>
<el-button
type=
"primary"
>
添加门店
</el-button>
</a>
<a><el-button>
批量导入/导出
</el-button></a>
<a
:href=
"'#/storeIo?importCode=store&departmentId='+departmentId+'&showChildMember='+showChildMember*1+'&brandId='+brandId"
><el-button>
批量导入/导出
</el-button></a>
<el-button
type=
"danger"
plain
@
click=
"delStores"
:disabled=
"disabledDel"
>
批量删除
</el-button>
<el-button
class=
"J_show-children"
size=
"small"
><el-checkbox
class=
"m-r-10"
v-model=
"showChildMember"
@
change=
"setChildMemberShow"
></el-checkbox><a
class=
"a-href"
>
显示子成员
</a></el-button>
</div>
...
...
@@ -68,6 +68,14 @@ export default {
default
()
{
return
[];
}
},
departmentId
:
{
type
:
[
String
,
Number
],
default
:
""
},
brandId
:
{
type
:
[
String
,
Number
],
default
:
""
}
},
data
()
{
...
...
src/router/index.js
View file @
0cd5fdc5
...
...
@@ -75,6 +75,11 @@ export const constantRouterMap = [
component
:
_import
(
'contacts'
,
'addGroup'
)
},
{
path
:
'/storeIo'
,
name
:
'门店导入/导出'
,
component
:
_import
(
'contacts'
,
'storeIo'
)
},
{
path
:
'/storeInfo'
,
name
:
'编辑门店'
,
component
:
_import
(
'contacts'
,
'storeInfo'
)
...
...
src/views/contacts/administrativeFrame.vue
View file @
0cd5fdc5
...
...
@@ -24,7 +24,7 @@
<a
:href=
"'#/employee?addnew=1&departmentId='+groupInfo.departmentId"
>
<el-button
type=
"primary"
>
添加成员
</el-button>
</a>
<a
:href=
"'#/employeeIo?importCode=employee&departmentId='+groupInfo.departmentId"
><el-button>
批量导入/导出
</el-button></a>
<a
:href=
"'#/employeeIo?importCode=employee&departmentId='+groupInfo.departmentId
+'&showChildMember='+showChildMember*1
"
><el-button>
批量导入/导出
</el-button></a>
<el-button
type=
"danger"
plain
@
click=
"delMembers"
:disabled=
"disabledDel"
>
批量删除
</el-button>
<el-button
class=
"J_show-children"
><el-checkbox
class=
"m-r-10"
v-model=
"showChildMember"
@
change=
"setChildMemberShow"
></el-checkbox><a
class=
"a-href"
>
显示子成员
</a></el-button>
</div>
...
...
src/views/contacts/employeeIo.vue
View file @
0cd5fdc5
...
...
@@ -3,13 +3,10 @@
<ul
class=
"tip-area"
>
<li
class=
"tip"
>
由于你的企业未进行企业认证,通讯录最多只能导入200人以内的员工,如有超出可先进行
<a
class=
"a-href"
>
企业认证
</a></li>
<li
class=
"tip"
>
如需更新已存在的员工,可逐个进行修改,或请先导出通讯录,在导出表格里进行修改
</li>
<li
class=
"tip"
>
行政架构通讯录的导入规则和门店架构通讯录的导入规则有些区别,详细请看导入的表格说明
</li>
<li
class=
"tip"
>
姓名必须和好办企业通讯录中的员工姓名保持一致,手机号必须为员工注册好办的手机号
</li>
<li
class=
"tip"
>
员工档案导入时,直接以手机号去做匹配,通讯录中不存在的将无法导入(模板中配置的部门、职位、code,这些字段信息请保持与企业通讯录中一致,这几个字段的信息将不会修改通讯录的信息,直接取该成员对应的通讯录的字段信息)
</li>
<li
class=
"tip"
>
如果想要新增字段,可在后台档案设置中增加,再导入模板
</li>
<li
class=
"tip"
>
字段类型为图片上传、多选的字段无法导入、导出
</li>
<li
class=
"tip"
>
确保导入的表头字段和后台配置表头字段的名称一致(模板下载时间不可修改)
</li>
<li
class=
"tip"
>
由于数据量可能较大,每次最多导入2000条员工档案,若超过只取前2000条,可以分多次导入
</li>
<li
class=
"tip"
>
不能在本excel表中对员工信息类别进行增加、删除、修改
</li>
<li
class=
"tip"
>
标*字段为必填字段,未标*字段为选填字段
</li>
<li
class=
"tip"
>
员工所在部门:请先到后台创建部门,将部门id填入导入表格中,导入中,若找不到对应部门,将直接将员工挂在根目录下面
</li>
<li
class=
"tip"
>
未认证企业通讯录最多只能导入200人,超出后无法导入,请先进行企业认证
</li>
</ul>
<el-radio-group
v-model=
"type"
class=
"m-t-20"
@
change=
"resetList"
>
<el-radio-button
label=
"import"
>
导入通讯录
</el-radio-button>
...
...
@@ -30,8 +27,7 @@
class=
"upload-demo"
ref=
"upload"
:action=
"url"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:on-success=
"uploadSuccess"
:on-change=
"getChange"
:multiple=
"false"
:file-list=
"fileList"
...
...
@@ -48,7 +44,7 @@
<div
class=
"handle-area import"
v-else-if=
"type == 'export'"
>
<div
class=
"step-div"
style=
"margin-bottom :90px;"
>
<span
class=
"ft-large"
>
①
</span>
导出所有员工信息
<a
class=
"d-u-btn"
:href=
"'http://www.gicdev.com/haoban-manage-web/emp/export?departmentId='+$route.query.departmentId"
>
<a
class=
"d-u-btn"
:href=
"'http://www.gicdev.com/haoban-manage-web/emp/export?departmentId='+$route.query.departmentId
+'&showChild='+$route.query.showChildMember
"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
批量修改员工信息
...
...
@@ -61,8 +57,7 @@
class=
"upload-demo"
ref=
"uploadEdit"
:action=
"url"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:on-success=
"uploadSuccess"
:on-change=
"getChange"
:multiple=
"false"
:file-list=
"fileList"
...
...
@@ -76,15 +71,70 @@
<el-button
type=
"primary"
@
click=
"submitUpload('uploadEdit')"
:disabled=
"fileList.length == 0"
>
上传
</el-button>
</div>
</div>
<div
class=
"
handle-area
import"
v-else
>
<div
class=
"
error-log
import"
v-else
>
<div
class=
"title-area"
>
<div
class=
"tip"
>
导入总条数:0条,成功导入0条,
<span
class=
"red"
>
错误导入0条
</span>
</div>
<a
href=
"
"
>
<a
:href=
"'http://www.gicdev.com/haoban-manage-web/error-improt-log-export?importCode='+$route.query.importCode+'&departmentId='+$route.query.departmentId
"
>
<el-button
type=
"primary"
>
导出错误记录
</el-button>
</a>
</div>
<el-table
v-loading =
"loading"
:data=
"logList"
class=
"m-t-20"
style=
"width: 100%"
>
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
>
</el-table-column>
<el-table-column
label=
"错误提示"
prop=
"failReason"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"name"
></el-table-column>
<el-table-column
label=
"手机号"
prop=
"phoneNumber"
></el-table-column>
<el-table-column
label=
"部门ID"
prop=
"departmentId"
></el-table-column>
<el-table-column
label=
"职位"
prop=
"positionName"
></el-table-column>
<el-table-column
label=
"是否此部门负责人(是/否)"
prop=
"isManager"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
isManager
==
1
?
"是"
:
"否"
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入职时间"
prop=
"hireDate"
></el-table-column>
</el-table>
<div
class=
"pagination"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageSize"
:current-page=
"currentPage"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
</div>
</template>
...
...
@@ -97,17 +147,30 @@ export default {
uploadExcelComponent
},
data
()
{
var
local
=
window
.
location
.
origin
;
let
local
=
window
.
location
.
origin
;
if
(
local
.
indexOf
(
'localhost'
)
!=
-
1
)
{
local
=
'http://www.gicdev.com'
;
}
return
{
type
:
"import"
,
fileList
:
[],
url
:
local
+
"/haoban-manage-web/emp/upload"
url
:
local
+
"/haoban-manage-web/emp/upload"
,
logList
:
[],
loading
:
true
,
pageSize
:
20
,
currentPage
:
1
,
total
:
0
};
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
;
this
.
getErrorNote
();
},
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getErrorNote
();
},
resetList
(
val
)
{
this
.
fileList
=
[];
if
(
val
==
"note"
)
{
...
...
@@ -123,6 +186,16 @@ export default {
getRequest
(
"/haoban-manage-web/error-log-page"
,
params
)
.
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
errorCode
==
1
)
{
console
.
log
(
res
.
data
);
ths
.
total
=
res
.
data
.
result
.
totalCount
;
ths
.
logList
=
res
.
data
.
result
.
result
;
ths
.
loading
=
false
;
}
else
{
ths
.
$message
.
error
({
message
:
res
.
data
.
message
});
}
})
.
catch
(
e
=>
{
ths
.
$message
.
error
({
...
...
@@ -136,27 +209,17 @@ export default {
handlePreview
(
file
)
{
console
.
log
(
file
);
},
uploadSuccess
()
{
this
.
fileList
=
[];
this
.
type
=
"note"
;
this
.
getErrorNote
();
},
submitUpload
(
upload
)
{
this
.
$refs
[
upload
].
submit
();
},
getChange
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
);
this
.
fileList
=
fileList
;
},
downloadClerks
()
{
let
ths
=
this
;
let
params
=
{
departmentId
:
ths
.
$route
.
query
.
departmentId
};
getRequest
(
"/haoban-manage-web/emp/export"
,
params
)
.
then
(
res
=>
{
console
.
log
(
res
);
})
.
catch
(
e
=>
{
ths
.
$message
.
error
({
message
:
e
.
message
})
});
}
},
beforeMount
()
{
...
...
@@ -208,14 +271,8 @@ export default {
}
}
}
.handle-area
{
height
:
310px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border
:
1px
solid
rgba
(
220
,
223
,
230
,
1
);
border-radius
:
4px
;
padding
:
25px
20px
;
.error-log
{
margin-top
:
24px
;
color
:
#606266
;
.title-area
{
display
:
flex
;
height
:
32px
;
...
...
@@ -227,6 +284,19 @@ export default {
}
}
}
.pagination
{
margin-top
:
30px
;
text-align
:
right
;
}
}
.handle-area
{
height
:
310px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border
:
1px
solid
rgba
(
220
,
223
,
230
,
1
);
border-radius
:
4px
;
padding
:
25px
20px
;
margin-top
:
24px
;
color
:
#606266
;
.step-div
{
.d-u-btn
{
display
:
inline-block
;
...
...
src/views/contacts/shareContact.vue
View file @
0cd5fdc5
...
...
@@ -44,7 +44,7 @@
<
script
>
import
searchMenu
from
"components/contacts/searchMenu"
;
import
employeeInfo
from
"components/contacts/employeeInfo"
;
import
employeeList
from
"components/contacts/employeeList"
;
import
employeeList
from
"components/contacts/
share/
employeeList"
;
import
{
getRequest
,
postRequest
,
postJsonRequest
,
postJson
}
from
'@/api/api'
;
export
default
{
name
:
"administrativeEstrutura"
,
...
...
@@ -206,7 +206,7 @@
let
_this
=
this
;
let
params
=
{
sharedContactGroupId
:
_this
.
groupInfo
.
departmentId
,
findChildren
:
_this
.
showChildMember
*
1
,
findChildren
:
_this
.
showChildMember
,
};
// params = JSON.stringify(params);
postJson
(
"/haoban-manage-web/shared-contact/find-shared-member"
,
params
)
...
...
src/views/contacts/storeFrame.vue
View file @
0cd5fdc5
...
...
@@ -45,7 +45,7 @@
</el-radio-group>
</div>
<
template
v-if=
"tableView == 1"
>
<store-view
:tableData=
"storeList"
@
setChildMemberShow=
"setChildMemberShow"
></store-view>
<store-view
:tableData=
"storeList"
@
setChildMemberShow=
"setChildMemberShow"
:departmentId=
"groupInfo.departmentId"
:brandId=
"groupInfo.brandId"
></store-view>
</
template
>
<
template
v-else
>
<clerk-view
:tableData=
"storeList"
@
setChildMemberShow=
"setChildMemberShow"
@
selectByStatus=
"selectByStatus"
@
selectByType=
"selectByType"
></clerk-view>
...
...
@@ -283,6 +283,7 @@ export default {
console
.
log
(
obj
,
node
,
"selection"
);
this
.
groupInfo
.
departmentId
=
obj
.
groupId
;
this
.
groupInfo
.
groupName
=
obj
.
name
;
this
.
groupInfo
.
brandId
=
obj
.
brandId
this
.
showEmployee
=
showEmployee
;
this
.
groupInfo
.
hasPression
=
obj
.
hasPression
;
this
.
groupInfo
.
level
=
obj
.
level
;
...
...
src/views/contacts/storeIo.vue
0 → 100644
View file @
0cd5fdc5
<
template
>
<div
class=
"io-container"
>
<ul
class=
"tip-area"
>
<li
class=
"tip"
>
由于你的企业未进行企业认证,最多导入30家门店,如有超出,可先进行
<a
class=
"a-href"
>
企业认证
</a></li>
<li
class=
"tip"
>
如需更新已存在的门店及店员,可逐个进行修改,或请先导出,在导出表格里进行修改
</li>
<li
class=
"tip"
>
由于数据量可能较大,每次最多导入2000条员工档案,若超过只取前2000条,可以分多次导入
</li>
<li
class=
"tip"
>
不能在本excel表中对门店信息类别进行增加、删除、修改
</li>
<li
class=
"tip"
>
标*字段为必填字段,未标*字段为选填字段
</li>
<li
class=
"tip"
>
门店所在分组:请先到后台创建门店分组,将分组id填入导入表格中,导入中,若找不到对应分组,将直接将门店挂在根目录下面
</li>
<li
class=
"tip"
>
未认证企业通讯录最多只能导入30家门店,超出后无法导入,请先进行企业认证
</li>
<li
class=
"tip"
>
每次最多导入2000家门店,如果超出则只取前2000条数据,可以分多次导入
</li>
</ul>
<el-radio-group
v-model=
"type"
class=
"m-t-20"
@
change=
"resetList"
>
<el-radio-button
label=
"import"
>
导入门店
</el-radio-button>
<el-radio-button
label=
"export"
>
导出/修改门店
</el-radio-button>
<el-radio-button
label=
"note"
>
错误记录
</el-radio-button>
</el-radio-group>
<div
class=
"handle-area import"
v-if=
"type == 'import'"
>
<div
class=
"step-div"
style=
"margin-bottom :90px;"
>
<span
class=
"ft-large"
>
①
</span>
下载门店导入模板,批量填写门店信息
<a
href=
"http://www.gicdev.com/haoban-manage-web/excel/通讯录-门店架构导入模板.xlsx"
class=
"d-u-btn"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
</div>
<div
class=
"step-div"
>
<span
class=
"ft-large"
>
②
</span>
上传填写好的门店信息
<div
class=
"d-u-btn m-t-20"
>
<el-upload
class=
"upload-demo"
ref=
"upload"
:action=
"url+'?brandId='+$route.query.brandId"
:on-success=
"uploadSuccess"
:on-change=
"getChange"
:multiple=
"false"
:file-list=
"fileList"
:auto-upload=
"false"
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
>
选取文件
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
文件格式必须为xls或xlsx格式
</div>
</el-upload>
</div>
</div>
<div
class=
"up-btn-div"
>
<el-button
type=
"primary"
@
click=
"submitUpload('upload')"
:disabled=
"fileList.length == 0"
>
上传
</el-button>
</div>
</div>
<div
class=
"handle-area import"
v-else-if=
"type == 'export'"
>
<div
class=
"step-div"
style=
"margin-bottom :90px;"
>
<span
class=
"ft-large"
>
①
</span>
导出门店
<a
class=
"d-u-btn"
:href=
"'http://www.gicdev.com/haoban-manage-web/store/export?storeGroupId='+$route.query.departmentId+'&showChild='+$route.query.showChildMember"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
批量修改门店信息
</div>
<div
class=
"step-div"
>
<span
class=
"ft-large"
>
②
</span>
上传修改后的门店信息
<div
class=
"d-u-btn m-t-20"
>
<el-upload
class=
"upload-demo"
ref=
"uploadEdit"
:action=
"url+'?brandId='+$route.query.brandId"
:on-success=
"uploadSuccess"
:on-change=
"getChange"
:multiple=
"false"
:file-list=
"fileList"
:auto-upload=
"false"
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
>
选取文件
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
文件格式必须为xls或xlsx格式
</div>
</el-upload>
</div>
</div>
<div
class=
"up-btn-div"
>
<el-button
type=
"primary"
@
click=
"submitUpload('uploadEdit')"
:disabled=
"fileList.length == 0"
>
上传
</el-button>
</div>
</div>
<div
class=
"error-log import"
v-else
>
<div
class=
"title-area"
>
<div
class=
"tip"
>
导入总条数:0条,成功导入0条,
<span
class=
"red"
>
错误导入0条
</span>
</div>
<a
:href=
"'http://www.gicdev.com/haoban-manage-web/error-improt-log-export?importCode='+$route.query.importCode+'&departmentId='+$route.query.departmentId"
>
<el-button
type=
"primary"
>
导出错误记录
</el-button>
</a>
</div>
<el-table
v-loading =
"loading"
:data=
"logList"
class=
"m-t-20"
style=
"width: 100%"
>
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
>
</el-table-column>
<el-table-column
label=
"错误提示"
prop=
"failReason"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"name"
></el-table-column>
<el-table-column
label=
"手机号"
prop=
"phoneNumber"
></el-table-column>
<el-table-column
label=
"部门ID"
prop=
"departmentId"
></el-table-column>
<el-table-column
label=
"职位"
prop=
"positionName"
></el-table-column>
<el-table-column
label=
"是否此部门负责人(是/否)"
prop=
"isManager"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
isManager
==
1
?
"是"
:
"否"
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入职时间"
prop=
"hireDate"
></el-table-column>
</el-table>
<div
class=
"pagination"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageSize"
:current-page=
"currentPage"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
</div>
</template>
<
script
>
import
uploadExcelComponent
from
"components/uploadExcel/index"
;
import
{
getRequest
,
postRequest
,
postJsonRequest
}
from
'@/api/api'
;
export
default
{
name
:
"employee-io"
,
components
:
{
uploadExcelComponent
},
data
()
{
let
local
=
window
.
location
.
origin
;
if
(
local
.
indexOf
(
'localhost'
)
!=
-
1
)
{
local
=
'http://www.gicdev.com'
;
}
return
{
type
:
"import"
,
fileList
:
[],
url
:
local
+
"/haoban-manage-web/store/upload"
,
logList
:
[],
loading
:
true
,
pageSize
:
20
,
currentPage
:
1
,
total
:
0
};
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
;
this
.
getErrorNote
();
},
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getErrorNote
();
},
resetList
(
val
)
{
this
.
fileList
=
[];
if
(
val
==
"note"
)
{
this
.
getErrorNote
();
}
},
getErrorNote
()
{
let
ths
=
this
;
let
params
=
{
departmentId
:
ths
.
$route
.
query
.
departmentId
,
importCode
:
ths
.
$route
.
query
.
importCode
};
getRequest
(
"/haoban-manage-web/error-log-page"
,
params
)
.
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
errorCode
==
1
)
{
console
.
log
(
res
.
data
);
ths
.
total
=
res
.
data
.
result
.
totalCount
;
ths
.
logList
=
res
.
data
.
result
.
result
;
ths
.
loading
=
false
;
}
else
{
ths
.
$message
.
error
({
message
:
res
.
data
.
message
});
}
})
.
catch
(
e
=>
{
ths
.
$message
.
error
({
message
:
e
.
message
})
});
},
handleRemove
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
);
},
handlePreview
(
file
)
{
console
.
log
(
file
);
},
uploadSuccess
()
{
this
.
fileList
=
[];
this
.
type
=
"note"
;
this
.
getErrorNote
();
},
submitUpload
(
upload
)
{
this
.
$refs
[
upload
].
submit
();
},
getChange
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
);
this
.
fileList
=
fileList
;
}
},
beforeMount
()
{
if
(
this
.
type
==
"note"
)
{
this
.
getErrorNote
();
}
}
}
</
script
>
<
style
lang=
"scss"
>
.io-container
{
width
:
100%
;
height
:
538px
;
background
:
#fff
;
box-sizing
:
border-box
;
padding
:
28px
32px
;
overflow
:
auto
;
.tip-area
{
width
:
100%
;
background
:
rgba
(
236
,
245
,
255
,
1
);
border
:
1px
solid
rgba
(
179
,
216
,
255
,
1
);
border-radius
:
4px
;
padding
:
10px
;
font-size
:
13px
;
font-weight
:
400
;
color
:
rgba
(
96
,
98
,
102
,
1
);
.tip
{
line-height
:
24px
;
position
:
relative
;
padding-left
:
16px
;
&:last-child
{
margin-bottom
:
0
;
}
.radio
{
width
:
6px
;
height
:
6px
;
background
:
rgba
(
64
,
158
,
255
,
1
);
border-radius
:
50%
;
}
&
::before
{
position
:
absolute
;
content
:
""
;
width
:
6px
;
height
:
6px
;
background
:
rgba
(
64
,
158
,
255
,
1
);
border-radius
:
50%
;
top
:
9px
;
left
:
0
;
}
}
}
.error-log
{
margin-top
:
24px
;
.title-area
{
display
:
flex
;
height
:
32px
;
line-height
:
32px
;
.tip
{
flex
:
1
;
.red
{
color
:
red
;
}
}
}
.pagination
{
margin-top
:
30px
;
text-align
:
right
;
}
}
.handle-area
{
height
:
310px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border
:
1px
solid
rgba
(
220
,
223
,
230
,
1
);
border-radius
:
4px
;
padding
:
25px
20px
;
margin-top
:
24px
;
color
:
#606266
;
.step-div
{
.d-u-btn
{
display
:
inline-block
;
margin-left
:
10px
;
margin-right
:
10px
;
vertical-align
:
middle
;
.iconfont
{
margin-left
:
5px
;
}
.warming
{
font-size
:
12px
;
font-weight
:
400
;
color
:
rgba
(
96
,
98
,
102
,
1
);
line-height
:
30px
;
margin-top
:
5px
;
}
}
.ft-large
{
font-size
:
20px
;
margin-right
:
10px
;
color
:
#909399
;
}
}
.up-btn-div
{
text-align
:
center
;
margin-top
:
20px
;
}
}
}
</
style
>
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