|
@@ -91,7 +91,7 @@
|
|
multiple
|
|
multiple
|
|
tree-line
|
|
tree-line
|
|
:tree-data="subjectTrees.organizationTree"
|
|
:tree-data="subjectTrees.organizationTree"
|
|
- tree-node-filter-prop="label" >
|
|
|
|
|
|
+ tree-node-filter-prop="label">
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -106,7 +106,7 @@
|
|
multiple
|
|
multiple
|
|
tree-line
|
|
tree-line
|
|
:tree-data="subjectTrees.constructUnitTree"
|
|
:tree-data="subjectTrees.constructUnitTree"
|
|
- tree-node-filter-prop="label" >
|
|
|
|
|
|
+ tree-node-filter-prop="label">
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -300,7 +300,7 @@
|
|
<a-list-item v-if="item.file_name.indexOf(docKey)>-1||docKey==''">
|
|
<a-list-item v-if="item.file_name.indexOf(docKey)>-1||docKey==''">
|
|
<template #actions>
|
|
<template #actions>
|
|
<filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
|
|
<filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
|
|
- <a-button type="link" @click="downFile(item)" functioncode="T010502" danger>下载</a-button>
|
|
|
|
|
|
+ <a-button type="link" @click="downFile(item)" functioncode="T010501" danger>下载</a-button>
|
|
</template>
|
|
</template>
|
|
<a-list-item-meta
|
|
<a-list-item-meta
|
|
:description="item.file_business_type">
|
|
:description="item.file_business_type">
|
|
@@ -323,9 +323,9 @@
|
|
import {ref, defineComponent, computed, watch} from 'vue';
|
|
import {ref, defineComponent, computed, watch} from 'vue';
|
|
import type {FormInstance} from 'ant-design-vue';
|
|
import type {FormInstance} from 'ant-design-vue';
|
|
import {useRoute} from 'vue-router';
|
|
import {useRoute} from 'vue-router';
|
|
-import { get,postData} from "@/api/common";
|
|
|
|
|
|
+import {get, postData} from "@/api/common";
|
|
import {getPaginationTotalTitle} from "@/utils/common";
|
|
import {getPaginationTotalTitle} from "@/utils/common";
|
|
-import { message } from 'ant-design-vue';
|
|
|
|
|
|
+import {message} from 'ant-design-vue';
|
|
import type {TableProps} from "ant-design-vue";
|
|
import type {TableProps} from "ant-design-vue";
|
|
import {useTabsViewStore} from "@/store/modules/tabsView";
|
|
import {useTabsViewStore} from "@/store/modules/tabsView";
|
|
import ChartCell from '@/components/basic/chart/chart-cell.vue'
|
|
import ChartCell from '@/components/basic/chart/chart-cell.vue'
|
|
@@ -355,8 +355,8 @@ export default defineComponent({
|
|
const tabsViewStore = useTabsViewStore();
|
|
const tabsViewStore = useTabsViewStore();
|
|
const docKey = ref('');
|
|
const docKey = ref('');
|
|
const docList = ref([]);
|
|
const docList = ref([]);
|
|
- const wellTypeList = ref([{label: "直井", value: "直井"}, {label: "定向井", value: "定向井"}, {label: "分支井",value: "分支井"}]);
|
|
|
|
- const wellPurposeList = ref([{label: "探井", value: "探井"}, {label: "开发井", value: "开发井"}, {label: "水井",value: "水井"}]);
|
|
|
|
|
|
+ const wellTypeList = ref([{label: "直井", value: "直井"}, {label: "定向井", value: "定向井"}, {label: "分支井", value: "分支井"}]);
|
|
|
|
+ const wellPurposeList = ref([{label: "探井", value: "探井"}, {label: "开发井", value: "开发井"}, {label: "水井", value: "水井"}]);
|
|
const replaceFields = {
|
|
const replaceFields = {
|
|
children: 'children',
|
|
children: 'children',
|
|
title: 'label',
|
|
title: 'label',
|
|
@@ -364,14 +364,14 @@ export default defineComponent({
|
|
};
|
|
};
|
|
|
|
|
|
const downFile = (record: any) => {
|
|
const downFile = (record: any) => {
|
|
- download(record.file_business_type, record.file_name);
|
|
|
|
|
|
+ download(record.storage_path, record.file_name);
|
|
};
|
|
};
|
|
const resetFields = function () {
|
|
const resetFields = function () {
|
|
let keys: string[] = Object.keys(formState);
|
|
let keys: string[] = Object.keys(formState);
|
|
keys.forEach(key => {
|
|
keys.forEach(key => {
|
|
if (typeof (formState[key]) == "string") {
|
|
if (typeof (formState[key]) == "string") {
|
|
formState[key] = '';
|
|
formState[key] = '';
|
|
- }else if(typeof (formState[key]) == "object"){
|
|
|
|
|
|
+ } else if (typeof (formState[key]) == "object") {
|
|
formState[key] = [];
|
|
formState[key] = [];
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -379,33 +379,59 @@ export default defineComponent({
|
|
|
|
|
|
filterColumns.value = [...columns];
|
|
filterColumns.value = [...columns];
|
|
|
|
|
|
- watch(
|
|
|
|
- () => showColumnType.value,
|
|
|
|
- () => {
|
|
|
|
- const filterValue = columns.filter((item: any) => {
|
|
|
|
- if (!showColumnType.value.includes("oil")) {
|
|
|
|
- if (["oil_prod_mon", "oil_prod_year", "oil"].includes(item.dataIndex)) {
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ function showColumnTypeChange() {
|
|
|
|
+ const filterValue = columns.filter((item: any) => {
|
|
|
|
+ if (!showColumnType.value.includes("oil")) {
|
|
|
|
+ if (["oil_prod_mon", "oil_prod_year", "oil"].includes(item.dataIndex)) {
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
- if (!showColumnType.value.includes("gas")) {
|
|
|
|
- if (["gas_prod_mon", "gas_prod_year", "gas"].includes(item.dataIndex)) {
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!showColumnType.value.includes("gas")) {
|
|
|
|
+ if (["gas_prod_mon", "gas_prod_year", "gas"].includes(item.dataIndex)) {
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
- if (!showColumnType.value.includes("water")) {
|
|
|
|
- if (["water_prod_mon", "water_prod_year", "water"].includes(item.dataIndex)) {
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!showColumnType.value.includes("water")) {
|
|
|
|
+ if (["water_prod_mon", "water_prod_year", "water"].includes(item.dataIndex)) {
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
- return true
|
|
|
|
|
|
+ }
|
|
|
|
+ return true
|
|
|
|
+ })
|
|
|
|
+ //拖拽后在显示隐藏列则需要按拖拽后的列排序
|
|
|
|
+ const sortedArray = filterValue.sort((a, b) => {
|
|
|
|
+ const indexA = filterColumns.value.findIndex(f=>f.key==a.key);
|
|
|
|
+ const indexB = filterColumns.value.findIndex(f=>f.key==b.key);
|
|
|
|
+ return (indexA==-1||indexB==-1)?1: indexA - indexB;
|
|
|
|
+ });
|
|
|
|
+ filterColumns.value = [...sortedArray];
|
|
|
|
+ setSettingColoumns();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function getSettingColoumns() {
|
|
|
|
+ let userColumnsJson = localStorage.getItem('userColumns');
|
|
|
|
+ let userShowColumnsType = localStorage.getItem('userShowColumnsType');
|
|
|
|
+ if (userColumnsJson != undefined) {
|
|
|
|
+ let array = new Array();
|
|
|
|
+ let userColumns = JSON.parse(userColumnsJson);
|
|
|
|
+ userColumns.forEach(it => {
|
|
|
|
+ array.push(columns.find(c => c.key == it.key));
|
|
})
|
|
})
|
|
- filterColumns.value = [...filterValue];
|
|
|
|
|
|
+ filterColumns.value = array;
|
|
|
|
+ }
|
|
|
|
+ if (userShowColumnsType != undefined) {
|
|
|
|
+ showColumnType.value = JSON.parse(userShowColumnsType);
|
|
}
|
|
}
|
|
- );
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function setSettingColoumns() {
|
|
|
|
+ localStorage.setItem("userShowColumnsType", JSON.stringify(showColumnType.value));
|
|
|
|
+ localStorage.setItem("userColumns", JSON.stringify(filterColumns.value));
|
|
|
|
+ }
|
|
|
|
|
|
const preCheckValues = ref(Object.assign(showColumnType.value));
|
|
const preCheckValues = ref(Object.assign(showColumnType.value));
|
|
const onCheckboxChange = (checkValues: []) => {
|
|
const onCheckboxChange = (checkValues: []) => {
|
|
|
|
+ showColumnTypeChange();
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
let tbody = document.getElementsByClassName("ant-table-body")[0];
|
|
let tbody = document.getElementsByClassName("ant-table-body")[0];
|
|
if (tbody) {
|
|
if (tbody) {
|
|
@@ -443,7 +469,7 @@ export default defineComponent({
|
|
|
|
|
|
const loadData = async function () {
|
|
const loadData = async function () {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
- const result: any = await postData('wellInfo/getList',formState);
|
|
|
|
|
|
+ const result: any = await postData('wellInfo/getList', formState);
|
|
|
|
|
|
data.value = result.list;
|
|
data.value = result.list;
|
|
formState.total = result.total;
|
|
formState.total = result.total;
|
|
@@ -521,7 +547,7 @@ export default defineComponent({
|
|
})
|
|
})
|
|
.filter((item, i, self) => item && self.indexOf(item) === i);
|
|
.filter((item, i, self) => item && self.indexOf(item) === i);
|
|
|
|
|
|
- if (expanded.length==0) {
|
|
|
|
|
|
+ if (expanded.length == 0) {
|
|
message.warning('没有查询到相关目录');
|
|
message.warning('没有查询到相关目录');
|
|
}
|
|
}
|
|
subjectTrees.value.expandedKeys = expanded as string[];
|
|
subjectTrees.value.expandedKeys = expanded as string[];
|
|
@@ -580,7 +606,7 @@ export default defineComponent({
|
|
|
|
|
|
return {
|
|
return {
|
|
route, selectedRowKeys, loading, activeTab, showTree, onSelectChange, data,
|
|
route, selectedRowKeys, loading, activeTab, showTree, onSelectChange, data,
|
|
- expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList,wellPurposeList, replaceFields,
|
|
|
|
|
|
+ expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList, wellPurposeList, replaceFields,
|
|
formRef, viewModel, handleTableChange, detail,
|
|
formRef, viewModel, handleTableChange, detail,
|
|
formState, isShowDoc, showDoc, docKey, docList, resetFields, showColumnType, filterColumns,
|
|
formState, isShowDoc, showDoc, docKey, docList, resetFields, showColumnType, filterColumns,
|
|
labelCol, getTdColor, downFile,
|
|
labelCol, getTdColor, downFile,
|
|
@@ -588,11 +614,11 @@ export default defineComponent({
|
|
treeOnExpand,
|
|
treeOnExpand,
|
|
subjectTrees,
|
|
subjectTrees,
|
|
getSubjectTree, searchTree,
|
|
getSubjectTree, searchTree,
|
|
- treeOnSelect, pagination,
|
|
|
|
|
|
+ treeOnSelect, pagination, getSettingColoumns,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created
|
|
|
|
- () {
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.getSettingColoumns();
|
|
this.loadData();
|
|
this.loadData();
|
|
}
|
|
}
|
|
,
|
|
,
|