Merge branch 'liubiao-main'
This commit is contained in:
@ -90,7 +90,7 @@ function getRepairList(data) {
|
||||
"repairReason": data.repairReason,
|
||||
"repairPerson": data.repairPerson,
|
||||
"repairBeginTime": data.repairBeginTime,
|
||||
"repairEndTime": data.repairBeginTime,
|
||||
"repairEndTime": data.repairEndTime,
|
||||
"pageNum": data.pageNum,
|
||||
"pageSize": data.pageSize
|
||||
}
|
||||
@ -126,6 +126,13 @@ function getDeviceTypeAll() {
|
||||
});
|
||||
}
|
||||
|
||||
function getDeviceAll(){
|
||||
return request({
|
||||
url:'api/device?pageNum=1&pageSize=99999',
|
||||
method:'get'}
|
||||
);
|
||||
}
|
||||
|
||||
export default {
|
||||
updateRepair: updateRepair,
|
||||
addRepir: addRepir,
|
||||
@ -133,5 +140,6 @@ export default {
|
||||
getRepirDetail: getRepirDetail,
|
||||
getRepairList: getRepairList,
|
||||
dropRepir: dropRepir,
|
||||
getDeviceTypeAll: getDeviceTypeAll
|
||||
getDeviceTypeAll: getDeviceTypeAll,
|
||||
getDeviceAll:getDeviceAll
|
||||
}
|
||||
@ -528,6 +528,7 @@ function SaveMultiData() {
|
||||
}
|
||||
//上传开机画面
|
||||
function updaeLogo(ids, file) {
|
||||
debugger;
|
||||
if (!file || !ids) {
|
||||
return Promise.resolve({ code: 200, msg: '成功' });
|
||||
}
|
||||
@ -576,7 +577,7 @@ function SaveItemData() {
|
||||
Promise.allSettled([promise1, promise2])
|
||||
.then((res) => {
|
||||
if (res[0].status == 'fulfilled' && res[1].status == 'fulfilled') {
|
||||
if (res[0].code == 200 && res[1].code == 200) {
|
||||
if (res[0].value.code == 200 && res[1].value.code == 200) {
|
||||
CloseSingleEdit();
|
||||
alert("操作成功");
|
||||
return;
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="content" v-loading="Status.fullLoading">
|
||||
<div class="topFilter">
|
||||
<div>
|
||||
<div class="topTool">
|
||||
<el-button type="primary" @click="ShowEdit"
|
||||
><el-icon> <Plus /> </el-icon>添加分享</el-button
|
||||
>
|
||||
<el-button type="danger" @click="DelShare(null, true)" :disabled="selectRows.length === 0">批量删除</el-button>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<el-form :inline="true" :model="filter" class="demo-form-inline">
|
||||
<el-form-item label="">
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<div class="form">
|
||||
<el-form :model="cEdit" ref="ruleFormRef" style="max-width: 750px" :label-width="'75px'">
|
||||
<el-form-item label="分享用户" label-position="right">
|
||||
<el-select v-model="cEdit.phonenumber" filterable placeholder="输入以搜索">
|
||||
<el-select v-model="cEdit.phonenumber" filterable allow-create default-first-option placeholder="输入以搜索">
|
||||
<el-option v-for="item in Usrs" :key="item.phonenumber" :label="item.userName" :value="item.phonenumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -225,13 +225,30 @@ function ShowEdit() {
|
||||
function CloseEdit() {
|
||||
Status.ShowEditPop = false;
|
||||
Status.ShowPowerSet = false;
|
||||
cEdit.phonenumber="";
|
||||
cEdit.permission= [];
|
||||
cEdit.remark= '';
|
||||
cEdit.smsCode= '';
|
||||
}
|
||||
|
||||
//添加分享
|
||||
|
||||
//保存分享数据
|
||||
function SaveFormData(type) {
|
||||
let data = {
|
||||
|
||||
if(!cEdit.phonenumber){
|
||||
|
||||
alert("请输入或选择手机号");
|
||||
return ;
|
||||
}
|
||||
|
||||
let reg=/^1\d{10}$/
|
||||
if(reg.test(cEdit.phonenumber)){
|
||||
alert("手机号格式不正确");
|
||||
return;
|
||||
}
|
||||
|
||||
let data = {
|
||||
'deviceId': deviceid,
|
||||
'phonenumber': cEdit.phonenumber,
|
||||
'permission': cEdit.permission.join(','),
|
||||
@ -239,7 +256,6 @@ function SaveFormData(type) {
|
||||
'remark': cEdit.remark,
|
||||
'smsCode': cEdit.smsCode
|
||||
};
|
||||
|
||||
Status.fullLoading = true;
|
||||
api
|
||||
.SaveShare(data, type)
|
||||
@ -247,19 +263,13 @@ function SaveFormData(type) {
|
||||
if (res.code == 200) {
|
||||
getRecordList();
|
||||
CloseEdit();
|
||||
Status.fullLoading = false;
|
||||
}
|
||||
alert(res.msg);
|
||||
})
|
||||
.catch((ex) => {
|
||||
console.log('出现异常', ex);
|
||||
})
|
||||
.finally(() => {
|
||||
Status.fullLoading = false;
|
||||
cEdit.phonenumber = '';
|
||||
cEdit.permission = [];
|
||||
cEdit.remark = '';
|
||||
cEdit.smsCode = '';
|
||||
});
|
||||
}
|
||||
|
||||
function getPower(item) {
|
||||
@ -519,7 +529,7 @@ watch(
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 12px 12px 12px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
}
|
||||
.center {
|
||||
display: flex;
|
||||
@ -541,6 +551,8 @@ watch(
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
|
||||
}
|
||||
:deep .pickerContent .el-date-editor {
|
||||
border: none !important;
|
||||
@ -567,4 +579,13 @@ watch(
|
||||
:deep .topFilter .el-input-group__append {
|
||||
padding: 0px 10px !important;
|
||||
}
|
||||
.topTool{
|
||||
display: flex
|
||||
;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
||||
<div class="percent100">
|
||||
<div class="topTool">
|
||||
<div class="button-row">
|
||||
<el-button type="primary" @click.stop="ShowEdit(null)"
|
||||
><el-icon><Plus /></el-icon>新增</el-button
|
||||
<!-- <el-button type="primary" @click.stop="ShowEdit(null)"
|
||||
><el-icon><Plus /></el-icon>新增</el-button -->
|
||||
>
|
||||
<el-button type="primary" @click.stop="Export()" plain
|
||||
><el-icon><Download /></el-icon>导出</el-button
|
||||
@ -16,7 +16,7 @@
|
||||
<div>
|
||||
<el-form :inline="true" :model="queryParams" class="demo-form-inline" @submit.native.prevent>
|
||||
<el-form-item label="" style="margin-right: 15px">
|
||||
<el-input :suffix-icon="'Search'" v-model="queryParams.fenceName" placeholder="名称" clearable @keyup.enter.stop="handleQuery" />
|
||||
<el-input :suffix-icon="'Search'" v-model="queryParams.fenceName" placeholder="名称" clearable @input="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin-right: 0px">
|
||||
@ -76,7 +76,7 @@
|
||||
<el-table-column label="围栏名称" align="center" prop="fenceName"> </el-table-column>
|
||||
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName"> </el-table-column>
|
||||
<!-- <el-table-column label="人员名称" align="center" prop="userName"> </el-table-column> -->
|
||||
<el-table-column label="事件时间" align="center" prop="eventTime"> </el-table-column>
|
||||
<el-table-column label="事件类型" align="center" prop="eventType">
|
||||
<template #default="scope">
|
||||
<div>{{ scope.row.eventType == '1' ? '闯入' : '离开' }}</div>
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="180" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="ShowEdit(scope.row)">编辑</el-button>
|
||||
<!-- <el-button link type="primary" @click="ShowEdit(scope.row)">编辑</el-button> -->
|
||||
<el-button link type="danger" @click="DropFence(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -280,8 +280,9 @@ function CloseEdit() {
|
||||
//响应查询
|
||||
var queryTime = null;
|
||||
function handleQuery() {
|
||||
debugger;
|
||||
clearTimeout(queryTime);
|
||||
queryTime = setTimeout(getList, 500);
|
||||
queryTime = setTimeout(getList, 200);
|
||||
}
|
||||
|
||||
//重置查询条件
|
||||
@ -302,6 +303,7 @@ function resetQuery() {
|
||||
keys.forEach((k) => {
|
||||
queryParams[k] = cfg[k];
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
<div>
|
||||
<el-form :inline="true" :model="queryParams" class="demo-form-inline" @submit.native.prevent>
|
||||
<el-form-item label="" style="margin-right: 15px">
|
||||
<el-input :suffix-icon="'Search'" v-model="queryParams.name" placeholder="名称" clearable @keyup.enter.stop="handleQuery" />
|
||||
<el-input :suffix-icon="'Search'" v-model="queryParams.name" placeholder="名称" clearable
|
||||
@input="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin-right: 0px">
|
||||
@ -107,8 +108,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="半径(米)" :class="cEdit.areaType == 1 ? '' : 'displayNone'">
|
||||
<el-input v-model="cEdit.radius" @keydown="refreshOverLayer" />
|
||||
<el-form-item label="半径(米)">
|
||||
<el-input v-model="cEdit.radius" @keydown="refreshOverLayer" :disabled="cEdit.areaType !== 1" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否激活">
|
||||
@ -118,8 +119,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" style="width: 350px">
|
||||
<el-input v-model="cEdit.description" type="textarea" />
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="cEdit.description" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -133,7 +134,7 @@
|
||||
>
|
||||
</div>
|
||||
<div class="map" id="map"></div>
|
||||
<div class="center" style="margin-top: 20px">
|
||||
<div class="center footerBtn" style="margin-top: 20px">
|
||||
<el-button type="primary" @click="SaveFormData"> 确定 </el-button>
|
||||
<el-button type="primary" plain @click="CloseEdit"> 取消 </el-button>
|
||||
</div>
|
||||
@ -195,7 +196,7 @@ var cEdit = reactive({
|
||||
description: '',
|
||||
areaType: null,
|
||||
coordinates: [],
|
||||
radius: null,
|
||||
radius: undefined,
|
||||
isActive: null
|
||||
});
|
||||
|
||||
@ -277,7 +278,7 @@ function CloseEdit() {
|
||||
var queryTime = null;
|
||||
function handleQuery() {
|
||||
clearTimeout(queryTime);
|
||||
queryTime = setTimeout(getList, 500);
|
||||
queryTime = setTimeout(getList, 300);
|
||||
}
|
||||
|
||||
//重置查询条件
|
||||
@ -292,12 +293,14 @@ function resetQuery() {
|
||||
keys.forEach((k) => {
|
||||
queryParams[k] = cfg[k];
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
//修改围栏类型时,清空所有坐标
|
||||
function areaTypeChange() {
|
||||
cEdit.coordinates = [];
|
||||
cEdit.radius = undefined;
|
||||
map.clearOverLays();
|
||||
}
|
||||
//圆大小改变时,更新半径字段
|
||||
@ -340,6 +343,10 @@ function AddPoint(point, i) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!point && cEdit.areaType == 1 && !cEdit.radius) {
|
||||
cEdit.radius = 1000;
|
||||
}
|
||||
|
||||
let index = i !== undefined ? i : cEdit.coordinates.length;
|
||||
let dragEnd = (evt, lay) => {
|
||||
map.removePoy();
|
||||
@ -378,7 +385,7 @@ function SaveFormData() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cEdit.areaType == 0 && cEdit.coordinates.length == 0) {
|
||||
if (cEdit.areaType == 1 && cEdit.coordinates.length == 0) {
|
||||
alert('圆形的围栏至少需要1个点');
|
||||
return;
|
||||
}
|
||||
@ -419,17 +426,29 @@ function DropFence(item) {
|
||||
alert('请选择要删除的数据');
|
||||
return;
|
||||
}
|
||||
arr = arr
|
||||
.map((v) => {
|
||||
return v.id;
|
||||
})
|
||||
.join(',');
|
||||
api.DelFence(arr).then((res) => {
|
||||
if (res.code == 200) {
|
||||
handleQuery();
|
||||
}
|
||||
alert(res.msg);
|
||||
});
|
||||
|
||||
let execDelete=()=>{
|
||||
|
||||
arr = arr
|
||||
.map((v) => {
|
||||
return v.id;
|
||||
})
|
||||
.join(',');
|
||||
api.DelFence(arr).then((res) => {
|
||||
if (res.code == 200) {
|
||||
handleQuery();
|
||||
}
|
||||
alert(res.msg);
|
||||
});
|
||||
}
|
||||
|
||||
confirm(
|
||||
'删除后不可恢复,您确认?',
|
||||
execDelete,
|
||||
null,
|
||||
'提示'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function getList() {
|
||||
@ -590,7 +609,7 @@ onMounted(() => {
|
||||
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 58vh;
|
||||
height: calc(58vh - 50px);
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #7371719e;
|
||||
border-radius: 8px;
|
||||
@ -621,4 +640,15 @@ onMounted(() => {
|
||||
:deep .point:hover {
|
||||
filter: hue-rotate(169deg);
|
||||
}
|
||||
:deep .el-dialog__body,
|
||||
.el-dialog__body {
|
||||
position: relative;
|
||||
}
|
||||
:deep .el-dialog__body .footerBtn,
|
||||
.el-dialog__body .footerBtn {
|
||||
// position: absolute;
|
||||
// bottom: 0px;
|
||||
// width: 100%;
|
||||
// left: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user