Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
workbook
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄志强
workbook
Commits
67180a2f
提交
67180a2f
authored
5月 26, 2020
作者:
黄志强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改
上级
92bd2aba
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
108 行增加
和
115 行删除
+108
-115
Feedback.vue
src/views/Feedback.vue
+3
-3
Index.vue
src/views/Index.vue
+1
-1
AddressBook.vue
src/views/addressBook/AddressBook.vue
+1
-1
PersonDetails.vue
src/views/person/PersonDetails.vue
+4
-4
PersonInfo.vue
src/views/person/PersonInfo.vue
+3
-3
PersonList.vue
src/views/person/PersonList.vue
+4
-4
AuthorityManage.vue
src/views/root/AuthorityManage.vue
+5
-5
ConsumerManage.vue
src/views/root/ConsumerManage.vue
+13
-13
DepartmentManage.vue
src/views/root/DepartmentManage.vue
+8
-8
LogManage.vue
src/views/root/LogManage.vue
+1
-1
ParamsSetting.vue
src/views/root/ParamsSetting.vue
+5
-5
RoleManage.vue
src/views/root/RoleManage.vue
+1
-1
AddTask.vue
src/views/task/AddTask.vue
+14
-14
DepartmentTask.vue
src/views/task/DepartmentTask.vue
+5
-5
TaskDetails.vue
src/views/task/TaskDetails.vue
+30
-37
UnpublishedTask.vue
src/views/task/UnpublishedTask.vue
+10
-10
没有找到文件。
src/views/Feedback.vue
浏览文件 @
67180a2f
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
getFeedback
()
{
getFeedback
()
{
// 获取数据
this
.
$axios
.
getFeedback
().
then
((
res
)
=>
{
this
.
$axios
.
getFeedback
().
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
...
@@ -67,10 +67,10 @@
...
@@ -67,10 +67,10 @@
}
}
})
})
},
},
addFeedBack
()
{
addFeedBack
()
{
// 显示添加弹框
this
.
showFeedback
=
true
;
this
.
showFeedback
=
true
;
},
},
closeFeedBackDialog
()
{
closeFeedBackDialog
()
{
// 关闭弹框并重新请求数据
this
.
showFeedback
=
false
;
this
.
showFeedback
=
false
;
this
.
getFeedback
();
this
.
getFeedback
();
},
},
...
...
src/views/Index.vue
浏览文件 @
67180a2f
<!-- 头部和主
题
-->
<!-- 头部和主
体
-->
<
template
>
<
template
>
<div
class=
'indexPage'
>
<div
class=
'indexPage'
>
<el-container
style=
"height: 100%;"
direction=
"vertical"
>
<el-container
style=
"height: 100%;"
direction=
"vertical"
>
...
...
src/views/addressBook/AddressBook.vue
浏览文件 @
67180a2f
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
postAllAddress
()
{
postAllAddress
()
{
// 获取列表数据
let
obj
=
{
let
obj
=
{
"currentPage"
:
this
.
currentPage
,
"currentPage"
:
this
.
currentPage
,
"pageSize"
:
this
.
pageSize
"pageSize"
:
this
.
pageSize
...
...
src/views/person/PersonDetails.vue
浏览文件 @
67180a2f
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
//这里存放数据
//这里存放数据
return
{
return
{
paramsData
:
''
,
paramsData
:
''
,
userForm
:{
userForm
:{
// 表单
username
:
''
,
username
:
''
,
phone1
:
''
,
phone1
:
''
,
phone2
:
''
,
phone2
:
''
,
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
email
:
''
,
email
:
''
,
entryTime
:
''
,
entryTime
:
''
,
},
},
rules
:{
rules
:{
// 表单验证
name
:
[
name
:
[
{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
},
],
],
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
postDepartmentList
()
{
postDepartmentList
()
{
// 获取数据
this
.
$axios
.
getAllDepartment
().
then
((
res
)
=>
{
this
.
$axios
.
getAllDepartment
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
console
.
log
(
name
);
console
.
log
(
name
);
return
name
;
return
name
;
},
},
submitForm
(
formName
)
{
submitForm
(
formName
)
{
// 提交
console
.
log
(
this
.
userForm
)
console
.
log
(
this
.
userForm
)
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
src/views/person/PersonInfo.vue
浏览文件 @
67180a2f
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
//这里存放数据
//这里存放数据
return
{
return
{
paramsData
:
''
,
paramsData
:
''
,
userForm
:{
userForm
:{
// 表单
username
:
''
,
username
:
''
,
phone1
:
''
,
phone1
:
''
,
phone2
:
''
,
phone2
:
''
,
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
postDepartmentList
()
{
postDepartmentList
()
{
// 部门数据
this
.
$axios
.
getAllDepartment
().
then
((
res
)
=>
{
this
.
$axios
.
getAllDepartment
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
}
}
})
})
},
},
nameDepartment
(
val
)
{
nameDepartment
(
val
)
{
// 名称
console
.
log
(
val
)
console
.
log
(
val
)
let
name
=
''
;
let
name
=
''
;
console
.
log
(
this
.
deOptions
)
console
.
log
(
this
.
deOptions
)
...
...
src/views/person/PersonList.vue
浏览文件 @
67180a2f
...
@@ -236,22 +236,22 @@
...
@@ -236,22 +236,22 @@
this
.
department
=
result
[
0
].
id
;
this
.
department
=
result
[
0
].
id
;
this
.
getPersonList
()
this
.
getPersonList
()
},
},
treeSearch
(
val
)
{
treeSearch
(
val
)
{
// 部门选择
console
.
log
(
val
)
console
.
log
(
val
)
this
.
department
=
val
;
this
.
department
=
val
;
this
.
getPersonList
();
this
.
getPersonList
();
},
},
statusSelectDo
(
val
)
{
statusSelectDo
(
val
)
{
// 状态选择
this
.
statusValue
=
val
;
this
.
statusValue
=
val
;
console
.
log
(
val
)
console
.
log
(
val
)
this
.
getPersonList
();
this
.
getPersonList
();
},
},
timeSelectDo
(
val
)
{
timeSelectDo
(
val
)
{
// 时间选择
console
.
log
(
val
)
console
.
log
(
val
)
this
.
timeSelect
=
val
;
this
.
timeSelect
=
val
;
this
.
getPersonList
();
this
.
getPersonList
();
},
},
getPersonList
()
{
getPersonList
()
{
// 获取人员数据
let
st
;
let
st
;
let
et
;
let
et
;
if
(
this
.
timeSelect
!==
''
&&
this
.
timeSelect
!==
null
)
{
if
(
this
.
timeSelect
!==
''
&&
this
.
timeSelect
!==
null
)
{
...
...
src/views/root/AuthorityManage.vue
浏览文件 @
67180a2f
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
getAuthority
()
{
getAuthority
()
{
// 获取列表数据
this
.
$axios
.
putAuthority
().
then
((
res
)
=>
{
this
.
$axios
.
putAuthority
().
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -95,14 +95,14 @@
...
@@ -95,14 +95,14 @@
}
}
})
})
},
},
addAuthority
()
{
addAuthority
()
{
// 新增弹框
this
.
dialogName
=
'新增权限'
;
this
.
dialogName
=
'新增权限'
;
this
.
dialogAuthorityVisible
=
true
;
this
.
dialogAuthorityVisible
=
true
;
this
.
authorityForm
.
name
=
''
;
this
.
authorityForm
.
name
=
''
;
this
.
authorityForm
.
description
=
''
;
this
.
authorityForm
.
description
=
''
;
this
.
authorityForm
.
id
=
null
;
this
.
authorityForm
.
id
=
null
;
},
},
editAuthority
(
val
)
{
editAuthority
(
val
)
{
// 修改弹框
this
.
dialogName
=
'修改权限'
;
this
.
dialogName
=
'修改权限'
;
this
.
dialogAuthorityVisible
=
true
;
this
.
dialogAuthorityVisible
=
true
;
console
.
log
(
val
)
console
.
log
(
val
)
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
this
.
dialogAuthorityVisible
=
false
;
this
.
dialogAuthorityVisible
=
false
;
this
.
getAuthority
();
this
.
getAuthority
();
},
},
submitAuthorityDialog
(
val
)
{
submitAuthorityDialog
(
val
)
{
// 新增修改确认
this
.
$refs
[
val
].
validate
((
valid
)
=>
{
this
.
$refs
[
val
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
dialogName
===
'新增权限'
)
{
if
(
this
.
dialogName
===
'新增权限'
)
{
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
}
}
});
});
},
},
deleteAuthority
(
val
)
{
deleteAuthority
(
val
)
{
// 删除确认
console
.
log
(
val
)
console
.
log
(
val
)
this
.
$axios
.
deleteAuthority
(
val
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
deleteAuthority
(
val
.
id
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
...
...
src/views/root/ConsumerManage.vue
浏览文件 @
67180a2f
...
@@ -108,14 +108,14 @@
...
@@ -108,14 +108,14 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
getUser
()
{
getUser
()
{
// 获取列表数据
this
.
$axios
.
getUser
().
then
((
res
)
=>
{
this
.
$axios
.
getUser
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
personList
=
res
.
data
;
this
.
personList
=
res
.
data
;
})
})
},
},
postExportAddress
()
{
postExportAddress
()
{
// 下载
this
.
$axios
.
postExportAddress
().
then
((
res
)
=>
{
this
.
$axios
.
postExportAddress
().
then
((
res
)
=>
{
let
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
.
data
]));
// 表示一个指定Blob对象
let
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
.
data
]));
// 表示一个指定Blob对象
let
link
=
document
.
createElement
(
'a'
);
let
link
=
document
.
createElement
(
'a'
);
...
@@ -127,9 +127,9 @@
...
@@ -127,9 +127,9 @@
document
.
body
.
removeChild
(
link
);
document
.
body
.
removeChild
(
link
);
window
.
URL
.
revokeObjectURL
(
url
);
// 下载完成进行释放
window
.
URL
.
revokeObjectURL
(
url
);
// 下载完成进行释放
})
})
},
},
postDownloadAddress
()
{
postDownloadAddress
()
{
// 下载
this
.
$axios
.
postDownloadAddress
().
then
((
res
)
=>
{
this
.
$axios
.
postDownloadAddress
().
then
((
res
)
=>
{
let
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
.
data
]));
// 表示一个指定Blob对象
let
url
=
window
.
URL
.
createObjectURL
(
new
Blob
([
res
.
data
]));
// 表示一个指定Blob对象
let
link
=
document
.
createElement
(
'a'
);
let
link
=
document
.
createElement
(
'a'
);
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
clickBtn
(){
clickBtn
(){
this
.
$refs
.
fileTrain
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
this
.
$refs
.
fileTrain
.
dispatchEvent
(
new
MouseEvent
(
'click'
))
},
},
getFileType
()
{
getFileType
()
{
// 上传文件
// const inputFile = this.$refs.fileTrain.files;
// const inputFile = this.$refs.fileTrain.files;
console
.
log
(
'file11231231231----------'
,
this
.
$refs
.
fileTrain
.
files
[
0
])
console
.
log
(
'file11231231231----------'
,
this
.
$refs
.
fileTrain
.
files
[
0
])
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
openSearch
()
{
openSearch
()
{
console
.
log
(
this
.
searchHuman
)
console
.
log
(
this
.
searchHuman
)
},
},
deleteUSer
(
val
)
{
deleteUSer
(
val
)
{
// 删除用户
console
.
log
(
val
)
console
.
log
(
val
)
this
.
$axios
.
deleteUsers
(
val
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
deleteUsers
(
val
.
id
).
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
...
@@ -188,18 +188,18 @@
...
@@ -188,18 +188,18 @@
// console.error(err.message);
// console.error(err.message);
// })
// })
},
},
consumerDetail
(
item
)
{
consumerDetail
(
item
)
{
// 跳转详情
console
.
log
(
item
)
console
.
log
(
item
)
console
.
log
(
this
.
$Base64
.
encode
(
JSON
.
stringify
(
item
)));
console
.
log
(
this
.
$Base64
.
encode
(
JSON
.
stringify
(
item
)));
localStorage
.
setItem
(
'adminUser'
,
this
.
$Base64
.
encode
(
JSON
.
stringify
(
item
)));
localStorage
.
setItem
(
'adminUser'
,
this
.
$Base64
.
encode
(
JSON
.
stringify
(
item
)));
this
.
$router
.
push
({
name
:
'consumerDetails'
});
this
.
$router
.
push
({
name
:
'consumerDetails'
});
},
},
addUser
()
{
addUser
()
{
// 新增用户弹框
this
.
doName
=
'新增用户'
;
this
.
doName
=
'新增用户'
;
this
.
showConsumerDialog
=
true
;
this
.
showConsumerDialog
=
true
;
// this.$router.push({name: 'createConsumer'})
// this.$router.push({name: 'createConsumer'})
},
},
closeConsumerDialog
(
val
)
{
closeConsumerDialog
(
val
)
{
// 关闭弹框
if
(
val
===
'修改用户'
)
{
if
(
val
===
'修改用户'
)
{
this
.
getUser
();
this
.
getUser
();
}
else
if
(
val
===
'新增用户'
)
{
}
else
if
(
val
===
'新增用户'
)
{
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
}
}
this
.
showConsumerDialog
=
false
;
this
.
showConsumerDialog
=
false
;
},
},
openDetails
(
val
)
{
openDetails
(
val
)
{
// 修改用户弹框
console
.
log
(
val
)
console
.
log
(
val
)
this
.
doName
=
'修改用户'
;
this
.
doName
=
'修改用户'
;
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
// localStorage.setItem('adminUser', this.$Base64.encode(JSON.stringify(val)));
// localStorage.setItem('adminUser', this.$Base64.encode(JSON.stringify(val)));
// this.$router.push({name: 'consumerDetails'});
// this.$router.push({name: 'consumerDetails'});
},
},
findDeparts
(
val
)
{
findDeparts
(
val
)
{
// 部门名称
// console.log(val)
// console.log(val)
// console.log(this.departList)
// console.log(this.departList)
let
name
=
''
;
let
name
=
''
;
...
@@ -235,7 +235,7 @@
...
@@ -235,7 +235,7 @@
// })
// })
// console.log(ret1)
// console.log(ret1)
},
},
getAllDepartmentList
()
{
getAllDepartmentList
()
{
// 部门列表
this
.
$axios
.
getAllDepartment
().
then
((
res
)
=>
{
this
.
$axios
.
getAllDepartment
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
}
}
})
})
},
},
getRoles
()
{
getRoles
()
{
// 获取角色
this
.
$axios
.
getRole
().
then
((
res
)
=>
{
this
.
$axios
.
getRole
().
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
...
src/views/root/DepartmentManage.vue
浏览文件 @
67180a2f
...
@@ -156,11 +156,11 @@
...
@@ -156,11 +156,11 @@
},
},
//方法集合
//方法集合
methods
:
{
methods
:
{
openDialog
()
{
openDialog
()
{
// 打开弹框
this
.
showDepartmentDialog
=
true
;
this
.
showDepartmentDialog
=
true
;
this
.
currentDepartment
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
companyData
))
this
.
currentDepartment
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
companyData
))
},
},
closeDialog
()
{
closeDialog
()
{
// 关闭弹框
this
.
showDepartmentDialog
=
false
;
this
.
showDepartmentDialog
=
false
;
this
.
postDepartment
();
this
.
postDepartment
();
},
},
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
if
(
!
value
)
return
true
;
if
(
!
value
)
return
true
;
return
data
.
name
.
indexOf
(
value
)
!==
-
1
;
return
data
.
name
.
indexOf
(
value
)
!==
-
1
;
},
},
postDepartment
()
{
postDepartment
()
{
// 获取部门
this
.
$axios
.
postDepartmentList
().
then
((
res
)
=>
{
this
.
$axios
.
postDepartmentList
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -185,7 +185,7 @@
...
@@ -185,7 +185,7 @@
}
}
})
})
},
},
handleNodeClick
(
data
)
{
handleNodeClick
(
data
)
{
// tree点击
console
.
log
(
data
);
console
.
log
(
data
);
this
.
$refs
[
'departmentForm'
].
resetFields
();
this
.
$refs
[
'departmentForm'
].
resetFields
();
this
.
showDetail
=
true
;
this
.
showDetail
=
true
;
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
}
}
this
.
departmentForm
=
obj
;
this
.
departmentForm
=
obj
;
},
},
submitForm
(
formName
)
{
submitForm
(
formName
)
{
// 新增部门
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
this
.
departmentForm
)
console
.
log
(
this
.
departmentForm
)
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
}
}
});
});
},
},
editSubmitForm
(
formName
)
{
editSubmitForm
(
formName
)
{
// 修改部门
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
this
.
departmentForm
)
console
.
log
(
this
.
departmentForm
)
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
}
}
});
});
},
},
deleteDepartment
(
val
)
{
deleteDepartment
(
val
)
{
// 删除
this
.
$axios
.
deleteDepartmentList
(
val
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
deleteDepartmentList
(
val
.
id
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
}
}
})
})
},
},
append
(
val
)
{
append
(
val
)
{
// 添加
console
.
log
(
val
);
console
.
log
(
val
);
this
.
currentDepartment
=
val
;
this
.
currentDepartment
=
val
;
this
.
showDepartmentDialog
=
true
;
this
.
showDepartmentDialog
=
true
;
...
...
src/views/root/LogManage.vue
浏览文件 @
67180a2f
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
getLog
()
{
getLog
()
{
// 获取数据
let
start
=
''
;
let
start
=
''
;
let
end
=
''
;
let
end
=
''
;
if
(
this
.
time
[
0
]
!==
undefined
)
{
if
(
this
.
time
[
0
]
!==
undefined
)
{
...
...
src/views/root/ParamsSetting.vue
浏览文件 @
67180a2f
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
return
1394
;
return
1394
;
}
}
},
},
getParams
()
{
getParams
()
{
// 获取数据
this
.
$axios
.
getAddConfig
().
then
((
res
)
=>
{
this
.
$axios
.
getAddConfig
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
}
}
})
})
},
},
getHoliday
(
val
)
{
getHoliday
(
val
)
{
// 获取日历
this
.
$axios
.
getHoliday
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getHoliday
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
.
length
!==
0
)
{
if
(
res
.
data
.
length
!==
0
)
{
...
@@ -311,7 +311,7 @@
...
@@ -311,7 +311,7 @@
}
}
})
})
},
},
submitForm
(
formName
)
{
submitForm
(
formName
)
{
// 保存配置
console
.
log
(
this
.
baseForm
)
console
.
log
(
this
.
baseForm
)
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -334,7 +334,7 @@
...
@@ -334,7 +334,7 @@
resetForm
(
formName
)
{
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
this
.
$refs
[
formName
].
resetFields
();
},
},
clickCurrentDay
(
val
,
val2
)
{
clickCurrentDay
(
val
,
val2
)
{
// 切换月份获取数据
console
.
log
(
val2
)
console
.
log
(
val2
)
let
index
=
val2
.
day
.
substring
(
val2
.
day
.
length
-
2
,
val2
.
day
.
length
);
let
index
=
val2
.
day
.
substring
(
val2
.
day
.
length
-
2
,
val2
.
day
.
length
);
console
.
log
(
index
)
console
.
log
(
index
)
...
@@ -436,7 +436,7 @@
...
@@ -436,7 +436,7 @@
}
}
})
})
},
},
baseScore
(
val
)
{
baseScore
(
val
)
{
// 基础分计算
console
.
log
(
val
)
console
.
log
(
val
)
this
.
baseForm
.
thingHalfOfDay
=
(
0.5
*
parseInt
(
val
))
+
''
;
this
.
baseForm
.
thingHalfOfDay
=
(
0.5
*
parseInt
(
val
))
+
''
;
this
.
baseForm
.
paidHalfOfDayLeave
=
(
0.5
*
parseInt
(
val
))
+
''
this
.
baseForm
.
paidHalfOfDayLeave
=
(
0.5
*
parseInt
(
val
))
+
''
...
...
src/views/root/RoleManage.vue
浏览文件 @
67180a2f
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
watch
:
{},
watch
:
{},
//方法集合
//方法集合
methods
:
{
methods
:
{
companyClick
()
{
companyClick
()
{
// 获取部门
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
companyData
));
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
companyData
));
this
.
compantClick
=
'#5059d5'
;
this
.
compantClick
=
'#5059d5'
;
this
.
$axios
.
postDepartmentList
().
then
((
res
)
=>
{
this
.
$axios
.
postDepartmentList
().
then
((
res
)
=>
{
...
...
src/views/task/AddTask.vue
浏览文件 @
67180a2f
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
//import引入的组件需要注入到对象中才能使用
//import引入的组件需要注入到对象中才能使用
components
:
{
EditorBar
},
components
:
{
EditorBar
},
data
()
{
data
()
{
let
stateTimeVal
=
(
rule
,
value
,
callback
)
=>
{
let
stateTimeVal
=
(
rule
,
value
,
callback
)
=>
{
// 时间验证
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'任务开始时间不能为空'
));
return
callback
(
new
Error
(
'任务开始时间不能为空'
));
}
}
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
callback
();
callback
();
}
}
};
};
let
completeVal
=
(
rule
,
value
,
callback
)
=>
{
let
completeVal
=
(
rule
,
value
,
callback
)
=>
{
// 时间验证
console
.
log
(
rule
,
value
,
callback
)
console
.
log
(
rule
,
value
,
callback
)
console
.
log
(
this
.
saveStoreTaskDetailValue
)
console
.
log
(
this
.
saveStoreTaskDetailValue
)
if
(
!
value
)
{
if
(
!
value
)
{
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
callback
();
callback
();
}
}
};
};
let
workloadVal
=
(
rule
,
value
,
callback
)
=>
{
let
workloadVal
=
(
rule
,
value
,
callback
)
=>
{
// 工作量验证
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'任务量不能为空'
));
return
callback
(
new
Error
(
'任务量不能为空'
));
}
else
{
}
else
{
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
};
};
//这里存放数据
//这里存放数据
return
{
return
{
taskForm
:
{
taskForm
:
{
// 新增表单
title
:
''
,
title
:
''
,
publisher
:
''
,
publisher
:
''
,
stateTime
:
''
,
stateTime
:
''
,
...
@@ -267,8 +267,8 @@
...
@@ -267,8 +267,8 @@
workloadCount
:
1
,
workloadCount
:
1
,
audit
:
''
,
audit
:
''
,
},
},
announcer
:
''
,
announcer
:
''
,
//
rules
:
{
rules
:
{
// 表单验证规则
title
:
[
title
:
[
{
required
:
true
,
message
:
'请输入任务名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入任务名称'
,
trigger
:
'blur'
},
{
max
:
30
,
message
:
'长度在 30 个字符之内'
,
trigger
:
'blur'
}
{
max
:
30
,
message
:
'长度在 30 个字符之内'
,
trigger
:
'blur'
}
...
@@ -307,8 +307,8 @@
...
@@ -307,8 +307,8 @@
isClear
:
false
,
isClear
:
false
,
fileList
:
[],
// 文件列表
fileList
:
[],
// 文件列表
attachmentsArr
:
[],
// 存储多个附件对象
attachmentsArr
:
[],
// 存储多个附件对象
userLoginData
:
''
,
userLoginData
:
''
,
// 登录人信息
contentTip
:
false
,
contentTip
:
false
,
// 任务内容填写验证提示
saveStoreTaskDetailValue
:
''
,
// 存储任务详情传来的值
saveStoreTaskDetailValue
:
''
,
// 存储任务详情传来的值
showAuditName
:
false
,
showAuditName
:
false
,
pickerOptionsComplete
:
{
pickerOptionsComplete
:
{
...
@@ -323,7 +323,7 @@
...
@@ -323,7 +323,7 @@
},
},
//监控data中的数据变化
//监控data中的数据变化
watch
:
{
watch
:
{
'taskForm.completeTime'
:
function
(
val
)
{
'taskForm.completeTime'
:
function
(
val
)
{
// 监听完成时间并根据开始时间及组员计算工作量
console
.
log
(
val
)
console
.
log
(
val
)
let
count
;
let
count
;
if
(
val
!==
''
&&
val
!==
null
)
{
if
(
val
!==
''
&&
val
!==
null
)
{
...
@@ -350,7 +350,7 @@
...
@@ -350,7 +350,7 @@
this
.
taskForm
.
workload
=
count
;
this
.
taskForm
.
workload
=
count
;
}
}
},
},
'taskForm.stateTime'
:
function
(
val
)
{
'taskForm.stateTime'
:
function
(
val
)
{
// 监听开始时间,并根据结束时间及组员计算工作量
console
.
log
(
val
)
console
.
log
(
val
)
let
count
;
let
count
;
if
(
val
!==
''
&&
val
!==
null
&&
this
.
taskForm
.
completeTime
!==
''
&&
this
.
taskForm
.
stateTime
!==
null
)
{
if
(
val
!==
''
&&
val
!==
null
&&
this
.
taskForm
.
completeTime
!==
''
&&
this
.
taskForm
.
stateTime
!==
null
)
{
...
@@ -377,7 +377,7 @@
...
@@ -377,7 +377,7 @@
this
.
taskForm
.
workload
=
count
;
this
.
taskForm
.
workload
=
count
;
}
}
},
},
'taskForm.crewList'
:
function
(
val
)
{
'taskForm.crewList'
:
function
(
val
)
{
// 监听组员及根据开始和完成时间计算工作量
console
.
log
(
val
)
console
.
log
(
val
)
if
(
this
.
taskForm
.
completeTime
!==
''
&&
this
.
taskForm
.
completeTime
!==
null
)
{
if
(
this
.
taskForm
.
completeTime
!==
''
&&
this
.
taskForm
.
completeTime
!==
null
)
{
// let count = JSON.parse(JSON.stringify(this.taskForm.workload));
// let count = JSON.parse(JSON.stringify(this.taskForm.workload));
...
@@ -404,7 +404,7 @@
...
@@ -404,7 +404,7 @@
this
.
taskForm
.
workload
=
count
;
this
.
taskForm
.
workload
=
count
;
}
}
},
},
content
:
function
(
val
)
{
content
:
function
(
val
)
{
// 任务内容提示
if
(
val
===
''
)
{
if
(
val
===
''
)
{
this
.
contentTip
=
true
;
this
.
contentTip
=
true
;
}
else
{
}
else
{
...
@@ -414,11 +414,11 @@
...
@@ -414,11 +414,11 @@
},
},
//方法集合
//方法集合
methods
:
{
methods
:
{
findTimes
(
val
)
{
findTimes
(
val
)
{
// 时间限定
// console.log(val)
// console.log(val)
return
Date
.
parse
(
val
)
<
Date
.
parse
(
this
.
taskForm
.
stateTime
)
-
8.64e7
;
return
Date
.
parse
(
val
)
<
Date
.
parse
(
this
.
taskForm
.
stateTime
)
-
8.64e7
;
},
},
getPublisherUsers
()
{
getPublisherUsers
()
{
// 获取审核者数据
this
.
$axios
.
getPublisherUser
().
then
((
res
)
=>
{
this
.
$axios
.
getPublisherUser
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
...
...
src/views/task/DepartmentTask.vue
浏览文件 @
67180a2f
...
@@ -28,12 +28,12 @@
...
@@ -28,12 +28,12 @@
data
()
{
data
()
{
//这里存放数据
//这里存放数据
return
{
return
{
defaultProps
:
{
defaultProps
:
{
// element tree 默认参数
children
:
'workMppings'
,
children
:
'workMppings'
,
label
:
'title'
label
:
'title'
},
},
data
:
[],
data
:
[],
// tree数据
divHeight
:
0
,
divHeight
:
0
,
// 高度
taskListData
:
[],
taskListData
:
[],
currentTask
:
''
,
currentTask
:
''
,
colorList
:
[
colorList
:
[
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
localStorage
.
setItem
(
'taskDetail'
,
this
.
$Base64
.
encode
(
JSON
.
stringify
(
val
)));
localStorage
.
setItem
(
'taskDetail'
,
this
.
$Base64
.
encode
(
JSON
.
stringify
(
val
)));
this
.
$router
.
push
({
name
:
'taskDetails'
});
this
.
$router
.
push
({
name
:
'taskDetails'
});
},
},
getDeaprtmentTask
(
val
)
{
getDeaprtmentTask
(
val
)
{
// 获取数据
this
.
$axios
.
getTaskFindById
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getTaskFindById
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
}
}
})
})
},
},
handleNodeClick
(
data
)
{
handleNodeClick
(
data
)
{
// 点击tree跳转任务详情
console
.
log
(
data
);
console
.
log
(
data
);
localStorage
.
setItem
(
'taskDetail'
,
this
.
$Base64
.
encode
(
JSON
.
stringify
(
data
)));
localStorage
.
setItem
(
'taskDetail'
,
this
.
$Base64
.
encode
(
JSON
.
stringify
(
data
)));
this
.
$router
.
push
({
name
:
'taskDetails'
});
this
.
$router
.
push
({
name
:
'taskDetails'
});
...
...
src/views/task/TaskDetails.vue
浏览文件 @
67180a2f
...
@@ -476,7 +476,7 @@
...
@@ -476,7 +476,7 @@
//import引入的组件需要注入到对象中才能使用
//import引入的组件需要注入到对象中才能使用
components
:
{
History
},
components
:
{
History
},
data
()
{
data
()
{
let
checkScore1
=
(
rule
,
value
,
callback
)
=>
{
let
checkScore1
=
(
rule
,
value
,
callback
)
=>
{
// 自我评分验证
if
(
this
.
isExecutor
===
false
)
{
if
(
this
.
isExecutor
===
false
)
{
callback
();
callback
();
}
else
if
(
!
value
)
{
}
else
if
(
!
value
)
{
...
@@ -495,7 +495,7 @@
...
@@ -495,7 +495,7 @@
callback
();
callback
();
}
}
};
};
let
checkGroup
=
(
rule
,
value
,
callback
)
=>
{
let
checkGroup
=
(
rule
,
value
,
callback
)
=>
{
// 组长评分验证
console
.
log
(
rule
)
console
.
log
(
rule
)
console
.
log
(
value
)
console
.
log
(
value
)
if
(
this
.
isAudit
===
false
)
{
if
(
this
.
isAudit
===
false
)
{
...
@@ -535,7 +535,7 @@
...
@@ -535,7 +535,7 @@
// }
// }
};
};
let
checkDiretor
=
(
rule
,
value
,
callback
)
=>
{
let
checkDiretor
=
(
rule
,
value
,
callback
)
=>
{
// 总监评分验证
if
(
this
.
taskForm
.
majordomos
!==
undefined
&&
this
.
taskForm
.
majordomos
.
length
>
0
&&
this
.
taskForm
.
majordomos
.
findIndex
(
item
=>
item
.
id
===
this
.
userDetail
.
id
)
===
-
1
)
{
if
(
this
.
taskForm
.
majordomos
!==
undefined
&&
this
.
taskForm
.
majordomos
.
length
>
0
&&
this
.
taskForm
.
majordomos
.
findIndex
(
item
=>
item
.
id
===
this
.
userDetail
.
id
)
===
-
1
)
{
if
(
this
.
evaStatus
===
'1'
||
this
.
evaStatus
===
'2'
||
this
.
evaStatus
===
'4'
||
this
.
evaStatus
===
'5'
||
this
.
evaStatus
===
'6'
)
{
if
(
this
.
evaStatus
===
'1'
||
this
.
evaStatus
===
'2'
||
this
.
evaStatus
===
'4'
||
this
.
evaStatus
===
'5'
||
this
.
evaStatus
===
'6'
)
{
callback
();
callback
();
...
@@ -569,7 +569,7 @@
...
@@ -569,7 +569,7 @@
callback
();
callback
();
}
}
};
};
let
checkVice
=
(
rule
,
value
,
callback
)
=>
{
let
checkVice
=
(
rule
,
value
,
callback
)
=>
{
// 副总经理评分验证
console
.
log
(
rule
,
value
)
console
.
log
(
rule
,
value
)
if
((
this
.
taskForm
.
assistantManagers
!==
undefined
&&
this
.
taskForm
.
assistantManagers
.
length
>
0
&&
this
.
taskForm
.
assistantManagers
.
findIndex
(
item
=>
item
.
id
===
this
.
userDetail
.
id
)
===
-
1
)
||
this
.
evaStatus
===
'1'
||
this
.
evaStatus
===
'2'
||
this
.
evaStatus
===
'3'
||
this
.
evaStatus
===
'5'
||
this
.
evaStatus
===
'6'
)
{
if
((
this
.
taskForm
.
assistantManagers
!==
undefined
&&
this
.
taskForm
.
assistantManagers
.
length
>
0
&&
this
.
taskForm
.
assistantManagers
.
findIndex
(
item
=>
item
.
id
===
this
.
userDetail
.
id
)
===
-
1
)
||
this
.
evaStatus
===
'1'
||
this
.
evaStatus
===
'2'
||
this
.
evaStatus
===
'3'
||
this
.
evaStatus
===
'5'
||
this
.
evaStatus
===
'6'
)
{
callback
();
callback
();
...
@@ -618,7 +618,7 @@
...
@@ -618,7 +618,7 @@
callback
();
callback
();
}
}
};
};
let
checkJust
=
(
rule
,
value
,
callback
)
=>
{
let
checkJust
=
(
rule
,
value
,
callback
)
=>
{
// 总经理评分验证
if
((
this
.
taskForm
.
generalManagers
!==
undefined
&&
this
.
taskForm
.
generalManagers
.
length
>
0
&&
this
.
taskForm
.
generalManagers
.
findIndex
(
item
=>
item
.
id
===
this
.
userDetail
.
id
)
===
-
1
)
||
this
.
evaStatus
===
'1'
||
this
.
evaStatus
===
'2'
||
this
.
evaStatus
===
'3'
||
this
.
evaStatus
===
'4'
)
{
if
((
this
.
taskForm
.
generalManagers
!==
undefined
&&
this
.
taskForm
.
generalManagers
.
length
>
0
&&
this
.
taskForm
.
generalManagers
.
findIndex
(
item
=>
item
.
id
===
this
.
userDetail
.
id
)
===
-
1
)
||
this
.
evaStatus
===
'1'
||
this
.
evaStatus
===
'2'
||
this
.
evaStatus
===
'3'
||
this
.
evaStatus
===
'4'
)
{
callback
();
callback
();
}
else
if
(
!
value
)
{
}
else
if
(
!
value
)
{
...
@@ -666,17 +666,17 @@
...
@@ -666,17 +666,17 @@
callback
();
callback
();
}
}
};
};
let
workScore
=
(
rule
,
value
,
callback
)
=>
{
let
workScore
=
(
rule
,
value
,
callback
)
=>
{
// 考评分数验证
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'考评
系
数不能为空'
));
return
callback
(
new
Error
(
'考评
分
数不能为空'
));
}
}
if
(
value
<
50
)
{
if
(
value
<
50
)
{
callback
(
new
Error
(
'考评
系
数不能低于50'
));
callback
(
new
Error
(
'考评
分
数不能低于50'
));
}
else
{
}
else
{
callback
();
callback
();
}
}
};
};
let
workLoadScore
=
(
rule
,
value
,
callback
)
=>
{
let
workLoadScore
=
(
rule
,
value
,
callback
)
=>
{
// 任务量验证
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'任务量不能为空'
));
return
callback
(
new
Error
(
'任务量不能为空'
));
}
else
if
(
value
.
toString
().
length
>
4
)
{
}
else
if
(
value
.
toString
().
length
>
4
)
{
...
@@ -851,7 +851,7 @@
...
@@ -851,7 +851,7 @@
fileDownload
(
res
.
data
,
val
.
name
);
fileDownload
(
res
.
data
,
val
.
name
);
})
})
},
},
goList
()
{
goList
()
{
// 判断修改信息是否保存
// console.log(JSON.stringify(this.saveHistoryDetail));
// console.log(JSON.stringify(this.saveHistoryDetail));
// console.log(JSON.stringify(this.taskForm));
// console.log(JSON.stringify(this.taskForm));
if
(
this
.
isPublisher
===
true
)
{
if
(
this
.
isPublisher
===
true
)
{
...
@@ -894,7 +894,7 @@
...
@@ -894,7 +894,7 @@
this
.
$router
.
push
({
name
:
'viewTask'
});
this
.
$router
.
push
({
name
:
'viewTask'
});
}
}
},
},
getUserById
(
val
)
{
getUserById
(
val
)
{
// 获取组长组员数据
this
.
$axios
.
getUserById
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getUserById
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -903,13 +903,13 @@
...
@@ -903,13 +903,13 @@
}
}
})
})
},
},
getDetailsTask
(
val
)
{
getDetailsTask
(
val
)
{
// 获取任务数据
this
.
$axios
.
getWorkDetails
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getWorkDetails
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
this
.
saveDetailTask
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
this
.
saveDetailTask
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
let
postData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
let
postData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
if
((
postData
.
workCoefficient
.
toString
()).
indexOf
(
"."
)
>
-
1
)
{
if
((
postData
.
workCoefficient
.
toString
()).
indexOf
(
"."
)
>
-
1
)
{
// 根据后台返回的任务系数,计算任务分
postData
.
workCoefficient
=
(
Math
.
round
(
postData
.
workCoefficient
*
100
)
/
100
)
*
100
;
postData
.
workCoefficient
=
(
Math
.
round
(
postData
.
workCoefficient
*
100
)
/
100
)
*
100
;
}
else
{
}
else
{
if
((
postData
.
workCoefficient
.
toString
()).
length
<
2
)
{
if
((
postData
.
workCoefficient
.
toString
()).
length
<
2
)
{
...
@@ -922,7 +922,7 @@
...
@@ -922,7 +922,7 @@
this
.
workScores
=
JSON
.
parse
(
JSON
.
stringify
(
postData
.
workCoefficient
));
this
.
workScores
=
JSON
.
parse
(
JSON
.
stringify
(
postData
.
workCoefficient
));
this
.
taskForm
=
postData
;
this
.
taskForm
=
postData
;
let
arr
=
[];
let
arr
=
[];
if
(
res
.
data
.
publisher
.
id
===
this
.
userDetail
.
id
)
{
if
(
res
.
data
.
publisher
.
id
===
this
.
userDetail
.
id
)
{
// 判断是否是发布者
this
.
isPublisher
=
true
;
this
.
isPublisher
=
true
;
if
(
postData
.
status
===
'ongoing'
||
postData
.
status
===
'unpublished'
)
{
if
(
postData
.
status
===
'ongoing'
||
postData
.
status
===
'unpublished'
)
{
if
(
postData
.
crewList
!==
null
&&
postData
.
crewList
.
length
>
0
)
{
if
(
postData
.
crewList
!==
null
&&
postData
.
crewList
.
length
>
0
)
{
...
@@ -960,7 +960,7 @@
...
@@ -960,7 +960,7 @@
}
else
{
}
else
{
this
.
isPublisher
=
false
;
this
.
isPublisher
=
false
;
}
}
if
(
res
.
data
.
executor
.
id
===
this
.
userDetail
.
id
)
{
if
(
res
.
data
.
executor
.
id
===
this
.
userDetail
.
id
)
{
// 是否是执行者
this
.
isExecutor
=
true
;
this
.
isExecutor
=
true
;
}
else
{
}
else
{
this
.
isExecutor
=
false
;
this
.
isExecutor
=
false
;
...
@@ -986,14 +986,14 @@
...
@@ -986,14 +986,14 @@
}
}
console
.
log
(
'audit-----'
+
this
.
isAudit
);
console
.
log
(
'audit-----'
+
this
.
isAudit
);
}
}
this
.
$axios
.
putCanSubmitTask
(
res
.
data
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
putCanSubmitTask
(
res
.
data
.
id
).
then
((
res
)
=>
{
// 判断是否能提交
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
console
.
log
(
res
.
data
.
isNotCommit
===
'1'
)
console
.
log
(
res
.
data
.
isNotCommit
===
'1'
)
this
.
isCanSubmit
=
res
.
data
.
isNotCommit
===
'1'
?
true
:
false
;
this
.
isCanSubmit
=
res
.
data
.
isNotCommit
===
'1'
?
true
:
false
;
}
}
})
})
this
.
$axios
.
getScore
(
res
.
data
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
getScore
(
res
.
data
.
id
).
then
((
res
)
=>
{
// 考评分数
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
if
(
res
.
data
!==
null
&&
res
.
data
.
score1
!==
''
)
{
if
(
res
.
data
!==
null
&&
res
.
data
.
score1
!==
''
)
{
...
@@ -1026,14 +1026,14 @@
...
@@ -1026,14 +1026,14 @@
// this.timeLineIndex();
// this.timeLineIndex();
})
})
},
},
getBacks
()
{
getBacks
()
{
// 任务时间线
this
.
$axios
.
getTaskBack
(
this
.
taskForm
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
getTaskBack
(
this
.
taskForm
.
id
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
)
this
.
isTimeLineReturn
=
res
.
data
.
back
;
this
.
isTimeLineReturn
=
res
.
data
.
back
;
this
.
timeLineIndex
();
this
.
timeLineIndex
();
})
})
},
},
timeLineIndex
()
{
timeLineIndex
()
{
// 任务时间线
let
timeList
=
[];
let
timeList
=
[];
if
(
this
.
taskForm
.
status
===
'ongoing'
)
{
if
(
this
.
taskForm
.
status
===
'ongoing'
)
{
this
.
timelines
=
1
;
this
.
timelines
=
1
;
...
@@ -1278,7 +1278,7 @@
...
@@ -1278,7 +1278,7 @@
}
}
console
.
log
(
timeList
)
console
.
log
(
timeList
)
},
},
getRelatedWorkIdTask
(
val
)
{
getRelatedWorkIdTask
(
val
)
{
// 相关任务
this
.
relatedTableData
=
[];
this
.
relatedTableData
=
[];
this
.
$axios
.
getRelatedWorkId
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getRelatedWorkId
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -1288,7 +1288,7 @@
...
@@ -1288,7 +1288,7 @@
}
}
})
})
},
},
getWorkLoadNum
()
{
getWorkLoadNum
()
{
// 剩余工作量
this
.
$axios
.
putFindWorkload
(
this
.
taskForm
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
putFindWorkload
(
this
.
taskForm
.
id
).
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
...
@@ -1310,13 +1310,13 @@
...
@@ -1310,13 +1310,13 @@
}
}
})
})
},
},
closeTaskMainDialog
()
{
closeTaskMainDialog
()
{
// 相关任务弹框
this
.
dialogTaskMainVisible
=
false
;
this
.
dialogTaskMainVisible
=
false
;
},
},
showTaskMain
()
{
showTaskMain
()
{
this
.
dialogTaskMainVisible
=
true
;
this
.
dialogTaskMainVisible
=
true
;
},
},
openHistory
()
{
openHistory
()
{
// 历史操作弹框
this
.
$axios
.
getTaskHistory
(
this
.
taskForm
.
id
).
then
((
res
)
=>
{
this
.
$axios
.
getTaskHistory
(
this
.
taskForm
.
id
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -1325,14 +1325,14 @@
...
@@ -1325,14 +1325,14 @@
})
})
this
.
showHistoryDialog
=
true
;
this
.
showHistoryDialog
=
true
;
},
},
closeHistory
()
{
closeHistory
()
{
// 关闭历史操作弹框
this
.
showHistoryDialog
=
false
;
this
.
showHistoryDialog
=
false
;
},
},
closeChangeTaskDialog
()
{
closeChangeTaskDialog
()
{
this
.
dialogTaskChangeVisible
=
false
;
this
.
dialogTaskChangeVisible
=
false
;
this
.
changeTaskTextarea
=
''
;
this
.
changeTaskTextarea
=
''
;
},
},
openChangeTaskDialog
(
val
)
{
openChangeTaskDialog
(
val
)
{
// 修改弹框
this
.
$refs
[
val
].
validate
((
valid
)
=>
{
this
.
$refs
[
val
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
dialogTaskChangeVisible
=
true
;
this
.
dialogTaskChangeVisible
=
true
;
...
@@ -1718,7 +1718,7 @@
...
@@ -1718,7 +1718,7 @@
openDeleteTaskDialog
()
{
openDeleteTaskDialog
()
{
this
.
dialogDeleteTaskVisible
=
true
;
this
.
dialogDeleteTaskVisible
=
true
;
},
},
changeTaskSubmit
()
{
changeTaskSubmit
()
{
// 修改任务弹框
// 修改任务确定
// 修改任务确定
console
.
log
(
this
.
taskForm
)
console
.
log
(
this
.
taskForm
)
if
(
this
.
taskForm
.
status
===
'ongoing'
)
{
if
(
this
.
taskForm
.
status
===
'ongoing'
)
{
...
@@ -1774,7 +1774,7 @@
...
@@ -1774,7 +1774,7 @@
'showDialog'
:
false
'showDialog'
:
false
});
});
},
},
statusTaskSubmit
(
val
,
tip
)
{
statusTaskSubmit
(
val
,
tip
)
{
// 提交撤回任务弹框
let
msg
=
''
;
let
msg
=
''
;
let
re
=
''
;
let
re
=
''
;
if
(
tip
===
'撤回'
)
{
if
(
tip
===
'撤回'
)
{
...
@@ -1840,7 +1840,7 @@
...
@@ -1840,7 +1840,7 @@
})
})
}
}
},
},
submitDeleteDialog
()
{
submitDeleteDialog
()
{
// 删除任务弹框
console
.
log
(
this
.
deleteCheck
)
console
.
log
(
this
.
deleteCheck
)
let
pw
=
this
.
deleteCheck
.
includes
(
'个人工作量'
)
?
1
:
0
;
let
pw
=
this
.
deleteCheck
.
includes
(
'个人工作量'
)
?
1
:
0
;
let
wc
=
this
.
deleteCheck
.
includes
(
'任务工作量'
)
?
1
:
0
;
let
wc
=
this
.
deleteCheck
.
includes
(
'任务工作量'
)
?
1
:
0
;
...
@@ -1917,7 +1917,7 @@
...
@@ -1917,7 +1917,7 @@
}
}
});
});
},
},
breakDownTask
()
{
breakDownTask
()
{
// 分解任务
console
.
log
(
this
.
taskForm
)
console
.
log
(
this
.
taskForm
)
console
.
log
(
this
.
leaderOptions
)
console
.
log
(
this
.
leaderOptions
)
let
arr
=
[];
let
arr
=
[];
...
@@ -1967,24 +1967,17 @@
...
@@ -1967,24 +1967,17 @@
}
}
}
}
},
},
addGroupChange
(
val
)
{
addGroupChange
(
val
)
{
// 计算任务量
console
.
log
(
val
)
let
count
;
let
count
;
let
a1
=
Date
.
parse
(
this
.
taskForm
.
stateTime
);
let
a1
=
Date
.
parse
(
this
.
taskForm
.
stateTime
);
let
a2
=
Date
.
parse
(
this
.
taskForm
.
completeTime
);
let
a2
=
Date
.
parse
(
this
.
taskForm
.
completeTime
);
console
.
log
(
a1
,
a2
)
console
.
log
(
a2
-
a1
);
count
=
Math
.
ceil
((
a2
-
a1
)
/
(
1000
*
60
*
60
*
24
))
+
1
;
//核心:时间戳相减,然后除以天数
count
=
Math
.
ceil
((
a2
-
a1
)
/
(
1000
*
60
*
60
*
24
))
+
1
;
//核心:时间戳相减,然后除以天数
console
.
log
(
count
)
let
crew
=
[...
val
];
let
crew
=
[...
val
];
let
index
=
crew
.
indexOf
(
this
.
taskForm
.
executor
.
id
);
let
index
=
crew
.
indexOf
(
this
.
taskForm
.
executor
.
id
);
console
.
log
(
index
)
if
(
index
>
-
1
)
{
if
(
index
>
-
1
)
{
crew
.
splice
(
index
,
1
);
crew
.
splice
(
index
,
1
);
}
}
console
.
log
(
crew
.
length
)
count
=
(
1
+
crew
.
length
)
*
count
;
count
=
(
1
+
crew
.
length
)
*
count
;
console
.
log
(
count
)
this
.
taskForm
.
workload
=
count
;
this
.
taskForm
.
workload
=
count
;
},
},
// 完成任务附件添加
// 完成任务附件添加
...
...
src/views/task/UnpublishedTask.vue
浏览文件 @
67180a2f
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
//import引入的组件需要注入到对象中才能使用
//import引入的组件需要注入到对象中才能使用
components
:
{
EditorBar
},
components
:
{
EditorBar
},
data
()
{
data
()
{
let
stateTimeVal
=
(
rule
,
value
,
callback
)
=>
{
let
stateTimeVal
=
(
rule
,
value
,
callback
)
=>
{
// 时间验证
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'任务开始时间不能为空'
));
return
callback
(
new
Error
(
'任务开始时间不能为空'
));
}
}
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
callback
();
callback
();
}
}
};
};
let
completeVal
=
(
rule
,
value
,
callback
)
=>
{
let
completeVal
=
(
rule
,
value
,
callback
)
=>
{
// 时间验证
console
.
log
(
rule
,
value
,
callback
)
console
.
log
(
rule
,
value
,
callback
)
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'预计完成时间为空'
));
return
callback
(
new
Error
(
'预计完成时间为空'
));
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
callback
();
callback
();
}
}
};
};
let
workloadVal
=
(
rule
,
value
,
callback
)
=>
{
let
workloadVal
=
(
rule
,
value
,
callback
)
=>
{
// 时间验证
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'任务量不能为空'
));
return
callback
(
new
Error
(
'任务量不能为空'
));
}
else
{
}
else
{
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
};
};
//这里存放数据
//这里存放数据
return
{
return
{
taskForm
:
{
taskForm
:
{
// 表单
title
:
''
,
title
:
''
,
publisher
:
''
,
publisher
:
''
,
stateTime
:
''
,
stateTime
:
''
,
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
// }
// }
// }
// }
},
},
rules
:
{
rules
:
{
// 表单验证
title
:
[
title
:
[
{
required
:
true
,
message
:
'请输入任务名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入任务名称'
,
trigger
:
'blur'
},
],
],
...
@@ -286,7 +286,7 @@
...
@@ -286,7 +286,7 @@
computed
:
{},
computed
:
{},
//监控data中的数据变化
//监控data中的数据变化
watch
:
{
watch
:
{
'taskForm.completeTime'
:
function
(
val
)
{
'taskForm.completeTime'
:
function
(
val
)
{
// 监听时间
console
.
log
(
val
)
console
.
log
(
val
)
let
count
;
let
count
;
if
(
val
!==
''
&&
val
!==
null
)
{
if
(
val
!==
''
&&
val
!==
null
)
{
...
@@ -313,7 +313,7 @@
...
@@ -313,7 +313,7 @@
this
.
taskForm
.
workload
=
count
;
this
.
taskForm
.
workload
=
count
;
}
}
},
},
'taskForm.crewList'
:
function
(
val
)
{
'taskForm.crewList'
:
function
(
val
)
{
// 监听组员
console
.
log
(
val
)
console
.
log
(
val
)
if
(
this
.
taskForm
.
completeTime
!==
''
&&
this
.
taskForm
.
completeTime
!==
null
)
{
if
(
this
.
taskForm
.
completeTime
!==
''
&&
this
.
taskForm
.
completeTime
!==
null
)
{
let
count
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
taskForm
.
workload
));
let
count
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
taskForm
.
workload
));
...
@@ -340,7 +340,7 @@
...
@@ -340,7 +340,7 @@
// console.log(val)
// console.log(val)
return
Date
.
parse
(
val
)
<
Date
.
parse
(
this
.
taskForm
.
stateTime
)
-
8.64e7
;
return
Date
.
parse
(
val
)
<
Date
.
parse
(
this
.
taskForm
.
stateTime
)
-
8.64e7
;
},
},
getUserById
(
val
)
{
getUserById
(
val
)
{
// 获取人
this
.
$axios
.
getUserById
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getUserById
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -357,7 +357,7 @@
...
@@ -357,7 +357,7 @@
}
}
})
})
},
},
getDetailsTask
(
val
)
{
getDetailsTask
(
val
)
{
// 任务详情
this
.
$axios
.
getWorkDetails
(
val
).
then
((
res
)
=>
{
this
.
$axios
.
getWorkDetails
(
val
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
request
.
status
===
200
)
{
if
(
res
.
request
.
status
===
200
)
{
...
@@ -400,7 +400,7 @@
...
@@ -400,7 +400,7 @@
}
}
});
});
},
},
submitForm
(
formName
)
{
submitForm
(
formName
)
{
// 提交
// alert(this.content);
// alert(this.content);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论