提交 424c94b8 编写于 作者: Mosher's avatar Mosher

update:调整

1、表格值规则错误调整
2、UIservice发布主状态逻辑调整
3、增加ant-design-vue配置组件,为后续国际化提供支持
4、日期选择器组件默认调整为中文
上级 c065ff2c
<script setup lang="ts">
import { ref } from 'vue';
import { App } from './app';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import enUS from 'ant-design-vue/es/locale/en_US';
const locale = ref('');
onMounted(()=>{
(window as any).App = App.getInstance();
// 设置国际化
locale.value = 'zh-cn';
})
</script>
<template>
<router-view />
<a-config-provider :locale="locale === 'zh-cn' ? zhCN : enUS">
<router-view />
</a-config-provider>
</template>
<style>
......
<script setup lang="ts">
import { IActionParam } from '@core';
// import dayjs from 'ant-design-vue/lib/time-picker/dayjs';
import { computed, Ref } from 'vue';
import dayjs, { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
interface DatePickerProps {
/**
* checked选中状态
......@@ -80,6 +80,11 @@ const onChange = (date: string, dateString: string) => {
data: dateString,
});
};
onMounted(() => {
// 设置国际化
dayjs.locale('zh-cn');
})
</script>
<template>
......
......@@ -399,6 +399,10 @@ export class GridControl extends MDControl {
const { mdCtrlPaging, mdCtrlGroup, columnsModel } = this.state;
const { gridAgg } = toRefs(this.state);
let { aggMode, aggData } = gridAgg.value;
// 先置空再添加,避免重复
if (aggData && aggData.length > 0) {
aggData.splice(0, aggData.length);
}
const { enableGroup } = mdCtrlGroup;
if (!Object.is(aggMode, "NONE")) {
const { enablePagingBar, current, pageSize } = mdCtrlPaging;
......
......@@ -2,7 +2,4 @@
.ant-form-item-label {
width: 130px;
}
.ant-form-item-explain-success {
color: red;
}
}
\ No newline at end of file
......@@ -44,19 +44,13 @@ export class {{pascalCase appEntity.codeName}}UIServiceBase extends UIServiceBas
this.allDeMainStateMap.set('{{mainState.mSTag}}', '{{mainState.mSTag}}');
{{/each}}
// 主状态操作标识Map
{{#each appEntity.allPSDEMainStates as | mainState |}}
this.allDeMainStateOPPrivsMap.set('{{mainState.mSTag}}', Object.assign({
{{~#each appEntity.allPSDEOPPrivs as | deOPPriv |~}}
'${deOPPriv.name}':{{#if deOPPriv.isOPPrivAllowMode}}1{{else}}0{{/if}}{{#unless @last}},{{/unless}}
{{~/each~}}
},
{
{{~#each mainState.pSDEMainStateOPPrivs as | deMainStateOPPriv |~}}
'${deMainStateOPPriv.name}':{{#if deMainStateOPPriv.isOPPrivAllowMode}}1{{else}}0{{/if}}{{#unless @last}},{{/unless}}
{{~/each~}}
}));
{{/each}}
{{/if}}
{{#each appEntity.allPSDEMainStates as | mainState |}}
this.allDeMainStateOPPrivsMap.set(
'{{mainState.mSTag}}',
Object.assign({ {{#each appEntity.allPSDEOPPrivs as | deOPPriv |}}'{{deOPPriv.name}}':{{#if deOPPriv.oPPrivAllowMode}}1{{else}}0{{/if}}{{#unless @last}},{{/unless}}{{/each}} }, { {{#each mainState.pSDEMainStateOPPrivs as | deMainStateOPPriv |}}'{{deMainStateOPPriv.name}}':{{#if deMainStateOPPriv.oPPrivAllowMode}}1{{else}}0{{/if}}{{#unless @last}},{{/unless}}{{/each}} })
);
{{/each}}
{{/if}}
}
{{!-- 遍历界面行为 --}}
......
......@@ -212,11 +212,10 @@ export const ctrlState = {
{{> @macro/front-end/common/derules.hbs item=ruleItem.psDEFValueRule.getPSDEFVRGroupCondition}}
);
if (!isPast) {
callback(new Error(infoMessage || '{{ruleItem.psDEFValueRule.ruleInfo}}'));
return Promise.reject(infoMessage || '{{ruleItem.psDEFValueRule.ruleInfo}}');
}
return Promise.resolve();
},
trigger: ['change', 'blur']
}
}
{{/eq}}
{{/each}}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册