| | |
| | | import vciWebRefer from "@/components/refer/vciWebRefer.vue"; |
| | | import { formatMilliseconds } from "@/util/formatTime"; |
| | | import { validatenull } from "@/util/validate"; |
| | | import { getDicts } from "@/api/system/dict"; |
| | | |
| | | export default { |
| | | name: "basicForm", |
| | |
| | | datetime: "datetime", |
| | | date: "date", |
| | | refer: "refer", |
| | | multiFile:"upload" |
| | | } |
| | | }; |
| | | }, |
| | |
| | | this.option.group = group; |
| | | }, |
| | | initItem(item){ |
| | | const type=this.columnType[this.type] || this.type |
| | | const type=this.columnType[item.type] || item.type |
| | | const col= { |
| | | ...item, |
| | | label: item.text, |
| | | prop: item.field, |
| | | showProp:item.showField, |
| | | type: type, |
| | | labelWidth: this.labelWidth || (item.text.length >= 6 ? 115 : 90), |
| | | disabled: item.disabled || this.disabled, |
| | | disabled: item.readOnly || this.disabled, |
| | | span: item.span |
| | | ? item.span |
| | | : item.type === "textarea" |
| | |
| | | trigger: "blur" |
| | | }] |
| | | } |
| | | if (col.propType === "dict") { |
| | | if (col.type === "select") { |
| | | if(!validatenull(col.dictCode)) { |
| | | /*this.getDicts(col.dictCode).then((res) => { |
| | | if (res.success) { |
| | | const dic = res.obj.data; |
| | | /*getDicts(col.dictCode).then((res) => { |
| | | if (res.data.success){ |
| | | if(res.data.data && res.data.obj == null){ |
| | | res.data.obj = res.data.data |
| | | } |
| | | const dic = res.data.obj; |
| | | col.dicData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.code, |
| | | label: d.value, |
| | | key: d.key, |
| | | value: d.key, |
| | | attributes:d.attributes |
| | | }; |
| | | }); |
| | | } |