kz-ui-base 1.0.157 → 1.0.158

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.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-loading="exportButton"
4
- element-loading-text="数据加载中..."
4
+ :element-loading-text="t('common.loading')"
5
5
  :class="{
6
6
  'dialog-body-wrapper': true,
7
7
  }"
@@ -31,7 +31,7 @@
31
31
  icon="el-icon-plus"
32
32
  type="primary"
33
33
  size="mini"
34
- >添加下层</el-button
34
+ >{{ t('common.addSubLevel') }}</el-button
35
35
  >
36
36
  <el-button
37
37
  style="flex: 1"
@@ -40,7 +40,7 @@
40
40
  icon="el-icon-edit"
41
41
  type="success"
42
42
  size="mini"
43
- >修改本层</el-button
43
+ >{{ t('common.editCurrentLevel') }}</el-button
44
44
  >
45
45
  <el-button
46
46
  style="flex: 1"
@@ -49,7 +49,7 @@
49
49
  icon="el-icon-delete"
50
50
  type="danger"
51
51
  size="mini"
52
- >删除本层</el-button
52
+ >{{ t('common.deleteCurrentLevel') }}</el-button
53
53
  >
54
54
  </div>
55
55
  <div
@@ -284,13 +284,13 @@
284
284
  icon="el-icon-search"
285
285
  size="mini"
286
286
  @click="handleQuery"
287
- >{{ this.t('common.search') }}</el-button
287
+ >{{ t('common.search') }}</el-button
288
288
  >
289
289
  <el-button
290
290
  icon="el-icon-refresh"
291
291
  size="mini"
292
292
  @click="resetQuery"
293
- >{{ this.t('common.reset') }}</el-button
293
+ >{{ t('common.reset') }}</el-button
294
294
  >
295
295
  <AdvancedQueryClose
296
296
  style="
@@ -312,7 +312,7 @@
312
312
 
313
313
  <div
314
314
  v-loading="contentLoading"
315
- element-loading-text="数据加载中..."
315
+ :element-loading-text="t('common.loading')"
316
316
  class="content-container"
317
317
  >
318
318
  <div
@@ -380,7 +380,7 @@
380
380
  >
381
381
  <el-dropdown>
382
382
  <el-button type="info" size="mini">
383
- 审批<i class="el-icon-arrow-down el-icon--right"></i>
383
+ {{ t('common.approve') }}<i class="el-icon-arrow-down el-icon--right"></i>
384
384
  </el-button>
385
385
  <el-dropdown-menu slot="dropdown">
386
386
  <template v-for="(opMenu, index) in opMenus">
@@ -468,7 +468,7 @@
468
468
  :height="tableHeight"
469
469
  :border="true"
470
470
  v-loading="loading"
471
- element-loading-text="数据加载中..."
471
+ :element-loading-text="t('common.loading')"
472
472
  :data="listData"
473
473
  :show-summary="listSetting.isShowSumRow"
474
474
  :summary-method="getSummaries"
@@ -599,10 +599,10 @@
599
599
  "
600
600
  >
601
601
  {{
602
- String(scope.row[column.property]) === "1" ? "是" : ""
602
+ String(scope.row[column.property]) === "1" ? t('common.yes') : ""
603
603
  }}
604
604
  {{
605
- String(scope.row[column.property]) === "0" ? "否" : ""
605
+ String(scope.row[column.property]) === "0" ? t('common.no') : ""
606
606
  }}
607
607
  </span>
608
608
  <el-tag
@@ -864,7 +864,7 @@
864
864
  </template>
865
865
 
866
866
  <el-table-column
867
- label="操作"
867
+ :label="t('common.operation')"
868
868
  align="center"
869
869
  min-width="160"
870
870
  class-name="small-padding fixed-width"
@@ -911,7 +911,7 @@
911
911
  :height="tableHeight"
912
912
  :border="true"
913
913
  v-loading="loading"
914
- element-loading-text="数据加载中..."
914
+ :element-loading-text="t('common.loading')"
915
915
  :data="dataForTables[index]"
