Compare commits
9 Commits
8f056bbdaa
...
74be13b534
Author | SHA1 | Date | |
---|---|---|---|
74be13b534 | |||
727ca3cc69 | |||
d753972aeb | |||
c341347a6a | |||
0edaeb9761 | |||
3038670ad8 | |||
fb38a6dfa5 | |||
c8c505dbd7 | |||
f33b7208f4 |
|
@ -35,7 +35,7 @@ export function getArealist() {
|
|||
return request({
|
||||
url: '/index/getAreaList',
|
||||
method: 'get',
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
// 获取首页统计
|
||||
|
@ -43,7 +43,7 @@ export function getAdminStatistics() {
|
|||
return request({
|
||||
url: '/index/admim/statistics',
|
||||
method: 'get',
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
// 修改运营区
|
||||
|
@ -54,6 +54,14 @@ export function updateArea(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
// 修改运营区
|
||||
export function updateArea2(data) {
|
||||
return request({
|
||||
url: '/system/area/guide',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除运营区
|
||||
export function delArea(areaId) {
|
||||
|
@ -70,3 +78,19 @@ export function optionselect() {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据运营商id获取运营商列表
|
||||
export function selectAreaListByDeptId(deptId) {
|
||||
return request({
|
||||
url: '/system/area/selectAreaListByDeptId/'+deptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据运营区id获取运营商
|
||||
export function selectDeptByAreaId(areaId) {
|
||||
return request({
|
||||
url: '/system/area/selectDeptByAreaId/'+areaId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -58,9 +58,10 @@ export function getBalance(){
|
|||
})
|
||||
}
|
||||
// 查询运营商信息
|
||||
export function getDeptByToken(){
|
||||
export function getDeptByToken(deptId){
|
||||
return request({
|
||||
url: '/system/dept/getDept',
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: {deptId: deptId}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -76,6 +76,14 @@ export function oneClickWarehousing(deviceId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 更新设备
|
||||
export function refreshDevice(deviceId) {
|
||||
return request({
|
||||
url: '/system/device/refreshDevice/' + deviceId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询所有车辆信息
|
||||
export function allDevice() {
|
||||
|
|
44
src/api/system/hardwareVersion.js
Normal file
44
src/api/system/hardwareVersion.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询硬件版本列表
|
||||
export function listHardwareVersion(query) {
|
||||
return request({
|
||||
url: '/system/hardwareVersion/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询硬件版本详细
|
||||
export function getHardwareVersion(id) {
|
||||
return request({
|
||||
url: '/system/hardwareVersion/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增硬件版本
|
||||
export function addHardwareVersion(data) {
|
||||
return request({
|
||||
url: '/system/hardwareVersion',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改硬件版本
|
||||
export function updateHardwareVersion(data) {
|
||||
return request({
|
||||
url: '/system/hardwareVersion',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除硬件版本
|
||||
export function delHardwareVersion(id) {
|
||||
return request({
|
||||
url: '/system/hardwareVersion/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/system/softwareVersion.js
Normal file
44
src/api/system/softwareVersion.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询软件版本列表
|
||||
export function listSoftwareVersion(query) {
|
||||
return request({
|
||||
url: '/system/softwareVersion/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询软件版本详细
|
||||
export function getSoftwareVersion(id) {
|
||||
return request({
|
||||
url: '/system/softwareVersion/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增软件版本
|
||||
export function addSoftwareVersion(data) {
|
||||
return request({
|
||||
url: '/system/softwareVersion',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改软件版本
|
||||
export function updateSoftwareVersion(data) {
|
||||
return request({
|
||||
url: '/system/softwareVersion',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除软件版本
|
||||
export function delSoftwareVersion(id) {
|
||||
return request({
|
||||
url: '/system/softwareVersion/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
1
src/assets/icons/svg/hardwareVersion.svg
Normal file
1
src/assets/icons/svg/hardwareVersion.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1721629464139" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4288" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M510.557091 870.4h34.746182q18.245818 0 28.322909-3.165091 63.464727-11.101091 118.551273-42.752 54.016-31.045818 94.184727-78.475636 40.238545-47.522909 61.812363-105.914182 22.225455-60.090182 22.225455-125.184 0-98.629818-40.029091-156.555636-40.96-59.298909-111.243636-59.29891-63.837091 0-107.845818 53.573819-26.437818 32.186182-54.341819 100.654545-5.655273 14.196364-17.058909 37.12l-29.277091 58.763636-84.247272-171.86909q-5.864727-14.289455-20.852364-19.851637-14.405818-5.329455-28.788364 0.465455-14.522182 5.818182-20.107636 21.061818-5.306182 14.429091 0.465455 28.834909l0.09309 0.302545 116.084364 241.850182q11.264 22.621091 34.397091 22.621091 19.479273 0 33.838545-21.620363l0.325819-0.465455 64.162909-128.884364 0.139636-0.349091q2.816-7.121455 8.541091-20.037818 5.818182-13.149091 8.773818-20.549818 25.320727-58.461091 41.844364-79.685818 21.853091-28.043636 50.967273-28.043636 43.752727 0 62.533818 54.807272 12.171636 35.467636 12.171636 84.247273 0 103.656727-65.931636 182.760727-65.768727 78.917818-166.050909 95.930182-5.073455 0.116364-12.567273 1.629091-6.353455 1.28-9.774546 1.28h-26.065454q-56.785455 0-108.846546-22.202182-50.269091-21.457455-89.157818-60.509091-38.912-39.074909-60.276363-89.553454Q230.167273 569.018182 230.167273 512v-22.760727l2.792727-25.320728q19.083636-101.632 96.744727-167.354181Q407.877818 230.4 510.533818 230.4q55.505455 0 109.405091 22.551273l0.325818 0.139636 0.325818 0.093091q16.384 5.492364 29.323637 0.139636 13.986909-5.771636 17.338182-20.852363 5.282909-14.010182 0.139636-28.043637-5.538909-15.104-19.851636-20.945454Q583.68 153.6 507.671273 153.6q-63.860364 0-123.508364 22.318545-58.065455 21.713455-105.611636 62.068364-47.592727 40.424727-78.801455 94.557091-32.116364 55.738182-43.124363 119.691636l-0.139637 0.791273v0.791273q0 3.723636-1.349818 13.242182-1.536 10.821818-1.536 15.848727V512q0 72.610909 28.16 139.170909 27.182545 64.256 76.683636 113.943273 49.477818 49.687273 113.477819 76.986182 66.327273 28.299636 138.635636 28.299636z" p-id="4289" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 2.3 KiB |
1
src/assets/icons/svg/softwareVersion.svg
Normal file
1
src/assets/icons/svg/softwareVersion.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1721629499985" class="icon" viewBox="0 0 1344 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5365" xmlns:xlink="http://www.w3.org/1999/xlink" width="262.5" height="200"><path d="M878.009019 671.858244a37.969483 37.969483 0 0 0 0-50.905988 36.121411 36.121411 0 0 0-25.957014-13.860541 38.893519 38.893519 0 0 0-28.729122 8.400328l-112.90041 92.403609V424.636587a37.969483 37.969483 0 0 0-38.89352-33.601312 38.893519 38.893519 0 0 0-38.893519 38.893519v277.714848l-112.90041-92.403609a42.001641 42.001641 0 0 0-52.754061 5.544216 43.76571 43.76571 0 0 0-13.860541 27.805087 37.969483 37.969483 0 0 0 13.860541 26.88105l153.642002 129.617063a73.166858 73.166858 0 0 0 42.589663 13.860541 72.158819 72.158819 0 0 0 47.965874-17.304676z" p-id="5366" fill="#bfbfbf"></path><path d="M1241.827231 395.991468l-8.400329-8.400328a364.994258 364.994258 0 0 0-151.205906-91.227563A434.296965 434.296965 0 0 0 671.528953 0h-10.920426a431.60886 431.60886 0 0 0-398.763577 296.531583 374.990648 374.990648 0 0 0-160.614274 100.383922A364.994258 364.994258 0 0 0 0.006722 651.52945a374.066612 374.066612 0 0 0 108.616243 260.998196 364.994258 364.994258 0 0 0 262.762264 109.204265H519.147001a42.925677 42.925677 0 0 0 40.153568-46.537817 47.461854 47.461854 0 0 0-47.461854-43.76571H371.385229a273.766694 273.766694 0 0 1-197.995734-81.231173A284.435111 284.435111 0 0 1 168.013285 456.221821a273.766694 273.766694 0 0 1 139.445447-81.231173l27.385069-6.384249 9.156358-34.693356a340.381296 340.381296 0 0 1 318.45644-242.685479h9.156358a342.145365 342.145365 0 0 1 332.148974 245.457588l12.768499 35.617391 26.461034 6.384249a285.611157 285.611157 0 0 1 130.457095 72.998852l7.308286 8.400328a279.226907 279.226907 0 0 1 76.610993 192.535521 282.839048 282.839048 0 0 1-82.995242 198.91977 273.766694 273.766694 0 0 1-187.999344 81.231173H831.639208a45.613782 45.613782 0 0 0-45.613782 45.613782 46.537818 46.537818 0 0 0 45.613782 45.613782h152.381952a364.994258 364.994258 0 0 0 250.833798-111.556358A374.990648 374.990648 0 0 0 1344.059224 649.681378a364.994258 364.994258 0 0 0-102.231993-253.68991z" p-id="5367" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 2.2 KiB |
|
@ -122,6 +122,7 @@ export default {
|
|||
// 标点
|
||||
this.removeAllMarker();
|
||||
console.log("添加标记点")
|
||||
console.log("====",this.initLng, this.initLat,this.deviceSn, this.status, this.onlineStatus)
|
||||
this.addMarker(this.initLng, this.initLat, this.deviceSn, this.status, this.onlineStatus);
|
||||
// this.$emit('map-geo', res, this.initLng, this.initLat);
|
||||
|
||||
|
|
|
@ -204,6 +204,20 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/guide',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:parking:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:areaId(\\d+)',
|
||||
component: () => import('@/views/system/area/guide'),
|
||||
name: 'Data',
|
||||
meta: { title: '导览地图', activeMenu: '/system/area' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/area-noriding',
|
||||
component: Layout,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<div class="page" v-if="userName == 'admin'">
|
||||
<div class="info_li">
|
||||
<div class="card1">
|
||||
<div class="txt">运营商数</div>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<img src="https://lxnapi.ccttiot.com/bike/img/static/un9hBy1mNXjAsRnrSt14" alt="">
|
||||
</div>
|
||||
<div class="card2">
|
||||
<div class="txt">待审核还车押金扣款</div>
|
||||
<div class="txt">待审核还车押金扣款</div>
|
||||
<div class="num">{{StatisticsInfo.returnOrderDeductFee }}</div>
|
||||
<div class="txt1">还车待审核订单数:{{StatisticsInfo.returnOrderCount }}</div>
|
||||
<img src="https://lxnapi.ccttiot.com/bike/img/static/uBV6yOFFWUvTValGnmfw" alt="">
|
||||
|
@ -186,7 +186,7 @@
|
|||
<img src="https://lxnapi.ccttiot.com/bike/img/static/uDOL2U9faZ5ku81NTPnU" alt="">异常排查车辆
|
||||
</div>
|
||||
<div class="cont_li_bot">
|
||||
{{ StatisticsInfo.operationVo.faultOrderCount }}
|
||||
{{ StatisticsInfo.operationVo.faultOrderCount }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_li">
|
||||
|
@ -219,6 +219,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
StatisticsInfo: {},
|
||||
userName: undefined,
|
||||
chartInstance:null
|
||||
};
|
||||
},
|
||||
|
@ -226,6 +227,7 @@ export default {
|
|||
|
||||
},
|
||||
mounted() {
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.AdminStatistics();
|
||||
window.addEventListener('resize', this.handleResize);
|
||||
},
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<!-- 代付款订单数 -->
|
||||
<div class="top_cont">
|
||||
<div class="cont_left">
|
||||
<div class="cont_left_top">付款订单数</div>
|
||||
<div class="cont_left_top">待付款订单数</div>
|
||||
<div class="cont_left_cent">{{StatisticsInfo.unpaidOrderCount}}</div>
|
||||
<div class="cont_left_bot">待付款订单金额:{{StatisticsInfo.unpaidOrderFee}}</div>
|
||||
</div>
|
||||
|
@ -208,7 +208,7 @@
|
|||
<div class="bot_box">
|
||||
<div class="tit">运维状态</div>
|
||||
<div class="cont_box">
|
||||
|
||||
|
||||
<div class="cont_li">
|
||||
<div class="cont_li_top">
|
||||
<img src="https://lxnapi.ccttiot.com/bike/img/static/uDOL2U9faZ5ku81NTPnU" alt="">换电工单
|
||||
|
@ -276,12 +276,12 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getAreaOptions();
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleAreaChange(newAreaId) {
|
||||
|
@ -296,7 +296,7 @@ export default {
|
|||
},
|
||||
getAreaOptions() {
|
||||
getArealist().then(response => {
|
||||
|
||||
|
||||
this.areaOptions = response.data;
|
||||
this.areaId= this.areaOptions[0].areaId
|
||||
this.getAreastatistics()
|
||||
|
@ -310,7 +310,7 @@ export default {
|
|||
setTimeout(() => {
|
||||
this.drawLine()
|
||||
}, 1000);
|
||||
|
||||
|
||||
console.log("areaOptions", this.areaOptions);
|
||||
});
|
||||
},
|
||||
|
@ -514,7 +514,7 @@ export default {
|
|||
}
|
||||
|
||||
.info_li {
|
||||
|
||||
|
||||
margin-top: 1.25rem;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
|
196
src/views/system/area/guide.vue
Normal file
196
src/views/system/area/guide.vue
Normal file
|
@ -0,0 +1,196 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<div class="input-card-right">
|
||||
<div class="img">
|
||||
<image-upload v-model="picture" />
|
||||
</div>
|
||||
|
||||
<el-button :style="topRightCoord ? buttonStyleActive : buttonStyleInactive" @click="setClickType('topRight')">
|
||||
点击右上角坐标
|
||||
</el-button>
|
||||
|
||||
<el-button :style="bottomLeftCoord ? buttonStyleActive : buttonStyleInactive" @click="setClickType('bottomLeft')">
|
||||
点击左下角坐标
|
||||
</el-button>
|
||||
|
||||
<el-button @click="generateMap" :disabled="!canGenerateMap">
|
||||
生成导览地图
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div id="amap-container" class="map-container"></div>
|
||||
|
||||
<div class="coordinates">
|
||||
<div v-if="topRightCoord">右上角: {{ topRightCoord }}</div>
|
||||
<div v-if="bottomLeftCoord">左下角: {{ bottomLeftCoord }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
import globalConfig from '@/utils/config/globalConfig';
|
||||
import {getArea, optionselect as getAreaOptionselect} from "@/api/system/area";
|
||||
export default {
|
||||
name: "NewPage",
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
clickType: null,
|
||||
topRightCoord: null,
|
||||
bottomLeftCoord: null,
|
||||
markers: [],
|
||||
picture: '',
|
||||
buttonStyleActive: 'background-color: #409EFF; color: white;',
|
||||
buttonStyleInactive: 'background-color: #fff; color: #409EFF;',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
canGenerateMap() {
|
||||
return this.picture && this.topRightCoord && this.bottomLeftCoord;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const areaId = this.$route.params && this.$route.params.areaId;
|
||||
this.getArea(areaId);
|
||||
// this.getAreaList();
|
||||
},
|
||||
mounted() {
|
||||
this.initMap();
|
||||
},
|
||||
methods: {
|
||||
/** 查询运营区域详细 */
|
||||
getArea(areaId) {
|
||||
getArea(areaId).then(response => {
|
||||
this.queryParams.areaId = response.data.areaId;
|
||||
this.areaLon = response.data.longitude;
|
||||
this.areaLat = response.data.latitude;
|
||||
this.defaultAreaId = response.data.areaId;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
initMap() {
|
||||
AMapLoader.load({
|
||||
key: globalConfig.aMap.key,
|
||||
version: "2.0",
|
||||
plugins: [
|
||||
"AMap.ToolBar",
|
||||
"AMap.Driving",
|
||||
"AMap.PolygonEditor",
|
||||
"AMap.PlaceSearch",
|
||||
],
|
||||
}).then((AMap) => {
|
||||
this.map = new AMap.Map("amap-container", {
|
||||
viewMode: "3D",
|
||||
zoom: 13,
|
||||
});
|
||||
this.map.setFitView();
|
||||
this.map.on('click', this.handleMapClick);
|
||||
}).catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
setClickType(type) {
|
||||
this.clickType = type;
|
||||
},
|
||||
handleMapClick(event) {
|
||||
const lnglat = event.lnglat;
|
||||
|
||||
if (this.clickType === 'topRight') {
|
||||
this.topRightCoord = lnglat;
|
||||
} else if (this.clickType === 'bottomLeft') {
|
||||
this.bottomLeftCoord = lnglat;
|
||||
}
|
||||
|
||||
// 创建标记
|
||||
const marker = new AMap.Marker({
|
||||
position: lnglat,
|
||||
});
|
||||
this.map.add(marker);
|
||||
this.markers.push(marker);
|
||||
|
||||
// 清除点击类型
|
||||
this.clickType = null;
|
||||
},
|
||||
clearMarkers() {
|
||||
this.markers.forEach(marker => {
|
||||
this.map.remove(marker);
|
||||
});
|
||||
this.markers = [];
|
||||
this.topRightCoord = null;
|
||||
this.bottomLeftCoord = null;
|
||||
},
|
||||
generateMap() {
|
||||
if (!this.canGenerateMap) {
|
||||
this.$message.error('请上传图片并选择两个坐标点');
|
||||
return;
|
||||
}
|
||||
|
||||
// 确保坐标精度
|
||||
const lnglatToFixed = (lnglat) => ({
|
||||
lng: lnglat.lng.toFixed(6),
|
||||
lat: lnglat.lat.toFixed(6)
|
||||
});
|
||||
|
||||
const topRight = lnglatToFixed(this.topRightCoord);
|
||||
const bottomLeft = lnglatToFixed(this.bottomLeftCoord);
|
||||
|
||||
// 计算边界
|
||||
const bounds = new AMap.Bounds([bottomLeft.lng, bottomLeft.lat], [topRight.lng, topRight.lat]);
|
||||
|
||||
// 创建图片图层
|
||||
const imageLayer = new AMap.ImageLayer({
|
||||
url: this.picture,
|
||||
bounds: bounds,
|
||||
zooms: [15, 20]
|
||||
});
|
||||
|
||||
// 清除现有图层
|
||||
this.map.getLayers().forEach(layer => {
|
||||
if (layer instanceof AMap.ImageLayer) {
|
||||
this.map.remove(layer);
|
||||
}
|
||||
});
|
||||
|
||||
// 添加图片图层
|
||||
this.map.add(imageLayer);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.map-container {
|
||||
width: 100%;
|
||||
height: 90vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
border: 1px solid rgb(204, 204, 204);
|
||||
}
|
||||
|
||||
.input-card-right {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: flex-end;
|
||||
// justify-content: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.coordinates {
|
||||
position: absolute;
|
||||
bottom: 15px;
|
||||
left: 15px;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
|
@ -64,6 +64,13 @@
|
|||
<span>去设置</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="导览地图" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/system/guide/index/' + scope.row.areaId" class="link-type">
|
||||
<span>去设置</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收费方式" align="center" prop="ruleStr" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="联系人" align="center" prop="contact" />
|
||||
|
@ -114,7 +121,7 @@
|
|||
<!-- </el-row>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -247,13 +254,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="停车点外还车调度" label-width="150">
|
||||
<el-switch v-model="form.parkingOutDispatch" class="drawer-switch" />
|
||||
<el-form-item label="是否开启押金抵扣" label-width="120">
|
||||
<el-switch v-model="form.isDepositDeduction" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电子围栏外还车调度" label-width="150">
|
||||
<el-switch v-model="form.areaOutDispatch" class="drawer-switch" />
|
||||
<el-form-item label="还车是否拍照审核" label-width="120">
|
||||
<el-switch v-model="form.returnVerify" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -261,66 +268,40 @@
|
|||
<el-col :span="8">
|
||||
<el-form-item label="禁行区内断电" label-width="90">
|
||||
<el-switch v-model="form.noRidingOutage" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.noRidingOutage" style="width: 60%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实名认证">
|
||||
<el-switch v-model="form.authentication" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.authentication" style="width: 60%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="短信通知服务" label-width="90">
|
||||
<el-switch v-model="form.msgSwitch" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.msgSwitch" style="width: 60%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="强制停车点还车" label-width="90">
|
||||
<el-switch v-model="form.parkingReturn" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.parkingReturn" style="width: 60%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.parkingReturn==false" style="padding-left: 10px">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="停车点外还车调度" label-width="150">
|
||||
<el-switch v-model="form.parkingOutDispatch" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运营区外还车调度" label-width="150">
|
||||
<el-switch v-model="form.areaOutDispatch" class="drawer-switch" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运营区外还车" label-width="120">
|
||||
<el-switch v-model="form.areaOutReturn" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.areaOutReturn" style="width: 60%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否开启押金抵扣" label-width="120">
|
||||
<el-switch v-model="form.isDepositDeduction" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.isDepositDeduction" style="width: 60%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="还车是否拍照审核" label-width="120">
|
||||
<el-switch v-model="form.returnVerify" class="drawer-switch" />
|
||||
<!-- <el-radio-group v-model="form.returnVerify" style="width: 50%">-->
|
||||
<!-- <el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"-->
|
||||
<!-- :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -388,11 +369,6 @@
|
|||
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="超出电子围栏多少时长断电(s)" label-width="150">-->
|
||||
<!-- <el-input-number style="width: 50%" v-model="form.outage" placeholder="超出电子围栏多少时长断电(s)"></el-input-number>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
@ -401,10 +377,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item label="电子围栏" prop="boundaryStr">-->
|
||||
<!-- <area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr"-->
|
||||
<!-- @center="center" @mapList="mapList" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经度" prop="longitude">
|
||||
|
@ -427,7 +399,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listArea, getArea, delArea, addArea, updateArea } from "@/api/system/area";
|
||||
import { listArea, getArea, delArea, addArea, updateArea, updateArea2 } from "@/api/system/area";
|
||||
import AreaMap from "@/components/AreaMap";
|
||||
import { listFee } from "@/api/system/fee";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
|
@ -762,6 +734,10 @@ export default {
|
|||
data.areaOutReturn = data.areaOutReturn ? "1" : "0";
|
||||
data.isDepositDeduction = data.isDepositDeduction ? "1" : "0";
|
||||
data.returnVerify = data.returnVerify ? "1" : "0";
|
||||
if(data.isDepositDeduction === '1' && data.returnVerify === '1'){
|
||||
this.$modal.msgError("押金抵扣和拍照审核不能同时开启");
|
||||
return
|
||||
}
|
||||
// console.log(data, 'data without cityList, countyList, provinceList');
|
||||
// console.log(this.form,'formformformformform');
|
||||
if (this.form.areaId != null) {
|
||||
|
@ -782,6 +758,28 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm2() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.areaId != null) {
|
||||
updateArea2({areaId:this.form.areaId,boundary:this.form.boundary,boundaryStr:this.form.boundaryStr}).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.mapopen = false
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addArea(data).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const areaIds = row.areaId || this.ids;
|
||||
|
|
|
@ -122,14 +122,14 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-check"
|
||||
v-if="scope.row.status == '5' && userName != 'admin'"
|
||||
v-if="scope.row.status == '5'"
|
||||
@click="handleAudit(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
>审核</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '6' && userName != 'admin'"
|
||||
v-if="scope.row.status == '6'"
|
||||
icon="el-icon-money"
|
||||
@click="toCommunicate(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
|
|
|
@ -566,6 +566,8 @@ export default {
|
|||
this.title = "修改运营商";
|
||||
this.form.isProfitSharing = this.form.isProfitSharing === 'true';
|
||||
this.form.isUsePlatformApp = this.form.isUsePlatformApp === 'true';
|
||||
console.log("userName==========="+response.data.userName)
|
||||
this.form.appUserId = response.data.userName;
|
||||
listArea().then(response => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
|
|
|
@ -137,6 +137,17 @@
|
|||
v-hasPermi="['system:device:edit']"
|
||||
>一键入仓</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="refresh"
|
||||
v-hasPermi="['system:device:edit']"
|
||||
>更新</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
|
@ -308,39 +319,34 @@
|
|||
<!-- 添加或修改设备对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="SN" prop="sn">
|
||||
<el-input v-model="form.sn" placeholder="请输入设备SN" :disabled="title=='修改设备' && userName != 'admin'"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="MAC" prop="mac">
|
||||
<el-input v-model="form.mac" placeholder="请输入设备MAC" :disabled="title=='修改设备'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆型号" prop="modelId" >
|
||||
<el-select v-model="form.modelId" clearable placeholder="请选择车辆型号">
|
||||
<el-option
|
||||
v-for="item in modelOptions"
|
||||
:key="item.modelId"
|
||||
:label="item.model"
|
||||
:value="item.modelId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SN" prop="sn">
|
||||
<el-input v-model="form.sn" placeholder="请输入设备SN" :disabled="title=='修改设备' && userName != 'admin'"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车牌号" prop="vehicleNum">
|
||||
<el-input v-model="form.vehicleNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运营商" prop="operator">
|
||||
<el-select v-model="form.deptId" clearable placeholder="请选择运营商">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运营区" prop="areaId" >
|
||||
<el-select v-model="form.areaId" clearable placeholder="请选择运营区">
|
||||
<el-option
|
||||
|
@ -352,26 +358,57 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="剩余电量" prop="remainingPower">
|
||||
<el-input v-model="form.remainingPower" placeholder="请输入剩余电量" disabled/>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车辆型号" prop="modelId" >
|
||||
<el-select v-model="form.modelId" clearable placeholder="请选择车辆型号">
|
||||
<el-option
|
||||
v-for="item in modelOptions"
|
||||
:key="item.modelId"
|
||||
:label="item.model"
|
||||
:value="item.modelId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="电压" prop="voltage">
|
||||
<el-input v-model="form.voltage" placeholder="请输入剩余电量" disabled/>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="经度" prop="longitude">
|
||||
<el-input v-model="form.longitude" placeholder="请输入经度" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="title=='修改设备'">
|
||||
<el-form-item label="纬度" prop="latitude">
|
||||
<el-input v-model="form.latitude" placeholder="请输入纬度" disabled/>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="硬件版本" prop="deviceName">
|
||||
<el-select v-model="form.hardwareVersionId" clearable placeholder="请选择硬件版本">
|
||||
<el-option
|
||||
v-for="item in hardwareVersionOptions"
|
||||
:key="item.id"
|
||||
:label="item.version"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<div v-if="title=='修改设备'">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="剩余电量" prop="remainingPower">
|
||||
<el-input v-model="form.remainingPower" placeholder="请输入剩余电量" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电压" prop="voltage">
|
||||
<el-input v-model="form.voltage" placeholder="请输入剩余电量" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经度" prop="longitude">
|
||||
<el-input v-model="form.longitude" placeholder="请输入经度" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纬度" prop="latitude">
|
||||
<el-input v-model="form.latitude" placeholder="请输入纬度" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
@ -482,7 +519,7 @@
|
|||
reboot,
|
||||
oneClickListing,
|
||||
oneClickWarehousing,
|
||||
seatCushionLock
|
||||
seatCushionLock, refreshDevice
|
||||
} from '@/api/system/device'
|
||||
import Map from "@/components/Map";
|
||||
import OrderRecord from "@/views/system/device/components/orderRecord.vue";
|
||||
|
@ -491,15 +528,18 @@ import ReplacementRecord from "@/views/system/device/components/replacementRecor
|
|||
import PlaceSearchDialog from '@/components/Map/location/PlaceSearchDialog';
|
||||
import { parseTime } from '../../../utils/ruoyi';
|
||||
import LocationMap from '@/components/Map/location/LocationMap.vue';
|
||||
import { getModel, listModel } from '@/api/system/model'
|
||||
import { getModel, listModel } from '@/api/system/model'
|
||||
import QrCode from "@/components/QrCode/index.vue";
|
||||
import { listArea } from '@/api/system/area'
|
||||
import { listDept } from '@/api/system/dept'
|
||||
import { listArea, selectAreaListByDeptId, selectDeptByAreaId } from '@/api/system/area'
|
||||
import { listDept } from '@/api/system/dept'
|
||||
import { listHardwareVersion } from '@/api/system/hardwareVersion'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Device",
|
||||
dicts: ['as_online_status', 'as_device_status','et_device_lock_status'],
|
||||
components: { Map, OrderRecord, RepairRecord, ReplacementRecord, QrCode, PlaceSearchDialog, LocationMap },
|
||||
components: { Map, OrderRecord, RepairRecord, ReplacementRecord, QrCode, PlaceSearchDialog, LocationMap,Treeselect },
|
||||
props: {
|
||||
initLng: {
|
||||
type: Number,
|
||||
|
@ -541,6 +581,7 @@ export default {
|
|||
open2: false,
|
||||
// 设备型号下拉框
|
||||
modelOptions: [],
|
||||
hardwareVersionOptions: [],
|
||||
// 运营区下拉框
|
||||
areaOptions: [],
|
||||
// 通过key重新渲染area-map组件
|
||||
|
@ -600,24 +641,24 @@ export default {
|
|||
});
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
// console.log("------"+this.activeIndex)
|
||||
listHardwareVersion(this.queryParams).then(response => {
|
||||
this.hardwareVersionOptions = response.rows;
|
||||
});
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
listModel(this.queryParams).then(response => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
listArea(this.queryParams).then(response => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
'form.modelId': function(newVal) {
|
||||
if (newVal) {
|
||||
this.fetchData(newVal);
|
||||
}
|
||||
this.fetchData(newVal);
|
||||
},
|
||||
'form.deptId': function(newVal) {
|
||||
this.fetchData2(newVal);
|
||||
},
|
||||
'form.areaId': function(newVal) {
|
||||
this.fetchData3(newVal);
|
||||
},
|
||||
open2(val) {
|
||||
if (!val) {
|
||||
|
@ -638,12 +679,56 @@ export default {
|
|||
},
|
||||
/** 当选择车型时调用 */
|
||||
fetchData(modelId) {
|
||||
// console.log("根据车型id查询运营商"+modelId)
|
||||
getModel(modelId).then(response => {
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
areaOptions.length > 0 ? this.form.areaId = areaOptions[0].areaId : this.form.areaId = null;
|
||||
});
|
||||
if(modelId){
|
||||
getModel(modelId).then(response => {
|
||||
// console.log("根据车型id查询运营商=========",response.data)
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
if(response.data.operator){
|
||||
this.form.deptId = response.data.operator;
|
||||
}else{
|
||||
this.form.deptId = null;
|
||||
}
|
||||
areaOptions.length > 0 ? this.form.areaId = areaOptions[0].areaId : this.form.areaId = null;
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
/** 当选择运营商时 根据运营商id,获取运营区和型号 */
|
||||
fetchData2(deptId) {
|
||||
if(deptId){
|
||||
selectAreaListByDeptId(deptId).then(response => {
|
||||
console.log("根据运营商id,获取运营区和型号=========",response.data)
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
areaOptions.length > 0 ? this.form.areaId = areaOptions[0].areaId : this.form.areaId = null;
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
modelOptions.length > 0 ? this.form.modelId = modelOptions[0].modelId : this.form.modelId = null;
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
// this.form.areaId = null;
|
||||
// this.form.modelId = null;
|
||||
}
|
||||
},
|
||||
/** 当选择运营区时 根据运营区id,获取运营商和型号 */
|
||||
fetchData3(areaId) {
|
||||
if(areaId){
|
||||
selectDeptByAreaId(areaId).then(response => {
|
||||
console.log("根据运营商id,获取运营区和型号=========",response.data)
|
||||
this.form.deptId = response.data.sysDept.deptId;
|
||||
// this.areaOptions = response.data.areaList;
|
||||
// let areaOptions = response.data.areaList;
|
||||
// areaOptions.length > 0 ? this.form.areaId = areaOptions[0].areaId : this.form.areaId = null;
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
modelOptions.length > 0 ? this.form.modelId = modelOptions[0].modelId : this.form.modelId = null;
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
/** 排序触发事件 */
|
||||
handleSortChange(column, prop, order) {
|
||||
|
@ -691,6 +776,14 @@ export default {
|
|||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 更新*/
|
||||
refresh(row){
|
||||
const deviceIds = row.deviceId || this.ids;
|
||||
refreshDevice(deviceIds).then(response => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
});
|
||||
},
|
||||
/** 一键入仓*/
|
||||
oneClickWarehousing(row){
|
||||
const deviceIds = row.deviceId || this.ids;
|
||||
|
@ -767,6 +860,8 @@ export default {
|
|||
deviceName: null,
|
||||
mac: null,
|
||||
areaId: null,
|
||||
deptId: null,
|
||||
modelId: null,
|
||||
activationTime: null,
|
||||
onlineStatus: null,
|
||||
createBy: null,
|
||||
|
@ -782,6 +877,17 @@ export default {
|
|||
latitude: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
listModel(this.queryParams).then(response => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
listArea(this.queryParams).then(response => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
<el-radio-group v-model="form.rentalUnit" @change="handleUnitChange">
|
||||
<el-radio label="minutes">按分钟</el-radio>
|
||||
<el-radio label="hours">按小时</el-radio>
|
||||
<el-radio label="day">按天</el-radio>
|
||||
<!-- <el-radio label="day">按天</el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 计费周期和封顶金额,只在非按天计费时显示 -->
|
||||
|
@ -289,10 +289,10 @@
|
|||
style="width: 80px; display: inline-block; margin-left: 10px;" />
|
||||
小时
|
||||
</el-radio>
|
||||
<el-radio label="2">
|
||||
自定义时刻
|
||||
<el-time-picker v-model="time2" value-format="HH:mm:ss" placeholder="选择时间" style="margin-left: 10px;" />
|
||||
</el-radio>
|
||||
<!-- <el-radio label="2">-->
|
||||
<!-- 自定义时刻-->
|
||||
<!-- <el-time-picker v-model="time2" value-format="HH:mm:ss" placeholder="选择时间" style="margin-left: 10px;" />-->
|
||||
<!-- </el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.rentalUnit != 'day'">
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
<el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>
|
||||
<el-table-column label="支付手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商分账" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||
<el-table-column label="账变金额" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
||||
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
|
|
280
src/views/system/hardwareVersion/index.vue
Normal file
280
src/views/system/hardwareVersion/index.vue
Normal file
|
@ -0,0 +1,280 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input
|
||||
v-model="queryParams.version"
|
||||
placeholder="请输入版本号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产时间" prop="productionTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.productionTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择生产时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:hardwareVersion:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:hardwareVersion:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:hardwareVersion:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:hardwareVersion:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="hardwareVersionList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="版本号" align="center" prop="version" />
|
||||
<el-table-column label="生产时间" align="center" prop="productionTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.productionTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="版本说明" align="center" prop="instructions" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:hardwareVersion:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:hardwareVersion:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改硬件版本对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="form.version" placeholder="请输入版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产时间" prop="productionTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.productionTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择生产时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本说明" prop="instructions">
|
||||
<el-input v-model="form.instructions" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listHardwareVersion, getHardwareVersion, delHardwareVersion, addHardwareVersion, updateHardwareVersion } from "@/api/system/hardwareVersion";
|
||||
|
||||
export default {
|
||||
name: "HardwareVersion",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 硬件版本表格数据
|
||||
hardwareVersionList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
version: null,
|
||||
productionTime: null,
|
||||
instructions: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询硬件版本列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listHardwareVersion(this.queryParams).then(response => {
|
||||
this.hardwareVersionList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
version: null,
|
||||
productionTime: null,
|
||||
quantity: null,
|
||||
instructions: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加硬件版本";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getHardwareVersion(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改硬件版本";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateHardwareVersion(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addHardwareVersion(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除硬件版本编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delHardwareVersion(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/hardwareVersion/export', {
|
||||
...this.queryParams
|
||||
}, `hardwareVersion_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -328,7 +328,8 @@
|
|||
offset: new AMap.Pixel(0, -30)
|
||||
});
|
||||
//设备点标记
|
||||
this.deviceMarker();
|
||||
console.log("this.areaId============="+this.areaId)
|
||||
this.deviceMarker(this.areaId);
|
||||
//运营区边界
|
||||
this.areaList.forEach(area => {
|
||||
this.addArea(JSON.parse(area.boundaryStr) || []);
|
||||
|
@ -359,10 +360,24 @@
|
|||
freshMarker(points) {
|
||||
let that = this;
|
||||
|
||||
console.log("刷新点标记====",points)
|
||||
|
||||
// 检查 points 数据格式
|
||||
if (!Array.isArray(points)) {
|
||||
console.error("Points data is not an array");
|
||||
return;
|
||||
}
|
||||
console.log("this.cluster=======",this.cluster)
|
||||
|
||||
// 聚合对象存在,则修改数据
|
||||
if (this.cluster != null) {
|
||||
this.cluster.setData(points);
|
||||
}else {
|
||||
if (this.cluster) {
|
||||
try {
|
||||
this.cluster.setData(points);
|
||||
} catch (error) {
|
||||
console.error("Error setting cluster data: ", error);
|
||||
}
|
||||
} else {
|
||||
// 插件未加载的情况
|
||||
this.map.plugin(["AMap.MarkerCluster"], () => {
|
||||
that.cluster = new AMap.MarkerCluster(
|
||||
this.map, //地图实例
|
||||
|
@ -372,7 +387,13 @@
|
|||
renderMarker: this.getRenderMarker, //上述步骤的自定义非聚合点样式
|
||||
}
|
||||
);
|
||||
that.cluster.on('click', that.onClickCluster)
|
||||
// 检查 cluster 对象是否正确初始化
|
||||
if (that.cluster) {
|
||||
console.log("Cluster 初始化成功");
|
||||
that.cluster.on('click', that.onClickCluster);
|
||||
} else {
|
||||
console.error("初始化失败 cluster");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -525,7 +546,7 @@
|
|||
|
||||
this.markers.push(marker);
|
||||
|
||||
console.log("title============="+title)
|
||||
// console.log("title============="+title)
|
||||
// 创建一个 Text 实例来显示标题
|
||||
let text = new AMap.Text({
|
||||
text: title,
|
||||
|
@ -543,11 +564,12 @@
|
|||
|
||||
// 将文本标签添加到地图实例
|
||||
this.map.add(text);
|
||||
console.log("text=============",text)
|
||||
// console.log("text=============",text)
|
||||
this.labels.push(text)
|
||||
},
|
||||
deviceMarker(){
|
||||
listDevice({pageNum: 1,pageSize: 999}).then(response => {
|
||||
deviceMarker(areaId){
|
||||
this.data = [];
|
||||
listDevice({pageNum: 1,pageSize: 999,areaId:areaId}).then(response => {
|
||||
this.deviceList = response.rows;
|
||||
this.deviceList.forEach(device => {
|
||||
// 检查经纬度是否为空且为有效数字
|
||||
|
|
|
@ -238,6 +238,7 @@ export default {
|
|||
reset() {
|
||||
this.form = {
|
||||
modelId: null,
|
||||
hardwareVersionId: null,
|
||||
model: null,
|
||||
brand: null,
|
||||
operator: null,
|
||||
|
|
|
@ -148,7 +148,6 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 1 || scope.row.status == 3"
|
||||
v-show="scope.row.isDepositDeduction == '1'"
|
||||
icon="el-icon-wallet"
|
||||
@click="deduction(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
|
|
253
src/views/system/softwareVersion/index.vue
Normal file
253
src/views/system/softwareVersion/index.vue
Normal file
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input
|
||||
v-model="queryParams.version"
|
||||
placeholder="请输入版本号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:softwareVersion:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:softwareVersion:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:softwareVersion:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:softwareVersion:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="softwareVersionList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="版本号" align="center" prop="version" />
|
||||
<el-table-column label="更新内容" align="center" prop="content" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:softwareVersion:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:softwareVersion:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改软件版本对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="form.version" placeholder="请输入版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新内容">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSoftwareVersion, getSoftwareVersion, delSoftwareVersion, addSoftwareVersion, updateSoftwareVersion } from "@/api/system/softwareVersion";
|
||||
|
||||
export default {
|
||||
name: "SoftwareVersion",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 软件版本表格数据
|
||||
softwareVersionList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
version: null,
|
||||
content: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询软件版本列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSoftwareVersion(this.queryParams).then(response => {
|
||||
this.softwareVersionList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
version: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
content: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加软件版本";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getSoftwareVersion(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改软件版本";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateSoftwareVersion(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSoftwareVersion(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除软件版本编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delSoftwareVersion(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/softwareVersion/export', {
|
||||
...this.queryParams
|
||||
}, `softwareVersion_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -215,20 +215,27 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="归属运营商" prop="deptId">
|
||||
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属运营商" />
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
||||
<el-form-item label="运营商" prop="deptId">
|
||||
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属运营商" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
||||
<el-form-item label="运营区" prop="areaId" >
|
||||
<el-select v-model="form.areaId" clearable placeholder="请选择运营区">
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
:label="item.areaName"
|
||||
:value="item.areaId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -264,18 +271,6 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区" prop="areaId" >
|
||||
<el-select v-model="form.areaId" clearable placeholder="请选择运营区">
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
:label="item.areaName"
|
||||
:value="item.areaId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5" v-if="userName != 'admin'">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
|
@ -92,7 +92,7 @@
|
|||
<el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>
|
||||
<el-table-column label="支付手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商分账" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||
<el-table-column label="账变金额" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
||||
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
|
@ -129,6 +129,25 @@
|
|||
<!-- 添加或修改资金流水对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="运营商" prop="operator" v-if="userName == 'admin'">
|
||||
<el-select v-model="form.deptId" clearable placeholder="请选择运营商">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提现方式">
|
||||
<el-radio-group v-model="form.method">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.et_withdraw_method"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="提现金额:" prop="amount">
|
||||
<el-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" /> 元
|
||||
</el-form-item>
|
||||
|
@ -153,11 +172,11 @@
|
|||
<el-form-item label="区域:">{{ form3.areaName }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="提现金额:"><span style="color: red;font-weight: 700">{{ form3.amount }}</span> 元</el-form-item>
|
||||
<el-form-item label="提现金额:"><span style="color: red;font-weight: 700">{{ form3.amount + form3.handlingCharge }}</span> 元</el-form-item>
|
||||
<el-form-item label="支付手续费:"><span style="color: red;font-weight: 700">{{ form3.handlingCharge }}</span> 元</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="实际到账:"><span style="color: red;font-weight: 700">{{ form3.amount - form3.handlingCharge }}</span> 元</el-form-item>
|
||||
<el-form-item label="实际到账:"><span style="color: red;font-weight: 700">{{ form3.amount }}</span> 元</el-form-item>
|
||||
<el-form-item label="运营商结余:"><span style="color: red;font-weight: 700">{{ form3.operatorBalance }}</span> 元</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -186,14 +205,18 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listFlow, getFlow, delFlow, addFlow, updateFlow, withdraw, rejectWithdraw } from '@/api/system/flow'
|
||||
import { listFlow, getFlow, delFlow, updateFlow, withdraw, rejectWithdraw } from '@/api/system/flow'
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
import { updateWithdraw } from '@/api/system/withdraw'
|
||||
import { getDeptByToken } from '@/api/system/dept'
|
||||
import { getDeptByToken, listDept } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: "Flow",
|
||||
dicts: ['et_business_type', 'et_pay_type', 'et_flow_type','et_flow_status'],
|
||||
dicts: ['et_business_type', 'et_pay_type', 'et_flow_type','et_flow_status','et_withdraw_method'],
|
||||
watch: {
|
||||
'form.deptId': function(newVal) {
|
||||
this.getDept(newVal);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
formattedFee() {
|
||||
console.log("handlingCharge===========",this.handlingCharge)
|
||||
|
@ -229,6 +252,7 @@ export default {
|
|||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
deptOptions: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
@ -261,7 +285,8 @@ export default {
|
|||
orderNo: null,
|
||||
outTradeNo: null,
|
||||
type: null,
|
||||
busType: '5',
|
||||
busType: '',
|
||||
typeList: '5,6',
|
||||
amount: null,
|
||||
handlingCharge: null,
|
||||
operatorDividend: null,
|
||||
|
@ -297,8 +322,19 @@ export default {
|
|||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDept(deptId){
|
||||
getDeptByToken(deptId).then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
},
|
||||
/** 审核 */
|
||||
handleEdit(row) {
|
||||
this.open3 = true;
|
||||
|
@ -379,7 +415,8 @@ export default {
|
|||
operatorBalance: null,
|
||||
partnerDividend: null,
|
||||
payType: null,
|
||||
createTime: null
|
||||
createTime: null,
|
||||
method: "1"
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -401,11 +438,13 @@ export default {
|
|||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
//查询余额
|
||||
getDeptByToken().then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
if(this.userName != 'admin'){
|
||||
//查询余额
|
||||
getDeptByToken().then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
}
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "申请提现";
|
||||
|
|
Loading…
Reference in New Issue
Block a user