Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-admin
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-admin
Commits
8726b9b1
Commit
8726b9b1
authored
Jan 16, 2022
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改应用领域查询接口
parent
91692a77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
59 deletions
+9
-59
news-add-or-update.vue
src/views/modules/application/news-add-or-update.vue
+4
-53
news.vue
src/views/modules/application/news.vue
+5
-6
No files found.
src/views/modules/application/news-add-or-update.vue
View file @
8726b9b1
...
...
@@ -39,8 +39,6 @@
<el-form-item
label=
"栏目:"
prop=
"classid"
>
<el-select
v-model=
"dataForm.classid"
@
change=
"getClassList([dataForm.classid])"
style=
"width: 121px !important"
v-show=
"!showInfo"
>
<el-option
...
...
@@ -51,19 +49,6 @@
>
</el-option>
</el-select>
<el-select
v-model=
"dataForm.cclassid"
style=
"width: 121px !important"
v-show=
"!showInfo"
>
<el-option
v-for=
"item in cclassidList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
<p
v-show=
"showInfo"
>
{{
className
+
"/"
+
cclassName
}}
</p>
</el-form-item>
<el-form-item
label=
"级别:"
prop=
"levels"
>
...
...
@@ -117,7 +102,7 @@
></el-input>
<p
v-show=
"showInfo"
>
{{
dataForm
.
author
}}
</p>
</el-form-item>
<el-form-item
label=
"
上传
图片:"
prop=
"pic"
>
<el-form-item
label=
"图片:"
prop=
"pic"
>
<el-upload
v-show=
"!showInfo"
class=
"avatar-uploader"
...
...
@@ -167,6 +152,7 @@ export default {
components
:
{
Ueditor
,
},
props
:
[
'classidList'
],
data
()
{
return
{
loading
:
false
,
...
...
@@ -190,9 +176,7 @@ export default {
content
:
""
,
showtime
:
""
,
classid
:
""
,
cclassid
:
""
,
},
cclassidStr
:
undefined
,
dataRule
:
{
title
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
titleOld
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
...
...
@@ -219,16 +203,12 @@ export default {
piclevelList
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
],
id
:
[],
classidList
:
[],
cclassidList
:
[],
title
:
""
,
className
:
""
,
cclassName
:
""
,
};
},
created
()
{
this
.
getClassList
([]);
},
mounted
()
{
console
.
log
(
this
.
classidList
);
},
...
...
@@ -240,6 +220,7 @@ export default {
return
arr
[
0
].
name
;
},
init
(
id
,
showInfo
)
{
console
.
log
(
id
,
'id'
);
this
.
dataForm
.
id
=
id
||
0
;
this
.
visible
=
true
;
this
.
showInfo
=
showInfo
;
...
...
@@ -255,7 +236,6 @@ export default {
this
.
loading
=
false
;
if
(
data
&&
data
.
code
===
0
)
{
this
.
dataForm
=
data
.
news
;
this
.
getClassList
([
this
.
dataForm
.
classid
]);
this
.
imgUrlStr
=
data
.
news
.
pic
;
this
.
dialogVisible
=
true
;
this
.
ueditor
.
value
=
this
.
dataForm
.
content
;
...
...
@@ -266,9 +246,9 @@ export default {
},
// 表单提交
dataFormSubmit
()
{
this
.
loading
=
true
;
this
.
$refs
[
"dataForm"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/news/
${
!
this
.
dataForm
.
id
?
"save"
:
"update"
}
`
...
...
@@ -287,7 +267,6 @@ export default {
pic
:
this
.
dataForm
.
pic
,
content
:
this
.
dataForm
.
content
,
classid
:
this
.
dataForm
.
classid
,
cclassid
:
this
.
dataForm
.
cclassid
,
showtime
:
this
.
dataForm
.
showtime
,
}),
}).
then
(({
data
})
=>
{
...
...
@@ -309,25 +288,6 @@ export default {
}
});
},
// 获取栏目列表
getClassList
(
id
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/office/newsclass/getNewsClassList`
),
method
:
"post"
,
data
:
id
,
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
0
)
{
if
(
id
.
length
===
0
)
{
this
.
classidList
=
data
.
data
;
}
else
{
this
.
dataForm
.
cclassid
=
""
;
this
.
cclassidList
=
data
.
data
[
0
].
child
;
}
}
else
{
this
.
$message
.
error
(
data
.
msg
);
}
});
},
// 上传之前校验
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
"image/jpeg"
;
...
...
@@ -365,15 +325,6 @@ export default {
console
.
log
(
err
);
});
},
// 选择栏目
handleChange
(
value
)
{
if
(
value
.
length
===
1
)
{
this
.
classid
=
value
[
0
];
}
else
if
(
value
.
length
===
2
)
{
this
.
dataForm
.
classid
=
value
[
0
];
this
.
dataForm
.
cclassid
=
value
[
1
];
}
},
clearInp
()
{
this
.
$refs
[
"dataForm"
].
resetFields
();
this
.
imgUrlStr
=
""
;
...
...
src/views/modules/application/news.vue
View file @
8726b9b1
...
...
@@ -46,13 +46,11 @@
<el-form-item
label=
'发布日期'
prop=
'releaseDate'
>
<el-date-picker
clearable
v-model=
"releaseDate"
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd hh:mm:ss"
>
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
'更新日期'
prop=
'updateDate'
>
...
...
@@ -63,7 +61,7 @@
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd
hh
:mm:ss"
value-format=
"yyyy-MM-dd
HH
:mm:ss"
>
</el-date-picker>
</el-form-item>
...
...
@@ -177,7 +175,7 @@
layout=
"total, sizes, prev, pager, next, jumper"
>
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if=
"addOrUpdateVisible"
ref=
"addOrUpdate"
@
refreshDataList=
"getDataList"
></add-or-update>
<add-or-update
v-if=
"addOrUpdateVisible"
ref=
"addOrUpdate"
@
refreshDataList=
"getDataList"
:classidList=
"columnList"
></add-or-update>
</div>
</div>
</template>
...
...
@@ -249,7 +247,8 @@
},
// 获取数据列表
getDataList
()
{
this
.
dataListLoading
=
true
console
.
log
(
this
.
releaseDate
,
'this.releaseDate'
);
this
.
dataListLoading
=
true
;
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/office/news/yylyList'
),
method
:
'post'
,
...
...
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