Skip to content

Commit b72d8b0

Browse files
committed
Merge branch 'develop'
2 parents e885681 + 514c328 commit b72d8b0

38 files changed

+2950
-554
lines changed

admin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"nprogress": "0.2.0",
3030
"path-to-regexp": "2.4.0",
3131
"vue": "2.6.10",
32+
"vue-clipboard2": "^0.3.0",
3233
"vue-router": "3.0.6",
3334
"vuex": "3.1.0",
3435
"xlsx": "^0.14.3"

admin/src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import '@/permission' // permission control
1919

2020
// set ElementUI lang to EN
2121
// Vue.use(ElementUI, { locale })
22+
import VueClipboard from 'vue-clipboard2'
23+
24+
Vue.use(VueClipboard)
2225
Vue.use(ElementUI)
2326

2427
Vue.config.productionTip = false

admin/src/router/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ const routeBase = [
220220
{ path: '/excel', name: 'excel', component: () => import('@/views/home/excel'), hidden: true },
221221
{ path: '/upload', name: 'upload', component: () => import('@/views/home/upload'), hidden: true },
222222
{ path: '/websocket', name: 'websocket', component: () => import('@/views/home/websocket'), hidden: true },
223+
{ path: '/clipboard', name: 'clipboard', component: () => import('@/views/home/clipboard'), hidden: true },
223224
{ path: '/echarts', name: 'echarts', component: () => import('@/views/echarts/index'), hidden: true },
224225
// { path: '/index', component: () => import('@/views/home/index'), hidden: true },
225226
{ path: '/login', component: () => import('@/views/login/index'), hidden: true },

admin/src/views/home/clipboard.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<div class="container">
3+
<input v-model="message" type="text">
4+
<button type="button" @click="doCopy('add me!')">Copy!</button>
5+
</div>
6+
</template>
7+
<script>
8+
export default {
9+
data() {
10+
return {
11+
message: 'Copy These Text'
12+
}
13+
},
14+
methods: {
15+
dataProcessing(val) {
16+
this.message = this.message + ' ' + val
17+
},
18+
doCopy(val) {
19+
this.dataProcessing(val)
20+
this.$copyText(this.message).then(function(e) {
21+
alert('Copied')
22+
console.log(e)
23+
}, function(e) {
24+
alert('Can not copy')
25+
console.log(e)
26+
})
27+
}
28+
}
29+
}
30+
</script>

admin/src/views/home/line.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
</fieldset>
1515
<el-table v-loading="loading" :data="tableLine" border style="width: 100%">
1616
<el-table-column prop="stationName" label="站台" width="" />
17-
<!--<el-table-column-->
18-
<!--prop="stationCode"-->
19-
<!--label="编号"-->
20-
<!--width="100">-->
21-
<!--</el-table-column>-->
17+
<!--<el-table-column prop="stationCode" label="编号" width="100" />-->
2218
<el-table-column prop="carCode" label="车牌" width="" />
2319
<el-table-column prop="ArrivalTime" label="进站时间" width="" />
2420
</el-table>

admin/src/views/home/out.vue

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
<el-col :span="0">&nbsp;</el-col>
3535
</el-form-item>
3636
</el-form>
37+
<el-row>
38+
<el-col :span="4">&nbsp;&nbsp;</el-col>
39+
<el-col :span="4">
40+
<el-button @click="copyInput">一键复制输入内容</el-button>
41+
</el-col>
42+
<el-col :span="7">&nbsp;&nbsp;</el-col>
43+
<el-col :span="1"><el-button @click="copyOutput">一键复制输出内容</el-button></el-col>
44+
</el-row>
3745
</div>
3846
</template>
3947

@@ -60,6 +68,37 @@ export default {
6068
},
6169
created() {},
6270
methods: {
71+
copyInput() {
72+
const that = this
73+
that.$copyText(this.form.input).then(function(e) {
74+
that.$message({
75+
message: '输入内容复制成功',
76+
type: 'success'
77+
})
78+
}, function(e) {
79+
this.$message({
80+
message: '复制失败',
81+
type: 'error'
82+
})
83+
console.log(e)
84+
})
85+
},
86+
copyOutput() {
87+
const that = this
88+
this.$copyText(this.output).then(function(e) {
89+
that.$message({
90+
message: '输出内容复制成功',
91+
type: 'success'
92+
})
93+
// console.log(e)
94+
}, function(e) {
95+
this.$message({
96+
message: '复制失败',
97+
type: 'error'
98+
})
99+
console.log(e)
100+
})
101+
},
63102
onSubmit(form) {
64103
this.$refs[form].validate((valid) => {
65104
if (valid) {

laravel/Feature.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
5. 后台密码修改操作
99

1010
TODO
11+
12+
New: 2019-07-27 中文排版输出支持一键复制功能

laravel/app/Http/Controllers/Api/LinesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use App\Models\Line;
77
use App\Http\Controllers\Controller;
88
use Illuminate\Http\Request;
9-
use Vinkla\Hashids\Facades\Hashids;
9+
// use Vinkla\Hashids\Facades\Hashids;
1010

1111
class LinesController extends Controller
1212
{

laravel/app/Http/Controllers/AuthController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace App\Http\Controllers;
44

5+
56
// use Illuminate\Support\Facades\Auth;
67
// use App\Http\Controllers\Controller;
7-
88
use App\Events\LoginEvent;
99
use App\Http\Repository\UserRepository;
10-
use Hhxsv5\LaravelS\Swoole\Task\Event;
10+
// use Hhxsv5\LaravelS\Swoole\Task\Event;
1111
use Jenssegers\Agent\Agent;
1212

1313
class AuthController extends Controller
@@ -112,7 +112,7 @@ public function refresh()
112112
/**
113113
* Get the token array structure.
114114
*
115-
* @param string $token
115+
* @param string $token
116116
*
117117
* @return \Illuminate\Http\JsonResponse
118118
*/

laravel/app/Http/Controllers/Bus/AutoController.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Http\Controllers\Bus;
44

55
use App\Http\Repository\AccessToken;
6+
use AuroraLZDF\Bigfile\Traits\TraitBigfileChunk;
67
use Curl\Http;
78
use Illuminate\Http\Request;
89
use App\Http\Controllers\Controller;
@@ -11,6 +12,8 @@
1112

1213
class AutoController extends Controller
1314
{
15+
use TraitBigfileChunk;
16+
1417
/**
1518
* @var Http 请求类
1619
*/
@@ -20,6 +23,45 @@ public function __construct()
2023
{
2124
$this->http || $this->http = Http::getInstent();
2225
}
26+
27+
/**
28+
* 展示视图
29+
*
30+
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\think\response\View
31+
*/
32+
public function loadView()
33+
{
34+
$data = [
35+
'chunk_size' => config('bigfile.chunk_size'),
36+
'max_size' => config('bigfile.max_size'),
37+
'user_id' => Auth()->id(),
38+
];
39+
return view('bigfile.bigfile', compact('data'));
40+
}
41+
42+
/**
43+
* 上传操作
44+
*
45+
* @param Request $request
46+
* @return \Illuminate\Http\JsonResponse
47+
*
48+
* @throws \Exception
49+
*/
50+
public function upload(Request $request)
51+
{
52+
$data = $request->all();
53+
$action = $request->input('act');
54+
55+
if (isset($action) && $action == 'upload') {
56+
57+
$result = $this->uploadToServer($data);
58+
return response()->json($result);
59+
}
60+
61+
$result = $this->uploadChunk($request);
62+
return response()->json($result);
63+
}
64+
2365
/**
2466
* 获取七牛 Token 的方法
2567
*

0 commit comments

Comments
 (0)