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
27800600
Commit
27800600
authored
Aug 02, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 设备管理分类配置国际化完成
parent
fe13177a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
44 deletions
+58
-44
src/local/index.js
src/local/index.js
+2
-0
src/local/oceanus.js
src/local/oceanus.js
+7
-0
src/pages/oceanus/category/components/LeftTree.vue
src/pages/oceanus/category/components/LeftTree.vue
+5
-7
src/pages/oceanus/category/components/RightTable.vue
src/pages/oceanus/category/components/RightTable.vue
+22
-20
src/pages/oceanus/category/components/TreeDrawer.vue
src/pages/oceanus/category/components/TreeDrawer.vue
+22
-10
src/pages/oceanus/category/index.vue
src/pages/oceanus/category/index.vue
+0
-6
src/pages/oceanus/equipment/index.vue
src/pages/oceanus/equipment/index.vue
+0
-1
No files found.
src/local/index.js
View file @
27800600
...
...
@@ -7,6 +7,7 @@ import OtherLang from './other';
import
acronLang
from
'
./acron
'
;
import
basicLang
from
'
./basic
'
;
import
taskCenterLang
from
'
./task_center
'
;
import
oceanusLang
from
'
./oceanus
'
;
const
zh_CN
=
{};
const
en_US
=
{};
...
...
@@ -31,5 +32,6 @@ formatLang(OtherLang);
formatLang
(
acronLang
);
formatLang
(
basicLang
);
formatLang
(
taskCenterLang
);
formatLang
(
oceanusLang
);
export
{
en_US
,
zh_CN
};
src/local/oceanus.js
0 → 100644
View file @
27800600
export
default
{
'
oc.attributeName
'
:
[
'
属性名称
'
,
'
Attribute Name
'
],
'
oc.attributeNameErrorInfo
'
:
[
'
请输入属性名称
'
,
'
Please enter attribute Name
'
],
'
oc.toBottom
'
:
[
'
置底
'
,
'
ToBottom
'
],
'
oc.cancelConfirm
'
:
[
'
确认是否取消
'
,
'
Confirm Whether To Cancel
'
],
'
oc.code
'
:
[
'
编码
'
,
'
Code
'
]
};
src/pages/oceanus/category/components/LeftTree.vue
View file @
27800600
...
...
@@ -20,9 +20,9 @@
<a-col
:span=
"24"
class=
"tw-text-right"
>
<a-button-group>
<a-button
type=
"primary"
ghost
@
click=
"add"
>
新增
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"edit"
>
编辑
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"del"
>
删除
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"add"
>
{{
$t
(
'
table.add
'
)
}}
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"edit"
>
{{
$t
(
'
table.edit
'
)
}}
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"del"
>
{{
$t
(
'
table.delete
'
)
}}
</a-button>
</a-button-group>
</a-col>
</a-row>
...
...
@@ -136,14 +136,12 @@ export default {
if
(
!
categoryId
)
return
;
try
{
await
Api
.
delOceanusTree
({
categoryId
});
this
.
$message
.
success
(
'
删除成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
this
.
init
();
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
删除失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
},
},
};
</
script
>
<
style
scoped
>
</
style
>
src/pages/oceanus/category/components/RightTable.vue
View file @
27800600
...
...
@@ -12,13 +12,13 @@
<
template
#search
>
<a-row>
<a-col
:span=
"12"
>
<a-button
type=
"link"
@
click=
"onAddTableRow"
>
新增
</a-button>
<a-button
type=
"link"
@
click=
"onAddTableRow"
>
{{
$t
(
'
table.add
'
)
}}
</a-button>
</a-col>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<a-input-search
v-model=
"attributeName"
:style=
"
{ width: '80%' }"
placeholder="请输入搜索内容
"
:placeholder="$t('input.placeholder')
"
enter-button
allowClear
@search="onSearch"
...
...
@@ -27,15 +27,19 @@
</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"
/>
<a-input
v-if=
"row.editable"
v-model=
"row.attributeName"
:placeholder=
"$t('input.placeholder')"
/>
<span
v-else
>
{{
row
.
attributeName
}}
</span>
</
template
>
</a-table-column>
<a-table-column
title=
"操作
"
:width=
"180"
>
<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"
/>
...
...
@@ -69,7 +73,7 @@ export default {
return
{
buttons
:
[
{
label
:
'
编辑
'
,
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
onEditTableRow
,
},
{
...
...
@@ -78,41 +82,41 @@ export default {
after
:
()
=>
this
.
refreshTable
(),
},
{
label
:
'
置顶
'
,
label
:
this
.
$t
(
'
basic.topping
'
)
,
click
:
async
(
row
)
=>
{
const
{
attributeId
,
categoryId
}
=
row
;
try
{
await
Api
.
movementAttributes
({
attributeId
,
categoryId
,
moveType
:
'
TOP
'
});
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
{
attributeId
,
categoryId
}
=
row
;
try
{
await
Api
.
movementAttributes
({
attributeId
,
categoryId
,
moveType
:
'
BOTTOM
'
});
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
(
'
table.submit
'
)
,
click
:
this
.
onSubmitTableRow
,
},
{
type
:
'
confirm
'
,
label
:
'
取消
'
,
title
:
'
确认是否取消?
'
,
label
:
this
.
$t
(
'
table.cancel
'
)
,
title
:
this
.
$t
(
'
oc.cancelConfirm
'
)
,
onOk
:
this
.
onCancelTableRow
,
},
],
...
...
@@ -162,7 +166,7 @@ export default {
},
async
onSubmitTableRow
(
row
)
{
if
(
row
.
attributeName
===
''
)
{
return
this
.
$message
.
warning
(
'
请输入属性名称!
'
);
return
this
.
$message
.
warning
(
this
.
$t
(
'
oc.attributeNameErrorInfo
'
)
);
}
else
{
try
{
if
(
row
.
action
===
'
add
'
)
{
...
...
@@ -172,9 +176,9 @@ export default {
await
Api
.
updateAttributes
(
row
);
}
this
.
refreshTable
();
this
.
$message
.
success
(
'
提交成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
保存失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
}
},
...
...
@@ -196,5 +200,3 @@ export default {
},
};
</
script
>
<
style
scoped
>
</
style
>
src/pages/oceanus/category/components/TreeDrawer.vue
View file @
27800600
<
template
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"title"
:onOk=
"submit"
:colesAfter=
"refresh"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"编码"
prop=
"categoryCode"
>
<a-input
v-model=
"form.categoryCode"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('oc.code')"
prop=
"categoryCode"
>
<a-input
v-model=
"form.categoryCode"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"名称"
prop=
"categoryName"
>
<a-input
v-model=
"form.categoryName"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('basic.name')"
prop=
"categoryName"
>
<a-input
v-model=
"form.categoryName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"说明"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
/>
<a-form-model-item
:label=
"$t('table.remark')"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model>
</Drawer>
...
...
@@ -30,14 +43,13 @@ export default {
visible
:
false
,
form
:
{},
rules
:
{
categoryCode
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
categoryName
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
remark
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
categoryCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
categoryName
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
remark
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
},
Api
,
};
},
async
mounted
()
{},
methods
:
{
open
()
{
this
.
form
=
{};
...
...
src/pages/oceanus/category/index.vue
View file @
27800600
...
...
@@ -20,11 +20,5 @@ export default {
treeVale
:
{},
};
},
watch
:
{
treeVale
(
val
)
{
console
.
log
(
val
);
},
},
methods
:
{},
};
</
script
>
src/pages/oceanus/equipment/index.vue
View file @
27800600
...
...
@@ -22,6 +22,5 @@ export default {
isObjEmpty
,
};
},
watch
:
{},
};
</
script
>
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