1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-049f37f8","chunk-2d0ced7d"],{"317c":function(t,e,a){},"60d1":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[e("j-modal",{attrs:{title:t.title,width:t.width,visible:t.visible,confirmLoading:t.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:t.handleOk,cancel:t.handleCancel}},[e("a-spin",{attrs:{spinning:t.confirmLoading}},[e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchQuery.apply(null,arguments)}}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[e("a-form-item",{attrs:{label:"日志类型"}},[e("a-select",{attrs:{placeholder:"日志类型",disabled:""},model:{value:t.queryParam.type,callback:function(e){t.$set(t.queryParam,"type",e)},expression:"queryParam.type"}},t._l(t.options,(function(a){return e("a-select-option",{key:a.key,attrs:{value:a.key}},[e("span",{staticStyle:{display:"inline-block",width:"100%"},attrs:{title:a}},[t._v("\n "+t._s(a.val)+"\n ")])])})),1)],1)],1),e("a-col",{attrs:{xl:12,lg:17,md:16,sm:24}},[e("a-form-item",{attrs:{label:"角色用户"}},[e("a-select",{attrs:{mode:"multiple",placeholder:"角色用户"},on:{change:t.changeUser},model:{value:t.queryParam.userid,callback:function(e){t.$set(t.queryParam,"userid",e)},expression:"queryParam.userid"}},t._l(t.users,(function(a){return e("a-select-option",{key:a.key,attrs:{value:a.key}},[e("span",{attrs:{title:a}},[t._v("\n "+t._s(a.val)+"\n ")])])})),1)],1)],1),e("a-col",{attrs:{xl:6,lg:7,md:8,sm:24}},[e("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(e){return t.handleExportXls("训练日志")}}},[t._v("导出打印")])],1)],1)],1)],1),e("div",[e("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[e("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),t._v(" 已选择 "),e("a",{staticStyle:{"font-weight":"600"}},[t._v(t._s(t.selectedRowKeys.length))]),t._v("项\n "),e("a",{staticStyle:{"margin-left":"24px"},on:{click:t.onClearSelected}},[t._v("清空")])]),e("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"middle",bordered:"",rowKey:"id",columns:t.columns,dataSource:t.dataSource,pagination:t.ipagination,loading:t.loading,rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"htmlSlot",fn:function(a){return[e("div",{domProps:{innerHTML:t._s(a)}})]}},{key:"imgSlot",fn:function(a){return[a?e("img",{staticStyle:{"max-width":"80px","font-size":"12px","font-style":"italic"},attrs:{src:t.getImgView(a),height:"25px",alt:""}}):e("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[t._v("无图片")])]}},{key:"fileSlot",fn:function(a){return[a?e("a-button",{attrs:{ghost:!0,type:"primary",icon:"download",size:"small"},on:{click:function(e){return t.uploadFile(a)}}},[t._v("\n 下载\n ")]):e("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[t._v("无文件")])]}},{key:"action",fn:function(a,n){return e("span",{},[e("a",{on:{click:function(e){return t.showMessageDetail(n)}}},[t._v("详情")])])}}])})],1)])],1)],1),e("MessageDetail",{ref:"detailForm"})],1)},i=[],s=a("0fea"),l=(a("88bc"),a("ca00"),a("e610")),r=a("b65a"),o=a("b441"),c=a("2555"),d={name:"RecordLogsModal",mixins:[r["a"]],components:{JImageUpload:l["default"],MessageDetail:c["default"]},data:function(){var t=this;return{title:"辅助评估",width:"80%",visible:!1,roles:{},options:[{key:0,val:"普通日志"},{key:1,val:"飞行日志"},{key:2,val:"作战文书"}],model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,queryParam:{type:0,userid:[]},url:{list:"/admin/logs/list",exportXlsUrl:"/admin/logs/exportXls"},config:{scene:{},ai:{},objective:[],role:[]},columns:[],columns0:[{title:"#",dataIndex:"id",width:60,align:"center"},{title:"时间",align:"center",width:80,dataIndex:"tick"},{title:"日志",align:"center",dataIndex:"text"},{title:"参训人员",align:"center",width:140,dataIndex:"uid",customRender:function(e,a,n){if(!t.roles)return"异常";var i=t.roles[a.uid+""];return i||"异常"}},{title:"提交时间",align:"center",width:100,dataIndex:"add_time"}],columns1:[{title:"#",dataIndex:"id",width:60,align:"center"},{title:"时间",align:"center",width:80,dataIndex:"tick"},{title:"经度",align:"center",dataIndex:"longtitude"},{title:"纬度",align:"center",dataIndex:"latitude"},{title:"海拔",align:"center",dataIndex:"altitude"},{title:"俯仰",align:"center",dataIndex:"pitch"},{title:"滚转",align:"center",dataIndex:"roll"},{title:"偏航",align:"center",dataIndex:"yaw"},{title:"参训人员",align:"center",width:140,dataIndex:"uid",customRender:function(e,a,n){if(!t.roles)return"异常";var i=t.roles[a.uid+""];return i||"异常"}},{title:"提交时间",align:"center",width:100,dataIndex:"add_time"}],columns2:[{title:"#",dataIndex:"id",width:60,align:"center"},{title:"时间",align:"center",width:80,dataIndex:"tick"},{title:"标题",align:"center",dataIndex:"title"},{title:"发送者",align:"center",dataIndex:"from",width:140,customRender:function(t,e,a){var n=o["a"].Roles[parseInt(e.from)];return n||"异常"}},{title:"接收者",align:"center",dataIndex:"to",width:140,customRender:function(e,a,n){return t.roles?a.to:"异常"}},{title:"提交时间",align:"center",width:100,dataIndex:"add_time"},{title:"操作",align:"center",width:100,dataIndex:"action",scopedSlots:{customRender:"action"}}]}},created:function(){},computed:{users:function(){var t=this.config.role,e=[];return t.forEach((function(t){var a=o["a"].Roles[parseInt(t.role)],n="";20==t.role&&(n=o["a"].VehicleNames[parseInt(t.vehicleid)]),-1!=t.user&&e.push({key:t.user,val:"".concat(n).concat(a,"(").concat(t.name," - ").concat(t.user,")")})})),e}},methods:{changeUser:function(){this.queryParam.uids=this.queryParam.userid.join(","),this.loadData(1)},add:function(){this.edit({})},setLogType:function(t){this.queryParam.type=t;var e=["/admin/logs/list","/admin/logs/flyPosture","/admin/logs/message"];this.url.list=e[t];var a=[this.columns0,this.columns1,this.columns2];this.columns=a[t]},edit:function(t,e){this.roles={},this.config={scene:{},ai:{},objective:[],role:[]},this.queryParam.userid=[],this.queryParam.uids=void 0,this.queryParam.rid=t.id,this.setLogType(e),this.confirmLoading=!0;var a=this;Object(s["c"])("/admin/record/detail",{id:t.id}).then((function(t){t.success||(a.$message.warning(t.message),a.close());var e=t.result.config,n=e?e.role:[],i={};n.forEach((function(t){if(-1!=t.user){var e=o["a"].Roles[parseInt(t.role)],a="";20==t.role&&(a=o["a"].VehicleNames[parseInt(t.vehicleid)]),i[t.user+""]="".concat(a).concat(e,"(").concat(t.name,")")}})),a.roles=i,a.model=t.result,e&&(a.config=e),a.loadData(1)})).finally((function(){a.confirmLoading=!1})),this.visible=!0},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){},handleCancel:function(){this.close()},showMessageDetail:function(t){this.$refs.detailForm.edit(t)}}},u=d,m=a("2877"),f=Object(m["a"])(u,n,i,!1,null,null,null);e["default"]=f.exports},"9b2a":function(t,e,a){"use strict";a("317c")},bed8:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("j-modal",{attrs:{title:t.title,width:t.width,visible:t.visible,confirmLoading:t.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:t.handleOk,cancel:t.handleCancel}},[e("template",{slot:"footer"},[e("a-button",{key:"back",on:{click:t.handleCancel}},[t._v("\n 取消\n ")]),e("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleExportXls("训练详情")}}},[t._v("\n 导出打印\n ")])],1),e("a-spin",{attrs:{spinning:t.confirmLoading}},[e("p",{staticClass:"title first"},[t._v("训练配置")]),e("a-row",{staticClass:"detail-row",attrs:{gutter:24}},[e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("训练名字:")]),e("span",[t._v(t._s(t.title))])]),e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("科目名字:")]),e("span",[t._v(t._s(t.model.subject))])])],1),e("a-row",{staticClass:"detail-row",attrs:{gutter:24}},[e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("训练地图:")]),e("span",[t._v(t._s(t._f("sceneName")(t.config.scene.id)))])]),e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("初始天气:")]),e("span",[t._v(t._s(t._f("weatherName")(t.config.scene.weather)))])])],1),e("a-row",{staticClass:"detail-row",attrs:{gutter:24}},[e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("初始时间:")]),e("span",[t._v(t._s(t._f("timeName")(t.config.scene.time)))])])],1),e("a-row",{staticClass:"detail-row",attrs:{gutter:24}},[e("a-col",{staticClass:"detail-item",attrs:{span:24}},[e("span",{staticClass:"label"},[t._v("训练标准:")]),t._l(t.config.objective,(function(a){return e("a-tag",{key:a.key,attrs:{size:"large"}},[t._v(t._s(a.key)+" : "+t._s(a.val))])}))],2)],1),e("p",{staticClass:"title"},[t._v("参训情况")]),e("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"small",bordered:"",rowKey:"user",columns:t.columns,dataSource:t.dataSource},scopedSlots:t._u([{key:"htmlSlot",fn:function(a){return[e("div",{domProps:{innerHTML:t._s(a)}})]}},{key:"imgSlot",fn:function(a){return[a?e("img",{staticStyle:{"max-width":"80px","font-size":"12px","font-style":"italic"},attrs:{src:t.getImgView(a),height:"25px",alt:""}}):e("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[t._v("无图片")])]}},{key:"fileSlot",fn:function(a){return[a?e("a-button",{attrs:{ghost:!0,type:"primary",icon:"download",size:"small"},on:{click:function(e){return t.uploadFile(a)}}},[t._v("\n 下载\n ")]):e("span",{staticStyle:{"font-size":"12px","font-style":"italic"}},[t._v("无文件")])]}},{key:"action",fn:function(a,n){return e("span",{},[e("a",{on:{click:function(e){return t.showUserDetail(n)}}},[t._v("详情")])])}}])}),e("p",{staticClass:"title"},[t._v("训练状态")]),e("a-row",{staticClass:"detail-row",attrs:{gutter:24}},[e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("开始时间:")]),e("span",[t._v(t._s(t.model.start_time))])]),e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("结束时间:")]),e("span",[t._v(t._s(t.model.end_time))])])],1),e("a-row",{staticClass:"detail-row",attrs:{gutter:24}},[e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("持续时间:")]),e("span",[t._v(t._s(t.model.duration?t.model.duration:0)+"s")])]),e("a-col",{staticClass:"detail-item",attrs:{span:12}},[e("span",{staticClass:"label"},[t._v("任务状态:")]),e("span",[t._v(t._s(t._f("statestr")(t.model.state)))])])],1)],1)],2)},i=[],s=a("0fea"),l=(a("88bc"),a("ca00"),a("e610")),r=a("a061"),o=a("b441");function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var d={name:"RecordModal",components:{JImageUpload:l["default"],JEditor:r["default"]},data:function(){var t;return t={form:this.$form.createForm(this),title:"操作",width:800,visible:!1,model:{},confirmLoading:!1,config:{scene:{},ai:{},objective:[],role:[]}},c(t,"title",""),c(t,"columns",[{title:"#",dataIndex:"",width:60,align:"center",customRender:function(t,e,a){return parseInt(a)+1}},{title:"姓名",align:"center",dataIndex:"name",customRender:function(t,e,a){return e.name?e.name:"---"}},{title:"角色",align:"center",dataIndex:"role",customRender:function(t,e,a){return o["a"].Roles[parseInt(e.role)]}},{title:"飞机型号",align:"center",dataIndex:"vehicleid",customRender:function(t,e,a){return-1==e.vehicleid?"---":o["a"].VehicleNames[parseInt(e.vehicleid)]+"(".concat(e.num,")")}},{title:"所属小组",align:"center",dataIndex:"group",customRender:function(t,e,a){return e.group<1?"---":"小组"+e.group}},{title:"所属小队",align:"center",dataIndex:"team",customRender:function(t,e,a){return e.team<1?"---":"小队"+e.team}},{title:"操作",dataIndex:"action",align:"center",width:80,scopedSlots:{customRender:"action"}}]),c(t,"dataSource",[]),t},filters:{sceneName:function(t){return o["a"].Maps[parseInt(t)]},weatherName:function(t){if(void 0!=t)return o["a"].Weathers[parseInt(t)]},timeName:function(t){if(void 0!=t)return o["a"].TimeName(t)},statestr:function(t){return 0==t?"未开始":1==t?"进行中":"已结束"}},created:function(){},methods:{showUserDetail:function(t){var e=t.user;if(-1!=e){var a=this.rid;this.$router.push({path:"/app/userrecord?uid=".concat(e,"&rid=").concat(a),params:{rid:a,uid:e}})}},add:function(){this.edit({})},edit:function(t){this.visible=!0;var e=this;e.confirmLoading=!0,this.rid=t.id,Object(s["c"])("/admin/record/detail",{id:t.id}).then((function(t){t.success||(e.$message.warning(t.message),e.close());var a=t.result.config;e.$nextTick((function(){e.model=t.result,e.title=t.result.title,e.config=a,e.dataSource=a.role?a.role.filter((function(t){return-1!=t.user})):[]}))})).finally((function(){e.confirmLoading=!1}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){this.close()},handleCancel:function(){this.close()},parseUser:function(t){},handleExportXls:function(t){var e=this;t&&"string"==typeof t||(t="导出文件"),Object(s["b"])("/admin/record/detail/exportXls?id="+this.rid).then((function(a){if(a)if("undefined"!==typeof window.navigator.msSaveBlob)window.navigator.msSaveBlob(new Blob([a],{type:"application/vnd.ms-excel"}),t+".xls");else{var n=window.URL.createObjectURL(new Blob([a],{type:"application/vnd.ms-excel"})),i=document.createElement("a");i.style.display="none",i.href=n,i.setAttribute("download",t+".xls"),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(n)}else e.$message.warning("文件下载失败")}))}}},u=d,m=(a("9b2a"),a("2877")),f=Object(m["a"])(u,n,i,!1,null,"9b19c592",null);e["default"]=f.exports}}]);
|