kz-ui-base 1.0.158 → 1.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,19 +5,19 @@
5
5
  v-if="searchVisible">
6
6
  <el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()"/>
7
7
  </el-tooltip> -->
8
- <el-tooltip class="item" effect="dark" content="刷新" placement="top" v-if="refreshVisible">
8
+ <el-tooltip class="item" effect="dark" :content="t('common.refresh')" placement="top" v-if="refreshVisible">
9
9
  <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()"/>
10
10
  </el-tooltip>
11
- <el-tooltip class="item" effect="dark" :content="sortable ? '禁用排序' : '启用排序'" placement="top" v-if="sortVisible">
11
+ <el-tooltip class="item" effect="dark" :content="sortable ? t('common.disableSort') : t('common.enableSort')" placement="top" v-if="sortVisible">
12
12
  <el-button size="mini" circle icon="el-icon-sort" @click="toggleSortable()"/>
13
13
  </el-tooltip>
14
- <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
14
+ <el-tooltip class="item" effect="dark" :content="t('common.showHideColumn')" placement="top" v-if="columns">
15
15
  <el-button size="mini" circle icon="el-icon-menu" @click="showColumn()"/>
16
16
  </el-tooltip>
17
17
  </el-row>
18
18
  <el-dialog :title="title" :visible.sync="open" append-to-body :before-close="handleClose">
19
19
  <el-transfer
20
- :titles="['显示', '隐藏']"
20
+ :titles="[t('common.show'), t('common.hide')]"
21
21
  v-model="value"
22
22
  :data="columns"
23
23
  @change="dataChange"
@@ -34,7 +34,7 @@ export default {
34
34
  // 显隐数据
35
35
  value: [],
36
36
  // 弹出层标题
37
- title: "显示/隐藏",
37
+ title: "",
38
38
  // 是否显示弹出层
39
39
  sortable: true,
40
40
  open: false
@@ -62,6 +62,7 @@ export default {
62
62
  }
63
63
  },
