管理后台国际化补充
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
bf35797282
commit
e17a89e151
|
|
@ -1,75 +1,118 @@
|
|||
<template>
|
||||
<div class="app-container my_menu">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="模块">
|
||||
<el-select v-model="queryParams.ModuleTypeId" placeholder="模块" clearable>
|
||||
<!-- 模块 -->
|
||||
<el-form-item :label="$t('audit:label:moduleType')">
|
||||
<el-select v-model="queryParams.ModuleTypeId" clearable>
|
||||
<el-option v-for="item of dict.type.ModuleType" :key="`ModuleTypeId${item.value}`" :value="item.value"
|
||||
:label="item.raw.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button>
|
||||
<!-- 展开/折叠 -->
|
||||
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">
|
||||
{{ $t('audit:button:fold') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table v-if="refreshTable" v-adaptive="{ bottomOffset: 45 }" v-loading="loading" height="100" :data="menuList"
|
||||
:default-expand-all="isExpandAll" row-key="Id" :tree-props="{ children: 'Children', hasChildren: 'hasChildren' }">
|
||||
<el-table-column prop="ModuleTypeValueCN" label="模块" show-overflow-tooltip align="left" min-width="230px" />
|
||||
<el-table-column prop="Description" label="操作名称" :show-overflow-tooltip="true" min-width="200px">
|
||||
<!-- 模块 -->
|
||||
<el-table-column prop="ModuleTypeValueCN" :label="$t('audit:label:moduleType')" show-overflow-tooltip align="left" min-width="230px" />
|
||||
<!-- 操作名称 -->
|
||||
<el-table-column prop="Description" :label="$t('audit:label:desc')" :show-overflow-tooltip="true" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.DescriptionCN }}({{ scope.row.Description }})</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DescriptionCN" label="其他" :show-overflow-tooltip="true" min-width="140px">
|
||||
<!-- 其他 -->
|
||||
<el-table-column prop="DescriptionCN" :label="$t('audit:label:descCN')" :show-overflow-tooltip="true" min-width="140px">
|
||||
<template slot-scope="scope">
|
||||
<!-- 被禁用 -->
|
||||
<!-- 禁 -->
|
||||
<span v-if="!scope.row.IsEnable"
|
||||
style="cursor:pointer;line-height:20px;text-align:center;font-size: 12px;display: inline-block;width: 20px;height: 20px;border-radius: 50%;background: #DC143C;color: #fff;"
|
||||
title="被禁用">禁</span>
|
||||
:title="$t('audit:label:disable')">{{ $t('audit:label:disable1') }}</span>
|
||||
<!-- 需要电签 签 -->
|
||||
<span v-if="scope.row.IsHaveSign"
|
||||
style="cursor:pointer;line-height:20px;text-align:center;font-size: 12px;display: inline-block;width: 20px;height: 20px;border-radius: 50%;background: #428bca;color: #fff;"
|
||||
title="需要电签">签</span>
|
||||
:title="$t('audit:label:needSign')">{{ $t('audit:label:needSign1') }}</span>
|
||||
<!-- 需要原因 因 -->
|
||||
<span v-if="scope.row.IsHaveReason"
|
||||
style="cursor:pointer;line-height:20px;text-align:center;font-size: 12px;display: inline-block;width: 20px;height: 20px;border-radius: 50%;background: #fab6b6;color: #fff;"
|
||||
title="需要原因">因</span>
|
||||
:title="$t('audit:label:needReason')">{{ $t('audit:label:needReason1') }}</span>
|
||||
<!-- 已经记录 记 -->
|
||||
<span v-if="scope.row.IsFinish"
|
||||
style="cursor:pointer;line-height:20px;text-align:center;font-size: 12px;display: inline-block;width: 20px;height: 20px;border-radius: 50%;background:#3CB371;color: #fff;"
|
||||
title="已经记录">记</span>
|
||||
:title="$t('audit:label:isFinish')">{{ $t('audit:label:isFinish1') }}</span>
|
||||
<!-- 核对完 核 -->
|
||||
<span v-if="scope.row.IsJoinPlan"
|
||||
style="cursor:pointer;line-height:20px;text-align:center;font-size: 12px;display: inline-block;width: 20px;height: 20px;border-radius: 50%;background: #FFA500;color: #fff;"
|
||||
title="核对完">核</span>
|
||||
:title="$t('audit:label:isJoinPlan')">{{ $t('audit:label:isJoinPlan1') }}</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Identification" label="标识" :show-overflow-tooltip="true" min-width="200px" />
|
||||
<el-table-column prop="OptTypeValueCN" label="操作类型" show-overflow-tooltip width="100px" />
|
||||
<el-table-column prop="ObjectTypeValueCN" label="对象类型" show-overflow-tooltip min-width="100px" />
|
||||
<el-table-column prop="ChildrenTypeValueCN" label="数据类型" show-overflow-tooltip min-width="100px" />
|
||||
<el-table-column prop="Sort" label="显示顺序" min-width="80" show-overflow-tooltip />
|
||||
<el-table-column label="启用" align="center" prop="CreateTime" min-width="80">
|
||||
<!-- 标识 -->
|
||||
<el-table-column prop="Identification" :label="$t('audit:label:identification')" :show-overflow-tooltip="true" min-width="200px" />
|
||||
<!-- 操作类型 -->
|
||||
<el-table-column prop="OptTypeValueCN" :label="$t('audit:label:optType')" show-overflow-tooltip width="100px" />
|
||||
<!-- 对象类型 -->
|
||||
<el-table-column prop="ObjectTypeValueCN" :label="$t('audit:label:objectType')" show-overflow-tooltip min-width="100px" />
|
||||
<!-- 数据类型 -->
|
||||
<el-table-column prop="ChildrenTypeValueCN" :label="$t('audit:label:dataType')" show-overflow-tooltip min-width="100px" />
|
||||
<!-- 显示顺序 -->
|
||||
<el-table-column prop="Sort" :label="$t('audit:label:sort')" min-width="80" show-overflow-tooltip />
|
||||
<!-- 启用 -->
|
||||
<el-table-column :label="$t('audit:label:isEnable')" align="center" prop="CreateTime" min-width="80">
|
||||
<!-- 启用/禁用 -->
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsEnable" size="success">启用</el-tag>
|
||||
<el-tag v-else size="danger">禁用</el-tag>
|
||||
<!-- <el-tag v-if="scope.row.IsEnable" size="success">启用</el-tag>
|
||||
<el-tag v-else size="danger">禁用</el-tag> -->
|
||||
<el-tag :type="!scope.row.IsEnable ? 'info' : ''">
|
||||
{{ $fd('IsEnable', scope.row.IsEnable) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" min-width="340" class-name="small-padding fixed-width">
|
||||
<el-table-column :label="$t('common:action:action')" align="center" fixed="right" min-width="340" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- 上移 -->
|
||||
<el-button
|
||||
v-if="scope.row.ModuleTypeValueCN && scope.row.ObjectTypeValueCN && scope.row.OptTypeValueCN && scope.row.ChildrenTypeValueCN"
|
||||
type="text" @click="handleUpMove(scope.row)">上移</el-button>
|
||||
<el-button type="text" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
type="text" @click="handleUpMove(scope.row)"
|
||||
>
|
||||
{{ $t('audit:button:upward') }}
|
||||
</el-button>
|
||||
<!-- 修改 -->
|
||||
<el-button type="text" @click="handleUpdate(scope.row)">
|
||||
{{ $t('audit:button:modify') }}
|
||||
</el-button>
|
||||
<!-- 新增 -->
|
||||
<el-button
|
||||
v-if="!(scope.row.ModuleTypeValueCN && scope.row.ObjectTypeValueCN && scope.row.OptTypeValueCN && scope.row.ChildrenTypeValueCN)"
|
||||
type="text" @click="handleAdd(scope.row)">新增</el-button>
|
||||
type="text" @click="handleAdd(scope.row)">{{ $t('common:button:new') }}</el-button>
|
||||
<!-- Children -->
|
||||
<el-button
|
||||
v-if="scope.row.ModuleTypeValueCN && scope.row.ObjectTypeValueCN && scope.row.OptTypeValueCN && scope.row.ChildrenTypeValueCN"
|
||||
type="text" @click="handleChildren(scope.row)">Children</el-button>
|
||||
type="text" @click="handleChildren(scope.row)"
|
||||
>
|
||||
{{ $t('audit:button:children') }}
|
||||
</el-button>
|
||||
<!-- 复制到 -->
|
||||
<el-button
|
||||
v-if="scope.row.ModuleTypeValueCN && scope.row.ObjectTypeValueCN && scope.row.OptTypeValueCN && scope.row.ChildrenTypeValueCN"
|
||||
type="text" @click="handleCopy(scope.row)">复制到</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
||||
type="text" @click="handleCopy(scope.row)">
|
||||
{{ $t('audit:button:copyTo') }}
|
||||
</el-button>
|
||||
<!-- 删除 -->
|
||||
<el-button type="text" @click="handleDelete(scope.row)">{{ $t('common:button:delete') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item label="字典表名称:">
|
||||
<el-form-item :label="$t('dic:all:label:code')">
|
||||
<el-input v-model="searchData.Code" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典分组:">
|
||||
<el-select v-model="searchData.ConfigTypeId" placeholder="字典分组" clearable size="small">
|
||||
<el-form-item :label="$t('dic:all:label:group')">
|
||||
<el-select v-model="searchData.ConfigTypeId" clearable size="small">
|
||||
<el-option v-for="item of basicDicList" :key="item.Id" :value="item.Id" :label="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -29,7 +29,9 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto">
|
||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
@ -44,33 +46,33 @@
|
|||
<el-table-column type="index" width="60" />
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="字典表名称"
|
||||
:label="$t('dic:all:label:code')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ConfigType"
|
||||
label="字典分组"
|
||||
:label="$t('dic:all:label:group')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
:label="$t('dic:all:label:desc')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ShowOrder"
|
||||
label="显示顺序"
|
||||
:label="$t('dic:all:label:showOrder')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="是否可用" width="100" fixed="right">
|
||||
<el-table-column :label="$t('dic:all:label:isEnable')" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.IsEnable"
|
||||
|
|
@ -80,25 +82,25 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" fixed="right">
|
||||
<el-table-column :label="$t('common:action:action')" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
{{ $t('common:action:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleChild(scope.row)"
|
||||
>
|
||||
子项
|
||||
{{ $t('dic:all:label:childItem') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -174,7 +176,7 @@ export default {
|
|||
switchChange(event, item) {
|
||||
this.loading = true
|
||||
addOrUpdateBasicDic(item).then(res => {
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
|
@ -182,12 +184,12 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', row)
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:action:edit'), row)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', { DataTypeEnum: 3 })
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:button:new'), { DataTypeEnum: 3 })
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
|
|
@ -4,32 +4,39 @@
|
|||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form" />
|
||||
<span style="margin-left:auto">
|
||||
<el-button type="primary" size="mini" @click="handleAdd">新建</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleAdd">{{ $t('common:button:new') }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 45 }" :data="list" stripe size="small" height="100"
|
||||
@sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column v-if="!~$route.path.indexOf('select')" prop="Code" label="字典键值" min-width="180"
|
||||
<!-- 字典键值 -->
|
||||
<el-table-column v-if="!~$route.path.indexOf('select')" prop="Code" :label="$t('dic:all:label:keyCode')" min-width="180"
|
||||
show-overflow-tooltip sortable='custom' />
|
||||
<el-table-column prop="ValueCN" label="中文值" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<el-table-column prop="Value" label="英文值" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<el-table-column prop="ChildGroup" label="分组" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<el-table-column prop="ShowOrder" label="显示顺序" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<el-table-column prop="Description" label="描述" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<el-table-column label="是否可用" width="100" fixed="right">
|
||||
<!-- 中文值 -->
|
||||
<el-table-column prop="ValueCN" :label="$t('dic:all:label:valueCN')" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<!-- 英文值 -->
|
||||
<el-table-column prop="Value" :label="$t('dic:all:label:valueEN')" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<!-- 分组 -->
|
||||
<el-table-column prop="ChildGroup" :label="$t('dic:all:label:childGroup')" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<!-- 显示顺序 -->
|
||||
<el-table-column prop="ShowOrder" :label="$t('dic:all:label:showOrder')" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<!-- 描述 -->
|
||||
<el-table-column prop="Description" :label="$t('dic:all:label:desc')" min-width="180" show-overflow-tooltip sortable='custom' />
|
||||
<!-- 是否可用 -->
|
||||
<el-table-column :label="$t('dic:all:label:isEnable')" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.IsEnable" :active-value="true" :inactive-value="false"
|
||||
@change="(event) => { return switchChange(event, scope.row) }" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<el-table-column :label="$t('common:action:action')" width="150" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
编辑
|
||||
{{ $t('common:action:edit') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -101,7 +108,7 @@ export default {
|
|||
switchChange(event, item) {
|
||||
this.loading = true
|
||||
addOrUpdateBasicDic(item).then(res => {
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
|
@ -109,12 +116,12 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryChildAddOrUpdateForm'].openDialog('DictionaryChild Edit', row, { DataTypeEnum: this.parent.DataTypeEnum })
|
||||
this.$refs['DictionaryChildAddOrUpdateForm'].openDialog(this.$t('common:action:edit'), row, { DataTypeEnum: this.parent.DataTypeEnum })
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryChildAddOrUpdateForm'].openDialog('DictionaryChild Add', {}, { ConfigTypeId: this.parent.ConfigTypeId, parentId: this.parent.Id, DataTypeEnum: this.parent.DataTypeEnum })
|
||||
this.$refs['DictionaryChildAddOrUpdateForm'].openDialog(this.$t('common:button:new'), {}, { ConfigTypeId: this.parent.ConfigTypeId, parentId: this.parent.Id, DataTypeEnum: this.parent.DataTypeEnum })
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
|
|
@ -8,25 +8,25 @@
|
|||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="Enum Value: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:keyCode')" prop="Code">
|
||||
<el-input v-model="form.Code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Value: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:valueCN')" prop="Code">
|
||||
<el-input v-model="form.ValueCN" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Value EN: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:valueEN')" prop="Code">
|
||||
<el-input v-model="form.Value" />
|
||||
</el-form-item>
|
||||
<el-form-item label="ChildGroup: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:childGroup')" prop="Code">
|
||||
<el-input v-model="form.ChildGroup" />
|
||||
</el-form-item>
|
||||
<el-form-item label="ShowOrder: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:showOrder')" prop="Code">
|
||||
<el-input-number v-model="form.ShowOrder" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Description: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:desc')" prop="Code">
|
||||
<el-input v-model="form.Description" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Is Enable: ">
|
||||
<el-form-item :label="$t('dic:all:label:isEnable')">
|
||||
<el-switch
|
||||
v-model="form.IsEnable"
|
||||
:active-value="true"
|
||||
|
|
@ -36,8 +36,12 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">Cancel</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
|
|
@ -90,7 +94,7 @@ export default {
|
|||
this.btnLoading = true
|
||||
addOrUpdateBasicDic(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="ConfigTypeId: " prop="Code">
|
||||
<!-- 字典分组 -->
|
||||
<el-form-item :label="$t('dic:all:label:group')" prop="Code">
|
||||
<el-select v-model="form.ConfigTypeId" filterable style="width:100%;">
|
||||
<el-option
|
||||
v-for="(item,index) of basicDicList"
|
||||
|
|
@ -18,7 +19,8 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="TypeEnum: " prop="DataTypeEnum">
|
||||
<!-- 类型 -->
|
||||
<el-form-item :label="$t('dic:all:label:dataType')" prop="DataTypeEnum">
|
||||
<el-select v-model="form.DataTypeEnum" filterable style="width:100%;">
|
||||
<el-option
|
||||
:label="`config`"
|
||||
|
|
@ -38,16 +40,19 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Code: " prop="Code">
|
||||
<!-- 字典表名称 -->
|
||||
<el-form-item :label="$t('dic:all:label:code')" prop="Code">
|
||||
<el-input v-model="form.Code" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="KeyName: " prop="Code">-->
|
||||
<!--<el-input v-model="form.KeyName" />-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="ShowOrder: " prop="Code">
|
||||
<!-- 显示顺序 -->
|
||||
<el-form-item :label="$t('dic:all:label:showOrder')" prop="Code">
|
||||
<el-input-number v-model="form.ShowOrder" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Description: " prop="Code">
|
||||
<!-- 描述 -->
|
||||
<el-form-item :label="$t('dic:all:label:desc')" prop="Code">
|
||||
<el-input v-model="form.Description" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Value: " prop="Code">
|
||||
|
|
@ -56,7 +61,8 @@
|
|||
<el-form-item label="ValueCN: " prop="Code">
|
||||
<el-input v-model="form.ValueCN" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="Is Enable: ">
|
||||
<!-- 是否启用 -->
|
||||
<el-form-item :label="$t('dic:all:label:isEnable')">
|
||||
<el-switch
|
||||
v-model="form.IsEnable"
|
||||
:active-value="true"
|
||||
|
|
@ -66,8 +72,12 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">Cancel</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
|
|
@ -103,8 +113,8 @@ export default {
|
|||
btnLoading: false,
|
||||
form: formDataDefault(),
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
DataTypeEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
Code: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
|
||||
DataTypeEnum: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
|
||||
},
|
||||
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true }
|
||||
}
|
||||
|
|
@ -132,7 +142,7 @@ export default {
|
|||
this.btnLoading = true
|
||||
addOrUpdateBasicDic(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item label="字典表名称:">
|
||||
<el-form-item :label="$t('dic:all:label:code')">
|
||||
<el-input v-model="searchData.Code" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典分组:">
|
||||
<el-select v-model="searchData.ConfigTypeId" placeholder="字典分组" clearable size="small">
|
||||
<el-form-item :label="$t('dic:all:label:group')">
|
||||
<el-select v-model="searchData.ConfigTypeId" clearable size="small">
|
||||
<el-option v-for="item of basicDicList" :key="item.Id" :value="item.Id" :label="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -29,7 +29,9 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto">
|
||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
@ -44,33 +46,33 @@
|
|||
<el-table-column type="index" width="60" />
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="字典表名称"
|
||||
:label="$t('dic:all:label:code')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ConfigType"
|
||||
label="字典分组"
|
||||
:label="$t('dic:all:label:group')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
:label="$t('dic:all:label:desc')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ShowOrder"
|
||||
label="显示顺序"
|
||||
:label="$t('dic:all:label:showOrder')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="是否可用" width="100" fixed="right">
|
||||
<el-table-column :label="$t('dic:all:label:isEnable')" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.IsEnable"
|
||||
|
|
@ -80,25 +82,25 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" fixed="right">
|
||||
<el-table-column :label="$t('common:action:action')" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
{{ $t('common:action:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleChild(scope.row)"
|
||||
>
|
||||
子项
|
||||
{{ $t('dic:all:label:childItem') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -174,7 +176,7 @@ export default {
|
|||
switchChange(event, item) {
|
||||
this.loading = true
|
||||
addOrUpdateBasicDic(item).then(res => {
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
|
@ -182,12 +184,12 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', row)
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:action:edit'), row)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', { DataTypeEnum: 2 })
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:button:new'), { DataTypeEnum: 2 })
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,24 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="activeTab" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部" name="/dictionary/newDictionary/list">
|
||||
<!-- 全部 -->
|
||||
<el-tab-pane :label="$t('dic:label:all')" name="/dictionary/newDictionary/list">
|
||||
<dictList v-if="activeTab == '/dictionary/newDictionary/list'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="下拉框字典" name="/dictionary/newDictionary/select">
|
||||
<!-- 下拉框字典 -->
|
||||
<el-tab-pane :label="$t('dic:label:select')" name="/dictionary/newDictionary/select">
|
||||
<dictSelect v-if="activeTab == '/dictionary/newDictionary/select'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="枚举字典" name="/dictionary/newDictionary/enum">
|
||||
<!-- 枚举字典 -->
|
||||
<el-tab-pane :label="$t('dic:label:enum')" name="/dictionary/newDictionary/enum">
|
||||
<dictEnum v-if="activeTab == '/dictionary/newDictionary/enum'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="布尔字典" name="/dictionary/newDictionary/bool">
|
||||
<!-- 布尔字典 -->
|
||||
<el-tab-pane :label="$t('dic:label:bool')" name="/dictionary/newDictionary/bool">
|
||||
<dictBool v-if="activeTab == '/dictionary/newDictionary/bool'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="字典类型配置" name="/dictionary/newDictionary/config">
|
||||
<!-- 字典类型配置 -->
|
||||
<el-tab-pane :label="$t('dic:label:config')" name="/dictionary/newDictionary/config">
|
||||
<dictConfig v-if="activeTab == '/dictionary/newDictionary/config'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="ConfigTypeId: " prop="Code">
|
||||
<!-- 字典分组 -->
|
||||
<el-form-item :label="$t('dic:all:label:group')" prop="Code">
|
||||
<el-select v-model="form.ConfigTypeId" filterable style="width:100%;">
|
||||
<el-option
|
||||
v-for="(item,index) of basicDicList"
|
||||
|
|
@ -18,7 +19,8 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="DataTypeEnum: " prop="DataTypeEnum">
|
||||
<!-- 类型 -->
|
||||
<el-form-item :label="$t('dic:all:label:dataType')" prop="DataTypeEnum">
|
||||
<el-select v-model="form.DataTypeEnum" filterable style="width:100%;">
|
||||
<el-option
|
||||
:label="`config`"
|
||||
|
|
@ -38,16 +40,19 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Code: " prop="Code">
|
||||
<!-- 字典表名称 -->
|
||||
<el-form-item :label="$t('dic:all:label:code')" prop="Code">
|
||||
<el-input v-model="form.Code" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="KeyName: " prop="Code">-->
|
||||
<!--<el-input v-model="form.KeyName" />-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="ShowOrder: " prop="Code">
|
||||
<!-- 显示顺序 -->
|
||||
<el-form-item :label="$t('dic:all:label:showOrder')" prop="Code">
|
||||
<el-input-number v-model="form.ShowOrder" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Description: " prop="Code">
|
||||
<!-- 描述 -->
|
||||
<el-form-item :label="$t('dic:all:label:desc')" prop="Code">
|
||||
<el-input v-model="form.Description" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Value: " prop="Code">
|
||||
|
|
@ -56,7 +61,8 @@
|
|||
<el-form-item label="ValueCN: " prop="Code">
|
||||
<el-input v-model="form.ValueCN" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="Is Enable: ">
|
||||
<!-- 是否启用 -->
|
||||
<el-form-item :label="$t('dic:all:label:isEnable')">
|
||||
<el-switch
|
||||
v-model="form.IsEnable"
|
||||
:active-value="true"
|
||||
|
|
@ -66,8 +72,12 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">Cancel</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
|
|
@ -103,8 +113,8 @@ export default {
|
|||
btnLoading: false,
|
||||
form: formDataDefault(),
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
DataTypeEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
Code: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
|
||||
DataTypeEnum: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
|
||||
},
|
||||
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true }
|
||||
}
|
||||
|
|
@ -130,7 +140,7 @@ export default {
|
|||
this.btnLoading = true
|
||||
addOrUpdateBasicDic(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
|
|
|
|||
|
|
@ -3,15 +3,18 @@
|
|||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item label="字典表名称:">
|
||||
<!-- 字典表名称 -->
|
||||
<el-form-item :label="$t('dic:all:label:code')">
|
||||
<el-input v-model="searchData.Code" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典分组:">
|
||||
<el-select v-model="searchData.ConfigTypeId" placeholder="字典分组" clearable size="small">
|
||||
<!-- 字典分组 -->
|
||||
<el-form-item :label="$t('dic:all:label:group')">
|
||||
<el-select v-model="searchData.ConfigTypeId" clearable size="small">
|
||||
<el-option v-for="item of basicDicList" :key="item.Id" :value="item.Id" :label="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:">
|
||||
<!-- 关键字 -->
|
||||
<el-form-item :label="$t('dic:all:label:keyWord')">
|
||||
<el-input v-model="searchData.KeyInfo" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -32,8 +35,14 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto">
|
||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
||||
<el-button type="primary" @click="handleBatchAdd">批量新建</el-button>
|
||||
<!-- 新建 -->
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
<!-- 批量新建 -->
|
||||
<el-button type="primary" @click="handleBatchAdd">
|
||||
{{ $t('common:button:batchNew') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
@ -46,16 +55,18 @@
|
|||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="60" />
|
||||
<!-- 字典表名称 -->
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="字典表名称"
|
||||
:label="$t('dic:all:label:code')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- 类型 -->
|
||||
<el-table-column
|
||||
prop="DataTypeEnum"
|
||||
label="类型"
|
||||
:label="$t('dic:all:label:dataType')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
|
|
@ -64,28 +75,32 @@
|
|||
{{ DataTypeEnumList[scope.row.DataTypeEnum] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 字典分组 -->
|
||||
<el-table-column
|
||||
prop="ConfigType"
|
||||
label="字典分组"
|
||||
:label="$t('dic:all:label:group')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- 描述 -->
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
:label="$t('dic:all:label:desc')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- 显示顺序 -->
|
||||
<el-table-column
|
||||
prop="ShowOrder"
|
||||
label="显示顺序"
|
||||
:label="$t('dic:all:label:showOrder')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="是否可用" width="100" fixed="right">
|
||||
<!-- 是否可用 -->
|
||||
<el-table-column :label="$t('dic:all:label:isEnable')" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.IsEnable"
|
||||
|
|
@ -95,25 +110,28 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" fixed="right">
|
||||
<el-table-column :label="$t('common:action:action')" width="300" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- 编辑 -->
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
{{ $t('common:action:edit') }}
|
||||
</el-button>
|
||||
<!-- 子项 -->
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleChild(scope.row)"
|
||||
>
|
||||
子项
|
||||
{{ $t('dic:all:label:childItem') }}
|
||||
</el-button>
|
||||
<!-- 删除 -->
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -201,17 +219,17 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', row)
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:action:edit'), row)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', {})
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:button:new'), {})
|
||||
})
|
||||
},
|
||||
handleBatchAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['batchAddForm'].openDialog('批量新建', {})
|
||||
this.$refs['batchAddForm'].openDialog(this.$t('common:button:batchNew'), {})
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item label="字典表名称:">
|
||||
<el-form-item :label="$t('dic:all:label:code')">
|
||||
<el-input v-model="searchData.Code" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典分组:">
|
||||
<el-select v-model="searchData.ConfigTypeId" placeholder="字典分组" clearable size="small">
|
||||
<el-form-item :label="$t('dic:all:label:group')">
|
||||
<el-select v-model="searchData.ConfigTypeId" clearable size="small">
|
||||
<el-option v-for="item of basicDicList" :key="item.Id" :value="item.Id" :label="item.Code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -29,8 +29,13 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto">
|
||||
<el-button type="primary" @click="handleSetting">配置字典分组</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
||||
<!-- 配置字典分组 -->
|
||||
<el-button type="primary" @click="handleSetting">
|
||||
{{ $t('dic:select:button:setting') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
@ -45,33 +50,33 @@
|
|||
<el-table-column type="index" width="60" />
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="字典表名称"
|
||||
:label="$t('dic:all:label:code')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ConfigType"
|
||||
label="字典分组"
|
||||
:label="$t('dic:all:label:group')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
:label="$t('dic:all:label:desc')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ShowOrder"
|
||||
label="显示顺序"
|
||||
:label="$t('dic:all:label:showOrder')"
|
||||
sortable="custom"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="是否可用" width="100" fixed="right">
|
||||
<el-table-column :label="$t('dic:all:label:isEnable')" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.IsEnable"
|
||||
|
|
@ -81,25 +86,25 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" fixed="right">
|
||||
<el-table-column :label="$t('common:action:action')" width="300" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
{{ $t('common:action:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleChild(scope.row)"
|
||||
>
|
||||
子项
|
||||
{{ $t('dic:all:label:childItem') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -175,7 +180,7 @@ export default {
|
|||
switchChange(event, item) {
|
||||
this.loading = true
|
||||
addOrUpdateBasicDic(item).then(res => {
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
|
@ -183,12 +188,12 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', row)
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:action:edit'), row)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', { DataTypeEnum: 1 })
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:button:new'), { DataTypeEnum: 1 })
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
label-width="150px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="Dictionary Type: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:group')"" prop="Code">
|
||||
<el-input v-model="form.Code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Description: " prop="Code">
|
||||
<el-form-item :label="$t('dic:all:label:desc')">
|
||||
<el-input v-model="form.Description" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Is Enable: ">
|
||||
<el-form-item :label="$t('dic:all:label:isEnable')">
|
||||
<el-switch
|
||||
v-model="form.IsEnable"
|
||||
:active-value="true"
|
||||
|
|
@ -24,8 +24,12 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">Cancel</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
</template>
|
||||
|
|
@ -52,7 +56,7 @@ export default {
|
|||
btnLoading: false,
|
||||
form: formDataDefault(),
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
Code: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
|
||||
},
|
||||
model_cfg: { visible: false, showClose: true, width: '600px', title: '' }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item label="Code:">
|
||||
<el-form-item :label="$t('dic:all:label:group')">
|
||||
<el-input v-model="searchData.Code" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="KeyName:">
|
||||
<el-form-item :label="$t('dic:all:label:keyWord')">
|
||||
<el-input v-model="searchData.KeyName" clearable style="width:120px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -27,7 +27,9 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto">
|
||||
<el-button type="primary" @click="handleAdd">New</el-button>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
@ -41,15 +43,15 @@
|
|||
<el-table-column type="index" width="60" />
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="Dictionary Type"
|
||||
:label="$t('dic:all:label:group')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="Description"
|
||||
:label="$t('dic:all:label:desc')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="Is Enable" width="100" fixed="right">
|
||||
<el-table-column :label="$t('dic:all:label:isEnable')" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.IsEnable"
|
||||
|
|
@ -59,19 +61,19 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Action" width="200" fixed="right">
|
||||
<el-table-column :label="$t('common:action:action')" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
{{ $t('common:action:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -115,7 +117,7 @@ export default {
|
|||
switchChange(event, item) {
|
||||
this.loading = true
|
||||
addOrUpdateBasicDic(item).then(res => {
|
||||
this.$message.success('Saved successfully!')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
|
@ -123,12 +125,12 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', row)
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:action:edit'), row)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog('DictionaryTypeConfig', {})
|
||||
this.$refs['DictionaryTypeConfigForm'].openDialog(this.$t('common:button:new'), {})
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue