Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-task
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0004877f
authored
Dec 09, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
4aa00a56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
55 deletions
src/views/task/addTask/index.vue
src/views/task/addTask/index.vue
View file @
0004877
...
...
@@ -364,7 +364,6 @@
itm.repeatFlag || (isEditor && activityStatus == 2)
"
v-model
.
trim=
"itm.repeatCount"
@
blur=
"handleBlur(itm)"
type=
"number"
:min=
"1"
oninput=
"value=value.replace(/^0|[^0-9]/g, '')"
...
...
@@ -727,9 +726,7 @@ export default {
let
textId
=
this
.
textIds
.
findIndex
((
item
)
=>
item
==
id
)
if
(
textId
!=
-
1
)
return
this
.
textIds
.
push
(
id
)
console
.
log
(
id
,
dateTaskIndex
,
taskIndex
)
let
editor
=
new
E
(
this
.
$refs
[
id
])
console
.
log
(
editor
)
editor
.
config
.
showMenuTooltips
=
true
editor
.
config
.
menuTooltipPosition
=
'down'
editor
.
config
.
height
=
400
...
...
@@ -746,18 +743,15 @@ export default {
'emoticon'
,
]
editor
.
config
.
onchange
=
(
newHtml
)
=>
{
console
.
log
(
newHtml
)
this
.
$set
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
],
'textContent'
,
newHtml
)
console
.
log
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
])
}
editor
.
config
.
onchangeTimeout
=
5000
editor
.
create
()
if
(
textContent
)
{
console
.
log
(
textContent
)
editor
.
txt
.
html
(
textContent
)
}
},
...
...
@@ -920,7 +914,6 @@ export default {
if
(
!
this
.
addTabList
.
length
&&
!
this
.
isClone
)
{
this
.
addTabList
=
this
.
getTab
(
date
,
dateTime
)
this
.
taskList
=
this
.
addTabList
.
concat
(
this
.
oldTaskList
)
console
.
log
(
this
.
taskList
,
'====='
)
this
.
$nextTick
(()
=>
{
this
.
textIds
=
[]
this
.
creatEdtior
()
...
...
@@ -1030,13 +1023,6 @@ export default {
// 处理当前日期之前是否可编辑处理
this
.
getEditTaskList
()
this
.
$nextTick
(()
=>
{
// this.taskList.map((item, index) => {
// item.missionList.map((itm, inx) => {
// if (itm.textType == 1) {
// this.getTextBox(itm.id, index, inx, itm.textContent)
// }
// })
// })
this
.
creatEdtior
()
this
.
cloneList
=
this
.
taskList
})
...
...
@@ -1044,11 +1030,9 @@ export default {
},
// 任务日期变化重新创建富文本
creatEdtior
()
{
console
.
log
(
this
.
taskList
,
'====='
)
this
.
taskList
.
map
((
item
,
index
)
=>
{
item
.
missionList
.
map
((
itm
,
inx
)
=>
{
if
(
itm
.
textType
==
1
)
{
console
.
log
(
111
)
let
textId
=
itm
.
id
||
itm
.
taskid
this
.
getTextBox
(
textId
,
index
,
inx
,
itm
.
textContent
)
}
...
...
@@ -1076,29 +1060,6 @@ export default {
})
startTime
.
setDate
(
startTime
.
getDate
()
+
1
)
}
// 多添加一个完整周期tab
// this.taskList.push({
// activityTime: '-1',
// missionList: [],
// })
// // 如果是编辑/复制页面,任务计划回显
// if (this.isEditor || (this.isClone && !this.basicForm.activityName))
// this.dealEcho()
// if (this.isClone && this.basicForm.activityName) this.dealEcho(1)
// // 处理当前日期之前是否可编辑处理
// this.getEditTaskList()
// // 如果是克隆,还需处理克隆时间
// if (this.isClone && !this.basicForm.activityName) this.getCloneTaskList()
// this.$nextTick(() => {
// this.taskList.map((item, index) => {
// item.missionList.map((itm, inx) => {
// if (itm.textType == 1) {
// this.getTextBox(itm.id, index, inx, itm.textContent)
// }
// })
// })
// this.cloneList = this.taskList
// })
return
tabList
},
// 处理任务计划回显
...
...
@@ -1143,7 +1104,6 @@ export default {
//date = date.replace(/[年月日]/g, "-").slice(0, -1);
//方式三处理传入年月日格式
//date = date.replace(/[年月]/g, "-").replace("日", "");
// console.log(date, "date"); // 2022-07-12
const
nDate
=
new
Date
(
date
)
nDate
.
setDate
(
nDate
.
getDate
()
+
day
)
...
...
@@ -1175,7 +1135,6 @@ export default {
},
// 任务选择类型切换
selectTaskType
(
dateTask
,
dateTaskIndex
,
task
,
taskIndex
)
{
console
.
log
(
dateTaskIndex
,
taskIndex
,
task
)
// dateTask -- 具体哪一天的任务对象
// dateTaskIndex -- 具体哪一天的任务对象索引
// task -- 具体哪个任务
...
...
@@ -1273,7 +1232,6 @@ export default {
].
missionMaterialList
.
findIndex
((
item
)
=>
{
return
item
.
materialType
==
4
})
console
.
log
(
hasLink
)
if
(
hasLink
!=
-
1
)
{
this
.
$set
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
],
...
...
@@ -1289,7 +1247,6 @@ export default {
)
this
.
$forceUpdate
()
}
console
.
log
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
])
},
shareMatrial
(
val
)
{
this
.
shareEditor
=
val
...
...
@@ -1307,8 +1264,6 @@ export default {
taskIndex
,
1
)
console
.
log
(
delList
)
console
.
log
(
this
.
taskList
[
dateTaskIndex
].
missionList
[
taskIndex
])
// if (delList[0].textType == 1) {
// }
this
.
$refs
[
'taskForm'
][
dateTaskIndex
].
clearValidate
()
...
...
@@ -1337,14 +1292,13 @@ export default {
})
})
},
handleBlur
(
dateTask
)
{
if
(
dateTask
.
repeatCount
)
{
dateTask
.
repeatFlag
=
false
}
},
//
handleBlur(dateTask) {
//
if (dateTask.repeatCount) {
//
dateTask.repeatFlag = false
//
}
//
},
// 重复次数选择框改变
repeatChange
(
listindex
,
dateTask
,
type
,
taskIndex
)
{
console
.
log
(
type
,
'type'
)
if
(
type
)
{
// 去除校验
this
.
$refs
[
'taskForm'
][
listindex
].
fields
.
map
((
i
)
=>
{
...
...
@@ -1429,7 +1383,6 @@ export default {
let
hasLink
=
itm
.
missionMaterialList
.
findIndex
(
(
list
)
=>
list
.
type
==
4
)
console
.
log
(
hasLink
,
'hasLink'
)
if
(
hasLink
==
-
1
)
{
itm
.
showArticle
=
true
}
else
{
...
...
@@ -1442,7 +1395,6 @@ export default {
}
})
})
console
.
log
(
this
.
taskEditList
.
missionDateList
,
'==='
)
this
.
setHouseRatesColumn
(
startTime
,
endTime
)
if
(
this
.
isClone
)
{
this
.
taskDateNum
=
this
.
getDateByDays
(
startTime
,
endTime
)
...
...
@@ -1502,7 +1454,6 @@ export default {
},
// 任务计划表单验证
taskFormValidate
()
{
// console.log(submitList)
this
.
taskList
.
map
((
item
,
index
)
=>
{
this
.
$refs
[
'taskForm'
][
index
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
...
...
@@ -1610,7 +1561,6 @@ export default {
}
params
.
missionDateList
=
this
.
taskList
params
.
id
=
this
.
taskId
console
.
log
(
params
,
'params'
)
// 创建
if
(
!
this
.
isEditor
)
{
taskApi
.
creatMission
(
params
).
then
(
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment