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