优化,宽度保持一致

main
yangyuanshuai 9 months ago
parent 7130abef69
commit 349119b77c

@ -68,7 +68,10 @@ const formSchema = reactive<FormSchema[]>([
label: '规则周期', label: '规则周期',
component: 'Select', component: 'Select',
componentProps:{ componentProps:{
options: RULE_CYCLE_LIST options: RULE_CYCLE_LIST,
style: {
width: '100%'
}
} }
}, },
{ {
@ -76,7 +79,10 @@ const formSchema = reactive<FormSchema[]>([
label: '是否有效', label: '是否有效',
component: 'Select', component: 'Select',
componentProps:{ componentProps:{
options: RULE_IS_VALID_LIST options: RULE_IS_VALID_LIST,
style: {
width: '100%'
}
} }
}, },
{ {
@ -99,6 +105,7 @@ const rules = reactive({
failDate:[required()], failDate:[required()],
ruleCycle:[required()], ruleCycle:[required()],
ruleStatus:[required()], ruleStatus:[required()],
dscode:[required()],
}) })
const { formRegister, formMethods } = useForm() const { formRegister, formMethods } = useForm()

@ -28,6 +28,7 @@ import RepSetRuleWrite from '@/views/dataset/RepSetRule/components/Write.vue'
import { RULE_TYPE_LIST } from '@/views/IndexProcess/constants' import { RULE_TYPE_LIST } from '@/views/IndexProcess/constants'
import { getIndexType } from '@/api/dataset/RepIndexSet' import { getIndexType } from '@/api/dataset/RepIndexSet'
import { transfDictList } from '@/utils'; import { transfDictList } from '@/utils';
import { Alignment } from 'element-plus/es/components/table-v2/src/constants'
const route = useRoute(); const route = useRoute();
const pageQuery = ref(route || null); const pageQuery = ref(route || null);

@ -3,9 +3,10 @@ import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm' import { useForm } from '@/hooks/web/useForm'
import { PropType, reactive, watch } from 'vue' import { PropType, reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator' import { useValidator } from '@/hooks/web/useValidator'
import { getIndexSetTreeApi, getIndexType } from '@/api/dataset/RepIndexSet'; import { getIndexType } from '@/api/dataset/RepIndexSet';
import { transfDictList } from '@/utils'; import { transfDictList } from '@/utils';
import { getIndexCategoryTreeApi } from '@/api/dataset/IndexCategory'; import { getIndexCategoryTreeApi } from '@/api/dataset/IndexCategory';
import { ITEM_STATUS_LIST } from '../constants';
const { required } = useValidator() const { required } = useValidator()
@ -40,7 +41,7 @@ const formSchema = reactive<FormSchema[]>([
}, },
{ {
field: 'code', field: 'code',
label: '科目编码', label: '指标代码',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
@ -66,7 +67,7 @@ const formSchema = reactive<FormSchema[]>([
}, },
{ {
field: 'itemName', field: 'itemName',
label: '科目名称', label: '指标名称',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
@ -88,7 +89,10 @@ const formSchema = reactive<FormSchema[]>([
return transfDictList(res.body.result); return transfDictList(res.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps:{
style:{width:'100%'}
}
}, },
{ {
field: 'isOrgCollect', field: 'isOrgCollect',
@ -104,8 +108,10 @@ const formSchema = reactive<FormSchema[]>([
label: '状态', label: '状态',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:ITEM_STATUS_LIST,
style:{width:'100%'},
}, },
value:'1'
}, },
{ {
field: 'conCode', field: 'conCode',
@ -118,7 +124,6 @@ const formSchema = reactive<FormSchema[]>([
{ {
field: 'itemType1', field: 'itemType1',
label: '业务类型1', label: '业务类型1',
colProps: { span: 100 },
componentProps: { componentProps: {
checkStrictly: true, checkStrictly: true,
nodeKey: 'id', nodeKey: 'id',
@ -126,8 +131,9 @@ const formSchema = reactive<FormSchema[]>([
filterable: true, filterable: true,
collapseTags: true, collapseTags: true,
showCheckbox: true, showCheckbox: true,
style: { minWidth: '200px' }, style: { width:'100%' },
checkOnClickNode: true checkOnClickNode: true,
}, },
component: 'TreeSelect', component: 'TreeSelect',
optionApi: async () => { optionApi: async () => {
@ -139,7 +145,6 @@ const formSchema = reactive<FormSchema[]>([
{ {
field: 'itemType2', field: 'itemType2',
label: '业务类型2', label: '业务类型2',
colProps: { span: 100 },
componentProps: { componentProps: {
checkStrictly: true, checkStrictly: true,
nodeKey: 'id', nodeKey: 'id',
@ -147,7 +152,7 @@ const formSchema = reactive<FormSchema[]>([
filterable: true, filterable: true,
collapseTags: true, collapseTags: true,
showCheckbox: true, showCheckbox: true,
style: { minWidth: '200px' }, style: { width:'100%' },
checkOnClickNode: true checkOnClickNode: true
}, },
component: 'TreeSelect', component: 'TreeSelect',
@ -160,7 +165,6 @@ const formSchema = reactive<FormSchema[]>([
{ {
field: 'itemType3', field: 'itemType3',
label: '业务类型3', label: '业务类型3',
colProps: { span: 100 },
componentProps: { componentProps: {
checkStrictly: true, checkStrictly: true,
nodeKey: 'id', nodeKey: 'id',
@ -168,7 +172,7 @@ const formSchema = reactive<FormSchema[]>([
filterable: true, filterable: true,
collapseTags: true, collapseTags: true,
showCheckbox: true, showCheckbox: true,
style: { minWidth: '200px' }, style: { width:'100%' },
checkOnClickNode: true checkOnClickNode: true
}, },
component: 'TreeSelect', component: 'TreeSelect',
@ -181,7 +185,6 @@ const formSchema = reactive<FormSchema[]>([
{ {
field: 'itemType4', field: 'itemType4',
label: '业务类型4', label: '业务类型4',
colProps: { span: 100 },
componentProps: { componentProps: {
checkStrictly: true, checkStrictly: true,
nodeKey: 'id', nodeKey: 'id',
@ -189,7 +192,7 @@ const formSchema = reactive<FormSchema[]>([
filterable: true, filterable: true,
collapseTags: true, collapseTags: true,
showCheckbox: true, showCheckbox: true,
style: { minWidth: '200px' }, style:{width:'100%'},
checkOnClickNode: true checkOnClickNode: true
}, },
component: 'TreeSelect', component: 'TreeSelect',
@ -203,21 +206,22 @@ const formSchema = reactive<FormSchema[]>([
field: 'itemType5', field: 'itemType5',
label: '业务类型5', label: '业务类型5',
component: 'TreeSelect', component: 'TreeSelect',
colProps: { span: 100 },
componentProps: { componentProps: {
style:{width:'100%'}
}, }
}, },
{ {
field: 'indexType', field: 'indexType',
label: '指标类型', label: '指标类型',
colProps: { span: 100 },
optionApi: async () => { optionApi: async () => {
const indexType = await getIndexType({ paramName: 'indexType_param', systemCode: 'ordb' }); const indexType = await getIndexType({ paramName: 'indexType_param', systemCode: 'ordb' });
return transfDictList(indexType.body.result); return transfDictList(indexType.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps: {
style:{width:'100%'}
}
}, },
{ {
field: 'indexcalType', field: 'indexcalType',
@ -227,18 +231,23 @@ const formSchema = reactive<FormSchema[]>([
return transfDictList(indexCalType.body.result); return transfDictList(indexCalType.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps: {
style:{width:'100%'}
}
}, },
{ {
field: 'indexdataType', field: 'indexdataType',
label: '指标数据类型', label: '指标数据类型',
colProps: { span: 100 },
optionApi: async () => { optionApi: async () => {
const indexDataType = await getIndexType({ paramName: 'indexDataType_param', systemCode: 'ordb' }); const indexDataType = await getIndexType({ paramName: 'indexDataType_param', systemCode: 'ordb' });
return transfDictList(indexDataType.body.result); return transfDictList(indexDataType.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps: {
style:{width:'100%'}
}
}, },
{ {
field: 'indexdataPrecision', field: 'indexdataPrecision',
@ -248,7 +257,10 @@ const formSchema = reactive<FormSchema[]>([
return transfDictList(indexDataPrecision.body.result); return transfDictList(indexDataPrecision.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps: {
style:{width:'100%'}
}
}, },
{ {
field: 'indexdataUnit', field: 'indexdataUnit',
@ -258,7 +270,10 @@ const formSchema = reactive<FormSchema[]>([
return transfDictList(indexDataUnit.body.result); return transfDictList(indexDataUnit.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps: {
style:{width:'100%'}
}
} }
]) ])

@ -0,0 +1,11 @@
//指标定义状态列表
export const ITEM_STATUS_LIST = [
{
value:"1",
label:"启用"
},
{
value:"0",
label:"停用"
},
]

@ -3,6 +3,7 @@ import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm' import { useForm } from '@/hooks/web/useForm'
import { PropType, reactive, watch } from 'vue' import { PropType, reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator' import { useValidator } from '@/hooks/web/useValidator'
import { TARGET_STATUS_LIST } from '../constants';
const { required } = useValidator() const { required } = useValidator()
@ -36,48 +37,52 @@ const formSchema = reactive<FormSchema[]>([
}, },
{ {
field: 'targetCode', field: 'targetCode',
label: '编码', label: '指标属性编码',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
}, },
}, },
{ {
field: 'beginDate', field: 'targetName',
label: '开始日期', label: '指标属性名称',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
}, },
}, },
{ {
field: 'endDate', field: 'status',
label: '结束日期', label: '状态',
component: 'Input', component: 'Select',
componentProps: { componentProps: {
options:TARGET_STATUS_LIST,
style:{width:'100%'},
}, },
value:1
}, },
{ {
field: 'targetName', field: 'beginDate',
label: '栏名称', label: '开始日期',
component: 'Input', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYYMMDD',
style:{width:'100%'}
}, },
}, },
{ {
field: 'targetOrder', field: 'endDate',
label: '排序', label: '结束日期',
component: 'Input', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYYMMDD',
style:{width:'100%'}
}, },
}, },
{ {
field: 'status', field: 'targetOrder',
label: '状态', label: '排序',
component: 'Select', component: 'Input',
componentProps: { componentProps: {
}, },
@ -86,6 +91,7 @@ const formSchema = reactive<FormSchema[]>([
field: 'isOrgCollect', field: 'isOrgCollect',
label: '是否机构汇总', label: '是否机构汇总',
component: 'Select', component: 'Select',
hidden:true,
componentProps: { componentProps: {
}, },
@ -93,7 +99,11 @@ const formSchema = reactive<FormSchema[]>([
]) ])
const rules = reactive({ const rules = reactive({
indexsetCode: [required()],
targetCode: [required()],
targetName: [required()],
beginDate: [required()],
endDate: [required()],
}) })
const submit = async () => { const submit = async () => {

@ -0,0 +1,11 @@
//指标属性定义状态列表
export const TARGET_STATUS_LIST = [
{
value:1,
label:"启用"
},
{
value:0,
label:"停用"
},
]

@ -43,14 +43,16 @@ const formSchema = reactive<FormSchema[]>([
field: 'description', field: 'description',
label: '描述', label: '描述',
component: 'Input', component: 'Input',
colProps:{span:24},
componentProps: { componentProps: {
type: 'textarea',
}, },
}, },
{ {
field: 'organCode', field: 'organCode',
label: '用户所属机构', label: '用户所属机构',
component: 'Select', component: 'Select',
hidden:true,
componentProps: { componentProps: {
}, },
@ -59,6 +61,7 @@ const formSchema = reactive<FormSchema[]>([
field: 'createUser', field: 'createUser',
label: '登录用户', label: '登录用户',
component: 'Input', component: 'Input',
hidden:true,
componentProps: { componentProps: {
}, },
@ -67,6 +70,7 @@ const formSchema = reactive<FormSchema[]>([
field: 'createDate', field: 'createDate',
label: '创建日期', label: '创建日期',
component: 'DatePicker', component: 'DatePicker',
hidden:true,
componentProps: { componentProps: {
}, },
@ -75,6 +79,7 @@ const formSchema = reactive<FormSchema[]>([
const rules = reactive({ const rules = reactive({
modelCode: [required()], modelCode: [required()],
modelName: [required()],
}) })
const submit = async () => { const submit = async () => {

@ -36,29 +36,33 @@ const formSchema = reactive<FormSchema[]>([
}, },
}, },
{ {
field: 'beginDate', field: 'indexsetName',
label: '开始日期', label: '指标集名称',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
}, },
}, },
{ {
field: 'endDate', field: 'beginDate',
label: '结束日期', label: '开始日期',
component: 'Input', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYYMMDD',
style:{width:'100%'}
}, },
}, },
{ {
field: 'indexsetName', field: 'endDate',
label: '指标集名称', label: '结束日期',
component: 'Input', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYYMMDD',
style:{width:'100%'}
}, },
}, },
{ {
field: 'organCode', field: 'organCode',
label: '机构编码', label: '机构编码',
@ -76,7 +80,10 @@ const formSchema = reactive<FormSchema[]>([
return transfDictList(res.body.result); return transfDictList(res.body.result);
}, },
value: '1', value: '1',
component: 'Select' component: 'Select',
componentProps:{
style:{width:'100%'}
}
}, },
{ {
field: 'indexsetType', field: 'indexsetType',
@ -88,8 +95,8 @@ const formSchema = reactive<FormSchema[]>([
filterable: true, filterable: true,
// multiple: true, // multiple: true,
collapseTags: true, collapseTags: true,
// showCheckbox: true, showCheckbox: true,
style: { minWidth: '200px' }, style:{width:'100%'},
checkOnClickNode: true, checkOnClickNode: true,
}, },
component: 'TreeSelect', component: 'TreeSelect',
@ -129,15 +136,18 @@ const formSchema = reactive<FormSchema[]>([
label: '描述', label: '描述',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
}, },
}, },
]) ])
const rules = reactive({ const rules = reactive({
indexsetCode: [required()], indexsetCode: [required()],
indexsetName: [required()],
beginDate: [required()], beginDate: [required()],
endDate: [required()], endDate: [required()],
frequency: [required()],
indexsetType: [required()],
modelCode: [required()]
}) })
const submit = async () => { const submit = async () => {

@ -31,19 +31,29 @@ const formSchema = reactive<FormSchema[]>([
}, },
}, },
{ {
field: 'beginDate', field: 'ruleId',
label: '开始日期', label: '存储规则id',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
}, },
}, },
{
field: 'beginDate',
label: '开始日期',
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYYMMDD',
style:{width:'100%'}
},
},
{ {
field: 'endDate', field: 'endDate',
label: '结束日期', label: '结束日期',
component: 'Input', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYYMMDD',
style:{width:'100%'}
}, },
}, },
{ {
@ -59,7 +69,8 @@ const formSchema = reactive<FormSchema[]>([
label: '规则类型', label: '规则类型',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:RULE_TYPE_LIST options:RULE_TYPE_LIST,
style:{width:'100%'},
}, },
value:'1' value:'1'
}, },
@ -76,18 +87,11 @@ const formSchema = reactive<FormSchema[]>([
label: '操作类型', label: '操作类型',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:OPERATION_TYPE_LIST options:OPERATION_TYPE_LIST,
style:{width:'100%'},
}, },
value:'1' value:'1'
}, },
{
field: 'ruleId',
label: '存储规则id',
component: 'Input',
componentProps: {
},
},
{ {
field: 'schema', field: 'schema',
label: '数据库用户', label: '数据库用户',

@ -98,10 +98,12 @@ const formSchema = reactive<FormSchema[]>([
}, },
{ {
field: 'primarykey', field: 'primarykey',
label: '组成联合主键', label: '联合主键',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:WHETHER_UNITEDKEY_LIST options:WHETHER_UNITEDKEY_LIST,
style:{width:'100%'}
}, },
value:'0', value:'0',
formItemProps: { formItemProps: {
@ -121,6 +123,7 @@ const formSchema = reactive<FormSchema[]>([
label: '标识是否为uuid', label: '标识是否为uuid',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
style:{width:'100%'},
options:WHETHER_UUID_LIST options:WHETHER_UUID_LIST
}, },
value:'0', value:'0',

@ -1,7 +1,7 @@
export const WHETHER_UUID_LIST = [//标识是否是uuid0不是1是 export const WHETHER_UUID_LIST = [//标识是否是uuid0不是1是
{ {
value:"0", value:"0",
label:"不是" label:""
}, },
{ {
value:"1", value:"1",

@ -74,7 +74,7 @@ const formSchema = reactive<FormSchema[]>([
label: '参数类型', label: '参数类型',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
style:{width:'100%'}
}, },
} }
]) ])

@ -41,6 +41,9 @@ const formSchema = reactive<FormSchema[]>([
field: 'tCategory', field: 'tCategory',
label: '报告分类', label: '报告分类',
component: 'Select', component: 'Select',
componentProps:{
style:{width:'100%'}
},
optionApi: async () => { optionApi: async () => {
const res = await getCategory({ paramName: 'reportingType_param', systemCode: 'ordb' }); const res = await getCategory({ paramName: 'reportingType_param', systemCode: 'ordb' });
return transfDictList(res.body.result); return transfDictList(res.body.result);
@ -77,8 +80,11 @@ const formSchema = reactive<FormSchema[]>([
label: '报告状态', label: '报告状态',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:REPORTING_STATUS_LIST options:REPORTING_STATUS_LIST,
style:{width:'100%'}
}, },
value:'1', value:'1',
formItemProps: { formItemProps: {
rules: [required()], rules: [required()],

@ -62,7 +62,7 @@ const tableColumns = reactive<TableColumn[]>([
}, },
{ {
field: 'indexCode', field: 'indexCode',
label: '指标码' label: '指标码'
}, },
{ {
field: 'indexName', field: 'indexName',
@ -122,7 +122,7 @@ const searchSchema = reactive<FormSchema[]>([
}, },
{ {
field: 'indexCode', field: 'indexCode',
label: '指标码', label: '指标码',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input'
}, },

@ -50,7 +50,7 @@ const formSchema = reactive<FormSchema[]>([
}, },
{ {
field: 'indexCode', field: 'indexCode',
label: '指标码', label: '指标码',
component: 'Input', component: 'Input',
componentProps: { componentProps: {

Loading…
Cancel
Save