liuhj 1 éve%!(EXTRA string=óta)
szülő
commit
e2f6bd8d9b

+ 31 - 27
src/components/OP/InvitationOfficialActivities.vue

@@ -8,39 +8,35 @@
                 </div>
                 <div style="display: flex;justify-content: space-between;">
                     <div style="width: 70%;display: flex;">
-                        <div style="width: 25%;">
-                            <el-select v-model="DiId" placeholder="团组选择" clearable filterable
-                                @change="AirTicketResSelectChange">
-                                <el-option v-for="item in AirTicketResSelectData" :key="item.id" :label="item.teamName"
-                                    :value="item.id">
-                                </el-option>
-                            </el-select>
-                        </div>
-                        <div style="width: 25%;"><el-input v-model="inviter" placeholder="请输入邀请方名称" clearable></el-input>
-                        </div>
-                        <div style="width: 50%;"><el-date-picker v-model="InviteTime" type="daterange" align="right"
-                                unlink-panels format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至"
-                                start-placeholder="邀请开始日期" end-placeholder="邀请结束日期" :picker-options="pickerOptions">
-                            </el-date-picker>
-                            <el-button type="primary" @click="ConditionsQuery">查询</el-button>
-                        </div>
+                        <el-select style="width:300px;margin-right:10px" v-model="DiId" placeholder="团组选择" clearable filterable
+                            @change="AirTicketResSelectChange">
+                            <el-option v-for="item in AirTicketResSelectData" :key="item.id" :label="item.teamName"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                        <el-input style="width:400px;margin-right:10px" v-model="inviter" placeholder="请输入邀请方名称" clearable></el-input>
+                        <el-date-picker style="width:400px;margin-right:10px" v-model="InviteTime" type="daterange" align="right"
+                        unlink-panels format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至"
+                        start-placeholder="邀请开始日期" end-placeholder="邀请结束日期" :picker-options="pickerOptions">
+                        </el-date-picker>
+                        <el-button type="primary" @click="ConditionsQuery">查询</el-button>
                     </div>
-                    <div style="widows: 30%;">
+                    <div style="width: 30%;text-align: right;">
                         <el-button type="primary" style="margin-left: 10px;" @click="addIf">新增</el-button>
                     </div>
                 </div>
                 <div style="margin:10px 0;color:#606266;">
-                    <span style="font-weight: bold;font-size:17px;">团队名称:</span>
+                    <span style="font-weight: bold;font-size:16px;">团队名称:</span>
                     <span style="color:#606266;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
-                    <span style="font-weight: bold;font-size:17px;">客户:</span>
+                    <span style="font-weight: bold;font-size:16px;">客户:</span>
                     <span style="color:#606266;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
 }}&nbsp;&nbsp;&nbsp;</span>
-                    <span style="font-weight: bold;font-size:17px;">出访国家:</span>
+                    <span style="font-weight: bold;font-size:16px;">出访国家:</span>
                     <span style="color:#606266;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
-                    <span style="font-weight: bold;font-size:17px;">起止日期:</span>
+                    <span style="font-weight: bold;font-size:16px;">起止日期:</span>
                     <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
                     }}&nbsp;&nbsp;&nbsp;</span>
-                    <span style="font-weight: bold;font-size:17px;">天数/人数:</span>
+                    <span style="font-weight: bold;font-size:16px;">天数/人数:</span>
                     <span style="color:#606266;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
                 </div>
             </div>
@@ -56,7 +52,7 @@
                     </el-table-column>
                     <el-table-column prop="inviter" label="邀请方" width="335">
                     </el-table-column>
-                    <el-table-column prop="inviteTime" label="邀请时间" width="200">
+                    <el-table-column prop="inviteTime" label="邀请时间" width="160">
                     </el-table-column>
                     <el-table-column prop="inviteCost,currency" label="邀请费用" width="150" sortable>
                         <template slot-scope="scope">
@@ -69,7 +65,7 @@
                             <span v-else>否</span>
                         </template>
                     </el-table-column>
-                    <el-table-column prop="isAudit" label="是否审核" width="120">
+                    <el-table-column prop="isAudit" label="是否审核" width="90">
                         <template slot-scope="isAudit">
                             <span v-if="isAudit.row.isAudit == 1">已通过</span>
                             <span v-else-if="isAudit.row.isAudit == 0">未审核</span>
