Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
0c9ac1a2
Commit
0c9ac1a2
authored
May 31, 2023
by
李鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加文档类型编辑时切换状态条件
parent
f9c6f7a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
src/page/main/support/document-type/index.vue
src/page/main/support/document-type/index.vue
+24
-6
No files found.
src/page/main/support/document-type/index.vue
View file @
0c9ac1a2
...
...
@@ -157,7 +157,8 @@
:active-value=
"1"
:inactive-value=
"0"
active-text=
"是"
inactive-text=
"否"
/>
inactive-text=
"否"
:before-change=
"() => beforeSwitchStatusInEdit()"
/>
</el-form-item>
</el-form>
<
template
#footer
>
...
...
@@ -394,6 +395,20 @@ const handleCloseForm = () => {
};
state
.
formDialogConfig
.
visible
=
false
;
};
//在编辑状态中切换起停用状态
const
beforeSwitchStatusInEdit
=
async
()
=>
{
if
(
state
.
selectedRow
.
is_active
)
{
const
res
=
await
axios
.
get
(
`/apaas/knowledge/v5/documentmgr/classify/quote/
${
state
.
selectedRow
.
id
}
`
);
if
(
res
.
data
.
code
!==
200
)
{
ElMessage
.
warning
(
"
请将该文档类型下所挂载的文档删除或转移至其他文档类型下再停用!
"
);
return
false
;
}
return
true
;
}
return
true
;
};
const
editCurType
=
async
(
row
)
=>
{
const
res
=
await
axios
.
get
(
`/apaas/knowledge/v5/documentmgr/classify/detail/
${
row
.
id
}
`
);
...
...
@@ -453,13 +468,16 @@ const deleteCurType = (row) => {
content
:
"
确定删除该文档类型吗?
"
,
};
};
//在列表中切换起停用状态
const
beforeSwitchStatus
=
async
(
row
)
=>
{
if
(
row
.
is_active
)
{
const
res
=
await
axios
.
get
(
`/apaas/knowledge/v5/documentmgr/classify/quote/
${
row
.
id
}
`
);
console
.
log
(
res
);
if
(
res
.
data
.
code
!==
200
)
{
ElMessage
.
warning
(
"
请将该文档类型下所挂载的文档删除或转移至其他文档类型下再停用!
"
);
return
false
;
}
}
const
text
=
row
.
is_active
?
"
停用
"
:
"
启用
"
;
state
.
selectedRow
=
row
;
state
.
secondTipsDialogConfig
=
{
...
...
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