Compare commits

..

No commits in common. "b22374db9ef9c13720c97de851ba66c37bc6afc6" and "0f9963d939fb8787a77524cf3518e81b8bc92ff4" have entirely different histories.

2 changed files with 212 additions and 79 deletions

View File

@ -1,41 +1,85 @@
<template> <template>
<base-model :config="config"> <base-model :config="config">
<div slot="dialog-body"> <div slot="dialog-body">
<el-form ref="fileForm" :model="form" label-width="100px" size="small" :rules="rules"> <el-form
ref="fileForm"
:model="form"
label-width="100px"
size="small"
:rules="rules"
>
<div class="base-dialog-body"> <div class="base-dialog-body">
<el-form-item :label="$t('dictionary:file:form:name')" prop="Name"> <el-form-item :label="$t('dictionary:file:form:name')" prop="Name">
<el-input v-model="form.Name" /> <el-input v-model="form.Name" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:form:nameCN')" prop="NameCN"> <el-form-item
:label="$t('dictionary:file:form:nameCN')"
prop="NameCN"
>
<el-input v-model="form.NameCN" /> <el-input v-model="form.NameCN" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:browser:form:ArchiveTypeEnum')" prop="ArchiveTypeEnum"> <el-form-item
<el-select v-model="form.ArchiveTypeEnum" clearable placeholder="" style="width: 100%"> :label="$t('dictionary:browser:form:ArchiveTypeEnum')"
<el-option v-for="item in $d.ArchiveType" :key="item.id" :label="item.label" :value="item.value"> prop="ArchiveTypeEnum"
>
<el-select
v-model="form.ArchiveTypeEnum"
clearable
placeholder=""
style="width: 100%"
>
<el-option
v-for="item in $d.ArchiveType"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:browser:form:SubIdentificationEnum')" prop="SubIdentificationEnum"> <el-form-item
<el-select style="width: 100%" v-model="form.SubIdentificationEnum" clearable placeholder=""> :label="$t('dictionary:browser:form:SubIdentificationEnum')"
<el-option v-for="item in $d.SubIdentification" :key="item.id" :label="item.label" :value="item.value"> prop="SubIdentificationEnum"
>
<el-select
style="width: 100%"
v-model="form.SubIdentificationEnum"
clearable
placeholder=""
>
<el-option
v-for="item in $d.SubIdentification"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:browser:form:SysTemplateTypeEnum')" prop="SysTemplateTypeEnum"> <el-form-item
<el-select style="width: 100%" v-model="form.SysTemplateTypeEnum" clearable placeholder=""> :label="$t('dictionary:file:form:ShowOrder')"
<el-option v-for="item in $d.SysTemplateType" :key="item.id" :label="item.label" :value="item.value"> prop="ShowOrder"
</el-option> >
</el-select> <el-input-number
</el-form-item> v-model="form.ShowOrder"
<el-form-item :label="$t('dictionary:file:form:ShowOrder')" prop="ShowOrder"> :step="1"
<el-input-number v-model="form.ShowOrder" :step="1" step-strictly></el-input-number> step-strictly
></el-input-number>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:form:IsEnable')"> <el-form-item :label="$t('dictionary:file:form:IsEnable')">
<el-switch v-model="form.IsEnable" :active-value="true" :inactive-value="false"> <el-switch
v-model="form.IsEnable"
:active-value="true"
:inactive-value="false"
>
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:form:IsConfirmRecord')"> <el-form-item :label="$t('dictionary:file:form:IsConfirmRecord')">
<el-switch v-model="form.IsConfirmRecord" :active-value="true" :inactive-value="false"> <el-switch
v-model="form.IsConfirmRecord"
:active-value="true"
:inactive-value="false"
>
</el-switch> </el-switch>
</el-form-item> </el-form-item>
</div> </div>
@ -82,7 +126,6 @@ export default {
NameCN: null, NameCN: null,
SubIdentificationEnum: null, SubIdentificationEnum: null,
ShowOrder: 0, ShowOrder: 0,
SysTemplateTypeEnum: null
}, },
rules: { rules: {
Name: [ Name: [
@ -106,13 +149,6 @@ export default {
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, },
], ],
SysTemplateTypeEnum: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: ['blur', 'change'],
},
],
ArchiveTypeEnum: [ ArchiveTypeEnum: [
{ {
required: true, required: true,

View File

@ -11,41 +11,85 @@
<el-input v-model="searchData.NameCN" style="width: 100px" /> <el-input v-model="searchData.NameCN" style="width: 100px" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:search:archiveTypeEnum')"> <el-form-item :label="$t('dictionary:file:search:archiveTypeEnum')">
<el-select v-model="searchData.ArchiveTypeEnum" clearable placeholder="" style="width: 100px"> <el-select
<el-option v-for="item in $d.ArchiveType" :key="item.id" :label="item.label" :value="item.value"> v-model="searchData.ArchiveTypeEnum"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.ArchiveType"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:search:subIdentificationEnum')"> <el-form-item
<el-select v-model="searchData.SubIdentificationEnum" clearable placeholder="" style="width: 100px"> :label="$t('dictionary:file:search:subIdentificationEnum')"
<el-option v-for="item in $d.SubIdentification" :key="item.id" :label="item.label" :value="item.value"> >
</el-option> <el-select
</el-select> v-model="searchData.SubIdentificationEnum"
</el-form-item> clearable
<el-form-item :label="$t('dictionary:file:search:SysTemplateTypeEnum')"> placeholder=""
<el-select v-model="searchData.SysTemplateTypeEnum" clearable placeholder="" style="width: 100px"> style="width: 100px"
<el-option v-for="item in $d.SysTemplateType" :key="item.id" :label="item.label" :value="item.value"> >
<el-option
v-for="item in $d.SubIdentification"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:search:isEnable')"> <el-form-item :label="$t('dictionary:file:search:isEnable')">
<el-select v-model="searchData.IsEnable" clearable placeholder="" style="width: 100px"> <el-select
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value"> v-model="searchData.IsEnable"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:file:search:isConfirmRecord')"> <el-form-item :label="$t('dictionary:file:search:isConfirmRecord')">
<el-select v-model="searchData.IsConfirmRecord" clearable placeholder="" style="width: 100px"> <el-select
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value"> v-model="searchData.IsConfirmRecord"
clearable
placeholder=""
style="width: 100px"
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button
type="primary"
icon="el-icon-search"
@click="handleSearch"
>
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset"> <el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -57,60 +101,106 @@
</span> </span>
</div> </div>
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 45 }" :data="list" stripe height="100" <el-table
style="width: 100%" @sort-change="handleSortByColumn"> v-loading="loading"
v-adaptive="{ bottomOffset: 45 }"
:data="list"
stripe
height="100"
style="width: 100%"
@sort-change="handleSortByColumn"
>
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column prop="Name" :label="$t('dictionary:file:table:Name')" sortable="custom" show-overflow-tooltip <el-table-column
min-width="150px" /> prop="Name"
<el-table-column prop="NameCN" :label="$t('dictionary:file:table:NameCN')" show-overflow-tooltip :label="$t('dictionary:file:table:Name')"
sortable="custom" min-width="150px" /> sortable="custom"
<el-table-column prop="ArchiveTypeEnum" :label="$t('dictionary:file:table:archiveTypeEnum')" show-overflow-tooltip
show-overflow-tooltip sortable="custom" min-width="120px"> />
<el-table-column
prop="NameCN"
:label="$t('dictionary:file:table:NameCN')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="ArchiveTypeEnum"
:label="$t('dictionary:file:table:archiveTypeEnum')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ArchiveType', scope.row.ArchiveTypeEnum) }} {{ $fd('ArchiveType', scope.row.ArchiveTypeEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="SubIdentificationEnum" :label="$t('dictionary:file:table:subIdentificationEnum')" <el-table-column
show-overflow-tooltip sortable="custom" min-width="120px"> prop="SubIdentificationEnum"
:label="$t('dictionary:file:table:subIdentificationEnum')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('SubIdentification', scope.row.SubIdentificationEnum) }} {{ $fd('SubIdentification', scope.row.SubIdentificationEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="SysTemplateTypeEnum" :label="$t('dictionary:file:table:SysTemplateTypeEnum')" <el-table-column
show-overflow-tooltip sortable="custom"> prop="ShowOrder"
<template slot-scope="scope"> :label="$t('dictionary:file:table:ShowOrder')"
{{ $fd('SysTemplateType', scope.row.SysTemplateTypeEnum) }} show-overflow-tooltip
</template> sortable="custom"
</el-table-column> />
<el-table-column prop="ShowOrder" :label="$t('dictionary:file:table:ShowOrder')" show-overflow-tooltip <el-table-column
sortable="custom" /> :label="$t('dictionary:file:table:IsEnable')"
<el-table-column :label="$t('dictionary:file:table:IsEnable')" prop="IsEnable" show-overflow-tooltip prop="IsEnable"
sortable="custom" min-width="120px"> show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="!scope.row.IsEnable ? 'info' : ''"> <el-tag :type="!scope.row.IsEnable ? 'info' : ''">
{{ $fd('YesOrNo', scope.row.IsEnable) }} {{ $fd('YesOrNo', scope.row.IsEnable) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('dictionary:file:table:isConfirmRecord')" prop="IsConfirmRecord" <el-table-column
show-overflow-tooltip sortable="custom" min-width="150px"> :label="$t('dictionary:file:table:isConfirmRecord')"
prop="IsConfirmRecord"
show-overflow-tooltip
sortable="custom"
width="200"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="!scope.row.IsEnable ? 'info' : ''"> <el-tag :type="!scope.row.IsEnable ? 'info' : ''">
{{ $fd('YesOrNo', scope.row.IsConfirmRecord) }} {{ $fd('YesOrNo', scope.row.IsConfirmRecord) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="CreateTime" :label="$t('dictionary:file:table:createTime')" show-overflow-tooltip <el-table-column
sortable="custom" min-width="180px" /> prop="CreateTime"
<el-table-column prop="UpdateTime" :label="$t('dictionary:file:table:updateTime')" show-overflow-tooltip :label="$t('dictionary:file:table:createTime')"
sortable="custom" min-width="180px" /> show-overflow-tooltip
<el-table-column :label="$t('dictionary:file:table:action')" width="200" fixed="right"> sortable="custom"
/>
<el-table-column
prop="UpdateTime"
:label="$t('dictionary:file:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('dictionary:file:table:action')"
width="200"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.row)"> <el-button type="text" @click="handleEdit(scope.row)">
{{ $t('dictionary:file:button:edit') }} {{ $t('dictionary:file:button:edit') }}
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-if="hasPermi(['dictionary:template:file:del'])"> <el-button
type="text"
@click="handleDelete(scope.row)"
v-if="hasPermi(['dictionary:template:file:del'])"
>
{{ $t('dictionary:file:button:delete') }} {{ $t('dictionary:file:button:delete') }}
</el-button> </el-button>
</template> </template>
@ -118,9 +208,20 @@
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" <pagination
@pagination="getList" /> class="page"
<File-form :config="config" :data="rowData" v-if="config.visible" @close="close" @getList="getList" /> :total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<File-form
:config="config"
:data="rowData"
v-if="config.visible"
@close="close"
@getList="getList"
/>
</box-content> </box-content>
</BoxContent> </BoxContent>
</template> </template>
@ -137,7 +238,6 @@ const searchDataDefault = () => {
Name: null, Name: null,
NameCN: null, NameCN: null,
SubIdentificationEnum: null, SubIdentificationEnum: null,
SysTemplateTypeEnum: null,
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
asc: false, asc: false,
@ -244,7 +344,4 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box-body .search .base-search-form .el-form-item {
margin-bottom: 10px;
}
</style> </style>