Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-view
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
station
amos-convertor-view
Commits
79fd06ce
Commit
79fd06ce
authored
Sep 03, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重点设备-增加分类字段
parent
077638ff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
4 deletions
+52
-4
application.js
src/consts/application.js
+1
-0
urlConsts.js
src/consts/urlConsts.js
+5
-0
preControlService.js
src/services/preControlService.js
+9
-1
EquipmentModel.js
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
+37
-3
No files found.
src/consts/application.js
View file @
79fd06ce
...
@@ -5,4 +5,5 @@ export default {
...
@@ -5,4 +5,5 @@ export default {
fireAutoSys
:
'fireAutoSys/'
,
// 换流站
fireAutoSys
:
'fireAutoSys/'
,
// 换流站
patrol
:
'patrol/'
,
// 巡检
patrol
:
'patrol/'
,
// 巡检
equip
:
'equip/'
,
// 装备
equip
:
'equip/'
,
// 装备
jcs
:
'jcs/'
,
// JCS
};
};
src/consts/urlConsts.js
View file @
79fd06ce
...
@@ -17,6 +17,7 @@ export const getOutterURL = (key) => {
...
@@ -17,6 +17,7 @@ export const getOutterURL = (key) => {
export
const
patrolURI
=
baseURI
+
app
.
patrol
;;
export
const
patrolURI
=
baseURI
+
app
.
patrol
;;
export
const
fireBaseURI
=
baseURI
+
app
.
fireAutoSys
;
export
const
fireBaseURI
=
baseURI
+
app
.
fireAutoSys
;
export
const
equipURI
=
baseURI
+
app
.
equip
;
export
const
equipURI
=
baseURI
+
app
.
equip
;
export
const
jcsURI
=
baseURI
+
app
.
jcs
;
export
const
SecurityWsUrl
=
securityBaseWsURI
;
export
const
SecurityWsUrl
=
securityBaseWsURI
;
export
const
XJBaseURI
=
xjBaseURI
;
export
const
XJBaseURI
=
xjBaseURI
;
const
secExVerson
=
'v1'
;
const
secExVerson
=
'v1'
;
...
@@ -282,6 +283,10 @@ export const FasSerUrl = {
...
@@ -282,6 +283,10 @@ export const FasSerUrl = {
buildingTreeUrl
:
completePrefix
(
equipURI
,
'building/tree'
),
// 建筑树接口
buildingTreeUrl
:
completePrefix
(
equipURI
,
'building/tree'
),
// 建筑树接口
};
};
export
const
JcsUrl
=
{
dictionaryUrl
:
completePrefix
(
jcsURI
,
'data-dictionary/form/list?types={types}'
),
};
export
const
ModuleEditUrl
=
{
export
const
ModuleEditUrl
=
{
getAreaTreeUrl
:
completePrefix
(
fireBaseURI
,
'api/view3d/region/tree'
),
//
getAreaTreeUrl
:
completePrefix
(
fireBaseURI
,
'api/view3d/region/tree'
),
//
...
...
src/services/preControlService.js
View file @
79fd06ce
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
{
FasSerUrl
,
FscSerUrl
,
secExtUrl
}
from
'./../consts/urlConsts'
;
import
{
FasSerUrl
,
FscSerUrl
,
JcsUrl
,
secExtUrl
}
from
'./../consts/urlConsts'
;
import
{
commonGet
,
commonPost
,
commonDelete
,
commonPut
}
from
'./../utils/request'
;
import
{
commonGet
,
commonPost
,
commonDelete
,
commonPut
}
from
'./../utils/request'
;
export
const
queryRiskLevelAction
=
(
filter
,
page
,
size
)
=>
{
export
const
queryRiskLevelAction
=
(
filter
,
page
,
size
)
=>
{
...
@@ -201,6 +201,14 @@ export const queryLoadPackagesAction = (project) => {
...
@@ -201,6 +201,14 @@ export const queryLoadPackagesAction = (project) => {
};
};
/**
/**
* 获取预案下拉框
*/
export
const
queryDictionaryAction
=
types
=>
{
const
url
=
formatUrl
(
JcsUrl
.
dictionaryUrl
,
{
types
});
return
commonGet
(
url
);
};
/**
* 获取预案树
* 获取预案树
*/
*/
export
const
getPlanTreeAction
=
()
=>
{
export
const
getPlanTreeAction
=
()
=>
{
...
...
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
View file @
79fd06ce
...
@@ -8,7 +8,13 @@ import { Form, Upload, Input, Select, Radio, Modal, AmosAlert, Icon, Toast, Inpu
...
@@ -8,7 +8,13 @@ import { Form, Upload, Input, Select, Radio, Modal, AmosAlert, Icon, Toast, Inpu
import
{
TreeSelect
}
from
'amos-antd'
;
import
{
TreeSelect
}
from
'amos-antd'
;
import
PropTypes
from
'amos-react-router/lib/PropTypes'
;
import
PropTypes
from
'amos-react-router/lib/PropTypes'
;
import
{
getEquipmentDataAction
,
getFireStationDataAction
,
getPrePlanPictureAction
}
from
'../../../../services/ledgerService'
;
import
{
getEquipmentDataAction
,
getFireStationDataAction
,
getPrePlanPictureAction
}
from
'../../../../services/ledgerService'
;
import
{
queryDeptByOrgCodeAction
,
getUsersByDepartmentIdAction
,
queryRegionTreeAction
,
queryLoadPackagesAction
,
buildingTreeAction
}
from
'../../../../services/preControlService'
;
import
{
queryDeptByOrgCodeAction
,
getUsersByDepartmentIdAction
,
queryLoadPackagesAction
,
buildingTreeAction
,
queryDictionaryAction
}
from
'../../../../services/preControlService'
;
import
{
convertImgUrlToFile
,
getBase64
}
from
'./../../../../utils/FileUtils'
;
import
{
convertImgUrlToFile
,
getBase64
}
from
'./../../../../utils/FileUtils'
;
import
{
baseURI
,
FscSerUrl
}
from
'../../../../consts/urlConsts'
;
import
{
baseURI
,
FscSerUrl
}
from
'../../../../consts/urlConsts'
;
import
{
recursive
}
from
'./../../../../utils/request'
;
import
{
recursive
}
from
'./../../../../utils/request'
;
...
@@ -69,7 +75,8 @@ class EquipmentModel extends Component {
...
@@ -69,7 +75,8 @@ class EquipmentModel extends Component {
previewImage
:
''
,
previewImage
:
''
,
project
:
[],
project
:
[],
riskSourceData
:
[],
riskSourceData
:
[],
prefix
:
''
prefix
:
''
,
categories
:
[]
};
};
}
}
...
@@ -82,6 +89,7 @@ class EquipmentModel extends Component {
...
@@ -82,6 +89,7 @@ class EquipmentModel extends Component {
this
.
getCommonInfo
();
this
.
getCommonInfo
();
this
.
queryLoadPackages
(
param
);
this
.
queryLoadPackages
(
param
);
this
.
getRiskSourceSecondLevel
();
this
.
getRiskSourceSecondLevel
();
this
.
getCategories
();
};
};
...
@@ -378,8 +386,25 @@ class EquipmentModel extends Component {
...
@@ -378,8 +386,25 @@ class EquipmentModel extends Component {
}
}
getCategories = () => {
const type = '
ZDSBFL
';
queryDictionaryAction(type).then(data => {
const categoryDictionary = data[type];
if (categoryDictionary) {
const options = [];
categoryDictionary.forEach(dict => {
options.push({
label: dict.label,
value: dict.value
});
});
this.setState({ categories: options });
}
});
}
render() {
render() {
const { form, rules, chargeDeptData, chargeUserData, fireStationData, previewImage, previewVisible,
project
, riskSourceData } = this.state;
const { form, rules, chargeDeptData, chargeUserData, fireStationData, previewImage, previewVisible,
categories
, riskSourceData } = this.state;
const formItemLayout = {
const formItemLayout = {
labelCol: {
labelCol: {
xs: { span: 24 },
xs: { span: 24 },
...
@@ -407,6 +432,15 @@ class EquipmentModel extends Component {
...
@@ -407,6 +432,15 @@ class EquipmentModel extends Component {
<FormItem label={<span>设备编号</span>} field="code" {...formItemLayout}>
<FormItem label={<span>设备编号</span>} field="code" {...formItemLayout}>
<Input className="risk_factor_input" required value={form.code} onChange={e => this.onInputChange('
code
', e.target.value)} />
<Input className="risk_factor_input" required value={form.code} onChange={e => this.onInputChange('
code
', e.target.value)} />
</FormItem>
</FormItem>
<FormItem label={<span>分类</span>} field="category" {...formItemLayout}>
<Select
className="risk_factor_select"
data={categories}
renderOption={item => <Option value={item.value}>{item.label}</Option>}
value={form.category}
onChange={e => this.onSelectChange('
category
', e)}
/>
</FormItem>
<FormItem label={<span>所属区域</span>} field="riskSourceId" {...formItemLayout}>
<FormItem label={<span>所属区域</span>} field="riskSourceId" {...formItemLayout}>
<TreeSelect
<TreeSelect
treeData={riskSourceData}
treeData={riskSourceData}
...
...
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