Browse Source

Merge branch 'Haozi' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 4 years ago
parent
commit
79b33638cc

+ 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 = ['需求', '问题'];

+ 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>