提交前端代码

This commit is contained in:
lupeng_zz 2026-05-19 15:06:53 +08:00
parent 4aff2af250
commit b951d518c3
47 changed files with 2193 additions and 1502 deletions

View File

@ -875,7 +875,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -209,7 +209,7 @@
this.$data.pagesize = val;
var _this = this;
this.$data.currentPage = 1;
var objs;
axios.post('/deescloud/getAuthHisPos', {
opuser:localStorage.getItem("online_user"),

View File

@ -455,7 +455,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -455,7 +455,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,58 @@
var devcomponent = {
template:`
<div>
<div style="display: flex;margin-top: 10px;">
<el-input v-model="input" placeholder="请输入井名" clearable style="width: 20%;"></el-input>
<div style="display: flex;margin-top: 10px; flex-wrap: wrap; align-items: center;">
<el-radio-group v-model="radio1" @change="radio_change" style="display: inline-flex; flex-direction: row; flex-wrap: nowrap;">
<el-radio-button label="1">井位</el-radio-button>
<el-radio-button label="2">设备</el-radio-button>
</el-radio-group>
<!-- 井位页签的筛选框放在这里与页签同行 -->
<div v-if="radio1=='1'" style="display: flex; margin-left: 20px; align-items: center;">
<el-input v-model="input" placeholder="请输入井名" clearable style="width: 200px;"></el-input>
<el-button style="margin-left: 5px;" id ="bt_serach" plain type="primary" icon="el-icon-search" @click="getWell(input)">搜索</el-button>
<el-button style="margin-left: 5px;" id ="bt_add" plain type="primary" icon="el-icon-circle-plus-outline" @click="add_dev_manage_dialog()">新增</el-button>
</div>
<!-- 设备页签的时间筛选框与页签同行 -->
<div v-if="radio1=='2'" style="display: flex; margin-left: 20px; align-items: center; flex-wrap: wrap;">
<el-date-picker
v-model="devSearchForm.in_time_start"
type="date"
placeholder="入井开始时间"
value-format="yyyy-MM-dd"
:picker-options="startTimeOptions"
style="width: 160px;">
</el-date-picker>
<el-date-picker
v-model="devSearchForm.in_time_end"
type="date"
placeholder="入井结束时间"
value-format="yyyy-MM-dd"
:picker-options="endTimeOptions"
style="width: 160px; margin-left: 5px;">
</el-date-picker>
</div>
<div class="span">
<!-- 设备页签的时间筛选框与页签同行 -->
<div v-if="radio1=='2'" style="display: flex; align-items: center; margin-top: 10px; flex-wrap: wrap; white-space: nowrap;">
<el-select v-model="devSearchForm.wellnameList" placeholder="请输入井名称" filterable clearable multiple collapse-tags style="width: 240px; max-width: 380px; margin-left: 0px;">
<el-option v-for="item in devWellnameOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="devSearchForm.sid" placeholder="请输入系列号" filterable clearable multiple collapse-tags style="width: 180px; max-width: 320px; margin-left: 5px;">
<el-option v-for="item in devSidOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="devSearchForm.iid" placeholder="请输入编号" filterable clearable multiple collapse-tags style="width: 180px; max-width: 320px; margin-left: 5px;">
<el-option v-for="item in devIidOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="devSearchForm.engineerList" placeholder="请输入仪器工程师" filterable clearable multiple collapse-tags style="width: 200px; max-width: 320px; margin-left: 5px;">
<el-option v-for="item in devEngineerOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-button style="margin-left: 5px;" plain type="primary" icon="el-icon-search" @click="getDevList()">搜索</el-button>
<el-button style="margin-left: 5px;" plain type="primary" icon="el-icon-document-checked" @click="exportSeirDetail()">导出仪器明细</el-button>
<el-button style="margin-left: 5px;" plain type="primary" icon="el-icon-document-checked" @click="exportWellDetail()">导出井位明细</el-button>
</div>
</div>
<div class="span" v-if='radio1=="1"' style="max-height: calc(100vh - 200px); overflow-x: auto;">
<el-table
:data="tableData"
style="width: 100%;font-size:14px"
@ -50,7 +95,7 @@
</el-table-column>
</el-table>
</div>
<div class="block">
<div class="block" v-if='radio1=="1"'>
<span class="demonstration" style="background-color: #ECF5FF;"></span>
<el-pagination
@size-change="handleSizeChange"
@ -62,6 +107,83 @@
:total="recordTotal" style="background-color: #ECF5FF;">
</el-pagination>
</div>
<div class="span" v-if='radio1=="2"' style="max-height: calc(100vh - 250px); overflow-y: auto;">
<el-table
:data="devListTableData"
style="width: 100%;font-size:14px"
:height="tHeight"
:cell-style="{background:'#304156'}"
border
>
<el-table-column
prop="instrument_name"
label="仪器名称"
:width="150"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
prop="sid"
label="系列号"
:width="120">
</el-table-column>
<el-table-column
prop="iid"
label="编号"
:width="120"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
prop="wellname"
label="井名称"
:width="150"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
prop="in_time"
label="入井时间"
width="160">
</el-table-column>
<el-table-column
prop="out_time"
label="出井时间"
width="160">
</el-table-column>
<el-table-column
prop="engineer"
label="仪器工程师"
width="120">
</el-table-column>
<el-table-column
prop="duration_current"
label="本次时长(h)"
width="120">
</el-table-column>
<el-table-column
prop="duration_total"
label="累计时长(h)"
width="120">
</el-table-column>
<el-table-column
prop="location"
label="所在地"
width="150"
:show-overflow-tooltip="true">
</el-table-column>
</el-table>
</div>
<div class="block" v-if='radio1=="2"' style="margin-top: 5px; margin-bottom: 5px;">
<span class="demonstration" style="background-color: #ECF5FF;"></span>
<el-pagination
@size-change="handleDevSizeChange"
@current-change="handleDevCurrentChange"
:current-page="devCurrentPage"
:page-sizes="[50,100, 200, 300]"
:page-size="devPagesize"
layout="total, sizes, prev, pager, next, jumper"
:total="devRecordTotal" style="background-color: #ECF5FF;">
</el-pagination>
</div>
<el-dialog
title="设备资产信息"
@ -247,7 +369,6 @@
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
@ -384,7 +505,6 @@
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
@ -448,6 +568,28 @@
currentPage: 1,
pagesize:50,
recordTotal:0,
radio1:'1',
// 设备列表相关数据
devListTableData: [],
devSearchForm: {
sid: [],
iid: [],
wellname: '',
wellnameList: [],
engineerList: [],
in_time_start: '',
in_time_end: ''
},
// 设备筛选下拉选项
devSidOptions: [],
devIidOptions: [],
devWellnameOptions: [],
devEngineerOptions: [],
devCurrentPage: 1,
devPagesize: 50,
devRecordTotal: 0,
pdf_visible:false,
dev_tableData:[],
@ -488,11 +630,32 @@
if_show_bt:true,
if_show_et:false,
ps_info:'',
// 日期选择器配置
startTimeOptions: {
disabledDate: (time) => {
if (this.devSearchForm.in_time_end) {
return time.getTime() > new Date(this.devSearchForm.in_time_end).getTime();
}
return false;
}
},
endTimeOptions: {
disabledDate: (time) => {
if (this.devSearchForm.in_time_start) {
return time.getTime() < new Date(this.devSearchForm.in_time_start).getTime();
}
return false;
}
},
}
},
mounted() {
var _this = this;
this.getQueryWellData();
this.getWell();
axios.post('/deescloud/get_page_setting', {
opuser:localStorage.getItem("online_user"),
opuser_uuid:localStorage.getItem("uuid"),
@ -511,26 +674,243 @@
console.log(error);
});
var objs;
axios.post('/deescloud/get_well_dev', {
// 获取设备筛选选项
this.getDevFilterOptions();
// 初始加载时自动执行查询,传入空字符串以获取所有数据或默认数据
// 直接调用,不依赖 nextTick因为 axios 请求不依赖 DOM 渲染
this.getWell('');
},
methods: {
getQueryWellData() {
var _this = this;
axios.post('/deescloud/getQueryWell', {
opuser: localStorage.getItem("online_user"),
opuser_uuid:localStorage.getItem("uuid"),
index: this.$data.currentPage,
count: this.$data.pagesize
opuser_uuid: localStorage.getItem("uuid")
})
.then(function (response) {
console.log("getQueryWell 响应参数:", response.data);
if (response.data && response.data.code === 0 && response.data.data) {
const data = response.data.data;
// 映射井名称选项
if (data.wellNames && Array.isArray(data.wellNames)) {
_this.devWellnameOptions = data.wellNames.map(name => ({
value: name,
label: name
}));
}
// 映射系列号选项
if (data.series && Array.isArray(data.series)) {
_this.devSidOptions = data.series.map(sid => ({
value: sid,
label: sid
}));
}
// 映射编号/仪器选项
if (data.instruments && Array.isArray(data.instruments)) {
_this.devIidOptions = data.instruments.map(inst => ({
value: inst,
label: inst
}));
}
// 映射工程师选项
if (data.engineers && Array.isArray(data.engineers)) {
_this.devEngineerOptions = data.engineers.map(engineer => ({
value: engineer,
label: engineer
}));
}
// 注意locations 目前前端模板中没有对应的 select 绑定变量,
// 如果后续需要添加所在地和工程师的下拉筛选,需先在 data 中定义对应 options 变量并在模板中添加 el-select
}
})
.catch(function (error) {
console.error("getQueryWell 请求失败:", error);
});
},
radio_change(){
console.log(this.$data.radio1);
// 切换到设备页签时,可以自动加载一次数据,或者依赖用户点击搜索
if(this.$data.radio1 == '2') {
this.getDevList();
}
},
// 获取设备列表
getDevList() {
// 校验时间范围
if (this.devSearchForm.in_time_start && this.devSearchForm.in_time_end) {
if (new Date(this.devSearchForm.in_time_end) < new Date(this.devSearchForm.in_time_start)) {
this.$message({
message: "结束时间不能早于开始时间",
type: "warning",
duration: 2000
});
return;
}
}
var _this = this;
axios.post('/deescloud/get_dev_list', {
opuser: localStorage.getItem("online_user"), // 操作用户
opuser_uuid: localStorage.getItem("uuid"), // 用户UUID
serial: this.$data.devSearchForm.sid, // 系列号筛选条件
number: this.$data.devSearchForm.iid, // 编号筛选条件
wellname: this.$data.devSearchForm.wellnameList, // 井名称筛选条件,使用用户选择的列表
engineer: this.$data.devSearchForm.engineerList, // 仪器工程师筛选条件
in_time_start: this.$data.devSearchForm.in_time_start, // 入井开始时间筛选条件
in_time_end: this.$data.devSearchForm.in_time_end, // 入井结束时间筛选条件
index: this.$data.devCurrentPage, // 当前页码
count: this.$data.devPagesize // 每页数量
})
.then(function (response) {
console.log(response.data);
objs = response.data.data;
rcnt = response.data.total;
_this.$data.tableData = objs;
_this.$data.recordTotal = rcnt;
if(response.data && response.data.data) {
// 兼容后端字段命名差异,统一映射到前端表格使用的字段
_this.$data.devListTableData = (response.data.data || []).map(function(item) {
var sid = item.sid != null ? item.sid : (item.serial != null ? item.serial : '');
var iid = item.iid != null ? item.iid : (item.number != null ? item.number : '');
var durationCurrent = item.duration_current != null ? item.duration_current : (item.current_work_time != null ? item.current_work_time : '');
var durationTotal = item.duration_total != null ? item.duration_total : (item.total_work_time != null ? item.total_work_time : '');
// 兼容 product_name 到 instrument_name
var instrumentName = item.instrument_name != null ? item.instrument_name : (item.product_name != null ? item.product_name : '');
return Object.assign({}, item, {
sid: sid,
iid: iid,
duration_current: durationCurrent,
duration_total: durationTotal,
instrument_name: instrumentName
});
});
_this.$data.devRecordTotal = response.data.total || 0;
}
})
.catch(function (error) {
console.log(error);
});
},
methods: {
handleDevSizeChange(val) {
this.$data.devPagesize = val;
this.$data.devCurrentPage = 1;
this.getDevList();
},
handleDevCurrentChange(val) {
this.$data.devCurrentPage = val;
this.getDevList();
},
exportSeirDetail() {
// 校验时间范围
if (this.devSearchForm.in_time_start && this.devSearchForm.in_time_end) {
if (new Date(this.devSearchForm.in_time_end) < new Date(this.devSearchForm.in_time_start)) {
this.$message({
message: "结束时间不能早于开始时间",
type: "warning",
duration: 2000
});
return;
}
}
// 调用导出接口,参数与 getDevList 一致
axios.post('/deescloud/export_Seir_detail', {
opuser: localStorage.getItem("online_user"),
opuser_uuid: localStorage.getItem("uuid"),
serial: this.devSearchForm.sid,
number: this.devSearchForm.iid,
wellname: this.devSearchForm.wellnameList,
engineer: this.devSearchForm.engineerList,
in_time_start: this.devSearchForm.in_time_start,
in_time_end: this.devSearchForm.in_time_end,
index: this.devCurrentPage,
count: this.devPagesize
})
.then(response => {
console.log("导出井位明细响应:", response.data);
// 判断返回码
if (response.data && response.data.code === 1) {
// 当 code=1 时,显示错误信息
this.$message({
message: response.data.msg || "导出失败",
type: "error",
duration: 2000
});
return;
}
// code 不为 1 时,正常处理文件下载
if (response.data && response.data.fileId) {
const fileid = response.data.fileId;
const downUrl = 'file/' + fileid;
downloadUrl("井上仪器明细清单(按仪器查询).xlsx", downUrl);
} else {
this.$message({
message: "导出失败:未获取到文件",
type: "error",
duration: 2000
});
}
})
.catch(error => {
console.error("导出井位明细错误:", error);
this.$message({
message: "导出请求失败",
type: "error",
duration: 2000
});
});
},
exportWellDetail() {
var _this = this;
// 调用导出接口,参数与 getDevList 一致,支持多选井名
axios.post('/deescloud/export_Well_detail', {
opuser: localStorage.getItem("online_user"),
opuser_uuid: localStorage.getItem("uuid"),
serial: this.devSearchForm.sid,
number: this.devSearchForm.iid,
wellname: this.devSearchForm.wellnameList,
engineer: this.devSearchForm.engineerList,
in_time_start: this.devSearchForm.in_time_start,
in_time_end: this.devSearchForm.in_time_end,
index: this.devCurrentPage,
count: this.devPagesize
})
.then(response => {
console.log("导出井位明细响应:", response.data);
// 增加 code=1 的错误处理
if (response.data && response.data.code === 1) {
_this.$message({
message: response.data.msg || "导出失败",
type: "error",
duration: 2000
});
return;
}
if (response.data && response.data.fileId) {
const fileid = response.data.fileId;
const downUrl = 'file/' + fileid;
downloadUrl("井上仪器明细清单(按井位查询).xlsx", downUrl);
} else {
_this.$message({
message: "导出失败:未获取到文件",
type: "error",
duration: 2000
});
}
})
.catch(error => {
console.error("导出井位明细错误:", error);
_this.$message({
message: "导出请求失败",
type: "error",
duration: 2000
});
});
},
remove_dev_m(row){
var _this = this;
@ -659,7 +1039,7 @@
}
if (row.cal_date.length>=10){
var arr = row.p_date.split("-")
var arr = row.cal_date.split("-")
var t = arr[2]+"-"+arr[0]+"-"+arr[1];
console.log(t);
this.$data.form.cal_date=t;
@ -799,8 +1179,6 @@
},
getWell(_search_name){
document.getElementById("bt_serach").blur();
this.$data.currentPage=1;
var _this = this;
@ -828,7 +1206,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -412,7 +412,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var beginTime= '';
var endTime = '';

View File

@ -414,7 +414,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var beginTime= '';
var endTime = '';

View File

@ -537,7 +537,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -520,7 +520,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -305,7 +305,7 @@ history.pushState(null, null, document.URL);
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: 'The end time must be after the start time!',

View File

@ -339,7 +339,7 @@ history.pushState(null, null, document.URL);
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',

View File

@ -481,7 +481,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: 'The end time must be after the start time!',

View File

@ -481,7 +481,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',

View File

@ -342,7 +342,7 @@ history.pushState(null, null, document.URL);
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: 'The end time must be after the start time!',

View File

@ -564,7 +564,7 @@ history.pushState(null, null, document.URL);
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',

View File

@ -283,7 +283,7 @@
handleSizeChange(val) {
var beginTime= '';
var endTime = '';
this.$data.currentPage = 1;
if (this.$data.date_value != null && this.$data.date_value.length > 1) {
console.log("len:",this.$data.date_value.length)
console.log("date_value:",this.$data.date_value);

View File

@ -283,7 +283,7 @@
handleSizeChange(val) {
var beginTime= '';
var endTime = '';
this.$data.currentPage = 1;
if (this.$data.date_value != null && this.$data.date_value.length > 1) {
console.log("len:",this.$data.date_value.length)
console.log("date_value:",this.$data.date_value);

View File

@ -244,7 +244,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: 'The end time must be after the start time!',

View File

@ -245,7 +245,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',

View File

@ -129,7 +129,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -128,7 +128,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -577,7 +577,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -575,7 +575,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -358,7 +358,7 @@
this.$data.pagesize = val;
var _this = this;
this.$data.currentPage = 1;
var objs;
axios.post('/deescloud/getMss_en', {
opuser:localStorage.getItem("online_user"),

View File

@ -376,7 +376,8 @@
handleSizeChange(val) {
this.$data.pagesize = val;
// 添加:重置到第一页
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -1010,7 +1010,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -1030,7 +1030,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -48,7 +48,7 @@
style="margin-left: 10px"
v-model="scope.row.pumpExport"
@change="(value) => handlePumpExportChange(value, scope.row)">
<span style="color: green">泵信息</span>
<span style="color: #409EFF">泵信息</span>
</el-checkbox>
</template>
</el-table-column>
@ -261,7 +261,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -253,7 +253,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -193,7 +193,7 @@ history.pushState(null, null, document.URL);
},
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -191,7 +191,7 @@ history.pushState(null, null, document.URL);
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -41,7 +41,7 @@
</el-table-column>
<el-table-column
label="Operation"
width="260">
width="160">
<template slot-scope="scope">
<div style="flex: 1;display: inline-flex;">
<div v-if="!scope.row.tsw">
@ -49,7 +49,6 @@
</div>
<el-button @click="show_pdf(scope.row)" type="text" size="medium">Report Detail</el-button>
<el-button @click="export_pdf(scope.row)" type="text" size="medium">Export</el-button>
<el-button @click="export_mess_pdf(scope.row)" type="text" size="medium">Export(Testing)</el-button>
</div>
@ -196,7 +195,7 @@
export_mess_pdf(row) {
var _this = this;
axios.post('deescloud/get_tool_mess_pdf_en', {
axios.post('deescloud/get_tool_warning_pdf_en', {
opuser: localStorage.getItem("online_user"),
opuser_uuid: localStorage.getItem("uuid"),
wellname: row.wellNameSource
@ -262,7 +261,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -175,7 +175,7 @@ var toolscomponent = {
export_mess_pdf(row) {
var _this = this;
axios.post('deescloud/get_tool_mess_pdf', {
axios.post('deescloud/get_tool_warning_pdf', {
opuser: localStorage.getItem("online_user"),
opuser_uuid: localStorage.getItem("uuid"),
wellname: row.wellNameSource
@ -243,7 +243,7 @@ var toolscomponent = {
handleSizeChange(val) {
this.$data.pagesize = val;
var _this = this;
this.$data.currentPage = 1;
var objs;
axios.post('/deescloud/get_well_tool', {
opuser: localStorage.getItem("online_user"),

View File

@ -261,7 +261,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -263,7 +263,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -182,7 +182,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var beginTime= '';
var endTime = '';

View File

@ -182,7 +182,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var beginTime= '';
var endTime = '';

View File

@ -188,7 +188,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -394,7 +394,7 @@
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -405,7 +405,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -397,7 +397,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -401,7 +401,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
var _this = this;
var objs;

View File

@ -315,7 +315,7 @@
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.$data.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
this.$message({
message: 'The end time must be later than start time!',

View File

@ -5,7 +5,7 @@
<div v-show="if_show0">
<div id="" style="display: inline-block;width: 100%;margin-top: 10px;">
<div style="float: left;display: flex;background-color: #ECF5FF;">
<el-input v-model="input" placeholder="请输入井名" clearable ></el-input>
<el-input v-model="input" placeholder="请输入井名" clearable style="width: 150px;"></el-input>
</div>
<div style="float: left;display: flex;background-color: #ECF5FF;">
<el-date-picker
@ -58,6 +58,23 @@
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</div>
<!-- 新增类型筛选下拉框多选 -->
<div style="float: left;display: flex;background-color: #ECF5FF;">
<el-select
v-model="selectedTypes"
multiple
collapse-tags
placeholder="请选择井测试类型"
clearable
style="width: 220px;">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div style="float: left;margin-left: 5px;">
<el-checkbox style="background-color: #ECF5FF;" v-model="checked" label="工程服务" border></el-checkbox>
</div>
@ -89,12 +106,18 @@
label="建井时间"
:width="170">
</el-table-column>
<el-table-column
prop="welloperator"
label="操作用户"
:width="150"
:show-overflow-tooltip="true">
</el-table-column>
<!-- 修改将井测试类型列改为普通文本列以保持与其他列样式一致 -->
<el-table-column
prop="type_name"
label="井测试类型"
:width="200"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
label="操作"
@ -106,9 +129,7 @@
</div>
<el-button @click="handleClick(scope.row)" type="text" size="medium">历史详情</el-button>
<el-button @click="exportWellHis(scope.row)" type="text" size="medium">导出</el-button>
</div>
</template>
</el-table-column>
</el-table>
@ -189,6 +210,19 @@
if_show_et:false,
checked:false,
// 新增:类型筛选相关
selectedTypes: [], // 选中的类型值数组,如 [0, 2, 5]
typeOptions: [
{ value: 0, label: '测斜' },
{ value: 1, label: '近钻头' },
{ value: 2, label: '电阻率' },
{ value: 3, label: '探管式方位伽马' },
{ value: 4, label: '钻铤式方位伽马' },
{ value: 5, label: '自然伽马' },
{ value: 6, label: '工程参数' },
{ value: 7, label: '振动粘滑' }
]
}
},
mounted() {
@ -223,26 +257,50 @@
console.log(error);
});
var objs;
// 初始化加载数据
this.fetchData();
},
methods: {
// 新增:将选中的类型数组转换为位掩码
getTypeMask() {
let mask = 0;
if (this.selectedTypes && this.selectedTypes.length > 0) {
this.selectedTypes.forEach(val => {
mask |= (1 << val);
});
}
return mask;
},
// 新增:统一的查询数据方法
fetchData() {
var _this = this;
// 获取类型位掩码
const typeMask = this.getTypeMask();
axios.post('/deescloud/get_well_history', {
opuser: localStorage.getItem("online_user"),
opuser_uuid: localStorage.getItem("uuid"),
index: this.$data.currentPage,
count: this.$data.pagesize,
checked:this.$data.checked
Wellname: this.input,
index: this.currentPage,
count: this.pagesize,
BeginTime: this.begin_t,
EndTime: this.end_t,
checked: this.checked,
type: typeMask // 新增:传递类型筛选参数
})
.then(function (response) {
console.log(response.data);
objs = response.data.data;
rcnt = response.data.total;
_this.$data.tableData = objs;
_this.$data.recordTotal = rcnt;
_this.tableData = response.data.data || [];
_this.recordTotal = response.data.total || 0;
})
.catch(function (error) {
console.log(error);
_this.$message.error('查询失败,请稍后重试');
});
},
methods: {
export_his(){
this.$data.dialogVisible=false;
@ -279,9 +337,9 @@
document.getElementById("bt_serach").blur();
this.$data.currentPage=1;
this.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
if (this.begin_t != '' && this.end_t != '' && this.begin_t > this.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',
type: 'warning',
@ -290,37 +348,15 @@
return;
}
var _this = this;
var objs;
axios.post('/deescloud/get_well_history', {
opuser:localStorage.getItem("online_user"),
opuser_uuid:localStorage.getItem("uuid"),
Wellname: _search_name,
index: this.$data.currentPage,
count: this.$data.pagesize,
BeginTime:this.$data.begin_t,
EndTime:this.$data.end_t,
checked:this.$data.checked
})
.then(function (response) {
console.log(response.data);
objs = response.data.data;
rcnt = response.data.total;
_this.$data.tableData = objs;
_this.$data.recordTotal = rcnt;
})
.catch(function (error) {
console.log(error);
});
// 调用统一的查询方法
this.fetchData();
},
handleSizeChange(val) {
//console.log(`每页 ${val} 条`);
this.$data.pagesize = val;
this.pagesize = val;
this.currentPage = 1;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
if (this.begin_t != '' && this.end_t != '' && this.begin_t > this.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',
type: 'warning',
@ -329,35 +365,13 @@
return;
}
var _this = this;
var objs;
axios.post('/deescloud/get_well_history', {
opuser:localStorage.getItem("online_user"),
opuser_uuid:localStorage.getItem("uuid"),
Wellname: this.$data.input,
index: this.$data.currentPage,
count: this.$data.pagesize,
BeginTime:this.$data.begin_t,
EndTime:this.$data.end_t,
checked:this.$data.checked
})
.then(function (response) {
console.log(response.data);
objs = response.data.data;
rcnt = response.data.total;
_this.$data.tableData = objs;
_this.$data.recordTotal = rcnt;
})
.catch(function (error) {
console.log(error);
});
this.fetchData();
},
handleCurrentChange(val) {
//console.log(`当前页: ${val}`);
this.$data.currentPage = val;
if (this.$data.begin_t != '' && this.$data.end_t != '' && this.$data.begin_t>this.$data.end_t) {
handleCurrentChange(val) {
this.currentPage = val;
if (this.begin_t != '' && this.end_t != '' && this.begin_t > this.end_t) {
this.$message({
message: '结束时间必须在开始时间之后!',
type: 'warning',
@ -366,29 +380,7 @@
return;
}
var _this = this;
var objs;
axios.post('/deescloud/get_well_history', {
opuser:localStorage.getItem("online_user"),
opuser_uuid:localStorage.getItem("uuid"),
Wellname: this.$data.input,
index: this.$data.currentPage,
count: this.$data.pagesize,
BeginTime:this.$data.begin_t,
EndTime:this.$data.end_t,
checked:this.$data.checked
})
.then(function (response) {
console.log(response.data);
objs = response.data.data;
rcnt = response.data.total;
_this.$data.tableData = objs;
_this.$data.recordTotal = rcnt;
})
.catch(function (error) {
console.log(error);
});
this.fetchData();
},
handleClick(row){
@ -478,6 +470,5 @@
console.log("max_flex_width:",max_flex_width);
return max_flex_width + 'px'
},
}
}

View File

@ -408,7 +408,7 @@ export_pdf(row, is_memory = false) {
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var beginTime= '';
var endTime = '';

View File

@ -390,7 +390,7 @@ var Welltypecomponent = {
handleSizeChange(val) {
this.$data.pagesize = val;
this.$data.currentPage = 1;
var beginTime= '';
var endTime = '';