|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="search-title">业务过程</div>
|
|
|
+ <div class="search-title">{{ title }}</div>
|
|
|
<div class="search-view">
|
|
|
- <a-table :columns="columns" :data-source="data" :scroll="{ x:'1500', y: 500 }"
|
|
|
+ <a-table :columns="columns" :data-source="data" :scroll="{ x:'1500', y: 300 }"
|
|
|
:pagination="false" @resizeColumn="handleResizeColumn"
|
|
|
bordered>
|
|
|
</a-table>
|
|
@@ -12,48 +12,35 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import {defineComponent, ref} from 'vue';
|
|
|
-import {get} from "@/api/common";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'list-view',
|
|
|
components: {},
|
|
|
props: {
|
|
|
kid: String,
|
|
|
+ indexSetting: Object,
|
|
|
+ fieldCode: String,
|
|
|
+ data: []
|
|
|
},
|
|
|
setup(props) {
|
|
|
console.log(props);
|
|
|
|
|
|
- const data = ref([]);
|
|
|
+ const data = props.data;
|
|
|
+ const curIndex = props.indexSetting?.fieldList.filter(it => it.fieldCode == props.fieldCode)[0];
|
|
|
+ if (curIndex == null) {
|
|
|
+ console.log("查找不到对应子索引");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const fieldData = curIndex.childFields;
|
|
|
+ console.log(fieldData);
|
|
|
|
|
|
- const columns = ref([
|
|
|
- {title: '开始时间', dataIndex: 'start_time', key: 'start_time', resizable: true, width: 120},
|
|
|
- {title: '结束时间', dataIndex: 'end_time', key: 'end_time', resizable: true, width: 120},
|
|
|
- {title: '施工简述', dataIndex: 'constr_description', key: 'constr_description', resizable: true, width: 120},
|
|
|
- {title: '备注', dataIndex: 'remarks', key: 'remarks', resizable: true, width: 120},
|
|
|
- {
|
|
|
- title: '生产井段',
|
|
|
- dataIndex: 'well_production_sections',
|
|
|
- key: 'well_production_sections',
|
|
|
- resizable: true,
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {title: '层位', dataIndex: 'formation_name', key: 'formation_name', resizable: true, width: 120},
|
|
|
- {title: '井段顶深', dataIndex: 'top_md', key: 'top_md', resizable: true, width: 120},
|
|
|
- {title: '井段底深', dataIndex: 'btm_md', key: 'btm_md', resizable: true, width: 120},
|
|
|
- {title: '厚度', dataIndex: 'thickness', key: 'thickness', resizable: true, width: 120},
|
|
|
- {title: '层序号', dataIndex: 'layer_no', key: 'layer_no', resizable: true, width: 120},
|
|
|
- {title: '作业类型', dataIndex: 'working_type', key: 'working_type', resizable: true, width: 120},
|
|
|
- {title: '作业工序名称', dataIndex: 'test_processes_name', key: 'test_processes_name', resizable: true, width: 120},
|
|
|
- {title: '作业工作内容', dataIndex: 'worksummary', key: 'worksummary', resizable: true, width: 120},
|
|
|
- {title: '施工次序', dataIndex: 'construct_no', key: 'construct_no', resizable: true, width: 120},
|
|
|
- {title: '作业队伍', dataIndex: 'work_team', key: 'work_team', resizable: true, width: 120},
|
|
|
- {title: '泵深', dataIndex: 'pump_depth', key: 'pump_depth', resizable: true, width: 120},
|
|
|
- ])
|
|
|
- get('esindex/getList', {page: 1, rows: 10}).then(result => {
|
|
|
- data.value = result.list;
|
|
|
+ const title = curIndex.fieldName;
|
|
|
+ const columns:any = ref([]);
|
|
|
+ fieldData.filter(it=>it.isDisplay==1).forEach(it=>{
|
|
|
+ columns.value.push({title: it.fieldName, dataIndex: it.fieldCode, key: it.fieldCode, resizable: true, width: 120},)
|
|
|
})
|
|
|
return {
|
|
|
- columns, data,
|
|
|
+ columns, data, title,
|
|
|
handleResizeColumn: (w, col) => {
|
|
|
col.width = w;
|
|
|
}
|