国家化新增模块、迭代字段,提供批量更新

uat_us
wangxiaoshuang 2024-06-27 16:25:18 +08:00
parent 59f27b9d35
commit ced1be74b3
4 changed files with 543 additions and 259 deletions

View File

@ -277,3 +277,19 @@ export function batchAddInternationalization(param) {
data: param
})
}
// 国际化获取迭代列表
export function getPublishVersionSelect() {
return request({
url: `/PublishLog/getPublishVersionSelect`,
method: 'get',
})
}
// 国际化批量更新
export function batchUpdateInternationalInfo(data) {
return request({
url: `/Internationalization/batchUpdateInternationalInfo`,
method: 'put',
data
})
}

View File

@ -6,6 +6,7 @@
v-loading="loading"
:model="form"
size="small"
:rules="rules"
>
<el-form-item label="国际化类型" prop="InternationalizationType">
<el-radio-group v-model="form.InternationalizationType">
@ -13,7 +14,8 @@
v-for="item of $d.InternationalizationType"
:key="'InternationalizationType' + item.value"
:label="item.value"
>{{ item.label }}</el-radio>
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="状态" prop="State">
@ -22,29 +24,36 @@
v-for="item of $d.InternationalizationKeyState"
:key="'InternationalizationKeyState' + item.value"
:label="item.value"
>{{ item.label }}</el-radio>
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-table
:data="form.AddList"
style="width: 100%"
height="300"
>
<el-table-column
prop=""
label="功能模块/服务名"
>
<el-form-item label="迭代" prop="PublishLogId">
<el-select v-model="form.PublishLogId" clearable filterable>
<el-option
v-for="item in PublishVersionList"
:key="item.Id"
:label="item.Version"
:value="item.Id"
/>
</el-select>
</el-form-item>
<el-table :data="form.AddList" style="width: 100%" height="300">
<el-table-column prop="" label="功能模块/服务名">
<template slot-scope="scope">
<el-form-item
label=""
:prop="`AddList.${scope.$index}.Description`"
:prop="`AddList.${scope.$index}.Module`"
:rules="[
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
{ max: 200, message: `${$t('common:ruleMessage:maxLength')} 200` }
{
max: 200,
message: `${$t('common:ruleMessage:maxLength')} 200`,
trigger: ['change', 'blur'],
},
]"
>
<el-input
v-model="scope.row.Description"
v-model="scope.row.Module"
type="textarea"
maxlength="200"
:autosize="{ minRows: 2, maxRows: 4 }"
@ -52,17 +61,21 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop=""
label="标识"
>
<el-table-column prop="" label="标识">
<template slot-scope="scope">
<el-form-item
label=""
:prop="`AddList.${scope.$index}.Code`"
:rules="[
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
{ max: 200, message: `${$t('common:ruleMessage:maxLength')} 200` }
{
required: true,
message: $t('common:ruleMessage:specify'),
trigger: ['change', 'blur'],
},
{
max: 200,
message: `${$t('common:ruleMessage:maxLength')} 200`,
},
]"
>
<el-input
@ -74,17 +87,21 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop=""
label="中文值"
>
<el-table-column prop="" label="中文值">
<template slot-scope="scope">
<el-form-item
label=""
:prop="`AddList.${scope.$index}.ValueCN`"
:rules="[
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
{ max: 1000, message: `${$t('common:ruleMessage:maxLength')} 1000` }
{
required: true,
message: $t('common:ruleMessage:specify'),
trigger: ['change', 'blur'],
},
{
max: 1000,
message: `${$t('common:ruleMessage:maxLength')} 1000`,
},
]"
>
<el-input
@ -96,17 +113,21 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop=""
label="英文值"
>
<el-table-column prop="" label="英文值">
<template slot-scope="scope">
<el-form-item
label=""
:prop="`AddList.${scope.$index}.Value`"
:rules="[
{ required: true,message: $t('common:ruleMessage:specify'), trigger: ['change','blur']},
{ max: 1000, message: `${$t('common:ruleMessage:maxLength')} 1000` }
{
required: true,
message: $t('common:ruleMessage:specify'),
trigger: ['change', 'blur'],
},
{
max: 1000,
message: `${$t('common:ruleMessage:maxLength')} 1000`,
},
]"
>
<el-input
@ -118,10 +139,29 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column
align="right"
width="100"
<el-table-column prop="" label="说明">
<template slot-scope="scope">
<el-form-item
label=""
:prop="`AddList.${scope.$index}.Description`"
:rules="[
{
max: 200,
message: `${$t('common:ruleMessage:maxLength')} 200`,
trigger: ['change', 'blur'],
},
]"
>
<el-input
v-model="scope.row.Description"
type="textarea"
maxlength="200"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column align="right" width="100">
<template slot="header">
<!-- 新增 -->
<el-button
@ -129,7 +169,8 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>{{ $t('common:button:new') }}</el-button>
>{{ $t("common:button:new") }}</el-button
>
</template>
<template slot-scope="scope">
<!-- 删除 -->
@ -138,81 +179,97 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.$index)"
>{{ $t('common:button:delete') }}</el-button>
>{{ $t("common:button:delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle"></el-button>
<el-button size="small" type="primary" @click="handleSave"></el-button>
<el-button size="small" type="primary" @click="handleCancle"
>取消</el-button
>
<el-button size="small" type="primary" @click="handleSave"
>保存</el-button
>
</template>
</base-model>
</template>
<script>
import { batchAddInternationalization } from '@/api/admin'
import BaseModel from '@/components/BaseModel'
import { batchAddInternationalization } from "@/api/admin";
import BaseModel from "@/components/BaseModel";
const formDataDefault = () => {
return {
State: 0,
InternationalizationType: 1,
AddList: []
}
}
PublishLogId: null,
AddList: [],
};
};
export default {
name: 'BatcnAddForm',
name: "BatcnAddForm",
components: { BaseModel },
data() {
return {
loading: false,
form: formDataDefault(),
model_cfg: { visible: false, showClose: true, width: '800px', title: '', appendToBody: true }
}
model_cfg: {
visible: false,
showClose: true,
width: "800px",
title: "",
appendToBody: true,
},
mounted() {
rules: {
PublishLogId: [{ required: true, message: "请选择", trigger: "blur" }],
},
PublishVersionList: [],
};
},
mounted() {},
methods: {
openDialog(title, data) {
this.model_cfg.visible = true
this.model_cfg.title = title
this.form = formDataDefault()
openDialog(title, data, options = []) {
this.PublishVersionList = options;
this.model_cfg.visible = true;
this.model_cfg.title = title;
this.form = formDataDefault();
},
handleSave() {
this.$refs.batcnAddForm.validate(valid => {
if (!valid) return
this.loading = true
batchAddInternationalization(this.form).then(res => {
this.loading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.model_cfg.visible = false
this.$emit('getList')
}).catch(() => {
this.loading = false
})
this.$refs.batcnAddForm.validate((valid) => {
if (!valid) return;
this.loading = true;
batchAddInternationalization(this.form)
.then((res) => {
this.loading = false;
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.model_cfg.visible = false;
this.$emit("getList");
})
.catch(() => {
this.loading = false;
});
});
},
handleCancle() {
this.model_cfg.visible = false
this.model_cfg.visible = false;
},
handleAdd() {
this.form.AddList.push({
Description: '',
Code: '',
ValueCN: '',
Value: ''
})
Description: "",
Code: "",
ValueCN: "",
Value: "",
});
},
handleDelete(index) {
this.$confirm('是否确认删除?', {
type: 'warning',
distinguishCancelAndClose: true
this.$confirm("是否确认删除?", {
type: "warning",
distinguishCancelAndClose: true,
}).then(() => {
this.form.AddList.splice(index, 1)
})
}
}
}
this.form.AddList.splice(index, 1);
});
},
},
};
</script>

