ソースを参照

Merge branch 'master' into zzd

zhouzhendong 4 年 前
コミット
bdb333a4e4

+ 1 - 1
.gitlab-ci.yml

@@ -51,6 +51,6 @@ deploy:
 #    - cd /var/www/bswas_test && sudo git config --global credential.helper store
 #    - sudo git pull
     - sudo bash ci/scpUpdate.sh
-#    - sudo bash ci/executeCommand.sh
+    - sudo bash ci/executeCommand.sh
   only:
     - master

+ 1 - 1
app/Demand.php

@@ -15,7 +15,7 @@ class Demand extends Model
     use ModelLogChanging;
     use ModelTimeFormat;
 
-    protected $fillable = ['authority_id', 'initiator', 'description', 'type', 'status', 'handler'];
+    protected $fillable = ['authority_id', 'initiator', 'description', 'type', 'status', 'handler','title','route'];
 
     // 需求类型
     protected static $type = ['需求', '问题'];

+ 5 - 5
app/Filters/DischargeTaskFilters.php

@@ -11,7 +11,7 @@ class DischargeTaskFilters
     protected $request;
     protected $queryBuilder;
     protected $filters = [
-        'owners', 'created_at_start', 'created_at_end', 'numbers', 'status', 'type', 'income_remark','facilitators','created_range','owners'
+        'owners', 'income_at_start', 'income_at_end', 'numbers', 'status', 'type', 'income_remark','facilitators','created_range','owners'
     ];
     protected $array_filter;
     protected $params = [];
@@ -65,13 +65,13 @@ class DischargeTaskFilters
         $this->queryBuilder->where('discharge_tasks.owner_id',$owner_id);
     }
 
-    public function created_at_start($created_at_start)
+    public function income_at_start($income_at_start)
     {
-        $this->queryBuilder->where('discharge_tasks.created_at','>=',$created_at_start);
+        $this->queryBuilder->where('discharge_tasks.income_at','>=',$income_at_start.' 00:00:00');
     }
-    public function created_at_end($created_at_end)
+    public function income_at_end($income_at_end)
     {
-        $this->queryBuilder->where('discharge_tasks.created_at','<=',$created_at_end);
+        $this->queryBuilder->where('discharge_tasks.income_at','<=',$income_at_end.' 23:59:59');
     }
 
     public function numbers($numbers)

+ 1 - 1
app/Http/Middleware/Authenticate.php

@@ -16,7 +16,7 @@ class Authenticate extends Middleware
      *
      * @var array|string[]
      */