64
64
  created() {
65
+ this.title = this.t('common.showHide');
65
66
  let displayHideColumn
66
67
  if(localStorage.getItem("displayHideColumn")&&localStorage.getItem("displayHideColumn")!=='{}'){
67
68
  displayHideColumn=JSON.parse(localStorage.getItem("displayHideColumn"))
@@ -6,7 +6,7 @@
6
6
  :data="listData"
7
7
  :listCustomOpMenus="listCustomOpMenus"
8
8
  >
9
- <el-table-column type="index" label="序号" width="50" align="center">
9
+ <el-table-column type="index" :label="t('common.serialNumber')" width="50" align="center">
10
10
  <template scope="scope">
11
11
  <span>{{
12
12
  (listQueryParams.pageNum - 1) * listQueryParams.pageSize +
@@ -121,7 +121,7 @@
121
121
 
122
122
  <el-table-column
123
123
  v-if="listSetting && listSetting.isShowOpColumn"
124
- label="操作"
124
+ :label="t('common.operation')"
125
125
  align="center"
126
126
  min-width="160"
127
127
  class-name="small-padding fixed-width"
@@ -41,18 +41,18 @@
41
41
  type="primary"
42
42
  :loading="setting.submitLoading"
43
43
  @click="submitForm"
44
- >确 定</el-button
44
+ >{{ t('common.confirm') }}</el-button
45
45
  >
46
- <el-button @click="cancel">取 消</el-button>
46
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
47
47
  </div> -->
48
48
  <div slot="footer" class="dialog-footer">
49
49
  <el-button
50
50
  type="primary"
51
51
  :loading="setting.submitLoading"
52
52
  @click="submitForm"
53
- >确 定</el-button
53
+ >{{ t('common.confirm') }}</el-button
54
54
  >
55
- <el-button @click="cancel">取 消</el-button>
55
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
56
56
  </div>
57
57
  </div>
58
58
  </template>
@@ -96,7 +96,7 @@ export default {
96
96
  name: "basic",
97
97
  visable: true,
98
98
  icon: "ion-plus-round",
99
- text: "基本信息",
99
+ text: "",
100
100
  type: "area",
101
101
  },
102
102
  {
@@ -117,20 +117,20 @@ export default {
117
117
  // 列信息
118
118
  columns: [
119
119
  {
120
- text: `公告标题`,
120
+ text: "",
121
121
  property: "noticeTitle",
122
122
  displayType: "TextBox",
123
123
  visible: true,
124
- placeholder: "自定义占位符", //占位符文案 默认不传 不传就显示text的文案
124
+ placeholder: "", //占位符文案 默认不传 不传就显示text的文案
125
125
  setting: {
126
- default: "默认标题",
126
+ default: "",
127
127
  },
128
128
  // inputType: "number", // 输入类型默认不传
129
129
  // maxLength: "10", // 输入长度限制
130
130
  area: "basic",
131
131
  },
132
132
  {
133
- text: `公告类型`,
133
+ text: "",
134
134
  property: "noticeType",
135
135
  displayType: "DropDownList",
136
136
  setting: {
@@ -142,7 +142,7 @@ export default {
142
142
  area: "basic",
143
143
  },
144
144
  {
145
- text: `公告类型`,
145
+ text: "",
146
146
  property: "noticeType",
147
147
  displayType: "DropDownList",
148
148
  setting: {
@@ -154,7 +154,7 @@ export default {
154
154
  area: "basic",
155
155
  },
156
156
  {
157
- text: `公告类型`,
157
+ text: "",
158
158
  property: "noticeType",
159
159
  displayType: "DropDownList",
160
160
  setting: {
@@ -166,7 +166,7 @@ export default {
166
166
  area: "basic",
167
167
  },
168
168
  {
169
- text: `公告类型`,
169
+ text: "",
170
170
  property: "noticeType",
171
171
  displayType: "DropDownList",
172
172
  setting: {
@@ -178,7 +178,7 @@ export default {
178
178
  area: "basic",
179
179
  },
180
180
  {
181
- text: `公告类型`,
181
+ text: "",
182
182
  property: "noticeType",
183
183
  displayType: "DropDownList",
184
184
  setting: {
@@ -190,7 +190,7 @@ export default {
190
190
  area: "basic",
191
191
  },
192
192
  {
193
- text: `公告类型`,
193
+ text: "",
194
194
  property: "noticeType",
195
195
  displayType: "DropDownList",
196
196
  setting: {
@@ -202,7 +202,7 @@ export default {
202
202
  area: "basic",
203
203
  },
204
204
  {
205
- text: `公告类型`,
205
+ text: "",
206
206
  property: "noticeType",
207
207
  displayType: "DropDownList",
208
208
  setting: {
@@ -214,7 +214,7 @@ export default {
214
214
  area: "basic",
215
215
  },
216
216
  {
217
- text: `公告类型`,
217
+ text: "",
218
218
  property: "noticeType",
219
219
  displayType: "DropDownList",
220
220
  setting: {
@@ -226,7 +226,7 @@ export default {
226
226
  area: "basic",
227
227
  },
228
228
  {
229
- text: `公告类型`,
229
+ text: "",
230
230
  property: "noticeType",
231
231
  displayType: "DropDownList",
232
232
  setting: {
@@ -238,7 +238,7 @@ export default {
238
238
  area: "basic",
239
239
  },
240
240
  {
241
- text: `公告类型`,
241
+ text: "",
242
242
  property: "noticeType",
243
243
  displayType: "DropDownList",
244
244
  setting: {
@@ -250,7 +250,7 @@ export default {
250
250
  area: "basic",
251
251
  },
252
252
  {
253
- text: `公告类型`,
253
+ text: "",
254
254
  property: "noticeType",
255
255
  displayType: "DropDownList",
256
256
  setting: {
@@ -262,7 +262,7 @@ export default {
262
262
  area: "basic",
263
263
  },
264
264
  {
265
- text: `公告类型`,
265
+ text: "",
266
266
  property: "noticeType",
267
267
  displayType: "DropDownList",
268
268
  setting: {
@@ -274,7 +274,7 @@ export default {
274
274
  area: "basic",
275
275
  },
276
276
  {
277
- text: `公告类型`,
277
+ text: "",
278
278
  property: "noticeType",
279
279
  displayType: "DropDownList",
280
280
  setting: {
@@ -286,7 +286,7 @@ export default {
286
286
  area: "basic",
287
287
  },
288
288
  {
289
- text: `公告类型`,
289
+ text: "",
290
290
  property: "noticeType",
291
291
  displayType: "DropDownList",
292
292
  setting: {
@@ -298,7 +298,7 @@ export default {
298
298
  area: "basic",
299
299
  },
300
300
  {
301
- text: `公告类型`,
301
+ text: "",
302
302
  property: "noticeType",
303
303
  displayType: "DropDownList",
304
304
  setting: {
@@ -310,7 +310,7 @@ export default {
310
310
  area: "basic",
311
311
  },
312
312
  {
313
- text: `公告类型`,
313
+ text: "",
314
314
  property: "noticeType",
315
315
  displayType: "DropDownList",
316
316
  setting: {
@@ -322,7 +322,7 @@ export default {
322
322
  area: "basic",
323
323
  },
324
324
  {
325
- text: `公告类型`,
325
+ text: "",
326
326
  property: "noticeType",
327
327
  displayType: "DropDownList",
328
328
  setting: {
@@ -334,7 +334,7 @@ export default {
334
334
  area: "basic",
335
335
  },
336
336
  {
337
- text: `公告类型`,
337
+ text: "",
338
338
  property: "noticeType",
339
339
  displayType: "DropDownList",
340
340
  setting: {
@@ -349,16 +349,16 @@ export default {
349
349
  // 表单校验
350
350
  rules: {
351
351
  noticeTitle: [
352
- { required: true, message: "公告标题不能为空", trigger: "blur" },
352
+ { required: true, message: "", trigger: "blur" },
353
353
  {
354
354
  min: 2,
355
355
  max: 20,
356
- message: "公告标题长度必须介于 2 和 20 之间",
356
+ message: "",
357
357
  trigger: "blur",
358
358
  },
359
359
  ],
360
360
  noticeType: [
361
- { required: true, message: "公告类型不能为空", trigger: "blur" },
361
+ { required: true, message: "", trigger: "blur" },
362
362
  ],
363
363
  },
364
364
  //可编辑表格配置
@@ -396,13 +396,13 @@ export default {
396
396
  },
397
397
  {
398
398
  prop: "noticeTitle",
399
- text: "公告标题",
399
+ text: "",
400
400
  attr: { width: "180" },
401
401
  edit: true,
402
402
  },
403
403
  {
404
404
  prop: "noticeType",
405
- text: "公告类型",
405
+ text: "",
406
406
  attr: { minWidth: "110" },
407
407
  edit: true,
408
408
  type: "select",
@@ -413,19 +413,19 @@ export default {
413
413
  },
414
414
  {
415
415
  prop: "remark",
416
- text: "备注",
416
+ text: "",
417
417
  attr: { minWidth: "110" },
418
418
  edit: true,
419
419
  },
420
420
  {
421
421
  prop: "noticeContent",
422
- text: "自定义html",
422
+ text: "",
423
423
  attr: { minWidth: "110" },
424
424
  edit: true,
425
425
  },
426
426
  {
427
427
  prop: "product",
428
- text: "产品",
428
+ text: "",
429
429
  attr: { minWidth: "110" },
430
430
  edit: true,
431
431
  type: "checkbox",
@@ -436,7 +436,7 @@ export default {
436
436
  },
437
437
  {
438
438
  prop: "date",
439
- text: "日期",
439
+ text: "",
440
440
  attr: { minWidth: "110" },
441
441
  edit: true,
442
442
  type: "date",
@@ -444,14 +444,14 @@ export default {
444
444
  },
445
445
  {
446
446
  prop: "status",
447
- text: "锁定",
447
+ text: "",
448
448
  attr: { minWidth: "110" },
449
449
  edit: true,
450
450
  type: "switch",
451
451
  },
452
452
  {
453
453
  prop: "search",
454
- text: "搜索",
454
+ text: "",
455
455
  attr: { minWidth: "110" },
456
456
  edit: true,
457
457
  type: "mixInput",
@@ -459,7 +459,7 @@ export default {
459
459
  console.log(row);
460
460
  },
461
461
  },
462
- { prop: "opt", text: "操作", attr: { minWidth: "110" }, edit: true },
462
+ { prop: "opt", text: "", attr: { minWidth: "110" }, edit: true },
463
463
  ],
464
464
  data: [],
465
465
  },
@@ -468,6 +468,7 @@ export default {
468
468
  watch: {},
469
469
  created() {
470
470
  console.log(this.entity);
471
+ this.initI18n();
471
472
  //有可编辑表格的情况下
472
473
  if (this.tableSetting.visible) {
473
474
  /** 查询列表 */
@@ -487,6 +488,28 @@ export default {
487
488
  mounted() {},
488
489
  activated() {},
489
490
  methods: {
491
+ initI18n() {
492
+ this.areaSetting[0].text = this.t('common.basicInfo');
493
+ this.columns[0].text = this.t('common.announcementTitle');
494
+ this.columns[0].placeholder = this.t('common.customPlaceholder');
495
+ this.columns[0].setting.default = this.t('common.defaultTitle');
496
+ this.columns[1].text = this.t('common.announcementType');
497
+ for (let i = 2; i < this.columns.length; i++) {
498
+ this.columns[i].text = this.t('common.announcementTitle');
499
+ }
500
+ this.rules.noticeTitle[0].message = this.t('common.announcementTitleRequired');
501
+ this.rules.noticeTitle[1].message = this.t('common.announcementTitleLength');
502
+ this.rules.noticeType[0].message = this.t('common.announcementTypeRequired');
503
+ this.tableSetting.columns[1].text = this.t('common.announcementTitle');
504
+ this.tableSetting.columns[2].text = this.t('common.announcementType');
505
+ this.tableSetting.columns[3].text = this.t('common.remark');
506
+ this.tableSetting.columns[4].text = this.t('common.customHtml');
507
+ this.tableSetting.columns[5].text = this.t('common.product');
508
+ this.tableSetting.columns[6].text = this.t('common.date');
509
+ this.tableSetting.columns[7].text = this.t('common.locked');
510
+ this.tableSetting.columns[8].text = this.t('common.search');
511
+ this.tableSetting.columns[9].text = this.t('common.operation');
512
+ },
490
513
  //当前绑定实体字段值变更事件
491
514
  onChangeEvent(args) {
492
515
  console.log(args);
@@ -91,35 +91,35 @@ export default class MaterialsEditDialog extends Vue {
91
91
  name: "basic",
92
92
  visable: true,
93
93
  icon: "ion-plus-round",
94
- text: "基本信息",
94
+ text: (this as any).t('common.basicInfo'),
95
95
  type: "area",
96
96
  },
97
97
  {
98
98
  name: "tab1",
99
99
  visable: true,
100
100
  icon: "ion-plus-round",
101
- text: "叫料数据",
101
+ text: (this as any).t('common.callingData'),
102
102
  type: "tab",
103
103
  },
104
104
  ];
105
105
  // 列信息
106
106
  columns = [
107
107
  {
108
- text: `日期`,
108
+ text: (this as any).t('common.date'),
109
109
  property: "noticeTitle",
110
110
  displayType: "TextBox",
111
111
  visible: true,
112
112
  area: "basic",
113
113
  },
114
114
  {
115
- text: `班次`,
115
+ text: (this as any).t('common.shift'),
116
116
  property: "noticeTitle",
117
117
  displayType: "TextBox",
118
118
  visible: true,
119
119
  area: "basic",
120
120
  },
121
121
  {
122
- text: `计划编号`,
122
+ text: (this as any).t('common.planNo'),
123
123
  property: "noticeTitle",
124
124
  displayType: "TextBox",
125
125
  visible: true,
@@ -127,7 +127,7 @@ export default class MaterialsEditDialog extends Vue {
127
127
  width: 24,
128
128
  },
129
129
  {
130
- text: `信息提示`,
130
+ text: (this as any).t('common.infoTip'),
131
131
  property: "noticeTitle",
132
132
  displayType: "TextBox",
133
133
  visible: true,
@@ -138,16 +138,16 @@ export default class MaterialsEditDialog extends Vue {
138
138
  // 表单校验
139
139
  rules = {
140
140
  noticeTitle: [
141
- { required: true, message: "公告标题不能为空", trigger: "blur" },
141
+ { required: true, message: (this as any).t('common.announcementTitleRequired'), trigger: "blur" },
142
142
  {
143
143
  min: 2,
144
144
  max: 20,
145
- message: "公告标题长度必须介于 2 和 20 之间",
145
+ message: (this as any).t('common.announcementTitleLength'),
146
146
  trigger: "blur",
147
147
  },
148
148
  ],
149
149
  noticeType: [
150
- { required: true, message: "公告类型不能为空", trigger: "blur" },
150
+ { required: true, message: (this as any).t('common.announcementTypeRequired'), trigger: "blur" },
151
151
  ],
152
152
  };
153
153
  loading = false;
@@ -155,10 +155,10 @@ export default class MaterialsEditDialog extends Vue {
155
155
  isMultiple = true;
156
156
  // 列表列信息
157
157
  listColumns = [
158
- { text: `用户名1`, property: "userName", displayType: "TextBox" },
159
- { text: `昵称`, property: "nickName", displayType: "TextBox" },
158
+ { text: (this as any).t('common.username'), property: "userName", displayType: "TextBox" },
159
+ { text: (this as any).t('common.nickname'), property: "nickName", displayType: "TextBox" },
160
160
  {
161
- text: `用户`,
161
+ text: (this as any).t('common.user'),
162
162
  property: "test7",
163
163
  displayType: "dropDownList",
164
164
  setting: { type: "User", displayMode: "form" },
@@ -30,7 +30,7 @@
30
30
  v-if="column.displayType == 'TextBox'"
31
31
  size="small"
32
32
  v-model="scope.row[column.property]"
33
- placeholder="请输入内容"
33
+ :placeholder="t('common.pleaseEnterContent')"
34
34
  ></el-input>
35
35
 
36
36
  <dropDownList
@@ -81,7 +81,7 @@
81
81
  </template>
82
82
 
83
83
  <el-table-column
84
- label="操作"
84
+ :label="t('common.operation')"
85
85
  align="center"
86
86
  min-width="160"
87
87
  class-name="small-padding fixed-width"
@@ -92,16 +92,16 @@
92
92
  size="mini"
93
93
  type="text"
94
94
  @click="deleteSingle(scope.$index)"
95
- >删除</el-button
95
+ >{{ t('common.delete') }}</el-button
96
96
  >
97
97
  </template>
98
98
  </el-table-column>
99
99
  </el-table>
100
100
  </el-form>
101
101
  <div style="margin-top: 8px" v-if="listSetting.buttonShow">
102
- <el-button type="primary" size="mini" @click="newAdd">新增数据</el-button>
102
+ <el-button type="primary" size="mini" @click="newAdd">{{ t('common.addData') }}</el-button>
103
103
  <el-button @click="deleteAll" type="danger" size="mini"
104
- >删除选中</el-button
104
+ >{{ t('common.deleteSelected') }}</el-button
105
105
  >
106
106
  </div>
107
107
  </div>
@@ -166,7 +166,7 @@ export default class TableForm extends Vue {
166
166
  }
167
167
  deleteAll() {
168
168
  if (this.multipleSelectAry.length == 0) {
169
- (this as any).$message.error("请选择要删除的数据");
169
+ (this as any).$message.error((this as any).t('common.pleaseSelectDeleteData'));
170
170
  }
171
171
  this.model.listData = this.model.listData.filter((item, index) => {
172
172
  return !this.multipleSelectAry.includes(index);
@@ -72,13 +72,13 @@ export default class DatePicker extends Vue {
72
72
  public currentValue = (this as any).value;
73
73
  public type = "date";
74
74
  public placeholder =
75
- (this as any).setting && (this as any).setting.range ? "false" : "选择日期";
75
+ (this as any).setting && (this as any).setting.range ? "false" : (this as any).t('common.selectDate');
76
76
  public rangeSeparator =
77
- (this as any).setting && (this as any).setting.range ? "至" : "-";
77
+ (this as any).setting && (this as any).setting.range ? (this as any).t('common.to') : "-";
78
78
  public startPlaceholder =
79
- (this as any).setting && (this as any).setting.range ? "开始日期" : "";
79
+ (this as any).setting && (this as any).setting.range ? (this as any).t('common.startDate') : "";
80
80
  public endPlaceholder =
81
- (this as any).setting && (this as any).setting.range ? "结束日期" : "";
81
+ (this as any).setting && (this as any).setting.range ? (this as any).t('common.endDate') : "";
82
82
 
83
83
  created() {
84
84
  if (this.value) {
@@ -40,7 +40,7 @@
40
40
  :disabled="disabled ? true : column.disabled ? true : false"
41
41
  :filterable="filterable"
42
42
  :remote="remote"
43
- :placeholder="column.placeholder ? column.placeholder : '请选择'"
43
+ :placeholder="column.placeholder ? column.placeholder : t('common.pleaseSelect')"
44
44
  :remote-method="remoteMethod"
45
45
  :loading="remote ? loading : false"
46
46
  :multiple="multiple"
@@ -66,7 +66,7 @@
66
66
  :options="data"
67
67
  @input="updateValue"
68
68
  :normalizer="normalizer"
69
- placeholder="请选择"
69
+ :placeholder="t('common.pleaseSelect')"
70
70
  />
71
71
  </el-form-item>
72
72
 
@@ -96,7 +96,7 @@
96
96
  <el-input
97
97
  slot="reference"
98
98
  v-model="input"
99
- placeholder="请输入内容"
99
+ :placeholder="t('common.pleaseEnterContent')"
100
100
  @input="inputChange"
101
101
  ></el-input>
102
102
  </el-popover>
@@ -140,7 +140,7 @@
140
140
  :options="data"
141
141
  @input="updateValue"
142
142
  :normalizer="normalizer"
143
- placeholder="请选择"
143
+ :placeholder="t('common.pleaseSelect')"
144
144
  />
145
145
  </el-form-item>
146
146
  </template>
@@ -628,7 +628,7 @@ export default class dropDownList extends Vue {
628
628
  "dictLabel",
629
629
  "dictValue"
630
630
  );
631
- let newitems = [{ text: this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---", value: undefined }];
631
+ let newitems = [{ text: this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll'), value: undefined }];
632
632
  items.forEach((item) => {
633
633
  if (item.text.indexOf(this.setting.findValue) != -1) {
634
634
  newitems.push(item);
@@ -733,7 +733,7 @@ export default class dropDownList extends Vue {
733
733
  this.setting.displayField || "componentName",
734
734
  this.setting.valueField || "id"
735
735
  );
736
- let newitems = [{ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---", value: undefined }];
736
+ let newitems = [{ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll'), value: undefined }];
737
737
  items.forEach((item: any) => {
738
738
  if (item.value) {
739
739
  if (
@@ -836,7 +836,7 @@ export default class dropDownList extends Vue {
836
836
  if (!valueField) valueField = this.setting.valueField;
837
837
  var items = [];
838
838
  if (this.setting.isShowPleaseChoose != false)
839
- items.push({ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---", value: undefined });
839
+ items.push({ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll'), value: undefined });
840
840
  if (source) {
841
841
  this.itemList = source;
842
842
  for (var item of source) {
@@ -845,7 +845,7 @@ export default class dropDownList extends Vue {
845
845
  }
846
846
  /*console.log("下拉",items);*/
847
847
  if (this.column.setting && this.column.setting.chooseFirst) {
848
- if (items[0].text ==this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---" || items[0].text == "请选择") {
848
+ if (items[0].text ==this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll') || items[0].text == (this as any).t('common.pleaseSelect')) {
849
849
  this.$set(this.entity, String(this.column.property), items[1].text);
850
850
  this.onChangeEvent(this.entity[this.column.property], true);
851
851
  } else {
@@ -26,9 +26,9 @@
26
26
  type="primary"
27
27
  :loading="tableSetting.submitLoading"
28
28
  @click="submitForm"
29
- >确 定</el-button
29
+ >{{ t('common.confirm') }}</el-button
30
30
  >
31
- <el-button @click="cancel">取 消</el-button>
31
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
32
32
  </div>
33
33
  </slot>
34
34
  </div>
@@ -59,7 +59,7 @@ export default class lookupDialog extends Vue {
59
59
  // 提交状态
60
60
  submitLoading: false,
61
61
  // 弹出层标题
62
- title: "请选择",
62
+ title: (this as any).t('common.pleaseSelect'),
63
63
  // 保存时是否自动关闭
64
64
  isCloseOnSave: true,
65
65
  // 启用多选模式
@@ -26,7 +26,7 @@
26
26
  size=""
27
27
  :disabled="!currentEntity"
28
28
  @click="print"
29
- >打 印</el-button
29
+ >{{ t('common.print') }}</el-button
30
30
  >
31
31
  <el-button
32
32
  type="primary"
@@ -35,10 +35,10 @@
35
35
  size=""
36
36
  :disabled="!currentEntity"
37
37
  @click="printView"
38
- >打 预 览</el-button
38
+ >{{ t('common.printPreview') }}</el-button
39
39
  >
40
- <el-button @click="cancel">取 消</el-button>
41
- <el-button @click="downloadPrintClient">下载打印插件</el-button>
40
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
41
+ <el-button @click="downloadPrintClient">{{ t('common.downloadPrintClient') }}</el-button>
42
42
  </div>
43
43
  </el-dialog>
44
44
  </template>
@@ -83,7 +83,7 @@ export default class printDialog extends Vue {
83
83
  // 提交状态
84
84
  submitLoading: false,
85
85
  // 弹出层标题
86
- title: "请选择",
86
+ title: (this as any).t('common.pleaseSelect'),
87
87
  // 保存时是否自动关闭
88
88
  isCloseOnSave: true,
89
89
  // 启用多选模式
@@ -114,38 +114,38 @@ export default class printDialog extends Vue {
114
114
  },
115
115
  // 列表列信息
116
116
  listColumns: [
117
- { key: 0, text: `序号`, property: "id", visible: true },
118
- { key: 1, text: `模板编号`, property: "templateNo", visible: true },
119
- { key: 2, text: `模板名称`, property: "templateName", visible: true },
117
+ { key: 0, text: (this as any).t('common.serialNumber'), property: "id", visible: true },
118
+ { key: 1, text: (this as any).t('common.templateNo'), property: "templateNo", visible: true },
119
+ { key: 2, text: (this as any).t('common.templateName'), property: "templateName", visible: true },
120
120
  {
121
121
  key: 3,
122
- text: `模板类型`,
122
+ text: (this as any).t('common.templateType'),
123
123
  property: "templateType",
124
124
  visible: true,
125
125
  setting: { dictType: "sys_template_type" },
126
126
  },
127
127
  {
128
128
  key: 4,
129
- text: `模板内容`,
129
+ text: (this as any).t('common.templateContent'),
130
130
  property: "templateContent",
131
131
  visible: true,
132
132
  },
133
- { key: 5, text: `模板设置`, property: "setting", visible: true },
133
+ { key: 5, text: (this as any).t('common.templateSetting'), property: "setting", visible: true },
134
134
  {
135
135
  key: 6,
136
- text: `模板版本号`,
136
+ text: (this as any).t('common.templateVersion'),
137
137
  property: "templateDescribe",
138
138
  visible: true,
139
139
  },
140
140
  {
141
141
  key: 7,
142
- text: `模板描述`,
142
+ text: (this as any).t('common.templateDescription'),
143
143
  property: "templateDescribe",
144
144
  visible: true,
145
145
  },
146
146
  {
147
147
  key: 8,
148
- text: `状态`,
148
+ text: (this as any).t('common.status'),
149
149
  property: "templateStatus",
150
150
  setting: { dictType: "sys_template_status" },
151
151
  },
@@ -154,7 +154,7 @@ export default class printDialog extends Vue {
154
154
  // 列表查询条件
155
155
  searchRules: [
156
156
  {
157
- text: `模板类型`,
157
+ text: (this as any).t('common.templateType'),
158
158
  property: "templateType",
159
159
  displayType: "DropDownList",
160
160
  setting: { dictType: "sys_template_type" },
@@ -162,12 +162,12 @@ export default class printDialog extends Vue {
162
162
  },
163
163
 
164
164
  // {
165
- // text: `模板类型`,
165
+ // text: (this as any).t('common.templateType'),
166
166
  // property: "templateType",
167
167
  // visible: false,
168
168
  // value: this.templateType,
169
169
  // },
170
- { text: `模板名称`, property: "templateName" },
170
+ { text: (this as any).t('common.templateName'), property: "templateName" },
171
171
  ],
172
172
  //弹框是否显示确定 取消
173
173
  footerButton: true,
@@ -22,9 +22,9 @@
22
22
  type="primary"
23
23
  :loading="setting.submitLoading"
24
24
  @click="submitForm"
25
- >确 定</el-button
25
+ >{{ t('common.confirm') }}</el-button
26
26
  >
27
- <el-button @click="cancel">取 消</el-button>
27
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
28
28
  </div>
29
29
  </div>
30
30
  </template>
@@ -67,7 +67,7 @@ export default {
67
67
  name: "basic",
68
68
  visable: true,
69
69
  icon: "ion-plus-round",
70
- text: "基本信息",
70
+ text: (this as any).t('common.basicInfo'),
71
71
  type: "area",
72
72
  },
73
73
  {
@@ -116,10 +116,10 @@
116
116
  icon="el-icon-search"
117
117
  size="mini"
118
118
  @click="handleQuery"
119
- >搜索</el-button
119
+ >{{ t('common.search') }}</el-button
120
120
  >
121
121
  <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
122
- >重置</el-button
122
+ >{{ t('common.reset') }}</el-button
123
123
  >
124
124
  </el-form-item>
125
125
  </el-form>
@@ -144,7 +144,7 @@
144
144
  <el-table-column
145
145
  v-if="listSetting.isShowIndexColumn == true"
146
146
  type="index"
147
- label="序号"
147
+ :label="t('common.index')"
148
148
  width="50"
149
149
  align="center"
150
150
  >
@@ -250,7 +250,7 @@
250
250
  </template>
251
251
 
252
252
  <el-table-column
253
- label="操作"
253
+ :label="t('common.operation')"
254
254
  align="center"
255
255
  min-width="160"
256
256
  class-name="small-padding fixed-width"
@@ -9,7 +9,7 @@
9
9
  <!-- <el-table-column v-if="listSetting.isShowIndex != false" type="index" prop="index" label="序号" width="50"
10
10
  align="center">
11
11
  </el-table-column> -->
12
- <el-table-column v-if="listSetting.isShowIndexColumn != false" type="index" prop="index" label="序号" width="50"
12
+ <el-table-column v-if="listSetting.isShowIndexColumn != false" type="index" prop="index" :label="t('common.index')" width="50"
13
13
  align="center">
14
14
  <template scope="scope">
15
15
  <span>{{
@@ -202,7 +202,7 @@
202
202
  </el-table-column>
203
203
  </template>
204
204
 
205
- <el-table-column label="操作" align="center" min-width="160" class-name="small-padding fixed-width"
205
+ <el-table-column :label="t('common.operation')" align="center" min-width="160" class-name="small-padding fixed-width"
206
206
  v-if="listSetting.isShowOpColumn">
207
207
  <template slot-scope="scope">
208
208
  <el-button v-for="(opMenu, index) in listCustomOpMenus" :key="index" size="mini" type="text" :icon="opMenu.icon"
@@ -478,7 +478,7 @@ export default class table extends Vue {
478
478
  }
479
479
  /** 自定义列显示格式方法 */
480
480
  remarkFormat(data, column) {
481
- return data.remark ? "有备注" : "无备注";
481
+ return data.remark ? (this as any).t('common.hasRemark') : (this as any).t('common.noRemark');
482
482
  }
483
483
  /** 自定义列点击方法 */
484
484
  onFilePriview(data, column) {
@@ -486,7 +486,7 @@ export default class table extends Vue {
486
486
  }
487
487
  /** 自定义列显示Html */
488
488
  getFilePriviewLink(data, column) {
489
- return `<a href="${getFilePriviewUrl(data.remark)}" target="_blank">${data.remark ? "自定义预览" : ""
489
+ return `<a href="${getFilePriviewUrl(data.remark)}" target="_blank">${data.remark ? (this as any).t('common.customPreview') : ""
490
490
  }</a>`;
491
491
  }
492
492
  //列表点击属性字段点击
@@ -513,7 +513,7 @@ export default class table extends Vue {
513
513
  });
514
514
  columns.forEach((column, index) => {
515
515
  if (index === 0) {
516
- sums[index] = "合计";
516
+ sums[index] = (this as any).t('common.total');
517
517
  return;
518
518
  }
519
519
  if (sumColumns.indexOf(column.property) < 0) {
@@ -27,7 +27,7 @@
27
27
  </el-form-item>
28
28
  <!-- 字数统计显示:仅当 showWordCount 为 true 时显示 -->
29
29
  <div v-if="column.showWordCount" class="word-count">
30
- {{ currentLength }} / {{ column.maxLength || '不限' }}
30
+ {{ currentLength }} / {{ column.maxLength || t('common.noLimit') }}
31
31
  </div>
32
32
  </div>
33
33
  </template>
@@ -74,7 +74,7 @@
74
74
  :options="data"
75
75
  @input="updateValue"
76
76
  :normalizer="normalizer"
77
- placeholder="请选择"
77
+ :placeholder="t('common.pleaseSelect')"
78
78
  />
79
79
  </el-form-item>
80
80
  </template>
@@ -352,7 +352,7 @@ export default class upload extends Vue {
352
352
  }
353
353
  return;
354
354
  }
355
- (this as any).$message.success("上传成功");
355
+ (this as any).$message.success((this as any).t('common.uploadSuccess'));
356
356
  this.fileList.push({
357
357
  name: res.data.materialNick,
358
358
  url: res.data.materialUrl,
@@ -11,7 +11,7 @@
11
11
  :before-upload="handleBeforeUpload" :data="{ folderId: '0' }" :limit="limit" :on-error="handleUploadError"
12
12
  :on-exceed="handleExceed" :on-success="handleUploadSuccess" :headers="headers" :on-progress='handleProgress'
13
13
  ref="upload" :on-remove="handleRemove" multiple :file-list="fileList">
14
- <el-button size="small" type="primary">点击上传</el-button>
14
+ <el-button size="small" type="primary">{{ t('common.clickToUpload') }}</el-button>
15
15
  </el-upload>
16
16
  <el-dialog :visible.sync="dialogVisible">
17
17
  <img width="100%" :src="dialogImageUrl" alt="">
@@ -35,7 +35,7 @@
35
35
  :underline="false"
36
36
  @click="handleDelete(index)"
37
37
  type="danger"
38
- >删除</el-link
38
+ >{{ t('common.delete') }}</el-link
39
39
  >
40
40
  </div>
41
41
  </li>
@@ -205,7 +205,7 @@ export default class upload extends Vue {
205
205
  });
206
206
  if (!isTypeOk) {
207
207
  (this as any).$message.error(
208
- `文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
208
+ (this as any).t('common.incorrectFileFormat').replace('{fileType}', this.fileType.join("/"))
209
209
  );
210
210
  return false;
211
211
  }
@@ -215,7 +215,7 @@ export default class upload extends Vue {
215
215
  const isLt = file.size / 1024 / 1024 < this.fileSize;
216
216
  if (!isLt) {
217
217
  (this as any).$message.error(
218
- `上传文件大小不能超过 ${this.fileSize} MB!`
218
+ (this as any).t('common.fileSizeExceeded').replace('{fileSize}', this.fileSize)
219
219
  );
220
220
  return false;
221
221
  }
@@ -224,12 +224,12 @@ export default class upload extends Vue {
224
224
  }
225
225
  // 文件个数超出
226
226
  public handleExceed() {
227
- (this as any).$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
227
+ (this as any).$message.error((this as any).t('common.fileCountExceeded').replace('{limit}', this.limit));
228
228
  }
229
229
  // 上传失败
230
230
  public handleUploadError(err) {
231
231
 
232
- (this as any).$message.error("上传失败, 请重试");
232
+ (this as any).$message.error((this as any).t('common.uploadFailed'));
233
233
 
234
234
  }
235
235
  // 上传成功回调
@@ -258,7 +258,7 @@ export default class upload extends Vue {
258
258
  }
259
259
  return
260
260
  }
261
- (this as any).$message.success("上传成功")
261
+ (this as any).$message.success((this as any).t('common.uploadSuccess'))
262
262
  this.fileList.push({
263
263
  name: file.name,
264
264
  url: res.data.materialUrl,
@@ -87,7 +87,7 @@ export default class uploadDialog extends Vue {
87
87
  this.setting.open = false;
88
88
  this.setting.isUploading = false;
89
89
  (this.$refs.setting as any).clearFiles();
90
- (this as any).$alert(response.msg, "导入结果", {
90
+ (this as any).$alert(response.msg, (this as any).t('common.importResult'), {
91
91
  dangerouslyUseHTMLString: true,
92
92
  });
93
93
  this.$emit("onImportSuccess", null);
@@ -440,7 +440,7 @@
440
440
  plain
441
441
  icon="el-icon-connection"
442
442
  size="mini"
443
- :disabled="multiple"
443
+ :disabled="!currentEntities || currentEntities.length === 0"
444
444
  @click="handleMultiLanguage"
445
445
  >
446
446
  {{ t('config.switch_multi_language') }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.158",
3
+ "version": "1.0.160",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
  <base-dialog
3
3
  :visible.sync="visible"
4
4
  width="960px"
5
- :title="t('employeeModal.title')"
5
+ :title="t('common.employeeSelectTitle')"
6
6
  append-to-body
7
7
  @on-confirm="handleConfirm"
8
8
  @on-cancel="handleCancel"
@@ -18,8 +18,8 @@
18
18
  >
19
19
  <el-row class="mb8">
20
20
  <el-col :span="8">
21
- <el-form-item :label="t('employeeModal.siteId')" prop="siteId">
22
- <el-select v-model="listQueryParams.siteId" :placeholder="t('employeeModal.placeholder.siteId')" @change="siteChangeEvent" :disabled="siteDisabled">
21
+ <el-form-item :label="t('common.site')" prop="siteId">
22
+ <el-select v-model="listQueryParams.siteId" :placeholder="t('common.pleaseSelect')" @change="siteChangeEvent" :disabled="siteDisabled">
23
23
  <el-option
24
24
  v-for="item in siteOptions"
25
25
  :key="item.id"
@@ -31,7 +31,7 @@
31
31
  </el-form-item>
32
32
  </el-col>
33
33
  <el-col :span="8">
34
- <el-form-item :label="t('employeeModal.deptId')" prop="deptId">
34
+ <el-form-item :label="t('common.deptName')" prop="deptId">
35
35
  <el-cascader
36
36
  v-model="listQueryParams.deptId"
37
37
  :options="deptOptions"
@@ -45,8 +45,8 @@
45
45
  </el-form-item>
46
46
  </el-col>
47
47
  <el-col :span="8">
48
- <el-form-item :label="t('employeeModal.postId')" prop="postId">
49
- <el-select v-model="listQueryParams.postId" :placeholder="t('employeeModal.placeholder.postId')" clearable>
48
+ <el-form-item :label="t('common.postName')" prop="postId">
49
+ <el-select v-model="listQueryParams.postId" :placeholder="t('common.pleaseSelect')" clearable>
50
50
  <el-option
51
51
  v-for="item in postOptions"
52
52
  :key="item.postId"
@@ -60,12 +60,12 @@
60
60
  </el-row>
61
61
  <el-row class="mb8">
62
62
  <el-col :span="8">
63
- <el-form-item :label="t('employeeModal.employeeNo')" prop="employeeNo">
63
+ <el-form-item :label="t('common.employeeNo')" prop="employeeNo">
64
64
  <el-input v-model="listQueryParams.employeeNo" clearable/>
65
65
  </el-form-item>
66
66
  </el-col>
67
67
  <el-col :span="8">
68
- <el-form-item :label="t('employeeModal.employeeName')" prop="employeeName">
68
+ <el-form-item :label="t('common.employeeName')" prop="employeeName">
69
69
  <el-input v-model="listQueryParams.employeeName" clearable/>
70
70
  </el-form-item>
71
71
  </el-col>
@@ -76,13 +76,13 @@
76
76
  icon="el-icon-search"
77
77
  size="mini"
78
78
  @click="handleQuery"
79
- >{{ t('employeeModal.search') }}
79
+ >{{ t('common.query') }}
80
80
  </el-button>
81
81
  <el-button
82
82
  icon="el-icon-refresh"
83
83
  size="mini"
84
84
  @click="resetQuery"
85
- >{{ t('employeeModal.reset') }}
85
+ >{{ t('common.reset') }}
86
86
  </el-button>
87
87
  </el-form-item>
88
88
  </el-col>
@@ -103,10 +103,10 @@
103
103
  @selection-change="onSelectionChange"
104
104
  >
105
105
  <el-table-column type="selection" min-width="50" align="center" />
106
- <el-table-column prop="employeeNo" :label="t('employeeModal.employeeNo')" min-width="100" align="left" show-overflow-tooltip />
107
- <el-table-column prop="employeeName" :label="t('employeeModal.employeeName')" min-width="100" align="left" show-overflow-tooltip />
108
- <el-table-column prop="deptName" :label="t('employeeModal.deptId')" min-width="100" align="left" show-overflow-tooltip/>
109
- <el-table-column prop="postName" :label="t('employeeModal.postId')" min-width="100" align="left" show-overflow-tooltip/>
106
+ <el-table-column prop="employeeNo" :label="t('common.employeeNo')" min-width="100" align="left" show-overflow-tooltip />
107
+ <el-table-column prop="employeeName" :label="t('common.employeeName')" min-width="100" align="left" show-overflow-tooltip />
108
+ <el-table-column prop="deptName" :label="t('common.deptName')" min-width="100" align="left" show-overflow-tooltip/>
109
+ <el-table-column prop="postName" :label="t('common.postName')" min-width="100" align="left" show-overflow-tooltip/>
110
110
  </el-table>
111
111
  <pagination
112
112
  :total="listQueryParams.total"
@@ -184,11 +184,7 @@ export default {
184
184
  deptOptionIds: [],
185
185
  siteOptions: [],
186
186
  postOptions: [],
187
- rules: {
188
- siteId: [
189
- { required: true, message: this.t('employeeModal.placeholder.siteId'), trigger: 'blur' }
190
- ]
191
- },
187
+ rules: {},
192
188
  relatedDeptId: undefined
193
189
  }
194
190
  },
@@ -196,9 +192,17 @@ export default {
196
192
  watch: {},
197
193
  mounted() {},
198
194
  created() {
195
+ this.initRules()
199
196
  this.init()
200
197
  },
201
198
  methods: {
199
+ initRules() {
200
+ this.rules = {
201
+ siteId: [
202
+ { required: true, message: this.t('common.pleaseSelectSite'), trigger: 'blur' }
203
+ ]
204
+ }
205
+ },
202
206
  async init() {
203
207
  if (this.siteId) {
204
208
  this.$set(this.listQueryParams, "siteId", this.siteId)
@@ -261,7 +265,7 @@ export default {
261
265
  },
262
266
  getList() {
263
267
  if (!this.relatedDeptId) {
264
- this.msgError(this.t('employeeModal.siteNotRelatedDept'));
268
+ this.msgError(this.t('common.siteNotRelatedDept'));
265
269
  return
266
270
  }
267
271
  this.loading = true
@@ -295,7 +299,7 @@ export default {
295
299
  },
296
300
  handleConfirm() {
297
301
  if (!this.multipleSelection || this.multipleSelection.length === 0) {
298
- this.msgError(this.t('employeeModal.selectEmployeeTip'));
302
+ this.msgError(this.t('common.pleaseSelectOneEmployee'));
299
303
  } else {
300
304
  if(this.multipleChoice) {
301
305
  this.confirm(this.multipleSelection)
@@ -315,7 +319,7 @@ export default {
315
319
  if(!selectOption) return;
316
320
  this.relatedDeptId = selectOption.relatedDeptId;
317
321
  if(!this.relatedDeptId){
318
- this.msgError(this.t('employeeModal.siteNotRelatedDept'));
322
+ this.msgError(this.t('common.siteNotRelatedDept'));
319
323
  return;
320
324
  }
321
325
  this.getDept(this.relatedDeptId);
@@ -277,8 +277,8 @@
277
277
  </el-col>
278
278
  </el-row>
279
279
  <div v-if="value && value.btnShow" class="dialog-footer">
280
- <el-button type="primary" @click="submitForm">确 定</el-button>
281
- <el-button @click="cancel">取 消</el-button>
280
+ <el-button type="primary" @click="submitForm">{{ t('common.confirm') }}</el-button>
281
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
282
282
  </div>
283
283
  </div>
284
284
  </template>
@@ -405,7 +405,7 @@ export default class StandardList extends ListBasePage {
405
405
  //是否显示下拉滑块
406
406
  dropDownSliders: false,
407
407
  //搜索框标题
408
- title: "请输入部门|岗位名称",
408
+ title: this.t('common.pleaseEnterDeptOrPost'),
409
409
  };
410
410
  //操作菜单设定
411
411
  opMenus = [