Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
813788fb
authored
2023-04-13 10:09:45 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:系统通知
1 parent
6f68f042
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
28 deletions
src/views/system/xttz/components/addDialog.vue
src/views/system/xttz/xttz.vue
src/views/system/xttz/components/addDialog.vue
View file @
813788f
<
template
>
<dialogBox
:title=
"title"
@
submitForm=
"submitForm"
saveButton=
"保存"
:isFullscreen=
"false"
width=
"50%"
@
closeDialog=
"closeDialog"
v-model=
"value"
:isButton=
"isButtonFlag"
>
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
label-width=
"100px"
:rules=
"rules"
>
<el-row>
<el-col
:span=
"24"
>
...
...
@@ -42,8 +40,11 @@
<div
slot=
"tip"
class=
"el-upload__tip"
>
文件大小不超过20MB
</div>
</el-upload>
</div>
<el-form-item
v-if=
"formData.isButtonFlag"
class=
"text-center"
>
<el-button
@
click=
"closeDialog"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
plain
>
确定
</el-button>
</el-form-item>
</el-form>
</dialogBox>
</
template
>
<
script
>
import
{
addSysNotice
,
updateSysNotice
}
from
"@/api/system.js"
;
...
...
@@ -51,9 +52,10 @@ import { upload } from "@/api/system.js";
import
{
quillEditor
}
from
"vue-quill-editor"
;
export
default
{
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
isButtonFlag
:
{
type
:
Boolean
,
default
:
true
},
title
:
{
type
:
String
,
default
:
'新增系统通知'
}
formData
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
components
:
{
quillEditor
},
data
()
{
...
...
@@ -113,10 +115,7 @@ export default {
}
};
},
watch
:
{
value
(
val
)
{
if
(
val
)
{
let
that
=
this
mounted
()
{
this
.
$nextTick
(()
=>
{
//创建富文本粘贴事件监听
let
quill
=
this
.
$refs
.
myQuillEditor
.
quill
;
...
...
@@ -139,12 +138,12 @@ export default {
}
},
false
);
});
}
)
})
if
(
this
.
formData
)
{
this
.
getDetailInfo
(
this
.
formData
)
}
},
mounted
()
{
},
methods
:
{
submitForm
()
{
let
that
=
this
;
...
...
@@ -156,14 +155,13 @@ export default {
that
.
addNotice
();
}
}
else
{
// console.log('error submit!!');
return
false
;
}
});
},
//关闭窗口
closeDialog
()
{
this
.
$
emit
(
"input"
,
false
);
this
.
$
popupCacel
()
this
.
resetRuleForm
();
},
//新增通知
...
...
@@ -171,7 +169,7 @@ export default {
addSysNotice
(
this
.
ruleForm
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"保存成功"
);
this
.
$
emit
(
"input"
,
false
);
this
.
$
popupCacel
()
this
.
resetRuleForm
();
this
.
$parent
.
queryClick
();
}
else
{
...
...
@@ -184,7 +182,7 @@ export default {
updateSysNotice
(
this
.
ruleForm
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"编辑成功"
);
this
.
$
emit
(
"input"
,
false
);
this
.
$
popupCacel
()
this
.
resetRuleForm
();
this
.
$parent
.
queryClick
();
}
else
{
...
...
@@ -201,7 +199,6 @@ export default {
noticeSource
:
""
,
noticeType
:
"1"
}
this
.
isButtonFlag
=
true
;
},
beforeUpload
(
file
)
{
return
true
;
...
...
@@ -239,7 +236,6 @@ export default {
quill
.
insertEmbed
(
length
,
"image"
,
res
.
message
);
// 调整光标到最后
quill
.
setSelection
(
length
+
1
);
//that.quillUpdateImg = false;
});
},
onSubmit
()
{
...
...
@@ -267,6 +263,7 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/dialogBoxheader.scss"
;
.quill-editor
{
padding
:
0
;
}
...
...
src/views/system/xttz/xttz.vue
View file @
813788f
...
...
@@ -86,16 +86,10 @@ export default {
//打开新增弹窗
openDialog
(
item
)
{
if
(
item
)
{
this
.
$nextTick
(()
=>
{
this
.
isButtonFlag
=
false
;
this
.
$refs
.
addDialog
.
getDetailInfo
(
item
);
this
.
dialogTitle
=
'系统通知详情'
})
this
.
$popupDialog
(
"系统通知详情"
,
"system/xttz/components/addDialog"
,
{
...
item
,
"isButtonFlag"
:
false
},
"50%"
)
}
else
{
this
.
isButtonFlag
=
true
;
this
.
dialogTitle
=
'新增系统通知'
this
.
$popupDialog
(
"新增系统通知"
,
"system/xttz/components/addDialog"
,
{
"isButtonFlag"
:
true
},
"50%"
)
}
this
.
isDialog
=
true
;
},
//删除
delNotice
(
item
)
{
...
...
Please
register
or
sign in
to post a comment