-    protected array $whiteList = [
+    protected $whiteList = [
 
     ];
 

+ 1 - 1
ci/executeCommand.sh

@@ -23,4 +23,4 @@ for file in `ls $update_path`
         fi
     done
 
-
+sshpass -p $password ssh -p 10022 $username@$Ip "cd $dsc; sudo php artisan view:clear"

+ 34 - 0
database/migrations/2021_07_08_133251_add_title_and_route_column_to_demands_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddTitleAndRouteColumnToDemandsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('demands', function (Blueprint $table) {
+            $table->string('title')->nullable()->comment('网页标题');
+            $table->string('route')->nullable()->comment('当前网页路由');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('demands', function (Blueprint $table) {
+            $table->dropColumn('title');
+            $table->dropColumn('route');
+        });
+    }
+}

+ 4 - 0
resources/views/demand/_createjs.blade.php

@@ -49,6 +49,8 @@
             },
             /** 创建 */
             createDemand() {
+                this.addDemand['route']=window.location.href;
+                this.addDemand['title']=document.title.replace('BsWAS','');
                 let url = '{{url('apiLocal/demand/store')}}';
                 window.tempTip.setIndex(1999);
                 window.tempTip.setDuration(3000);
@@ -57,6 +59,8 @@
                 let file = document.querySelector('#add-demand-file-create').files[0];
                 if(this.addDemand['authority_id'])formData.append('authority_id', this.addDemand['authority_id']);
                 if(this.addDemand['type'])formData.append('type', this.addDemand['type']);
+                if(this.addDemand['route'])formData.append('route', this.addDemand['route']);
+                if(this.addDemand['title'])formData.append('title', this.addDemand['title']);
                 if(this.addDemand['description'])formData.append('description', this.addDemand['description']);
                 if(file)formData.append('file', file);
 

+ 4 - 0
resources/views/demand/search/_table.blade.php

@@ -6,6 +6,8 @@
         <th rowspan="2">需求描述</th>
         <th rowspan="1">过程</th>
         <th rowspan="2">附件</th>
+        <th rowspan="2">路由</th>
+        <th rowspan="2">标题</th>
         <th rowspan="2">发起人</th>
         <th rowspan="2">处理人</th>
         <th rowspan="2">发起时间</th>
@@ -62,6 +64,8 @@
                     <button v-else type="button" class="btn btn-outline-secondary" @click="showUploadDiv(demand,i)">上传文件</button>
                 </div>
             </td>
+            <td>@{{ demand.route }}</td>
+            <td>@{{ demand.title }}</td>
             <td>@{{ demand.initiator ? demand.initiator.name : '' }}</td>
             <td>@{{ demand.handle ? demand.handle.name : '' }}</td>
             <td>@{{ demand.created_at }}</td>

+ 4 - 4
resources/views/demand/search/index.blade.php

@@ -3,10 +3,10 @@
 @section('title','需求')
 
 @section('content')
-    <nav id="nav2">
-        @component('demand.menu')@endcomponent
-        @component('demand.search.menu')@endcomponent
-    </nav>
+{{--    <nav id="nav2">--}}
+{{--        @component('demand.menu')@endcomponent--}}
+{{--        @component('demand.search.menu')@endcomponent--}}
+{{--    </nav>--}}
 
     <div class="container-fluid d-none" id="list">
         <div id="form_div"></div>

+ 1 - 1
resources/views/layouts/app.blade.php

@@ -27,7 +27,7 @@
     </nav>
     <div id="menu"></div>
 
-    @auth()
+    @auth
         @component('demand._create')@endcomponent
     @endauth
     @yield('content')

+ 2 - 2
resources/views/personnel/discharge/task/index.blade.php

@@ -106,8 +106,8 @@
                         placeholder: ['货主', '定位或多选货主'],
                         data: _this.owners
                     },
-                    {name: 'created_at_start', type: 'dateTime', tip: '创建开始日期'},
-                    {name: 'created_at_end', type: 'dateTime', tip: '创建结束日期'},
+                    {name: 'income_at_start', type: 'dateTime', tip: '预约开始日期'},
+                    {name: 'income_at_end', type: 'dateTime', tip: '预约结束日期'},
                     {name: 'numbers', type: 'input', tip: '可支持多入库单号,模糊搜索可在两侧增加百分号(%)进行',placeholder:'入库单号'},
                     {name: 'status', type: 'select', tip: '状态' , data: _this.status,placeholder:'状态'},
                     {name: 'income_remark', type: 'input', tip: '备注' , data: _this.status,placeholder:'备注'}

+ 1 - 1
routes/web.php

@@ -46,7 +46,7 @@ Route::get('personnel/checking-in/QRCode','QRCodeController@QRCode');
 Route::get('personnel/checking-in/importAndExportQRCode','QRCodeController@importAndExportQRCode');
 Route::post('personnel/checking-in/refreshQRCode','QRCodeController@refreshQRCode');
 //监视器
-Route::get('station/index/{station}','StationController@monitorShow');
+Route::get('station/monitor/{station}','StationController@monitorShow');
 //打卡记录
 Route::group(['prefix'=>'personnel/checking-in/userDutyCheck'],function(){
     Route::get('importAndExportClock','UserDutyCheckController@importAndExportClock');