问题修复
This commit is contained in:
parent
1c8528768f
commit
722e5b2109
|
|
@ -576,6 +576,23 @@ export const getSafetyListApi = data => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 安全工器具预警数量展示
|
||||||
|
export const getSafeNumListApi = data => {
|
||||||
|
return request({
|
||||||
|
url: '/material/material_maMachine/getSafeNumList',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 安全工器具
|
||||||
|
export const getAgreementIdApi = data => {
|
||||||
|
return request({
|
||||||
|
url: '/material/material_maMachine/getAgreementId',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 班组库存日志-列表
|
// 班组库存日志-列表
|
||||||
export const getTeamNumListApi = data => {
|
export const getTeamNumListApi = data => {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,9 @@
|
||||||
<!-- <el-table-column label="租赁价(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" /> -->
|
<!-- <el-table-column label="租赁价(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作人" align="center" prop="creator" :show-overflow-tooltip="true" />
|
<el-table-column label="操作人" align="center" prop="creator" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true" />
|
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true" width="180" />
|
||||||
<el-table-column label="班组" align="center" prop="teamName" :show-overflow-tooltip="true" />
|
<el-table-column label="班组" align="center" prop="teamName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true" width="180"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,19 @@
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 添加统计行 -->
|
||||||
|
<el-row type="flex" justify="end" :gutter="3" class="mb8 stat-row">
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="stat-item">已过期数量: <span class="status-expired">{{ expiredCount }}</span></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="stat-item">临期1个月数量: <span class="status-one-month">{{ oneMonthCount }}</span></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="stat-item">临期3个月数量: <span class="status-three-months">{{ threeMonthCount }}</span></div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-table :data="tableList" fit highlight-current-row style="width: 100%">
|
<el-table :data="tableList" fit highlight-current-row style="width: 100%">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
|
|
@ -73,11 +86,10 @@
|
||||||
<script>
|
<script>
|
||||||
import TreeSelect from '@riophae/vue-treeselect'
|
import TreeSelect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import QRCodeView from '@/components/QRCodeView'
|
import {getSafetyListApi,getSafeNumListApi,getAgreementIdApi } from '@/api/materialsStation'
|
||||||
import { getMachineInfoApi,getSafetyListApi, getLevelListApi } from '@/api/materialsStation'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { TreeSelect, QRCodeView },
|
components: { TreeSelect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
|
@ -89,11 +101,16 @@ export default {
|
||||||
},
|
},
|
||||||
total: 0, // 总条数
|
total: 0, // 总条数
|
||||||
// 表格数据
|
// 表格数据
|
||||||
tableList: []
|
tableList: [],
|
||||||
|
// 添加统计数据变量
|
||||||
|
expiredCount: 0,
|
||||||
|
oneMonthCount: 0,
|
||||||
|
threeMonthCount: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getSafetyNum()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStatusText(status) {
|
getStatusText(status) {
|
||||||
|
|
@ -127,25 +144,30 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询
|
// 查询
|
||||||
handleQuery() {
|
async handleQuery() {
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.getList()
|
await this.getList()
|
||||||
|
await this.getSafetyNum()
|
||||||
|
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {
|
async handleReset() {
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.queryParams.pageSize = 10
|
this.queryParams.pageSize = 10
|
||||||
this.$refs.queryForm.resetFields()
|
this.$refs.queryForm.resetFields()
|
||||||
this.queryParams.keyWord = ''
|
this.queryParams.keyWord = ''
|
||||||
this.queryParams.status = ''
|
this.queryParams.status = ''
|
||||||
this.getList()
|
await this.getList()
|
||||||
|
await this.getSafetyNum()
|
||||||
},
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
async getList() {
|
async getList() {
|
||||||
console.log('列表-查询', this.queryParams)
|
console.log('列表-查询', this.queryParams)
|
||||||
const loading = this.$loading({ text: '加载中...' })
|
const loading = this.$loading({ text: '加载中...' })
|
||||||
try {
|
try {
|
||||||
const params = { ...this.queryParams }
|
const resTemp = await getAgreementIdApi()
|
||||||
|
console.log("xxxxxhhhhhhhhhh",resTemp)
|
||||||
|
const params = { ...this.queryParams,agreementIdList:resTemp.data}
|
||||||
const res = await getSafetyListApi(params)
|
const res = await getSafetyListApi(params)
|
||||||
console.log('🚀 ~ 获取列表 ~ res:', res)
|
console.log('🚀 ~ 获取列表 ~ res:', res)
|
||||||
this.tableList = res.data.rows
|
this.tableList = res.data.rows
|
||||||
|
|
@ -158,7 +180,23 @@ export default {
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 获取列表
|
||||||
|
async getSafetyNum() {
|
||||||
|
|
||||||
|
try {
|
||||||
|
const resTemp = await getAgreementIdApi()
|
||||||
|
const params = { ...this.queryParams,agreementIdList:resTemp.data}
|
||||||
|
const res = await getSafeNumListApi(params)
|
||||||
|
console.log("yyyyyyy",res.data)
|
||||||
|
this.expiredCount = res.data.expiredNum
|
||||||
|
this.oneMonthCount = res.data.oneMonthNum
|
||||||
|
this.threeMonthCount = res.data.threeMonthNum
|
||||||
|
console.log("xxxxxxxx",res.data.expiredNum,this.expiredCount)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ 获取列表 ~ error:', error)
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -177,4 +215,25 @@ export default {
|
||||||
.status-expired {
|
.status-expired {
|
||||||
color: #909399; // 灰色
|
color: #909399; // 灰色
|
||||||
}
|
}
|
||||||
</style>
|
// .stat-item {
|
||||||
|
// padding: 8px 16px;
|
||||||
|
// background-color: #f5f7fa;
|
||||||
|
// border-radius: 4px;
|
||||||
|
// display: inline-block;
|
||||||
|
// margin-right: 10px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.stat-row {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.stat-item {
|
||||||
|
background: #f5f7fa;
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 16px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue