Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multiSystem
Project
Project
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
Yulun Yao
multiSystem
Commits
feb46543
Commit
feb46543
authored
Mar 08, 2021
by
Gakki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加添加标签和点击已有标签的按钮变化
parent
08bc56e5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
36 deletions
+43
-36
api.js
src/server/api.js
+2
-2
feeStandard.vue
src/views/houseData/feeStandard.vue
+1
-1
labelList.vue
src/views/label/labelList.vue
+11
-4
labelRightSide.vue
src/views/label/labelRightSide.vue
+18
-29
labelRightSideEmpty.vue
src/views/label/labelRightSideEmpty.vue
+11
-0
parentLabelRightPanel.vue
src/views/label/parentLabelRightPanel.vue
+0
-0
No files found.
src/server/api.js
View file @
feb46543
...
...
@@ -201,6 +201,6 @@ export default {
get_specialInspection
:
'/service-documents-ddd/statistical/specialInspection'
,
//行业督查数字
get_month_check
:
'service-documents-ddd/dashboard/house/month'
,
GET_LABEL_LIST
:
MOCK_URL
+
'/service-customkey-ddd/label
s
'
,
// 获取标签列表
GET_LABEL_LIST
:
MOCK_URL
+
'/service-customkey-ddd/label
/tree
'
,
// 获取标签列表
GET_LABEL_DETAIL
:
MOCK_URL
+
'/service-customkey-ddd/label/{id}'
// 查看标签详情
}
src/views/houseData/feeStandard.vue
View file @
feb46543
...
...
@@ -37,7 +37,7 @@
</span>
<span
slot=
"charges"
slot-scope=
"text, record"
>
{{
!!
text
?
text
+
+
`(元/月·㎡)`
:
'无数据'
}}
{{
!!
text
?
text
+
`(元/月·㎡)`
:
'无数据'
}}
</span>
</a-table>
</div>
...
...
src/views/label/labelList.vue
View file @
feb46543
...
...
@@ -9,9 +9,9 @@
</div>
<div
v-if=
"$route.name=='lvot'"
>
<a-row>
<a-col
:span=
'
5
'
class=
"layoutMargin layoutPadding"
>
<a-col
:span=
'
4
'
class=
"layoutMargin layoutPadding"
>
<a-row>
<a-button
size=
'small'
type=
"default"
>
<a-icon
type=
"plus"
/>
添加标签
</a-button>
<a-button
size=
'small'
type=
"default"
@
click=
"addLabel"
>
<a-icon
type=
"plus"
/>
添加标签
</a-button>
</a-row>
<a-tree
:tree-data=
"treeData"
...
...
@@ -21,8 +21,9 @@
/>
</a-col>
<a-col
:span=
'1'
></a-col>
<a-col
:span=
'17'
class=
"layoutMargin layoutPadding"
>
<RightPanel
/>
<a-col
:span=
'18'
class=
"layoutMargin layoutPadding"
>
<RightPanel
v-if=
"currentState == 'create'"
:trigger-type=
'currentState'
/>
<EmptyRightPanel
v-else
/>
</a-col>
</a-row>
</div>
...
...
@@ -32,6 +33,7 @@
<
script
>
import
RightPanel
from
'@/views/label/labelRightSide.vue'
import
EmptyRightPanel
from
'@/views/label/labelRightSideEmpty.vue'
const
treeData
=
[]
...
...
@@ -39,6 +41,7 @@ export default {
name
:
'lvot'
,
components
:
{
RightPanel
,
EmptyRightPanel
},
data
()
{
return
{
...
...
@@ -49,6 +52,7 @@ export default {
key
:
'id'
},
selectedKeys
:
[],
currentState
:
null
}
},
mounted
()
{
...
...
@@ -74,6 +78,9 @@ export default {
onCheck
(
checkedKeys
,
info
)
{
console
.
log
(
'onCheck'
,
checkedKeys
,
info
)
},
addLabel
()
{
this
.
currentState
=
'create'
}
},
}
</
script
>
...
...
src/views/label/labelRightSide.vue
View file @
feb46543
...
...
@@ -2,14 +2,17 @@
<div
class=
"routerWapper"
>
<div>
<a-row>
<a-col
:span=
'1'
>
<a-col
:span=
'1'
v-if=
"triggerType == 'create'"
>
<a-button
type=
'default'
>
返回
</a-button>
</a-col>
<a-col
:span=
'1'
v-else
>
<a-button
type=
'default'
>
删除
</a-button>
</a-col>
<a-col
:span=
'1'
:offset=
'1'
>
<a-button
type=
'default'
>
编辑
</a-button>
</a-col>
<a-col
:span=
'1'
:offset=
'1'
>
<a-button
type=
'primary'
@
click=
"save()"
>
添加
</a-button>
<a-button
type=
'primary'
@
click=
"save()"
>
保存
</a-button>
</a-col>
<a-col
:span=
'19'
></a-col>
</a-row>
...
...
@@ -33,24 +36,24 @@
<a-form
:form=
'infoSettingForm'
layout=
'inline'
>
<div
v-for=
"(item, index) in loopContent.data"
:key=
'index'
>
<a-form-item
v-if=
"!!item.relation"
>
<a-select
style=
"width: 1
6
0px"
placeholder=
'请选择条件'
v-decorator=
"['relation' + index,
{initialValue: item.relation, validateTrigger:'blur',rules: []}]">
<a-select
style=
"width: 1
2
0px"
placeholder=
'请选择条件'
v-decorator=
"['relation' + index,
{initialValue: item.relation, validateTrigger:'blur',rules: []}]">
<a-select-option
value=
'and'
>
与
</a-select-option>
<a-select-option
value=
'or'
>
或
</a-select-option>
<a-select-option
value=
'ne'
>
非
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
v-else
style=
"margin-left: 1
6
0px"
></a-form-item>
<a-form-item
v-else
style=
"margin-left: 1
2
0px"
></a-form-item>
<a-form-item>
<a-select
style=
"width: 1
6
0px"
placeholder=
'请选择业务属性'
v-decorator=
"['businessProperty' + index,
{initialValue: item.businessProperty, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select
style=
"width: 1
2
0px"
placeholder=
'请选择业务属性'
v-decorator=
"['businessProperty' + index,
{initialValue: item.businessProperty, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
value=
'sx1'
>
属性一
</a-select-option>
<a-select-option
value=
'sx2'
>
属性二
</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-select
style=
"width: 1
6
0px"
placeholder=
'区间'
v-decorator=
"['range' + index,
{validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select
style=
"width: 1
2
0px"
placeholder=
'区间'
v-decorator=
"['range' + index,
{validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
value=
'equals'
>
等于
</a-select-option>
<a-select-option
value=
'gt'
>
大于
</a-select-option>
<a-select-option
value=
'gte'
>
大于等于
</a-select-option>
...
...
@@ -94,6 +97,9 @@ export default {
},
mounted
()
{
},
props
:
[
'triggerType'
],
methods
:
{
addRow
()
{
this
.
loopContent
.
data
.
push
({
...
...
@@ -116,32 +122,15 @@ export default {
if
(
!
err
)
{
let
loopCounts
=
this
.
loopContent
.
data
.
length
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
// console.log(loopCounts)
// console.log(formData)
for
(
let
i
=
0
;
i
<
loopCounts
;
i
++
)
{
// for(let j = 0; j
<
Object
.
keys
(
formData
).
length
;
j
++
)
{
// if(Object.keys(formData)[j].indexOf(i) > -1){
// }
// }
if
(
formData
[
'inputTwo'
+
i
]
!==
undefined
)
{
this
.
jsonData
.
push
({
key
:
formData
[
'businessProperty'
+
i
],
val
:
formData
[
'inputOne'
+
i
],
condition
:
formData
[
'range'
+
i
],
relation
:
formData
[
'relation'
+
i
],
})
}
else
{
// 区间值
this
.
jsonData
.
push
({
key
:
formData
[
'businessProperty'
+
i
],
val1
:
formData
[
'inputOne'
+
i
],
val2
:
formData
[
'inputTwo'
+
i
],
val
:
!
formData
[
'inputTwo'
+
i
]
?
formData
[
'inputOne'
+
i
]
:
formData
[
'inputOne'
+
i
]
+
','
+
formData
[
'inputTwo'
+
i
],
condition
:
formData
[
'range'
+
i
],
relation
:
formData
[
'relation'
+
i
],
})
}
}
console
.
log
(
JSON
.
stringify
(
this
.
jsonData
))
}
...
...
src/views/label/labelRightSideEmpty.vue
0 → 100644
View file @
feb46543
<
template
>
<div>
请先在左侧选择一个标签或添加标签。
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
\ No newline at end of file
src/views/label/parentLabelRightPanel.vue
0 → 100644
View file @
feb46543
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