|
@@ -95,14 +95,18 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import relationTable from "@/components/Generator/components/RelationTable/index.vue";
|
|
|
-import { dyOptionsList } from '@/components/Generator/generator/comConfig'
|
|
|
-import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
-import { previewDataInterface } from '@/api/systemData/dataInterface'
|
|
|
-import { deteleChildrenModel, deteleModel, getChildrenBrowserData, getChildrenConfigData, NewAddModel, NewupdateModel } from '@/api/onlineDev/visualDev'
|
|
|
+import {dyOptionsList} from '@/components/Generator/generator/comConfig'
|
|
|
+import {
|
|
|
+ deteleChildrenModel,
|
|
|
+ getChildrenBrowserData,
|
|
|
+ getChildrenConfigData,
|
|
|
+ NewupdateModel
|
|
|
+} from '@/api/onlineDev/visualDev'
|
|
|
import {deepClone, numberChinese} from '@/utils'
|
|
|
import moment from 'moment/moment'
|
|
|
-import { getAPIData, getTabelAPIData } from '@/components/Dataset-filter/util'
|
|
|
+import {getAPIData, getTabelAPIData} from '@/components/Dataset-filter/util'
|
|
|
import {dictDetail} from "@/api/newbi/dict";
|
|
|
+
|
|
|
export default {
|
|
|
name: 'input-table',
|
|
|
components: {relationTable},
|
|
@@ -566,6 +570,10 @@ export default {
|
|
|
additionalType.propsUrl = t.__config__.propsUrl
|
|
|
additionalType.apiProps = t.__config__.apiProps
|
|
|
}
|
|
|
+ if (t.__config__.jnpfKey === 'date'){
|
|
|
+ additionalType.defaultDay = t.defaultDay
|
|
|
+ additionalType.editChange = t.editChange
|
|
|
+ }
|
|
|
let res = {
|
|
|
tag: t.__config__.tag,
|
|
|
formId: t.__config__.formId,
|
|
@@ -585,6 +593,13 @@ export default {
|
|
|
res.value = val ? val[relationColumn.primaryId] : null
|
|
|
}
|
|
|
}
|
|
|
+ //默认当前时间
|
|
|
+ if (t.__config__.jnpfKey === 'date' && res.defaultDay) {
|
|
|
+ //添加默认时间 当前没有值时添加数据 允许编辑时更新 重新赋值
|
|
|
+ if (!res.value || res.editChange) {
|
|
|
+ res.value = moment().valueOf()
|
|
|
+ }
|
|
|
+ }
|
|
|
// if (t.tag === 'el-upload') this.$set(res, 'value', t.defaultValue)
|
|
|
return res
|
|
|
})
|