12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a48ca7f6"],{"08ad":function(e,t,r){"use strict";r("db40")},"129d":function(e,t,r){"use strict";r("a210")},1374:function(e,t,r){"use strict";var a=r("bb8b"),i=r("5edc");e.exports=function(e,t,r){t in e?a.f(e,t,i(0,r)):e[t]=r}},"21d9":function(e,t,r){var a=r("3a4c"),i=r("065e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,i)}},"27cd":function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",{staticClass:"person"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},["examiner_leader"!=e.cur?r("el-button",{staticStyle:{float:"right","margin-top":"5px"},attrs:{size:"mini",type:"info"},on:{click:e.all}},[e._v("全选")]):e._e(),"examiner"==e.cur?r("p",{staticClass:"title"},[e._v("专家库")]):r("p",{staticClass:"title"},[e._v("接收者")]),r("el-input",{attrs:{placeholder:"搜索","suffix-icon":"el-icon-search"},on:{input:function(t){return e.getData()}},model:{value:e.query.realname,callback:function(t){e.$set(e.query,"realname",t)},expression:"query.realname"}}),r("ul",{staticClass:"people"},e._l(e.list,(function(t,a){return r("li",{key:a,on:{click:function(r){return e.toggle(t)}}},[t.avatar?r("img",{attrs:{src:t.avatar,alt:""}}):e._e(),t.realname?r("font",[e._v(e._s(t.realname))]):r("font",[e._v(e._s(t.name))]),t.college?r("span",[e._v(e._s(t.college))]):e._e(),t.journal?r("span",[e._v(e._s(t.journal))]):e._e(),"examiner_leader"==e.cur?r("el-radio",{attrs:{label:t.id},model:{value:e.id,callback:function(t){e.id=t},expression:"id"}},[e._v(" ")]):r("el-checkbox",{model:{value:t.checked,callback:function(r){e.$set(t,"checked",r)},expression:"item.checked"}})],1)})),0)],1),"examiner_leader"!=e.cur?r("el-col",{attrs:{span:12}},[r("p",{staticClass:"title",staticStyle:{"margin-bottom":"50px"}},[e._v("已选 \n "),e.selects.length>0?r("span",[e._v("("+e._s(e.selects.length)+")")]):e._e(),r("el-button",{staticStyle:{float:"right","margin-top":"5px"},attrs:{size:"mini",type:"info"},on:{click:e.clear}},[e._v("清除")])],1),r("ul",{staticClass:"people"},[e._l(e.selects,(function(t,a){return[r("li",{key:a},[t.avatar?r("img",{attrs:{src:t.avatar,alt:""}}):e._e(),t.realname?r("font",[e._v(e._s(t.realname))]):r("font",[e._v(e._s(t.name))]),t.college?r("span",[e._v(e._s(t.college))]):e._e(),t.journal?r("span",[e._v(e._s(t.journal))]):e._e(),r("i",{staticClass:"el-icon-error",on:{click:function(r){t.checked=!1,e.selects.splice(a,1),e.change()}}})],1)]}))],2)]):e._e()],1)],1)},i=[],n=(r("a450"),r("58c8")),s=(r("fc02"),{props:{type:"",cur:"",cur_data:""},data:function(){return{search:"",query:{realname:""},checked:"",list:[],id:0,ids:[],selects:[]}},watch:{type:function(e){this.resset()},cur:function(e){this.resset()},cur_data:function(e){e?(console.log(e),"examiner_leader"==this.cur?this.id=parseInt(e):this.ids=e.split(","),this.getData(1)):this.resset()}},methods:{resset:function(){this.id="",this.ids=[],this.selects=[],this.getData()},getData:function(e){var t=this;console.log(this.ids),1==this.type?this.$api.searchExamineList(this.query).then((function(r){var a=r.data.data,i=[];a=a||[];for(var n=0;n<a.length;n++)t.ids&&t.ids.indexOf(String(a[n].id))>=0?(a[n].checked=!0,i.push(a[n])):a[n].checked=!1;e&&(t.selects=i),t.list=a})):this.$api.receiverList(this.query).then((function(r){var a=r.data.data,i=[];a=a||[];for(var n=0;n<a.length;n++)t.ids&&t.ids.indexOf(String(a[n].id))>=0?(a[n].checked=!0,i.push(a[n])):a[n].checked=!1;e&&(t.selects=i),t.list=a}))},toggle:function(e){var t=this.selects;if(e.checked=!e.checked,this.id=e.id,e.checked)t.push(e);else for(var r=0;r<t.length;r++)e.id==t[r].id&&t.splice(r,1);this.selects=t,this.change()},change:function(){for(var e=[],t=this.selects,r=0;r<t.length;r++)e.push(String(t[r].id));this.ids=e;for(var a=this.list,i=0;i<a.length;i++)e&&e.indexOf(String(a[i].id))>=0?a[i].checked=!0:a[i].checked=!1;this.list=a},all:function(){for(var e=this.list,t=0;t<e.length;t++)this.$set(e[t],"checked",!0);this.list=e,this.selects=Object(n["a"])(e)},clear:function(){for(var e=this.list,t=0;t<e.length;t++)this.$set(e[t],"checked",!1);this.list=e,this.selects=[]},submitForm:function(){for(var e,t=this.selects,r=[],a=[],i=0;i<t.length;i++)r.push(t[i].id),a.push(t[i].realname),t[i].id==this.id&&(e=t[i].realname?t[i].realname:t[i].name);return"examiner_leader"==this.cur?{id:String(this.id),name:e}:(this.query.realname="",{id:r.join(","),name:a.join(",")})}},created:function(){this.cur_data&&this.cur_data.length>0&&("examiner_leader"==this.cur?this.id=parseInt(this.cur_data):this.ids=this.cur_data.split(",")),this.getData(1)}}),l=s,o=(r("f5bc"),r("5d22")),c=Object(o["a"])(l,a,i,!1,null,null,null);t["a"]=c.exports},"285b":function(e,t,r){var a=r("35d4"),i=r("5edc"),n=r("3471"),s=r("5d10"),l=r("4fd4"),o=r("83d3"),c=Object.getOwnPropertyDescriptor;t.f=r("26df")?c:function(e,t){if(e=n(e),t=s(t,!0),o)try{return c(e,t)}catch(r){}if(l(e,t))return i(!a.f.call(e,t),e[t])}},"32ea":function(e,t,r){var a=r("8078"),i=r("93ca");r("b2be")("keys",(function(){return function(e){return i(a(e))}}))},"58c8":function(e,t,r){"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function i(e){if(Array.isArray(e))return a(e)}function n(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function s(e,t){if(e){if("string"===typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e){return i(e)||n(e)||s(e)||l()}r.d(t,"a",(function(){return o}))},6261:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",{staticClass:"sf"},[r("el-breadcrumb",{attrs:{separator:"/"}},[r("el-breadcrumb-item",[e._v("审读管理")]),r("el-breadcrumb-item",[e._v("四封审读分配")])],1),r("div",{staticClass:"content"},[r("div",{staticClass:"filter"},[r("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[r("el-form-item",{attrs:{label:""}},[r("el-input",{attrs:{clearable:"",placeholder:"请输入标题"},on:{clear:e.getData},model:{value:e.query.name,callback:function(t){e.$set(e.query,"name",t)},expression:"query.name"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.getData}},[e._v("搜索")])],1),0==e.role?r("el-form-item",{staticStyle:{float:"right"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.open=!0,e.title="新建审读问卷"}}},[e._v("新建审读问卷")])],1):e._e()],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.list,height:"59vh"}},[r("el-table-column",{attrs:{label:"标题",width:"200",align:"center",prop:"createAt"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-link",{attrs:{type:"primary"},on:{click:function(r){return e.$router.push({path:"/assignment/task",query:{id:t.row.id}})}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),r("el-table-column",{attrs:{label:"问卷预览",align:"center",prop:"createAt"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.viewSurvey(t.row)}}},[e._v("\n 查看问卷\n ")])]}}])}),r("el-table-column",{directives:[{name:"show",rawName:"v-show",value:0==e.role||3==e.role,expression:"role==0||role==3"}],attrs:{label:"填报统计",align:"center",width:"200",prop:"createAt"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n 共统计"),r("el-link",{attrs:{type:"primary"},on:{click:function(r){return e.$router.push({path:"/assignment/task",query:{id:t.row.id}})}}},[e._v("\n "+e._s(t.row.total_count)+" \n ")]),e._v("份"),r("br"),e._v("\n 已完成"),r("el-link",{attrs:{type:"primary"},on:{click:function(r){return e.$router.push({path:"/assignment/task",query:{id:t.row.id}})}}},[e._v("\n "+e._s(t.row.finish_count)+" \n ")]),e._v("份"),r("br"),e._v("\n 未填报"),r("el-link",{attrs:{type:"primary"},on:{click:function(r){return e.$router.push({path:"/assignment/task",query:{id:t.row.id}})}}},[e._v("\n "+e._s(t.row.unfinish_count)+" \n ")]),e._v("份\n ")]}}])}),r("el-table-column",{directives:[{name:"show",rawName:"v-show",value:0==e.role||3==e.role,expression:"role==0 || role==3"}],attrs:{label:"审核组成员",width:"150",align:"center",prop:"createAt"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.$router.push({path:"/assignment/member",query:{id:t.row.id}})}}},[e._v("\n 查看详情\n ")])]}}])}),r("el-table-column",{directives:[{name:"show",rawName:"v-show",value:0==e.role||3==e.role,expression:"role==0 || role==3"}],attrs:{label:"问卷统计",align:"center",prop:"createAt"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.$router.push({path:"/assignment/analysis",query:{id:t.row.id}})}}},[e._v("\n 查看\n ")])]}}])}),r("el-table-column",{attrs:{align:"center",label:"发送者",prop:"cname"}}),r("el-table-column",{attrs:{width:"200",align:"center",label:"发布时间",prop:"ctime"}}),r("el-table-column",{attrs:{label:"操作",width:"230",fixed:"right",align:"center",prop:"createAt"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",size:"mini"},on:{click:function(r){return e.$router.push({path:"/assignment/task",query:{id:t.row.id}})}}},[e._v("查看")])]}}])})],1),r("Page",{ref:"pageButton",attrs:{current:e.query.page,page_size:e.query.page_size,total:e.total},on:{pageChange:e.gopage}})],1),r("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.title,visible:e.open,width:"800px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"标题",prop:"name"}},[r("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:"接收人",prop:""}},[r("el-select",{attrs:{multiple:"",clearable:"",placeholder:"请选择"},model:{value:e.form.receiver_id,callback:function(t){e.$set(e.form,"receiver_id",t)},expression:"form.receiver_id"}},e._l(e.relist,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"问卷模版",prop:"template_id"}},[r("el-select",{attrs:{placeholder:"请选择问卷模版"},model:{value:e.form.template_id,callback:function(t){e.$set(e.form,"template_id",t)},expression:"form.template_id"}},e._l(e.templateList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"审核人员",prop:"examiner_id"}},[r("el-select",{attrs:{multiple:"",clearable:"",placeholder:"请选择"},model:{value:e.form.examiner_id,callback:function(t){e.$set(e.form,"examiner_id",t)},expression:"form.examiner_id"}},e._l(e.exlist,(function(e,t){return r("el-option",{key:t,attrs:{label:e.realname,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"选择组长",prop:"examiner_leader_id"}},[r("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:e.form.examiner_leader_id,callback:function(t){e.$set(e.form,"examiner_leader_id",t)},expression:"form.examiner_leader_id"}},e._l(e.exlist,(function(e,t){return r("el-option",{key:t,attrs:{label:e.realname,value:e.id}})})),1),r("p",[e._v("注:组长选定后,本次审读工作将不能中途变更组长")])],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.submitForm}},[e._v("确 定")])],1)],1),r("el-dialog",{attrs:{title:e.title,"close-on-click-modal":!1,visible:e.open1,width:"800px"},on:{"update:visible":function(t){e.open1=t}}},[r("person",{ref:"per",attrs:{cur:e.cur,show_head:!1,type:e.type}}),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){e.open1=!1,e.sure()}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"temp",attrs:{title:e.title,visible:e.open2,width:"600px"},on:{"update:visible":function(t){e.open2=t}}},[r("temp",{ref:"temp",attrs:{info:e.temp}})],1)],1)},i=[],n=(r("ac67"),r("1bc78"),r("32ea"),r("fc02"),r("7dd6")),s=(r("a450"),r("9973")),l=r("27cd"),o=r("78c3");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){Object(n["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d={components:{person:l["a"],Page:s["a"],temp:o["a"]},data:function(){return{loading:!1,total:0,query:{page:1,page_size:10},form:{desc:" ",receiver_id:[1]},list:[],open:!1,open1:!1,open2:!1,title:"新建审读问卷",type:1,cur:"",role:"admin",rules:{name:[{required:!0,message:"标题不能为空",trigger:"blur"}],template_id:[{required:!0,message:"模版不能为空",trigger:"blur"}],receiver:[{required:!0,message:"接收人不能为空"}],examiner_id:[{required:!0,message:"审核人员不能为空",trigger:"blur"}],examiner_leader_id:[{required:!0,message:"审核组长不能为空",trigger:"blur"}]},templateList:[],exlist:[],relist:[],temp:{},assignment:0}},methods:{gopage:function(e){e&&(this.query.page_size=e),this.query.page=this.$refs.pageButton.page,this.getData()},active:function(e,t){var r=this;this.$confirm("是否确定"+t+"?","提示",{type:"warning"}).then((function(){r.$api.activeWorksheet({id:e}).then((function(e){0==e.data.code?(r.$message({message:t+"成功!",type:"success"}),r.getData()):r.$message.error(e.data.message)}))}))},getData:function(){var e=this;this.loading=!0,this.query.action="assign",this.$api.getWorksheetList(this.query).then((function(t){e.list=t.data.data.list,e.total=t.data.data.total,e.loading=!1}))},viewSurvey:function(e){this.temp=e,this.title="",this.open2=!0},sure:function(){var e=this.form;console.log(this.$refs.per.submitForm()),e[this.cur+"_id"]=this.$refs.per.submitForm().id,e[this.cur+"_name"]=this.$refs.per.submitForm().name,this.form=e},edit:function(e){var t=u({},e);t.receiver_id=t.receiver_id.split(","),t.examiner_id=t.examiner_id.split(","),t.examiner_leader_id=String(t.examiner_leader_id),this.form=t},submitForm:function(){var e=this,t=u({},this.form);t.receiver_id=t.receiver_id.join(","),t.examiner_id=t.examiner_id.join(","),this.$refs["form"].validate((function(r){r&&(null!=e.form.id?e.$api.updateWorksheet(t).then((function(t){0==t.data.code?(e.$message({message:"修改成功!",type:"success"}),e.getData()):e.$message.error(t.data.message)})):e.$api.addWorksheet(t).then((function(t){0==t.data.code?(e.$message({message:"添加成功!",type:"success"}),e.getData()):e.$message.error(t.data.message)})))}))}},created:function(){var e=this;this.getData(),this.$api.getTemplateList().then((function(t){e.templateList=t.data.data.list})),this.$route.path.indexOf("assignment")>=0&&(this.assignment=1),this.$api.getAccountInfo().then((function(t){t.code||(e.role=t.data.data.role)})),this.$api.searchExamineList(this.query).then((function(t){for(var r=t.data.data,a=0;a<r.length;a++)r[a].id=String(r[a].id);e.exlist=r})),this.$api.receiverList(this.query).then((function(t){for(var r=t.data.data,a=0;a<r.length;a++)r[a].id=String(r[a].id);e.relist=r}))}},p=d,f=(r("08ad"),r("5d22")),m=Object(f["a"])(p,a,i,!1,null,null,null);t["default"]=m.exports},"7dd6":function(e,t,r){"use strict";function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return a}))},9973:function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-pagination",{attrs:{background:"","page-size":e.page_size?e.page_size:20,"current-page":e.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:e.total},on:{"current-change":e.getData,"size-change":e.handleSizeChange}})},i=[],n={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(e){console.log(e),this.page=e,this.$emit("pageChange")},handleSizeChange:function(e){this.$emit("pageChange",e)}},created:function(){}},s=n,l=(r("129d"),r("5d22")),o=Object(l["a"])(s,a,i,!1,null,null,null);t["a"]=o.exports},a210:function(e,t,r){},ac67:function(e,t,r){var a=r("e99b"),i=r("e7c8"),n=r("3471"),s=r("285b"),l=r("1374");a(a.S,"Object",{getOwnPropertyDescriptors:function(e){var t,r,a=n(e),o=s.f,c=i(a),u={},d=0;while(c.length>d)r=o(a,t=c[d++]),void 0!==r&&l(u,t,r);return u}})},af18:function(e,t,r){},b2be:function(e,t,r){var a=r("e99b"),i=r("76e3"),n=r("0926");e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],s={};s[e]=t(r),a(a.S+a.F*n((function(){r(1)})),"Object",s)}},db40:function(e,t,r){},e7c8:function(e,t,r){var a=r("21d9"),i=r("0c29"),n=r("a86f"),s=r("0b34").Reflect;e.exports=s&&s.ownKeys||function(e){var t=a.f(n(e)),r=i.f;return r?t.concat(r(e)):t}},f5bc:function(e,t,r){"use strict";r("af18")}}]);
- //# sourceMappingURL=chunk-a48ca7f6.b44b90ee.js.map
|