12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- export default {
- data() {
- return {
- customFormItems: [
- {
- itemIndex: 0,
- replaceNum: 1,
- prop: 'range',
- inputType: 'select',
- placeholder: '统计范围',
- requiredWarning: '请先选择统计范围',
- options: [
- {
- value: '全部',
- label: '全部'
- },
- {
- value: '航线',
- label: '航线'
- },
- {
- value: '基地分公司',
- label: '基地分公司'
- },
- {
- value: '航站',
- label: '航站'
- }
- ],
- changeHandler(value) {
- this.setInOrOutOptions(value)
- const rangeMap = {
- 航线: 'airline',
- 基地分公司: 'area',
- 航站: 'airport'
- }
- Object.entries(rangeMap).forEach(([k, v]) => {
- const theItem = this.formItems.find(item => item.prop === v)
- if (value === k) {
- theItem && (theItem.disabled = false)
- } else {
- this.formData[v] = ''
- theItem && (theItem.disabled = true)
- }
- })
- }
- },
- {
- itemIndex: 7,
- replaceNum: 1
- }
- ]
- }
- }
- }
|