Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
app-manage-console
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
app-manage-console
Commits
8719924e
提交
8719924e
authored
12月 06, 2018
作者:
vipcxj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 操作按钮间分隔栏不显示
fix: 上次大合并的衍生问题
上级
c8388d6e
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
62 行增加
和
62 行删除
+62
-62
deploy.js
src/routes/main/modules/appManagement/deploy.js
+38
-38
edit.js
src/routes/main/modules/appManagement/edit.js
+1
-1
list.js
src/routes/main/modules/appManagement/list.js
+23
-23
没有找到文件。
src/routes/main/modules/appManagement/deploy.js
浏览文件 @
8719924e
...
...
@@ -4,49 +4,13 @@
*/
import
React
from
'react'
;
import
QRcode
from
'qrcode'
;
import
{
Button
,
Table
,
Popconfirm
,
Modal
}
from
'antd'
;
import
{
Button
,
Table
,
Popconfirm
,
Modal
,
Divider
}
from
'antd'
;
import
config
from
'../../../../utils/config'
;
import
{
encrypt
}
from
'../../../../utils/helper'
;
import
styles
from
'./list.less'
;
import
{
thisPush
}
from
'../../../../services/route'
;
class
Deploy
extends
React
.
Component
{
static
makeColumns
()
{
return
[{
title
:
'ID'
,
dataIndex
:
'id'
,
},
{
title
:
'更新时间'
,
dataIndex
:
'updateTime'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
},
{
title
:
'版本号'
,
dataIndex
:
'versionNumber'
,
},
{
title
:
'描述'
,
dataIndex
:
'description'
,
},
{
title
:
'uri'
,
dataIndex
:
'uri'
,
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
render
:
(
text
,
record
,
index
)
=>
(
<
span
>
<
span
className
=
"ant-divider"
/>
<
a
onClick
=
{()
=>
this
.
onEdit
(
record
,
index
)}
>
Edit
<
/a
>
<
span
className
=
"ant-divider"
/>
<
Popconfirm
title
=
"确定删除?"
okText
=
"Yes"
cancelText
=
"No"
onConfirm
=
{()
=>
this
.
onDelete
(
record
,
index
)}
>
<
a
>
Delete
<
/a
>
<
/Popconfirm
>
<
span
className
=
"ant-divider"
/>
<
a
onClick
=
{()
=>
this
.
onQrcode
(
record
,
index
)}
>
qrcode
<
/a
>
<
/span
>
),
}];
}
state
=
{
urls
:
''
,
visible
:
false
,
...
...
@@ -97,6 +61,42 @@ class Deploy extends React.Component {
visible
:
false
,
});
};
makeColumns
=
()
=>
{
return
[{
title
:
'ID'
,
dataIndex
:
'id'
,
},
{
title
:
'更新时间'
,
dataIndex
:
'updateTime'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
},
{
title
:
'版本号'
,
dataIndex
:
'versionNumber'
,
},
{
title
:
'描述'
,
dataIndex
:
'description'
,
},
{
title
:
'uri'
,
dataIndex
:
'uri'
,
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
render
:
(
text
,
record
,
index
)
=>
(
<
span
>
<
Divider
type
=
"vertical"
/>
<
a
onClick
=
{()
=>
this
.
onEdit
(
record
,
index
)}
>
Edit
<
/a
>
<
Divider
type
=
"vertical"
/>
<
Popconfirm
title
=
"确定删除?"
okText
=
"Yes"
cancelText
=
"No"
onConfirm
=
{()
=>
this
.
onDelete
(
record
,
index
)}
>
<
a
>
Delete
<
/a
>
<
/Popconfirm
>
<
Divider
type
=
"vertical"
/>
<
a
onClick
=
{()
=>
this
.
onQrcode
(
record
,
index
)}
>
qrcode
<
/a
>
<
/span
>
),
}];
};
render
()
{
const
{
allAppInfo
}
=
this
.
props
.
appInfo
;
const
{
urls
,
visible
,
completeUrl
}
=
this
.
state
;
...
...
@@ -125,7 +125,7 @@ class Deploy extends React.Component {
<
Button
type
=
"primary"
icon
=
"plus"
onClick
=
{
this
.
onClick
}
>
新增
<
/Button
>
<
/div
>
<
div
className
=
{
styles
.
divTable
}
>
<
Table
columns
=
{
Deploy
.
makeColumns
()}
dataSource
=
{
data
}
/
>
<
Table
columns
=
{
this
.
makeColumns
()}
dataSource
=
{
data
}
/
>
<
/div
>
<
div
>
<
Modal
...
...
src/routes/main/modules/appManagement/edit.js
浏览文件 @
8719924e
...
...
@@ -16,7 +16,7 @@ class Edit extends React.Component {
this
.
props
.
dispatch
({
type
:
'appInfo/editAppInfo'
,
payload
:
{
values
}
});
}
});
}
}
;
render
()
{
const
{
value
}
=
this
.
props
.
location
.
state
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
...
...
src/routes/main/modules/appManagement/list.js
浏览文件 @
8719924e
import
React
from
'react'
;
import
{
Button
,
Table
,
Popconfirm
}
from
'antd'
;
import
{
Button
,
Table
,
Popconfirm
,
Divider
}
from
'antd'
;
import
styles
from
'./list.less'
;
import
{
thisPush
}
from
'../../../../services/route'
;
class
List
extends
React
.
Component
{
static
makeColumns
()
{
componentDidMount
()
{
this
.
props
.
dispatch
({
type
:
'appInfo/getAppInfo'
,
payload
:
{
name
:
''
}
});
}
onDelete
=
(
record
)
=>
{
const
name
=
record
.
name
;
this
.
props
.
dispatch
({
type
:
'appInfo/delAppInfo'
,
payload
:
{
name
}
});
};
onEdit
=
(
record
)
=>
{
thisPush
(
this
,
{
pathname
:
'../edit'
,
state
:
{
value
:
record
}
});
};
onDeploy
=
(
record
)
=>
{
thisPush
(
this
,
{
pathname
:
'../deploy'
,
state
:
{
value
:
record
}
});
this
.
props
.
dispatch
({
type
:
'appInfo/saveRecord'
,
payload
:
{
record
}
});
};
onClick
=
()
=>
{
thisPush
(
this
,
{
pathname
:
'../add'
,
state
:
{
value
:
''
}
});
};
makeColumns
=
()
=>
{
return
[{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
...
...
@@ -22,34 +39,17 @@ class List extends React.Component {
dataIndex
:
'operation'
,
render
:
(
text
,
record
,
index
)
=>
(
<
span
>
<
span
className
=
"ant-divider
"
/>
<
Divider
type
=
"vertical
"
/>
<
a
onClick
=
{()
=>
this
.
onEdit
(
record
,
index
)}
>
Edit
<
/a
>
<
span
className
=
"ant-divider
"
/>
<
Divider
type
=
"vertical
"
/>
<
Popconfirm
title
=
"确定删除?"
okText
=
"Yes"
cancelText
=
"No"
onConfirm
=
{()
=>
this
.
onDelete
(
record
,
index
)}
>
<
a
>
Delete
<
/a
>
<
/Popconfirm
>
<
span
className
=
"ant-divider
"
/>
<
Divider
type
=
"vertical
"
/>
<
a
onClick
=
{()
=>
this
.
onDeploy
(
record
,
index
)}
>
deploy
<
/a
>
<
/span
>
),
}];
}
componentDidMount
()
{
this
.
props
.
dispatch
({
type
:
'appInfo/getAppInfo'
,
payload
:
{
name
:
''
}
});
}
onDelete
=
(
record
)
=>
{
const
name
=
record
.
name
;
this
.
props
.
dispatch
({
type
:
'appInfo/delAppInfo'
,
payload
:
{
name
}
});
};
onEdit
=
(
record
)
=>
{
thisPush
(
this
,
{
pathname
:
'../edit'
,
state
:
{
value
:
record
}
});
};
onDeploy
=
(
record
)
=>
{
thisPush
(
this
,
{
pathname
:
'../deploy'
,
state
:
{
value
:
record
}
});
this
.
props
.
dispatch
({
type
:
'appInfo/saveRecord'
,
payload
:
{
record
}
});
};
onClick
=
()
=>
{
thisPush
(
this
,
{
pathname
:
'../add'
,
state
:
{
value
:
''
}
});
};
render
()
{
const
{
allAppInfo
}
=
this
.
props
.
appInfo
;
...
...
@@ -70,7 +70,7 @@ class List extends React.Component {
<
Button
type
=
"primary"
icon
=
"plus"
onClick
=
{
this
.
onClick
}
>
添加
<
/Button
>
<
/div
>
<
div
className
=
{
styles
.
divTable
}
>
<
Table
columns
=
{
List
.
makeColumns
()}
dataSource
=
{
data
}
/
>
<
Table
columns
=
{
this
.
makeColumns
()}
dataSource
=
{
data
}
/
>
<
/div
>
<
/div
>
<
/div
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论