设备接收接口调试完成
This commit is contained in:
parent
d0aec00ce0
commit
bea1a53543
|
|
@ -4,3 +4,16 @@ import request from '@/utils/request'
|
|||
export const pushNotificationsApi = (data) => {
|
||||
return request.post('/base/machine/pushNotifications', data)
|
||||
}
|
||||
// 接收设备
|
||||
export const receiveNotificationsApi = (params) => {
|
||||
return request.get('/base/receive/getDataReceive', {
|
||||
params
|
||||
})
|
||||
}
|
||||
// 接收设备详情
|
||||
export const receiveNotificationsDetailsApi = (params) => {
|
||||
return request.get('/base/receive/getDataReceiveDetails', {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,35 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 表单 -->
|
||||
<el-form :inline="true" :model="queryForm" ref="queryForm" label-width="68px" size="small" v-show="showSearch">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="queryForm"
|
||||
ref="queryForm"
|
||||
label-width="68px"
|
||||
size="small"
|
||||
v-show="showSearch"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input v-model="queryForm.keyWord" clearable placeholder="请输入关键字" />
|
||||
<el-input
|
||||
v-model="queryForm.keyWord"
|
||||
clearable
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryForm.status" placeholder="请选择状态" filterable clearable>
|
||||
<el-form-item label="状态" prop="receiveStatus">
|
||||
<el-select
|
||||
v-model="queryForm.receiveStatus"
|
||||
placeholder="请选择状态"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option label="未接收" value="0"></el-option>
|
||||
<el-option label="已接收" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="推送日期" prop="pushDate">
|
||||
<el-date-picker
|
||||
v-model="queryForm.pushDate"
|
||||
v-model="pushDate"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
|
|
@ -22,38 +38,96 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" plain @click="resetQueryForm">重置</el-button>
|
||||
<el-button icon="el-icon-download" type="warning" plain @click="handleExport" :loading="loading">导出</el-button>
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" plain @click="resetQueryForm"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-download"
|
||||
type="warning"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="loading"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
/>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table :data="tableData" style="width: 100%" @selection-change="selection">
|
||||
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
@selection-change="selection"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="50"
|
||||
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
||||
:index="
|
||||
indexContinuation(queryParams.pageNum, queryParams.pageSize)
|
||||
"
|
||||
/>
|
||||
<el-table-column prop="pushDate" label="推送日期" align="center"></el-table-column>
|
||||
<el-table-column prop="pushMachineryNum" label="推送机具数量" align="center"></el-table-column>
|
||||
<el-table-column prop="acceptMachineryNum" label="已接收数量" align="center"></el-table-column>
|
||||
<el-table-column prop="status" label="接收状态" align="center" show-overflow-tooltip>
|
||||
<el-table-column
|
||||
prop="receiveDate"
|
||||
label="推送日期"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="pushNum"
|
||||
label="推送机具数量"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="receiveNum"
|
||||
label="已接收数量"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="接收状态"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 0" type="danger">未接收</el-tag>
|
||||
<el-tag v-else-if="scope.row.status == 1" type="success">已接收</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.receiveStatus == 0"
|
||||
type="warning"
|
||||
size="mini"
|
||||
>未接收</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-else-if="scope.row.receiveStatus == 1"
|
||||
type="success"
|
||||
size="mini"
|
||||
>已接收</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="accept(scope.row)">接收</el-button>
|
||||
<el-button type="text" size="mini" @click="pushDetail(scope.row)">明细</el-button>
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" size="mini" @click="accept(row.id)"
|
||||
>接收</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="pushDetail(row)"
|
||||
>明细</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -69,6 +143,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { receiveNotificationsApi } from '@/api/dataPush/index.js'
|
||||
export default {
|
||||
name: 'PushAndAccept',
|
||||
data() {
|
||||
|
|
@ -77,31 +152,17 @@ export default {
|
|||
showSearch: true,
|
||||
queryForm: {
|
||||
keyWord: '',
|
||||
status: '',
|
||||
pushDate: '',
|
||||
receiveStatus: '',
|
||||
// pushDate: '',
|
||||
},
|
||||
tableData: [
|
||||
{
|
||||
id: 1,
|
||||
pushDate: '2021-08-01',
|
||||
pushMachineryNum: 10,
|
||||
acceptMachineryNum: 5,
|
||||
status: 0,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
pushDate: '2021-08-02',
|
||||
pushMachineryNum: 20,
|
||||
acceptMachineryNum: 10,
|
||||
status: 1,
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
ids: [],
|
||||
pushDate: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -118,42 +179,53 @@ export default {
|
|||
resetQueryForm() {
|
||||
console.log('🚀 ~ resetQueryForm ~ 重置:')
|
||||
this.$refs.queryForm.resetFields()
|
||||
this.pushDate = ''
|
||||
this.getList()
|
||||
},
|
||||
// 导出
|
||||
handleExport() {
|
||||
this.loading = true
|
||||
console.log('🚀 ~ handleExport ~ 导出:')
|
||||
this.download(
|
||||
this
|
||||
.download
|
||||
// '',
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// dataCondition: this.ids,
|
||||
// },
|
||||
// `推送接收_${new Date().getTime()}.xlsx`
|
||||
).then(() => {
|
||||
()
|
||||
.then(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
async getList() {
|
||||
console.log(this.pushDate, '时间')
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
...this.queryForm,
|
||||
startTime: this.pushDate[0],
|
||||
endTime: this.pushDate[1],
|
||||
}
|
||||
console.log('🚀 ~ getList ~ 获取列表:', params)
|
||||
// console.log('🚀 ~ getList ~ 获取列表:', params)
|
||||
// 接口(params).then(res => {
|
||||
// this.tableData = res.data
|
||||
// this.total = res.total
|
||||
// }).catch(err => {
|
||||
// console.log('🚀 ~ getList ~ err:', err
|
||||
// })
|
||||
const res = await receiveNotificationsApi(params)
|
||||
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
|
||||
console.log(res, '接收数据')
|
||||
},
|
||||
// 接收
|
||||
accept(row) {
|
||||
console.log('🚀 ~ accept ~ 接收:', row)
|
||||
accept(id) {
|
||||
console.log('🚀 ~ accept ~ 接收:')
|
||||
const params = {
|
||||
id: row.id,
|
||||
id,
|
||||
isDetail: false,
|
||||
}
|
||||
this.$router.push({ path: 'pushAndAcceptDetail', query: params })
|
||||
|
|
@ -170,7 +242,7 @@ export default {
|
|||
// 选择
|
||||
selection(val) {
|
||||
console.log('🚀 ~ selection ~ 选择:', val)
|
||||
this.ids = val.map(item => item.id)
|
||||
this.ids = val.map((item) => item.id)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
:selectable="(row) => row.status == '1'"
|
||||
:selectable="(row) => row.status == 0"
|
||||
/>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
@ -110,91 +110,106 @@
|
|||
"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="machineryNum"
|
||||
prop="maCode"
|
||||
label="机具编号"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="machineryName"
|
||||
prop="machineName"
|
||||
label="机具名称"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="machineryType"
|
||||
prop="typeName"
|
||||
label="机具类型"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="specificationModel"
|
||||
prop="modelName"
|
||||
label="规格型号"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rentalDate"
|
||||
prop="rentTime"
|
||||
label="租赁日期"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rentalPrice"
|
||||
prop="rentPrice"
|
||||
label="租赁价格"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="unit"
|
||||
prop="unitId"
|
||||
label="所属单位"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="manufacturer"
|
||||
prop="supplier"
|
||||
label="生产厂家"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="productionDate"
|
||||
prop="checkDate"
|
||||
label="出厂日期"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="isNewEquipment"
|
||||
prop="isNew"
|
||||
label="是否是新装备"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
v-if="scope.row.isNew == 0"
|
||||
type="success"
|
||||
size="mini"
|
||||
>是</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-else-if="scope.row.status == 1"
|
||||
type="danger"
|
||||
size="mini"
|
||||
>否</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="verificationNum"
|
||||
prop="checkCode"
|
||||
label="检验证编号"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspectionUnit"
|
||||
prop="checkUnit"
|
||||
label="检验单位"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspectionDate"
|
||||
prop="checkDate"
|
||||
label="检验日期"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="nextInspectionDate"
|
||||
prop="nextCheckDate"
|
||||
label="下次检验日期"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="machinistName"
|
||||
prop="maUserName"
|
||||
label="机手姓名"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
|
|
@ -202,27 +217,28 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.machinistName"
|
||||
v-if="scope.row.maUserName"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="getMachinistDetail(scope.row)"
|
||||
>
|
||||
{{ scope.row.machinistName }}
|
||||
{{ scope.row.maUserName }}
|
||||
</el-button>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="状态"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="status" label="状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 0" type="danger"
|
||||
<el-tag
|
||||
v-if="scope.row.status == 0"
|
||||
type="danger"
|
||||
size="mini"
|
||||
>未接收</el-tag
|
||||
>
|
||||
<el-tag v-else-if="scope.row.status == 1" type="success"
|
||||
<el-tag
|
||||
v-else-if="scope.row.status == 1"
|
||||
type="success"
|
||||
size="mini"
|
||||
>已接收</el-tag
|
||||
>
|
||||
</template>
|
||||
|
|
@ -307,6 +323,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { receiveNotificationsDetailsApi } from '@/api/dataPush/index.js'
|
||||
export default {
|
||||
name: 'pushAndAcceptDetail',
|
||||
data() {
|
||||
|
|
@ -438,12 +455,19 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
...this.queryForm,
|
||||
}
|
||||
console.log('🚀 ~ getList ~ 获取列表:', params)
|
||||
async getList() {
|
||||
// const params = {
|
||||
// ...this.queryParams,
|
||||
// ...this.queryForm,
|
||||
// }
|
||||
const res = await receiveNotificationsDetailsApi({
|
||||
receiveId: this.$route.query.id,
|
||||
})
|
||||
console.log(res, '接收的数据')
|
||||
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
// console.log('🚀 ~ getList ~ 获取列表:', params)
|
||||
},
|
||||
// 获取物品种类
|
||||
getGoodsTypeList() {
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ module.exports = {
|
|||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||
// target: `https://z.csgmall.com.cn`,
|
||||
|
||||
// target: `http://192.168.2.134:48080`, //超
|
||||
target: `http://192.168.2.134:48080`, //超
|
||||
// target: `http://10.40.92.81:8080`, //韩/
|
||||
// target: `http://192.168.2.81:28080`,//旭/
|
||||
// target: `http://192.168.2.248:28080`, //帅
|
||||
target: `http://192.168.2.240:28080`, //福
|
||||
// target: `http://192.168.2.240:28080`, //福
|
||||
|
||||
//******** 注意事项 ********* */
|
||||
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;
|
||||
|
|
|
|||
Loading…
Reference in New Issue