Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-carowner
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8aae353c
authored
Apr 12, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
c47fdd44
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
45 deletions
src/styles/index.css
src/views/customer/iconLibrary/index.vue
src/views/customer/productList/index.vue
src/views/customer/scenarioManagement/addScenario.vue
src/views/customer/scenarioManagement/index.vue
src/styles/index.css
View file @
8aae353
...
@@ -102,3 +102,14 @@ a:hover {
...
@@ -102,3 +102,14 @@ a:hover {
cursor
:
pointer
;
cursor
:
pointer
;
font-size
:
0
;
font-size
:
0
;
}
}
.image-slot
{
font-size
:
30px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
height
:
100%
;
background
:
#f5f7fa
;
color
:
#909399
;
}
\ No newline at end of file
\ No newline at end of file
src/views/customer/iconLibrary/index.vue
View file @
8aae353
...
@@ -25,7 +25,14 @@
...
@@ -25,7 +25,14 @@
<el-image
<el-image
style=
"width: 100px; height: 100px"
style=
"width: 100px; height: 100px"
:src=
"item.url"
:src=
"item.url"
></el-image>
>
<div
slot=
"error"
class=
"image-slot"
>
<i
class=
"el-icon-picture-outline"
></i>
</div>
</el-image>
<div>
{{
item
.
name
}}
</div>
<div>
{{
item
.
name
}}
</div>
<el-button
<el-button
class=
"import-btn"
class=
"import-btn"
...
...
src/views/customer/productList/index.vue
View file @
8aae353
...
@@ -86,7 +86,14 @@
...
@@ -86,7 +86,14 @@
style=
"width: 100px;height: 100px;"
style=
"width: 100px;height: 100px;"
:src=
"productRuleForm[item.url]"
:src=
"productRuleForm[item.url]"
fit=
"fill"
fit=
"fill"
></el-image>
>
<div
slot=
"error"
class=
"image-slot"
>
<i
class=
"el-icon-picture-outline"
></i>
</div>
</el-image>
<el-button
<el-button
style=
"margin-left: 20px;"
style=
"margin-left: 20px;"
class=
"import-btn"
class=
"import-btn"
...
@@ -126,6 +133,8 @@ export default {
...
@@ -126,6 +133,8 @@ export default {
shopProductId
:
value
shopProductId
:
value
}).
then
(
res
=>
{
}).
then
(
res
=>
{
res
?
callback
()
:
callback
(
new
Error
(
'商城id不合法'
))
res
?
callback
()
:
callback
(
new
Error
(
'商城id不合法'
))
}).
catch
(
err
=>
{
callback
(
new
Error
(
err
))
})
})
}
}
return
{
return
{
...
@@ -183,13 +192,13 @@ export default {
...
@@ -183,13 +192,13 @@ export default {
visible
:
false
,
visible
:
false
,
productRuleForm
:
{},
productRuleForm
:
{},
productRules
:
{
productRules
:
{
productName
:
[{
required
:
true
,
message
:
'请输入
类型
名称'
,
trigger
:
'blur'
}],
productName
:
[{
required
:
true
,
message
:
'请输入
产品
名称'
,
trigger
:
'blur'
}],
typeId
:
[{
required
:
true
,
message
:
'请选择
类型名称
'
,
trigger
:
'change'
}],
typeId
:
[{
required
:
true
,
message
:
'请选择
产品分类
'
,
trigger
:
'change'
}],
shopProductId
:
[{
required
:
true
,
trigger
:
'change'
,
validator
:
validatePass
}],
shopProductId
:
[{
required
:
true
,
trigger
:
'change'
,
validator
:
validatePass
}],
icon
:
[{
required
:
true
,
message
:
'请上传图片'
,
trigger
:
'blur'
}],
icon
:
[{
required
:
true
,
message
:
'请上传图片'
,
trigger
:
'blur'
}],
platformKey
:
[{
required
:
true
,
message
:
'请选择
类型名称
'
,
trigger
:
'change'
}],
platformKey
:
[{
required
:
true
,
message
:
'请选择
接入平台
'
,
trigger
:
'change'
}],
platformProductId
:
[{
required
:
true
,
message
:
'请输入平台产品ID'
,
trigger
:
'blur'
}],
platformProductId
:
[{
required
:
true
,
message
:
'请输入平台产品ID'
,
trigger
:
'blur'
}],
networkKey
:
[{
required
:
true
,
message
:
'请选择
类型名称
'
,
trigger
:
'change'
}]
networkKey
:
[{
required
:
true
,
message
:
'请选择
配网方式
'
,
trigger
:
'change'
}]
},
},
productFormList
:
[
productFormList
:
[
{
{
...
@@ -280,6 +289,7 @@ export default {
...
@@ -280,6 +289,7 @@ export default {
const
params
=
_
.
cloneDeep
(
this
.
productRuleForm
)
const
params
=
_
.
cloneDeep
(
this
.
productRuleForm
)
params
.
status
=
1
params
.
status
=
1
delete
params
.
iconUrl
delete
params
.
iconUrl
console
.
log
(
params
)
save
(
params
,
this
.
baseURL
).
then
(
res
=>
{
save
(
params
,
this
.
baseURL
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
)
{
if
(
res
)
{
...
@@ -346,7 +356,8 @@ export default {
...
@@ -346,7 +356,8 @@ export default {
})
})
},
},
handleProOnOff
(
scope
)
{
handleProOnOff
(
scope
)
{
this
.
$confirm
(
'确认要上下架?'
,
'提示'
,
{
const
text
=
scope
.
status
===
1
?
'下'
:
'上'
this
.
$confirm
(
`确认要
${
text
}
架?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
...
...
src/views/customer/scenarioManagement/addScenario.vue
View file @
8aae353
...
@@ -93,7 +93,14 @@
...
@@ -93,7 +93,14 @@
v-show=
"params.basicForm.backPicUrl"
v-show=
"params.basicForm.backPicUrl"
style=
"width: 100px; height: 100px"
style=
"width: 100px; height: 100px"
:src=
"params.basicForm.backPicUrl"
:src=
"params.basicForm.backPicUrl"
></el-image>
>
<div
slot=
"error"
class=
"image-slot"
>
<i
class=
"el-icon-picture-outline"
></i>
</div>
</el-image>
<el-button
<el-button
class=
"import-btn"
class=
"import-btn"
style=
"display: block;"
style=
"display: block;"
...
@@ -460,17 +467,15 @@ export default {
...
@@ -460,17 +467,15 @@ export default {
baseURL
:
this
.
$get_session_common_config
().
axios
.
baseURL
,
baseURL
:
this
.
$get_session_common_config
().
axios
.
baseURL
,
active
:
1
,
active
:
1
,
// 场景基础信息
// 场景基础信息
// basicForm: this.params.basicForm,
basicRules
:
{
basicRules
:
{
sceneName
:
[{
required
:
true
,
message
:
'请输入场景名称'
,
trigger
:
'blur'
}],
sceneName
:
[{
required
:
true
,
message
:
'请输入场景名称'
,
trigger
:
'blur'
}],
typeKey
:
[{
required
:
true
,
message
:
'请选择场景类型'
,
trigger
:
'
change
'
}],
typeKey
:
[{
required
:
true
,
message
:
'请选择场景类型'
,
trigger
:
'
blur
'
}],
icon
:
[{
required
:
true
,
message
:
'请选择场景图标'
,
trigger
:
'
change
'
}],
icon
:
[{
required
:
true
,
message
:
'请选择场景图标'
,
trigger
:
'
blur
'
}],
backPic
:
[{
required
:
true
,
message
:
'请上传场景背景图'
,
trigger
:
'change'
}]
backPic
:
[{
required
:
true
,
message
:
'请上传场景背景图'
,
trigger
:
'change'
}]
},
},
iconList
:
[],
iconList
:
[],
typeList
:
[],
typeList
:
[],
// 场景规则
// 场景规则
// scenarioRuleForm: this.params.scenarioRuleForm,
scenarioRules
:
{
scenarioRules
:
{
conditionRule
:
[{
required
:
true
,
message
:
'请选择场景触发条件规则'
,
trigger
:
'change'
}],
conditionRule
:
[{
required
:
true
,
message
:
'请选择场景触发条件规则'
,
trigger
:
'change'
}],
executeCycle
:
[{
required
:
true
,
message
:
'请选择场景执行周期'
,
trigger
:
'change'
}]
executeCycle
:
[{
required
:
true
,
message
:
'请选择场景执行周期'
,
trigger
:
'change'
}]
...
@@ -492,34 +497,6 @@ export default {
...
@@ -492,34 +497,6 @@ export default {
value
:
''
value
:
''
}
}
},
},
// conditionList: this.params.conditionList,
// [
// {
// id: parseInt(Math.random() * 1000),
// type: 1,
// paramKey: '',
// paramValue: {
// date: '',
// select: '',
// order: '',
// value: ''
// }
// }
// ],
// contentList: this.params.contentList,
// [
// {
// id: parseInt(Math.random() * 1000),
// type: 2,
// paramKey: '',
// paramValue: {
// msg: '',
// select: '',
// order: '',
// orderVal: ''
// }
// }
// ],
defalutContentObj
:
{
defalutContentObj
:
{
type
:
2
,
type
:
2
,
paramKey
:
''
,
paramKey
:
''
,
...
@@ -538,7 +515,7 @@ export default {
...
@@ -538,7 +515,7 @@ export default {
created
()
{
created
()
{
// 场景类型
// 场景类型
getDict
({
dictType
:
'scene_classification'
}).
then
(
res
=>
(
this
.
typeList
=
res
))
getDict
({
dictType
:
'scene_classification'
}).
then
(
res
=>
(
this
.
typeList
=
res
))
getList
({
type
:
1
}).
then
(
res
=>
(
this
.
iconList
=
res
))
// 场景触发条件
// 场景触发条件
getDict
({
dictType
:
'scene_condition'
}).
then
(
res
=>
(
this
.
sceneCondition
=
res
))
getDict
({
dictType
:
'scene_condition'
}).
then
(
res
=>
(
this
.
sceneCondition
=
res
))
getConditionList
({}).
then
(
res
=>
(
this
.
deviceConditionList
=
res
))
getConditionList
({}).
then
(
res
=>
(
this
.
deviceConditionList
=
res
))
...
@@ -572,6 +549,8 @@ export default {
...
@@ -572,6 +549,8 @@ export default {
if
(
!
val
)
{
if
(
!
val
)
{
this
.
$refs
.
basicForm
&&
this
.
$refs
.
basicForm
.
resetFields
()
this
.
$refs
.
basicForm
&&
this
.
$refs
.
basicForm
.
resetFields
()
this
.
$refs
.
scenarioRuleForm
&&
this
.
$refs
.
scenarioRuleForm
.
resetFields
()
this
.
$refs
.
scenarioRuleForm
&&
this
.
$refs
.
scenarioRuleForm
.
resetFields
()
}
else
{
getList
({
type
:
1
}).
then
(
res
=>
(
this
.
iconList
=
res
))
}
}
}
}
},
},
...
@@ -738,9 +717,9 @@ export default {
...
@@ -738,9 +717,9 @@ export default {
// 设备状态三个下拉框
// 设备状态三个下拉框
secondChange
(
e
,
index
,
name
)
{
secondChange
(
e
,
index
,
name
)
{
if
(
name
===
'condition'
)
{
if
(
name
===
'condition'
)
{
this
.
params
.
conditionList
[
index
].
paramValue
.
noValue
=
false
const
obj
=
this
.
params
.
conditionList
[
index
].
paramValue
.
list
.
find
(
item
=>
item
.
id
===
e
)
const
obj
=
this
.
params
.
conditionList
[
index
].
paramValue
.
list
.
find
(
item
=>
item
.
id
===
e
)
const
paramValue
=
this
.
params
.
conditionList
[
index
].
paramValue
const
paramValue
=
this
.
params
.
conditionList
[
index
].
paramValue
paramValue
.
noValue
=
false
paramValue
.
order
=
obj
.
orderCode
paramValue
.
order
=
obj
.
orderCode
paramValue
.
orderCondition
=
obj
.
type
paramValue
.
orderCondition
=
obj
.
type
if
(
obj
.
orderValue
)
paramValue
.
orderVal
=
obj
.
orderValue
if
(
obj
.
orderValue
)
paramValue
.
orderVal
=
obj
.
orderValue
...
...
src/views/customer/scenarioManagement/index.vue
View file @
8aae353
...
@@ -166,8 +166,6 @@ export default {
...
@@ -166,8 +166,6 @@ export default {
if
(
i
===
'backPicUrl'
)
this
.
$set
(
scenarioParams
,
'backPicUrl'
,
res
[
i
])
if
(
i
===
'backPicUrl'
)
this
.
$set
(
scenarioParams
,
'backPicUrl'
,
res
[
i
])
scenarioParams
.
basicForm
[
i
]
=
res
[
i
]
scenarioParams
.
basicForm
[
i
]
=
res
[
i
]
}
}
// scenarioParams.scenarioRuleForm.conditionRule = scenarioParams.scenarioRuleForm['conditionRule'] = '' + res['conditionRule']
// scenarioParams.scenarioRuleForm.executeCycle = scenarioParams.scenarioRuleForm['executeCycle'] = res['executeCycle']
for
(
const
i
in
scenarioParams
.
scenarioRuleForm
)
{
for
(
const
i
in
scenarioParams
.
scenarioRuleForm
)
{
if
(
i
===
'conditionRule'
)
scenarioParams
.
scenarioRuleForm
[
i
]
=
''
+
res
[
i
]
if
(
i
===
'conditionRule'
)
scenarioParams
.
scenarioRuleForm
[
i
]
=
''
+
res
[
i
]
else
scenarioParams
.
scenarioRuleForm
[
i
]
=
res
[
i
]
else
scenarioParams
.
scenarioRuleForm
[
i
]
=
res
[
i
]
...
@@ -183,7 +181,6 @@ export default {
...
@@ -183,7 +181,6 @@ export default {
else
if
(
item
.
type
===
2
)
scenarioParams
.
contentList
.
push
(
item
)
else
if
(
item
.
type
===
2
)
scenarioParams
.
contentList
.
push
(
item
)
})
})
}
}
console
.
log
(
this
.
scenarioParams
)
this
.
hideDialog
()
this
.
hideDialog
()
})
})
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment