webpackJsonp([18],{"2U8I":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("mvHQ"),i=a.n(n),o=a("42iB"),r=a("E4LH"),l={name:"VoyageReg",data:function(){return{loading:!1,params:{start:0,limit:10,group:10},pageNum:1,tableData:[],total:0,open:!1,title:"新增",form:{voyage_name:"",ship_name:"",serect_status:"",start_date:"",end_date:"",voyage_officer_array:[],funding_org_array:[],funding_code:"",voyage_remark:"",voyage_officer:"",funding_org:"",voyage_start_date:"",voyage_end_date:""},rules:{voyage_name:[{required:!0,message:"此处为必填项",trigger:"blur"}],ship_name:[{required:!0,message:"此处为必填项",trigger:"change"}],start_date:[{required:!0,message:"此处为必填项",trigger:"change"}],end_date:[{required:!0,message:"此处为必填项",trigger:"change"}],voyage_officer:[{required:!0,message:"此处为必填项",trigger:"change"}]},shipOptions:["探索一号","探索二号"],secretOptions:[{label:"是",value:"Active"},{label:"否",value:"InActive"}],inputVisible1:!1,dynamicTags1:[],inputValue1:"",dynamicTags2:[],inputVisible2:!1,inputValue2:""}},created:function(){this.getData()},methods:{getData:function(){var t=this;this.loading=!0,Object(o.w)(this.params).then(function(e){t.tableData=e.page.records,t.total=Number(e.page.total),t.loading=!1})},handleAdd:function(){this.title="新增",this.open=!0},handleEdit:function(t){this.title="编辑",this.open=!0,this.form=JSON.parse(i()(t)),this.form.start_date=new Date(this.form.voyage_start_date),this.form.end_date=new Date(this.form.voyage_end_date),this.dynamicTags1=this.form.funding_org.split("、"),this.form.funding_org_array=this.dynamicTags1,this.dynamicTags2=this.form.voyage_officer.split("、"),this.form.voyage_officer_array=this.dynamicTags2},formatParams:function(){this.form.funding_org_array=this.dynamicTags1,this.form.funding_org=this.dynamicTags1.join("、"),this.form.voyage_officer_array=this.dynamicTags2,this.form.voyage_officer=this.dynamicTags2.join("、"),this.form.voyage_start_date=Object(r.b)(this.form.start_date,"date"),this.form.voyage_end_date=Object(r.b)(this.form.end_date,"date")},submitForm:function(){var t=this;this.$refs.form.validate(function(e){e&&("新增"===t.title?(t.formatParams(),Object(o.v)(t.form).then(function(e){t.$message.success("已创建新的航次信息!"),t.getData(),t.cancel()})):(t.formatParams(),Object(o.v)(t.form).then(function(e){t.$message.success("航次信息已更新!"),t.getData(),t.cancel()})))})},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={voyage_name:"",ship_name:"",serect_status:"",start_date:"",end_date:"",voyage_officer_array:[],funding_org_array:[],funding_code:"",voyage_remark:"",voyage_officer:"",funding_org:"",voyage_start_date:"",voyage_end_date:""},this.dynamicTags1=[],this.dynamicTags2=[],this.$refs.form.resetFields()},handleDelete:function(t){var e=this;this.$confirm("确定要删除该航次数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.u)(t).then(function(){e.$message.success("删除成功!"),e.getData()})}).catch(function(){})},handleCurrentChange:function(t){this.pageNum=t,this.params.start=t*this.params.limit-this.params.limit,this.getData()},handleSizeChange:function(t){this.params.limit=t,this.getData()},handleClose:function(t,e){1===t&&this.dynamicTags1.splice(this.dynamicTags1.indexOf(e),1),2===t&&this.dynamicTags2.splice(this.dynamicTags2.indexOf(e),1)},showInput:function(t){var e=this;1===t&&(this.inputVisible1=!0,this.$nextTick(function(t){e.$refs.saveTagInput1.$refs.input.focus()})),2===t&&(this.inputVisible2=!0,this.$nextTick(function(t){e.$refs.saveTagInput2.$refs.input.focus()}))},handleInputConfirm:function(t){if(1===t){var e=this.inputValue1;e&&this.dynamicTags1.push(e),this.inputVisible1=!1,this.inputValue1=""}if(2===t){var a=this.inputValue2;a&&this.dynamicTags2.push(a),this.inputVisible2=!1,this.inputValue2=""}}},watch:{dynamicTags2:function(t){t.length?(this.form.voyage_officer=this.dynamicTags2.join("、"),this.$refs.form.clearValidate("voyage_officer")):this.form.voyage_officer=""}}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-body",attrs:{id:""}},[a("div",{staticClass:"page-header"},[a("h1",{staticClass:"page-title"},[t._v("航次数据汇交")]),t._v(" "),a("el-breadcrumb",[a("el-breadcrumb-item",{attrs:{to:{path:"/"}}},[t._v("首页")]),t._v(" "),a("el-breadcrumb-item",{attrs:{to:{name:"VoyageReg"}}},[t._v("数据汇交")]),t._v(" "),a("el-breadcrumb-item",[t._v("航次数据汇交")])],1)],1),t._v(" "),a("div",{staticClass:"filter-container"},[a("div",{staticClass:"checkBtn"},[a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleAdd}},[t._v("航次数据录入")])],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"tableData",attrs:{stripe:"",border:"",data:t.tableData,"header-cell-style":{background:"#dddfe6",color:"#555960",textAlign:"center"},"cell-style":{textAlign:"center"}}},[a("el-table-column",{attrs:{type:"index",label:"#",width:"50"}}),t._v(" "),a("el-table-column",{attrs:{prop:"voyage_name",label:"航次名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"ship_name",label:"科考船舶"}}),t._v(" "),a("el-table-column",{attrs:{prop:"voyage_start_date",label:"离港日期"}}),t._v(" "),a("el-table-column",{attrs:{prop:"voyage_end_date",label:"返港日期"}}),t._v(" "),a("el-table-column",{attrs:{prop:"voyage_officer",label:"首席"}}),t._v(" "),a("el-table-column",{attrs:{prop:"member_total",label:"参航人数"}}),t._v(" "),a("el-table-column",{attrs:{prop:"funding_org",label:"资助机构"}}),t._v(" "),a("el-table-column",{attrs:{prop:"funding_code",label:"资助编号"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"修改",placement:"top-end"}},[a("el-button",{staticClass:"el-icon-edit",attrs:{id:"mod",size:"mini",type:"warning"},on:{click:function(a){return t.handleEdit(e.row)}}})],1),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除",placement:"top-end"}},[a("el-button",{staticClass:"el-icon-delete",staticStyle:{"margin-left":"0%"},attrs:{id:"del",size:"mini",type:"danger"},on:{click:function(a){return t.handleDelete(e.row)}}})],1)]}}])})],1),t._v(" "),a("div",{staticClass:"pagination-box"},[a("el-pagination",{attrs:{background:"","page-sizes":[10,20,30],"page-size":t.params.limit,layout:"total, sizes, prev, pager, next, jumper",total:t.total,"current-page":t.pageNum},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{title:t.title+"航次信息",visible:t.open,"before-close":t.cancel,width:"800px","append-to-body":""},on:{"update:visible":function(e){t.open=e}}},[a("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"航次名称",prop:"voyage_name"}},[a("el-input",{model:{value:t.form.voyage_name,callback:function(e){t.$set(t.form,"voyage_name",e)},expression:"form.voyage_name"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"资助编号",prop:"funding_code"}},[a("el-input",{model:{value:t.form.funding_code,callback:function(e){t.$set(t.form,"funding_code",e)},expression:"form.funding_code"}})],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"科考船舶",prop:"ship_name"}},[a("el-select",{staticStyle:{width:"100%"},model:{value:t.form.ship_name,callback:function(e){t.$set(t.form,"ship_name",e)},expression:"form.ship_name"}},t._l(t.shipOptions,function(t,e){return a("el-option",{key:e,attrs:{label:t,value:t}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"涉密航次",prop:"serect_status"}},[a("el-select",{staticStyle:{width:"100%"},model:{value:t.form.serect_status,callback:function(e){t.$set(t.form,"serect_status",e)},expression:"form.serect_status"}},t._l(t.secretOptions,function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value}})}),1)],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"离岗日期",prop:"start_date"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date"},model:{value:t.form.start_date,callback:function(e){t.$set(t.form,"start_date",e)},expression:"form.start_date"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"返岗日期",prop:"end_date"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date"},model:{value:t.form.end_date,callback:function(e){t.$set(t.form,"end_date",e)},expression:"form.end_date"}})],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"航次资助机构"}},[t._l(t.dynamicTags1,function(e){return a("el-tag",{key:e,attrs:{closable:"","disable-transitions":!1},on:{close:function(a){return t.handleClose(1,e)}}},[t._v("\n "+t._s(e)+"\n ")])}),t._v(" "),t.inputVisible1?a("el-input",{ref:"saveTagInput1",staticClass:"input-new-tag",attrs:{size:"small"},on:{blur:function(e){return t.handleInputConfirm(1)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm(1)}},model:{value:t.inputValue1,callback:function(e){t.inputValue1=e},expression:"inputValue1"}}):a("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:function(e){return t.showInput(1)}}},[t._v("+ 添加")])],2)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"航次首席",prop:"voyage_officer"}},[t._l(t.dynamicTags2,function(e){return a("el-tag",{key:e,attrs:{closable:"","disable-transitions":!1},on:{close:function(a){return t.handleClose(2,e)}}},[t._v("\n "+t._s(e)+"\n ")])}),t._v(" "),t.inputVisible2?a("el-input",{ref:"saveTagInput2",staticClass:"input-new-tag",attrs:{size:"small"},on:{blur:function(e){return t.handleInputConfirm(2)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm(2)}},model:{value:t.inputValue2,callback:function(e){t.inputValue2=e},expression:"inputValue2"}}):a("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:function(e){return t.showInput(2)}}},[t._v("+ 添加")])],2)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"描述信息",prop:"voyage_remark"}},[a("el-input",{attrs:{type:"textarea",rows:3},model:{value:t.form.voyage_remark,callback:function(e){t.$set(t.form,"voyage_remark",e)},expression:"form.voyage_remark"}})],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确 定")]),t._v(" "),a("el-button",{on:{click:t.cancel}},[t._v("取 消")])],1)],1)],1)},staticRenderFns:[]};var c=a("VU/8")(l,s,!1,function(t){a("L++/")},null,null);e.default=c.exports},"42iB":function(t,e,a){"use strict";e.w=function(t){return Object(n.a)({url:"/voyage/reg/page.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.v=function(t){return Object(n.a)({url:"/voyage/reg/edit.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.u=function(t){return Object(n.a)({url:"/voyage/reg/delete.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.l=function(t){return Object(n.a)({url:"/sample/dataset/page.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.k=function(t){return Object(n.a)({url:"/sample/dataset/find.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.j=function(t){return Object(n.a)({url:"/sample/dataset/edit.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.i=function(t){return Object(n.a)({url:"/sample/dataset/delete.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.o=function(t){return Object(n.a)({url:"/sample/station/list.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.n=function(t){return Object(n.a)({url:"/sample/station/edit.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.m=function(t){return Object(n.a)({url:"/sample/station/delete.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.e=function(t){return Object(n.a)({url:"/sample/line/list.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.d=function(t){return Object(n.a)({url:"/sample/line/edit.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.c=function(t){return Object(n.a)({url:"/sample/line/delete.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.p=function(t){return Object(n.a)({url:"/sample/station/page.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.f=function(t){return Object(n.a)({url:"/sample/line/page.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.h=function(t){return Object(n.a)({url:"/dict/platform/all.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.b=function(t){return Object(n.a)({url:"/dict/equipment/all.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.a=function(t){return Object(n.a)({url:"/dict/data/all.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.g=function(t){return Object(n.a)({url:"/voyage/member/list.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.q=function(t){return Object(n.a)({url:"/sample/dataset/track/total.htm",method:"post",type:"application/x-www-form-urlencoded",data:t})},e.t=function(t){return Object(n.a)({url:"/sample/dataset/track/upload.htm",method:"post",type:"multipart/form-data",data:t})},e.s=function(t){return Object(n.a)({url:"/sample/diving/upload.htm",method:"post",type:"multipart/form-data",data:t})},e.r=function(t){return Object(n.a)({url:"/sample/dataset/upload.htm",method:"post",type:"multipart/form-data",data:t})};var n=a("vLgD")},"L++/":function(t,e){}});