Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
周健威
rs-cloud-platform-ui
Commits
30f42908
Commit
30f42908
authored
Dec 11, 2020
by
obt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码更新
parent
01e06712
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
35 deletions
+111
-35
index.vue
...eManagement/industryApplication/applicationCate/index.vue
+14
-11
index.vue
...nt/industryApplication/applicationList/addUpApp/index.vue
+63
-7
index.vue
...ent/industryApplication/applicationList/appList/index.vue
+34
-17
No files found.
src/views/webSiteManagement/industryApplication/applicationCate/index.vue
View file @
30f42908
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2020-12-02 10:27:53
* @Date: 2020-12-02 10:27:53
* @LastEditTime: 2020-12-11 1
5:44:37
* @LastEditTime: 2020-12-11 1
7:15:00
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: 类别管理
* @Description: 类别管理
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\index.vue
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\index.vue
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<el-col
:span=
"16"
>
<el-col
:span=
"16"
>
<el-input
<el-input
v-model=
"currentTypeName"
v-model=
"currentTypeName"
placeholder=
"请输入类别
名称
"
placeholder=
"请输入类别"
size=
"100px"
size=
"100px"
></el-input>
></el-input>
</el-col>
</el-col>
...
@@ -313,7 +313,7 @@ export default {
...
@@ -313,7 +313,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
// 获取所有类型用于下拉框
// 获取所有类型用于下拉框
//
this.pullAllApplicationType()
this
.
pullAllApplicationType
()
// 分页获取类型用于表格
// 分页获取类型用于表格
this
.
pullListApplicationType
()
this
.
pullListApplicationType
()
},
},
...
@@ -323,6 +323,7 @@ export default {
...
@@ -323,6 +323,7 @@ export default {
this
.
$bus
.
$emit
(
'upload-clearFiles'
)
this
.
$bus
.
$emit
(
'upload-clearFiles'
)
},
},
getFatherTypeName
(
pid
){
getFatherTypeName
(
pid
){
console
.
log
(
"typesState"
,
this
.
typesState
)
let
father
=
this
.
typesState
.
find
(
ele
=>
ele
.
id
==
pid
)
let
father
=
this
.
typesState
.
find
(
ele
=>
ele
.
id
==
pid
)
return
father
?
father
.
title
:
""
return
father
?
father
.
title
:
""
},
},
...
@@ -330,10 +331,10 @@ export default {
...
@@ -330,10 +331,10 @@ export default {
console
.
log
(
"index=>"
,
index
)
console
.
log
(
"index=>"
,
index
)
if
(
index
==
1
){
if
(
index
==
1
){
this
.
currentStatus
=
''
this
.
currentStatus
=
''
this
.
currentType
=
''
this
.
currentType
Name
=
''
this
.
currentSort
=
''
this
.
currentSort
=
''
}
}
this
.
screenTableData
()
this
.
pullListApplicationType
()
},
},
// 添加类别
// 添加类别
addCate
(){
addCate
(){
...
@@ -360,7 +361,7 @@ export default {
...
@@ -360,7 +361,7 @@ export default {
this
.
types
=
[]
this
.
types
=
[]
getAllApplicationType
().
then
(
res
=>
{
getAllApplicationType
().
then
(
res
=>
{
if
(
res
.
status
==
200
){
if
(
res
.
status
==
200
){
console
.
log
(
"获取所有的应用类型=>"
,
res
)
//
console.log("获取所有的应用类型=>",res)
res
.
data
.
forEach
(
element
=>
{
res
.
data
.
forEach
(
element
=>
{
this
.
typesState
.
push
(
element
)
this
.
typesState
.
push
(
element
)
if
(
element
.
isDel
==
0
&&
element
.
pid
==
0
){
if
(
element
.
isDel
==
0
&&
element
.
pid
==
0
){
...
@@ -416,7 +417,7 @@ export default {
...
@@ -416,7 +417,7 @@ export default {
},
},
// 为表格数据添加过滤条件
// 为表格数据添加过滤条件
screenTableData
(){
screenTableData
(){
//
console.log("分页数据的缓存=>",this.tableDataCache)
console
.
log
(
"分页数据的缓存=>"
,
this
.
tableDataCache
)
this
.
tableData
=
[]
this
.
tableData
=
[]
let
index
=
0
let
index
=
0
this
.
tableDataCache
.
forEach
(
element
=>
{
this
.
tableDataCache
.
forEach
(
element
=>
{
...
@@ -444,11 +445,13 @@ export default {
...
@@ -444,11 +445,13 @@ export default {
if
(
this
.
currentStatus
!=
''
){
if
(
this
.
currentStatus
!=
''
){
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
element
.
status
==
this
.
currentStatus
)
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
element
.
status
==
this
.
currentStatus
)
}
}
// if(this.currentType!=''){
// this.tableData = this.tableData.filter(element => element.id == this.currentType)
// }
if
(
this
.
currentTypeName
!=
''
){
if
(
this
.
currentTypeName
!=
''
){
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
element
.
title
==
this
.
currentTypeName
)
// this.tableData = this.tableData.filter(element => element.type == this.currentTypeName)
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
{
//正则表达式
let
reg
=
new
RegExp
(
this
.
currentTypeName
);
return
element
.
type
.
match
(
reg
)
})
}
}
if
(
this
.
currentSort
!=
''
){
if
(
this
.
currentSort
!=
''
){
// 1是降序,2是升序
// 1是降序,2是升序
...
...
src/views/webSiteManagement/industryApplication/applicationList/addUpApp/index.vue
View file @
30f42908
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2020-12-04 09:09:37
* @Date: 2020-12-04 09:09:37
* @LastEditTime: 2020-12-1
0 09:49:03
* @LastEditTime: 2020-12-1
1 16:52:41
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\addApp\index.vue
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\addApp\index.vue
...
@@ -20,6 +20,26 @@
...
@@ -20,6 +20,26 @@
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"title"
>
基本信息
</div>
<div
class=
"title"
>
基本信息
</div>
<div
class=
"form"
>
<div
class=
"form"
>
<el-form-item
label=
"应用类别"
prop=
"type"
v-show=
"firstTypes.length>0"
>
<el-select
v-model=
"currentFirstType"
placeholder=
"全部"
>
<el-option
v-for=
"item in firstTypes"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
v-model=
"currentSecondType"
placeholder=
"全部"
>
<el-option
v-for=
"item in secondTypes"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"应用名称"
prop=
"title"
>
<el-form-item
label=
"应用名称"
prop=
"title"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-input
v-model=
"form.title"
placeholder=
"请输入应用名称"
></el-input>
<el-input
v-model=
"form.title"
placeholder=
"请输入应用名称"
></el-input>
...
@@ -38,7 +58,7 @@
...
@@ -38,7 +58,7 @@
<div
class=
"form"
>
<div
class=
"form"
>
<el-form-item
label=
"行业"
prop=
"industry"
>
<el-form-item
label=
"行业"
prop=
"industry"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-input
v-model=
"form.industry"
placeholder=
"请输入行业
(即行业类别值)
"
></el-input>
<el-input
v-model=
"form.industry"
placeholder=
"请输入行业"
></el-input>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"地区"
prop=
"region"
>
<el-form-item
label=
"地区"
prop=
"region"
>
...
@@ -120,7 +140,8 @@ import { uploadFile } from "@/api/website/newsCategory/index";
...
@@ -120,7 +140,8 @@ import { uploadFile } from "@/api/website/newsCategory/index";
import
singleImageX
from
'@/components/Upload/singleImageX'
;
import
singleImageX
from
'@/components/Upload/singleImageX'
;
import
KindEditor
from
"@/components/Kindeditor"
;
import
KindEditor
from
"@/components/Kindeditor"
;
import
{
import
{
addUpdateApplicationInfo
getAllApplicationType
,
addUpdateApplicationInfo
,
}
from
"api/website/industryApplication/index"
;
}
from
"api/website/industryApplication/index"
;
export
default
{
export
default
{
name
:
'addApp'
,
name
:
'addApp'
,
...
@@ -132,6 +153,7 @@ export default {
...
@@ -132,6 +153,7 @@ export default {
data
(){
data
(){
return
{
return
{
rules
:{
rules
:{
type
:
[{
required
:
true
,
message
:
'请选择应用类别'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}],
coverImg
:
[{
required
:
true
,
message
:
'请上传封面图'
,
trigger
:
'blur'
}],
coverImg
:
[{
required
:
true
,
message
:
'请上传封面图'
,
trigger
:
'blur'
}],
detailImg
:
[{
required
:
true
,
message
:
'请上传详情图'
,
trigger
:
'blur'
}],
detailImg
:
[{
required
:
true
,
message
:
'请上传详情图'
,
trigger
:
'blur'
}],
...
@@ -165,6 +187,10 @@ export default {
...
@@ -165,6 +187,10 @@ export default {
showPreview
:
false
,
showPreview
:
false
,
url
:
[]
url
:
[]
},
},
firstTypes
:
[],
currentFirstType
:
''
,
secondTypes
:
[],
currentSecondType
:
''
,
}
}
},
},
watch
:{
watch
:{
...
@@ -176,6 +202,7 @@ export default {
...
@@ -176,6 +202,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
pullAllApplicationType
()
if
(
!!
this
.
$parent
.
info
){
if
(
!!
this
.
$parent
.
info
){
let
info
=
this
.
$parent
.
info
let
info
=
this
.
$parent
.
info
let
attribute
=
eval
(
"("
+
info
.
attribute
+
")"
)
let
attribute
=
eval
(
"("
+
info
.
attribute
+
")"
)
...
@@ -216,6 +243,35 @@ export default {
...
@@ -216,6 +243,35 @@ export default {
this
.
$bus
.
$emit
(
'hideThreeRoute'
,
true
)
this
.
$bus
.
$emit
(
'hideThreeRoute'
,
true
)
},
},
methods
:
{
methods
:
{
// 获取所有应用类型
pullAllApplicationType
(){
this
.
firstTypes
=
[]
getAllApplicationType
().
then
(
res
=>
{
if
(
res
.
status
==
200
){
res
.
data
.
forEach
(
element
=>
{
if
(
element
.
isDel
==
0
){
if
(
element
.
pid
==
0
){
this
.
firstTypes
.
push
({
value
:
element
.
id
,
label
:
element
.
title
});
}
else
{
this
.
secondTypes
.
push
({
value
:
element
.
id
,
label
:
element
.
title
})
}
}
});
if
(
this
.
firstTypes
.
length
>
0
){
this
.
currentFirstType
=
this
.
firstTypes
[
0
].
value
}
if
(
this
.
secondTypes
.
length
>
0
){
this
.
currentSecondType
=
this
.
secondTypes
[
0
].
value
}
}
})
},
// 关闭图片查看器
// 关闭图片查看器
closePreview
()
{
closePreview
()
{
this
.
currentIcon
.
showPreview
=
false
;
this
.
currentIcon
.
showPreview
=
false
;
...
@@ -367,10 +423,10 @@ export default {
...
@@ -367,10 +423,10 @@ export default {
isDel
:
0
,
isDel
:
0
,
status
:
1
,
status
:
1
,
rank
:
0
,
rank
:
0
,
firstTypeId
:
0
,
firstTypeId
:
this
.
currentFirstType
,
firstTitle
:
""
,
firstTitle
:
this
.
firstTypes
.
find
(
ele
=>
ele
.
value
==
this
.
currentFirstType
).
label
,
secondTypeId
:
0
,
secondTypeId
:
this
.
currentSecondType
,
secondTitle
:
""
,
secondTitle
:
this
.
secondTypes
.
find
(
ele
=>
ele
.
value
==
this
.
currentSecondType
).
label
,
customized
:
this
.
form
.
isCustomized
==
"是"
?
1
:
2
customized
:
this
.
form
.
isCustomized
==
"是"
?
1
:
2
}
}
message
=
"添加成功!!!"
message
=
"添加成功!!!"
...
...
src/views/webSiteManagement/industryApplication/applicationList/appList/index.vue
View file @
30f42908
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2020-12-02 10:27:53
* @Date: 2020-12-02 10:27:53
* @LastEditTime: 2020-12-11 1
1:02:51
* @LastEditTime: 2020-12-11 1
7:25:15
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\index.vue
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\index.vue
...
@@ -20,23 +20,30 @@
...
@@ -20,23 +20,30 @@
></el-input>
></el-input>
</el-col>
</el-col>
</div>
</div>
<div
class=
"status"
>
<div
class=
"types"
>
<span>
所有状态
</span>
<span>
应用类别
</span>
<el-select
v-model=
"currentStatus"
placeholder=
"全部"
>
<el-col
:span=
"16"
>
<el-input
v-model=
"currentType"
placeholder=
"请输入类别"
size=
"100px"
></el-input>
</el-col>
<!--
<el-select
v-model=
"currentType"
placeholder=
"全部"
>
<el-option
<el-option
v-for=
"item in
statu
s"
v-for=
"item in
type
s"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
:value=
"item.value"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
-->
</div>
</div>
<div
class=
"
type
s"
>
<div
class=
"
statu
s"
>
<span>
应用类别
</span>
<span>
所有状态
</span>
<el-select
v-model=
"current
Type
"
placeholder=
"全部"
>
<el-select
v-model=
"current
Status
"
placeholder=
"全部"
>
<el-option
<el-option
v-for=
"item in
type
s"
v-for=
"item in
statu
s"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
:value=
"item.value"
...
@@ -70,7 +77,7 @@
...
@@ -70,7 +77,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"应用类别"
width=
"200"
align=
"center"
>
<el-table-column
label=
"应用类别"
width=
"200"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getAttributeIndustry
(
scope
.
row
.
attribute
)
}}
</span>
<span>
{{
scope
.
row
.
firstTitle
?
scope
.
row
.
secondTitle
?
scope
.
row
.
firstTitle
+
"-"
+
scope
.
row
.
secondTitle
:
scope
.
row
.
firstTitle
:
""
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"应用名称"
align=
"center"
>
<el-table-column
label=
"应用名称"
align=
"center"
>
...
@@ -216,9 +223,9 @@ export default {
...
@@ -216,9 +223,9 @@ export default {
this
.
pullListApplicationInfo
()
this
.
pullListApplicationInfo
()
},
},
methods
:
{
methods
:
{
getAttributeIndustry
(
attribute
){
//
getAttributeIndustry(attribute){
return
eval
(
"("
+
attribute
+
")"
).
industry
//
return eval("("+attribute+")").industry
},
//
},
editApp
(
info
){
editApp
(
info
){
this
.
$parent
.
componentName
=
'addApp'
this
.
$parent
.
componentName
=
'addApp'
this
.
$parent
.
info
=
info
this
.
$parent
.
info
=
info
...
@@ -294,11 +301,21 @@ export default {
...
@@ -294,11 +301,21 @@ export default {
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
element
.
status
==
this
.
currentStatus
)
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
element
.
status
==
this
.
currentStatus
)
}
}
if
(
this
.
currentType
!=
''
){
if
(
this
.
currentType
!=
''
){
let
type
=
this
.
types
.
find
(
element
=>
element
.
value
==
this
.
currentType
)
// let type = this.types.find(element => element.value == this.currentType)
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
this
.
getAttributeIndustry
(
element
.
attribute
)
==
type
.
label
)
// this.tableData = this.tableData.filter(element => this.getAttributeIndustry(element.attribute) == type.label)
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
{
let
type
=
element
.
firstTitle
?
element
.
secondTitle
?
element
.
firstTitle
+
"-"
+
element
.
secondTitle
:
element
.
firstTitle
:
""
//正则表达式
let
reg
=
new
RegExp
(
this
.
currentType
);
return
type
.
match
(
reg
)
})
}
}
if
(
this
.
currentTypeName
!=
''
){
if
(
this
.
currentTypeName
!=
''
){
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
element
.
title
==
this
.
currentTypeName
)
this
.
tableData
=
this
.
tableData
.
filter
(
element
=>
{
//正则表达式
let
reg
=
new
RegExp
(
this
.
currentTypeName
);
return
element
.
title
.
match
(
reg
)
})
}
}
},
},
// 分页获取应用详情数据
// 分页获取应用详情数据
...
...
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