|
|
@@ -342,24 +342,19 @@
|
|
|
key="serialnumber"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="device_name" label="设备名称" :width="breadth" key="device_name">
|
|
|
+ <el-table-column prop="device_name" label="设备名称" key="device_name">
|
|
|
<template slot-scope="scope">{{
|
|
|
scope.row.device_name == '' ? '无' : scope.row.device_name
|
|
|
}}</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="device_id" label="设备ID" width="160px" key="device_id">
|
|
|
+ <el-table-column prop="device_id" label="设备ID" key="device_id">
|
|
|
<template slot-scope="scope">{{ scope.row.device_id }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="device_type_id"
|
|
|
- label="设备类型"
|
|
|
- :width="breadth"
|
|
|
- key="device_type_id"
|
|
|
- >
|
|
|
+ <el-table-column prop="device_type_id" label="设备类型" key="device_type_id">
|
|
|
<template slot-scope="scope">{{ scope.row.device_type_id | typeVal }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="device_user" label="适配用户" key="device_user" :width="breadth">
|
|
|
+ <el-table-column prop="device_user" label="适配用户" key="device_user">
|
|
|
<template slot-scope="scope">{{
|
|
|
scope.row.device_user == '' ? '无' : scope.row.device_user
|
|
|
}}</template>
|
|
|
@@ -369,7 +364,6 @@
|
|
|
<el-table-column
|
|
|
prop="device_activation_time"
|
|
|
label="设备激活时间"
|
|
|
- width="160px"
|
|
|
key="device_activation_time"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -386,7 +380,6 @@
|
|
|
v-if="$QueryPermission(325)"
|
|
|
prop="device_expire_time"
|
|
|
label="设备到期时间"
|
|
|
- width="160px"
|
|
|
key="device_expire_time"
|
|
|
>
|
|
|
<template slot-scope="scope" style="border: 1px solid #000">
|
|
|
@@ -401,7 +394,6 @@
|
|
|
v-if="$QueryPermission(325)"
|
|
|
prop="device_expire_days"
|
|
|
label="设备剩余天数"
|
|
|
- :width="breadth"
|
|
|
key="device_expire_days"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -426,7 +418,6 @@
|
|
|
<el-table-column
|
|
|
prop="device_expire_days"
|
|
|
label="权重"
|
|
|
- :width="breadth"
|
|
|
v-if="$QueryPermission(275) & cancelShow"
|
|
|
key="device_expire_days2"
|
|
|
>
|
|
|
@@ -443,7 +434,6 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
prop="dver_num"
|
|
|
label="位置"
|
|
|
- :width="breadth"
|
|
|
key="dver_num"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -1208,7 +1198,7 @@ export default {
|
|
|
|
|
|
dispose(value) {
|
|
|
return value.split('-')[1]
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
var checkphone = (rule, value, callback) => {
|
|
|
@@ -1238,21 +1228,21 @@ export default {
|
|
|
device_status: '',
|
|
|
start_time: '',
|
|
|
end_time: '',
|
|
|
- salesman_task_number: '',
|
|
|
+ salesman_task_number: ''
|
|
|
},
|
|
|
dataList: [],
|
|
|
totalNum: 0,
|
|
|
addr: '',
|
|
|
locationForm: {
|
|
|
lat: '',
|
|
|
- lng: '',
|
|
|
+ lng: ''
|
|
|
},
|
|
|
editFault: {
|
|
|
imei: '',
|
|
|
user: '',
|
|
|
tel: '',
|
|
|
detail: '',
|
|
|
- type: '',
|
|
|
+ type: ''
|
|
|
},
|
|
|
device_id: '',
|
|
|
center: [], // 默认地图中心
|
|
|
@@ -1261,7 +1251,7 @@ export default {
|
|
|
editFaultrules: {
|
|
|
user: { required: true, message: '请输入联系人', trigger: 'blur' },
|
|
|
tel: { required: true, validator: checkphone, trigger: 'blur' },
|
|
|
- detail: { required: true, message: '请输入故障原因', trigger: 'blur' },
|
|
|
+ detail: { required: true, message: '请输入故障原因', trigger: 'blur' }
|
|
|
},
|
|
|
address: '', // 地图信息框显示的地址
|
|
|
// 图表和表格切换
|
|
|
@@ -1276,48 +1266,48 @@ export default {
|
|
|
networkingTypeList: [
|
|
|
{
|
|
|
label: 'GPRS',
|
|
|
- value: 0,
|
|
|
+ value: 0
|
|
|
},
|
|
|
{
|
|
|
label: '宽带',
|
|
|
- value: 1,
|
|
|
+ value: 1
|
|
|
},
|
|
|
{
|
|
|
label: '其他',
|
|
|
- value: 2,
|
|
|
- },
|
|
|
+ value: 2
|
|
|
+ }
|
|
|
],
|
|
|
// 设备状态
|
|
|
equipmentStatus: '',
|
|
|
equipmentStatusList: [
|
|
|
{
|
|
|
label: '生产',
|
|
|
- value: 0,
|
|
|
+ value: 0
|
|
|
},
|
|
|
{
|
|
|
label: '发货',
|
|
|
- value: 1,
|
|
|
+ value: 1
|
|
|
},
|
|
|
{
|
|
|
label: '安装',
|
|
|
- value: 2,
|
|
|
+ value: 2
|
|
|
},
|
|
|
{
|
|
|
label: '返修',
|
|
|
- value: 3,
|
|
|
+ value: 3
|
|
|
},
|
|
|
{
|
|
|
label: '更换',
|
|
|
- value: 4,
|
|
|
+ value: 4
|
|
|
},
|
|
|
{
|
|
|
label: '报废',
|
|
|
- value: 5,
|
|
|
+ value: 5
|
|
|
},
|
|
|
{
|
|
|
label: '对接',
|
|
|
- value: 6,
|
|
|
- },
|
|
|
+ value: 6
|
|
|
+ }
|
|
|
],
|
|
|
// 业务员信息
|
|
|
salesmanMessage: '',
|
|
|
@@ -1341,53 +1331,53 @@ export default {
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
+ days: '30'
|
|
|
},
|
|
|
{
|
|
|
id: '12345678987654321',
|
|
|
name: '一号杀虫灯',
|
|
|
- days: '30',
|
|
|
- },
|
|
|
+ days: '30'
|
|
|
+ }
|
|
|
],
|
|
|
// 充值套餐
|
|
|
steMealArr: [],
|
|
|
@@ -1399,20 +1389,20 @@ export default {
|
|
|
equipmentLimitList: [
|
|
|
{
|
|
|
value: '',
|
|
|
- label: '全部',
|
|
|
+ label: '全部'
|
|
|
},
|
|
|
{
|
|
|
value: '0',
|
|
|
- label: '未到期',
|
|
|
+ label: '未到期'
|
|
|
},
|
|
|
{
|
|
|
value: '2',
|
|
|
- label: '即将到期',
|
|
|
+ label: '即将到期'
|
|
|
},
|
|
|
{
|
|
|
value: '1',
|
|
|
- label: '已到期',
|
|
|
- },
|
|
|
+ label: '已到期'
|
|
|
+ }
|
|
|
],
|
|
|
adminList: ['1', '2', '3'],
|
|
|
activeIndA: 0,
|
|
|
@@ -1425,38 +1415,38 @@ export default {
|
|
|
2: {
|
|
|
name: '杀虫灯',
|
|
|
type: '2',
|
|
|
- price: 15,
|
|
|
+ price: 15
|
|
|
},
|
|
|
3: {
|
|
|
name: '测报灯',
|
|
|
type: '3',
|
|
|
- price: 100,
|
|
|
+ price: 100
|
|
|
},
|
|
|
7: {
|
|
|
name: '孢子仪',
|
|
|
type: '7',
|
|
|
- price: 100,
|
|
|
+ price: 100
|
|
|
},
|
|
|
5: {
|
|
|
name: '气象站',
|
|
|
type: '5',
|
|
|
- price: 60,
|
|
|
+ price: 60
|
|
|
},
|
|
|
4: {
|
|
|
name: '性诱测报',
|
|
|
type: '4',
|
|
|
- price: 15,
|
|
|
+ price: 15
|
|
|
},
|
|
|
8: {
|
|
|
name: '性诱测报3.0',
|
|
|
type: '8',
|
|
|
- price: 100,
|
|
|
+ price: 100
|
|
|
},
|
|
|
14: {
|
|
|
name: '病虫害可视监测',
|
|
|
type: '14',
|
|
|
- price: 100,
|
|
|
- },
|
|
|
+ price: 100
|
|
|
+ }
|
|
|
// 4: {
|
|
|
// name: "性诱测报",
|
|
|
// type: "4",
|
|
|
@@ -1490,7 +1480,7 @@ export default {
|
|
|
rechargeDataSource: {},
|
|
|
selectionDataSource: {}, // 分页选中的设备id存储
|
|
|
deviceUserList: [],
|
|
|
- searchLoading: false,
|
|
|
+ searchLoading: false
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -1509,7 +1499,7 @@ export default {
|
|
|
// }
|
|
|
// this.cancelShow = true;
|
|
|
// this.tableShow = false;
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
cancelShow(val) {
|
|
|
@@ -1532,32 +1522,32 @@ export default {
|
|
|
var data = [
|
|
|
{
|
|
|
id: 2,
|
|
|
- type_name: '杀虫灯',
|
|
|
+ type_name: '杀虫灯'
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
- type_name: '测报灯',
|
|
|
+ type_name: '测报灯'
|
|
|
},
|
|
|
{
|
|
|
id: 5,
|
|
|
- type_name: '环境监测',
|
|
|
+ type_name: '环境监测'
|
|
|
},
|
|
|
{
|
|
|
id: 7,
|
|
|
- type_name: '孢子仪',
|
|
|
+ type_name: '孢子仪'
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
- type_name: '性诱测报',
|
|
|
+ type_name: '性诱测报'
|
|
|
},
|
|
|
{
|
|
|
id: 8,
|
|
|
- type_name: '性诱测报3.0',
|
|
|
+ type_name: '性诱测报3.0'
|
|
|
},
|
|
|
{
|
|
|
id: 14,
|
|
|
- type_name: '病虫害可视监测',
|
|
|
- },
|
|
|
+ type_name: '病虫害可视监测'
|
|
|
+ }
|
|
|
]
|
|
|
this.typelist = data
|
|
|
this.queryInfo.page = 1 // 当前页码归1
|
|
|
@@ -1616,19 +1606,19 @@ export default {
|
|
|
title: '警告',
|
|
|
message: '将清空当前设备到期时间和激活时间,并且该设备后续不进行计费操作。',
|
|
|
type: 'warning',
|
|
|
- duration: 3000,
|
|
|
+ duration: 3000
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(['currentMyUID']),
|
|
|
operationArray() {
|
|
|
return map(flatten(values(this.selectionDataSource)), (id) => this.rechargeDataSource[id])
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
components: {
|
|
|
- typeCheck,
|
|
|
+ typeCheck
|
|
|
},
|
|
|
created() {
|
|
|
this.userType = sessionStorage.getItem('myuser_type') // 1/超级管理员 2,"经销商" 3"农林政府单位” 4普通用户” 5销售用户”
|
|
|
@@ -1670,8 +1660,8 @@ export default {
|
|
|
method: 'POST',
|
|
|
url: '/api/api_gateway?method=device.device_manage.device_user_list',
|
|
|
data: this.qs.stringify({
|
|
|
- username: e,
|
|
|
- }),
|
|
|
+ username: e
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
this.searchLoading = false
|
|
|
if (res.data.message == '') {
|
|
|
@@ -1719,18 +1709,18 @@ export default {
|
|
|
center: this.center,
|
|
|
resizeEnable: true,
|
|
|
zoom: 10,
|
|
|
- lang: 'en',
|
|
|
+ lang: 'en'
|
|
|
})
|
|
|
AMap.plugin(['AMap.ToolBar', 'AMap.Geocoder'], () => {
|
|
|
map.addControl(new AMap.ToolBar())
|
|
|
this.geocoder = new AMap.Geocoder({
|
|
|
city: '全国',
|
|
|
- radius: 1000,
|
|
|
+ radius: 1000
|
|
|
})
|
|
|
})
|
|
|
setTimeout(() => {
|
|
|
var marker = new AMap.Marker({
|
|
|
- position: this.center,
|
|
|
+ position: this.center
|
|
|
})
|
|
|
// console.log(this.center);
|
|
|
marker.setMap(map)
|
|
|
@@ -1745,14 +1735,14 @@ export default {
|
|
|
this.locationForm = { lng: lnglat[0], lat: lnglat[1] }
|
|
|
this.map.clearMap()
|
|
|
var marker = new AMap.Marker({
|
|
|
- position: lnglat,
|
|
|
+ position: lnglat
|
|
|
})
|
|
|
marker.setMap(this.map)
|
|
|
this.getAddress(lnglat)
|
|
|
setTimeout(() => {
|
|
|
new AMap.InfoWindow({
|
|
|
content: '<h5>' + '当前选中地址' + '</h5>' + this.address,
|
|
|
- offset: new AMap.Pixel(0, -32),
|
|
|
+ offset: new AMap.Pixel(0, -32)
|
|
|
}).open(this.map, lnglat)
|
|
|
}, 100)
|
|
|
})
|
|
|
@@ -1787,8 +1777,8 @@ export default {
|
|
|
salesman_task_number: this.queryInfo.salesman_task_number, // 业务员、任务单号筛选
|
|
|
overdue: this.equipmentLimit, // 0未到期,1已到期,2即将到期
|
|
|
batch: this.batch, // 判断当前是否为批量充值状态下
|
|
|
- device_user: this.queryInfo.device_user,
|
|
|
- }),
|
|
|
+ device_user: this.queryInfo.device_user
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
// console.log(res.data.data.data);
|
|
|
@@ -1805,7 +1795,7 @@ export default {
|
|
|
getSaleUserList() {
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=user.login.get_sale_user_list',
|
|
|
+ url: '/api/api_gateway?method=user.login.get_sale_user_list'
|
|
|
}).then((res) => {
|
|
|
if (res.data.data.length !== 0) {
|
|
|
this.userListOptions = res.data.data
|
|
|
@@ -1849,7 +1839,7 @@ export default {
|
|
|
this.map.setFitView(marker)
|
|
|
this.locationForm = {
|
|
|
lat: lnglat.lat,
|
|
|
- lng: lnglat.lng,
|
|
|
+ lng: lnglat.lng
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error('根据地址查询位置失败')
|
|
|
@@ -1869,7 +1859,7 @@ export default {
|
|
|
return '设备名称不能超过35个字符'
|
|
|
}
|
|
|
},
|
|
|
- inputPlaceholder: device_name,
|
|
|
+ inputPlaceholder: device_name
|
|
|
})
|
|
|
.then(({ value }) => {
|
|
|
if (value) {
|
|
|
@@ -1878,28 +1868,28 @@ export default {
|
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
|
|
|
data: this.qs.stringify({
|
|
|
device_id: id,
|
|
|
- device_name: value,
|
|
|
- }),
|
|
|
+ device_name: value
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
this.getList()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: '修改成功',
|
|
|
+ message: '修改成功'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: '内容不能为空',
|
|
|
+ message: '内容不能为空'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: '取消输入',
|
|
|
+ message: '取消输入'
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
@@ -1958,19 +1948,19 @@ export default {
|
|
|
this.$message({
|
|
|
message: '联网方式不能为空',
|
|
|
type: 'warning',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
} else if (this.equipmentStatus === '') {
|
|
|
this.$message({
|
|
|
message: '设备状态不能为空',
|
|
|
type: 'warning',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
} else if (this.salesmanMessage === '') {
|
|
|
this.$message({
|
|
|
message: '任务单号不能为空',
|
|
|
type: 'warning',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
}
|
|
|
// else if (this.sale_user_uid === "") {
|
|
|
@@ -1988,7 +1978,7 @@ export default {
|
|
|
networking: this.networkingType, // 联网方式
|
|
|
equipment_status: this.equipmentStatus, // 设备状态
|
|
|
salesman_task_number: this.salesmanMessage, // 业务员与人文单号
|
|
|
- sale_user_uid: this.sale_user_uid, // 销售用户id
|
|
|
+ sale_user_uid: this.sale_user_uid // 销售用户id
|
|
|
})
|
|
|
// console.log(postData);
|
|
|
this.submitBtn(postData)
|
|
|
@@ -1998,7 +1988,7 @@ export default {
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.modify_device_status',
|
|
|
- data: postData,
|
|
|
+ data: postData
|
|
|
})
|
|
|
.then((res) => {
|
|
|
// console.log(res.data);
|
|
|
@@ -2006,7 +1996,7 @@ export default {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '修改成功',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
this.modificationMessage = false
|
|
|
this.getList()
|
|
|
@@ -2014,7 +2004,7 @@ export default {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
message: res.data.message,
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -2049,19 +2039,19 @@ export default {
|
|
|
data: this.qs.stringify({
|
|
|
device_id: this.device_id,
|
|
|
lat: this.locationForm.lat,
|
|
|
- lng: this.locationForm.lng,
|
|
|
- }),
|
|
|
+ lng: this.locationForm.lng
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
this.getList()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: '定位成功',
|
|
|
+ message: '定位成功'
|
|
|
})
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
- message: '定位失败',
|
|
|
+ message: '定位失败'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -2083,19 +2073,19 @@ export default {
|
|
|
repairtime: '',
|
|
|
d_type: this.editFault.type,
|
|
|
is_pc: '1', // 0 手机 1 电脑
|
|
|
- errorvideo: '',
|
|
|
- }),
|
|
|
+ errorvideo: ''
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: '修改成功',
|
|
|
+ message: '修改成功'
|
|
|
})
|
|
|
this.addFaultDialogVisible = false
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -2109,26 +2099,26 @@ export default {
|
|
|
this.$confirm('确定删除此设备么?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
url: '/api/api_gateway?method=device.device_manage.delete_device',
|
|
|
data: this.qs.stringify({
|
|
|
- d_id,
|
|
|
- }),
|
|
|
+ d_id
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: '删除成功!',
|
|
|
+ message: '删除成功!'
|
|
|
})
|
|
|
this.getList()
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
- message: res.data.message,
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -2136,7 +2126,7 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: '已取消删除',
|
|
|
+ message: '已取消删除'
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
@@ -2177,14 +2167,14 @@ export default {
|
|
|
type,
|
|
|
time,
|
|
|
d_id,
|
|
|
- typeNume,
|
|
|
- },
|
|
|
+ typeNume
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
equipmenttypelist() {
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
- url: '/api/api_gateway?method=home.homes.user_device_type',
|
|
|
+ url: '/api/api_gateway?method=home.homes.user_device_type'
|
|
|
}).then((res) => {
|
|
|
this.typelist = res.data.data
|
|
|
this.typelistCopy = res.data.data
|
|
|
@@ -2336,7 +2326,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: '请先选择设备!',
|
|
|
type: 'warning',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -2418,7 +2408,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: '请先选择设备!',
|
|
|
type: 'warning',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -2441,7 +2431,7 @@ export default {
|
|
|
|
|
|
if (this.selectionDataSource[this.queryInfo.page]) {
|
|
|
assign(this.selectionDataSource, {
|
|
|
- [this.queryInfo.page]: map(val, 'd_id'),
|
|
|
+ [this.queryInfo.page]: map(val, 'd_id')
|
|
|
})
|
|
|
} else {
|
|
|
this.$set(this.selectionDataSource, this.queryInfo.page, map(val, 'd_id'))
|
|
|
@@ -2487,8 +2477,8 @@ export default {
|
|
|
start_time: this.queryInfo.start_time,
|
|
|
end_time: this.queryInfo.end_time,
|
|
|
equipment_status: this.queryInfo.device_status, // 设备状态
|
|
|
- salesman_task_number: this.queryInfo.salesman_task_number, // 业务员、任务单号筛选
|
|
|
- }),
|
|
|
+ salesman_task_number: this.queryInfo.salesman_task_number // 业务员、任务单号筛选
|
|
|
+ })
|
|
|
})
|
|
|
.then((res) => {
|
|
|
// console.log(res.data.data.data); // 列表数据
|
|
|
@@ -2537,7 +2527,7 @@ export default {
|
|
|
lock: true,
|
|
|
text: '正在跳转,请稍后。。。',
|
|
|
spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
})
|
|
|
var that = this
|
|
|
var isClick = this.isClick
|
|
|
@@ -2571,11 +2561,11 @@ export default {
|
|
|
// diverse: "batch", // 判断当前为批量充值还是为单台充值 批量充值batch 单台充值one
|
|
|
diverse: that.totalShow == false ? (this.identification == 1 ? 'all' : 'batch') : 'one', // 判断当前为批量充值还是为单台充值 批量充值batch 单台充值one
|
|
|
device_type_id: this.queryInfo.device_type_id,
|
|
|
- overdue: this.equipmentLimit, // 0未到期 1已到期 2即将到期
|
|
|
+ overdue: this.equipmentLimit // 0未到期 1已到期 2即将到期
|
|
|
}
|
|
|
// console.log(a, 'a')
|
|
|
var postData = this.qs.stringify({
|
|
|
- secret: secret.Encrypt(JSON.stringify(a)),
|
|
|
+ secret: secret.Encrypt(JSON.stringify(a))
|
|
|
})
|
|
|
|
|
|
this.isSubmitLoading = true
|
|
|
@@ -2583,7 +2573,7 @@ export default {
|
|
|
.$axios({
|
|
|
method: 'POST',
|
|
|
url: '/api/order_payment',
|
|
|
- data: postData,
|
|
|
+ data: postData
|
|
|
})
|
|
|
.then((res) => {
|
|
|
// console.log(res.data);
|
|
|
@@ -2599,7 +2589,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: res.data.success,
|
|
|
type: 'error',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
} else {
|
|
|
window.open(res.data.data, '_blank')
|
|
|
@@ -2646,13 +2636,13 @@ export default {
|
|
|
const devideIDlist = flatten(values(this.selectionDataSource))
|
|
|
var postData = this.qs.stringify({
|
|
|
d_id: devideIDlist.join(','), // 选中ID
|
|
|
- nums: this.adminList[this.activeIndA], // 年数
|
|
|
+ nums: this.adminList[this.activeIndA] // 年数
|
|
|
})
|
|
|
// console.log(postData);
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
url: '/api/api_gateway?method=device.device_manage.device_recharge',
|
|
|
- data: postData,
|
|
|
+ data: postData
|
|
|
})
|
|
|
.then((res) => {
|
|
|
// console.log(res.data.data);
|
|
|
@@ -2661,14 +2651,14 @@ export default {
|
|
|
this.$message({
|
|
|
message: '充值成功!',
|
|
|
type: 'success',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
this.rechargeTabList(true)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: '充值失败!',
|
|
|
type: 'warning',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -2680,10 +2670,10 @@ export default {
|
|
|
this.$message({
|
|
|
message: '取消充值',
|
|
|
type: 'info',
|
|
|
- duration: 1500,
|
|
|
+ duration: 1500
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -2704,8 +2694,8 @@ export default {
|
|
|
equipment_status: this.queryInfo.device_status, // 设备状态
|
|
|
salesman_task_number: '', // 业务员、任务单号筛选
|
|
|
overdue: this.equipmentLimit, // 0未到期 1已到期 2即将到期
|
|
|
- device_user: this.queryInfo.device_user,
|
|
|
- }),
|
|
|
+ device_user: this.queryInfo.device_user
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
this.dataList = res.data.data.data
|
|
|
@@ -2781,8 +2771,8 @@ export default {
|
|
|
remove_id_list: this.abandonlist.join(','),
|
|
|
device_expire: this.equipmentLimit,
|
|
|
device_type: this.queryInfo.device_type_id,
|
|
|
- device_ids: this.queryInfo.f_id,
|
|
|
- }),
|
|
|
+ device_ids: this.queryInfo.f_id
|
|
|
+ })
|
|
|
})
|
|
|
.then((res) => {
|
|
|
// console.log(res);
|
|
|
@@ -2849,26 +2839,26 @@ export default {
|
|
|
money: this.grossPrice * yearData,
|
|
|
flow: 1024 * yearData,
|
|
|
unit: yearData + '年',
|
|
|
- year: yearData,
|
|
|
+ year: yearData
|
|
|
},
|
|
|
{
|
|
|
money: this.grossPrice * (yearData + 1),
|
|
|
flow: 1024 * (yearData + 1),
|
|
|
unit: yearData + 1 + '年',
|
|
|
- year: yearData + 1,
|
|
|
+ year: yearData + 1
|
|
|
},
|
|
|
{
|
|
|
money: this.grossPrice * (yearData + 2),
|
|
|
flow: 1024 * (yearData + 2),
|
|
|
unit: yearData + 2 + '年',
|
|
|
- year: yearData + 2,
|
|
|
+ year: yearData + 2
|
|
|
},
|
|
|
{
|
|
|
money: this.grossPrice * (yearData + 3),
|
|
|
flow: 1024 * (yearData + 3),
|
|
|
unit: yearData + 3 + '年',
|
|
|
- year: yearData + 3,
|
|
|
- },
|
|
|
+ year: yearData + 3
|
|
|
+ }
|
|
|
]
|
|
|
that.yearData = that.steMealArr[0].year // 在没有点击切换套餐的情况下默认第一个套餐年份
|
|
|
that.totalShow = true // 显示充值套餐
|
|
|
@@ -2891,12 +2881,12 @@ export default {
|
|
|
method: 'POST',
|
|
|
url: '/api/v2/device/manage/down/template/',
|
|
|
data: this.qs.stringify({}),
|
|
|
- responseType: 'blob',
|
|
|
+ responseType: 'blob'
|
|
|
}).then((res) => {
|
|
|
// console.log(res);
|
|
|
let fileName = '设备信息补充.xls'
|
|
|
const blob = new Blob([res.data], {
|
|
|
- type: 'application/vnd.ms-excel;charset=utf-8',
|
|
|
+ type: 'application/vnd.ms-excel;charset=utf-8'
|
|
|
})
|
|
|
const a = document.createElement('a')
|
|
|
a.href = URL.createObjectURL(blob)
|
|
|
@@ -2912,27 +2902,27 @@ export default {
|
|
|
this.$message({
|
|
|
message: '请上传文件',
|
|
|
duration: 1500,
|
|
|
- type: 'warning',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
} else if (this.salevalue == '') {
|
|
|
this.$message({
|
|
|
message: '请选择销售人员',
|
|
|
duration: 1500,
|
|
|
- type: 'warning',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
} else {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '设备信息上传中......',
|
|
|
spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
})
|
|
|
this.fileData.append('sale_uid', this.salevalue) // 上传的xls文件
|
|
|
this.fileData.append('token', localStorage.getItem('session')) // 上传的xls文件
|
|
|
this.$axios({
|
|
|
method: 'POST',
|
|
|
url: '/api/v2/device/manage/upload/template/',
|
|
|
- data: this.fileData,
|
|
|
+ data: this.fileData
|
|
|
// responseType: 'blob'
|
|
|
}).then((res) => {
|
|
|
console.log(res)
|
|
|
@@ -2945,7 +2935,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: '设备信息导入成功',
|
|
|
duration: 1500,
|
|
|
- type: 'success',
|
|
|
+ type: 'success'
|
|
|
})
|
|
|
// let fileName = '结果信息.xls';
|
|
|
// const blob = new Blob([res.data], {
|
|
|
@@ -2980,7 +2970,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: res.data.data.items.msg,
|
|
|
duration: 1500,
|
|
|
- type: 'error',
|
|
|
+ type: 'error'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -2997,7 +2987,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: '权重不能为空',
|
|
|
duration: 1500,
|
|
|
- type: 'warning',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
} else {
|
|
|
this.$axios({
|
|
|
@@ -3005,15 +2995,15 @@ export default {
|
|
|
url: '/api/v2/device/manage/order/',
|
|
|
data: this.qs.stringify({
|
|
|
device_id: this.weightid,
|
|
|
- order: this.weightnumber,
|
|
|
- }),
|
|
|
+ order: this.weightnumber
|
|
|
+ })
|
|
|
}).then((res) => {
|
|
|
// console.log(res);
|
|
|
if (res.data.msg == '成功') {
|
|
|
this.$message({
|
|
|
message: '设置成功',
|
|
|
duration: 1500,
|
|
|
- type: 'success',
|
|
|
+ type: 'success'
|
|
|
})
|
|
|
this.weightdialogVisible = false
|
|
|
this.getList()
|
|
|
@@ -3021,7 +3011,7 @@ export default {
|
|
|
this.$message({
|
|
|
message: res.data.msg,
|
|
|
duration: 1500,
|
|
|
- type: 'warning',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -3029,8 +3019,8 @@ export default {
|
|
|
},
|
|
|
handleRechargeRecordBtnClick() {
|
|
|
this.$router.push('/index/equipList/recharge')
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|