From ab26e7b3fc9ccfe6169670a7678dc968e38147dc Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 21 Mar 2021 20:58:27 +0800
Subject: [PATCH] 在线设备,用户统计数据调整到详情页面
---
vue.config.js | 10 +
src/router/views/index.js | 13 ++
src/views/home/home.vue | 114 ++++++++-----------
src/api/parcel/parcel.js | 26 ++++
src/views/parcel/parcel.vue | 173 ++++++++++++++++++++++++++++
5 files changed, 267 insertions(+), 69 deletions(-)
diff --git a/src/api/parcel/parcel.js b/src/api/parcel/parcel.js
new file mode 100644
index 0000000..dc23d8c
--- /dev/null
+++ b/src/api/parcel/parcel.js
@@ -0,0 +1,26 @@
+import request from '@/router/axios';
+
+export const getList = (currentPage, pageSize, params) => {
+ return request({
+ url: '/backstage-temporary-api/machineStat/queryMachineDetailIList',
+ method: 'post',
+ Headers: {
+ "X-AISP-T": 'A3_a10f15e56deefe37913884d98d3e9df31615529561666'
+ },
+ params: {
+ ...params,
+ currentPage,
+ pageSize,
+ }
+ })
+}
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/blade-jfpts/parcel/parcel/getParcelPic',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
\ No newline at end of file
diff --git a/src/router/views/index.js b/src/router/views/index.js
index d949670..a13098f 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -248,6 +248,19 @@
component: () =>
import ( /* webpackChunkName: "views" */ '@/views/alarm/alarm')
}]
+ }, {
+ path: '/parcel',
+ component: Layout,
+ redirect: '/parcel/index',
+ children: [{
+ path: 'index',
+ name: '实时警情',
+ meta: {
+ i18n: 'parcel'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/parcel/parcel')
+ }]
}
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index 4959bde..a202209 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -7,54 +7,29 @@
* @LastEditTime: 2021-03-18 10:37:42
-->
<template>
- <iframe
- v-show="iframeState"
- id="show-iframe"
- frameborder="0"
- name="showHere"
- scrolling="auto"
- src="https://web.byisf.com:18001/bigScreen/view/1349193280059879426"
- ></iframe>
+ <iframe v-show="iframeState" id="show-iframe" frameborder=0 name="showHere" scrolling=auto
+ src="https://web.byisf.com:18001/bigScreen/view/1349193280059879426"></iframe>
</template>
<script>
-export default {
- name: "tcgl.vue",
- created() {
- //this.getData();
- },
- data() {
- return {
- dialogTableVisible: false,
- form: {},
- };
- },
- mounted() {
- window.handleStartAnimalHeat = this.handleStartAnimalHeat;
- window.handleStartHealthcode = this.handleStartHealthcode;
- window.handleStartAlarm = this.handleStartAlarm;
- },
- methods: {
- //体温监测分页数据
- handleStartAnimalHeat(data) {
- this.$router.push({
- path: `/animalHeat/animalHeatPage`,
- query: data[0],
- });
+ export default {
+ name: "tcgl.vue",
+ created() {
+ //this.getData();
},
- //健康码分页数据
- handleStartHealthcode(data) {
- this.$router.push({
- path: `/healthcode/healthcodePage`,
- query: data[0],
- });
+ data() {
+ return {
+ dialogTableVisible:false,
+ form: {},
+ }
},
-<<<<<<< HEAD
mounted() {
window.handleStartAnimalHeat = this.handleStartAnimalHeat;
window.handleStartHealthcode = this.handleStartHealthcode;
window.handleStartAlarm = this.handleStartAlarm;
window.handleStartEquipment = this.handleStartEquipment;
+ window.handleStartSuser=this.handleStartSuser;
+ window.handleStartParcel=this.handleStartParcel;
},
methods: {
//体温监测分页数据
@@ -83,38 +58,45 @@
this.$router.push({
path: `/clientManagement/index`
});
+ },
+ //客户管理分页数据
+ handleStartSuser(){
+ this.$router.push({
+ path: `/suser/index`
+ });
+ },
+ //包裹分页数据
+ handleStartParcel(data){
+ this.$router.push({
+ path: `/parcel/index`,
+ query: data[0]
+ });
}
-=======
- //主动报警(一键求助,电话报警)分页数据
- handleStartAlarm(data) {
- this.$router.push({
- path: `/realTimePolice/index`,
- query: data[0],
- });
- },
->>>>>>> 1961bed1f17c953cab383102b28498152f1e6f70
- // getData() {
- // var that = this;
- //
- // window.clearTimeout(window.realTimeQuery);
- //
- // window.realTimeQuery = setInterval(function () {
- // //that.dialogTableVisible = true;
- // }, 3000);
- // }
- },
-};
+ // getData() {
+ // var that = this;
+ //
+ // window.clearTimeout(window.realTimeQuery);
+ //
+ // window.realTimeQuery = setInterval(function () {
+ // //that.dialogTableVisible = true;
+ // }, 3000);
+ // }
+ }
+ }
</script>
<style>
-#show-iframe {
- display: block !important;
- height: 95%;
-}
-.avue-main .avue-view {
- height: 100%;
- padding: 0px 5px !important;
-}
+ #show-iframe {
+ display: block !important;
+ height: 95%;
+
+ }
+
+ .avue-main .avue-view {
+ height: 100%;
+ padding: 0px 5px !important;
+ }
+
</style>
diff --git a/src/views/parcel/parcel.vue b/src/views/parcel/parcel.vue
new file mode 100644
index 0000000..eda5e8d
--- /dev/null
+++ b/src/views/parcel/parcel.vue
@@ -0,0 +1,173 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ v-model="form"
+ ref="crud"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad">
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+ import {getList, getDetail, add, update, remove} from "@/api/parcel/parcel";
+ import {mapGetters} from "vuex";
+
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ selectionList: [],
+ option: {
+ height:'auto',
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ labelWidth:120,
+ dialogClickModal: false,
+ headerAlign: 'center',
+ align: 'center',
+ column: [
+ {
+ label: '坐标',
+ prop: 'test',
+ hide: true,
+ span: 24,
+ component: "avueMap",
+ clickChild: (obj) => {
+ this.form.jd = obj.latitude
+ this.form.wd = obj.longitude
+ },
+ },
+ {
+ label: "安检机名称",
+ prop: "checkMachineName",
+ },
+ {
+ label: "包裹ID",
+ prop: "packageId",
+ },
+ {
+ label: "包裹图片KEY",
+ prop: "imgUrl",
+ },
+ {
+ label: "过包裹时间",
+ prop: "samplingTime",
+ },
+ {
+ label: "是否违禁",
+ prop: "sex",
+ type: "select",
+ dicData: [
+ {
+ label: "是",
+ value: "1"
+ },
+ {
+ label: "否",
+ value: "0"
+ },
+ ]
+ }
+ ]
+ },
+ data: []
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(this.permission.parcel_pic_view, true),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(null, false)
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ }
+ },
+ methods: {
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then(res => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage){
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize){
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ params ={
+ status:this.$route.query.status,
+ type:this.$route.query.type
+ }
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = res.data.data;
+ console.log(data,111);
+ this.page.total = data.totalSize;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ }
+ }
+ };
+</script>
diff --git a/vue.config.js b/vue.config.js
index b2d4373..5f44a92 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -34,15 +34,19 @@
proxy: {
'/api': {
//本地服务接口地址
- // target: 'http://192.168.1.125:82/',
- target: 'https://web.byisf.com:18001/api/',
+ target: 'http://localhost:82/',
+ //target: 'https://web.byisf.com:18001/api/',
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',
ws: true,
pathRewrite: {
'^/api': '/'
}
+ },
+ '/backstage-temporary-api': {
+ target: 'http://fengkong.sf-express.com/backstage-temporary-api/', //要访问的源
+ changeOrigin: true //允许跨域
}
}
}
-};
+};
\ No newline at end of file
--
Gitblit v1.9.3