Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
cd63a6f0
提交
cd63a6f0
authored
12月 23, 2020
作者:
潘鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
attributes
上级
6ae78ae9
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
42 行增加
和
25 行删除
+42
-25
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
+39
-22
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+1
-1
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/attributes.html
浏览文件 @
cd63a6f0
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
border-radius
:
6px
;
border-radius
:
6px
;
color
:
red
;
color
:
red
;
cursor
:
pointer
;
cursor
:
pointer
;
margin-left
:
5
px
;
margin-left
:
30
px
;
}
}
.activityAdd
{
.activityAdd
{
margin-top
:
20px
;
margin-top
:
20px
;
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<div
class=
"activityEdit"
>
<div
class=
"activityEdit"
>
<ul>
<ul>
<li
v-for=
"(item,index) in attrDesc"
:key=
"index"
>
<li
v-for=
"(item,index) in attrDesc"
:key=
"index"
>
描述(英文)
<i-input
v-model=
"item.attrValue"
style=
"width: 77px"
></i-input>
描述(英文)
<i-input
v-model=
"item.attrValue"
style=
"width: 77px"
@
on-change=
"verifyInput(index)"
></i-input>
(中文)
<i-input
v-model=
"item.attrDesc"
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>-->
<!-- <i-input v-model="item" style="width: 77px"></i-input>-->
<span
@
click=
"delCondition(item)"
>
删除
</span>
<span
@
click=
"delCondition(item)"
>
删除
</span>
...
...
platform-admin/src/main/webapp/js/sys/attributes.js
浏览文件 @
cd63a6f0
...
@@ -4,15 +4,15 @@ $(function () {
...
@@ -4,15 +4,15 @@ $(function () {
colModel
:
[
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'属性名'
,
name
:
'attrName'
,
index
:
'attr_name'
,
width
:
80
},
{
label
:
'属性名'
,
name
:
'attrName'
,
index
:
'attr_name'
,
width
:
80
},
{
label
:
'属性描述'
,
name
:
'descs'
,
index
:
'descs'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
){
//
{label: '属性描述', name: 'descs', index: 'descs', width: 80,formatter:function (value, grid, rows){
let
returnStr
=
''
;
//
let returnStr = '';
value
.
forEach
(
item
=>
{
//
value.forEach(item=>{
let
Str
=
`
${
item
.
attrValue
}
(
${
item
.
attrDesc
}
),
`
// let Str = `${item.attrValue}(${item.attrDesc});
`
returnStr
+=
Str
//
returnStr+=Str
})
//
})
// returnStr=returnStr.split("undefined")[1]
//
// returnStr=returnStr.split("undefined")[1]
return
returnStr
;
//
return returnStr;
}},
//
}},
{
label
:
'是否开启'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
){
{
label
:
'是否开启'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
){
let
returnStr
;
let
returnStr
;
if
(
value
==
'0'
)
{
if
(
value
==
'0'
)
{
...
@@ -181,19 +181,19 @@ let vm = new Vue({
...
@@ -181,19 +181,19 @@ let vm = new Vue({
handleResetForm
(
this
,
name
);
handleResetForm
(
this
,
name
);
},
},
delCondition
(
item
){
delCondition
(
item
){
vm
.
attrDesc
.
remove
(
item
)
confirm
(
'确定要删除选中的记录?'
,
function
()
{
console
.
log
(
"删除"
,
item
)
vm
.
attrDesc
.
remove
(
item
)
let
arr
=
[
item
.
attrDescId
]
console
.
log
(
"删除"
,
item
)
Ajax
.
request
({
let
arr
=
[
item
.
attrDescId
]
url
:
"../attributesdesc/delete"
,
Ajax
.
request
({
params
:
JSON
.
stringify
(
arr
)
,
url
:
"../attributesdesc/delete"
,
type
:
"POST"
,
params
:
JSON
.
stringify
(
arr
)
,
contentType
:
"application/json
"
,
type
:
"POST
"
,
successCallback
:
function
(
r
)
{
contentType
:
"application/json"
,
alert
(
'删除成功'
,
function
(
index
)
{
successCallback
:
function
(
r
)
{
vm
.
reload
(
);
alert
(
'删除成功'
);
}
);
}
}
}
);
});
});
console
.
log
(
item
)
console
.
log
(
item
)
},
},
...
@@ -221,6 +221,23 @@ let vm = new Vue({
...
@@ -221,6 +221,23 @@ let vm = new Vue({
vm
.
attrDesc
.
push
(
obj
)
vm
.
attrDesc
.
push
(
obj
)
})
})
console
.
log
(
vm
.
attrDesc
)
console
.
log
(
vm
.
attrDesc
)
},
verifyInput
(
index
)
{
document
.
onkeyup
=
function
()
{
// 合并两个空格为一个空格
String
.
prototype
.
ResetBlank
=
function
()
{
let
regEx
=
/
\s{2,}
/g
;
return
this
.
replace
(
regEx
,
' '
);
};
String
.
prototype
.
ResetBlank2
=
function
()
{
let
regEx
=
/
[^\w
_
\s]
/g
;
return
this
.
replace
(
regEx
,
''
);
};
// var str = e;//获取文本框的值
// [^\w_]
vm
.
attrDesc
[
index
].
attrValue
=
vm
.
attrDesc
[
index
].
attrValue
.
ResetBlank
().
ResetBlank2
()
//trim()去除首尾空格
}
}
}
}
}
});
});
\ No newline at end of file
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
cd63a6f0
...
@@ -1269,7 +1269,7 @@ let vm = new Vue({
...
@@ -1269,7 +1269,7 @@ let vm = new Vue({
String
.
prototype
.
ResetBlank
=
function
(){
String
.
prototype
.
ResetBlank
=
function
(){
let
regEx
=
/
\s{2,}
/g
;
let
regEx
=
/
\s{2,}
/g
;
return
this
.
replace
(
regEx
,
'
'
);
return
this
.
replace
(
regEx
,
'
'
);
};
};
String
.
prototype
.
ResetBlank2
=
function
(){
String
.
prototype
.
ResetBlank2
=
function
(){
let
regEx
=
/
[^\w
_
\s]
/g
;
let
regEx
=
/
[^\w
_
\s]
/g
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论