全局英文设置,大部分样式修改
This commit is contained in:
parent
37ab2316be
commit
8c733b9f62
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-config-provider :size="getGlobalComponentSize" :locale="zhCn">
|
<el-config-provider :size="getGlobalComponentSize" :locale="en">
|
||||||
<router-view v-show="setLockScreen" />
|
<router-view v-show="setLockScreen" />
|
||||||
<LockScreen v-if="themeConfig.isLockScreen" />
|
<LockScreen v-if="themeConfig.isLockScreen" />
|
||||||
<Setings ref="setingsRef" v-show="setLockScreen" />
|
<Setings ref="setingsRef" v-show="setLockScreen" />
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
import { defineAsyncComponent, computed, ref, onBeforeMount, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
import { defineAsyncComponent, computed, ref, onBeforeMount, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||||
|
import en from 'element-plus/dist/locale/en.mjs'
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
|
||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<el-config-provider :locale="en">
|
<el-config-provider :locale="en">
|
||||||
<el-row :gutter="22">
|
<el-row :gutter="22">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%;"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
<el-table-column prop="vordmId" label="ID" width="118" />
|
<el-table-column prop="vordmId" label="ID" width="118" />
|
||||||
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
<el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
class="mt15" :pager-count="2" :page-sizes="[10, 20, 30]"
|
class="mt15" :page-sizes="[10, 20, 30]"
|
||||||
v-model:current-page="state.disasterData.param.pageNum" background
|
v-model:current-page="state.disasterData.param.pageNum" background
|
||||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
:total="state.disasterData.total">
|
:total="state.disasterData.total">
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 90vh;">
|
||||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
<el-form-item label="Type" label-width="100px">
|
<el-form-item label="Type" label-width="100px">
|
||||||
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
<el-select v-model="state.searchName" placeholder="Please select data type" style="max-width: 200px"
|
||||||
|
@ -64,8 +64,8 @@
|
||||||
Batch operation
|
Batch operation
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
<el-table :data=" state.tableData.data " v-loading=" state.tableData.loading "
|
||||||
@selection-change=" handleSelectionChange " style="width: 100%">
|
@selection-change=" handleSelectionChange " style="width: 100%;">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column type="index" label="ID" width="50" />
|
<el-table-column type="index" label="ID" width="50" />
|
||||||
<el-table-column v-if=" state.searchName == '1' " prop="title" label="Title"
|
<el-table-column v-if=" state.searchName == '1' " prop="title" label="Title"
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="content" label="Link" show-overflow-tooltip>
|
<el-table-column prop="content" label="Link" show-overflow-tooltip>
|
||||||
<template #default=" scope ">
|
<template #default=" scope ">
|
||||||
<a :href=" scope.row.link " target="_blank">goto link</a>
|
<a :href=" scope.row.link " target="_blank">Read more</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination style="margin-left: 20px;" @size-change=" onHandleSizeChange " @current-change=" onHandleCurrentChange " class="mt15"
|
<el-pagination style="margin-left: 20px;" @size-change=" onHandleSizeChange " @current-change=" onHandleCurrentChange " class="mt15"
|
||||||
:pager-count="3" :page-sizes=" [10, 20, 30] " v-model:current-page=" state.tableData.param.pageNum " background
|
:page-sizes=" [10, 20, 30] " v-model:current-page=" state.tableData.param.pageNum " background
|
||||||
v-model:page-size=" state.tableData.param.pageSize " layout="total, sizes, prev, pager, next"
|
v-model:page-size=" state.tableData.param.pageSize " layout="total, sizes, prev, pager, next"
|
||||||
:total=" state.tableData.total" >
|
:total=" state.tableData.total" >
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<el-row :gutter="22">
|
<el-row :gutter="22">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height: 80vh;">
|
||||||
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
|
<span style="margin:2%;font-weight: 600;font-size: 18px;">Disaster Info</span>
|
||||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||||
highlight-current-row @row-click="tableClick">
|
highlight-current-row @row-click="tableClick">
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
<el-pagination style="margin-right:20px;" @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
|
||||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
class="mt15" :page-sizes="[10, 20, 30]"
|
||||||
v-model:current-page="state.disasterData.param.pageNum" background
|
v-model:current-page="state.disasterData.param.pageNum" background
|
||||||
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
:total="state.disasterData.total">
|
:total="state.disasterData.total">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
<div class="system-role-padding layout-padding-auto layout-padding-view" style="height:80vh;">
|
||||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||||
<!-- 选择灾害类型 -->
|
<!-- 选择灾害类型 -->
|
||||||
<!-- <el-select v-model="state.value_disasterType"
|
<!-- <el-select v-model="state.value_disasterType"
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||||
:pager-count="3" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
style="margin-right: 20px;" :page-sizes="[10, 20, 30]" background v-model:current-page="state.tableData.param.pageNum"
|
||||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||||
:total="state.tableData.total">
|
:total="state.tableData.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
|
|
|
@ -486,6 +486,7 @@ watch(
|
||||||
const setData = (row) => {
|
const setData = (row) => {
|
||||||
state.data = row;
|
state.data = row;
|
||||||
state.selectID = row.disasterId
|
state.selectID = row.disasterId
|
||||||
|
console.log(row);
|
||||||
map.value.mapOperations.wktParseToMap(row.geometry)
|
map.value.mapOperations.wktParseToMap(row.geometry)
|
||||||
console.log(row)
|
console.log(row)
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,8 @@
|
||||||
<!-- </el-form-item> -->
|
<!-- </el-form-item> -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="state.dialogVisible = false">Cancel</el-button>
|
<el-button @click="state.dialogVisible = false;state.email.text=''">Cancel</el-button>
|
||||||
<el-button type="primary" @click="send()" v-if="state.email.status != 1">
|
<el-button type="primary" @click="send();state.email.text=''" v-if="state.email.status != 1">
|
||||||
Send
|
Send
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
@ -174,25 +174,27 @@ const onOpenEdit = (row) => {
|
||||||
|
|
||||||
};
|
};
|
||||||
const send = () => {
|
const send = () => {
|
||||||
state.email.email = "792163605@qq.com"
|
// state.email.email = "792163605@qq.com"
|
||||||
emailSend(state.email).then(res => {
|
emailSend(state.email).then(res => {
|
||||||
ElMessage.success('发送成功');
|
ElMessage.success('send success');
|
||||||
state.dialogVisible = false;
|
state.dialogVisible = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
};
|
};
|
||||||
// 删除用户
|
// 删除用户
|
||||||
const onRowDel = (row) => {
|
const onRowDel = (row) => {
|
||||||
ElMessageBox.confirm(`此操作将永久此参数:“${row.name}”,是否继续?`, '提示', {
|
ElMessageBox.confirm(
|
||||||
confirmButtonText: '确认',
|
`This operation will permanently delete the contact “${row.userName}”. Do you want to continue?`
|
||||||
cancelButtonText: '取消',
|
, 'Tips', {
|
||||||
|
confirmButtonText: 'Yes',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
remove(row.id).then(res => {
|
// remove(row.id).then(res => {
|
||||||
ElMessage.success('删除成功');
|
// ElMessage.success('删除成功');
|
||||||
initTableData();
|
// initTableData();
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
};
|
};
|
||||||
|
|
|
@ -135,14 +135,14 @@ const onOpenEdit = (row) => {
|
||||||
};
|
};
|
||||||
// 删除用户
|
// 删除用户
|
||||||
const onRowDel = (row) => {
|
const onRowDel = (row) => {
|
||||||
ElMessageBox.confirm(`此操作将永久此参数:“${row.name}”,是否继续?`, '提示', {
|
ElMessageBox.confirm(`After rejecting the tool for “${row.toolName}” this data will be deleted.`, 'Tips', {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: 'Yes',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: 'cancel',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
remove(row.id).then(res => {
|
remove(row.id).then(res => {
|
||||||
ElMessage.success('删除成功');
|
ElMessage.success('delete success');
|
||||||
initTableData();
|
initTableData();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -299,7 +299,7 @@ const reviews = (index) => {
|
||||||
//时间格式化
|
//时间格式化
|
||||||
state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
|
state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
|
||||||
review(state.edit).then((res) => {
|
review(state.edit).then((res) => {
|
||||||
ElMessage.success('操作成功');
|
ElMessage.success('success');
|
||||||
state.dialogVisible = false;
|
state.dialogVisible = false;
|
||||||
getTableData();
|
getTableData();
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,24 +8,24 @@
|
||||||
<el-form ref="dicDialogFormRef" :model="state.ruleForm" size="default" label-width="90px">
|
<el-form ref="dicDialogFormRef" :model="state.ruleForm" size="default" label-width="90px">
|
||||||
<el-row :gutter="35">
|
<el-row :gutter="35">
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="字典名">
|
<el-form-item label="Dictionary Name" label-width="180">
|
||||||
<el-input v-model="state.ruleForm.dictValue" placeholder="请输入字典名称" clearable></el-input>
|
<el-input v-model="state.ruleForm.dictValue" placeholder="Please enter a Dictionary Name" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="字典值">
|
<el-form-item label="Dictionary value" label-width="180">
|
||||||
<el-input v-model="state.ruleForm.dictKey" placeholder="请输入字段名,拼接 ruleForm.children" clearable></el-input>
|
<el-input v-model="state.ruleForm.dictKey" placeholder="Please enter a Dictionary Value" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
<el-form-item label="字典状态">
|
<el-form-item label="Dictionary Status" label-width="180">
|
||||||
<el-switch v-model="state.ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
|
<el-switch v-model="state.ruleForm.status" inline-prompt active-text="on" inactive-text="off"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
<el-row :gutter="35" v-for="(v, k) in state.ruleForm.children" :key="k">
|
<el-row :gutter="35" v-for="(v, k) in state.ruleForm.children" :key="k">
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item :prop="`list[${k}].label`">
|
<el-form-item :prop="`list[${k}].label`" label-width="180">
|
||||||
<template #label>
|
<template #label>
|
||||||
<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === 0">
|
<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === 0">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
|
@ -37,28 +37,28 @@
|
||||||
<ele-Delete />
|
<ele-Delete />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<span class="ml10">字典名</span>
|
<span class="ml10">Dictionary Name</span>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="v.dictValue" style="width: 100%" placeholder="请输入字段名"> </el-input>
|
<el-input v-model="v.dictValue" style="width: 100%" placeholder="Please enter a Dictionary Name"> </el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="字典值" :prop="`list[${k}].value`">
|
<el-form-item label="Dictionary Value" :prop="`list[${k}].value`" label-width="180">
|
||||||
<el-input v-model="v.dictKey" style="width: 100%" placeholder="请输入字典值"> </el-input>
|
<el-input v-model="v.dictKey" style="width: 100%" placeholder="Please enter a Dictionary Value"> </el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
<el-form-item label="字典描述">
|
<el-form-item label="Dictionary Description" label-width="180">
|
||||||
<el-input v-model="state.ruleForm.remark" type="textarea" placeholder="请输入字典描述" maxlength="150"></el-input>
|
<el-input v-model="state.ruleForm.remark" type="textarea" placeholder="Please enter a Dictionary Description" maxlength="150"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="onCancel" size="default">取 消</el-button>
|
<el-button @click="onCancel" size="default">Cancel</el-button>
|
||||||
<el-button type="primary" @click="onSubmit" size="default">{{ state.dialog.submitTxt }}</el-button>
|
<el-button type="primary" @click="onSubmit" size="default">{{ state.dialog.submitTxt }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -103,11 +103,11 @@ const openDialog = (type, row) => {
|
||||||
state.ruleForm.children=[{ dictValue: '', dictKey: '' }];
|
state.ruleForm.children=[{ dictValue: '', dictKey: '' }];
|
||||||
}
|
}
|
||||||
state.ruleForm.status = row.isSealed === 0;
|
state.ruleForm.status = row.isSealed === 0;
|
||||||
state.dialog.title = '修改字典';
|
state.dialog.title = 'Edit';
|
||||||
state.dialog.submitTxt = '修 改';
|
state.dialog.submitTxt = 'Edit';
|
||||||
} else {
|
} else {
|
||||||
state.dialog.title = '新增字典';
|
state.dialog.title = 'Add';
|
||||||
state.dialog.submitTxt = '新 增';
|
state.dialog.submitTxt = 'Add';
|
||||||
if (!state.ruleForm.children || state.ruleForm.children.length === 0) {
|
if (!state.ruleForm.children || state.ruleForm.children.length === 0) {
|
||||||
state.ruleForm.children=[{ dictValue: '', dictKey: '' }];
|
state.ruleForm.children=[{ dictValue: '', dictKey: '' }];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,35 +2,35 @@
|
||||||
<div class="system-dic-container layout-padding">
|
<div class="system-dic-container layout-padding">
|
||||||
<el-card shadow="hover" class="layout-padding-auto">
|
<el-card shadow="hover" class="layout-padding-auto">
|
||||||
<div class="system-user-search mb15">
|
<div class="system-user-search mb15">
|
||||||
<el-input size="default" placeholder="请输入字典名称" style="max-width: 180px"> </el-input>
|
<el-input size="default" placeholder="Please enter a dictionary name" style="max-width: 180px" v-model="state.query.dictValue"> </el-input>
|
||||||
<el-button size="default" type="primary" class="ml10">
|
<el-button size="default" type="primary" class="ml10">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
查询
|
search
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="default" type="success" class="ml10" @click="onOpenAddDic('add')">
|
<el-button size="default" type="success" class="ml10" @click="onOpenAddDic('add')">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<ele-FolderAdd />
|
<ele-FolderAdd />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
新增字典
|
add
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||||
<el-table-column type="index" label="序号" width="50" />
|
<el-table-column type="index" label="index" width="120" />
|
||||||
<el-table-column prop="dictValue" label="字典名称" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="dictValue" label="Dictionary Name" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="dictKey" label="字典值" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="dictKey" label="Dictionary value" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="isSealed" label="字典状态" show-overflow-tooltip>
|
<el-table-column prop="isSealed" label="Dictionary Status" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="success" v-if="scope.row.isSealed===0">启用</el-tag>
|
<el-tag type="success" v-if="scope.row.isSealed===0">Enable</el-tag>
|
||||||
<el-tag type="info" v-else>禁用</el-tag>
|
<el-tag type="info" v-else>Disabled</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="字典描述" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="remark" label="Dictionary Description" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="100">
|
<el-table-column label="Operate" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" text type="primary" @click="onOpenEditDic('edit', scope.row)">修改</el-button>
|
<el-button size="small" text type="primary" @click="onOpenEditDic('edit', scope.row)">Edit</el-button>
|
||||||
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button>
|
<el-button size="small" text type="primary" @click="onRowDel(scope.row)">Remove</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -71,6 +71,9 @@ const state = reactive({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
query:{
|
||||||
|
dictValue:""
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 初始化表格数据
|
// 初始化表格数据
|
||||||
|
@ -91,14 +94,14 @@ const onOpenEditDic = (type, row) => {
|
||||||
};
|
};
|
||||||
// 删除字典
|
// 删除字典
|
||||||
const onRowDel = (row) => {
|
const onRowDel = (row) => {
|
||||||
ElMessageBox.confirm(`此操作将永久删除字典名称:“${row.dicName}”,是否继续?`, '提示', {
|
ElMessageBox.confirm(`This operation will permanently delete the dictionary named “${row.dicName}” Do you want to continue?`, 'Tips', {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: 'Yes',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: 'Cancel',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
remove(row.id).then(() => {
|
remove(row.id).then(() => {
|
||||||
getTableData();
|
getTableData();
|
||||||
ElMessage.success('删除成功');
|
ElMessage.success('Delete Success');
|
||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue