1.硬件版本

2.软件版本
This commit is contained in:
邱贞招 2024-07-22 17:18:28 +08:00
parent 3038670ad8
commit 0edaeb9761
16 changed files with 832 additions and 138 deletions

View File

@ -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',
})
}
// 修改运营区
@ -70,3 +70,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'
})
}

View 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'
})
}

View 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'
})
}

View 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

View 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

View File

@ -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);
},

View File

@ -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;

View File

@ -247,13 +247,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 +261,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>

View File

@ -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']"

View File

@ -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;
});

View File

@ -308,39 +308,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 +347,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>
@ -491,15 +517,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 +570,7 @@ export default {
open2: false,
//
modelOptions: [],
hardwareVersionOptions: [],
//
areaOptions: [],
// keyarea-map
@ -600,24 +630,19 @@ export default {
});
this.userName = this.$store.state.user.name;
this.getList();
// console.log("------"+this.activeIndex)
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;
listHardwareVersion(this.queryParams).then(response => {
this.hardwareVersionOptions = 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 +663,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) {
@ -767,6 +836,8 @@ export default {
deviceName: null,
mac: null,
areaId: null,
deptId: null,
modelId: null,
activationTime: null,
onlineStatus: null,
createBy: null,
@ -782,6 +853,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() {

View 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>

View File

@ -238,6 +238,7 @@ export default {
reset() {
this.form = {
modelId: null,
hardwareVersionId: null,
model: null,
brand: null,
operator: null,

View File

@ -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']"

View 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>

View File

@ -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">