diff --git a/src/views/system/i18n/index.vue b/src/views/system/i18n/index.vue index 5ba45484..ce1550f2 100644 --- a/src/views/system/i18n/index.vue +++ b/src/views/system/i18n/index.vue @@ -147,7 +147,7 @@ > {{ $fd( - "InternationalizationType", + 'InternationalizationType', scope.row.InternationalizationType ) }} @@ -158,7 +158,7 @@ > {{ $fd( - "InternationalizationType", + 'InternationalizationType', scope.row.InternationalizationType ) }} @@ -166,7 +166,7 @@ {{ $fd( - "InternationalizationType", + 'InternationalizationType', scope.row.InternationalizationType ) }} @@ -176,7 +176,7 @@ @@ -210,13 +210,13 @@ > @@ -241,7 +241,13 @@ show-overflow-tooltip sortable="custom" /> - + { return { Description: null, @@ -304,13 +310,13 @@ const searchDataDefault = () => { Module: null, PublishLogId: null, Asc: true, - SortField: "", + SortField: '', PageIndex: 1, PageSize: 20, - }; -}; + } +} export default { - name: "I18n", + name: 'I18n', components: { Pagination, I18nForm, BatchAddForm }, data() { return { @@ -321,140 +327,140 @@ export default { loading: false, PublishVersionList: [], selectTableList: [], - }; + } }, mounted() { - this.getList(); - this.getPublishVersionSelect(); + this.getList() + this.getPublishVersionSelect() }, methods: { // 获取迭代 async getPublishVersionSelect() { try { - let res = await getPublishVersionSelect(); + let res = await getPublishVersionSelect() if (res.IsSuccess) { - this.PublishVersionList = res.Result; + this.PublishVersionList = res.Result } } catch (err) { - console.log(err); + console.log(err) } }, getList() { - this.loading = true; + this.loading = true getInternationalizationList(this.searchData) .then((res) => { - this.loading = false; - this.list = res.Result.CurrentPageData; - this.total = res.Result.TotalCount; + this.loading = false + this.list = res.Result.CurrentPageData + this.total = res.Result.TotalCount }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 批量更新 handleBatchUpdate() { this.$nextTick(() => { - this.$refs["i18nForm"].openDialog( - "批量更新", + this.$refs['i18nForm'].openDialog( + '批量更新', {}, this.PublishVersionList, - "batch" - ); - }); + 'batch' + ) + }) }, async batch(row) { - let { PublishLogId, State } = row; + let { PublishLogId, State } = row let data = { PublishLogId, State, IdList: this.selectTableList.map((item) => item.Id), - }; + } try { - let res = await batchUpdateInternationalInfo(data); + let res = await batchUpdateInternationalInfo(data) if (res.IsSuccess) { - this.$message.success(this.$t("common:message:updatedSuccessfully")); - this.getList(); + this.$message.success(this.$t('common:message:updatedSuccessfully')) + this.getList() this.$nextTick(() => { - this.$refs["i18nForm"].handleCancle(); - }); + this.$refs['i18nForm'].handleCancle() + }) } } catch (err) { - console.log(err); + console.log(err) } }, handleAdd() { this.$nextTick(() => { - this.$refs["i18nForm"].openDialog( - "新增", + this.$refs['i18nForm'].openDialog( + '新增', {}, this.PublishVersionList, - "add" - ); - }); + 'add' + ) + }) }, handleBatchAdd() { this.$nextTick(() => { - this.$refs["batcnAddForm"].openDialog( - "批量新增", + this.$refs['batcnAddForm'].openDialog( + '批量新增', {}, this.PublishVersionList - ); - }); + ) + }) }, handleEdit(row) { this.$nextTick(() => { - this.$refs["i18nForm"].openDialog( - "编辑", + this.$refs['i18nForm'].openDialog( + '编辑', row, this.PublishVersionList, - "update" - ); - }); + 'update' + ) + }) }, // 重置列表查询 handleReset() { - this.searchData = searchDataDefault(); - this.getList(); + this.searchData = searchDataDefault() + this.getList() }, // 删除 handleDelete(row) { - this.$confirm("是否确认删除?", { - type: "warning", + this.$confirm('是否确认删除?', { + type: 'warning', distinguishCancelAndClose: true, }).then(() => { - this.loading = true; + this.loading = true deleteInternationalization(row.Id) .then((res) => { - this.loading = false; + this.loading = false if (res.IsSuccess) { - this.getList(); + this.getList() this.$message.success( - this.$t("common:message:deletedSuccessfully") - ); + this.$t('common:message:deletedSuccessfully') + ) } }) .catch(() => { - this.loading = false; - }); - }); + this.loading = false + }) + }) }, // 排序 handleSortByColumn(column) { - if (column.order === "ascending") { - this.searchData.Asc = true; + if (column.order === 'ascending') { + this.searchData.Asc = true } else { - this.searchData.Asc = false; + this.searchData.Asc = false } - this.searchData.SortField = column.prop; - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.SortField = column.prop + this.searchData.PageIndex = 1 + this.getList() }, // 选择 handleSelectionChange(val) { - this.selectTableList = val; + this.selectTableList = val }, }, -}; +}