@@ -89,7 +85,7 @@
                     </el-table-column>
                 </el-table>
             </template>
-            <div class="block">
+            <div class="block" style="margin-top:15px;">
                 <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
                     :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
                     layout="total, sizes, prev, pager, next" :total="tableDatas.length">
@@ -100,6 +96,14 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        console.log(to)
+        console.log(from)
+        if(to.name!='OpInvitationOfficialActivities'){
+            from.meta.keepAlive = false;
+        }
+        next()
+    },
     data() {
         return {
             loading: false,
@@ -198,7 +202,6 @@ export default {
                 for (let index = 0; index < this.AirTicketResSelectData.length; index++) {
 
                     if (this.AirTicketResSelectData[index].id == parseInt(this.DiId)) {
-                        debugger
                         this.delegationInfo = this.AirTicketResSelectData[index];
                         break;
                     }
@@ -252,7 +255,6 @@ export default {
             })
         },
         addIf() {
-            debugger
             if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
                 this.$router.push({
                     path: "/home/OpInvitationOfficialActivities",
@@ -330,6 +332,8 @@ export default {
     padding: 10px;
     box-shadow: 0 0 5px #0005;
     border-radius: 10px;
+    min-height: 830px;
+    
 }
 
 .communal-title {

+ 9 - 18
src/components/OP/OpInvitationOfficialActivities.vue

@@ -7,12 +7,12 @@
         </div>
         <hr style='background-color:#5555; height:1px; border:none;' />
         <div>
-            <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
+            <el-form :model="delegationInfo" class="demo-ruleForm">
                 <div style="display: flex;">
                     <div style="width: 25%;">
                         <el-form-item label="团组名称:" label-width="160px">
                             <el-select v-model="DiIdSelect" clearable filterable placeholder="团组选择"
-                                @change="DecreasePaymentsChange" :disabled="isShow" style="width: 220px;">
+                                @change="DecreasePaymentsChange" :disabled="isShow" style="width: 100%;">
                                 <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
                                     :value="item.id">
                                 </el-option>
@@ -40,7 +40,7 @@
                 </div>
             </el-form>
             <el-form :model="InvitationOfficialActivities" ref="InvitationOfficialActivities"
-                :rules="InvitationOfficialActivitiesRules" label-width="100px" class="demo-ruleForm">
+                :rules="InvitationOfficialActivitiesRules" label-width="160px" class="demo-ruleForm">
                 <div style="display:flex ;">
                     <div style="width: 25%;">
                         <el-form-item label="邀请方地区:" prop="inviterArea" label-width="160px">
@@ -183,7 +183,7 @@
 
                 </div>
                 <div style="display: flex;">
-                    <div style="width: 90%;">
+                    <div style="width: 100%;">
                         <el-form-item label="备 注:" prop="remark" label-width="160px">
                             <el-input type="textarea" :rows="5" placeholder="备注"
                                 v-model="InvitationOfficialActivities.remark"></el-input>
@@ -191,7 +191,7 @@
                     </div>
                 </div>
                 <el-form-item>
-                    <div style="margin-left: 60%;">
+                    <div style="text-align: right;">
                         <el-button type="primary" @click="addBtn">保存</el-button>
                         <router-link to='/home/InvitationOfficialActivities'>
                             <el-button>取消</el-button>
@@ -360,7 +360,6 @@ export default {
                     that.InvitationOfficialActivities.contact = res.data.data._InvitationData.contact
                     that.InvitationOfficialActivities.job = res.data.data._InvitationData.job
                     that.InvitationOfficialActivities.tel = res.data.data._InvitationData.tel
-                    debugger
                     that.IsAuditGM = res.data.data._CreditCard.isAuditGM;
                     that.InvitationOfficialActivities.email = res.data.data._InvitationData.email
                     that.InvitationOfficialActivities.fax = res.data.data._InvitationData.fax
@@ -510,7 +509,6 @@ export default {
         //文件上传成功时的钩子
         upLoadSuccess(response, file, fileList) {
             if (response.code == 200) {
-                debugger
                 var that = this;
                 that.$axios({
                     method: 'post',
@@ -527,7 +525,6 @@ export default {
 
                     }
                 })
-                debugger
                 that.InvitationOfficialActivities.attachment = response.data
                 that.InvitationOfficialActivities.diId = that.DiIdSelect;
                 that.InvitationOfficialActivities.createUserId = that.userId;
@@ -564,7 +561,6 @@ export default {
             console.log("项目添加失败");
         },
         beforeRemove(file, fileList) {
-            debugger
             console.log(file.name)
             let id1 = this.uploadFiles.findIndex(item => {
                 if (item.name == file.name) {
@@ -576,7 +572,6 @@ export default {
             this.DelfileName = file.name
         },
         onChange(file, fileList) {
-            debugger
             this.projectName = file.name
         },
         QueryRate() {
@@ -634,13 +629,6 @@ export default {
 }
 </script>
 <style>
-.communal-list {
-    background-color: #fff;
-    padding: 10px;
-    box-shadow: 0 0 5px #0005;
-    border-radius: 10px;
-}
-
 .car_add .communal-title {
     display: flex;
     font-size: 17px;
@@ -676,12 +664,15 @@ export default {
     padding: 20px;
     box-shadow: 0 0 5px #0005;
     border-radius: 10px;
+    min-height: 810px;
 }
 
 .ExpressPirce .el-input input {
     text-align: left;
 }
-
+.car_add .el-date-editor.el-input,.car_add .el-input-number,.car_add .el-select{
+    width: 100%;
+}
 @media screen and (max-width: 1700px) {
     .appraise-box>div {
         width: 48%;

+ 22 - 7
src/components/child/test.vue

@@ -51,20 +51,35 @@
       this.token = JSON.parse(localStorage.getItem('userinif')).token;
       let thisVue = this;
       console.log(thisVue.token)
-      this.connection = new signalR.HubConnectionBuilder()
-        // .withAutomaticReconnect()//断线自动重连
-        .withUrl("http://132.232.92.186:8888/chatHub", {
+      this.connection = new signalR.HubConnectionBuilder(
+        {
           skipNegotiation: true,
-          transport: signalR.HttpTransportType.WebSockets,
-          accessTokenFactory: () => thisVue.token 
+          transport: signalR.HttpTransportType.WebSockets
+        }
+      )
+        // .withAutomaticReconnect()//断线自动重连
+        // .withUrl("http://132.232.92.186:8888/chatHub", (opts) =>
+        //     {                    
+        //         //opts.Headers.Add("Authorization", new AuthenticationHeaderValue("Bearer ", thisVue.token).ToString());         
+        //         opts.headers['Authorization'] = 'Bearer ' + thisVue.token;
+        //         skipNegotiation = true;
+        //         transport = signalR.HttpTransportType.WebSockets;
+        //         // opts.accessTokenFactory: () => thisVue.token                     
+        //     })    
+        .withUrl("http://132.232.92.186:8888/chatHub?access_token="+"Bearer "+ thisVue.token, 
+        {
+          // headers: {"Authorization":"Bearer "+ thisVue.token},
+          //options.headers['Authorization'] = 'Bearer your_auth_token';
+          
+          //accessTokenFactory: () => "Bearer "+ thisVue.token
         })
         .configureLogging(signalR.LogLevel.Information)
         .build();
-      this.connection.on("SendAll", function(data) {
+      this.connection.on("ReceiveMessage", function(data) {
         //thisVue.messages.push({ userid, message });
         console.log(data);
       });
-      this.connection.on("SendCustomUserMessage", function(userid,message) {
+      this.connection.on("ReceiveMessage", function(userid,message) {
         let user = "自己";//这里为了push不报错,我就弄了一个默认值。
         thisVue.messages.push({ userid, message });
         console.log({ userid, message });

+ 5 - 1
src/router/index.js

@@ -407,7 +407,11 @@ export default new Router({
         {
           path: '/home/InvitationOfficialActivities',
           name: 'InvitationOfficialActivities',
-          component: InvitationOfficialActivities
+          component: InvitationOfficialActivities,
+          meta: {
+            keepAlive: true, //此组件需要被缓存
+            isBack:false, //用于判断上一个页面是哪个
+          }
         },
         {
           path: '/home/OpInvitationOfficialActivities',

+ 6 - 1
vue.config.js

@@ -1,3 +1,8 @@
 module.exports = {
-    publicPath:'./'
+    publicPath:'./',
+    devServer:{
+        Proxy:{
+            ws:false
+        }
+    }
 }