View File

@ -9,24 +9,33 @@
label-width="130px"
size="small"
>
<el-form-item label="国际化类型" prop="InternationalizationType">
<el-form-item
label="国际化类型"
prop="InternationalizationType"
v-if="status !== 'batch'"
>
<el-radio-group v-model="form.InternationalizationType">
<el-radio
v-for="item of $d.InternationalizationType"
:key="'InternationalizationType' + item.value"
:label="item.value"
>{{ item.label }}</el-radio>
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="功能模块/服务名" prop="Description">
<el-form-item
label="功能模块/服务名"
prop="Module"
v-if="status !== 'batch'"
>
<el-input
v-model="form.Description"
v-model="form.Module"
type="textarea"
maxlength="200"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="标识" prop="Code">
<el-form-item label="标识" prop="Code" v-if="status !== 'batch'">
<el-input
v-model="form.Code"
type="textarea"
@ -34,7 +43,7 @@
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="中文值" prop="ValueCN">
<el-form-item label="中文值" prop="ValueCN" v-if="status !== 'batch'">
<el-input
v-model="form.ValueCN"
type="textarea"
@ -42,7 +51,7 @@
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="英文值" prop="Value">
<el-form-item label="英文值" prop="Value" v-if="status !== 'batch'">
<el-input
v-model="form.Value"
type="textarea"
@ -50,106 +59,166 @@
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="状态" prop="State">
<el-radio-group v-model="form.State">
<el-radio
v-for="item of $d.InternationalizationKeyState"
:key="'InternationalizationKeyState' + item.value"
:label="item.value"
>{{ item.label }}</el-radio>
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="说明" prop="Description" v-if="status !== 'batch'">
<el-input
v-model="form.Description"
type="textarea"
maxlength="200"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="迭代" prop="PublishLogId">
<el-select v-model="form.PublishLogId" clearable filterable>
<el-option
v-for="item in PublishVersionList"
:key="item.Id"
:label="item.Version"
:value="item.Id"
/>
</el-select>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle"></el-button>
<el-button size="small" type="primary" @click="handleSave"></el-button>
<el-button size="small" type="primary" @click="handleCancle"
>取消</el-button
>
<el-button size="small" type="primary" @click="handleSave"
>保存</el-button
>
</template>
</base-model>
</template>
<script>
import { addOrUpdateInternationalization } from '@/api/admin'
import BaseModel from '@/components/BaseModel'
import { addOrUpdateInternationalization } from "@/api/admin";
import BaseModel from "@/components/BaseModel";
const formDataDefault = () => {
return {
Id: null,
State: 0,
Description: null,
Module: null,
Code: null,
Value: null,
ValueCN: null,
InternationalizationType: 1
}
}
InternationalizationType: 1,
PublishLogId: null,
};
};
export default {
name: 'I18nForm',
name: "I18nForm",
components: { BaseModel },
data() {
return {
status: "add", // add update batch
loading: false,
form: formDataDefault(),
rules: {
State: [
{ required: true, message: '请选择', trigger: 'blur' }
State: [{ required: true, message: "请选择", trigger: "blur" }],
Module: [
{
max: 200,
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
trigger: "blur",
},
],
Description: [
{ required: true, message: '请注明', trigger: 'blur' },
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }
{
max: 200,
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
trigger: "blur",
},
],
Code: [
{ required: true, message: '请注明', trigger: 'blur' },
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }
{ required: true, message: "请注明", trigger: "blur" },
{
max: 200,
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
},
],
Value: [
{ required: true, message: '请注明', trigger: 'blur' },
{ max: 1000, message: `${this.$t('common:ruleMessage:maxLength')} 1000` }
{ required: true, message: "请注明", trigger: "blur" },
{
max: 1000,
message: `${this.$t("common:ruleMessage:maxLength")} 1000`,
},
],
ValueCN: [
{ required: true, message: '请注明', trigger: 'blur' },
{ max: 1000, message: `${this.$t('common:ruleMessage:maxLength')} 1000` }
{ required: true, message: "请注明", trigger: "blur" },
{
max: 1000,
message: `${this.$t("common:ruleMessage:maxLength")} 1000`,
},
],
InternationalizationType: [
{ required: true, message: '请选择', trigger: 'blur' }
]
{ required: true, message: "请选择", trigger: "blur" },
],
PublishLogId: [{ required: true, message: "请选择", trigger: "blur" }],
},
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true }
}
model_cfg: {
visible: false,
showClose: true,
width: "600px",
title: "",
appendToBody: true,
},
mounted() {
PublishVersionList: [],
};
},
mounted() {},
methods: {
openDialog(title, data) {
this.model_cfg.visible = true
this.model_cfg.title = title
openDialog(title, data, options = [], status) {
this.PublishVersionList = options;
this.status = status;
this.model_cfg.visible = true;
this.model_cfg.title = title;
if (Object.keys(data).length > 0) {
for (const k in this.form) {
if (data.hasOwnProperty(k)) {
this.form[k] = data[k]
this.form[k] = data[k];
}
}
} else {
this.form = formDataDefault()
this.form = formDataDefault();
}
},
handleSave() {
this.$refs.i18nForm.validate(valid => {
if (!valid) return
this.loading = true
addOrUpdateInternationalization(this.form).then(res => {
this.loading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.model_cfg.visible = false
this.$emit('getList')
}).catch(() => {
this.loading = false
})
this.$refs.i18nForm.validate((valid) => {
if (!valid) return;
this.loading = true;
if (this.status === "batch") {
return this.$emit("batch", this.form);
}
addOrUpdateInternationalization(this.form)
.then((res) => {
this.loading = false;
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.model_cfg.visible = false;
this.$emit("getList");
})
.catch(() => {
this.loading = false;
});
});
},
handleCancle() {
this.model_cfg.visible = false
}
}
}
this.model_cfg.visible = false;
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-select {
width: 100%;
}
</style>

View File

@ -7,7 +7,7 @@
v-model="searchData.InternationalizationType"
clearable
filterable
style="width:130px;"
style="width: 130px"
>
<el-option
v-for="item of $d.InternationalizationType"
@ -19,10 +19,10 @@
</el-form-item>
<el-form-item label="功能模块/服务名">
<el-input
v-model="searchData.Description"
v-model="searchData.Module"
size="small"
clearable
style="width:130px;"
style="width: 130px"
/>
</el-form-item>
<el-form-item label="标识">
@ -30,7 +30,7 @@
v-model="searchData.Code"
size="small"
clearable
style="width:130px;"
style="width: 130px"
/>
</el-form-item>
<el-form-item label="中文值">
@ -38,19 +38,24 @@
v-model="searchData.ValueCN"
size="small"
clearable
style="width:130px;"
style="width: 130px"
/>
</el-form-item>
<el-form-item label="英文值">
<el-input
v-model="searchData.Value"
size="small"
style="width:130px;"
style="width: 130px"
clearable
/>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="searchData.State" clearable filterable style="width:130px;">
<el-select
v-model="searchData.State"
clearable
filterable
style="width: 130px"
>
<el-option
v-for="item of $d.InternationalizationKeyState"
:key="'InternationalizationKeyState' + item.value"
@ -59,6 +64,29 @@
/>
</el-select>
</el-form-item>
<el-form-item label="说明">
<el-input
v-model="searchData.Description"
size="small"
clearable
style="width: 130px"
/>
</el-form-item>
<el-form-item label="迭代">
<el-select
v-model="searchData.PublishLogId"
clearable
filterable
style="width: 130px"
>
<el-option
v-for="item in PublishVersionList"
:key="item.Id"
:label="item.Version"
:value="item.Id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -84,6 +112,15 @@
>
批量新增
</el-button>
<el-button
type="primary"
icon="el-icon-edit-outline"
size="mini"
:disabled="selectTableList.length <= 0"
@click="handleBatchUpdate"
>
批量更新
</el-button>
</el-form-item>
</el-form>
<el-table
@ -93,11 +130,9 @@
:data="list"
class="table"
@sort-change="handleSortByColumn"
>
<el-table-column
type="index"
width="50"
/>
@selection-change="handleSelectionChange"
><el-table-column type="selection" width="50" />
<el-table-column type="index" width="50" />
<el-table-column
label="国际化类型"
prop="InternationalizationType"
@ -106,21 +141,42 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.InternationalizationType === 0" type="primary">
{{ $fd('InternationalizationType', scope.row.InternationalizationType) }}
<el-tag
v-if="scope.row.InternationalizationType === 0"
type="primary"
>
{{
$fd(
"InternationalizationType",
scope.row.InternationalizationType
)
}}
</el-tag>
<el-tag v-else-if="scope.row.InternationalizationType === 1" type="warning">
{{ $fd('InternationalizationType', scope.row.InternationalizationType) }}
<el-tag
v-else-if="scope.row.InternationalizationType === 1"
type="warning"
>
{{
$fd(
"InternationalizationType",
scope.row.InternationalizationType
)
}}
</el-tag>
<el-tag v-else>
{{ $fd('InternationalizationType', scope.row.InternationalizationType) }}
{{
$fd(
"InternationalizationType",
scope.row.InternationalizationType
)
}}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="功能模块/服务名"
prop="Description"
min-width="100"
prop="Module"
min-width="120"
show-overflow-tooltip
sortable="custom"
/>
@ -154,16 +210,30 @@
>
<template slot-scope="scope">
<el-tag v-if="scope.row.State === 0" type="danger">
{{ $fd('InternationalizationKeyState', scope.row.State) }}
{{ $fd("InternationalizationKeyState", scope.row.State) }}
</el-tag>
<el-tag v-else-if="scope.row.State === 1" type="primary">
{{ $fd('InternationalizationKeyState', scope.row.State) }}
{{ $fd("InternationalizationKeyState", scope.row.State) }}
</el-tag>
<el-tag v-else>
{{ $fd('InternationalizationKeyState', scope.row.State) }}
{{ $fd("InternationalizationKeyState", scope.row.State) }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="说明"
prop="Description"
min-width="100"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
label="迭代"
prop="Version"
min-width="100"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
label="更新时间"
prop="UpdateTime"
@ -197,11 +267,10 @@
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" style="text-align: right;margin-top:5px;">
<div class="pagination" style="text-align: right; margin-top: 5px">
<pagination
:total="total"
:page.sync="searchData.PageIndex"
@ -209,20 +278,22 @@
@pagination="getList"
/>
</div>
<i18n-form
ref="i18nForm"
@getList="getList"
/>
<i18n-form ref="i18nForm" @getList="getList" @batch="batch" />
<BatchAddForm ref="batcnAddForm" @getList="getList" />
</div>
</div>
</template>
<script>
import { getInternationalizationList, deleteInternationalization } from '@/api/admin'
import Pagination from '@/components/Pagination'
import I18nForm from './components/I18nForm.vue'
import BatchAddForm from './components/BatchAddForm.vue'
import moment from 'moment'
import {
getInternationalizationList,
deleteInternationalization,
getPublishVersionSelect,
batchUpdateInternationalInfo,
} from "@/api/admin";
import Pagination from "@/components/Pagination";
import I18nForm from "./components/I18nForm.vue";
import BatchAddForm from "./components/BatchAddForm.vue";
import moment from "moment";
const searchDataDefault = () => {
return {
Description: null,
@ -230,14 +301,16 @@ const searchDataDefault = () => {
ValueCN: null,
InternationalizationType: null,
State: null,
Module: null,
PublishLogId: null,
Asc: true,
SortField: '',
SortField: "",
PageIndex: 1,
PageSize: 20
}
}
PageSize: 20,
};
};
export default {
name: 'I18n',
name: "I18n",
components: { Pagination, I18nForm, BatchAddForm },
data() {
return {
@ -245,74 +318,143 @@ export default {
searchData: searchDataDefault(),
list: [],
total: 0,
loading: false
}
loading: false,
PublishVersionList: [],
selectTableList: [],
};
},
mounted() {
this.getList()
this.getList();
this.getPublishVersionSelect();
},
methods: {
//
async getPublishVersionSelect() {
try {
let res = await getPublishVersionSelect();
if (res.IsSuccess) {
this.PublishVersionList = res.Result;
}
} catch (err) {
console.log(err);
}
},
getList() {
this.loading = true
getInternationalizationList(this.searchData).then((res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => {
this.loading = false
this.loading = true;
getInternationalizationList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
//
handleBatchUpdate() {
this.$nextTick(() => {
this.$refs["i18nForm"].openDialog(
"批量更新",
{},
this.PublishVersionList,
"batch"
);
});
},
async batch(row) {
let { PublishLogId, State } = row;
let data = {
PublishLogId,
State,
IdList: this.selectTableList.map((item) => item.Id),
};
try {
let res = await batchUpdateInternationalInfo(data);
if (res.IsSuccess) {
this.$message.success(this.$t("common:message:updatedSuccessfully"));
this.getList();
this.$nextTick(() => {
this.$refs["i18nForm"].handleCancle();
});
}
} catch (err) {
console.log(err);
}
},
handleAdd() {
this.$nextTick(() => {
this.$refs['i18nForm'].openDialog('新增', {})
})
this.$refs["i18nForm"].openDialog(
"新增",
{},
this.PublishVersionList,
"add"
);
});
},
handleBatchAdd() {
this.$nextTick(() => {
this.$refs['batcnAddForm'].openDialog('批量新增', {})
})
this.$refs["batcnAddForm"].openDialog(
"批量新增",
{},
this.PublishVersionList
);
});
},
handleEdit(row) {
this.$nextTick(() => {
this.$refs['i18nForm'].openDialog('编辑', row)
})
this.$refs["i18nForm"].openDialog(
"编辑",
row,
this.PublishVersionList,
"update"
);
});
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
this.searchData = searchDataDefault();
this.getList();
},
//
handleDelete(row) {
this.$confirm('是否确认删除?', {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
this.loading = true
this.$confirm("是否确认删除?", {
type: "warning",
distinguishCancelAndClose: true,
}).then(() => {
this.loading = true;
deleteInternationalization(row.Id)
.then(res => {
this.loading = false
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.getList()
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getList();
this.$message.success(
this.$t("common:message:deletedSuccessfully")
);
}
}).catch(() => { this.loading = false })
})
.catch(() => {
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.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
}
}
this.searchData.Asc = false;
}
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
//
handleSelectionChange(val) {
this.selectTableList = val;
},
},
};
</script>
<style lang="scss">
.log {