| | |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import { Card } from 'ant-design-vue'; |
| | | import { getEntity } from '/@/api/tigerapi/system'; |
| | | import { isNullOrEmpty } from '/@/utils/is'; |
| | | import { isNullOrEmpty, isNullOrUnDef, isTimeViaRegExp8601 } from '/@/utils/is'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { isFunction } from 'xe-utils'; |
| | | import { dateUtil } from '/@/utils/dateUtil'; |
| | | |
| | | const { t } = useI18n(); |
| | | const props = defineProps({ |
| | |
| | | order: '', |
| | | }).then((res) => { |
| | | if (!isNullOrEmpty(res.Data.Items)) { |
| | | /* 循环字段名,判断如果是时间的就转换成dayjs格式,否则时间选择器会出错 */ |
| | | const Keys = Object.getOwnPropertyNames(res.Data.Items); |
| | | for (const k in Keys) { |
| | | if (!isNullOrUnDef(res.Data.Items[Keys[k]]) && isTimeViaRegExp8601(res.Data.Items[Keys[k]])) { |
| | | res.Data.Items[Keys[k]] = dateUtil(res.Data.Items[Keys[k]]); //转换成dayjs格式 |
| | | } |
| | | } |
| | | useFormData.value[_baseCards.value[0]['name']][1].setFieldsValue(res.Data.Items[0]); |
| | | } else { |
| | | useFormData.value[_baseCards.value[0]['name']][1].setFieldsValue({ |