bug修复

This commit is contained in:
BianLzhaoMin 2025-03-26 17:31:53 +08:00
parent 938efea6b4
commit f2a731f9e8
1 changed files with 262 additions and 261 deletions

View File

@ -1,6 +1,13 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item prop="deviceName">
<el-input
v-model="queryParams.deviceName"
@ -56,49 +63,47 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableData" >
<el-table v-loading="loading" :data="tableData">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="装备名称" align="center" prop="deviceName" sortable/>
<el-table-column label="装备名称" align="center" prop="deviceName" sortable />
<el-table-column label="装备编码" align="center" prop="code" sortable>
<template slot-scope="scope">
<span style="color:blue">{{ scope.row.code}}</span>
<span style="color: blue">{{ scope.row.code }}</span>
</template>
</el-table-column>
<el-table-column label="装备类目" align="center" prop="typeName" width="250px" sortable>
<template slot-scope="scope">
<span
>{{ scope.row.firstName }} <span v-show="scope.row.firstName">></span>
{{ scope.row.secondName }}<span v-show="scope.row.secondName">></span
>{{ scope.row.thirdName }}</span
>{{ scope.row.firstName }} <span v-show="scope.row.firstName">></span> {{ scope.row.secondName
}}<span v-show="scope.row.secondName">></span>{{ scope.row.thirdName }}</span
>
</template>
</el-table-column>
<el-table-column label="装备型号" align="center" prop="typeName" sortable/>
<el-table-column label="所属公司" align="center" prop="companyName" sortable/>
<el-table-column label="上架时间" align="center" prop="createTime" sortable/>
<el-table-column label="更新时间" align="center" prop="updateTime" sortable/>
<el-table-column label="装备型号" align="center" prop="typeName" sortable />
<el-table-column label="所属公司" align="center" prop="companyName" sortable />
<!-- <el-table-column label="上架时间" align="center" prop="createTime" sortable/> -->
<el-table-column label="创建时间" align="center" prop="createTime" sortable />
<el-table-column label="更新时间" align="center" prop="updateTime" sortable />
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getEquipmentTypeApi,getEquipmentListApi, } from "@/api/search/equipment";
import { getEquipmentTypeApi, getEquipmentListApi } from '@/api/search/equipment'
export default {
name: "equipment",
name: 'equipment',
data() {
return {
//
@ -106,7 +111,6 @@ export default {
loadingTwo: false,
// Id
showName: false,
@ -125,25 +129,25 @@ export default {
showTeam: false,
//
total: 0,
totalTwo : 0,
totalTwo: 0,
//
constructionList: [],
maxLength:100,//
currentSelection:[],//
maxLength: 100, //
currentSelection: [], //
//
teamList: [],
teamTempList: [],
warnList: [],
//
title: "",
title: '',
//
open: false,
//
dateRange: [],
//
deviceTypeList:[],
deviceTypeList: [],
//
deviceTypeTree:[],
deviceTypeTree: [],
//
partTypeTreeProps: {
@ -176,51 +180,49 @@ export default {
},
//
form: {},
};
}
},
created() {
this.getTypeTreeData();
this.getList();
this.getTypeTreeData()
this.getList()
},
methods: {
/** 查询树形列表 */
getTypeTreeData() {
getEquipmentTypeApi().then(response => {
this.deviceTypeTree = response.data;
});
getEquipmentTypeApi().then((response) => {
this.deviceTypeTree = response.data
})
},
/** 查询装备信息列表 */
async getList() {
this.loading = true;
if(this.dateRange.length > 0){
this.loading = true
if (this.dateRange.length > 0) {
this.queryParams.startTime = this.dateRange[0]
this.queryParams.endTime = this.dateRange[1]
}
await getEquipmentListApi(this.queryParams).then(response => {
console.log('11111',response)
this.tableData = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
await getEquipmentListApi(this.queryParams).then((response) => {
console.log('11111', response)
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
},
//
openTeam(row){
this.teamId = row.teamId;
this.title = "查看人员"
this.showTeam = true;
this.getListTeam();
openTeam(row) {
this.teamId = row.teamId
this.title = '查看人员'
this.showTeam = true
this.getListTeam()
},
//
openTeamTemp(row){
this.teamId = row.teamId;
this.title = "查看临时人员"
this.showTeamTemp = true;
this.getListTeamTemp();
openTeamTemp(row) {
this.teamId = row.teamId
this.title = '查看临时人员'
this.showTeamTemp = true
this.getListTeamTemp()
},
//
@ -242,32 +244,31 @@ export default {
// },
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.dateRange = [];
this.resetForm('queryForm')
this.dateRange = []
this.deviceTypeList = []
this.queryParams.startTime=''
this.queryParams.endTime=''
this.queryParams.startTime = ''
this.queryParams.endTime = ''
this.queryParams.typeId = ''
this.handleQuery();
this.handleQuery()
},
//-change
deviceTypeChange(val) {
console.log('2222222222',val)
console.log('2222222222', val)
if (val.length > 0) {
this.queryParams.typeId = val[3]
} else {
this.queryParams.typeId = ''
}
}
}
};
},
},
}
</script>
<style lang="scss" scoped>
.uploadImg {