Skip to content

Commit ca6ba9a

Browse files
author
shizhong
committed
2 parents 3fce66b + 0f9e0b7 commit ca6ba9a

File tree

9 files changed

+118
-17
lines changed

9 files changed

+118
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yudao-ui-admin",
3-
"version": "1.6.5-snapshot",
3+
"version": "1.6.6-snapshot",
44
"description": "芋道管理系统",
55
"author": "芋道",
66
"license": "MIT",

src/components/FileUpload/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default {
150150
},
151151
// 上传成功回调
152152
handleUploadSuccess(res, file) {
153-
if (res.code === 200) {
153+
if (res.code === 0) {
154154
// edit by 芋道源码
155155
this.uploadList.push({ name: res.data, url: res.data });
156156
this.uploadedSuccessfully();

src/views/infra/file/index.vue

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<template>
22
<div class="app-container">
3-
<doc-alert title="上传下载" url="https://doc.iocoder.cn/file/" />
3+
<doc-alert title="上传下载" url="https://doc.iocoder.cn/file/"/>
44
<!-- 搜索工作栏 -->
55
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
66
<el-form-item label="文件路径" prop="path">
77
<el-input v-model="queryParams.path" placeholder="请输入文件路径" clearable @keyup.enter.native="handleQuery"/>
88
</el-form-item>
99
<el-form-item label="创建时间" prop="createTime">
10-
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
11-
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
10+
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
11+
type="daterange"
12+
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
13+
:default-time="['00:00:00', '23:59:59']"/>
1214
</el-form-item>
1315
<el-form-item>
1416
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@@ -35,6 +37,9 @@
3537
<template v-slot="scope">
3638
<image-preview v-if="scope.row.type&&scope.row.type.indexOf('image/') === 0" :src="scope.row.url"
3739
:width="'100px'"></image-preview>
40+
<video v-else-if="scope.row.type&&scope.row.type.indexOf('video/') === 0" :width="'100px'">
41+
<source :src="scope.row.url"/>
42+
</video>
3843
<i v-else>无法预览,点击
3944
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" target="_blank"
4045
:href="getFileUrl + scope.row.configId + '/get/' + scope.row.path">下载
@@ -118,7 +123,7 @@ export default {
118123
title: "", // 弹出层标题
119124
isUploading: false, // 是否禁用上传
120125
url: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
121-
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部
126+
headers: {Authorization: "Bearer " + getAccessToken()}, // 设置上传的请求头部
122127
data: {} // 上传的额外数据,用于文件名
123128
},
124129
};
@@ -189,19 +194,20 @@ export default {
189194
/** 删除按钮操作 */
190195
handleDelete(row) {
191196
const id = row.id;
192-
this.$modal.confirm('是否确认删除文件编号为"' + id + '"的数据项?').then(function() {
197+
this.$modal.confirm('是否确认删除文件编号为"' + id + '"的数据项?').then(function () {
193198
return deleteFile(id);
194199
}).then(() => {
195200
this.getList();
196201
this.$modal.msgSuccess("删除成功");
197-
}).catch(() => {});
202+
}).catch(() => {
203+
});
198204
},
199205
// 用户昵称展示
200206
sizeFormat(row, column) {
201-
const unitArr = ["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];
207+
const unitArr = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
202208
const srcSize = parseFloat(row.size);
203209
const index = Math.floor(Math.log(srcSize) / Math.log(1024));
204-
let size =srcSize/Math.pow(1024,index);
210+
let size = srcSize / Math.pow(1024, index);
205211
size = size.toFixed(2);//保留的小数位数
206212
return size + ' ' + unitArr[index];
207213
},

src/views/infra/redis/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@
136136

137137
<script>
138138
import {getCache, getKeyDefineList, getKeyList, getKeyValue, deleteKey, deleteKeys} from "@/api/infra/redis";
139-
import echarts from "echarts";
140-
139+
import * as echarts from 'echarts'
140+
require('echarts/theme/macarons') // echarts theme
141141
export default {
142142
name: "Server",
143143
data () {

src/views/infra/webSocket/index.vue

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<template>
2+
<div class="app-container">
3+
<el-form label-width="120px">
4+
<el-row type="flex" :gutter="0">
5+
<el-col :sm="12">
6+
<el-form-item label="WebSocket地址" size="small">
7+
<el-input v-model="url" type="text"/>
8+
</el-form-item>
9+
</el-col>
10+
<el-col :offset="1">
11+
<el-form-item label="" label-width="0px" size="small">
12+
<el-button @click="connect" type="primary" :disabled="ws&&ws.readyState===1">
13+
{{ ws && ws.readyState === 1 ? "已连接" : "连接" }}
14+
</el-button>
15+
<el-button @click="exit" type="danger">断开</el-button>
16+
</el-form-item>
17+
</el-col>
18+
</el-row>
19+
<el-form-item label="发送内容" size="small">
20+
<el-input type="textarea" v-model="message" :rows="5"/>
21+
</el-form-item>
22+
<el-form-item label="" size="small">
23+
<el-button type="success" @click="send">发送消息</el-button>
24+
</el-form-item>
25+
<el-form-item label="接收内容" size="small">
26+
<el-input type="textarea" v-model="content" :rows="12" disabled/>
27+
</el-form-item>
28+
<el-form-item label="" size="small">
29+
<el-button type="info" @click="content=''">清空消息</el-button>
30+
</el-form-item>
31+
</el-form>
32+
</div>
33+
</template>
34+
35+
<script>
36+
import store from "@/store";
37+
import {getNowDateTime} from "@/utils/ruoyi";
38+
39+
export default {
40+
data() {
41+
return {
42+
url: process.env.VUE_APP_BASE_API + "/websocket/message",
43+
message: "",
44+
content: "",
45+
ws: null,
46+
};
47+
},
48+
created() {
49+
this.url = this.url.replace("http", "ws")
50+
},
51+
methods: {
52+
connect() {
53+
if (!'WebSocket' in window) {
54+
this.$modal.msgError("您的浏览器不支持WebSocket");
55+
return;
56+
}
57+
const userId = store.getters.userId;
58+
this.ws = new WebSocket(this.url + "?userId=" + userId);
59+
const self = this;
60+
this.ws.onopen = function (event) {
61+
self.content = self.content + "\n**********************连接开始**********************\n";
62+
};
63+
this.ws.onmessage = function (event) {
64+
self.content = self.content + "接收时间:" + getNowDateTime() + "\n" + event.data + "\n";
65+
};
66+
this.ws.onclose = function (event) {
67+
self.content = self.content + "**********************连接关闭**********************\n";
68+
};
69+
this.ws.error = function (event) {
70+
self.content = self.content + "**********************连接异常**********************\n";
71+
};
72+
},
73+
exit() {
74+
if (this.ws) {
75+
this.ws.close();
76+
this.ws = null;
77+
}
78+
},
79+
send() {
80+
if (!this.ws || this.ws.readyState !== 1) {
81+
this.$modal.msgError("未连接到服务器");
82+
return;
83+
}
84+
if (!this.message) {
85+
this.$modal.msgError("请输入发送内容");
86+
return;
87+
}
88+
this.ws.send(this.message);
89+
}
90+
},
91+
};
92+
</script>

src/views/mall/trade/order/detail.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
<el-table-column prop="spuName" label="商品" width="700">
5959
<template slot-scope="{ row }">
6060
{{row.spuName}}
61-
<el-tag size="medium" v-for="property in row.properties">{{property.propertyName}}:{{property.valueName}}</el-tag>
61+
<el-tag size="medium" v-for="property in row.properties" :key="property.propertyId">
62+
{{property.propertyName}}:{{property.valueName}}</el-tag>
6263
</template>
6364
</el-table-column>
6465
<el-table-column prop="originalUnitPrice" label="单价(元)" width="180">
@@ -79,7 +80,7 @@
7980
</el-table-column>
8081
</el-table>
8182
</el-descriptions-item>
82-
<el-descriptions-item v-for="(item,index) in 5" label-class-name="no-colon" /> <!-- 占位 -->
83+
<el-descriptions-item v-for="(item,index) in 5" label-class-name="no-colon" :key="item" /> <!-- 占位 -->
8384
<el-descriptions-item label="商品总额">¥{{ (order.originalPrice / 100.0).toFixed(2) }}</el-descriptions-item>
8485
<el-descriptions-item label="运费金额">¥{{ (order.deliveryPrice / 100.0).toFixed(2) }}</el-descriptions-item>
8586
<el-descriptions-item label="订单调价">¥{{ (order.adjustPrice / 100.0).toFixed(2) }}</el-descriptions-item>
@@ -92,7 +93,7 @@
9293
<el-descriptions-item label="积分抵扣" label-style="color: red">
9394
¥{{ (order.pointPrice / 100.0).toFixed(2) }}
9495
</el-descriptions-item>
95-
<el-descriptions-item v-for="(item,index) in 5" label-class-name="no-colon" /> <!-- 占位 -->
96+
<el-descriptions-item v-for="(item,index) in 5" label-class-name="no-colon" :key="item" /> <!-- 占位 -->
9697
<el-descriptions-item label="应付金额">
9798
¥{{ (order.payPrice / 100.0).toFixed(2) }}
9899
</el-descriptions-item>

src/views/mall/trade/order/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
<img :src="row.picUrl"/>
100100
<span class="ellipsis-2" :title="row.spuName">{{row.spuName}}</span>
101101
<!-- TODO @小程:下面是商品属性,想当度一行,放在商品名下面 -->
102-
<el-tag size="medium" v-for="property in row.properties">{{property.propertyName}}:{{property.valueName}}</el-tag>
102+
<el-tag size="medium" v-for="property in row.properties" :key="property.propertyId">
103+
{{property.propertyName}}:{{property.valueName}}</el-tag>
103104
</div>
104105
</template>
105106
</el-table-column>

src/views/system/area/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="app-container">
3-
3+
<doc-alert title="地区 & IP" url="https://doc.iocoder.cn/area-and-ip/" />
44
<!-- 操作工具栏 -->
55
<el-row :gutter="10" class="mb8">
66
<el-col :span="1.5">

src/views/system/sensitiveWord/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<div class="app-container">
3+
<doc-alert title="敏感词" url="https://doc.iocoder.cn/sensitive-word" />
34
<!-- 搜索工作栏 -->
45
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
56
<el-form-item label="敏感词" prop="name">

0 commit comments

Comments
 (0)