|
|
|
@ -18,28 +18,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
<h4 style="display: inline-block;">导出文件名:</h4>
|
|
|
|
<h4 style="display: inline-block;">导出文件名:</h4>
|
|
|
|
<el-input style="max-width: 220px;" size="small" v-model="fileName"></el-input>
|
|
|
|
<el-input style="max-width: 220px;" size="small" v-model="fileName"></el-input>
|
|
|
|
|
|
|
|
<el-button style="margin-left: 10px;" type="primary" size="small" icon="el-icon-download" @click="confirm">导出</el-button>
|
|
|
|
<h4>需要导出字段:</h4>
|
|
|
|
<h4>需要导出字段:</h4>
|
|
|
|
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
|
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
<el-checkbox-group v-model="selectedFields" @change="handleCheckedFieldsChange">
|
|
|
|
<el-checkbox-group v-model="selectedFields" @change="handleCheckedFieldsChange">
|
|
|
|
<el-checkbox v-for="field in config.fields" :label="field.name" :key="field.id">{{ field.label }}</el-checkbox>
|
|
|
|
<el-checkbox v-for="field in mainFields" :label="field.name" :key="field.id">{{ field.label }}</el-checkbox>
|
|
|
|
</el-checkbox-group>
|
|
|
|
</el-checkbox-group>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
<h4 style="color: var(--theme-color);">存在子表单</h4>
|
|
|
|
<el-button type="primary" :loading="loading" @click="confirm">确认</el-button>
|
|
|
|
<div v-for="field in relationsFields" :key="field.id" style="padding-left: 10px;">
|
|
|
|
</template>
|
|
|
|
<FieldExportItem :custom-model-id="field.sub_custom_model_id"></FieldExportItem>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</vxe-modal>
|
|
|
|
</vxe-modal>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import FieldExportItem from "./FieldExportItem.vue";
|
|
|
|
import {fieldConfig} from "@/api/flow"
|
|
|
|
import {fieldConfig} from "@/api/flow"
|
|
|
|
import {defaultModalSize} from "@/settings";
|
|
|
|
import {defaultModalSize} from "@/settings";
|
|
|
|
import {PopupManager} from "element-ui/lib/utils/popup";
|
|
|
|
import {PopupManager} from "element-ui/lib/utils/popup";
|
|
|
|
import {download} from "@/utils/downloadRequest"
|
|
|
|
import {download} from "@/utils/downloadRequest"
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
|
|
|
|
components: {
|
|
|
|
|
|
|
|
FieldExportItem
|
|
|
|
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
isShow: {
|
|
|
|
isShow: {
|
|
|
|
type: Boolean,
|
|
|
|
type: Boolean,
|
|
|
|
@ -62,10 +68,17 @@ export default {
|
|
|
|
fileName: `导出_${this.$moment().valueOf()}`,
|
|
|
|
fileName: `导出_${this.$moment().valueOf()}`,
|
|
|
|
selectedFields: [],
|
|
|
|
selectedFields: [],
|
|
|
|
checkAll: false,
|
|
|
|
checkAll: false,
|
|
|
|
isIndeterminate: false
|
|
|
|
isIndeterminate: false,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
mainFields() {
|
|
|
|
|
|
|
|
return this.config?.fields?.filter(i => i.type !== 'relation')
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
relationsFields() {
|
|
|
|
|
|
|
|
return this.config?.fields?.filter(i => i.type === 'relation')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
handleCheckedFieldsChange(value) {
|
|
|
|
handleCheckedFieldsChange(value) {
|
|
|
|
let checkedCount = value.length;
|
|
|
|
let checkedCount = value.length;
|
|
|
|
@ -136,7 +149,7 @@ export default {
|
|
|
|
export_fields[key] = this.config?.fields?.find(j => j.name === key)?.label
|
|
|
|
export_fields[key] = this.config?.fields?.find(j => j.name === key)?.label
|
|
|
|
})
|
|
|
|
})
|
|
|
|
await download('/api/oa/flow/list-groups', 'get', {
|
|
|
|
await download('/api/oa/flow/list-groups', 'get', {
|
|
|
|
...this.select,
|
|
|
|
custom_model_id: this.select.custom_model_id,
|
|
|
|
type: this.$route.params.type,
|
|
|
|
type: this.$route.params.type,
|
|
|
|
is_export: 1,
|
|
|
|
is_export: 1,
|
|
|
|
export_name: this.fileName,
|
|
|
|
export_name: this.fileName,
|
|
|
|
@ -154,8 +167,10 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"select.custom_model_id"(newVal) {
|
|
|
|
"select.custom_model_id"(newVal) {
|
|
|
|
|
|
|
|
if(newVal) {
|
|
|
|
this.getFields(newVal)
|
|
|
|
this.getFields(newVal)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|