| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-692b034c"],{"2bd2":function(t,e,a){var n=a("02ba"),s=a("40ac").f,l=Function.prototype,r=l.toString,i=/^\s*function ([^ (]*)/,o="name";n&&!(o in l)&&s(l,o,{configurable:!0,get:function(){try{return r.call(this).match(i)[1]}catch(t){return""}}})},"41bb":function(t,e,a){},7237:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"context"},[a("div",{staticClass:"panel"},[a("h5",[t._v(t._s(t.pageTitle))])]),a("div",{staticClass:"panel-body"},[a("div",{staticClass:"panel_control"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:5}},[a("em",[a("span",{staticStyle:{color:"red"}},[t._v("*")]),t._v(" 训练名称: ")]),a("el-input",{attrs:{placeholder:"训练名称",disabled:!0},model:{value:t.panel.name,callback:function(e){t.$set(t.panel,"name",e)},expression:"panel.name"}})],1),a("el-col",{attrs:{span:7}},[a("em",[a("span",{staticStyle:{color:"red"}},[t._v("*")]),t._v(" 训练详情时间: ")]),a("el-date-picker",{staticStyle:{width:"300px"},attrs:{disabled:!0,type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.panel.timeScope,callback:function(e){t.$set(t.panel,"timeScope",e)},expression:"panel.timeScope"}})],1),a("el-button",{staticClass:"seeTemp",attrs:{type:"default"},on:{click:function(e){return t.$router.push("/TrainingDaily")}}},[t._v("返回日常训练 ")])],1)],1)]),a("br"),a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"星期一",name:"1"}}),a("el-tab-pane",{attrs:{label:"星期二",name:"2"}}),a("el-tab-pane",{attrs:{label:"星期三",name:"3"}}),a("el-tab-pane",{attrs:{label:"星期四",name:"4"}}),a("el-tab-pane",{attrs:{label:"星期五",name:"5"}}),a("el-tab-pane",{attrs:{label:"星期六",name:"6"}}),a("el-tab-pane",{attrs:{label:"星期天",name:"7"}})],1),a("div",{staticClass:"table"},[t._l(t.tabs,(function(e){return e.days==t.activeName?a("el-table",{attrs:{data:e.tableData,border:"","is-horizontal-resize":"","default-sort":{prop:"date",order:"descending"},"element-loading-background":"rgba(0, 0, 0, 0.8)"},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{prop:"ClassId",label:"训练动作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-select",{attrs:{disabled:1==e.row.Locking},model:{value:e.row.BmId,callback:function(a){t.$set(e.row,"BmId",a)},expression:"scope.row.BmId"}},t._l(t.panel.BmOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)]}}],null,!0)}),a("el-table-column",{attrs:{prop:"ClassId",label:"训练要求",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-select",{attrs:{disabled:1==e.row.Locking},model:{value:e.row.TrId,callback:function(a){t.$set(e.row,"TrId",a)},expression:"scope.row.TrId"}},t._l(t.panel.TrOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)]}}],null,!0)}),a("el-table-column",{attrs:{prop:"Status",label:"操作",width:"70px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1!=e.row.Locking?a("el-button",{staticClass:"red",attrs:{type:"text"},on:{click:function(a){return t.delRow(e)}}},[t._v("删除 ")]):t._e(),1==e.row.Locking?a("el-button",{staticClass:"gary",attrs:{type:"text",disabled:1==e.row.Locking},on:{click:function(a){return t.delRow(e)}}},[t._v("删除 ")]):t._e()]}}],null,!0)})],1):t._e()})),a("div",{staticClass:"rowBottom"},[a("el-button",{attrs:{type:"default"},on:{click:function(e){return t.$router.push("/trainingDaily")}}},[t._v("返回日常训练")]),0==this.$route.query.id?a("el-button",{staticClass:"pull-right",attrs:{type:"primary",disabled:t.serachBtnStatus},on:{click:t.EditLessonTable}},[t._v("提交 ")]):t._e(),0!=this.$route.query.id?a("el-button",{staticClass:"pull-right",attrs:{type:"primary",disabled:t.serachBtnStatus},on:{click:t.confirmEditLessonTable}},[t._v("提交 ")]):t._e(),a("el-button",{staticClass:"pull-right",attrs:{type:"primary"},on:{click:t.addRow}},[t._v("新增训练项目")])],1),t._m(0)],2),a("br")],1)},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("br"),a("em",{staticClass:"red wrning"},[t._v("*所有操作提交后生效")])])}],l=(a("2bd2"),a("b1fa"),a("efd4"),a("379d"),a("b8a1")),r=a("7c78"),i={data:function(){return{pageTitle:"训练详情管理",loading:!1,activeName:"1",tableData:[],panel:{name:"",dtoId:"",dtdId:0,timeScope:[],BmOptions:[],TrOptions:[],week:"",multipleSelection:[]},multipleSelection:[],pageination:{pageItem:10,pageoptions:pageOptions(),total:100,pageIndex:1},testRow:{DtdId:0,TrId:"",BmId:""},tabs:[{tableData:[],days:"1"},{tableData:[],days:"2"},{tableData:[],days:"3"},{tableData:[],days:"4"},{tableData:[],days:"5"},{tableData:[],days:"6"},{tableData:[],days:"7"}],serachBtnStatus:!1}},mounted:function(){this.pageTitle="编辑训练详情",this.panel.name=this.$route.query.dtoName,this.panel.dtoId=this.$route.query.dtoId,this.panel.timeScope=[this.$route.query.BeginDate,this.$route.query.EndDate],this.panel.dtoId=this.$route.query.dtoId,this.queryBmList(),this.queryTrList(),this.getTableQuery()},methods:{queryBmList:function(){var t=this,e={token:localStorage.token,start:1,tableMax:9999},a=r.stringify(e);Object(l["x"])(a).then((function(e){var a=e;if(0==a.Code){if(null==a.Rs)return!1;t.panel.BmOptions=turnBasicMotionResToOption(a.Rs)}else t.$message.error(a.Memo+" 错误码:"+a.Code)}))},queryTrList:function(){var t=this,e={token:localStorage.token},a=r.stringify(e);Object(l["pe"])(a).then((function(e){var a=e;if(0==a.Code){if(null==a.Rs)return!1;t.panel.TrOptions=turnTrResToOption(a.Rs)}else t.$message.error(a.Memo+" 错误码:"+a.Code)}))},confirmEditLessonTable:function(){var t=this.$route.query.dtoId;this.EditLessonTable(t)},delRow:function(t){if(t.row.StdId)this.checkCannotDel(t);else{var e=parseInt(t.$index),a=parseInt(this.activeName)-1;this.tabs[a].tableData.splice(e,1)}},checkCannotDel:function(t){var e=this,a=this,n={token:localStorage.token,stdId:t.row.StdId},s=r.stringify(n);Object(l["sd"])(s).then((function(n){var s=n;if(0==s.Code){var l=parseInt(t.$index),r=parseInt(e.activeName)-1;e.tabs[r].tableData.splice(l,1)}else a.$message.error(s.Memo+" 错误码:"+s.Code)}))},EditLessonTable:function(){var t=this,e=this;if(!this.checkData())return!1;for(var a=[],n={},s=0;s<this.tabs.length;s++)for(var i=0;i<this.tabs[s].tableData.length;i++)n=this.tabs[s].tableData[i],n.DtoId=parseInt(this.panel.dtoId),n.LessonIndex=parseInt(i+1),n.WeekDay=parseInt(s+1),this.$delete(n,"Base"),a.push(n);var o=JSON.stringify(a),c={token:localStorage.token,dtoId:this.panel.dtoId,dtdRs:o},d=r.stringify(c);Object(l["vb"])(d).then((function(a){var n=a;0==n.Code?(e.$message({showClose:!0,message:"编辑成功!",type:"success"}),t.$router.push({path:"/TrainingDaily"}),t.clearTableRAM()):(t.$router.push({path:"/lessonManage"}),t.clearTableRAM(),e.$message.error(n.Memo+" 错误码:"+n.Code))}))},clearTableRAM:function(){this.tabs=[{tableData:[],days:"1"},{tableData:[],days:"2"},{tableData:[],days:"3"},{tableData:[],days:"4"},{tableData:[],days:"5"},{tableData:[],days:"6"},{tableData:[],days:"7"}]},checkData:function(){for(var t=!0,e=0;e<this.tabs.length;e++)for(var a=0;a<this.tabs[e].tableData.length;a++)if(!this.tabs[e].tableData[a].BmId||!this.tabs[e].tableData[a].TrId){var n=numberToWeekdays(e+1),s=a+1;this.$message.error(n+"第"+s+"行未选择,请选择后再提交"),t=!1;break}return t},addRow:function(){var t=parseInt(this.activeName)-1,e=this.testRow,a=this.deepClone(e);this.tabs[t].tableData.push(a)},deepValue:function(){var t=this,e=[this.testRow];this.tabs.map((function(a){var n=t.deepClone(e);a.tableData=n}))},deepClone:function(t){var e=JSON.stringify(t),a=JSON.parse(e);return a},handleClick:function(){},handleSelectionChange:function(t){this.multipleSelection=t},getTableQuery:function(){var t=this;t.loading=!0;var e={token:localStorage.token,dtoId:this.panel.dtoId},a=r.stringify(e);Object(l["wb"])(a).then((function(e){var a=e,n=a.Rs;if(0==a.Code){t.loading=!1;for(var s=0;s<t.tabs.length;s++)t.tabs[s].tableData=[];n?n.map((function(e){for(var a=0;a<7;a++)e.WeekDay==a+1&&t.tabs[a].tableData.push(e)})):(t.allTableData=[],t.recordsTotal=0)}else t.$message.error(a.Memo+" 错误码:"+a.Code)}))}},watch:{$route:function(t){"trainingDetailEdit"==t.name&&(this.pageTitle="编辑训练详情",this.panel.name=this.$route.query.dtoName,this.panel.dtoId=this.$route.query.dtoId,this.panel.timeScope=[this.$route.query.BeginDate,this.$route.query.EndDate],this.panel.dtoId=this.$route.query.dtoId,this.queryBmList(),this.queryTrList(),this.getTableQuery())}}},o=i,c=(a("ac46"),a("cba8")),d=Object(c["a"])(o,n,s,!1,null,"0b5e6250",null);e["default"]=d.exports},a787:function(t,e,a){"use strict";var n=a("0890"),s=a("40ac"),l=a("dcbd");t.exports=function(t,e,a){var r=n(e);r in t?s.f(t,r,l(0,a)):t[r]=a}},ac46:function(t,e,a){"use strict";a("41bb")},b1fa:function(t,e,a){"use strict";var n=a("3fad"),s=a("5e35"),l=a("ff42"),r=a("63ec"),i=a("1306"),o=a("ed3e"),c=a("a787"),d=a("336f"),u=d("splice"),p=Math.max,b=Math.min,h=9007199254740991,f="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!u},{splice:function(t,e){var a,n,d,u,m,g,y=i(this),v=r(y.length),k=s(t,v),D=arguments.length;if(0===D?a=n=0:1===D?(a=0,n=v-k):(a=D-2,n=b(p(l(e),0),v-k)),v+a-n>h)throw TypeError(f);for(d=o(y,n),u=0;u<n;u++)m=k+u,m in y&&c(d,u,y[m]);if(d.length=n,a<n){for(u=k;u<v-n;u++)m=u+n,g=u+a,m in y?y[g]=y[m]:delete y[g];for(u=v;u>v-n+a;u--)delete y[u-1]}else if(a>n)for(u=v-n;u>k;u--)m=u+n-1,g=u+a-1,m in y?y[g]=y[m]:delete y[g];for(u=0;u<a;u++)y[u+k]=arguments[u+2];return y.length=v-n+a,d}})}}]);
|