Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
69afca5c
Commit
69afca5c
authored
May 28, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
automatictmsubmitedit add drafthistory
parent
bb0147bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
2 deletions
+116
-2
fqboss/app/front/vues/pages/automatictmsubmitedit/automatictmsubmitedit.html
+30
-2
fqboss/app/front/vues/pages/automatictmsubmitedit/automatictmsubmitedit.js
+86
-0
No files found.
fqboss/app/front/vues/pages/automatictmsubmitedit/automatictmsubmitedit.html
View file @
69afca5c
...
...
@@ -8,8 +8,10 @@
<div
style=
"text-align:left"
>
<gsb-step
:psteps=
"steps"
:step=
"step"
></gsb-step>
<el-row>
<el-button
type=
"text"
style=
"float:right;margin:0 5px;"
@
click=
"usedraft"
>
复用草稿数据
</el-button>
<el-button
type=
"text"
style=
"float:right;margin:0 5px;"
@
click=
"savedraft"
>
保存为草稿
</el-button>
<!-- <el-button type="text" style="float:right;margin:0 5px;" @click="usedraft">复用草稿数据</el-button>
<el-button type="text" style="float:right;margin:0 5px;" @click="savedraft">保存为草稿</el-button> -->
<el-button
type=
"text"
style=
"float:right;margin:0 5px;"
@
click=
"findDraft"
>
查看草稿
</el-button>
<el-button
type=
"text"
style=
"float:right;margin:0 5px;"
@
click=
"saveDraft = true"
>
保存草稿
</el-button>
<div
style=
"clear:both"
></div>
</el-row>
</div>
...
...
@@ -507,4 +509,29 @@
<br
/>
</div>
</div>
<el-dialog
title=
"请输入草稿名称"
:visible
.
sync=
"saveDraft"
width=
"50%"
:before-close=
"draftNameBoxClose"
>
<el-input
v-model=
"inputDraftName"
placeholder=
"请输入草稿名称"
></el-input>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"saveDraft = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"createDraft"
>
保 存
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"草稿列表"
:visible
.
sync=
"viewDrafts"
width=
"50%"
:before-close=
"viewDraftsBoxClose"
>
<el-table
:data=
"viewDraftData"
border
style=
"width: 100%"
>
<el-table-column
fixed
prop=
"draftId"
align=
"center"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"draftName"
align=
"center"
label=
"草稿名称"
>
</el-table-column>
<el-table-column
fixed=
"right"
align=
"center"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
@
click=
"reuseDraft(scope.row)"
type=
"text"
size=
"small"
>
复用
</el-button>
<el-button
@
click=
"deleteDraft(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"viewDrafts = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"viewDrafts = false"
>
完 成
</el-button>
</span>
</el-dialog>
</div>
\ No newline at end of file
fqboss/app/front/vues/pages/automatictmsubmitedit/automatictmsubmitedit.js
View file @
69afca5c
...
...
@@ -51,6 +51,10 @@
historyOrderNum
:
""
,
showSelectedNclList
:
false
,
fkey
:
0
,
saveDraft
:
false
,
viewDrafts
:
false
,
inputDraftName
:
''
,
viewDraftData
:
[],
isIndeterminate
:
false
,
checkAll
:
false
,
checkedNcl
:
[],
...
...
@@ -986,6 +990,88 @@
this
.
step
=
Number
(
this
.
step
)
-
1
;
this
.
step
=
this
.
step
.
toString
();
},
draftNameBoxClose
(){
this
.
saveDraft
=
false
;
},
viewDraftsBoxClose
(){
this
.
viewDrafts
=
false
;
},
reuseDraft
:
function
(
row
)
{
console
.
log
(
'=========row'
,
row
.
draftId
,
row
.
draftName
);
this
.
$root
.
getReq
(
"web/drafthistoryCtl/findOneDraft"
,
{
id
:
row
.
draftId
}).
then
(
d
=>
{
console
.
log
(
"findOneDraft return :"
,
d
);
var
data
=
d
.
data
.
draftData
;
if
(
data
.
checkedNcl
)
{
this
.
checkedNcl
=
data
.
checkedNcl
;
}
if
(
data
.
form
)
{
this
.
form
=
data
.
form
;
}
if
(
data
.
nclOne
)
{
this
.
nclOne
=
data
.
nclOne
;
}
if
(
data
.
apply
)
{
this
.
apply
=
data
.
apply
;
}
}).
catch
(
e
=>
{
console
.
log
(
'findDraft error: '
,
e
);
})
},
findDraft
:
function
()
{
this
.
viewDrafts
=
true
;
this
.
$root
.
getReq
(
"/web/drafthistoryCtl/findDraft"
,
{}).
then
(
d
=>
{
console
.
log
(
"findDraft return :"
,
d
);
var
result
=
d
.
data
;
var
draftList
=
[];
result
.
forEach
((
draft
,
idx
)
=>
{
var
draftrow
=
{};
draftrow
.
draftId
=
draft
.
id
;
draftrow
.
draftName
=
draft
.
draftName
;
draftList
.
push
(
draftrow
);
});
this
.
viewDraftData
=
draftList
;
}).
catch
(
e
=>
{
console
.
log
(
'findDraft error: '
,
e
);
});
},
updateDraft
:
function
()
{
var
data
=
{
obj
:
{
id
:
'2'
},
newData
:
{
draftData
:
{
"name"
:
"更新测试数据"
}}};
this
.
$root
.
postReq
(
"/web/drafthistoryCtl/updateDraft"
,
data
).
then
(
d
=>
{
console
.
log
(
"updateDraft return:"
,
d
);
}).
catch
(
e
=>
{
console
.
log
(
"updateDraft error "
,
e
);
});
},
deleteDraft
:
function
(
row
)
{
console
.
log
(
'----------'
,
row
.
draftId
);
var
data
=
{
id
:
row
.
draftId
};
this
.
$root
.
getReq
(
"/web/drafthistoryCtl/deleteDraft"
,
data
).
then
(
d
=>
{
console
.
log
(
"deleteDraft return:"
,
d
);
this
.
$message
.
success
(
"删除成功"
);
this
.
viewDraftData
.
forEach
((
rowData
,
idx
)
=>
{
if
(
row
===
rowData
)
{
this
.
viewDraftData
.
splice
(
idx
,
1
);
}
});
}).
catch
(
e
=>
{
console
.
log
(
"deleteDraft error: "
,
e
);
});
},
createDraft
:
function
()
{
if
(
!
this
.
inputDraftName
)
{
this
.
$message
.
warning
(
"草稿名称不能为空"
);
return
;
};
var
data
=
{
draftName
:
this
.
inputDraftName
,
draftData
:
{
checkedNcl
:
this
.
checkedNcl
,
form
:
this
.
form
,
nclOne
:
this
.
nclOne
,
apply
:
this
.
apply
}};
this
.
$root
.
postReq
(
"/web/drafthistoryCtl/createDraft"
,
data
).
then
(
d
=>
{
console
.
log
(
"createDraft return:"
,
d
);
this
.
$message
.
success
(
"保存草稿成功"
);
this
.
saveDraft
=
false
;
}).
catch
(
e
=>
{
console
.
log
(
"createDraft error: "
,
e
);
})
},
savedraft
:
function
()
{
this
.
$confirm
(
'此操作将保存数据至草稿并删除历史草稿数据, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
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