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
Show 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 @@
:value=
"value"
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
allow-clear
:options="data"
@change="onChange"
...
...
src/local/oceanus.js
View file @
a2d69b3f
...
...
@@ -3,5 +3,30 @@ export default {
'
oc.attributeNameErrorInfo
'
:
[
'
请输入属性名称
'
,
'
Please enter attribute Name
'
],
'
oc.toBottom
'
:
[
'
置底
'
,
'
ToBottom
'
],
'
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 @@
key=
"1"
@
click=
"addOrg"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType !== 'EQUIPMENT')"
>
新增组织
>
{{
$t
(
'
oc.newOrganization
'
)
}}
</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-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-button
type=
"primary"
...
...
@@ -52,15 +56,17 @@
ghost
@
click=
"edit"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType === 'EQUIPMENT')"
>
编辑
</a-button
>
{{
$t
(
'
table.edit
'
)
}}
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"del"
:disabled=
"!(treeNode && treeNode.dataRef.catalogType !== 'ROOTNODE')"
>
删除
</a-button
>
{{
$t
(
'
table.delete
'
)
}}
</a-button>
</a-button-group>
</a-col>
</a-row>
...
...
@@ -117,7 +123,7 @@ export default {
this
.
treeData
=
[];
const
parentNode
=
{
catalogId
:
-
1
,
catalogName
:
'
根节点
'
,
catalogName
:
this
.
$t
(
'
oc.rootNode
'
)
,
catalogType
:
'
ROOTNODE
'
,
isLeaf
:
false
,
};
...
...
@@ -206,12 +212,12 @@ export default {
if
(
isObjEmpty
(
data
))
return
;
try
{
await
Api
.
delEquipmentsTree
(
data
);
this
.
$message
.
success
(
'
删除成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
this
.
onLoadData
(
this
.
treeNode
.
$parent
);
this
.
treeNode
=
undefined
;
this
.
selectedKeys
=
[];
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
删除失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
},
treeDrawerRefresh
(
type
,
data
)
{
...
...
src/pages/oceanus/equipment/Left/OrganizationTree.vue
View file @
a2d69b3f
...
...
@@ -4,7 +4,7 @@
show-search
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
:tree-data="treeData"
allow-clear
tree-default-expand-all
...
...
src/pages/oceanus/equipment/Left/TreeDrawer.vue
View file @
a2d69b3f
<
template
>
<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-item
label=
"设备编码"
prop=
"equipmentCode"
>
<a-input
v-model=
"form.equipmentCode"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('oc.equipmentCode')"
prop=
"equipmentCode"
>
<a-input
v-model=
"form.equipmentCode"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"设备名称"
prop=
"equipmentName"
>
<a-input
v-model=
"form.equipmentName"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('oc.equipmentName')"
prop=
"equipmentName"
>
<a-input
v-model=
"form.equipmentName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"类别"
prop=
"categoryId"
>
<a-tree-select
:treeData=
"oceanusTreeList"
v-model=
"form.categoryId"
:disabled=
"type === 1"
/>
<a-form-model-item
:label=
"$t('oc.category')"
prop=
"categoryId"
>
<a-tree-select
:treeData=
"oceanusTreeList"
v-model=
"form.categoryId"
:disabled=
"type === 1"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"等级"
prop=
"equipmentGrade"
>
<Select
v-model=
"form.equipmentGrade"
:options=
"equipmentGradeList"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('oc.equipmentGrade')"
prop=
"equipmentGrade"
>
<Select
v-model=
"form.equipmentGrade"
:options=
"equipmentGradeList"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
</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-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-form-model-item>
<a-form-model-item
label=
"供应商
"
prop=
"supplier"
>
<a-input
v-model=
"form.supplier"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('oc.supplier')
"
prop=
"supplier"
>
<a-input
v-model=
"form.supplier"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"制造商"
prop=
"manufacturer"
>
<a-input
v-model=
"form.manufacturer"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('oc.manufacturer')"
prop=
"manufacturer"
>
<a-input
v-model=
"form.manufacturer"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</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"
/>
</a-form-model-item>
</a-form-model>
...
...
@@ -51,13 +73,9 @@ export default {
visible
:
false
,
form
:
{},
rules
:
{
equipmentCode
:
[
{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
},
],
equipmentName
:
[
{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
},
],
categoryId
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
equipmentCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
),
trigger
:
'
change
'
}],
equipmentName
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
),
trigger
:
'
change
'
}],
categoryId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
),
trigger
:
'
change
'
}],
},
equipmentGradeList
:
[],
specialtyCodeList
:
[],
...
...
src/pages/oceanus/equipment/Left/TreeModal.vue
View file @
a2d69b3f
<
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-item
label=
"组织
"
prop=
"catalogValue"
>
<a-form-model-item
:label=
"$t('system.organizatio')
"
prop=
"catalogValue"
>
<OrganizationTree
v-model=
"form.catalogValue"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model>
...
...
@@ -31,12 +37,11 @@ export default {
parentId
:
undefined
,
form
:
{},
rules
:
{
catalogValue
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
catalogValue
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
)
,
trigger
:
'
change
'
}],
},
Api
,
};
},
async
mounted
()
{},
methods
:
{
open
()
{
this
.
form
=
{};
...
...
src/pages/oceanus/equipment/Right/EventDrawer.vue
View file @
a2d69b3f
<
template
>
<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-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-form-model-item>
<a-form-model-item
label=
"事件类型
"
prop=
"eventType"
>
<a-form-model-item
:label=
"$t('log.eventType')
"
prop=
"eventType"
>
<MySelect
v-model=
"form.eventType"
:request=
"getStaticDataApi"
...
...
@@ -12,7 +12,7 @@
:disabled="isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"发生日期
"
prop=
"occurTime"
>
<a-form-model-item
:label=
"$t('oc.occurTime')
"
prop=
"occurTime"
>
<a-date-picker
v-model=
"form.occurTime"
style=
"width: 100%"
...
...
@@ -20,12 +20,12 @@
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"设备编码
"
prop=
"eventDescription"
>
<a-form-model-item
:label=
"$t('oc.equipmentCode')
"
prop=
"eventDescription"
>
<a-textarea
:rows=
"4"
v-model=
"form.eventDescription"
style=
"width: 100%"
placeholder=
"Select date
"
:placeholder=
"$t('input.placeholder')
"
:disabled=
"isView"
/>
</a-form-model-item>
...
...
src/pages/oceanus/equipment/Right/RightBox.vue
View file @
a2d69b3f
<
template
>
<my-card>
<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"
/>
</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"
/>
</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"
/>
</a-tab-pane>
</a-tabs>
...
...
src/pages/oceanus/equipment/Right/SearchPopover.vue
View file @
a2d69b3f
...
...
@@ -3,28 +3,32 @@
<template
slot=
"content"
>
<div
:style=
"
{ width: '400px' }">
<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
v-model=
"form.startTime"
style=
"width: 100%"
placeholder=
"Select date
"
:placeholder=
"$t('select.placeholder')
"
/>
</a-form-model-item>
<a-form-model-item
:style=
"
{ marginBottom: 0 }" label="结束时间">
<a-date-picker
v-model=
"form.endTime"
style=
"width: 100%"
placeholder=
"Select date"
/>
<a-form-model-item
:style=
"
{ marginBottom: 0 }" :label="$t('select.endTime')">
<a-date-picker
v-model=
"form.endTime"
style=
"width: 100%"
:placeholder=
"$t('select.placeholder')"
/>
</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
v-model=
"form.equipmentId"
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="treeData"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
treeDataSimpleMode
:load-data="onLoadData"
/>
</a-form-model-item>
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
label="时间类型
">
<a-form-model-item
:style=
"
{ marginBottom: 0 }"
:label="$t('oc.timeType')
">
<MySelect
v-model=
"form.eventType"
:request=
"getStaticDataApi"
...
...
@@ -35,9 +39,9 @@
<a-row>
<a-col
:span=
"24"
class=
"tw-text-right tw-mt-4"
>
<a-space>
<a-button
type=
"default"
@
click=
"hide"
>
取消
</a-button>
<a-button
type=
"default"
@
click=
"rest"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
>
确定
</a-button>
<a-button
type=
"default"
@
click=
"hide"
>
{{
$t
(
'
table.cancel
'
)
}}
</a-button>
<a-button
type=
"default"
@
click=
"rest"
>
{{
$t
(
'
table.reset
'
)
}}
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
>
{{
$t
(
'
table.submit
'
)
}}
</a-button>
</a-space>
</a-col>
</a-row>
...
...
@@ -45,7 +49,7 @@
</
template
>
<slot
name=
"btn"
>
<a-button
type=
"link"
>
搜索
</a-button>
<a-button
type=
"link"
>
{{ $t('table.search') }}
</a-button>
</slot>
</a-popover>
</template>
...
...
src/pages/oceanus/equipment/Right/TabOne.vue
View file @
a2d69b3f
<
template
>
<a-descriptions
:column=
"2"
>
<a-descriptions-item
label=
"设备编码"
>
{{
dataInfo
.
equipmentCode
}}
</a-descriptions-item>
<a-descriptions-item
label=
"设备名称"
>
{{
dataInfo
.
equipmentName
}}
</a-descriptions-item>
<a-descriptions-item
label=
"类别"
>
{{
dataInfo
.
categoryName
}}
</a-descriptions-item>
<a-descriptions-item
label=
"等级"
>
{{
dataInfo
.
equipmentGradeName
}}
</a-descriptions-item>
<a-descriptions-item
label=
"安装日期"
>
<a-descriptions-item
:label=
"$t('oc.equipmentCode')"
>
{{
dataInfo
.
equipmentCode
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.equipmentName')"
>
{{
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
)
:
''
}}
</a-descriptions-item>
<a-descriptions-item
label=
"运行日期
"
>
<a-descriptions-item
:label=
"$t('oc.runTime')
"
>
{{
dataInfo
.
runTime
?
dataInfo
.
runTime
.
substring
(
0
,
10
)
:
''
}}
</a-descriptions-item>
<a-descriptions-item
label=
"供应商"
>
{{
dataInfo
.
supplier
}}
</a-descriptions-item>
<a-descriptions-item
label=
"制造商"
>
{{
dataInfo
.
manufacturer
}}
</a-descriptions-item>
<a-descriptions-item
label=
"专业"
>
{{
dataInfo
.
specialtyCodeName
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.supplier')"
>
{{
dataInfo
.
supplier
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('oc.manufacturer')"
>
{{
dataInfo
.
manufacturer
}}
</a-descriptions-item>
<a-descriptions-item
:label=
"$t('select.speciality')"
>
{{
dataInfo
.
specialtyCodeName
}}
</a-descriptions-item>
</a-descriptions>
</
template
>
<
script
>
...
...
src/pages/oceanus/equipment/Right/TabThree.vue
View file @
a2d69b3f
<
template
>
<a-row
:gutter=
"[16, 24]"
>
<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-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-item>
<a
@
click=
"() => setPage(10)"
>
10
</a>
...
...
@@ -25,7 +25,7 @@
</a-dropdown>
</a-col>
<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
:span=
"24"
>
<a-timeline
mode=
"alternate"
>
...
...
@@ -45,7 +45,7 @@
</a-space>
<div
class=
"tw-mb-2 tw-mt-2"
>
{{
item
.
eventDescription
}}
</div>
<a-space>
<a
@
click=
"() => onEdit(item)"
>
编辑
</a>
<a
@
click=
"() => onEdit(item)"
>
{{
$t
(
'
table.edit
'
)
}}
</a>
<PopconfirmDelete
:url=
"`/oceanus/api/v1/equipments/events/$
{item.eventId}`"
:cb="refresh"
...
...
src/pages/oceanus/equipment/Right/TabTwo.vue
View file @
a2d69b3f
...
...
@@ -8,19 +8,19 @@
<template
#search
>
<a-row>
<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-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-item>
<a
@
click=
"() => onChangeAttributeType('ALL')"
>
全部
</a>
<a
@
click=
"() => onChangeAttributeType('ALL')"
>
{{
$t
(
'
oc.all
'
)
}}
</a>
</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
@
click=
"() => onChangeAttributeType('CUSTOM')"
>
自定义
</a>
<a
@
click=
"() => onChangeAttributeType('CUSTOM')"
>
{{
$t
(
'
oc.custom
'
)
}}
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
...
...
@@ -29,7 +29,7 @@
<a-input-search
v-model=
"attributeName"
:style=
"
{ width: '80%' }"
placeholder="请输入搜索内容
"
:placeholder="$t('input.placeholder')
"
enter-button
allowClear
@search="onSearch"
...
...
@@ -37,7 +37,7 @@
</a-col>
</a-row>
</
template
>
<a-table-column
title=
"属性名称
"
>
<a-table-column
:title=
"$t('oc.attributeName')
"
>
<
template
#default=
"row"
>
<a-input
v-if=
"row.editable"
v-model=
"row.attributeName"
/>
<span
v-else
>
...
...
@@ -45,7 +45,7 @@
</span>
</
template
>
</a-table-column>
<a-table-column
title=
"属性值
"
>
<a-table-column
:title=
"$t('oc.attributeValue')
"
>
<
template
#default=
"row"
>
<a-input
v-if=
"row.editable"
v-model=
"row.instanceValue"
/>
<span
v-else
>
...
...
@@ -53,8 +53,8 @@
</span>
</
template
>
</a-table-column>
<a-table-column
title=
"属性类型
"
data-index=
"attributeTypeName"
/>
<a-table-column
title=
"操作
"
:width=
"180"
>
<a-table-column
:title=
"$t('oc.attributeType')
"
data-index=
"attributeTypeName"
/>
<a-table-column
:title=
"$t('table.operation')
"
:width=
"180"
>
<
template
#default=
"row"
>
<ActionButton
v-if=
"row.editable"
:buttons=
"editButtons"
:row=
"row"
/>
<ActionButton
v-else
:buttons=
"buttons"
:row=
"row"
/>
...
...
@@ -97,7 +97,7 @@ export default {
otherParams
:
{},
buttons
:
[
{
label
:
'
编辑
'
,
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
onEditRow
,
},
{
...
...
@@ -115,41 +115,41 @@ export default {
},
},
{
label
:
'
置顶
'
,
label
:
this
.
$t
(
'
basic.topping
'
)
,
click
:
async
(
row
)
=>
{
const
{
instanceId
}
=
row
;
try
{
await
Api
.
topEquipmentsAttributes
({
instanceId
});
this
.
refreshTable
();
this
.
$message
.
success
(
'
置顶成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
置顶失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
},
},
{
label
:
'
置底
'
,
label
:
this
.
$t
(
'
oc.toBottom
'
)
,
click
:
async
(
row
)
=>
{
const
{
instanceId
}
=
row
;
try
{
await
Api
.
bottomEquipmentsAttributes
({
instanceId
});
this
.
refreshTable
();
this
.
$message
.
success
(
'
置顶成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
置顶失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
},
},
],
editButtons
:
[
{
label
:
'
确定
'
,
label
:
this
.
$t
(
'
oc.confirm
'
)
,
click
:
this
.
onSubmitRow
,
},
{
type
:
'
confirm
'
,
label
:
'
取消
'
,
title
:
'
确认是否取消?
'
,
label
:
this
.
$t
(
'
table.cancel
'
)
,
title
:
this
.
$t
(
'
oc.cancelConfirm
'
)
,
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