Compare commits
2 Commits
3e680d0033
...
89fe4e4c00
Author | SHA1 | Date |
---|---|---|
|
89fe4e4c00 | |
|
a582daf686 |
10
src/App.vue
10
src/App.vue
|
@ -126,10 +126,12 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
|
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
|
||||||
<el-button size="mini" @click="drawer = false">取消 </el-button>
|
<el-button size="mini" @click="drawer = false"
|
||||||
<el-button size="mini" type="primary" @click="handleSave"
|
>{{ $t('common:button:cancel') }}
|
||||||
>保存</el-button
|
</el-button>
|
||||||
>
|
<el-button size="mini" type="primary" @click="handleSave">{{
|
||||||
|
$t('common:button:save')
|
||||||
|
}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<feedBack v-if="$route.matched.length > 0" />
|
<feedBack v-if="$route.matched.length > 0" />
|
||||||
|
|
|
@ -171,7 +171,11 @@
|
||||||
:label="$t('curriculumVitae:info:form:email')"
|
:label="$t('curriculumVitae:info:form:email')"
|
||||||
prop="EMail"
|
prop="EMail"
|
||||||
>
|
>
|
||||||
<el-input v-model="form.EMail" clearable disabled></el-input>
|
<el-input
|
||||||
|
v-model="form.EMail"
|
||||||
|
clearable
|
||||||
|
:disabled="DATA.IsHaveAccount"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
size="small"
|
size="small"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
>
|
>
|
||||||
<el-form-item label="国际化类型" prop="InternationalizationType">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:InternationalizationType')"
|
||||||
|
prop="InternationalizationType"
|
||||||
|
>
|
||||||
<el-radio-group v-model="form.InternationalizationType">
|
<el-radio-group v-model="form.InternationalizationType">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.InternationalizationType"
|
v-for="item of $d.InternationalizationType"
|
||||||
|
@ -18,7 +21,7 @@
|
||||||
>
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="State">
|
<el-form-item :label="$t('system:l18n:search:State')" prop="State">
|
||||||
<el-radio-group v-model="form.State">
|
<el-radio-group v-model="form.State">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.InternationalizationKeyState"
|
v-for="item of $d.InternationalizationKeyState"
|
||||||
|
@ -28,7 +31,10 @@
|
||||||
>
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="迭代" prop="PublishLogId">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:PublishVersion')"
|
||||||
|
prop="PublishLogId"
|
||||||
|
>
|
||||||
<el-select v-model="form.PublishLogId" clearable filterable>
|
<el-select v-model="form.PublishLogId" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PublishVersionList"
|
v-for="item in PublishVersionList"
|
||||||
|
@ -39,7 +45,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-table :data="form.AddList" style="width: 100%" height="300">
|
<el-table :data="form.AddList" style="width: 100%" height="300">
|
||||||
<el-table-column prop="" label="功能模块/服务名">
|
<el-table-column prop="" :label="$t('system:l18n:search:Module')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label=""
|
label=""
|
||||||
|
@ -61,7 +67,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="" label="标识">
|
<el-table-column prop="" :label="$t('system:l18n:search:Code')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label=""
|
label=""
|
||||||
|
@ -87,7 +93,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="" label="中文值">
|
<el-table-column prop="" :label="$t('system:l18n:search:ValueCN')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label=""
|
label=""
|
||||||
|
@ -113,7 +119,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="" label="英文值">
|
<el-table-column prop="" :label="$t('system:l18n:search:Value')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label=""
|
label=""
|
||||||
|
@ -139,7 +145,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="" label="说明">
|
<el-table-column
|
||||||
|
prop=""
|
||||||
|
:label="$t('system:l18n:search:Description')"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label=""
|
label=""
|
||||||
|
@ -169,7 +178,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>{{ $t("common:button:new") }}</el-button
|
>{{ $t('common:button:new') }}</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -179,7 +188,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.$index)"
|
@click="handleDelete(scope.$index)"
|
||||||
>{{ $t("common:button:delete") }}</el-button
|
>{{ $t('common:button:delete') }}</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -187,28 +196,28 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button size="small" type="primary" @click="handleCancle"
|
<el-button size="small" type="primary" @click="handleCancle">{{
|
||||||
>取消</el-button
|
$t('common:button:cancel')
|
||||||
>
|
}}</el-button>
|
||||||
<el-button size="small" type="primary" @click="handleSave"
|
<el-button size="small" type="primary" @click="handleSave">{{
|
||||||
>保存</el-button
|
$t('common:button:save')
|
||||||
>
|
}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { batchAddInternationalization } from "@/api/admin";
|
import { batchAddInternationalization } from '@/api/admin'
|
||||||
import BaseModel from "@/components/BaseModel";
|
import BaseModel from '@/components/BaseModel'
|
||||||
const formDataDefault = () => {
|
const formDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
State: 0,
|
State: 0,
|
||||||
InternationalizationType: 1,
|
InternationalizationType: 1,
|
||||||
PublishLogId: null,
|
PublishLogId: null,
|
||||||
AddList: [],
|
AddList: [],
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "BatcnAddForm",
|
name: 'BatcnAddForm',
|
||||||
components: { BaseModel },
|
components: { BaseModel },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -217,59 +226,65 @@ export default {
|
||||||
model_cfg: {
|
model_cfg: {
|
||||||
visible: false,
|
visible: false,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
width: "800px",
|
width: '800px',
|
||||||
title: "",
|
title: '',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
PublishLogId: [{ required: true, message: "请选择", trigger: "blur" }],
|
PublishLogId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:selectPublishLogId'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
PublishVersionList: [],
|
PublishVersionList: [],
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
openDialog(title, data, options = []) {
|
openDialog(title, data, options = []) {
|
||||||
this.PublishVersionList = options;
|
this.PublishVersionList = options
|
||||||
this.model_cfg.visible = true;
|
this.model_cfg.visible = true
|
||||||
this.model_cfg.title = title;
|
this.model_cfg.title = title
|
||||||
this.form = formDataDefault();
|
this.form = formDataDefault()
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.batcnAddForm.validate((valid) => {
|
this.$refs.batcnAddForm.validate((valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
batchAddInternationalization(this.form)
|
batchAddInternationalization(this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.model_cfg.visible = false;
|
this.model_cfg.visible = false
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleCancle() {
|
handleCancle() {
|
||||||
this.model_cfg.visible = false;
|
this.model_cfg.visible = false
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.form.AddList.push({
|
this.form.AddList.push({
|
||||||
Description: "",
|
Description: '',
|
||||||
Code: "",
|
Code: '',
|
||||||
ValueCN: "",
|
ValueCN: '',
|
||||||
Value: "",
|
Value: '',
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleDelete(index) {
|
handleDelete(index) {
|
||||||
this.$confirm("是否确认删除?", {
|
this.$confirm(this.$t('system:l18n:confirm:delete'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.form.AddList.splice(index, 1);
|
this.form.AddList.splice(index, 1)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="国际化类型"
|
:label="$t('system:l18n:search:InternationalizationType')"
|
||||||
prop="InternationalizationType"
|
prop="InternationalizationType"
|
||||||
v-if="status !== 'batch'"
|
v-if="status !== 'batch'"
|
||||||
>
|
>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="功能模块/服务名"
|
:label="$t('system:l18n:search:Module')"
|
||||||
prop="Module"
|
prop="Module"
|
||||||
v-if="status !== 'batch'"
|
v-if="status !== 'batch'"
|
||||||
>
|
>
|
||||||
|
@ -35,7 +35,11 @@
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标识" prop="Code" v-if="status !== 'batch'">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:Code')"
|
||||||
|
prop="Code"
|
||||||
|
v-if="status !== 'batch'"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Code"
|
v-model="form.Code"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@ -43,7 +47,11 @@
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="中文值" prop="ValueCN" v-if="status !== 'batch'">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:ValueCN')"
|
||||||
|
prop="ValueCN"
|
||||||
|
v-if="status !== 'batch'"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.ValueCN"
|
v-model="form.ValueCN"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@ -51,7 +59,11 @@
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="英文值" prop="Value" v-if="status !== 'batch'">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:Value')"
|
||||||
|
prop="Value"
|
||||||
|
v-if="status !== 'batch'"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Value"
|
v-model="form.Value"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@ -59,7 +71,7 @@
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="State">
|
<el-form-item :label="$t('system:l18n:search:State')" prop="State">
|
||||||
<el-radio-group v-model="form.State">
|
<el-radio-group v-model="form.State">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.InternationalizationKeyState"
|
v-for="item of $d.InternationalizationKeyState"
|
||||||
|
@ -69,7 +81,11 @@
|
||||||
>
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="说明" prop="Description" v-if="status !== 'batch'">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:Description')"
|
||||||
|
prop="Description"
|
||||||
|
v-if="status !== 'batch'"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Description"
|
v-model="form.Description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
@ -77,7 +93,10 @@
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="迭代" prop="PublishLogId">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:PublishVersion')"
|
||||||
|
prop="PublishLogId"
|
||||||
|
>
|
||||||
<el-select v-model="form.PublishLogId" clearable filterable>
|
<el-select v-model="form.PublishLogId" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PublishVersionList"
|
v-for="item in PublishVersionList"
|
||||||
|
@ -90,18 +109,18 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button size="small" type="primary" @click="handleCancle"
|
<el-button size="small" type="primary" @click="handleCancle">{{
|
||||||
>取消</el-button
|
$t('common:button:cancel')
|
||||||
>
|
}}</el-button>
|
||||||
<el-button size="small" type="primary" @click="handleSave"
|
<el-button size="small" type="primary" @click="handleSave">{{
|
||||||
>保存</el-button
|
$t('common:button:save')
|
||||||
>
|
}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdateInternationalization } from "@/api/admin";
|
import { addOrUpdateInternationalization } from '@/api/admin'
|
||||||
import BaseModel from "@/components/BaseModel";
|
import BaseModel from '@/components/BaseModel'
|
||||||
const formDataDefault = () => {
|
const formDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Id: null,
|
Id: null,
|
||||||
|
@ -113,110 +132,138 @@ const formDataDefault = () => {
|
||||||
ValueCN: null,
|
ValueCN: null,
|
||||||
InternationalizationType: 1,
|
InternationalizationType: 1,
|
||||||
PublishLogId: null,
|
PublishLogId: null,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "I18nForm",
|
name: 'I18nForm',
|
||||||
components: { BaseModel },
|
components: { BaseModel },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
status: "add", // add update batch
|
status: 'add', // add update batch
|
||||||
loading: false,
|
loading: false,
|
||||||
form: formDataDefault(),
|
form: formDataDefault(),
|
||||||
rules: {
|
rules: {
|
||||||
State: [{ required: true, message: "请选择", trigger: "blur" }],
|
State: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:selectState'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
Module: [
|
Module: [
|
||||||
{
|
{
|
||||||
max: 200,
|
max: 200,
|
||||||
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
|
message: `${this.$t('common:ruleMessage:maxLength')} 200`,
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Description: [
|
Description: [
|
||||||
{
|
{
|
||||||
max: 200,
|
max: 200,
|
||||||
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
|
message: `${this.$t('common:ruleMessage:maxLength')} 200`,
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Code: [
|
Code: [
|
||||||
{ required: true, message: "请注明", trigger: "blur" },
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:inputCode'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
max: 200,
|
max: 200,
|
||||||
message: `${this.$t("common:ruleMessage:maxLength")} 200`,
|
message: `${this.$t('common:ruleMessage:maxLength')} 200`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Value: [
|
Value: [
|
||||||
{ required: true, message: "请注明", trigger: "blur" },
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:inputValue'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
max: 1000,
|
max: 1000,
|
||||||
message: `${this.$t("common:ruleMessage:maxLength")} 1000`,
|
message: `${this.$t('common:ruleMessage:maxLength')} 1000`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ValueCN: [
|
ValueCN: [
|
||||||
{ required: true, message: "请注明", trigger: "blur" },
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:inputValueCN'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
max: 1000,
|
max: 1000,
|
||||||
message: `${this.$t("common:ruleMessage:maxLength")} 1000`,
|
message: `${this.$t('common:ruleMessage:maxLength')} 1000`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
InternationalizationType: [
|
InternationalizationType: [
|
||||||
{ required: true, message: "请选择", trigger: "blur" },
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:selectInternationalizationType'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PublishLogId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('system:l18n:rule:selectPublishLogId'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
PublishLogId: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
||||||
},
|
},
|
||||||
model_cfg: {
|
model_cfg: {
|
||||||
visible: false,
|
visible: false,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
width: "600px",
|
width: '600px',
|
||||||
title: "",
|
title: '',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
PublishVersionList: [],
|
PublishVersionList: [],
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
openDialog(title, data, options = [], status) {
|
openDialog(title, data, options = [], status) {
|
||||||
this.PublishVersionList = options;
|
this.PublishVersionList = options
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.status = status;
|
this.status = status
|
||||||
this.model_cfg.visible = true;
|
this.model_cfg.visible = true
|
||||||
this.model_cfg.title = title;
|
this.model_cfg.title = title
|
||||||
if (Object.keys(data).length > 0) {
|
if (Object.keys(data).length > 0) {
|
||||||
for (const k in this.form) {
|
for (const k in this.form) {
|
||||||
if (data.hasOwnProperty(k)) {
|
if (data.hasOwnProperty(k)) {
|
||||||
this.form[k] = data[k];
|
this.form[k] = data[k]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.form = formDataDefault();
|
this.form = formDataDefault()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.i18nForm.validate((valid) => {
|
this.$refs.i18nForm.validate((valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
if (this.status === "batch") {
|
if (this.status === 'batch') {
|
||||||
return this.$emit("batch", this.form);
|
return this.$emit('batch', this.form)
|
||||||
}
|
}
|
||||||
addOrUpdateInternationalization(this.form)
|
addOrUpdateInternationalization(this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.$message.success(this.$t("common:message:savedSuccessfully"));
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.model_cfg.visible = false;
|
this.model_cfg.visible = false
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleCancle() {
|
handleCancle() {
|
||||||
this.model_cfg.visible = false;
|
this.model_cfg.visible = false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .el-select {
|
::v-deep .el-select {
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
<div class="log">
|
<div class="log">
|
||||||
<div ref="leftContainer" class="left">
|
<div ref="leftContainer" class="left">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="国际化类型">
|
<el-form-item
|
||||||
|
:label="$t('system:l18n:search:InternationalizationType')"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.InternationalizationType"
|
v-model="searchData.InternationalizationType"
|
||||||
clearable
|
clearable
|
||||||
|
@ -17,7 +19,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="功能模块/服务名">
|
<el-form-item :label="$t('system:l18n:search:Module')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.Module"
|
v-model="searchData.Module"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标识">
|
<el-form-item :label="$t('system:l18n:search:Code')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.Code"
|
v-model="searchData.Code"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -33,7 +35,7 @@
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="中文值">
|
<el-form-item :label="$t('system:l18n:search:ValueCN')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.ValueCN"
|
v-model="searchData.ValueCN"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -41,7 +43,7 @@
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="英文值">
|
<el-form-item :label="$t('system:l18n:search:Value')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.Value"
|
v-model="searchData.Value"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -49,7 +51,7 @@
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item :label="$t('system:l18n:search:State')">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.State"
|
v-model="searchData.State"
|
||||||
clearable
|
clearable
|
||||||
|
@ -64,7 +66,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="说明">
|
<el-form-item :label="$t('system:l18n:search:Description')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchData.Description"
|
v-model="searchData.Description"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -72,7 +74,7 @@
|
||||||
style="width: 130px"
|
style="width: 130px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="迭代">
|
<el-form-item :label="$t('system:l18n:search:PublishVersion')">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.PublishLogId"
|
v-model="searchData.PublishLogId"
|
||||||
clearable
|
clearable
|
||||||
|
@ -118,7 +120,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="getList"
|
@click="getList"
|
||||||
>
|
>
|
||||||
查询
|
{{ $t('common:button:search') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -135,7 +137,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
新增
|
{{ $t('common:button:new') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -143,7 +145,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleBatchAdd"
|
@click="handleBatchAdd"
|
||||||
>
|
>
|
||||||
批量新增
|
{{ $t('system:l18n:button:batchAdd') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -152,7 +154,7 @@
|
||||||
:disabled="selectTableList.length <= 0"
|
:disabled="selectTableList.length <= 0"
|
||||||
@click="handleBatchUpdate"
|
@click="handleBatchUpdate"
|
||||||
>
|
>
|
||||||
批量更新
|
{{ $t('system:l18n:button:batchUpdate') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -161,7 +163,7 @@
|
||||||
:disabled="selectTableList.length <= 0"
|
:disabled="selectTableList.length <= 0"
|
||||||
@click="handleBatchUpdateToChange"
|
@click="handleBatchUpdateToChange"
|
||||||
>
|
>
|
||||||
批量编辑
|
{{ $t('system:l18n:button:batchEdit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -184,7 +186,7 @@
|
||||||
><el-table-column type="selection" width="50" />
|
><el-table-column type="selection" width="50" />
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="国际化类型"
|
:label="$t('system:l18n:search:InternationalizationType')"
|
||||||
prop="InternationalizationType"
|
prop="InternationalizationType"
|
||||||
width="120"
|
width="120"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
@ -224,35 +226,35 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="功能模块/服务名"
|
:label="$t('system:l18n:search:Module')"
|
||||||
prop="Module"
|
prop="Module"
|
||||||
min-width="140"
|
min-width="140"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="标识"
|
:label="$t('system:l18n:search:Code')"
|
||||||
prop="Code"
|
prop="Code"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="中文值"
|
:label="$t('system:l18n:search:ValueCN')"
|
||||||
prop="ValueCN"
|
prop="ValueCN"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="英文值"
|
:label="$t('system:l18n:search:Value')"
|
||||||
prop="Value"
|
prop="Value"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="状态"
|
:label="$t('system:l18n:search:State')"
|
||||||
prop="State"
|
prop="State"
|
||||||
width="100"
|
width="100"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
@ -271,35 +273,35 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="说明"
|
:label="$t('system:l18n:search:Description')"
|
||||||
prop="Description"
|
prop="Description"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="迭代"
|
:label="$t('system:l18n:search:PublishVersion')"
|
||||||
prop="Version"
|
prop="Version"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="更新时间"
|
:label="$t('system:l18n:form:uploadTime')"
|
||||||
prop="UpdateTime"
|
prop="UpdateTime"
|
||||||
width="150"
|
width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
:label="$t('system:l18n:form:createTime')"
|
||||||
prop="CreateTime"
|
prop="CreateTime"
|
||||||
width="150"
|
width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
:label="$t('common:action:action')"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
prop=""
|
prop=""
|
||||||
min-width="120"
|
min-width="120"
|
||||||
|
@ -312,7 +314,7 @@
|
||||||
icon="el-icon-edit-outline"
|
icon="el-icon-edit-outline"
|
||||||
@click="handleEdit(scope.row)"
|
@click="handleEdit(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
{{ $t('common:button:edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="scope.row.State === 1"
|
:disabled="scope.row.State === 1"
|
||||||
|
@ -321,7 +323,7 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
{{ $t('common:button:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -421,7 +423,7 @@ export default {
|
||||||
handleBatchUpdate() {
|
handleBatchUpdate() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['i18nForm'].openDialog(
|
this.$refs['i18nForm'].openDialog(
|
||||||
'批量更新',
|
this.$t('system:l18n:button:batchUpdate'),
|
||||||
{},
|
{},
|
||||||
this.PublishVersionList,
|
this.PublishVersionList,
|
||||||
'batch'
|
'batch'
|
||||||
|
@ -455,7 +457,7 @@ export default {
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['i18nForm'].openDialog(
|
this.$refs['i18nForm'].openDialog(
|
||||||
'新增',
|
this.$t("system:l18n:button:add"),
|
||||||
{},
|
{},
|
||||||
this.PublishVersionList,
|
this.PublishVersionList,
|
||||||
'add'
|
'add'
|
||||||
|
@ -465,7 +467,7 @@ export default {
|
||||||
handleBatchAdd() {
|
handleBatchAdd() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['batcnAddForm'].openDialog(
|
this.$refs['batcnAddForm'].openDialog(
|
||||||
'批量新增',
|
this.$t("system:l18n:button:batchAdd"),
|
||||||
{},
|
{},
|
||||||
this.PublishVersionList
|
this.PublishVersionList
|
||||||
)
|
)
|
||||||
|
@ -474,7 +476,7 @@ export default {
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['i18nForm'].openDialog(
|
this.$refs['i18nForm'].openDialog(
|
||||||
'编辑',
|
this.$t("system:l18n:button:edit"),
|
||||||
row,
|
row,
|
||||||
this.PublishVersionList,
|
this.PublishVersionList,
|
||||||
'update'
|
'update'
|
||||||
|
@ -490,7 +492,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('是否确认删除?', {
|
this.$confirm(this.$t("system:l18n:confirm:delete"), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
Loading…
Reference in New Issue