diff --git a/.env.development b/.env.development index 6dbbeb9..7f91e9d 100644 --- a/.env.development +++ b/.env.development @@ -6,5 +6,5 @@ VUE_APP_API_URL=http://www.tall.wiki/gateway VUE_APP_PROXY_URL=/gateway VUE_APP_PUBLIC_PATH=/wisdomcar_counter VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws -VUE_APP_TITLE=选矿系统 -VUE_APP_DESCRIPTION=选矿系统 +VUE_APP_TITLE=智慧 +VUE_APP_DESCRIPTION=智慧 diff --git a/src/components/Day/Day.vue b/src/components/Day/Day.vue index b208eef..8958c12 100644 --- a/src/components/Day/Day.vue +++ b/src/components/Day/Day.vue @@ -153,6 +153,7 @@ export default { this.weightDate = []; this.weight1 = []; this.weight2 = []; + this.timeList = []; // 获取横坐标 for (let i = 0; i < list.length; i++) { if (list[i].type === 1) { @@ -162,6 +163,7 @@ export default { this.weight2.push(0); } } + console.log(this.timeList); // 体重数据数组 for (let i = 0; i < list.length; i++) { if (list[i].type === 1) { @@ -174,7 +176,7 @@ export default { if (list[i].type === 2) { obj = { value: list[i].name, - xAxis: this.format(parseInt(list[i].time)), + xAxis: this.$moment(parseInt(list[i].time)).format('YYYY-MM-DD HH:mm:ss'), yAxis: parseInt(list[i].value) / 1000, }; this.weight1.push(obj); diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue index 54a30dc..fd42a82 100644 --- a/src/components/Search/Search.vue +++ b/src/components/Search/Search.vue @@ -88,6 +88,11 @@ export default { this.$emit('getData', this.timeObj); } }, + // downFile() { + // window.open( + // 'http://www.tall.wiki/gateway/wisdomcar/record/weightExport?startTime=1616558400000&endTime=1616721639230&types=1&&types=2', + // ); + // }, // 下载附件 downFile() { if (typeof this.timeObj.startTime === 'string') { @@ -100,7 +105,6 @@ export default { if (mistake > 3600 * 24 * 7 * 1000) { this.$message.error('时间跨度请不要超过7天'); } else { - this.$message.success('导出成功'); if (this.timeObj.types.length > 1) { // console.log(`https://www.tall.wiki/gateway/wisdomcar/record/weightExport? // startTime=${this.btnObj.startTime}&&endTime=${this.btnObj.endTime} @@ -108,6 +112,9 @@ export default { window.open( `https://www.tall.wiki/gateway/wisdomcar/record/weightExport?startTime=${this.btnObj.startTime}&&endTime=${this.btnObj.endTime}&&types=${this.btnObj.types[0]}&&types=${this.btnObj.types[1]}`, ); + // window.open( + // `http://www.tall.wiki/gateway/wisdomcar/record/weightExport?startTime=1616558400000&&endTime=${this.btnObj.endTime}&types=${this.btnObj.types[0]}&types=${this.btnObj.types[1]}`, + // ); } else { window.open( `https://www.tall.wiki/gateway/wisdomcar/record/weightExport?startTime=${this.btnObj.startTime}&&endTime=${this.btnObj.endTime}&&types=${this.btnObj.types[1]}`, diff --git a/src/components/Table/Table.vue b/src/components/Table/Table.vue index 5551953..b7aba85 100644 --- a/src/components/Table/Table.vue +++ b/src/components/Table/Table.vue @@ -7,13 +7,14 @@ --> - @@ -41,6 +41,7 @@ const columns = [ align: 'center', dataIndex: 'id', key: 'id', + width: '25%', scopedSlots: { customRender: 'id' }, }, { @@ -48,7 +49,7 @@ const columns = [ align: 'center', dataIndex: 'time', key: 'time', - width: 350, + width: '25%', scopedSlots: { customRender: 'time' }, }, { @@ -56,14 +57,15 @@ const columns = [ align: 'center', dataIndex: 'name', key: 'name', + width: '25%', scopedSlots: { customRender: 'name' }, }, - { title: '数据', align: 'center', dataIndex: 'value', key: 'value', + width: '25%', scopedSlots: { customRender: 'value' }, }, ]; @@ -80,12 +82,19 @@ export default { return { columns, loading: false, + pagination: false, editingKey: '', height: '', editVisible: false, editItem: null, // 修改的那条 + dataList: [], }; }, + watch: { + list(val) { + console.log(val); + }, + }, methods: {}, }; diff --git a/src/views/Index/Index.vue b/src/views/Index/Index.vue index 8184456..97792f9 100644 --- a/src/views/Index/Index.vue +++ b/src/views/Index/Index.vue @@ -19,7 +19,8 @@ - +
+ @@ -95,7 +96,6 @@ export default { list = data; this.list = [...list]; this.$message.success('获取数据成功'); - // this.list = data; this.disProgress = false; } else { // this.$message.error(msg);