fix(项目设置): 模版管理添加字段页面过滤类型i18n
--bug=1013777 --user=李玉号 【项目设置】模版管理 添加字段部分问题需要优化 https://www.tapd.cn/55049933/s/1174581
This commit is contained in:
parent
144de4b950
commit
c393e7154f
|
@ -8,7 +8,7 @@
|
|||
ref="msEditDialog">
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData"
|
||||
<ms-table-header :condition.sync="condition" @search="search"
|
||||
:show-create="false"/>
|
||||
</template>
|
||||
|
||||
|
@ -100,7 +100,11 @@ import MsTableColumn from "@/business/components/common/components/table/MsTable
|
|||
import {CUSTOM_FIELD_LIST} from "@/common/js/default-table-header";
|
||||
import MsTableButton from "@/business/components/common/components/MsTableButton";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import {CUSTOM_FIELD_TYPE_OPTION, FIELD_TYPE_MAP, SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
import {
|
||||
CUSTOM_FIELD_TYPE_FILTERS,
|
||||
FIELD_TYPE_MAP,
|
||||
SYSTEM_FIELD_NAME_MAP
|
||||
} from "@/common/js/table-constants";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsEditDialog from "@/business/components/common/components/MsEditDialog";
|
||||
|
||||
|
@ -131,7 +135,7 @@ export default {
|
|||
return CUSTOM_FIELD_LIST;
|
||||
},
|
||||
fieldFilters() {
|
||||
return CUSTOM_FIELD_TYPE_OPTION;
|
||||
return CUSTOM_FIELD_TYPE_FILTERS(this);
|
||||
},
|
||||
fieldTypeMap() {
|
||||
return FIELD_TYPE_MAP;
|
||||
|
@ -141,6 +145,12 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
if (!(this.condition.name.trim())) {
|
||||
this.currentPage = 1;
|
||||
}
|
||||
this.initTableData();
|
||||
},
|
||||
initTableData() {
|
||||
this.condition.projectId = getCurrentProjectID();
|
||||
this.condition.templateId = this.templateId;
|
||||
|
|
|
@ -19,6 +19,25 @@ export const CUSTOM_FIELD_TYPE_OPTION = [
|
|||
{value: 'multipleInput',text: 'workspace.custom_filed.multipleInput'}
|
||||
];
|
||||
|
||||
export function CUSTOM_FIELD_TYPE_FILTERS(_this) {
|
||||
return [
|
||||
{value: 'input', text: _this.$t('workspace.custom_filed.input')},
|
||||
{value: 'textarea', text: _this.$t('workspace.custom_filed.textarea')},
|
||||
{value: 'select', text: _this.$t('workspace.custom_filed.select')},
|
||||
{value: 'multipleSelect', text: _this.$t('workspace.custom_filed.multipleSelect')},
|
||||
{value: 'radio', text: _this.$t('workspace.custom_filed.radio')},
|
||||
{value: 'checkbox', text: _this.$t('workspace.custom_filed.checkbox')},
|
||||
{value: 'member', text: _this.$t('workspace.custom_filed.member')},
|
||||
{value: 'multipleMember', text: _this.$t('workspace.custom_filed.multipleMember')},
|
||||
{value: 'date', text: _this.$t('workspace.custom_filed.date')},
|
||||
{value: 'datetime', text: _this.$t('workspace.custom_filed.datetime')},
|
||||
{value: 'richText', text: _this.$t('workspace.custom_filed.richText')},
|
||||
{value: 'int', text: _this.$t('workspace.custom_filed.int')},
|
||||
{value: 'float', text: _this.$t('workspace.custom_filed.float')},
|
||||
{value: 'multipleInput', text: _this.$t('workspace.custom_filed.multipleInput')}
|
||||
];
|
||||
}
|
||||
|
||||
export const UI_ELEMENT_LOCATION_TYPE_OPTION = [
|
||||
{value: 'id', text: 'id'},
|
||||
{value: 'name', text: 'name'},
|
||||
|
|
Loading…
Reference in New Issue