Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
a58e3f92
提交
a58e3f92
authored
12月 23, 2020
作者:
潘鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
attributes
上级
a7ca695b
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
25 行增加
和
24 行删除
+25
-24
attributes.html
...rm-admin/src/main/webapp/WEB-INF/page/sys/attributes.html
+2
-2
attributes.js
platform-admin/src/main/webapp/js/sys/attributes.js
+23
-22
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/attributes.html
浏览文件 @
a58e3f92
...
...
@@ -75,8 +75,8 @@
<div
class=
"activityEdit"
>
<ul>
<li
v-for=
"(item,index) in attrDesc"
:key=
"index"
>
描述(英文)
<i-input
v-model=
"item.
E
"
style=
"width: 77px"
></i-input>
(中文)
<i-input
v-model=
"item.
C
"
style=
"width: 77px"
></i-input>
描述(英文)
<i-input
v-model=
"item.
attrValue
"
style=
"width: 77px"
></i-input>
(中文)
<i-input
v-model=
"item.
attrDesc
"
style=
"width: 77px"
></i-input>
<!-- <i-input v-model="item" style="width: 77px"></i-input>-->
<span
@
click=
"delCondition(item)"
>
删除
</span>
</li>
...
...
platform-admin/src/main/webapp/js/sys/attributes.js
浏览文件 @
a58e3f92
...
...
@@ -77,25 +77,21 @@ let vm = new Vue({
vm
.
attributes
.
need
=
true
}
let
arr
=
[]
let
flag1
=
true
// let flag2 = true
let
flag3
=
false
let
flag
=
true
vm
.
attrDesc
.
forEach
(
item
=>
{
if
(
item
.
E
&&
item
.
C
){
let
str
=
`
${
item
.
E
}
(
${
item
.
C
}
)`
arr
.
push
(
str
)
}
else
if
(
item
.
E
&&!
item
.
C
){
let
str
=
`
${
item
.
E
}
`
arr
.
push
(
str
)
if
(
item
.
attrValue
&&
item
.
attrDesc
){
flag
=
true
}
else
if
(
item
.
attrValue
&&!
item
.
attrDesc
){
flag
=
true
}
else
{
flag
1
=
false
flag
=
false
}
})
let
arrs
=
[]
vm
.
attrDesc
.
forEach
(
item
=>
{
arrs
.
push
(
item
.
E
)
arrs
.
push
(
item
.
attrValue
)
})
if
(
!
flag
1
){
if
(
!
flag
){
alert
(
"属性描述不要为空!"
)
return
}
...
...
@@ -105,7 +101,9 @@ let vm = new Vue({
}
// console.log(arr.join())
vm
.
attributes
.
attrDesc
=
arr
.
join
()
vm
.
attributes
.
descs
=
[]
vm
.
attributes
.
descs
=
vm
.
attrDesc
console
.
log
(
vm
.
attributes
)
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
attributes
),
...
...
@@ -176,22 +174,25 @@ let vm = new Vue({
// console.log(item)
},
addCondition
(){
var
conditionNew
=
{
'
C'
:
''
,
'E
'
:
''
}
var
conditionNew
=
{
'
attrDesc'
:
''
,
'attrValue
'
:
''
}
vm
.
attrDesc
.
push
(
conditionNew
)
},
attrDescCheck
(){
// vm.attrDesc = vm.attributes.attrDesc.split(",")
let
arr
=
vm
.
attributes
.
attrDesc
.
split
(
","
)
let
arr
=
vm
.
attributes
.
descs
console
.
log
(
arr
)
vm
.
attrDesc
=
[]
arr
.
forEach
(
item
=>
{
console
.
log
(
item
.
indexOf
(
"("
)
)
console
.
log
(
item
)
let
obj
=
{}
if
(
item
.
indexOf
(
"("
)
!=-
1
){
obj
.
E
=
item
.
split
(
"("
)[
0
]
obj
.
C
=
item
.
split
(
"("
)[
1
].
split
(
")"
)[
0
]
}
else
{
obj
.
E
=
item
}
// if(item.attrValue){
// obj.E = item.split("(")[0]
// obj.C = item.split("(")[1].split(")")[0]
// }else {
// obj.E = item
// }
obj
.
attrValue
=
item
.
attrValue
obj
.
attrDesc
=
item
.
attrDesc
vm
.
attrDesc
.
push
(
obj
)
})
console
.
log
(
vm
.
attrDesc
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论