details.js 5.2 KB

1
  1. require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["mine/pages/release/details"],{3946:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,a=(e._self._c,e.kaType(e.datainfo.scoreType,e.kaoshilist)||""),n="parents"==e.roles?e.scorlist&&e.scorlist.length:null,o="parents"==e.roles&&n?e.__map(e.scorlist,(function(t,a){var n=e.__get_orig(t),o=t.scoreDataDetailVoList&&t.scoreDataDetailVoList.length;return{$orig:n,g1:o}})):null,s="parents"!=e.roles?e.checkPermi(["score:data:remove"]):null;e.$mp.data=Object.assign({},{$root:{m0:a,g0:n,l0:o,m1:s}})},o=[]},"3a1d":function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("ee5c"),o=a("1214"),s=a("dfb6"),i=a("1be3"),r={data:function(){return{bgimg:a("4f34"),shareimg:a("df95"),searchimg:a("420d"),total:a("5b08"),noiconpimg:a("02ac"),name:"",flag1:!0,columns:[],num:0,scoreId:"",datainfo:{},sublist:[],scorlist:[],allscorlist:[],kaoshilist:[],roles:this.$store.state.user.choseroles,markinfo:this.$store.state.user.phonenumber,watermarkflag:"false",border:!1}},components:{zbTable:function(){Promise.all([a.e("mine/common/vendor"),a.e("mine/components/zb-table/zb-tables")]).then(function(){return resolve(a("b3e3"))}.bind(null,a)).catch(a.oe)},waterMark:function(){a.e("mine/components/popup/watermark").then(function(){return resolve(a("a64e"))}.bind(null,a)).catch(a.oe)}},onLoad:function(t){t&&t.id&&(this.scoreId=t.id,this.getDataFn(),this.init()),e.removeStorageSync("scorecount")},onUnload:function(){e.removeStorageSync("scorecount")},methods:{checkPermi:i.checkPermi,checkRole:i.checkRole,getTotal:function(){var t={scoreTime:this.datainfo.scoreTime,scoreType:this.datainfo.scoreType,scoreClassName:this.datainfo.scoreClassName,scoreClassId:this.datainfo.scoreClassId,scoreId:this.scoreId};e.setStorageSync("scorecount",JSON.stringify(t)),this.$tab.navigateTo("/mine/pages/release/count")},kaType:function(e,t){return(0,o.selectDictValue)(t,e)},init:function(){var e=this;(0,n.getDictionaryFn)("kaoshi").then((function(t){200==t.code&&(e.kaoshilist=t.data.map((function(e){return{dictLabel:e.dictLabel,dictValue:e.dictValue}})))})),(0,n.getconfigKeyFn)("sys.index.scoreWatermark").then((function(t){200==t.code&&(e.watermarkflag=t.msg)}))},getColumns:function(e){var t=e,a=[{type:"index",label:"序号",fixed:!0,width:80,align:"center"},{name:"scoreDataName",label:"姓名",fixed:!0,width:140,emptyString:"--",align:"center"}];Object.keys(t).some((function(e){var n={};n.name=t[e].xueke,n.label=t[e].xueke,n.manfen=t[e].manfen,n.sorter=!0,n.align="center",n.width=190,n.paddingRight=20,n.show="true",a.push(n)})),a=a.concat([{name:"zongfen",label:"总分",align:"center",width:112},{name:"scoreSort",label:"排名",align:"center",width:112}]),this.columns=JSON.parse(JSON.stringify(a))},getDataFn:function(){var e=this,t=this.$store.state.user.choseroles,a={role:t},n={scoreId:this.scoreId,params:a};(0,s.getscoreDetFn)(n).then((function(a){200==a.code?(e.datainfo=a.data,a.data.scoreDataMfVoList&&a.data.scoreDataMfVoList.length&&e.getColumns(a.data.scoreDataMfVoList),a.data.scoreDataStudentVoList&&a.data.scoreDataStudentVoList.length&&(e.scorlist="parents"==t?a.data.scoreDataStudentVoList:e.gethandleTable(a.data.scoreDataStudentVoList))):e.$toast(a.msg)}))},gethandleTable:function(e){var t=[],a=e;return Object.keys(a).some((function(e){var n={};if(n.scoreDataName=a[e].scoreDataName,n.scoreDataNameId=a[e].scoreDataNameId,n.zongfen=a[e].zongfen.toFixed(2),n.scoreSort=a[e].scoreSort,a[e].scoreDataDetailVoList&&a[e].scoreDataDetailVoList.length){var o=a[e].scoreDataDetailVoList;o.forEach((function(e){n[e.xueke]=e.score}))}t.push(n)})),t},getDel:function(){var t=this;this.$modal.confirm("确定删除该信息吗?").then((function(){(0,s.getscoreDelFn)(t.scoreId).then((function(a){200==a.code?(t.$toast("删除成功"),setTimeout((function(){e.$emit("refreshscorelist"),e.navigateBack({delta:1})}),1500)):t.$toast(a.msg)}))}))},getSearch:function(){this.name},pullUpLoading:function(e){var t=this;this.flag1&&(this.flag1=!0,setTimeout((function(){t.data.push({id:"20",date:"2016-05-02",name:"王小虎4",yw:5,sx:91,yy:89}),t.flag1=!1,t.num++,2===t.num?(e("ok"),t.flag1=!0):e()}),2e3))}}};t.default=r}).call(this,a("543d")["default"])},"44f7":function(e,t,a){"use strict";a.r(t);var n=a("3946"),o=a("efb4");for(var s in o)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return o[e]}))}(s);a("ff4f");var i=a("f0c5"),r=Object(i["a"])(o["default"],n["b"],n["c"],!1,null,"446b0b3b",null,!1,n["a"],void 0);t["default"]=r.exports},"900a":function(e,t,a){},"9c40":function(e,t,a){"use strict";(function(e,t){var n=a("4ea4");a("11d3"),a("5c17");n(a("66fd"));var o=n(a("44f7"));e.__webpack_require_UNI_MP_PLUGIN__=a,t(o.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])},efb4:function(e,t,a){"use strict";a.r(t);var n=a("3a1d"),o=a.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);t["default"]=o.a},ff4f:function(e,t,a){"use strict";var n=a("900a"),o=a.n(n);o.a}},[["9c40","common/runtime","common/vendor","mine/common/vendor"]]]);