|
@@ -82,7 +82,7 @@
|
|
|
<script>
|
|
|
import PublicPageForm from '@/components/publicPageForm'
|
|
|
import { Query } from "@/api/webApi"
|
|
|
-
|
|
|
+import { parseTime } from '@/utils'
|
|
|
export default {
|
|
|
name: 'SimpleQuery',
|
|
|
props: {
|
|
@@ -221,12 +221,18 @@ export default {
|
|
|
const formItemCopy = _.cloneDeep(formItem)
|
|
|
const results = []
|
|
|
const resultsKey = []
|
|
|
- formItemCopy.map(({ dropdownlist, datatype, pagecode, defaultparameters }) => {
|
|
|
+ formItemCopy.map(({ dropdownlist, datatype, pagecode, defaultparameters, defaultvalue }) => {
|
|
|
if (((datatype == 'select' || datatype == 'SELECT') && (dropdownlist || dropdownlist == 0) && dropdownlist != "")) {
|
|
|
const datacontent = defaultparameters ? { filter: this.formatDefault(defaultparameters) } : { filter: { 1: 1 } }
|
|
|
results.push(Query({ serviceid: dropdownlist, datacontent, event: '0', page: 1, size: 9999 }))
|
|
|
resultsKey.push(pagecode)
|
|
|
}
|
|
|
+ if (defaultvalue) {
|
|
|
+ this.tableForm[pagecode] = defaultvalue
|
|
|
+ }
|
|
|
+ if (datatype == 'date' || datatype == 'DATE') {
|
|
|
+ this.tableForm[pagecode] = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
+ }
|
|
|
})
|
|
|
if (results?.length) {
|
|
|
this.getAnscyData(resultsKey, results, formItemCopy)
|