916
916
  :show-summary="listSetting.isShowSumRow"
917
917
  :summary-method="getSummaries"
@@ -996,12 +996,12 @@
996
996
  >
997
997
  {{
998
998
  String(scope.row[column.property]) === "1"
999
- ? "是"
999
+ ? t('common.yes')
1000
1000
  : ""
1001
1001
  }}
1002
1002
  {{
1003
1003
  String(scope.row[column.property]) === "0"
1004
- ? "否"
1004
+ ? t('common.no')
1005
1005
  : ""
1006
1006
  }}
1007
1007
  </span>
@@ -1147,7 +1147,7 @@
1147
1147
  </template>
1148
1148
 
1149
1149
  <el-table-column
1150
- label="操作"
1150
+ :label="t('common.operation')"
1151
1151
  align="center"
1152
1152
  min-width="160"
1153
1153
  class-name="small-padding fixed-width"
@@ -1190,8 +1190,8 @@
1190
1190
  </el-col>
1191
1191
  </el-row>
1192
1192
  <div v-if="value && value.btnShow" class="dialog-footer">
1193
- <el-button type="primary" @click="submitForm">确 定</el-button>
1194
- <el-button @click="cancel">取 消</el-button>
1193
+ <el-button type="primary" @click="submitForm">{{ t('common.confirm') }}</el-button>
1194
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
1195
1195
  </div>
1196
1196
 
1197
1197
  <!-- 添加或修改参数配置对话框 -->
@@ -1701,7 +1701,7 @@ export default class listBasePage extends Vue {
1701
1701
  name: "basic",
1702
1702
  visable: true,
1703
1703
  icon: "ion-plus-round",
1704
- text: '基本信息',
1704
+ text: (this as any).t('common.basicInfo'),
1705
1705
  type: "area",
1706
1706
  },
1707
1707
  ];
