Commit bdae8c39 authored by yangkaiyi's avatar yangkaiyi

feat: 改一波问题

parent 7dcba6bf
'use strict' "use strict";
module.exports = { module.exports = {
NODE_ENV: '"production"', NODE_ENV: '"production"',
BASE_API: '"https://demoapi.gpsbd.com"', BASE_API: '"http://47.101.203.155:8085"',
WS_API: '"wss://demoapi.gpsbd.com"', WS_API: '"ws://47.101.203.155:8085"',
WS_MEDIA:'"wss://media.gpsbd.com"' WS_MEDIA: '"ws://47.101.203.155:89"',
} };
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>GPSBD®卫星定位监控系统</title> <title>花博会重要有害生物踪迹管理系统</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"less": "^3.0.4", "less": "^3.0.4",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"moment": "^2.18.1", "moment": "^2.29.1",
"normalize.css": "7.0.0", "normalize.css": "7.0.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"prettier": "^2.2.1", "prettier": "^2.2.1",
......
...@@ -279,9 +279,9 @@ export const getAllDevices = (params) => { ...@@ -279,9 +279,9 @@ export const getAllDevices = (params) => {
return axios.get(`devices/all`, { params: params }).then((res) => res.data); return axios.get(`devices/all`, { params: params }).then((res) => res.data);
}; };
// 获取有害植物 // 地图页获取有害植物
export const getDevices = (id) => { export const getDevices = () => {
return axios.get(`devices/${id}`).then((res) => res.data); return axios.get(`devices`).then((res) => res.data);
}; };
// 添加有害植物 // 添加有害植物
......
@import './variables.scss'; @import "./variables.scss";
.red { .red {
color: $red color: $red;
} }
.green { .green {
color:$green color: $green;
} }
.green-light { .green-light {
color:#00ff00 color: #00ff00;
} }
.gray { .gray {
color:$gray color: $gray;
} }
.gray-light { .gray-light {
color:#C0C4CC color: #c0c4cc;
} }
.blue { .blue {
color:$blue color: $blue;
} }
.yellow { .yellow {
color:$yellow color: $yellow;
} }
body, body,
html { html {
...@@ -41,19 +41,20 @@ html { ...@@ -41,19 +41,20 @@ html {
a:focus { a:focus {
outline: none !important; outline: none !important;
} }
.hide{//全局隐藏 .hide {
//全局隐藏
display: none !important; display: none !important;
} }
.show{ .show {
display: inline !important; display: inline !important;
} }
.fl_r{ .fl_r {
float: right; float: right;
} }
.fl_l{ .fl_l {
float: left; float: left;
} }
.var_mind{ .var_mind {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
font-size: 16px; font-size: 16px;
...@@ -62,30 +63,30 @@ html { ...@@ -62,30 +63,30 @@ html {
*, *,
:after, :after,
:before{ :before {
box-sizing: border-box; box-sizing: border-box;
} }
body{ body {
.el-form-item__label[for='name']{ .el-form-item__label[for="name"] {
&:before{ &:before {
content: "" !important; content: "" !important;
} }
} }
.el-form-item__label[for='password']{ .el-form-item__label[for="password"] {
&:before{ &:before {
content: "" !important; content: "" !important;
} }
} }
.no-required-icon{ .no-required-icon {
&:before{ &:before {
content: " "; content: " ";
} }
} }
.el-dialog__footer{ .el-dialog__footer {
overflow: hidden; overflow: hidden;
} }
.el_regiter_a{ .el_regiter_a {
line-height: 36px; line-height: 36px;
text-decoration: underline; text-decoration: underline;
color: #20a0ff; color: #20a0ff;
...@@ -98,6 +99,7 @@ body{ ...@@ -98,6 +99,7 @@ body{
// padding: 0 0px !important; // padding: 0 0px !important;
// } // }
.footer-copyright { .footer-copyright {
display: none;
width: auto; width: auto;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
......
//to reset element-ui default css //to reset element-ui default css
.el-upload { .el-upload {
input[type="file"] { input[type="file"] {
display: none !important; display: none !important;
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
} }
} }
} }
.lbs-bg-transparent{ .lbs-bg-transparent {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.7);
} }
.lbs-bg-transparent2{ .lbs-bg-transparent2 {
background-color: rgba(255, 255, 255, 0); background-color: rgba(255, 255, 255, 0);
} }
...@@ -38,10 +38,12 @@ ...@@ -38,10 +38,12 @@
// background-color: transparent; // background-color: transparent;
// } // }
.lbs-bg-transparent .el-table th, .el-table tr { .lbs-bg-transparent .el-table th,
.el-table tr {
background-color: transparent; background-color: transparent;
} }
.lbs-bg-transparent .el-table, .el-table__expanded-cell { .lbs-bg-transparent .el-table,
.el-table__expanded-cell {
background-color: transparent; background-color: transparent;
} }
.el-badge { .el-badge {
...@@ -51,3 +53,9 @@ ...@@ -51,3 +53,9 @@
// .el-pagination .btn-next, .el-pagination .btn-prev { // .el-pagination .btn-next, .el-pagination .btn-prev {
// background-color: transparent; // background-color: transparent;
// } // }
.el-table__row td {
background: #fff;
}
.el-dialog__body {
padding-bottom: 0;
}
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="handlerAdd">添加</el-button> <el-button type="primary" @click="handlerAdd">添加</el-button>
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<el-button <el-button
type="primary" type="primary"
:disabled="!hasPermission('system:device:upload')" :disabled="!hasPermission('system:device:upload')"
@click="inDeviceVisible = true" @click="inDeviceVisible = true"
>导入</el-button >导入</el-button
> >
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
>转移</el-button >转移</el-button
> >
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<el-button <el-button
type="primary" type="primary"
v-on:click="downLoad" v-on:click="downLoad"
:disabled="selectDevices.length == 0" :disabled="selectDevices.length == 0"
>导出</el-button >导出</el-button
> >
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
...@@ -75,25 +75,40 @@ ...@@ -75,25 +75,40 @@
fit fit
highlight-current-row highlight-current-row
> >
<el-table-column type="selection" width="55"></el-table-column> <el-table-column fixed type="selection" width="55"></el-table-column>
<el-table-column label="重要有害植物名称" prop="name" width="160" /> <el-table-column
fixed
label="重要有害植物名称"
prop="name"
width="160"
/>
<el-table-column label="IMEI" prop="imei" width="150" /> <el-table-column label="IMEI" prop="imei" width="150" />
<el-table-column label="报关号" prop="clearanceID" width="130" /> <el-table-column label="报关号" prop="clearanceID" width="130" />
<el-table-column label="来源国" prop="countryOfOrigin" width="100" /> <el-table-column label="来源国" prop="countryOfOrigin" width="100" />
<el-table-column label="携带有害生物" prop="carryPestName" /> <el-table-column
<el-table-column width="160" label="添加时间"> label="携带有害生物"
prop="carryPestName"
width="120"
/>
<el-table-column label="备注" prop="remarks" width="100" />
<el-table-column label="添加时间" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.time / 1000) | moment("YYYY-MM-DD HH:mm:ss") }} {{ (scope.row.time / 1000) | moment("YYYY-MM-DD HH:mm:ss") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="160" label="最后更新时间"> <el-table-column label="最后更新时间" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
(scope.row.lastUpdate / 1000) | moment("YYYY-MM-DD HH:mm:ss") (scope.row.lastUpdate / 1000) | moment("YYYY-MM-DD HH:mm:ss")
}} }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="160" label="操作" align="center"> <el-table-column
fixed="right"
width="160"
label="操作"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 带权限判断demo --> <!-- 带权限判断demo -->
<!-- <el-button <!-- <el-button
...@@ -201,6 +216,9 @@ ...@@ -201,6 +216,9 @@
auto-complete="off" auto-complete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -212,6 +230,7 @@ ...@@ -212,6 +230,7 @@
</template> </template>
<script> <script>
import moment from "moment";
import util from "@/utils/util"; import util from "@/utils/util";
import InDevice from "./components/InDevice"; import InDevice from "./components/InDevice";
import TransferDevice from "./components/TransferDevice"; import TransferDevice from "./components/TransferDevice";
...@@ -292,22 +311,56 @@ export default { ...@@ -292,22 +311,56 @@ export default {
handlerSubmit() { handlerSubmit() {
this.$refs["editFormRef"].validate((valid) => { this.$refs["editFormRef"].validate((valid) => {
if (valid) { if (valid) {
const empty = "-";
const placeholderData = {
attributes: {
todaytrip: 0,
trip: 0,
},
carryPestName: empty,
clearanceID: empty,
countryOfOrigin: empty,
groupId: 0,
icon: empty,
id: 0,
imei: empty,
intercom: 0,
lastUpdate: moment()
.subtract("10000", "ms")
.format("YYYY-MM-DDTHH:mm:ss.0000"),
name: empty,
positionId: 0,
remarks: empty,
sim: new Date() * 1,
speedLimit: 0,
status: 0,
time: moment()
.subtract("10000", "ms")
.format("YYYY-MM-DDTHH:mm:ss.0000"),
typeId: 0,
uuid: new Date() * 1,
video: empty,
};
const formData = Object.assign(placeholderData, this.editForm);
if (!this.isEdit) { if (!this.isEdit) {
addDevices(this.editForm).then((data) => { addDevices(formData).then((data) => {
console.log(12313123, data);
this.$message({ this.$message({
type: "success", type: "success",
message: "保存成功!", message: "保存成功!",
}); });
this.editForm = {};
this.editDialogVisible = false;
this.init(); this.init();
}); });
} else { } else {
updateDevices(this.editForm).then((data) => { updateDevices(formData).then((data) => {
console.log(45565656, data); console.log(45565656, data);
this.$message({ this.$message({
type: "success", type: "success",
message: "更新成功!", message: "更新成功!",
}); });
this.editForm = {};
this.editDialogVisible = false;
this.init(); this.init();
}); });
} }
......
...@@ -5006,11 +5006,16 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5, mkd ...@@ -5006,11 +5006,16 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5, mkd
dependencies: dependencies:
minimist "^1.2.5" minimist "^1.2.5"
moment@^2.11.1, moment@^2.18.1: moment@^2.11.1:
version "2.29.1" version "2.29.1"
resolved "https://registry.nlark.com/moment/download/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" resolved "https://registry.nlark.com/moment/download/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M= integrity sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=
moment@^2.29.1:
version "2.29.1"
resolved "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=
move-concurrently@^1.0.1: move-concurrently@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment