From 0c1a6d462b3d8440b66fc15552b3e2b1064acb3a Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 22 Mar 2021 19:44:38 +0800
Subject: [PATCH] 包裹页面修改
---
vue.config.js | 4 -
src/views/animalHeat/animalHeat.vue | 33 +++++++
src/views/healthcode/healthcode.vue | 34 ++++++++
src/api/parcel/parcel.js | 7 -
src/views/parcel/parcel.vue | 114 +++++++++++++++++++++++++--
5 files changed, 168 insertions(+), 24 deletions(-)
diff --git a/src/api/parcel/parcel.js b/src/api/parcel/parcel.js
index dc23d8c..a7c5087 100644
--- a/src/api/parcel/parcel.js
+++ b/src/api/parcel/parcel.js
@@ -2,11 +2,8 @@
export const getList = (currentPage, pageSize, params) => {
return request({
- url: '/backstage-temporary-api/machineStat/queryMachineDetailIList',
- method: 'post',
- Headers: {
- "X-AISP-T": 'A3_a10f15e56deefe37913884d98d3e9df31615529561666'
- },
+ url: '/api/blade-jfpts/parcel/parcel/getParcelDetailPage',
+ method: 'get',
params: {
...params,
currentPage,
diff --git a/src/views/animalHeat/animalHeat.vue b/src/views/animalHeat/animalHeat.vue
index a08051c..42baa9f 100644
--- a/src/views/animalHeat/animalHeat.vue
+++ b/src/views/animalHeat/animalHeat.vue
@@ -173,6 +173,16 @@
return ids.join(",");
}
},
+ created() {
+ Recorder.getPermission().then(() => {});
+
+ this.recorder = new Recorder({
+ sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
+ sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
+ numChannels: 1, // 声道,支持 1 或 2, 默认是1
+ // compiling: false,(0.x版本中生效,1.x增加中) // 是否边录边转换,默认是false
+ });
+ },
methods: {
beforeOpen(done, type) {
},
@@ -213,7 +223,10 @@
this.onLoad(this.page, params);
},
onLoad(page, params = {}) {
- this.loading = true;
+ const { dateTime } = this.query;
+ let values = {
+ ...params,
+ };
if (this.$route.query.type && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
if (this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status == "" ) {
this.activeClass = this.$route.query.type;
@@ -236,7 +249,23 @@
}
}
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ if (dateTime) {
+ values = {
+ ...params,
+ begTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ };
+ values.dateTime = null;
+ } else {
+ values = {
+ ...params,
+ ...this.query,
+ };
+ }
+
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
diff --git a/src/views/healthcode/healthcode.vue b/src/views/healthcode/healthcode.vue
index 238d55a..500988a 100644
--- a/src/views/healthcode/healthcode.vue
+++ b/src/views/healthcode/healthcode.vue
@@ -202,6 +202,16 @@
return ids.join(",");
}
},
+ created() {
+ Recorder.getPermission().then(() => {});
+
+ this.recorder = new Recorder({
+ sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
+ sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
+ numChannels: 1, // 声道,支持 1 或 2, 默认是1
+ // compiling: false,(0.x版本中生效,1.x增加中) // 是否边录边转换,默认是false
+ });
+ },
methods: {
beforeOpen(done, type) {
},
@@ -242,7 +252,11 @@
this.onLoad(this.page, params);
},
onLoad(page, params = {}) {
- this.loading = true;
+ const { dateTime } = this.query;
+ let values = {
+ ...params,
+ };
+
if (this.$route.query.status && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
if (this.$route.query.type != undefined && this.$route.query.type != null && this.$route.query.type == "" ) {
this.activeClass = this.$route.query.status;
@@ -265,7 +279,23 @@
}
}
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ if (dateTime) {
+ values = {
+ ...params,
+ begTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ };
+ values.dateTime = null;
+ } else {
+ values = {
+ ...params,
+ ...this.query,
+ };
+ }
+
+ this.loading = true;
+ getList(page.currentPage, page.pageSize,values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
diff --git a/src/views/parcel/parcel.vue b/src/views/parcel/parcel.vue
index eda5e8d..2ed74d0 100644
--- a/src/views/parcel/parcel.vue
+++ b/src/views/parcel/parcel.vue
@@ -52,6 +52,7 @@
dialogClickModal: false,
headerAlign: 'center',
align: 'center',
+ tree:true,
column: [
{
label: '坐标',
@@ -77,22 +78,81 @@
prop: "imgUrl",
},
{
- label: "过包裹时间",
+ label: "过机时间",
prop: "samplingTime",
},
{
+ label: "过机时间",
+ prop: "dateTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ searchRange: true,
+ searchSpan: 8,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入时间",
+ trigger: "blur"
+ }
+ ]
+ },
+ {
label: "是否违禁",
- prop: "sex",
+ prop: "mechineMark",
+ dicData: [
+ {
+ label: "是",
+ value: 1
+ },
+ {
+ label: "否",
+ value: 0
+ },
+ ]
+ },
+ {
+ label: "是否违禁",
+ search: true,
+ searchLabelWidth: 120,
+ searchSpan: 4,
+ hide: true,
+ prop: "decisioDiagramResult",
type: "select",
dicData: [
{
label: "是",
- value: "1"
+ value: "contraband"
},
{
label: "否",
- value: "0"
+ value: "normal"
},
+ ]
+ },
+ {
+ label: "违禁包裹物品",
+ prop: "decisioDiagramResultDetails",
+ }
+ ],
+ group: [
+ {
+ label: '违禁品信息',
+ prop: 'coordsDetailVoList',
+ column: [
+ {
+ label: '违禁品名称',
+ prop: 'objName'
+ },
+ {
+ label: '违禁品编号',
+ prop: 'objCode'
+ }
]
}
]
@@ -154,16 +214,48 @@
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
- this.loading = true;
- params ={
- status:this.$route.query.status,
- type:this.$route.query.type
+ const { dateTime } = this.query;
+ let values = {
+ ...params,
+ };
+
+ if (this.$route.query.type && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
+ if (this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status == "" ) {
+ this.activeClass = this.$route.query.type;
+ this.page.currentPage = 1;
+ params = {
+ status:this.$route.query.status,
+ type:this.$route.query.type
+ }
+ } else {
+ this.activeClass = 0;
+ this.page.currentPage = 1;
+ params = {
+ type:this.$route.query.type
+ };
+ }
}
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ };
+ values.dateTime = null;
+ } else {
+ values = {
+ ...params,
+ ...this.query,
+ };
+ }
+
+ this.loading = true;
+ getList(page.currentPage, page.pageSize,values).then(res => {
const data = res.data.data;
- console.log(data,111);
this.page.total = data.totalSize;
- this.data = data.records;
+ this.data = data.data;
this.loading = false;
this.selectionClear();
});
diff --git a/vue.config.js b/vue.config.js
index a931fb0..a18ba3f 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -42,10 +42,6 @@
pathRewrite: {
'^/api': '/'
}
- },
- '/backstage-temporary-api': {
- target: 'http://fengkong.sf-express.com/backstage-temporary-api/', //要访问的源
- changeOrigin: true //允许跨域
}
}
}
--
Gitblit v1.9.3