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';
...
@@ -7,6 +7,7 @@ import OtherLang from './other';
import
acronLang
from
'
./acron
'
;
import
acronLang
from
'
./acron
'
;
import
basicLang
from
'
./basic
'
;
import
basicLang
from
'
./basic
'
;
import
taskCenterLang
from
'
./task_center
'
;
import
taskCenterLang
from
'
./task_center
'
;
import
oceanusLang
from
'
./oceanus
'
;
const
zh_CN
=
{};
const
zh_CN
=
{};
const
en_US
=
{};
const
en_US
=
{};
...
@@ -31,5 +32,6 @@ formatLang(OtherLang);
...
@@ -31,5 +32,6 @@ formatLang(OtherLang);
formatLang
(
acronLang
);
formatLang
(
acronLang
);
formatLang
(
basicLang
);
formatLang
(
basicLang
);
formatLang
(
taskCenterLang
);
formatLang
(
taskCenterLang
);
formatLang
(
oceanusLang
);
export
{
en_US
,
zh_CN
};
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 @@
...
@@ -20,9 +20,9 @@
<a-col
:span=
"24"
class=
"tw-text-right"
>
<a-col
:span=
"24"
class=
"tw-text-right"
>
<a-button-group>
<a-button-group>
<a-button
type=
"primary"
ghost
@
click=
"add"
>
新增
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"add"
>
{{
$t
(
'
table.add
'
)
}}
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"edit"
>
编辑
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"edit"
>
{{
$t
(
'
table.edit
'
)
}}
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"del"
>
删除
</a-button>
<a-button
type=
"primary"
ghost
@
click=
"del"
>
{{
$t
(
'
table.delete
'
)
}}
</a-button>
</a-button-group>
</a-button-group>
</a-col>
</a-col>
</a-row>
</a-row>
...
@@ -136,14 +136,12 @@ export default {
...
@@ -136,14 +136,12 @@ export default {
if
(
!
categoryId
)
return
;
if
(
!
categoryId
)
return
;
try
{
try
{
await
Api
.
delOceanusTree
({
categoryId
});
await
Api
.
delOceanusTree
({
categoryId
});
this
.
$message
.
success
(
'
删除成功!
'
);
this
.
$message
.
success
(
this
.
$t
(
'
table.operationSucceeded
'
)
);
this
.
init
();
this
.
init
();
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
$message
.
warning
(
'
删除失败!
'
);
this
.
$message
.
warning
(
this
.
$t
(
'
table.operationFailed
'
)
);
}
}
},
},
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
</
style
>
src/pages/oceanus/category/components/RightTable.vue
View file @
27800600
...
@@ -12,13 +12,13 @@
...
@@ -12,13 +12,13 @@
<
template
#search
>
<
template
#search
>
<a-row>
<a-row>
<a-col
:span=
"12"
>
<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>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<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"
...
@@ -27,15 +27,19 @@
...
@@ -27,15 +27,19 @@
</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"
:placeholder=
"$t('input.placeholder')"
/>
<span
v-else
>
<span
v-else
>
{{
row
.
attributeName
}}
{{
row
.
attributeName
}}
</span>
</span>
</
template
>
</
template
>
</a-table-column>
</a-table-column>
<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"
/>
...
@@ -69,7 +73,7 @@ export default {
...
@@ -69,7 +73,7 @@ export default {
return
{
return
{
buttons
:
[
buttons
:
[
{
{
label
:
'
编辑
'
,
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
onEditTableRow
,
click
:
this
.
onEditTableRow
,
},
},
{
{
...
@@ -78,41 +82,41 @@ export default {
...
@@ -78,41 +82,41 @@ export default {
after
:
()
=>
this
.
refreshTable
(),
after
:
()
=>
this
.
refreshTable
(),
},
},
{
{
label
:
'
置顶
'
,
label
:
this
.
$t
(
'
basic.topping
'
)
,
click
:
async
(
row
)
=>
{
click
:
async
(
row
)
=>
{
const
{
attributeId
,
categoryId
}
=
row
;
const
{
attributeId
,
categoryId
}
=
row
;
try
{
try
{
await
Api
.
movementAttributes
({
attributeId
,
categoryId
,
moveType
:
'
TOP
'
});
await
Api
.
movementAttributes
({
attributeId
,
categoryId
,
moveType
:
'
TOP
'
});
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
{
attributeId
,
categoryId
}
=
row
;
const
{
attributeId
,
categoryId
}
=
row
;
try
{
try
{
await
Api
.
movementAttributes
({
attributeId
,
categoryId
,
moveType
:
'
BOTTOM
'
});
await
Api
.
movementAttributes
({
attributeId
,
categoryId
,
moveType
:
'
BOTTOM
'
});
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
(
'
table.submit
'
)
,
click
:
this
.
onSubmitTableRow
,
click
:
this
.
onSubmitTableRow
,
},
},
{
{
type
:
'
confirm
'
,
type
:
'
confirm
'
,
label
:
'
取消
'
,
label
:
this
.
$t
(
'
table.cancel
'
)
,
title
:
'
确认是否取消?
'
,
title
:
this
.
$t
(
'
oc.cancelConfirm
'
)
,
onOk
:
this
.
onCancelTableRow
,
onOk
:
this
.
onCancelTableRow
,
},
},
],
],
...
@@ -162,7 +166,7 @@ export default {
...
@@ -162,7 +166,7 @@ export default {
},
},
async
onSubmitTableRow
(
row
)
{
async
onSubmitTableRow
(
row
)
{
if
(
row
.
attributeName
===
''
)
{
if
(
row
.
attributeName
===
''
)
{
return
this
.
$message
.
warning
(
'
请输入属性名称!
'
);
return
this
.
$message
.
warning
(
this
.
$t
(
'
oc.attributeNameErrorInfo
'
)
);
}
else
{
}
else
{
try
{
try
{
if
(
row
.
action
===
'
add
'
)
{
if
(
row
.
action
===
'
add
'
)
{
...
@@ -172,9 +176,9 @@ export default {
...
@@ -172,9 +176,9 @@ export default {
await
Api
.
updateAttributes
(
row
);
await
Api
.
updateAttributes
(
row
);
}
}
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
'
)
);
}
}
}
}
},
},
...
@@ -196,5 +200,3 @@ export default {
...
@@ -196,5 +200,3 @@ export default {
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
</
style
>
src/pages/oceanus/category/components/TreeDrawer.vue
View file @
27800600
<
template
>
<
template
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"title"
:onOk=
"submit"
:colesAfter=
"refresh"
>
<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
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"编码"
prop=
"categoryCode"
>
<a-form-model-item
:label=
"$t('oc.code')"
prop=
"categoryCode"
>
<a-input
v-model=
"form.categoryCode"
:disabled=
"isView"
/>
<a-input
v-model=
"form.categoryCode"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"名称"
prop=
"categoryName"
>
<a-form-model-item
:label=
"$t('basic.name')"
prop=
"categoryName"
>
<a-input
v-model=
"form.categoryName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.categoryName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"说明"
prop=
"remark"
>
<a-form-model-item
:label=
"$t('table.remark')"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
/>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</Drawer>
</Drawer>
...
@@ -30,14 +43,13 @@ export default {
...
@@ -30,14 +43,13 @@ export default {
visible
:
false
,
visible
:
false
,
form
:
{},
form
:
{},
rules
:
{
rules
:
{
categoryCode
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
categoryCode
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
categoryName
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
categoryName
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
remark
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
remark
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
},
},
Api
,
Api
,
};
};
},
},
async
mounted
()
{},
methods
:
{
methods
:
{
open
()
{
open
()
{
this
.
form
=
{};
this
.
form
=
{};
...
...
src/pages/oceanus/category/index.vue
View file @
27800600
...
@@ -20,11 +20,5 @@ export default {
...
@@ -20,11 +20,5 @@ export default {
treeVale
:
{},
treeVale
:
{},
};
};
},
},
watch
:
{
treeVale
(
val
)
{
console
.
log
(
val
);
},
},
methods
:
{},
};
};
</
script
>
</
script
>
src/pages/oceanus/equipment/index.vue
View file @
27800600
...
@@ -22,6 +22,5 @@ export default {
...
@@ -22,6 +22,5 @@ export default {
isObjEmpty
,
isObjEmpty
,
};
};
},
},
watch
:
{},
};
};
</
script
>
</
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