@@ -1746,7 +1746,7 @@ export default class listBasePage extends Vue {
1746
1746
  // 是否显示编辑窗口
1747
1747
  isShow: false,
1748
1748
  // 弹出层标题(用户导入)
1749
- title: '打印模版',
1749
+ title: (this as any).t('common.printTemplate'),
1750
1750
  //打印类型
1751
1751
  templateType: "",
1752
1752
  // 保存时是否自动关闭
@@ -1883,7 +1883,7 @@ export default class listBasePage extends Vue {
1883
1883
  initField(this.moduleName, data)
1884
1884
  .then((response) => {
1885
1885
  if ((response as any).code != 200) {
1886
- (this as any).msgError("初始化失败!");
1886
+ (this as any).msgError((this as any).t('common.initFailed'));
1887
1887
  }
1888
1888
  listEntity(
1889
1889
  this.moduleName,
@@ -2038,7 +2038,7 @@ export default class listBasePage extends Vue {
2038
2038
  }
2039
2039
  /** 自定义列显示格式方法 */
2040
2040
  remarkFormat(data, column) {
2041
- return data.remark ? "有备注" : "无备注";
2041
+ return data.remark ? (this as any).t('common.hasRemark') : (this as any).t('common.noRemark');
2042
2042
  }
2043
2043
  /** 自定义列点击方法 */
2044
2044
  onFilePriview(data, column) {
@@ -2047,7 +2047,7 @@ export default class listBasePage extends Vue {
2047
2047
  /** 自定义列显示Html */
2048
2048
  getFilePriviewLink(data, column) {
2049
2049
  return `<a href="${this.getFilePriviewUrl(data.remark)}" target="_blank">${
2050
- data.remark ? "自定义预览" : ""
2050
+ data.remark ? (this as any).t('common.customPreview') : ""
2051
2051
  }</a>`;
2052
2052
  }
2053
2053
  getSummaries(param) {
@@ -2055,7 +2055,7 @@ export default class listBasePage extends Vue {
2055
2055
  const sums = [];
2056
2056
  columns.forEach((column, index) => {
2057
2057
  if (index === 0) {
2058
- sums[index] = '合计';
2058
+ sums[index] = (this as any).t('common.total');
2059
2059
  return;
2060
2060
  }
2061
2061
  const values = data.map((item) => Number(item[column.property]));
@@ -2540,7 +2540,7 @@ export default class listBasePage extends Vue {
2540
2540
  var setting = JSON.parse(args.data.setting);
2541
2541
  }
2542
2542
  } catch (ex) {
2543
- (self as any).msgError("验证规则设置有误,JSON格式不正确,请检查!");
2543
+ (self as any).msgError((self as any).t('common.validationRulesJsonError'));
2544
2544
  this.$set(this.editSetting, "submitLoading", false);
2545
2545
  return;
2546
2546
  }
@@ -2579,7 +2579,7 @@ export default class listBasePage extends Vue {
2579
2579
  updateEntity(self.moduleName, self.serviceName, args.data).then(
2580
2580
  (response) => {
2581
2581
  self.getList();
2582
- (self as any).msgSuccess("修改成功");
2582
+ (self as any).msgSuccess((self as any).t('common.updateSuccess'));
2583
2583
  if (self.editSetting.isCloseOnSave) self.editSetting.isShow = false;
2584
2584
  self.$set(this.editSetting, "submitLoading", false);
2585
2585
  //self.editSetting.isShow = false;
@@ -2620,7 +2620,7 @@ export default class listBasePage extends Vue {
2620
2620
  addEntity(self.moduleName, self.serviceName, args.data).then(
2621
2621
  (response) => {
2622
2622
  self.getList();
2623
- (self as any).msgSuccess("新增成功");
2623
+ (self as any).msgSuccess((self as any).t('common.addSuccess'));
2624
2624
  if (self.editSetting.isCloseOnSave) self.editSetting.isShow = false;
2625
2625
  self.$set(this.editSetting, "submitLoading", false);
2626
2626
  },
@@ -2784,7 +2784,7 @@ export default class listBasePage extends Vue {
2784
2784
  this.serviceName == "search")
2785
2785
  ) {
2786
2786
  if (this.currentSelectTreeId == undefined) {
2787
- (this as any).msgError("请在左侧选择一个界面设置!");
2787
+ (this as any).msgError((this as any).t('common.pleaseSelectInterfaceSetting'));
2788
2788
  } else {
2789
2789
  Vue.set(
2790
2790
  this.currentEntity,
@@ -2792,7 +2792,7 @@ export default class listBasePage extends Vue {
2792
2792
  this.currentSelectTreeId
2793
2793
  );
2794
2794
  this.editSetting.isShow = true;
2795
- this.editSetting.title = "添加";
2795
+ this.editSetting.title = (this as any).t('common.add');
2796
2796
  }
2797
2797
  } else {
2798
2798
  this.editColumns.forEach((item) => {
@@ -2801,7 +2801,7 @@ export default class listBasePage extends Vue {
2801
2801
  }
2802
2802
  });
2803
2803
  this.editSetting.isShow = true;
2804
- this.editSetting.title = "添加";
2804
+ this.editSetting.title = (this as any).t('common.add');
2805
2805
  }
2806
2806
  }
2807
2807
  /** 复制按钮操作 */
@@ -2828,9 +2828,9 @@ export default class listBasePage extends Vue {
2828
2828
  }
2829
2829
  }
2830
2830
  });
2831
- self.editSetting.title = "修改";
2831
+ self.editSetting.title = (self as any).t('common.edit');
2832
2832
  if (row == "detail") {
2833
- self.editSetting.title = "查看";
2833
+ self.editSetting.title = (self as any).t('common.view');
2834
2834
  this.oldeditColumns = [];
2835
2835
  this.oldeditColumns = JSON.parse(JSON.stringify(this.editColumns));
2836
2836
  this.oldeditColumns.forEach((item) => {
@@ -2863,9 +2863,9 @@ export default class listBasePage extends Vue {
2863
2863
  const text = this.idsText;
2864
2864
  let $this = this;
2865
2865
  (this as any)
2866
- .$confirm("是否确认删除?", "警告", {
2867
- confirmButtonText: "确定",
2868
- cancelButtonText: "取消",
2866
+ .$confirm((this as any).t('common.confirmDelete'), (this as any).t('common.warning'), {
2867
+ confirmButtonText: (this as any).t('common.confirm'),
2868
+ cancelButtonText: (this as any).t('common.cancel'),
2869
2869
  type: "warning",
2870
2870
  })
2871
2871
  .then(function () {
@@ -2877,7 +2877,7 @@ export default class listBasePage extends Vue {
2877
2877
  })
2878
2878
  .then(() => {
2879
2879
  $this.getList();
2880
- ($this as any).msgSuccess("删除成功");
2880
+ ($this as any).msgSuccess(($this as any).t('common.deleteSuccess'));
2881
2881
  });
2882
2882
 
2883
2883
  this.submitLoading = false;
@@ -2885,7 +2885,7 @@ export default class listBasePage extends Vue {
2885
2885
  /** 导出按钮操作 */
2886
2886
  handleExport() {
2887
2887
  if (this.exportButton) {
2888
- (this as any).msgError("请勿重复点击");
2888
+ (this as any).msgError((this as any).t('common.doNotClickRepeatedly'));
2889
2889
  return;
2890
2890
  }
2891
2891
  this.exportButton = true;
@@ -2909,7 +2909,7 @@ export default class listBasePage extends Vue {
2909
2909
  }
2910
2910
  /** 导入按钮操作 */
2911
2911
  handleImport() {
2912
- this.uploadSetting.title = "导入";
2912
+ this.uploadSetting.title = (this as any).t('common.import');
2913
2913
  // 上传的地址
2914
2914
  this.uploadSetting.url =
2915
2915
  process.env.VUE_APP_BASE_API +
@@ -2933,7 +2933,7 @@ export default class listBasePage extends Vue {
2933
2933
  this.getList();
2934
2934
  }
2935
2935
  handlePrint() {
2936
- this.printSetting.title = "打印模板";
2936
+ this.printSetting.title = (this as any).t('common.printTemplate');
2937
2937
  this.printSetting.currentEntity = this.currentEntity;
2938
2938
  this.printSetting.templateType = `/${this.moduleName}/${this.serviceName}`;
2939
2939
  (this.$refs.printDialog as any).show();
@@ -3083,9 +3083,9 @@ export default class listBasePage extends Vue {
3083
3083
  };
3084
3084
 
3085
3085
  (this as any)
3086
- .$prompt("请输入审批流标题(可为空)", "是否确认发起审批?", {
3087
- confirmButtonText: "确定",
3088
- cancelButtonText: "取消",
3086
+ .$prompt((this as any).t('common.pleaseEnterWorkflowTitle'), (this as any).t('common.confirmStartApproval'), {
3087
+ confirmButtonText: (this as any).t('common.confirm'),
3088
+ cancelButtonText: (this as any).t('common.cancel'),
3089
3089
  //inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
3090
3090
  // inputErrorMessage: '邮箱格式不正确'
3091
3091
  })
@@ -3096,7 +3096,7 @@ export default class listBasePage extends Vue {
3096
3096
  startWorkflow(this.moduleName, this.serviceName, params, this.wfKey)
3097
3097
  .then((response) => {
3098
3098
  (this as any).exportButton = false;
3099
- (this as any).$message.success("发起审批成功");
3099
+ (this as any).$message.success((this as any).t('common.startApprovalSuccess'));
3100
3100
  (this as any).getList();
3101
3101
  })
3102
3102
  .catch((e) => {
@@ -3119,7 +3119,7 @@ export default class listBasePage extends Vue {
3119
3119
  component: WfDialog,
3120
3120
  setting: {
3121
3121
  isShow: true,
3122
- title: "审批进度",
3122
+ title: (this as any).t('common.approvalProgress'),
3123
3123
  size: "full", //可选项tiny/small/large/full
3124
3124
  // height: "80vh",
3125
3125
  labelWidth: "120px", //input标题宽度 不传默认为100px
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {