Commit bdae8c39 authored by yangkaiyi's avatar yangkaiyi

feat: 改一波问题

parent 7dcba6bf
'use strict'
"use strict";
module.exports = {
NODE_ENV: '"production"',
BASE_API: '"https://demoapi.gpsbd.com"',
WS_API: '"wss://demoapi.gpsbd.com"',
WS_MEDIA:'"wss://media.gpsbd.com"'
}
BASE_API: '"http://47.101.203.155:8085"',
WS_API: '"ws://47.101.203.155:8085"',
WS_MEDIA: '"ws://47.101.203.155:89"',
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>GPSBD®卫星定位监控系统</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>花博会重要有害生物踪迹管理系统</title>
</head>
<body>
<div id="app"></div>
......
......@@ -29,7 +29,7 @@
"js-cookie": "2.2.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"moment": "^2.18.1",
"moment": "^2.29.1",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"prettier": "^2.2.1",
......
......@@ -279,9 +279,9 @@ export const getAllDevices = (params) => {
return axios.get(`devices/all`, { params: params }).then((res) => res.data);
};
// 获取有害植物
export const getDevices = (id) => {
return axios.get(`devices/${id}`).then((res) => res.data);
// 地图页获取有害植物
export const getDevices = () => {
return axios.get(`devices`).then((res) => res.data);
};
// 添加有害植物
......
@import './variables.scss';
.red {
color: $red
}
.green {
color:$green
}
.green-light {
color:#00ff00
}
.gray {
color:$gray
}
.gray-light {
color:#C0C4CC
}
.blue {
color:$blue
}
.yellow {
color:$yellow
}
body,
html {
font: 14px/1.5 "Microsoft Yahei", arial, "Hiragino Sans GB", sans-serif !important;
background: #ffffff;
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
li,
p,
ul {
list-style: none;
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
a:focus {
outline: none !important;
}
.hide{//全局隐藏
display: none !important;
}
.show{
display: inline !important;
}
.fl_r{
float: right;
}
.fl_l{
float: left;
}
.var_mind{
display: inline-block;
vertical-align: middle;
font-size: 16px;
}
}
*,
:after,
:before{
box-sizing: border-box;
}
body{
.el-form-item__label[for='name']{
&:before{
content: "" !important;
}
}
.el-form-item__label[for='password']{
&:before{
content: "" !important;
}
}
.no-required-icon{
&:before{
content: " ";
}
}
.el-dialog__footer{
overflow: hidden;
}
.el_regiter_a{
line-height: 36px;
text-decoration: underline;
color: #20a0ff;
cursor: pointer;
}
// .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
// background-color: #009cf9;
// color: #ffffff;
// border-radius: 5px;
// padding: 0 0px !important;
// }
.footer-copyright {
width: auto;
position: fixed;
bottom: 0;
right: 20px;
}
}
@import "./variables.scss";
.red {
color: $red;
}
.green {
color: $green;
}
.green-light {
color: #00ff00;
}
.gray {
color: $gray;
}
.gray-light {
color: #c0c4cc;
}
.blue {
color: $blue;
}
.yellow {
color: $yellow;
}
body,
html {
font: 14px/1.5 "Microsoft Yahei", arial, "Hiragino Sans GB", sans-serif !important;
background: #ffffff;
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
li,
p,
ul {
list-style: none;
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
a:focus {
outline: none !important;
}
.hide {
//全局隐藏
display: none !important;
}
.show {
display: inline !important;
}
.fl_r {
float: right;
}
.fl_l {
float: left;
}
.var_mind {
display: inline-block;
vertical-align: middle;
font-size: 16px;
}
}
*,
:after,
:before {
box-sizing: border-box;
}
body {
.el-form-item__label[for="name"] {
&:before {
content: "" !important;
}
}
.el-form-item__label[for="password"] {
&:before {
content: "" !important;
}
}
.no-required-icon {
&:before {
content: " ";
}
}
.el-dialog__footer {
overflow: hidden;
}
.el_regiter_a {
line-height: 36px;
text-decoration: underline;
color: #20a0ff;
cursor: pointer;
}
// .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
// background-color: #009cf9;
// color: #ffffff;
// border-radius: 5px;
// padding: 0 0px !important;
// }
.footer-copyright {
display: none;
width: auto;
position: fixed;
bottom: 0;
right: 20px;
}
}
//to reset element-ui default css
//to reset element-ui default css
.el-upload {
input[type="file"] {
display: none !important;
......@@ -27,27 +27,35 @@
}
}
}
.lbs-bg-transparent{
background-color: rgba(255, 255, 255, 0.7);
.lbs-bg-transparent {
background-color: rgba(255, 255, 255, 0.7);
}
.lbs-bg-transparent2{
background-color: rgba(255, 255, 255, 0);
.lbs-bg-transparent2 {
background-color: rgba(255, 255, 255, 0);
}
// .lbs-bg-transparent * {
// background-color: transparent;
// }
.lbs-bg-transparent .el-table th, .el-table tr {
background-color: transparent;
.lbs-bg-transparent .el-table th,
.el-table tr {
background-color: transparent;
}
.lbs-bg-transparent .el-table, .el-table__expanded-cell {
.lbs-bg-transparent .el-table,
.el-table__expanded-cell {
background-color: transparent;
}
.el-badge {
vertical-align: baseline;
z-index: 99;
vertical-align: baseline;
z-index: 99;
}
// .el-pagination .btn-next, .el-pagination .btn-prev {
// background-color: transparent;
// }
.el-table__row td {
background: #fff;
}
.el-dialog__body {
padding-bottom: 0;
}
......@@ -36,14 +36,14 @@
<el-form-item>
<el-button type="primary" @click="handlerAdd">添加</el-button>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-button
type="primary"
:disabled="!hasPermission('system:device:upload')"
@click="inDeviceVisible = true"
>导入</el-button
>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
......@@ -55,14 +55,14 @@
>转移</el-button
>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-button
type="primary"
v-on:click="downLoad"
:disabled="selectDevices.length == 0"
>导出</el-button
>
</el-form-item>
</el-form-item> -->
</el-form>
</el-col>
</el-row>
......@@ -75,25 +75,40 @@
fit
highlight-current-row
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="重要有害植物名称" prop="name" width="160" />
<el-table-column fixed type="selection" width="55"></el-table-column>
<el-table-column
fixed
label="重要有害植物名称"
prop="name"
width="160"
/>
<el-table-column label="IMEI" prop="imei" width="150" />
<el-table-column label="报关号" prop="clearanceID" width="130" />
<el-table-column label="来源国" prop="countryOfOrigin" width="100" />
<el-table-column label="携带有害生物" prop="carryPestName" />
<el-table-column width="160" label="添加时间">
<el-table-column
label="携带有害生物"
prop="carryPestName"
width="120"
/>
<el-table-column label="备注" prop="remarks" width="100" />
<el-table-column label="添加时间" width="160">
<template slot-scope="scope">
{{ (scope.row.time / 1000) | moment("YYYY-MM-DD HH:mm:ss") }}
</template>
</el-table-column>
<el-table-column width="160" label="最后更新时间">
<el-table-column label="最后更新时间" width="160">
<template slot-scope="scope">
{{
(scope.row.lastUpdate / 1000) | moment("YYYY-MM-DD HH:mm:ss")
}}
</template>
</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">
<!-- 带权限判断demo -->
<!-- <el-button
......@@ -201,6 +216,9 @@
auto-complete="off"
></el-input>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -212,6 +230,7 @@
</template>
<script>
import moment from "moment";
import util from "@/utils/util";
import InDevice from "./components/InDevice";
import TransferDevice from "./components/TransferDevice";
......@@ -292,22 +311,56 @@ export default {
handlerSubmit() {
this.$refs["editFormRef"].validate((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) {
addDevices(this.editForm).then((data) => {
console.log(12313123, data);
addDevices(formData).then((data) => {
this.$message({
type: "success",
message: "保存成功!",
});
this.editForm = {};
this.editDialogVisible = false;
this.init();
});
} else {
updateDevices(this.editForm).then((data) => {
updateDevices(formData).then((data) => {
console.log(45565656, data);
this.$message({
type: "success",
message: "更新成功!",
});
this.editForm = {};
this.editDialogVisible = false;
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
dependencies:
minimist "^1.2.5"
moment@^2.11.1, moment@^2.18.1:
moment@^2.11.1:
version "2.29.1"
resolved "https://registry.nlark.com/moment/download/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
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:
version "1.0.1"
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