Commit 49cb215b48e3b5ca1e246412d030b4db735fb2a9

Authored by fengtao
1 parent 9271c810

perf(src/packages): 3d 模型页面未国际化

... ... @@ -12,7 +12,7 @@ export default {
12 12 SCATTER: 'Scatter plot',
13 13 MAP: 'Map',
14 14 COMBINATION: 'Combination diagram',
15   - MORE: 'More',
  15 + MORE: 'More'
16 16 },
17 17 information: {
18 18 TEXT: 'Text',
... ... @@ -26,7 +26,7 @@ export default {
26 26 THREE: '3D',
27 27 HEADLINE: 'Headline',
28 28 SUBTITLE: 'Subtitle',
29   - MORE: 'More',
  29 + MORE: 'More'
30 30 },
31 31 image: {
32 32 PRIVATE: 'Private image',
... ... @@ -53,22 +53,23 @@ export default {
53 53 clearClipboard: 'CLear clipboard',
54 54 delete: 'Delete',
55 55 group: 'Group',
56   - unGroup: 'UnGroup',
  56 + unGroup: 'UnGroup'
57 57 },
58 58 layerMode: {
59 59 thumbnail: 'Thumbnail',
60   - textList: 'Text list',
  60 + textList: 'Text list'
61 61 },
62 62 chartMode: {
63 63 singleRow: 'Single-row',
64   - biserial: 'Biserial',
  64 + biserial: 'Biserial'
65 65 },
66 66 notComponent: 'Component not found',
67 67 noLayer: 'There are currently no layers available',
68 68 saveContent: 'Save content',
69 69 saveThumImage: 'Save Thumbnail Image',
70 70 placeEntercorner: 'Please enter the name in the bottom left corner!',
71   - savingContentContinue: 'Saving the content will synchronize and modify all components that use this interface. Do you want to continue?',
  71 + savingContentContinue:
  72 + 'Saving the content will synchronize and modify all components that use this interface. Do you want to continue?',
72 73 chartComponent: 'Charting Components',
73 74 layerControl: 'Layer control',
74 75 detailSetting: 'Details Settings',
... ... @@ -81,30 +82,53 @@ export default {
81 82 initDataRefresh: 'Data initialization successful, please refresh the page!',
82 83 components: 'Components',
83 84 layer: 'Layer',
84   - iconToolTipChart:'Charting components',
85   - iconToolTipLayer:'Layer control',
86   - iconToolTipDetail:'Details settings',
87   - actionForward:'Forward',
88   - actionBack:'Retreat',
89   - closeAndExit:'Close on exit',
90   - animationTimingText:{
91   - linear:'Linear',
92   - ease:'Ease',
93   - easein:'Easein',
94   - easeout:'Easeout',
95   - easeinout:'Easeinout',
  85 + iconToolTipChart: 'Charting components',
  86 + iconToolTipLayer: 'Layer control',
  87 + iconToolTipDetail: 'Details settings',
  88 + actionForward: 'Forward',
  89 + actionBack: 'Retreat',
  90 + closeAndExit: 'Close on exit',
  91 + animationTimingText: {
  92 + linear: 'Linear',
  93 + ease: 'Ease',
  94 + easein: 'Easein',
  95 + easeout: 'Easeout',
  96 + easeinout: 'Easeinout'
96 97 },
97   - animationPlayStateText:{
98   - paused:'Paused',
99   - running:'Running',
  98 + animationPlayStateText: {
  99 + paused: 'Paused',
  100 + running: 'Running'
100 101 },
101   - animationIterationCountNameText:{
102   - unlimitedTimes:'Unlimited times',
  102 + animationIterationCountNameText: {
  103 + unlimitedTimes: 'Unlimited times'
103 104 },
104   - requestType:{
105   - customRequest:'Custom request',
106   - publicInterface:'Public interface',
  105 + requestType: {
  106 + customRequest: 'Custom request',
  107 + publicInterface: 'Public interface'
107 108 },
108   - color:'Color',
109   - threeDModel:'3D model',
  109 + color: 'Color',
  110 + threeDModel: '3D model',
  111 + threeFormSearch: {
  112 + name: 'Name',
  113 + placeholderName: 'Input name',
  114 + state: 'State',
  115 + placeholderState: 'Select state',
  116 + search: 'Search',
  117 + reset: 'Reset',
  118 + add: 'Add',
  119 + selectAll: 'Select all',
  120 + selectUnAll: 'Select unAll',
  121 + batchOperate: 'Batch operate',
  122 + noData: 'No data',
  123 + all: 'All',
  124 + count: 'Count',
  125 + release:'Release',
  126 + unRelease:'Un release',
  127 + batchDelete:'Bulk delete',
  128 + batchRelease:'Bulk release',
  129 + batchUnRelease:'Bulk un release',
  130 + m1:'Do you want to delete the selected data in bulk?',
  131 + m2:'Do you want to publish the selected data in bulk?',
  132 + m3:'Do you want to cancel the publication of the selected data in bulk?',
  133 + }
110 134 }
... ...
... ... @@ -26,7 +26,7 @@ export default {
26 26 THREE: '三维',
27 27 HEADLINE: '大标题',
28 28 SUBTITLE: '小标题',
29   - MORE: '更多',
  29 + MORE: '更多'
30 30 },
31 31 image: {
32 32 PRIVATE: '私有图',
... ... @@ -53,15 +53,15 @@ export default {
53 53 clearClipboard: '清空剪贴板',
54 54 delete: '删除',
55 55 group: '创建分组',
56   - unGroup: '解除分组',
  56 + unGroup: '解除分组'
57 57 },
58 58 layerMode: {
59 59 thumbnail: '缩略图',
60   - textList: '文本列表',
  60 + textList: '文本列表'
61 61 },
62 62 chartMode: {
63 63 singleRow: '单列',
64   - biserial: '双列',
  64 + biserial: '双列'
65 65 },
66 66 notComponent: '没有找到组件',
67 67 noLayer: '暂无图层',
... ... @@ -81,30 +81,53 @@ export default {
81 81 initDataRefresh: '数据初未始化成功,请刷新页面!',
82 82 components: '组件',
83 83 layer: '图层',
84   - iconToolTipChart:'图表组件',
85   - iconToolTipLayer:'图层控制',
86   - iconToolTipDetail:'详情设置',
87   - actionForward:'前进',
88   - actionBack:'后退',
89   - closeAndExit:'关闭并退出',
90   - animationTimingText:{
91   - linear:'匀速',
92   - ease:'缓速',
93   - easein:'低速开始',
94   - easeout:'低速结束',
95   - easeinout:'低速开始和结束',
  84 + iconToolTipChart: '图表组件',
  85 + iconToolTipLayer: '图层控制',
  86 + iconToolTipDetail: '详情设置',
  87 + actionForward: '前进',
  88 + actionBack: '后退',
  89 + closeAndExit: '关闭并退出',
  90 + animationTimingText: {
  91 + linear: '匀速',
  92 + ease: '缓速',
  93 + easein: '低速开始',
  94 + easeout: '低速结束',
  95 + easeinout: '低速开始和结束'
96 96 },
97   - animationPlayStateText:{
98   - paused:'暂停',
99   - running:'播放',
  97 + animationPlayStateText: {
  98 + paused: '暂停',
  99 + running: '播放'
100 100 },
101   - animationIterationCountNameText:{
102   - unlimitedTimes:'无限次',
  101 + animationIterationCountNameText: {
  102 + unlimitedTimes: '无限次'
103 103 },
104   - requestType:{
105   - customRequest:'自定义请求',
106   - publicInterface:'公共接口',
  104 + requestType: {
  105 + customRequest: '自定义请求',
  106 + publicInterface: '公共接口'
107 107 },
108   - color:'颜色',
109   - threeDModel:'3D 模型',
  108 + color: '颜色',
  109 + threeDModel: '3D 模型',
  110 + threeFormSearch: {
  111 + name: '名称',
  112 + placeholderName: '输入名称',
  113 + state: '状态',
  114 + placeholderState: '选择状态',
  115 + search: '查询',
  116 + reset: '重置',
  117 + add: '新增',
  118 + selectAll: '全选',
  119 + selectUnAll: '反选',
  120 + batchOperate: '批量操作',
  121 + noData: '暂无数据',
  122 + all: '共',
  123 + count: '条',
  124 + release:'已发布',
  125 + unRelease:'未发布',
  126 + batchDelete:'批量删除',
  127 + batchRelease:'批量发布',
  128 + batchUnRelease:'批量取消发布',
  129 + m1:'是否批量删除所选数据?',
  130 + m2:'是否批量发布所选数据?',
  131 + m3:'是否批量取消发布所选数据?',
  132 + }
110 133 }
... ...
... ... @@ -4,13 +4,17 @@
4 4 <n-form ref="formRef" label-placement="left" label-width="auto" :model="formValue" :size="formSize">
5 5 <n-grid :cols="24" :x-gap="24">
6 6 <n-grid-item :span="6" label="Input" path="name">
7   - <n-form-item label="名称" path="name">
8   - <n-input v-model:value="formValue.name" placeholder="输入名称" />
  7 + <n-form-item :label="t('business.threeFormSearch.name')" path="name">
  8 + <n-input v-model:value="formValue.name" :placeholder="t('business.threeFormSearch.placeholderName')" />
9 9 </n-form-item>
10 10 </n-grid-item>
11 11 <n-grid-item :span="6" label="Select" path="state">
12   - <n-form-item label="状态" path="state">
13   - <n-select v-model:value="formValue.state" placeholder="选择状态" :options="statusOptions" />
  12 + <n-form-item :label="t('business.threeFormSearch.state')" path="state">
  13 + <n-select
  14 + v-model:value="formValue.state"
  15 + :placeholder="t('business.threeFormSearch.placeholderState')"
  16 + :options="statusOptions"
  17 + />
14 18 </n-form-item>
15 19 </n-grid-item>
16 20 <n-grid-item :span="8">
... ... @@ -20,7 +24,7 @@
20 24 <SearchIcon />
21 25 </n-icon>
22 26 </template>
23   - 查询
  27 + {{ t('business.threeFormSearch.search') }}
24 28 </n-button>
25 29 <n-button style="margin-left: 20px" @click="handleResetClick">
26 30 <template #icon>
... ... @@ -28,7 +32,7 @@
28 32 <ReloadSearch />
29 33 </n-icon>
30 34 </template>
31   - 重置
  35 + {{ t('business.threeFormSearch.reset') }}
32 36 </n-button>
33 37 </n-grid-item>
34 38 </n-grid>
... ... @@ -39,9 +43,11 @@
39 43 <div v-show="!loading">
40 44 <div style="display: flex; flex-direction: row-reverse">
41 45 <n-space>
42   - <n-button type="primary" @click="handleOpenThreeEditor"> 新增 </n-button>
  46 + <n-button type="primary" @click="handleOpenThreeEditor"> {{ t('business.threeFormSearch.add') }} </n-button>
43 47 <n-button v-if="list.length" @click="handleSelectAll" type="info">
44   - {{ selectAllTextFlag ? '全选' : '反选' }}
  48 + {{
  49 + selectAllTextFlag ? t('business.threeFormSearch.selectAll') : t('business.threeFormSearch.selectUnAll')
  50 + }}
45 51 </n-button>
46 52 <n-dropdown
47 53 v-if="list.length"
... ... @@ -50,7 +56,7 @@
50 56 :options="operationOptions"
51 57 @select="handleOperationSelect"
52 58 >
53   - <n-button :disabled="isBulkOperationFlag"> 批量操作 </n-button>
  59 + <n-button :disabled="isBulkOperationFlag"> {{ t('business.threeFormSearch.batchOperate') }} </n-button>
54 60 </n-dropdown>
55 61 </n-space>
56 62 </div>
... ... @@ -75,8 +81,8 @@
75 81 ></project-items-card>
76 82 </n-grid-item>
77 83 </n-grid>
78   - <div v-else style="height: calc(100vh - 40vh);display: flex;align-items: center;justify-content: center">
79   - <n-empty description="暂无数据">
  84 + <div v-else style="height: calc(100vh - 40vh); display: flex; align-items: center; justify-content: center">
  85 + <n-empty :description="t('business.threeFormSearch.noData')">
80 86 <template #extra> </template>
81 87 </n-empty>
82 88 </div>
... ... @@ -91,7 +97,9 @@
91 97 @update:page-size="changeSize"
92 98 show-size-picker
93 99 >
94   - <template #prefix> 共 {{ pagination.count }} 条 </template>
  100 + <template #prefix>
  101 + {{ t('business.threeFormSearch.all') }} {{ pagination.count }} {{ t('business.threeFormSearch.count') }}
  102 + </template>
95 103 </n-pagination>
96 104 </div>
97 105 </div>
... ... @@ -120,6 +128,8 @@ import { goDialog } from '@/utils'
120 128
121 129 const { SearchIcon, ReloadSearch } = icon.ionicons5
122 130
  131 +const t = window['$t']
  132 +
123 133 const { modalData, modalShow, closeModal, resizeHandle, editHandle } = useModalDataInit()
124 134
125 135 const formRef = ref<FormInst | null>(null)
... ... @@ -133,11 +143,11 @@ const formValue = ref({
133 143
134 144 const statusOptions = ref([
135 145 {
136   - label: '已发布',
  146 + label: t('business.threeFormSearch.release'),
137 147 value: 'yes'
138 148 },
139 149 {
140   - label: '未发布',
  150 + label: t('business.threeFormSearch.unRelease'),
141 151 value: 'no'
142 152 }
143 153 ])
... ... @@ -146,15 +156,15 @@ const operationKey = ref('')
146 156
147 157 const operationOptions = [
148 158 {
149   - label: '批量删除',
  159 + label: t('business.threeFormSearch.batchDelete'),
150 160 key: 'Bulk delete'
151 161 },
152 162 {
153   - label: '批量发布',
  163 + label: t('business.threeFormSearch.batchRelease'),
154 164 key: 'Bulk release'
155 165 },
156 166 {
157   - label: '批量取消发布',
  167 + label: t('business.threeFormSearch.batchUnRelease'),
158 168 key: 'Bulk un release'
159 169 }
160 170 ]
... ... @@ -197,7 +207,7 @@ const handleOperationSelect = async (key: string) => {
197 207 goDialog({
198 208 type: DialogEnum.DELETE,
199 209 promise: true,
200   - message: '是否批量删除所选数据?',
  210 + message: t('business.threeFormSearch.m1'),
201 211 // eslint-disable-next-line @typescript-eslint/no-empty-function
202 212 onPositiveCallback: () => {},
203 213 promiseResCallback: async () => {
... ... @@ -218,10 +228,10 @@ const handleOperationSelect = async (key: string) => {
218 228 })
219 229 break
220 230 case 'Bulk release':
221   - releaseGoDialog('是否批量发布所选数据?', 1, 'common.releaseSuccessText')
  231 + releaseGoDialog(t('business.threeFormSearch.m2'), 1, 'common.releaseSuccessText')
222 232 break
223 233 case 'Bulk un release':
224   - releaseGoDialog('是否批量取消发布所选数据?', 0, 'common.cancelReleaseSuccessText')
  234 + releaseGoDialog(t('business.threeFormSearch.m3'), 0, 'common.cancelReleaseSuccessText')
225 235 break
226 236 }
227 237 }
... ...