Merge remote-tracking branch 'origin/dev-nw' into dev-nw

This commit is contained in:
15856 2024-07-05 13:05:36 +08:00
commit b6859923de
13 changed files with 378 additions and 8 deletions

View File

@ -19,6 +19,9 @@ public class ParamsDto {
/** 结束日期*/
private String endDate;
/** 结束日期*/
private String date;
/** 类型*/
private String type;

View File

@ -199,6 +199,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
String month = date.substring(5, 7);
// 验收数量
dto.setType("1");
dto.setDate(year + "-" + month);
dto.setStartDate(DateTimeHelper.getFisrtDayOfMonth(Integer.parseInt(year), Integer.parseInt(month)));
dto.setEndDate(DateTimeHelper.getLastDayOfMonth(Integer.parseInt(year), Integer.parseInt(month)));
List<Map<String, String>> checkList = mapper.getAcceptanceStorage(dto);

View File

@ -52,7 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN purchase_check_details pcd ON pci.task_id = pcd.task_id
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id AND mt.`level` = '4'
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
WHERE pci.arrival_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59')
WHERE DATE_FORMAT(pci.arrival_time, '%Y-%m') = #{date}
AND mt.del_flag = '0'
<if test="maType!=null and maType == 1">
AND sd.dept_name = #{maTypeName}
</if>
@ -68,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt ON iad.type_id = mt.type_id AND mt.`level` = '4'
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
WHERE iad.create_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59') AND iad.input_type = '1'
AND mt.del_flag = '0'
<if test="maType!=null and maType == 1">
AND sd.dept_name = #{maTypeName}
</if>

View File

@ -11,6 +11,9 @@
<%= webpackConfig.name %>
</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script async src="https://api.map.baidu.com/api?v=2.0&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
<script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
<script type="text/javascript" src="//api.map.baidu.com/library/TrackAnimation/src/TrackAnimation_min.js"></script>
<style>
html,
body,

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,98 @@
<template>
<div>
<!-- 弹框: 内容是transfer -->
<el-dialog title="请选择接收人员" :visible.sync="open" width="40%" @close="handleClose" append-to-body>
<el-transfer
class="centered-transfer"
:titles="titles"
:button-texts="['移除', '添加']"
v-model="value"
:data="data"
filterable
filter-placeholder="请输入搜索内容"
@change="dataChange"
></el-transfer>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'DialogPush',
data() {
return {
value: [], //
//
titles: ['人员列表', '接收人'],
open: false, //
data: [
{
key: 0,
label: '张小刚',
disabled: false,
},
{
key: 1,
label: '李小明',
disabled: false,
},
{
key: 2,
label: '王小红',
disabled: false,
},
{
key: 3,
label: '赵小芳',
disabled: false,
},
],
}
},
methods: {
openDialog() {
this.open = true
//
this.value = []
this.getPersonnelList()
},
//
handleClose() {
this.open = false
this.$emit('getList')
},
//
getPersonnelList() {
console.log('🚀 ~ getPersonnelList ~ getPersonnelList:', )
// ().then(res => {
// this.data = {
// key: res.id,
// label: res.name,
// disabled: false,
// }
// })
},
dataChange() {
console.log('🚀 ~ dataChange ~ dataChange:', this.value)
},
submit() {
console.log('🚀 ~ submit ~ submit:', this.value)
},
},
}
</script>
<style lang="scss" scoped>
.centered-transfer {
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@ -92,6 +92,16 @@
v-hasPermi="['picking:outbound:export']"
>导出</el-button
>
<!-- 推送 -->
<el-button
type="primary"
plain
size="mini"
@click="handlePush"
v-hasPermi="['picking:outbound:push']"
:disabled="selectList.length == 0"
>推送到智慧工地</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@ -99,8 +109,8 @@
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="leaseList" border>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table v-loading="loading" :data="leaseList" border @selection-change="handleSelect">
<el-table-column type="selection" width="55" align="center" :selectable="(row) => row.taskStatus == 35" />
<el-table-column
align="center"
label="序号"
@ -151,11 +161,42 @@
prop="taskName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="推送状态"
align="center"
prop="pushStatus"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
v-if="scope.row.pushStatus == 0"
type="success"
size="mini"
>已推送</el-tag
>
<el-tag
v-else
type="danger"
size="mini"
>未推送</el-tag
>
</template>
</el-table-column>
<el-table-column
label="位置信息"
align="center"
prop="location"
>
<template v-slot="{row}">
<i class="el-icon-location-information" style="color: #459BD4; font-size: 24px;" @click="handleMap(row)"></i>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="150"
>
<template slot-scope="scope">
<el-button
@ -509,6 +550,9 @@
</el-table-column>
</el-table>
</el-dialog>
<MapDialog ref="mapDIalog" @getList="getList" />
<DialogPush ref="dialogPush" @getList="getList" />
</div>
</template>
@ -525,10 +569,12 @@ import {
import { getTypeList } from '@/api/store/warehousing'
import { equipmentTypeTree } from '@/api/store/tools'
import Treeselect from '@riophae/vue-treeselect'
import MapDialog from '@/views/warehouseManage/machinery/coding/component/MapDialog'
import DialogPush from './component/DialogPush'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
name: 'receiveOut',
components: { Treeselect },
components: { Treeselect, MapDialog, DialogPush },
data() {
return {
//
@ -602,6 +648,7 @@ export default {
outTotal: 0, //-
outCodeList: [], //
outNumList: [], //
selectList: [],
}
},
created() {
@ -833,6 +880,26 @@ export default {
`领料出库_${new Date().getTime()}.xlsx`,
)
},
//
handlePush() {
console.log('🚀 ~ handlePush ~ :',)
this.$refs.dialogPush.openDialog(true)
},
handleSelect(val) {
console.log('🚀 ~ handleSelect ~ :', val)
this.selectList = val
console.log('🚀 ~ handleSelect ~ this.selectList:', this.selectList)
},
handleMap(row) {
console.log('~ handleMap ~ 地图', row)
const params = {
deviceType: row.deviceType,
}
//
this.$refs.mapDIalog.openMapDialog(true)
this.$refs.mapDIalog.getEquipmentInfo(params)
this.$refs.mapDIalog.initMap()
},
},
}
</script>

View File

@ -32,7 +32,7 @@
</el-form-item>
<!-- 5.29 新增双因子验证 -->
<el-form-item prop="textCode" class="code-container" v-if="loginForm.username === 'admin'">
<el-form-item prop="textCode" class="code-container" v-if="loginForm.username === 'adminBns'">
<el-input v-model="loginForm.textCode" placeholder="短信验证码" style="width: 67%">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>

View File

@ -43,6 +43,7 @@
<el-button type="text" size="small" @click="handleCheck(row)">记录</el-button>
<el-button type="text" size="small" @click="handleEdit(row)">修改</el-button>
<el-button type="text" size="small" style="color: red" @click="handleDelete(row)">删除</el-button>
<el-button type="text" size="small" style="color: red" @click="handleUnbind(row)">解绑</el-button>
</template>
</el-table-column>
</el-table>
@ -267,6 +268,12 @@ export default {
// this.getList()
// })
},
handleUnbind(row) {
const params = {
id: row.id,
}
console.log('🚀 ~ handleUnbind ~ 解绑', row)
},
selectionChange(val) {
console.log('🚀 ~ selectionChange ~ val:', val)
},

View File

@ -26,7 +26,7 @@
<el-table-column label="设备类型" prop="type" align="center" />
<el-table-column label="设备编号" prop="code" align="center" />
<el-table-column label="设备状态" prop="bindTime" align="center" />
<el-table-column label="绑日期" prop="unbindTime" align="center" />
<el-table-column label="日期" prop="unbindTime" align="center" />
<el-table-column label="操作" align="center">
<template v-slot="{ row }">

View File

@ -0,0 +1,178 @@
<template>
<div>
<!-- 地图弹框 展示设备轨迹 -->
<el-dialog title="装备定位信息" :visible.sync="openMap" width="80%" :close-on-click-modal="false" @close="close">
<!-- 表单 根据日期查询设备轨迹 -->
<el-card shadow="hover">
<el-form :model="queryForm" inline>
<el-form-item label="查询日期">
<el-date-picker
v-model="queryForm.date"
type="daterange"
range-separator="至"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
style="width: 330px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">轨迹查询</el-button>
</el-form-item>
</el-form>
<div>
<h2>{{ equipment }}</h2>
<div class="equipment">定位设备编号: {{ equipmentNumber }}</div>
<div class="equipment">{{ engineering }}工程</div>
</div>
<!-- 地图 -->
<div v-if="openMap" id="container" style="height: 500px; background-color: #bfc; margin-top: 13px"></div>
</el-card>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'MapDialog',
data() {
return {
openMap: false, //
queryForm: {
date: '',
},
equipment: '', //
equipmentNumber: 'H906L', //
engineering: '大禹治水', //
map: null,
//
linePointList: [
{
lng: 116.297611,
lat: 40.047363,
},
{
lng: 116.302839,
lat: 40.048219,
},
{
lng: 116.308301,
lat: 40.050566,
},
{
lng: 116.305732,
lat: 40.054957,
},
{
lng: 116.304754,
lat: 40.057953,
},
{
lng: 116.306487,
lat: 40.058312,
},
{
lng: 116.307223,
lat: 40.056379,
},
],
}
},
mounted() {
this.getEquipmentInfo()
},
methods: {
handleQuery() {
console.log('🚀 ~ handleQuery ~ 查询:', this.queryForm.date)
const params = {
date: this.queryForm.date,
}
this.getEquipmentInfo(params)
//
this.map.clearOverlays()
this.initMap()
},
openMapDialog(val) {
this.openMap = val
},
close() {
this.openMap = false
this.$emit('getList')
},
//
getEquipmentInfo(params = {}) {
console.log('🚀 ~ getEquipmentInfo ~ 获取装备信息', params)
// (params).then(res => {
// this.equipment = res.equipment
// this.equipmentNumber = res.equipmentNumber
// this.engineering = res.engineering
// this.linePointList = res.linePointList
// })
},
//
initMap() {
this.$nextTick(() => {
this.map = new BMapGL.Map('container') //
let point = new BMapGL.Point(117.14, 31.87) //
console.log('🚀 ~ this.$nextTick ~ point:', point)
this.map.centerAndZoom(point, 15) //
this.map.enableScrollWheelZoom(true) //
//
let pointList = []
if (this.linePointList.length === 0) return
for (var i = 0; i < this.linePointList.length; i++) {
pointList.push(new BMapGL.Point(this.linePointList[i].lng, this.linePointList[i].lat))
}
let polyline = new BMapGL.Polyline(pointList)
// 线
polyline.setStrokeColor('#EA3323') // 线 #EA3323
// polyline.setStrokeWeight(2) // 线
let trackAni = new BMapGLLib.TrackAnimation(this.map, polyline, {
overallView: true, //
tilt: 30, // 55
duration: 10000, // 10000ms
delay: 2000, // 0ms
})
//
this.triggerMovement()
trackAni.start()
})
},
//
addStartEndMarkers(startLatLng, endLatLng) {
let startIcon = new BMapGL.Icon(require('/src/assets/images/startIcon.png'), new BMapGL.Size(32, 32))
let startMarker = new BMapGL.Marker(startLatLng, { icon: startIcon })
this.map.addOverlay(startMarker)
let endIcon = new BMapGL.Icon(require('/src/assets/images/endIcon.png'), new BMapGL.Size(32, 32))
let endMarker = new BMapGL.Marker(endLatLng, { icon: endIcon })
this.map.addOverlay(endMarker)
},
//
triggerMovement() {
//
let startLatLng = new BMapGL.Point(this.linePointList[0].lng, this.linePointList[0].lat)
let endLatLng = new BMapGL.Point(
this.linePointList[this.linePointList.length - 1].lng,
this.linePointList[this.linePointList.length - 1].lat
)
//
this.addStartEndMarkers(startLatLng, endLatLng)
},
},
}
</script>
<style lang="scss" scoped>
.equipment {
font-weight: 600;
font-size: 15px;
margin-top: 10px;
}
</style>

View File

@ -532,6 +532,8 @@
<!-- <el-button type="primary" @click="downloadCode"> </el-button> -->
</div>
</el-dialog>
<MapDialog ref="mapDialog" @getList="getList" />
</div>
<div v-else>
<BindIOT :isShow="isShow" />
@ -555,14 +557,16 @@ import { listHouseTree } from '@/api/store/shelves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import QRCode from 'qrcodejs2'
import BindIOT from './component/BindIOT.vue'
import BindIOT from './component/BindIOT'
import MapDialog from './component/MapDialog'
export default {
name: 'Devices',
dicts: ['sys_normal_disable'],
components: { Treeselect, BindIOT },
components: { Treeselect, BindIOT, MapDialog },
data() {
return {
openMap: false,
isShow: false,
//
loading: true,
@ -816,6 +820,13 @@ export default {
},
handleMap(row) {
console.log('~ handleMap ~ 地图', row)
const params = {
deviceType: row.deviceType,
}
//
this.$refs.mapDialog.openMapDialog(true)
this.$refs.mapDialog.getEquipmentInfo(params)
this.$refs.mapDialog.initMap()
}
},
}