(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3204d152"],{"3eb1":function(e,t,a){},"6eb7":function(e,t,a){},"71d8":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("j-modal",{attrs:{title:e.title,width:e.width,visible:e.visible,confirmLoading:e.confirmLoading,switchFullscreen:"",cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.close}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"训练评价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{attrs:{placeholder:"评价",autoSize:{minRows:8,maxRows:16},maxLength:500},model:{value:e.evaValue,callback:function(t){e.evaValue=t},expression:"evaValue"}})],1)],1)],1)],1)},s=[],n=a("0fea"),r=(a("88bc"),{name:"Evaluation",data:function(){return{form:this.$form.createForm(this),title:"操作",width:800,visible:!1,model:{},evaValue:"",evaOldValue:"",labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,validatorRules:{countryName:{rules:[{required:!0,message:"请输入国家!"}]}},url:{edit:"/admin/user/comment"}}},created:function(){},methods:{edit:function(e,t){var a=this;this.form.resetFields(),this.visible=!0,this.uid=e,this.$nextTick((function(){a.evaValue=t,a.evaOldValue=t}))},close:function(){this.visible=!1},handleOk:function(){var e=this,t=this;if(this.evaValue!=this.evaOldValue){var a=this.$route.query.rid,i=this.uid,s={rid:a,uid:i,text:this.evaValue};Object(n["i"])(this.url.edit,s,"post").then((function(a){a.success?(t.$message.success(a.message),t.$emit("ok",e.evaValue)):t.$message.warning(a.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}else this.close()}}}),l=r,o=a("2877"),c=Object(o["a"])(l,i,s,!1,null,null,null);t["default"]=c.exports},"816f":function(e,t,a){"use strict";a("3eb1")},e92b:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("a-card",{staticClass:"card_root",attrs:{border:"true"}},[t("div",{staticClass:"user_info"},[e.userDetail.user.avatar?t("img",{staticClass:"avatar",attrs:{src:e.getImgView(e.userDetail.user.avatar),alt:""}}):t("a-avatar",{attrs:{size:120,icon:"user"}}),t("p",{staticClass:"name"},[e._v(e._s(e.userDetail.user.realname))]),t("p",{staticClass:"id"},[e._v("系统编号:"+e._s(e.userDetail.user.code))])],1),e.userDetail.base.length?t("a-descriptions",{staticClass:"des_list",attrs:{title:"基础信息"}},e._l(e.userDetail.base,(function(a,i){return t("a-descriptions-item",{key:i,attrs:{label:a.name}},[e._v(e._s(a.value))])})),1):e._e(),e.userDetail.weapon.length?t("a-descriptions",{staticClass:"des_list",attrs:{title:"装备信息"}},e._l(e.userDetail.weapon,(function(a,i){return t("a-descriptions-item",{key:i,attrs:{label:a.name}},[e._v(e._s(a.value))])})),1):e._e(),e.userDetail.task.length?t("a-descriptions",{staticClass:"des_list",attrs:{title:"任务信息"}},e._l(e.userDetail.task,(function(a,i){return t("a-descriptions-item",{key:i,attrs:{label:a.name}},[e._v(e._s(a.value))])})),1):e._e(),t("a-descriptions",{staticClass:"des_list",attrs:{title:"训练评价"}},[t("div",{},[e.comment?t("div",{staticClass:"des_eva",domProps:{innerHTML:e._s(e.comment)}}):e._e(),1==e.userInfo.role&&2==e.userInfo.type?t("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.showEvaluation()}}},[e._v("编辑")]):e._e()],1)]),t("div",{staticClass:"table_list"},[t("p",{staticClass:"table_title"},[e._v("训练日志")]),t("div",{staticClass:"tab_list"},e._l(e.tabList,(function(a,i){return t("span",{key:i,staticClass:"tab_item",class:{active:i==e.queryParam.type},on:{click:function(t){return e.callback(i)}}},[e._v(e._s(a))])})),0),t("a-table",{ref:"table",staticClass:"j-table-force-nowrap",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"action",fn:function(a,i){return t("span",{},[t("a",{on:{click:function(t){return e.showMessageDetail(i)}}},[e._v("详情")])])}}])})],1),t("MessageDetail",{ref:"detailForm"}),t("Evaluation",{ref:"evaModal",on:{ok:e.changeComment}})],1)},s=[],n=(a("6eb7"),a("ac0d")),r=a("b65a"),l=a("0fea"),o=a("2555"),c=a("71d8"),d=a("b441"),u={name:"UserRecordDetail",mixins:[n["b"],r["a"]],components:{MessageDetail:o["default"],Evaluation:c["default"]},data:function(){var e=this;return{rid:"",uid:"",userDetail:{base:[],task:[],user:[],weapon:[]},tabList:["普通日志","飞行日志","作战文书"],url:{list:"/admin/logs/list"},queryParam:{type:0,rid:""},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(t,a,i){if(!e.roles)return"异常";var s=e.roles[a.uid+""];return s||"异常"}},{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(t,a,i){if(!e.roles)return"异常";var s=e.roles[a.uid+""];return s||"异常"}},{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(e,t,a){var i=d["a"].Roles[parseInt(t.from)];return i||"异常"}},{title:"接收者",align:"center",dataIndex:"to",width:140,customRender:function(t,a,i){return e.roles?a.to:"异常"}},{title:"提交时间",align:"center",width:100,dataIndex:"add_time"},{title:"操作",align:"center",width:100,dataIndex:"action",scopedSlots:{customRender:"action"}}]}},created:function(){var e=this.$route.query,t=e.rid,a=e.uid;this.rid=t,this.uid=a,this.getUserDetail(),this.edit()},computed:{comment:function(){var e=this.userDetail.comment||{};return e=e.comment||"",e},userInfo:function(){return this.$store.getters.userInfo}},methods:{initDictConfig:function(){},getImgView:function(e){return e&&e.indexOf(",")>0&&(e=e.substring(0,e.indexOf(","))),Object(l["e"])(e)},getUserDetail:function(){var e=this;Object(l["c"])("/admin/user/record",{uid:this.uid,rid:this.rid}).then((function(t){t.success?e.userDetail=t.result:that.$message.error(t.message)}))},callback:function(e){this.queryParam.type=e,this.setLogType(),this.loadData(1)},setLogType:function(){var e=this.queryParam.type,t=["/admin/logs/list","/admin/logs/flyPosture","/admin/logs/message"];this.url.list=t[e];var a=[this.columns0,this.columns1,this.columns2];this.columns=a[e],this.queryParam.rid=this.rid},edit:function(e,t){this.roles={},this.config={scene:{},ai:{},objective:[],role:[]},this.queryParam.rid=this.rid,this.setLogType(t),this.confirmLoading=!0;var a=this;Object(l["c"])("/admin/record/detail",{id:this.rid}).then((function(e){e.success||(a.$message.warning(e.message),a.close());var t=e.result.config,i=t?t.role:[];i.push({role:9,user:e.result.teacher_id,name:e.result.teacher_name}),a.roles={},i.forEach((function(e){if(-1!=e.user){var t=d["a"].Roles[parseInt(e.role)],i="";20==e.role&&(i=d["a"].VehicleNames[parseInt(e.vehicleid)]),a.roles[e.user+""]="".concat(i).concat(t,"(").concat(e.name,")")}})),a.model=e.result,t&&(a.config=t),a.loadData(1)})).finally((function(){a.confirmLoading=!1})),this.visible=!0},changeComment:function(e){this.userDetail.comment.comment=e},showEvaluation:function(){this.$refs.evaModal.edit(this.userDetail.uid,this.userDetail.comment.comment)},showMessageDetail:function(e){this.$refs.detailForm.edit(e)}}},m=u,h=(a("816f"),a("2877")),f=Object(h["a"])(m,i,s,!1,null,"5978c1f3",null);t["default"]=f.exports}}]);