Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
a2d69b3f
Commit
a2d69b3f
authored
Aug 02, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 设备挂管理国际化完成
parent
27800600
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
155 additions
and
89 deletions
+155
-89
src/components/MySelect/RequestSelect.vue
src/components/MySelect/RequestSelect.vue
+1
-1
src/local/oceanus.js
src/local/oceanus.js
+26
-1
src/pages/oceanus/equipment/Left/LeftTree.vue
src/pages/oceanus/equipment/Left/LeftTree.vue
+14
-8
src/pages/oceanus/equipment/Left/OrganizationTree.vue
src/pages/oceanus/equipment/Left/OrganizationTree.vue
+1
-1
src/pages/oceanus/equipment/Left/TreeDrawer.vue
src/pages/oceanus/equipment/Left/TreeDrawer.vue
+40
-22
src/pages/oceanus/equipment/Left/TreeModal.vue
src/pages/oceanus/equipment/Left/TreeModal.vue
+9
-4
src/pages/oceanus/equipment/Right/EventDrawer.vue
src/pages/oceanus/equipment/Right/EventDrawer.vue
+5
-5
src/pages/oceanus/equipment/Right/RightBox.vue
src/pages/oceanus/equipment/Right/RightBox.vue
+3
-3
src/pages/oceanus/equipment/Right/SearchPopover.vue
src/pages/oceanus/equipment/Right/SearchPopover.vue
+15
-11
src/pages/oceanus/equipment/Right/TabOne.vue
src/pages/oceanus/equipment/Right/TabOne.vue
+17
-9
src/pages/oceanus/equipment/Right/TabThree.vue
src/pages/oceanus/equipment/Right/TabThree.vue
+4
-4
src/pages/oceanus/equipment/Right/TabTwo.vue
src/pages/oceanus/equipment/Right/TabTwo.vue
+20
-20
No files found.
src/components/MySelect/RequestSelect.vue
View file @
a2d69b3f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
:value=
"value"
:value=
"value"
style=
"width: 100%"
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
allow-clear
allow-clear
:options="data"
:options="data"
@change="onChange"
@change="onChange"
...
...
src/local/oceanus.js
View file @
a2d69b3f
...
@@ -3,5 +3,30 @@ export default {
...
@@ -3,5 +3,30 @@ export default {
'
oc.attributeNameErrorInfo
'
:
[
'
请输入属性名称
'
,
'
Please enter attribute Name
'
],
'
oc.attributeNameErrorInfo
'
:
[
'
请输入属性名称
'
,
'
Please enter attribute Name
'
],
'
oc.toBottom
'
:
[
'
置底
'
,
'
ToBottom
'
],
'
oc.toBottom
'
:
[
'
置底
'
,
'
ToBottom
'
],
'
oc.cancelConfirm
'
:
[
'
确认是否取消
'
,
'
Confirm Whether To Cancel
'
],
'
oc.cancelConfirm
'
:
[
'
确认是否取消
'
,
'
Confirm Whether To Cancel
'
],
'
oc.code
'
:
[
'
编码
'
,
'
Code
'
]
'
oc.code
'
:
[
'
编码
'
,
'
Code
'
],
'
oc.newOrganization
'
:
[
'
新增组织
'
,
'
New Organization
'
],
'
oc.newEquipment
'
:
[
'
新增设备
'
,
'
New Equipment
'
],
'
oc.rootNode
'
:
[
'
根节点
'
,
'
RootNode
'
],
'
oc.equipmentCode
'
:
[
'
设备编码
'
,
'
Equipment Code
'
],
'
oc.equipmentName
'
:
[
'
设备名称
'
,
'
Equipment Name
'
],
'
oc.category
'
:
[
'
类别
'
,
'
Category
'
],
'
oc.equipmentGrade
'
:
[
'
等级
'
,
'
EquipmentGrade
'
],
'
oc.installTime
'
:
[
'
安装日期
'
,
'
InstallTime
'
],
'
oc.runTime
'
:
[
'
运行日期
'
,
'
RunTime
'
],
'
oc.supplier
'
:
[
'
供应商
'
,
'
Supplier
'
],
'
oc.manufacturer
'
:
[
'
制造商
'
,
'
Manufacturer
'
],
'
oc.occurTime
'
:
[
'
发生日期
'
,
'
OccurTime
'
],
'
oc.attribute
'
:
[
'
属性
'
,
'
Attribute
'
],
'
oc.event
'
:
[
'
事件
'
,
'
Event
'
],
'
oc.equipment
'
:
[
'
设备
'
,
'
Equipment
'
],
'
oc.timeType
'
:
[
'
时间类型
'
,
'
TimeType
'
],
'
oc.recordsNumber
'
:
[
'
记录数
'
,
'
Number Of Records
'
],
'
oc.eventFiltering
'
:
[
'
事件过滤
'
,
'
Event Filtering
'
],
'
oc.filter
'
:
[
'
过滤
'
,
'
Filter
'
],
'
oc.all
'
:
[
'
全部
'
,
'
All
'
],
'
oc.system
'
:
[
'
全部
'
,
'
System
'
],
'
oc.custom
'
:
[
'
自定义
'
,
'
custom
'
],
'
oc.attributeValue
'
:
[
'
属性名称
'
,
'
Attribute Value
'
],
'
oc.attributeType
'
:
[
'
属性类型
'
,
'
Attribute Type
'
],
'
oc.confirm
'
:
[
'
确认
'
,
'
Confirm
'
],
};
};
src/pages/oceanus/equipment/Left/LeftTree.vue
View file @
a2d69b3f
...
@@ -25,11 +25,15 @@
...
@@ -25,11 +25,15 @@
key=
"1"
key=
"1"
@
click=
"addOrg"
@
click=
"addOrg"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType !== 'EQUIPMENT')"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType !== 'EQUIPMENT')"
>
新增组织
>
{{
$t
(
'
oc.newOrganization
'
)
}}
</a-menu-item>
</a-menu-item>
<a-menu-item
key=
"2"
@
click=
"addEqu"
>
新增设备
</a-menu-item>
<a-menu-item
key=
"2"
@
click=
"addEqu"
>
{{
$t
(
'
oc.newEquipment
'
)
}}
</a-menu-item>
</a-menu>
</a-menu>
<a-button
type=
"primary"
ghost
>
新增
<a-icon
type=
"down"
/></a-button>
<a-button
type=
"primary"
ghost
>
{{
$t
(
'
table.add
'
)
}}
<a-icon
type=
"down"
/>
</a-button>
</a-dropdown>
</a-dropdown>
<!--
<a-button
<!--
<a-button
type=
"primary"
type=
"primary"
...
@@ -52,15 +56,17 @@
...
@@ -52,15 +56,17 @@
ghost
ghost
@
click=
"edit"
@
click=
"edit"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType === 'EQUIPMENT')"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType === 'EQUIPMENT')"
>
编辑
</a-button
>
>
{{
$t
(
'
table.edit
'
)
}}
</a-button>
<a-button
<a-button
type=
"primary"
type=
"primary"
ghost
ghost
@
click=
"del"
@
click=
"del"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType !== 'ROOTNODE')"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType !== 'ROOTNODE')"
>
删除
</a-button
>
>
{{
$t
(
'
table.delete
'
)
}}
</a-button>
</a-button-group>
</a-button-group>
</a-col>
</a-col>
</a-row>
</a-row>
...
@@ -117,7 +123,7 @@ export default {
...
@@ -117,7 +123,7 @@ export default {
this
.
treeData
=
[];
this
.
treeData
=
[];
const
parentNode
=
{
const
parentNode
=
{
catalogId
:
-
1
,
catalogId
:
-
1
,
catalogName
:
'
根节点
'
,
catalogName
:
this
.
$t
(
'
oc.rootNode
'
)
,
catalogType
:
'
ROOTNODE
'
,
catalogType
:
'
ROOTNODE
'
,
isLeaf
:
false
,
isLeaf
:
false
,
};
};
...
@@ -206,12 +212,12 @@ export default {
...
@@ -206,12 +212,12 @@ export default {
if
(
isObjEmpty
(
data
))
return
;
if
(
isObjEmpty
(
data
))
return
;
try
{
try
{
await
Api
.
delEquipmentsTree
(
data
);
await
Api
.
delEquipmentsTree
(
data
);
this
.
$message
.
success
(
'
删除成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
this
.
onLoadData
(
this
.
treeNode
.
$parent
);
this
.
onLoadData
(
this
.
treeNode
.
$parent
);
this
.
treeNode
=
undefined
;
this
.
treeNode
=
undefined
;
this
.
selectedKeys
=
[];
this
.
selectedKeys
=
[];
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
删除失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
}
},
},
treeDrawerRefresh
(
type
,
data
)
{
treeDrawerRefresh
(
type
,
data
)
{
...
...
src/pages/oceanus/equipment/Left/OrganizationTree.vue
View file @
a2d69b3f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
show-search
show-search
style=
"width: 100%"
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
:tree-data="treeData"
:tree-data="treeData"
allow-clear
allow-clear
tree-default-expand-all
tree-default-expand-all
...
...
src/pages/oceanus/equipment/Left/TreeDrawer.vue
View file @
a2d69b3f
<
template
>
<
template
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"title"
:onOk=
"submit"
:colesAfter=
"colesAfter"
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"title"
:onOk=
"submit"
:colesAfter=
"colesAfter"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"设备编码"
prop=
"equipmentCode"
>
<a-form-model-item
:label=
"$t('oc.equipmentCode')"
prop=
"equipmentCode"
>
<a-input
v-model=
"form.equipmentCode"
:disabled=
"isView"
/>
<a-input
v-model=
"form.equipmentCode"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"设备名称"
prop=
"equipmentName"
>
<a-form-model-item
:label=
"$t('oc.equipmentName')"
prop=
"equipmentName"
>
<a-input
v-model=
"form.equipmentName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.equipmentName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"类别"
prop=
"categoryId"
>
<a-form-model-item
:label=
"$t('oc.category')"
prop=
"categoryId"
>
<a-tree-select
:treeData=
"oceanusTreeList"
v-model=
"form.categoryId"
:disabled=
"type === 1"
/>
<a-tree-select
:treeData=
"oceanusTreeList"
v-model=
"form.categoryId"
:disabled=
"type === 1"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"等级"
prop=
"equipmentGrade"
>
<a-form-model-item
:label=
"$t('oc.equipmentGrade')"
prop=
"equipmentGrade"
>
<Select
v-model=
"form.equipmentGrade"
:options=
"equipmentGradeList"
:disabled=
"isView"
/>
<Select
v-model=
"form.equipmentGrade"
:options=
"equipmentGradeList"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"安装日期
"
prop=
"installTime"
>
<a-form-model-item
:label=
"$t('oc.installTime')
"
prop=
"installTime"
>
<a-date-picker
class=
"tw-w-full"
v-model=
"form.installTime"
:disabled=
"isView"
/>
<a-date-picker
class=
"tw-w-full"
v-model=
"form.installTime"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"运行日期
"
prop=
"runTime"
>
<a-form-model-item
:label=
"$t('oc.runTime')
"
prop=
"runTime"
>
<a-date-picker
class=
"tw-w-full"
v-model=
"form.runTime"
:disabled=
"isView"
/>
<a-date-picker
class=
"tw-w-full"
v-model=
"form.runTime"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"供应商
"
prop=
"supplier"
>
<a-form-model-item
:label=
"$t('oc.supplier')
"
prop=
"supplier"
>
<a-input
v-model=
"form.supplier"
:disabled=
"isView"
/>
<a-input
v-model=
"form.supplier"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"制造商"
prop=
"manufacturer"
>
<a-form-model-item
:label=
"$t('oc.manufacturer')"
prop=
"manufacturer"
>
<a-input
v-model=
"form.manufacturer"
:disabled=
"isView"
/>
<a-input
v-model=
"form.manufacturer"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"专业
"
prop=
"specialtyCode"
>
<a-form-model-item
:label=
"$t('select.speciality')
"
prop=
"specialtyCode"
>
<Select
v-model=
"form.specialtyCode"
:options=
"specialtyCodeList"
:disabled=
"isView"
/>
<Select
v-model=
"form.specialtyCode"
:options=
"specialtyCodeList"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
...
@@ -51,13 +73,9 @@ export default {
...
@@ -51,13 +73,9 @@ export default {
visible
:
false
,
visible
:
false
,
form
:
{},
form
:
{},
rules
:
{
rules
:
{
equipmentCode
:
[
equipmentCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
),
trigger
:
'
change
'
}],
{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
},
equipmentName
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
),
trigger
:
'
change
'
}],
],
categoryId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
),
trigger
:
'
change
'
}],
equipmentName
:
[
{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
},
],
categoryId
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
},
},
equipmentGradeList
:
[],
equipmentGradeList
:
[],
specialtyCodeList
:
[],
specialtyCodeList
:
[],
...
...
src/pages/oceanus/equipment/Left/TreeModal.vue
View file @
a2d69b3f
<
template
>
<
template
>
<a-modal
ref=
"drawerRef"
:visible=
"visible"
title=
"新增组织"
@
ok=
"submit"
@
cancel=
"close"
>
<a-modal
ref=
"drawerRef"
:visible=
"visible"
:title=
"$t('oc.newOrganization')"
@
ok=
"submit"
@
cancel=
"close"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"组织
"
prop=
"catalogValue"
>
<a-form-model-item
:label=
"$t('system.organizatio')
"
prop=
"catalogValue"
>
<OrganizationTree
v-model=
"form.catalogValue"
:disabled=
"isView"
/>
<OrganizationTree
v-model=
"form.catalogValue"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
...
@@ -31,12 +37,11 @@ export default {
...
@@ -31,12 +37,11 @@ export default {
parentId
:
undefined
,
parentId
:
undefined
,
form
:
{},
form
:
{},
rules
:
{
rules
:
{
catalogValue
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
catalogValue
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
)
,
trigger
:
'
change
'
}],
},
},
Api
,
Api
,
};
};
},
},
async
mounted
()
{},
methods
:
{
methods
:
{
open
()
{
open
()
{
this
.
form
=
{};
this
.
form
=
{};
...
...
src/pages/oceanus/equipment/Right/EventDrawer.vue
View file @
a2d69b3f
<
template
>
<
template
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"title"
:onOk=
"submit"
:colesAfter=
"colesAfter"
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"title"
:onOk=
"submit"
:colesAfter=
"colesAfter"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"设备编码
"
prop=
"equipmentId"
>
<a-form-model-item
:label=
"$t('oc.equipmentCode')
"
prop=
"equipmentId"
>
<a-select
v-model=
"form.equipmentId"
:disabled=
"true"
:options=
"options"
/>
<a-select
v-model=
"form.equipmentId"
:disabled=
"true"
:options=
"options"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"事件类型
"
prop=
"eventType"
>
<a-form-model-item
:label=
"$t('log.eventType')
"
prop=
"eventType"
>
<MySelect
<MySelect
v-model=
"form.eventType"
v-model=
"form.eventType"
:request=
"getStaticDataApi"
:request=
"getStaticDataApi"
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
:disabled="isView"
:disabled="isView"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"发生日期
"
prop=
"occurTime"
>
<a-form-model-item
:label=
"$t('oc.occurTime')
"
prop=
"occurTime"
>
<a-date-picker
<a-date-picker
v-model=
"form.occurTime"
v-model=
"form.occurTime"
style=
"width: 100%"
style=
"width: 100%"
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
:disabled=
"isView"
:disabled=
"isView"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"设备编码
"
prop=
"eventDescription"
>
<a-form-model-item
:label=
"$t('oc.equipmentCode')
"
prop=
"eventDescription"
>
<a-textarea
<a-textarea
:rows=
"4"
:rows=
"4"
v-model=
"form.eventDescription"
v-model=
"form.eventDescription"
style=
"width: 100%"
style=
"width: 100%"
placeholder=
"Select date
"
:placeholder=
"$t('input.placeholder')
"
:disabled=
"isView"
:disabled=
"isView"
/>
/>
</a-form-model-item>
</a-form-model-item>
...
...
src/pages/oceanus/equipment/Right/RightBox.vue
View file @
a2d69b3f
<
template
>
<
template
>
<my-card>
<my-card>
<a-tabs
v-model=
"key"
>
<a-tabs
v-model=
"key"
>
<a-tab-pane
key=
"1"
tab=
"基本信息
"
:forceRender=
"true"
>
<a-tab-pane
key=
"1"
:tab=
"$t('system.info')
"
:forceRender=
"true"
>
<TabOne
v-if=
"key === '1'"
:dataInfo=
"dataInfo"
/>
<TabOne
v-if=
"key === '1'"
:dataInfo=
"dataInfo"
/>
</a-tab-pane>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"属性
"
:forceRender=
"true"
>
<a-tab-pane
key=
"2"
:tab=
"$t('oc.attribute')
"
:forceRender=
"true"
>
<TabTwo
v-if=
"key === '2'"
:dataInfo=
"dataInfo"
/>
<TabTwo
v-if=
"key === '2'"
:dataInfo=
"dataInfo"
/>
</a-tab-pane>
</a-tab-pane>
<a-tab-pane
key=
"3"
tab=
"事件
"
:forceRender=
"true"
>
<a-tab-pane
key=
"3"
:tab=
"$t('oc.event')
"
:forceRender=
"true"
>
<TabThree
v-if=
"key === '3'"
:dataInfo=
"dataInfo"
/>
<TabThree
v-if=
"key === '3'"
:dataInfo=
"dataInfo"
/>
</a-tab-pane>
</a-tab-pane>
</a-tabs>
</a-tabs>
...
...
src/pages/oceanus/equipment/Right/SearchPopover.vue
View file @
a2d69b3f
...
@@ -3,28 +3,32 @@
...
@@ -3,28 +3,32 @@
<template
slot=
"content"
>
<template
slot=
"content"
>
<div
:style=
"
{ width: '400px' }">
<div
:style=
"
{ width: '400px' }">
<a-form-model
:model=
"form"
:labelCol=
"
{ span: 6 }" :wrapperCol="{ span: 18 }">
<a-form-model
:model=
"form"
:labelCol=
"
{ span: 6 }" :wrapperCol="{ span: 18 }">
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
label="开始时间
">
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
:label="$t('select.startTime')
">
<a-date-picker
<a-date-picker
v-model=
"form.startTime"
v-model=
"form.startTime"
style=
"width: 100%"
style=
"width: 100%"
placeholder=
"Select date
"
:placeholder=
"$t('select.placeholder')
"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
:style=
"
{ marginBottom: 0 }" label="结束时间">
<a-form-model-item
:style=
"
{ marginBottom: 0 }" :label="$t('select.endTime')">
<a-date-picker
v-model=
"form.endTime"
style=
"width: 100%"
placeholder=
"Select date"
/>
<a-date-picker
v-model=
"form.endTime"
style=
"width: 100%"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
label="设备
">
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
:label="$t('oc.equipment')
">
<a-tree-select
<a-tree-select
v-model=
"form.equipmentId"
v-model=
"form.equipmentId"
style=
"width: 100%"
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="treeData"
:tree-data="treeData"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
treeDataSimpleMode
treeDataSimpleMode
:load-data="onLoadData"
:load-data="onLoadData"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
label="时间类型
">
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
:label="$t('oc.timeType')
">
<MySelect
<MySelect
v-model=
"form.eventType"
v-model=
"form.eventType"
:request=
"getStaticDataApi"
:request=
"getStaticDataApi"
...
@@ -35,9 +39,9 @@
...
@@ -35,9 +39,9 @@
<a-row>
<a-row>
<a-col
:span=
"24"
class=
"tw-text-right tw-mt-4"
>
<a-col
:span=
"24"
class=
"tw-text-right tw-mt-4"
>
<a-space>
<a-space>
<a-button
type=
"default"
@
click=
"hide"
>
取消
</a-button>
<a-button
type=
"default"
@
click=
"hide"
>
{{
$t
(
'
table.cancel
'
)
}}
</a-button>
<a-button
type=
"default"
@
click=
"rest"
>
重置
</a-button>
<a-button
type=
"default"
@
click=
"rest"
>
{{
$t
(
'
table.reset
'
)
}}
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
>
确定
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
>
{{
$t
(
'
table.submit
'
)
}}
</a-button>
</a-space>
</a-space>
</a-col>
</a-col>
</a-row>
</a-row>
...
@@ -45,7 +49,7 @@
...
@@ -45,7 +49,7 @@
</
template
>
</
template
>
<slot
name=
"btn"
>
<slot
name=
"btn"
>
<a-button
type=
"link"
>
搜索
</a-button>
<a-button
type=
"link"
>
{{ $t('table.search') }}
</a-button>
</slot>
</slot>
</a-popover>
</a-popover>
</template>
</template>
...
...
src/pages/oceanus/equipment/Right/TabOne.vue
View file @
a2d69b3f
<
template
>
<
template
>
<a-descriptions
:column=
"2"
>
<a-descriptions
:column=
"2"
>
<a-descriptions-item
label=
"设备编码"
>
{{
dataInfo
.
equipmentCode
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.equipmentCode')"
>
<a-descriptions-item
label=
"设备名称"
>
{{
dataInfo
.
equipmentName
}}
</a-descriptions-item>
{{
dataInfo
.
equipmentCode
}}
<a-descriptions-item
label=
"类别"
>
{{
dataInfo
.
categoryName
}}
</a-descriptions-item>
</a-descriptions-item>
<a-descriptions-item
label=
"等级"
>
{{
dataInfo
.
equipmentGradeName
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.equipmentName')"
>
<a-descriptions-item
label=
"安装日期"
>
{{
dataInfo
.
equipmentName
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.category')"
>
{{
dataInfo
.
categoryName
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.equipmentGrade')"
>
{{
dataInfo
.
equipmentGradeName
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.installTime')"
>
{{
dataInfo
.
installTime
?
dataInfo
.
installTime
.
substring
(
0
,
10
)
:
''
}}
{{
dataInfo
.
installTime
?
dataInfo
.
installTime
.
substring
(
0
,
10
)
:
''
}}
</a-descriptions-item>
</a-descriptions-item>
<a-descriptions-item
label=
"运行日期
"
>
<a-descriptions-item
:label=
"$t('oc.runTime')
"
>
{{
dataInfo
.
runTime
?
dataInfo
.
runTime
.
substring
(
0
,
10
)
:
''
}}
{{
dataInfo
.
runTime
?
dataInfo
.
runTime
.
substring
(
0
,
10
)
:
''
}}
</a-descriptions-item>
</a-descriptions-item>
<a-descriptions-item
label=
"供应商"
>
{{
dataInfo
.
supplier
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.supplier')"
>
{{
dataInfo
.
supplier
}}
</a-descriptions-item>
<a-descriptions-item
label=
"制造商"
>
{{
dataInfo
.
manufacturer
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.manufacturer')"
>
{{
dataInfo
.
manufacturer
}}
</a-descriptions-item>
<a-descriptions-item
label=
"专业"
>
{{
dataInfo
.
specialtyCodeName
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('select.speciality')"
>
{{
dataInfo
.
specialtyCodeName
}}
</a-descriptions-item>
</a-descriptions>
</a-descriptions>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/pages/oceanus/equipment/Right/TabThree.vue
View file @
a2d69b3f
<
template
>
<
template
>
<a-row
:gutter=
"[16, 24]"
>
<a-row
:gutter=
"[16, 24]"
>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-button
type=
"link"
@
click=
"onAdd"
>
新增
</a-button>
<a-button
type=
"link"
@
click=
"onAdd"
>
{{
$t
(
'
table.add
'
)
}}
</a-button>
<a-divider
type=
"vertical"
/>
<a-divider
type=
"vertical"
/>
<a-dropdown>
<a-dropdown>
<a-button
type=
"link"
>
记录数
<a-icon
type=
"down"
/>
</a-button>
<a-button
type=
"link"
>
{{
$t
(
'
oc.recordsNumber
'
)
}}
<a-icon
type=
"down"
/>
</a-button>
<a-menu
slot=
"overlay"
>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a-menu-item>
<a
@
click=
"() => setPage(10)"
>
10
</a>
<a
@
click=
"() => setPage(10)"
>
10
</a>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</a-dropdown>
</a-dropdown>
</a-col>
</a-col>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<SearchPopover
:dataInfo=
"dataInfo"
title=
"事件过滤
"
@
submit=
"onScreen"
/>
<SearchPopover
:dataInfo=
"dataInfo"
:title=
"$t('oc.eventFiltering')
"
@
submit=
"onScreen"
/>
</a-col>
</a-col>
<a-col
:span=
"24"
>
<a-col
:span=
"24"
>
<a-timeline
mode=
"alternate"
>
<a-timeline
mode=
"alternate"
>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</a-space>
</a-space>
<div
class=
"tw-mb-2 tw-mt-2"
>
{{
item
.
eventDescription
}}
</div>
<div
class=
"tw-mb-2 tw-mt-2"
>
{{
item
.
eventDescription
}}
</div>
<a-space>
<a-space>
<a
@
click=
"() => onEdit(item)"
>
编辑
</a>
<a
@
click=
"() => onEdit(item)"
>
{{
$t
(
'
table.edit
'
)
}}
</a>
<PopconfirmDelete
<PopconfirmDelete
:url=
"`/oceanus/api/v1/equipments/events/$
{item.eventId}`"
:url=
"`/oceanus/api/v1/equipments/events/$
{item.eventId}`"
:cb="refresh"
:cb="refresh"
...
...
src/pages/oceanus/equipment/Right/TabTwo.vue
View file @
a2d69b3f
...
@@ -8,19 +8,19 @@
...
@@ -8,19 +8,19 @@
<template
#search
>
<template
#search
>
<a-row>
<a-row>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-button
type=
"link"
@
click=
"onAddRow"
>
新增
</a-button>
<a-button
type=
"link"
@
click=
"onAddRow"
>
{{
$t
(
'
table.add
'
)
}}
</a-button>
<a-divider
type=
"vertical"
/>
<a-divider
type=
"vertical"
/>
<a-dropdown>
<a-dropdown>
<a-button
type=
"link"
>
过滤
<a-icon
type=
"down"
/>
</a-button>
<a-button
type=
"link"
>
{{
$t
(
'
oc.filter
'
)
}}
<a-icon
type=
"down"
/>
</a-button>
<a-menu
slot=
"overlay"
>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a-menu-item>
<a
@
click=
"() => onChangeAttributeType('ALL')"
>
全部
</a>
<a
@
click=
"() => onChangeAttributeType('ALL')"
>
{{
$t
(
'
oc.all
'
)
}}
</a>
</a-menu-item>
</a-menu-item>
<a-menu-item>
<a-menu-item>
<a
@
click=
"() => onChangeAttributeType('SYSTEM')"
>
系统
</a>
<a
@
click=
"() => onChangeAttributeType('SYSTEM')"
>
{{
$t
(
'
oc.system
'
)
}}
}
</a>
</a-menu-item>
</a-menu-item>
<a-menu-item>
<a-menu-item>
<a
@
click=
"() => onChangeAttributeType('CUSTOM')"
>
自定义
</a>
<a
@
click=
"() => onChangeAttributeType('CUSTOM')"
>
{{
$t
(
'
oc.custom
'
)
}}
</a>
</a-menu-item>
</a-menu-item>
</a-menu>
</a-menu>
</a-dropdown>
</a-dropdown>
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<a-input-search
<a-input-search
v-model=
"attributeName"
v-model=
"attributeName"
:style=
"
{ width: '80%' }"
:style=
"
{ width: '80%' }"
placeholder="请输入搜索内容
"
:placeholder="$t('input.placeholder')
"
enter-button
enter-button
allowClear
allowClear
@search="onSearch"
@search="onSearch"
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</a-col>
</a-col>
</a-row>
</a-row>
</
template
>
</
template
>
<a-table-column
title=
"属性名称
"
>
<a-table-column
:title=
"$t('oc.attributeName')
"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<a-input
v-if=
"row.editable"
v-model=
"row.attributeName"
/>
<a-input
v-if=
"row.editable"
v-model=
"row.attributeName"
/>
<span
v-else
>
<span
v-else
>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</span>
</span>
</
template
>
</
template
>
</a-table-column>
</a-table-column>
<a-table-column
title=
"属性值
"
>
<a-table-column
:title=
"$t('oc.attributeValue')
"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<a-input
v-if=
"row.editable"
v-model=
"row.instanceValue"
/>
<a-input
v-if=
"row.editable"
v-model=
"row.instanceValue"
/>
<span
v-else
>
<span
v-else
>
...
@@ -53,8 +53,8 @@
...
@@ -53,8 +53,8 @@
</span>
</span>
</
template
>
</
template
>
</a-table-column>
</a-table-column>
<a-table-column
title=
"属性类型
"
data-index=
"attributeTypeName"
/>
<a-table-column
:title=
"$t('oc.attributeType')
"
data-index=
"attributeTypeName"
/>
<a-table-column
title=
"操作
"
:width=
"180"
>
<a-table-column
:title=
"$t('table.operation')
"
:width=
"180"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<ActionButton
v-if=
"row.editable"
:buttons=
"editButtons"
:row=
"row"
/>
<ActionButton
v-if=
"row.editable"
:buttons=
"editButtons"
:row=
"row"
/>
<ActionButton
v-else
:buttons=
"buttons"
:row=
"row"
/>
<ActionButton
v-else
:buttons=
"buttons"
:row=
"row"
/>
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
otherParams
:
{},
otherParams
:
{},
buttons
:
[
buttons
:
[
{
{
label
:
'
编辑
'
,
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
onEditRow
,
click
:
this
.
onEditRow
,
},
},
{
{
...
@@ -115,41 +115,41 @@ export default {
...
@@ -115,41 +115,41 @@ export default {
},
},
},
},
{
{
label
:
'
置顶
'
,
label
:
this
.
$t
(
'
basic.topping
'
)
,
click
:
async
(
row
)
=>
{
click
:
async
(
row
)
=>
{
const
{
instanceId
}
=
row
;
const
{
instanceId
}
=
row
;
try
{
try
{
await
Api
.
topEquipmentsAttributes
({
instanceId
});
await
Api
.
topEquipmentsAttributes
({
instanceId
});
this
.
refreshTable
();
this
.
refreshTable
();
this
.
$message
.
success
(
'
置顶成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
置顶失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
}
},
},
},
},
{
{
label
:
'
置底
'
,
label
:
this
.
$t
(
'
oc.toBottom
'
)
,
click
:
async
(
row
)
=>
{
click
:
async
(
row
)
=>
{
const
{
instanceId
}
=
row
;
const
{
instanceId
}
=
row
;
try
{
try
{
await
Api
.
bottomEquipmentsAttributes
({
instanceId
});
await
Api
.
bottomEquipmentsAttributes
({
instanceId
});
this
.
refreshTable
();
this
.
refreshTable
();
this
.
$message
.
success
(
'
置顶成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
置顶失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
}
},
},
},
},
],
],
editButtons
:
[
editButtons
:
[
{
{
label
:
'
确定
'
,
label
:
this
.
$t
(
'
oc.confirm
'
)
,
click
:
this
.
onSubmitRow
,
click
:
this
.
onSubmitRow
,
},
},
{
{
type
:
'
confirm
'
,
type
:
'
confirm
'
,
label
:
'
取消
'
,
label
:
this
.
$t
(
'
table.cancel
'
)
,
title
:
'
确认是否取消?
'
,
title
:
this
.
$t
(
'
oc.cancelConfirm
'
)
,
onOk
:
this
.
onCancelRow
,
onOk
:
this
.
onCancelRow
,
},
},
],
],
...
...
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